[maven-release-plugin]  copy for tag ruta-2.3.0

git-svn-id: https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0@1680595 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/README b/README
index fd00047..9162450 100644
--- a/README
+++ b/README
@@ -42,6 +42,20 @@
 

 -------------------------------------

 

+Using the jcasgen-maven-plugin may cause problems if it creates duplicate classes for the 

+internal UIMA Ruta types (overwriting the implementation of RutaBasic). Depending on the location 

+of the type system descriptors, the plugin should be configured to be limited on the project, 

+or the UIMA Ruta type system descriptors should explicitly be excluded:

+

+    <configuration>

+      <typeSystemExcludes>

+        <typeSystemExclude>/**/BasicTypeSystem.xml</typeSystemExclude>

+        <typeSystemExclude>/**/InternalTypeSystem.xml</typeSystemExclude>

+      </typeSystemExcludes>

+    </configuration>

+

+-------------------------------------

+

 If you use the uimaFIT JCasGenPomFriendly in Maven and want to use UIMA Ruta 

 as a standalone annotator you have to exclude the generated UIMA Ruta basic 

 type files from the build, e.g., by adding:

diff --git a/example-projects/ExampleProject/script/uima/ruta/example/Author.ruta b/example-projects/ExampleProject/script/uima/ruta/example/Author.ruta
index a720c78..3c9d7f5 100644
--- a/example-projects/ExampleProject/script/uima/ruta/example/Author.ruta
+++ b/example-projects/ExampleProject/script/uima/ruta/example/Author.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system:
diff --git a/example-projects/ExampleProject/script/uima/ruta/example/Main.ruta b/example-projects/ExampleProject/script/uima/ruta/example/Main.ruta
index dfcad44..8209d0c 100644
--- a/example-projects/ExampleProject/script/uima/ruta/example/Main.ruta
+++ b/example-projects/ExampleProject/script/uima/ruta/example/Main.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system 
diff --git a/example-projects/ExampleProject/script/uima/ruta/example/Title.ruta b/example-projects/ExampleProject/script/uima/ruta/example/Title.ruta
index 701e2d5..e2d59b5 100644
--- a/example-projects/ExampleProject/script/uima/ruta/example/Title.ruta
+++ b/example-projects/ExampleProject/script/uima/ruta/example/Title.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system:
diff --git a/example-projects/ExampleProject/script/uima/ruta/example/Year.ruta b/example-projects/ExampleProject/script/uima/ruta/example/Year.ruta
index fad9721..2fa94f1 100644
--- a/example-projects/ExampleProject/script/uima/ruta/example/Year.ruta
+++ b/example-projects/ExampleProject/script/uima/ruta/example/Year.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system:
diff --git a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleAction.ruta b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleAction.ruta
index 2b33cb2..3a71c9f 100644
--- a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleAction.ruta
+++ b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleAction.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 CW{ -> ExampleAction(1, 2, 3, 4, 5)} SW SW SW PERIOD;
diff --git a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBlock.ruta b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBlock.ruta
index f5b91b2..c8ea10e 100644
--- a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBlock.ruta
+++ b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBlock.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 DECLARE T1, T2, T3, T4;
diff --git a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBooleanFunction.ruta b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBooleanFunction.ruta
index b9e1794..1cd0c53 100644
--- a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBooleanFunction.ruta
+++ b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBooleanFunction.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 DECLARE T1, T2, T3;
diff --git a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleCondition.ruta b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleCondition.ruta
index f390f58..07af8ad 100644
--- a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleCondition.ruta
+++ b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleCondition.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 
diff --git a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleNumberFunction.ruta b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleNumberFunction.ruta
index f3b6af0..1d959cb 100644
--- a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleNumberFunction.ruta
+++ b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleNumberFunction.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 DECLARE T1, T2, T3;
diff --git a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleStringFunction.ruta b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleStringFunction.ruta
index a6726bc..985adbb 100644
--- a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleStringFunction.ruta
+++ b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleStringFunction.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 DECLARE T1, T2, T3;
diff --git a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleTypeFunction.ruta b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleTypeFunction.ruta
index 5867b3a..e7ccac2 100644
--- a/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleTypeFunction.ruta
+++ b/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleTypeFunction.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 DECLARE T1, T2, T3;
diff --git a/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta b/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta
index a78899c..0edcabd 100644
--- a/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta
+++ b/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;

 

 DECLARE DirectSpeech;

diff --git a/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta b/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta
index 46f07ec..c2f06dd 100644
--- a/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta
+++ b/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM GeneratedDKProCoreTypes AS pos;
diff --git a/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta b/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta
index 5810bce..2dcde96 100644
--- a/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta
+++ b/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM GeneratedDKProCoreTypes AS pos;
diff --git a/example-projects/Misc/script/uima/ruta/example/HtmlConverter.ruta b/example-projects/Misc/script/uima/ruta/example/HtmlConverter.ruta
index 3c99f04..212fac3 100644
--- a/example-projects/Misc/script/uima/ruta/example/HtmlConverter.ruta
+++ b/example-projects/Misc/script/uima/ruta/example/HtmlConverter.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 ENGINE utils.HtmlAnnotator;
diff --git a/example-projects/Misc/script/uima/ruta/example/Sorter.ruta b/example-projects/Misc/script/uima/ruta/example/Sorter.ruta
index 328858f..2f6c223 100644
--- a/example-projects/Misc/script/uima/ruta/example/Sorter.ruta
+++ b/example-projects/Misc/script/uima/ruta/example/Sorter.ruta
@@ -1,3 +1,20 @@
+// 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.

+

 ENGINE utils.XMIWriter;

 TYPESYSTEM utils.SourceDocumentInformation;

 

diff --git a/example-projects/Misc/script/uima/ruta/example/TEIConverter.ruta b/example-projects/Misc/script/uima/ruta/example/TEIConverter.ruta
index 4959b76..15d1c50 100644
--- a/example-projects/Misc/script/uima/ruta/example/TEIConverter.ruta
+++ b/example-projects/Misc/script/uima/ruta/example/TEIConverter.ruta
@@ -1,3 +1,20 @@
+// 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.

+

 ENGINE utils.HtmlAnnotator;

 TYPESYSTEM utils.HtmlTypeSystem;

 ENGINE utils.HtmlConverter;

diff --git a/example-projects/TextRulerExample/script/uima/ruta/example/Base.ruta b/example-projects/TextRulerExample/script/uima/ruta/example/Base.ruta
index 8a8674b..10c9d55 100644
--- a/example-projects/TextRulerExample/script/uima/ruta/example/Base.ruta
+++ b/example-projects/TextRulerExample/script/uima/ruta/example/Base.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 TYPESYSTEM types.Bibtex;
diff --git a/example-projects/TextRulerExample/script/uima/ruta/example/Features.ruta b/example-projects/TextRulerExample/script/uima/ruta/example/Features.ruta
index 8ad104a..82c1c7f 100644
--- a/example-projects/TextRulerExample/script/uima/ruta/example/Features.ruta
+++ b/example-projects/TextRulerExample/script/uima/ruta/example/Features.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 SCRIPT uima.ruta.example.Base;
diff --git a/example-projects/TextRulerExample/script/uima/ruta/example/KEP.ruta b/example-projects/TextRulerExample/script/uima/ruta/example/KEP.ruta
index e0db188..3b1136e 100644
--- a/example-projects/TextRulerExample/script/uima/ruta/example/KEP.ruta
+++ b/example-projects/TextRulerExample/script/uima/ruta/example/KEP.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;

 

 SCRIPT uima.ruta.example.Features;

diff --git a/example-projects/TextRulerExample/script/uima/ruta/example/LP2.ruta b/example-projects/TextRulerExample/script/uima/ruta/example/LP2.ruta
index d1263db..48c38d9 100644
--- a/example-projects/TextRulerExample/script/uima/ruta/example/LP2.ruta
+++ b/example-projects/TextRulerExample/script/uima/ruta/example/LP2.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 
diff --git a/example-projects/TextRulerExample/script/uima/ruta/example/TraBaL.ruta b/example-projects/TextRulerExample/script/uima/ruta/example/TraBaL.ruta
index c398a1a..086f1ca 100644
--- a/example-projects/TextRulerExample/script/uima/ruta/example/TraBaL.ruta
+++ b/example-projects/TextRulerExample/script/uima/ruta/example/TraBaL.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 SCRIPT uima.ruta.example.Features;
diff --git a/example-projects/TextRulerExample/script/uima/ruta/example/Whisk.ruta b/example-projects/TextRulerExample/script/uima/ruta/example/Whisk.ruta
index 87d099b..badc12a 100644
--- a/example-projects/TextRulerExample/script/uima/ruta/example/Whisk.ruta
+++ b/example-projects/TextRulerExample/script/uima/ruta/example/Whisk.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // learnt using TextRulerExample\data\single
diff --git a/example-projects/ruta-ep-example-extensions/pom.xml b/example-projects/ruta-ep-example-extensions/pom.xml
index a012500..57c3f90 100644
--- a/example-projects/ruta-ep-example-extensions/pom.xml
+++ b/example-projects/ruta-ep-example-extensions/pom.xml
@@ -21,7 +21,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-ep-example-extensions</artifactId>

-  <version>2.3.0</version>

   <name>Apache UIMA Ruta: ${project.artifactId}</name>

   <parent>

     <groupId>org.apache.uima</groupId>

diff --git a/example-projects/ruta-maven-example/pom.xml b/example-projects/ruta-maven-example/pom.xml
index 9639c11..c9a649a 100644
--- a/example-projects/ruta-maven-example/pom.xml
+++ b/example-projects/ruta-maven-example/pom.xml
@@ -1,263 +1,301 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.uima</groupId>
- <artifactId>ruta-maven-example</artifactId>
- <version>2.3.0-SNAPSHOT</version>
-  <url>${uimaWebsiteUrl}</url>
-  <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/ruta-maven-example</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/example-projects/ruta-maven-example</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/example-projects/ruta-maven-example</developerConnection>
-  </scm>
- <dependencies>
-  <dependency>
-   <groupId>org.apache.uima</groupId>
-   <artifactId>ruta-core</artifactId>
-   <version>${project.version}</version>
-   <scope>compile</scope>
-  </dependency>
-  <dependency>
-   <groupId>org.apache.uima</groupId>
-   <artifactId>ruta-core-ext</artifactId>
-   <version>${project.version}</version>
-   <scope>compile</scope>
-  </dependency>
-  <dependency>
-   <groupId>junit</groupId>
-   <artifactId>junit</artifactId>
-   <version>4.5</version>
-   <scope>test</scope>
-  </dependency>
- </dependencies>
+<?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. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>ruta-maven-example</artifactId>
+	<parent>
+		<groupId>org.apache.uima</groupId>
+		<artifactId>ruta-parent</artifactId>
+		<version>2.3.0</version>
+		<relativePath>ruta-parent/pom.xml</relativePath>
+	</parent>
+	<url>${uimaWebsiteUrl}</url>
+	<scm>
+		<url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/example-projects/ruta-maven-example</url>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/example-projects/ruta-maven-example</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/example-projects/ruta-maven-example</developerConnection>
+	</scm>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.uima</groupId>
+			<artifactId>ruta-core</artifactId>
+			<version>${project.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.uima</groupId>
+			<artifactId>ruta-core-ext</artifactId>
+			<version>${project.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.5</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
 
 
- <build>
-  <resources>
-   <resource>
-    <directory>src/main/ruta</directory>
-   </resource>
-   <resource>
-    <directory>src/main/resources</directory>
-   </resource>
-   <resource>
-    <directory>${project.build.directory}/generated-sources/ruta/descriptor</directory>
-   </resource>
-   <resource>
-    <directory>${project.build.directory}/generated-sources/ruta/resources</directory>
-   </resource>
-  </resources>
+	<build>
+		<resources>
+			<resource>
+				<directory>src/main/ruta</directory>
+			</resource>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+			<resource>
+				<directory>${project.build.directory}/generated-sources/ruta/descriptor</directory>
+			</resource>
+			<resource>
+				<directory>${project.build.directory}/generated-sources/ruta/resources</directory>
+			</resource>
+		</resources>
 
-  <plugins>
-   <plugin>
-    <groupId>org.apache.uima</groupId>
-    <artifactId>ruta-maven-plugin</artifactId>
-    <version>${project.version}</version>
-    <configuration>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.rat</groupId>
+					<artifactId>apache-rat-plugin</artifactId>
+					<executions>
+						<execution>
+							<id>default-cli</id>
+							<configuration>
+								<excludes>
+									<exclude>.buildpath</exclude> <!-- generate IDE file -->
+									<exclude>src/main/resources/FirstNames.txt</exclude> <!-- dictionary -->
+									<exclude>issuesFixed/**</exclude> <!-- generated -->
+								</excludes>
+							</configuration>
+						</execution>
+					</executions>
+				</plugin>
+			</plugins>
+		</pluginManagement>
 
-     <!-- This is a exemplary configuration, which explicitly specifies the 
-      default configuration values if not mentioned otherwise. -->
+		<plugins>
+			<plugin>
+				<groupId>org.apache.uima</groupId>
+				<artifactId>ruta-maven-plugin</artifactId>
+				<version>${project.version}</version>
+				<configuration>
 
-     <!-- The directory where the generated type system descriptors will 
-      be written stored. -->
-      <!-- default value: ${project.build.directory}/generated-sources/ruta/descriptor -->
-     <typeSystemOutputDirectory>${project.build.directory}/generated-sources/ruta/descriptor</typeSystemOutputDirectory>
+					<!-- This is a exemplary configuration, which explicitly specifies the 
+						default configuration values if not mentioned otherwise. -->
 
-     <!-- The directory where the generated analysis engine descriptors will 
-      be stored. -->
-     <!-- default value: ${project.build.directory}/generated-sources/ruta/descriptor -->
-     <analysisEngineOutputDirectory>${project.build.directory}/generated-sources/ruta/descriptor</analysisEngineOutputDirectory>
+					<!-- The directory where the generated type system descriptors will 
+						be written stored. -->
+					<!-- default value: ${project.build.directory}/generated-sources/ruta/descriptor -->
+					<typeSystemOutputDirectory>${project.build.directory}/generated-sources/ruta/descriptor</typeSystemOutputDirectory>
 
-     <!-- The template descriptor for the generated type system. By default the descriptor of the maven dependency is loaded. -->
-     <!-- default value: none -->
-     <!-- not used in this example <typeSystemTemplate>...</typeSystemTemplate> -->
+					<!-- The directory where the generated analysis engine descriptors will 
+						be stored. -->
+					<!-- default value: ${project.build.directory}/generated-sources/ruta/descriptor -->
+					<analysisEngineOutputDirectory>${project.build.directory}/generated-sources/ruta/descriptor</analysisEngineOutputDirectory>
 
-     <!-- The template descriptor for the generated analysis engine. By default the descriptor of the maven dependency is loaded. -->
-     <!-- default value: none -->
-     <!-- not used in this example <analysisEngineTemplate>...</analysisEngineTemplate> -->
+					<!-- The template descriptor for the generated type system. By default 
+						the descriptor of the maven dependency is loaded. -->
+					<!-- default value: none -->
+					<!-- not used in this example <typeSystemTemplate>...</typeSystemTemplate> -->
 
-     <!-- Script paths of the generated analysis engine descriptor. -->
-     <!-- default value: none -->
-     <scriptPaths>
-      <scriptPath>${basedir}/src/main/ruta/</scriptPath>
-     </scriptPaths>
+					<!-- The template descriptor for the generated analysis engine. By default 
+						the descriptor of the maven dependency is loaded. -->
+					<!-- default value: none -->
+					<!-- not used in this example <analysisEngineTemplate>...</analysisEngineTemplate> -->
 
-     <!-- Descriptor paths of the generated analysis engine descriptor. -->
-     <!-- default value: none -->
-     <descriptorPaths>
-      <descriptorPath>${project.build.directory}/generated-sources/ruta/descriptor</descriptorPath>
-     </descriptorPaths>
+					<!-- Script paths of the generated analysis engine descriptor. -->
+					<!-- default value: none -->
+					<scriptPaths>
+						<scriptPath>${basedir}/src/main/ruta/</scriptPath>
+					</scriptPaths>
 
-     <!-- Resource paths of the generated analysis engine descriptor. -->
-     <!-- default value: none -->
-     <resourcePaths>
-      <resourcePath>${basedir}/src/main/resources/</resourcePath>
-      <resourcePath>${project.build.directory}/generated-sources/ruta/resources/</resourcePath>
-     </resourcePaths>
+					<!-- Descriptor paths of the generated analysis engine descriptor. -->
+					<!-- default value: none -->
+					<descriptorPaths>
+						<descriptorPath>${project.build.directory}/generated-sources/ruta/descriptor</descriptorPath>
+					</descriptorPaths>
 
-     <!-- Suffix used for the generated type system descriptors. -->
-     <!-- default value: Engine -->
-     <analysisEngineSuffix>Engine</analysisEngineSuffix>
+					<!-- Resource paths of the generated analysis engine descriptor. -->
+					<!-- default value: none -->
+					<resourcePaths>
+						<resourcePath>${basedir}/src/main/resources/</resourcePath>
+						<resourcePath>${project.build.directory}/generated-sources/ruta/resources/</resourcePath>
+					</resourcePaths>
 
-     <!-- Suffix used for the generated analysis engine descriptors. -->
-     <!-- default value: TypeSystem -->
-     <typeSystemSuffix>TypeSystem</typeSystemSuffix>
+					<!-- Suffix used for the generated type system descriptors. -->
+					<!-- default value: Engine -->
+					<analysisEngineSuffix>Engine</analysisEngineSuffix>
 
-     <!-- Source file encoding. -->
-     <!-- default value: ${project.build.sourceEncoding} -->
-     <encoding>UTF-8</encoding>
+					<!-- Suffix used for the generated analysis engine descriptors. -->
+					<!-- default value: TypeSystem -->
+					<typeSystemSuffix>TypeSystem</typeSystemSuffix>
 
-     <!-- Type of type system imports. false = import by location. -->
-     <!-- default value: false -->
-     <importByName>false</importByName>
+					<!-- Source file encoding. -->
+					<!-- default value: ${project.build.sourceEncoding} -->
+					<encoding>UTF-8</encoding>
 
-     <!-- Option to resolve imports while building. -->
-     <!-- default value: false -->
-     <resolveImports>false</resolveImports>
+					<!-- Type of type system imports. false = import by location. -->
+					<!-- default value: false -->
+					<importByName>false</importByName>
 
-     <!-- Amount of retries for building dependent descriptors. Default value 
-      -1 leads to three retires for each script. -->
-      <!-- default value: -1 -->
-     <maxBuildRetries>-1</maxBuildRetries>
+					<!-- Option to resolve imports while building. -->
+					<!-- default value: false -->
+					<resolveImports>false</resolveImports>
 
-     <!-- List of packages with language extensions -->
-     <!-- default value: none -->
-     <extensionPackages>
-      <extensionPackage>org.apache.uima.ruta</extensionPackage>
-     </extensionPackages>
+					<!-- Amount of retries for building dependent descriptors. Default value 
+						-1 leads to three retires for each script. -->
+					<!-- default value: -1 -->
+					<maxBuildRetries>-1</maxBuildRetries>
 
-     <!-- Add UIMA Ruta nature to .project -->
-     <!-- default value: false -->
-     <addRutaNature>true</addRutaNature>
+					<!-- List of packages with language extensions -->
+					<!-- default value: none -->
+					<extensionPackages>
+						<extensionPackage>org.apache.uima.ruta</extensionPackage>
+					</extensionPackages>
+
+					<!-- Add UIMA Ruta nature to .project -->
+					<!-- default value: false -->
+					<addRutaNature>true</addRutaNature>
 
 
-     <!-- Buildpath of the UIMA Ruta Workbench (IDE) for this project -->
-     <!-- default value: none -->
-     <buildPaths>
-      <buildPath>script:src/main/ruta/</buildPath>
-      <buildPath>descriptor:target/generated-sources/ruta/descriptor/</buildPath>
-      <buildPath>resources:src/main/resources/</buildPath>
-     </buildPaths>
+					<!-- Buildpath of the UIMA Ruta Workbench (IDE) for this project -->
+					<!-- default value: none -->
+					<buildPaths>
+						<buildPath>script:src/main/ruta/</buildPath>
+						<buildPath>descriptor:target/generated-sources/ruta/descriptor/</buildPath>
+						<buildPath>resources:src/main/resources/</buildPath>
+					</buildPaths>
 
-    </configuration>
-    <executions>
-     <execution>
-      <id>default</id>
-      <phase>process-classes</phase>
-      <goals>
-       <goal>generate</goal>
-      </goals>
-     </execution>
-    </executions>
-   </plugin>
+				</configuration>
+				<executions>
+					<execution>
+						<id>default</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
 
-   <plugin>
-    <groupId>org.apache.uima</groupId>
-    <artifactId>ruta-maven-plugin</artifactId>
-    <version>2.3.0-SNAPSHOT</version>
-    <configuration></configuration>
-    <executions>
-     <execution>
-      <id>default</id>
-      <phase>process-classes</phase>
-      <goals>
-       <goal>twl</goal>
-      </goals>
-      <configuration>
-       <!-- This is a exemplary configuration, which explicitly specifies 
-        the default configuration values if not mentioned otherwise. -->
+			<plugin>
+				<groupId>org.apache.uima</groupId>
+				<artifactId>ruta-maven-plugin</artifactId>
+				<version>2.3.0</version>
+				<configuration />
+				<executions>
+					<execution>
+						<id>default</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>twl</goal>
+						</goals>
+						<configuration>
+							<!-- This is a exemplary configuration, which explicitly specifies 
+								the default configuration values if not mentioned otherwise. -->
 
-       <!-- Compress resulting tree word list. -->
-       <!-- default value: true -->
-       <compress>true</compress>
+							<!-- Compress resulting tree word list. -->
+							<!-- default value: true -->
+							<compress>true</compress>
 
-       <!-- The source files for the tree word list. -->
-       <!-- default value: none -->
-       <inputFiles>
-        <directory>${basedir}/src/main/resources</directory>
-        <includes>
-         <include>*.txt</include>
-        </includes>
-       </inputFiles>
+							<!-- The source files for the tree word list. -->
+							<!-- default value: none -->
+							<inputFiles>
+								<directory>${basedir}/src/main/resources</directory>
+								<includes>
+									<include>*.txt</include>
+								</includes>
+							</inputFiles>
 
-       <!-- The directory where the generated tree word lists will be written to. -->
-       <!-- default value: ${project.build.directory}/generated-sources/ruta/resources/ -->
-       <outputDirectory>${project.build.directory}/generated-sources/ruta/resources/</outputDirectory>
+							<!-- The directory where the generated tree word lists will be written 
+								to. -->
+							<!-- default value: ${project.build.directory}/generated-sources/ruta/resources/ -->
+							<outputDirectory>${project.build.directory}/generated-sources/ruta/resources/</outputDirectory>
 
-       <!-- Source file encoding. -->
-       <!-- default value: ${project.build.sourceEncoding} -->
-       <encoding>UTF-8</encoding>
+							<!-- Source file encoding. -->
+							<!-- default value: ${project.build.sourceEncoding} -->
+							<encoding>UTF-8</encoding>
 
-      </configuration>
-     </execution>
-    </executions>
-   </plugin>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
 
-   <plugin>
-    <groupId>org.apache.uima</groupId>
-    <artifactId>ruta-maven-plugin</artifactId>
-    <version>2.3.0-SNAPSHOT</version>
-    <configuration></configuration>
-    <executions>
-     <execution>
-      <id>default</id>
-      <phase>process-classes</phase>
-      <goals>
-       <goal>mtwl</goal>
-      </goals>
-      <configuration>
-       <!-- This is a exemplary configuration, which explicitly specifies 
-        the default configuration values if not mentioned otherwise. -->
+			<plugin>
+				<groupId>org.apache.uima</groupId>
+				<artifactId>ruta-maven-plugin</artifactId>
+				<version>2.3.0</version>
+				<configuration />
+				<executions>
+					<execution>
+						<id>default</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>mtwl</goal>
+						</goals>
+						<configuration>
+							<!-- This is a exemplary configuration, which explicitly specifies 
+								the default configuration values if not mentioned otherwise. -->
 
-       <!-- Compress resulting tree word list. -->
-       <!-- default value: true -->
-       <compress>true</compress>
+							<!-- Compress resulting tree word list. -->
+							<!-- default value: true -->
+							<compress>true</compress>
 
-       <!-- The source files for the multi tree word list. -->
-       <!-- default value: none -->
-       <inputFiles>
-        <directory>${basedir}/src/main/resources</directory>
-        <includes>
-         <include>*.txt</include>
-        </includes>
-       </inputFiles>
+							<!-- The source files for the multi tree word list. -->
+							<!-- default value: none -->
+							<inputFiles>
+								<directory>${basedir}/src/main/resources</directory>
+								<includes>
+									<include>*.txt</include>
+								</includes>
+							</inputFiles>
 
-       <!-- The directory where the generated tree word list will be written to. -->
-       <!-- default value: ${project.build.directory}/generated-sources/ruta/resources/generated.mtwl -->
-       <outputFile>${project.build.directory}/generated-sources/ruta/resources/generated.mtwl</outputFile>
+							<!-- The directory where the generated tree word list will be written 
+								to. -->
+							<!-- default value: ${project.build.directory}/generated-sources/ruta/resources/generated.mtwl -->
+							<outputFile>${project.build.directory}/generated-sources/ruta/resources/generated.mtwl</outputFile>
 
-       <!-- Source file encoding. -->
-       <!-- default value: ${project.build.sourceEncoding} -->
-       <encoding>UTF-8</encoding>
-       
-      </configuration>
-     </execution>
-    </executions>
-   </plugin>
+							<!-- Source file encoding. -->
+							<!-- default value: ${project.build.sourceEncoding} -->
+							<encoding>UTF-8</encoding>
 
-   <plugin>
-    <groupId>org.apache.uima</groupId>
-    <artifactId>jcasgen-maven-plugin</artifactId>
-    <version>2.7.0</version>
-    <executions>
-     <execution>
-      <goals>
-       <goal>generate</goal>
-      </goals>
-      <!-- runs in phase process-resources by default -->
-      <configuration>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
 
-       <!-- one or more ant-like file patterns identifying top level descriptors -->
-       <typeSystemIncludes>
-        <typeSystemInclude>src/main/resources/types/BibtexTypeSystem.xml</typeSystemInclude>
-       </typeSystemIncludes>
+			<plugin>
+				<groupId>org.apache.uima</groupId>
+				<artifactId>jcasgen-maven-plugin</artifactId>
+				<version>2.7.0</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+						<!-- runs in phase process-resources by default -->
+						<configuration>
 
-       <limitToProject>true</limitToProject>
-      </configuration>
-     </execution>
-    </executions>
-   </plugin>
-  </plugins>
- </build>
+							<!-- one or more ant-like file patterns identifying top level descriptors -->
+							<typeSystemIncludes>
+								<typeSystemInclude>src/main/resources/types/BibtexTypeSystem.xml</typeSystemInclude>
+							</typeSystemIncludes>
 
+							<limitToProject>true</limitToProject>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
 </project>
\ No newline at end of file
diff --git a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Author.ruta b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Author.ruta
index a720c78..3c9d7f5 100644
--- a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Author.ruta
+++ b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Author.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system:
diff --git a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/AuthorWithMTWL.ruta b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/AuthorWithMTWL.ruta
index 1b2f1fd..4398e10 100644
--- a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/AuthorWithMTWL.ruta
+++ b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/AuthorWithMTWL.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system:
diff --git a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Main.ruta b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Main.ruta
index dfcad44..8209d0c 100644
--- a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Main.ruta
+++ b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Main.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system 
diff --git a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Title.ruta b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Title.ruta
index 701e2d5..e2d59b5 100644
--- a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Title.ruta
+++ b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Title.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system:
diff --git a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Year.ruta b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Year.ruta
index fad9721..2fa94f1 100644
--- a/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Year.ruta
+++ b/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Year.ruta
@@ -1,3 +1,20 @@
+// 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 uima.ruta.example;
 
 // import the types of this type system:
diff --git a/pom.xml b/pom.xml
index 9bae8bd..ad0bbf6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,10 +16,8 @@
     <relativePath>ruta-parent/pom.xml</relativePath>

   </parent>

 

-  <groupId>org.apache.uima</groupId>

   <artifactId>ruta</artifactId>

   <packaging>pom</packaging>

-  <version>2.3.0</version>

   <name>Apache UIMA Ruta: ${project.artifactId}</name>

   <description>The top project for Apache UIMA Ruta</description>

   <url>${uimaWebsiteUrl}</url>

@@ -108,12 +106,13 @@
     <module>ruta-ep-textruler</module>

     <module>ruta-ep-core-ext</module>

 

-	<module>ruta-maven-plugin</module>

+	  <module>ruta-maven-plugin</module>

 	

     <module>ruta-docbook</module>

     <module>ruta-eclipse-feature</module>

     

     <module>example-projects/ruta-ep-example-extensions</module>

+    <module>example-projects/ruta-maven-example</module>

   </modules>

   <build>

     <pluginManagement>

diff --git a/ruta-core-ext/pom.xml b/ruta-core-ext/pom.xml
index 244033c..c31cb69 100644
--- a/ruta-core-ext/pom.xml
+++ b/ruta-core-ext/pom.xml
@@ -13,7 +13,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<artifactId>ruta-core-ext</artifactId>
-	<version>2.3.0</version>
 
 	<name>Apache UIMA Ruta: ${project.artifactId}</name>
 	<url>${uimaWebsiteUrl}</url>
diff --git a/ruta-core/pom.xml b/ruta-core/pom.xml
index 021a0f3..a7ec6c4 100644
--- a/ruta-core/pom.xml
+++ b/ruta-core/pom.xml
@@ -13,7 +13,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-core</artifactId>

-  <version>2.3.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

@@ -198,6 +197,16 @@
           <argLine>-Xmx650M</argLine>

         </configuration>

       </plugin>

+      <plugin>

+        <groupId>org.apache.maven.plugins</groupId>

+        <artifactId>maven-javadoc-plugin</artifactId>

+        <configuration>

+          <!-- Exclude generated jcas classes -->

+          <sourceFileExcludes>

+            <sourceFileExclude>**/org/apache/uima/ruta/type/*.java</sourceFileExclude>

+          </sourceFileExcludes>

+        </configuration>

+      </plugin>

     </plugins>

   </build>

 </project>
\ No newline at end of file
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java b/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
index f2c163e..fec87cc 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
@@ -509,6 +509,8 @@
    *          Type system describing the package to load.

    * @param packageName

    *          Package to load or null to load all packages.

+   * @param alias

+   *          Alias of the package. Null or empty string to use no alias.

    */

   public void importPackageFromTypeSystem(String typesystem, String packageName, String alias) {

     TypeSystemDescription tsd = TypeSystemDescriptionFactory

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
index 779e000..cd569df 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
@@ -785,11 +785,15 @@
   

   

   public boolean isVisible(AnnotationFS annotationFS) {

+    return isVisible(annotationFS, false);

+  }

+  

+  public boolean isVisible(AnnotationFS annotationFS, boolean ignoreWindow) {

     if (annotationFS == null) {

       return false;

     }

     AnnotationFS windowAnnotation = filter.getWindowAnnotation();

-    if (windowAnnotation != null

+    if (!ignoreWindow && windowAnnotation != null

             && (annotationFS.getBegin() < windowAnnotation.getBegin() || annotationFS.getEnd() > windowAnnotation

                     .getEnd())) {

       return false;

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitFeatureAction.java b/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitFeatureAction.java
index e537c85..d656218 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitFeatureAction.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitFeatureAction.java
@@ -34,8 +34,10 @@
 import org.apache.uima.ruta.UIMAConstants;

 import org.apache.uima.ruta.expression.IRutaExpression;

 import org.apache.uima.ruta.expression.bool.IBooleanExpression;

+import org.apache.uima.ruta.expression.feature.FeatureExpression;

 import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

 import org.apache.uima.ruta.expression.feature.GenericFeatureExpression;

+import org.apache.uima.ruta.expression.feature.SimpleFeatureExpression;

 import org.apache.uima.ruta.expression.number.INumberExpression;

 import org.apache.uima.ruta.expression.string.IStringExpression;

 import org.apache.uima.ruta.expression.type.ITypeExpression;

@@ -71,6 +73,10 @@
     }

     Collection<AnnotationFS> featureAnnotations = expr.getFeatureAnnotations(annotations, stream,

             element.getParent(), false);

+    if (featureAnnotations.isEmpty()) {

+      // null value in feature, but we require the host

+      featureAnnotations = annotations;

+    }

     Feature feature = expr.getFeature(element.getParent());

     IRutaExpression arg = expr.getArg();

     for (AnnotationFS each : featureAnnotations) {

@@ -131,15 +137,27 @@
         }

       }

     } else if (argExpr instanceof GenericFeatureExpression && !feature.getRange().isPrimitive()) {

-      TypeExpression typeExpr = ((GenericFeatureExpression) argExpr).getFeatureExpression()

-              .getTypeExpr(element.getParent());

+      FeatureExpression fe = ((GenericFeatureExpression) argExpr).getFeatureExpression();

+      TypeExpression typeExpr = fe.getTypeExpr(element.getParent());

       Type t = typeExpr.getType(element.getParent());

       List<AnnotationFS> inWindow = stream.getAnnotationsInWindow(a, t);

-      if (feature.getRange().isArray()) {

-        a.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), inWindow));

+      if (fe instanceof SimpleFeatureExpression) {

+        SimpleFeatureExpression sfe = (SimpleFeatureExpression) fe;

+        List<AnnotationFS> featureAnnotations = new ArrayList<>(sfe.getFeatureAnnotations(inWindow,

+                stream, element.getParent(), false));

+        if (feature.getRange().isArray()) {

+          a.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), featureAnnotations));

+        } else if (!featureAnnotations.isEmpty()) {

+          AnnotationFS annotation = featureAnnotations.get(0);

+          a.setFeatureValue(feature, annotation);

+        }

       } else {

-        AnnotationFS annotation = inWindow.get(0);

-        a.setFeatureValue(feature, annotation);

+        if (feature.getRange().isArray()) {

+          a.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), inWindow));

+        } else {

+          AnnotationFS annotation = inWindow.get(0);

+          a.setFeatureValue(feature, annotation);

+        }

       }

     }

   }

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorBuilder.java b/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorBuilder.java
index 4edce24..4a1859a 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorBuilder.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorBuilder.java
@@ -198,8 +198,8 @@
         url = checkImportExistence(eachName, options.getTypeSystemSuffix() + ".xml",

                 options.getClassLoader());

         if (url == null) {

-          throw new FileNotFoundException("Build process can't find " + eachName + " in "

-                  + desc.getScriptName());

+          throw new FileNotFoundException("Build process can't find " + eachName

+                  + options.getTypeSystemSuffix() + ".xml" + " in " + desc.getScriptName());

         }

       }

       TypeSystemDescription each = getTypeSystemDescriptor(url, options, rm);

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java b/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java
index 6fb6351..e1f9319 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java
@@ -59,7 +59,7 @@
  * it would be mapped to an annotation of length 0, it is not moved to the new view.

  * 

  * The HTML Converter also supports heuristic and explicit conversion patterns which default to

- * html4 decoding, e.g., "<![CDATA[&nbsp;]]>", "<![CDATA[&lt;]]>", etc. Concepts like tables or

+ * html4 decoding, e.g., "{@literal&nbsp;}", "{@literal &lt;}", etc. Concepts like tables or

  * lists are not supported.

  * 

  * Note that in general it is suggested to run an html cleaner before any further processing to

@@ -180,10 +180,18 @@
 

   @ConfigurationParameter(name = PARAM_GAP_TEXT, mandatory = false, defaultValue = "")

   private String gapText;

+  

+  /**

+   * This boolean parameter sets the value of the parameter <code>gapText</code> to a single space.

+   */

+  public static final String PARAM_USE_SPACE_GAP = "useSpaceGap";

+

+  @ConfigurationParameter(name = PARAM_USE_SPACE_GAP, mandatory = false, defaultValue = "")

+  private Boolean useSpaceGap;

 

   /**

    * This string array parameter can be used to apply custom conversions. It defaults to a list of

-   * commonly used codes, e.g., <![CDATA[&nbsp;]]>, which are converted using html 4 entity

+   * commonly used codes, e.g., {@literal&nbsp;}, which are converted using html 4 entity

    * unescaping. However, explicit conversion strings can also be passed via the parameter

    * <code>conversionReplacements</code>. Remember to enable explicit conversion via

    * <code>conversionPolicy</code> first.

@@ -199,7 +207,7 @@
    * This string parameter determines the conversion policy used, either "heuristic", "explicit", or

    * "none". When the value is "explicit", the parameters <code>conversionPatterns</code> and

    * optionally <code>conversionReplacements</code> are considered. The "heuristic" conversion

-   * policy uses simple regular expressions to decode html4 entities such as "<![CDATA[&nbsp;]]>".

+   * policy uses simple regular expressions to decode html4 entities such as "{@literal&nbsp;}".

    * The default behavior is "heuristic".

    */

   public static final String PARAM_CONVERSION_POLICY = "conversionPolicy";

@@ -273,6 +281,24 @@
         conversionReplacements[i] = rep;

       }

     }

+    

+    gapText = (String) aContext.getConfigParameterValue(PARAM_GAP_TEXT);

+    gapText = gapText == null ? "" : gapText;

+    

+    useSpaceGap = (Boolean) aContext.getConfigParameterValue(PARAM_USE_SPACE_GAP);

+    useSpaceGap = useSpaceGap == null ? false : useSpaceGap;

+    

+    if(useSpaceGap) {

+      gapText = " ";

+    }

+    

+    gapInducingTags = (String[]) aContext.getConfigParameterValue(PARAM_GAP_INDUCING_TAGS);

+    gapInducingTags = gapInducingTags == null ? new String[0] : gapInducingTags;

+    

+    expandOffsets = (Boolean) aContext.getConfigParameterValue(PARAM_EXPAND_OFFSETS);

+    expandOffsets = expandOffsets == null ? false : expandOffsets;

+    

+    newlineInducingTagRegExp = (String) aContext.getConfigParameterValue(PARAM_NEWLINE_INDUCING_TAG_REGEXP);

   }

 

   @Override

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
index a970eb0..2ee901d 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
@@ -268,7 +268,7 @@
 

   /**

    * This parameter specifies whether the memory consumption should be reduced. This parameter

-   * should be set to true for very large CAS documents (e.g., > 500k tokens), but it also reduces

+   * should be set to true for very large CAS documents (e.g., &gt; 500k tokens), but it also reduces

    * the performance. The default value is set to false.

    */

   public static final String PARAM_LOW_MEMORY_PROFILE = "lowMemoryProfile";

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
index 0c21ef0..34d183e 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
@@ -195,9 +195,11 @@
   /**

    * Helper to get the test type, e.g. org.apache.uima.T1, org.apache.uima.T2, ...

    * 

-   * @param cas

+   * @param cas 

+   *          The CAS object containing the type system

    * @param i

    *          typeId, converted to {@link #TYPE} + i

+   * @return the test type object with the given counter

    */

   public static Type getTestType(CAS cas, int i) {

     if (cas == null)

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java b/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java
index 0e6f115..dba8018 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java
@@ -41,15 +41,15 @@
 /**

  * This Analysis Engine is able to serialize the processed CAS to an XMI file whereas the the source

  * and destination view can be specified A descriptor file for this Analysis Engine is located in

- * the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

+ * the folder <code>descriptor/utils</code> of a UIMA Ruta project.

  * 

  */

 public class ViewWriter extends JCasMultiplier_ImplBase {

 

   /**

    * This string parameter specifies the absolute path of the resulting file named

-   * <quote>output.xmi</quote>. However, if an annotation of the type

-   * <quote>org.apache.uima.examples.SourceDocumentInformation</quote> is given, then the value of

+   * <code>output.xmi</code>. However, if an annotation of the type

+   * <code>org.apache.uima.examples.SourceDocumentInformation</code> is given, then the value of

    * this parameter is interpreted to be relative to the URI stored in the annotation and the name

    * of the file will be adapted to the name of the source file. If this functionality is activated

    * in the preferences, then the UIMA Ruta Workbench adds the SourceDocumentInformation annotation

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java b/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
index d89fd0c..8ba0367 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
@@ -152,7 +152,7 @@
         }

       }

       if (!(this instanceof FeatureMatchExpression)) {

-        if (stream.isVisible(afs)) {

+        if (stream.isVisible(afs, true)) {

           result.add(afs);

         }

       } else {

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordListPersistence.java b/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordListPersistence.java
index 353b345..2db9a25 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordListPersistence.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordListPersistence.java
@@ -60,7 +60,7 @@
    * 

    * @param is

    *          the inputStream to sniff. Must support {@link InputStream#markSupported()}

-   * @return true if this stream starts with '<?xml'

+   * @return true if this stream starts with '{@literal <?xml}'

    */

   public static boolean isSniffedXmlContentType(InputStream is) throws IOException {

     if (is == null)

diff --git a/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlConverter.xml b/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlConverter.xml
index 1fb405d..2f70f7a 100644
--- a/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlConverter.xml
+++ b/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlConverter.xml
@@ -107,6 +107,18 @@
         <multiValued>true</multiValued>

         <mandatory>false</mandatory>

       </configurationParameter>

+    <configurationParameter>

+        <name>expandOffsets</name>

+        <type>Boolean</type>

+        <multiValued>false</multiValued>

+        <mandatory>false</mandatory>

+      </configurationParameter>

+    <configurationParameter>

+        <name>useSpaceGap</name>

+        <type>Boolean</type>

+        <multiValued>false</multiValued>

+        <mandatory>false</mandatory>

+      </configurationParameter>

     </configurationParameters>

     <configurationParameterSettings>

       <nameValuePair>

diff --git a/ruta-docbook/pom.xml b/ruta-docbook/pom.xml
index d14cf74..3951f25 100644
--- a/ruta-docbook/pom.xml
+++ b/ruta-docbook/pom.xml
@@ -20,7 +20,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-docbook</artifactId>

-  <version>2.3.0</version>

   <packaging>pom</packaging>

   <parent>

     <groupId>org.apache.uima</groupId>

diff --git a/ruta-docbook/src/docbook/tools.ruta.language.actions.xml b/ruta-docbook/src/docbook/tools.ruta.language.actions.xml
index 4dc3a43..96c9a98 100644
--- a/ruta-docbook/src/docbook/tools.ruta.language.actions.xml
+++ b/ruta-docbook/src/docbook/tools.ruta.language.actions.xml
@@ -1330,8 +1330,8 @@
         <emphasis role="bold">Definition:</emphasis>

       </title>

       <para>

-        <programlisting><![CDATA[TRIE((String = (TypeExpression|{TypeExpression,StringExpression,Expression}))+,

-          ListExpression,BooleanExpression,NumberExpression,

+        <programlisting><![CDATA[TRIE((String = (TypeExpression|{TypeExpression,StringExpression,

+          Expression}))+,ListExpression,BooleanExpression,NumberExpression,

           BooleanExpression,NumberExpression,StringExpression)]]></programlisting>

       </para>

     </section>

@@ -1355,8 +1355,8 @@
         several chars that will be ignored.

       </para>

       <para>

-        <programlisting><![CDATA[Document{->TRIE("FirstNames.txt" = {A, "a", "first"}, "LastNames.txt" = {B, "b", true}, 

-          "CompleteNames.txt" = {C, "c", 6},

+        <programlisting><![CDATA[Document{->TRIE("FirstNames.txt" = {A, "a", "first"}, "LastNames.txt" = 

+          {B, "b", true}, "CompleteNames.txt" = {C, "c", 6},

           list1, true, 4, false, 0, ":")};]]></programlisting>

       </para>

       <para>

diff --git a/ruta-docbook/src/docbook/tools.ruta.overview.xml b/ruta-docbook/src/docbook/tools.ruta.overview.xml
index bf97dc6..718d631 100644
--- a/ruta-docbook/src/docbook/tools.ruta.overview.xml
+++ b/ruta-docbook/src/docbook/tools.ruta.overview.xml
@@ -1337,6 +1337,12 @@
     specified in the <quote>gapInducingTags</quote>.

           </para>

         </section>

+        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.useSpaceGap">

+          <title>useSpaceGap</title>

+          <para>

+          This boolean parameter sets the value of the parameter <quote>gapText</quote> to a single space..

+          </para>

+        </section>

       </section>

     </section><section id="ugr.tools.ruta.ae.stylemap">

       <title>Style Map Creator</title>

diff --git a/ruta-eclipse-feature/pom.xml b/ruta-eclipse-feature/pom.xml
index c250403..89e665f 100644
--- a/ruta-eclipse-feature/pom.xml
+++ b/ruta-eclipse-feature/pom.xml
@@ -28,7 +28,6 @@
   </parent>

     

   <artifactId>ruta-eclipse-feature</artifactId>

-  <version>2.3.0</version>

   

   <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

   <description>UIMA Eclipse Plugin Feature that

diff --git a/ruta-eclipse-feature/src/main/resources/feature.xml b/ruta-eclipse-feature/src/main/resources/feature.xml
index 2c28d75..191753e 100644
--- a/ruta-eclipse-feature/src/main/resources/feature.xml
+++ b/ruta-eclipse-feature/src/main/resources/feature.xml
@@ -86,5 +86,12 @@
          install-size="0"

          version="${parsedVersion.osgiVersion}"

          unpack="false"/>

+         

+   <plugin

+         id="org.apache.uima.ruta.core.ext"

+         download-size="0"

+         install-size="0"

+         version="${parsedVersion.osgiVersion}"

+         unpack="false"/>

 

 </feature>

diff --git a/ruta-eclipse-update-site/pom.xml b/ruta-eclipse-update-site/pom.xml
index 1de86f2..3d9550b 100644
--- a/ruta-eclipse-update-site/pom.xml
+++ b/ruta-eclipse-update-site/pom.xml
@@ -92,6 +92,7 @@
                 <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-ide</artifactId>            <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.ide_${item-eclipse-release-version}.jar      </destFileName></artifactItem>

                 <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-ide-ui</artifactId>         <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.ide.ui_${item-eclipse-release-version}.jar   </destFileName></artifactItem>

                 <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-textruler</artifactId>      <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.textruler_${item-eclipse-release-version}.jar</destFileName></artifactItem>

+                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-core-ext</artifactId>      <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.core.ext_${item-eclipse-release-version}.jar</destFileName></artifactItem>

               </artifactItems>            

               <outputDirectory>${toBePacked}</outputDirectory>              

             </configuration>

diff --git a/ruta-ep-addons/pom.xml b/ruta-ep-addons/pom.xml
index 9662c52..0a4860d 100644
--- a/ruta-ep-addons/pom.xml
+++ b/ruta-ep-addons/pom.xml
@@ -20,7 +20,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-ep-addons</artifactId>

-  <version>2.3.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

diff --git a/ruta-ep-caseditor/pom.xml b/ruta-ep-caseditor/pom.xml
index 4562e29..add7d55 100644
--- a/ruta-ep-caseditor/pom.xml
+++ b/ruta-ep-caseditor/pom.xml
@@ -20,7 +20,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-ep-caseditor</artifactId>

-  <version>2.3.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeNode.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeNode.java
index e7be70c..a411e2a 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeNode.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeNode.java
@@ -19,7 +19,7 @@
 
 package org.apache.uima.ruta.caseditor.view.tree;
 
-import java.util.List;
+import java.util.Stack;
 
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
@@ -33,7 +33,7 @@
     super(parent, annotation);
   }
   
-  public AnnotationTreeNode(ITreeNode parent, AnnotationFS annotation, List<Type> parentTypes) {
+  public AnnotationTreeNode(ITreeNode parent, AnnotationFS annotation, Stack<Type> parentTypes) {
     super(parent, annotation, parentTypes);
   }
 
@@ -46,7 +46,7 @@
     return getAnnotation().getCoveredText();
   }
 
-  public Object getAdapter(Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (FSTreeNode.class.equals(adapter)) {
       return this;
diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ArrayFeatureTreeNode.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ArrayFeatureTreeNode.java
index 4fd0d67..b54a0f4 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ArrayFeatureTreeNode.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ArrayFeatureTreeNode.java
@@ -93,7 +93,7 @@
     // nothing to do
   }
 
-  public Object getAdapter(Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (ArrayFeatureTreeNode.class.equals(adapter)) {
       return this;
diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSFeatureTreeNode.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSFeatureTreeNode.java
index 9652b87..d4e4e57 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSFeatureTreeNode.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSFeatureTreeNode.java
@@ -19,7 +19,7 @@
 
 package org.apache.uima.ruta.caseditor.view.tree;
 
-import java.util.List;
+import java.util.Stack;
 
 import org.apache.uima.cas.Feature;
 import org.apache.uima.cas.FeatureStructure;
@@ -37,7 +37,7 @@
   }
 
   public FSFeatureTreeNode(ITreeNode parent,Feature feature, FeatureStructure fs,
-          List<Type> parentTypes) {
+          Stack<Type> parentTypes) {
     super(parent, fs, parentTypes);
     this.feature = feature;
   }
@@ -51,7 +51,7 @@
     return feature.getShortName() + ": " + getAnnotation().getCoveredText();
   }
 
-  public Object getAdapter(Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
     if (FSTreeNode.class.equals(adapter)) {
       return this;
     } else if (AnnotationFS.class.equals(adapter) || FeatureStructure.class.equals(adapter)) {
diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSTreeNode.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSTreeNode.java
index c49299b..03d813e 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSTreeNode.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSTreeNode.java
@@ -19,9 +19,9 @@
 

 package org.apache.uima.ruta.caseditor.view.tree;

 

-import java.util.ArrayList;

 import java.util.Collections;

 import java.util.List;

+import java.util.Stack;

 

 import org.apache.commons.lang3.StringUtils;

 import org.apache.uima.cas.ArrayFS;

@@ -37,16 +37,17 @@
   protected FeatureStructure fs;

 

   public FSTreeNode(ITreeNode parent, FeatureStructure annotation) {

-    this(parent, annotation, new ArrayList<Type>());

+    this(parent, annotation, new Stack<Type>());

   }

 

-  public FSTreeNode(ITreeNode parent, FeatureStructure annotation, List<Type> parentTypes) {

+  public FSTreeNode(ITreeNode parent, FeatureStructure annotation, Stack<Type> parentTypes) {

     super(parent);

     this.fs = annotation;

-    parentTypes.add(fs.getType());

+    parentTypes.push(fs.getType());

     for (Feature f : annotation.getType().getFeatures()) {

       addFeatures(this, f, annotation, parentTypes);

     }

+    parentTypes.pop();

   }

 

   public String getName() {

@@ -58,7 +59,7 @@
   }

 

   public void addFeatures(ITreeNode parent, Feature f, FeatureStructure featureStructure,

-          List<Type> parentTypes) {

+          Stack<Type> parentTypes) {

     if (f.getRange().isArray()) {

       // handle all kinds of arrays

       FeatureStructure featureValue = featureStructure.getFeatureValue(f);

@@ -109,10 +110,10 @@
 

   private boolean expandable(Type type, List<Type> parentTypes) {

     int frequency = Collections.frequency(parentTypes, type);

-    return frequency < 5;

+    return frequency < 2;

   }

 

-  public Object getAdapter(Class adapter) {

+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {

     if (FSTreeNode.class.equals(adapter)) {

       return this;

     } else if (FeatureStructure.class.equals(adapter)) {

diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/PrimitiveFeatureTreeNode.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/PrimitiveFeatureTreeNode.java
index 61cdbe6..9ba413e 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/PrimitiveFeatureTreeNode.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/PrimitiveFeatureTreeNode.java
@@ -90,7 +90,7 @@
     // nothing to do
   }
 
-  public Object getAdapter(Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (PrimitiveFeatureTreeNode.class.equals(adapter)) {
       return this;
diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeOrderedRootTreeNode.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeOrderedRootTreeNode.java
index 9e9c9b7..85cca5f 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeOrderedRootTreeNode.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeOrderedRootTreeNode.java
@@ -19,11 +19,11 @@
 
 package org.apache.uima.ruta.caseditor.view.tree;
 
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Map;
+import java.util.Stack;
 
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
@@ -90,7 +90,7 @@
 
   private FSTreeNode createFSNode(ITreeNode parent, FeatureStructure fs) {
     if (fs instanceof AnnotationFS) {
-      return new AnnotationTreeNode(parent, (AnnotationFS) fs, new ArrayList<Type>());
+      return new AnnotationTreeNode(parent, (AnnotationFS) fs, new Stack<Type>());
     }
     return new FSTreeNode(parent, fs);
   }
@@ -151,7 +151,7 @@
     sort(new TreeComparator());
   }
 
-  public Object getAdapter(Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (TypeTreeNode.class.equals(adapter)) {
       return this;
diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeTreeNode.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeTreeNode.java
index 55ddbda..999e434 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeTreeNode.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeTreeNode.java
@@ -57,7 +57,7 @@
     return type.hashCode();
   }
 
-  public Object getAdapter(Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (TypeTreeNode.class.equals(adapter)) {
       return this;
diff --git a/ruta-ep-core-ext/pom.xml b/ruta-ep-core-ext/pom.xml
index c17d473..7916cb1 100644
--- a/ruta-ep-core-ext/pom.xml
+++ b/ruta-ep-core-ext/pom.xml
@@ -21,7 +21,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>ruta-ep-core-ext</artifactId>
-  <version>2.3.0</version>
   <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>
   <parent>
     <groupId>org.apache.uima</groupId>
diff --git a/ruta-ep-engine/pom.xml b/ruta-ep-engine/pom.xml
index 47e7314..40ba8ba 100644
--- a/ruta-ep-engine/pom.xml
+++ b/ruta-ep-engine/pom.xml
@@ -13,7 +13,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-ep-engine</artifactId>

-  <version>2.3.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

diff --git a/ruta-ep-ide-ui/pom.xml b/ruta-ep-ide-ui/pom.xml
index 2ac2ce4..8800635 100644
--- a/ruta-ep-ide-ui/pom.xml
+++ b/ruta-ep-ide-ui/pom.xml
@@ -21,7 +21,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-ep-ide-ui</artifactId>

-  <version>2.3.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

diff --git a/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java b/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
index d62ba7a..3a407d1 100644
--- a/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
+++ b/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
@@ -865,6 +865,8 @@
             || t.equals(UIMAConstants.TYPE_LONG) || t.equals(UIMAConstants.TYPE_SHORT))
             && RutaTypeConstants.RUTA_TYPE_N == kind) {
       return true;
+    } else if ( RutaTypeConstants.RUTA_TYPE_AT == kind) {
+      return true;
     }
     return false;
   }
diff --git a/ruta-ep-ide/pom.xml b/ruta-ep-ide/pom.xml
index 152cc1e..4cb38ea 100644
--- a/ruta-ep-ide/pom.xml
+++ b/ruta-ep-ide/pom.xml
@@ -21,7 +21,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-ep-ide</artifactId>

-  <version>2.3.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

diff --git a/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.g b/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.g
index 58e45fb..95af198 100644
--- a/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.g
+++ b/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.g
@@ -127,7 +127,12 @@
 		}

 	}

 	

-	public void addType(RutaBlock parent, String type, String parentType) {

+	public void addType(RutaBlock parent, String type, VariableReference parentTypeExpr) {

+	

+	String parentType = "uima.tcas.Annotation";

+          if(parentTypeExpr != null) {

+          	parentType = parentTypeExpr.getName();

+	  }

 		vars.add(type);

 		String descriptionString = null;

        if(packageString == null) {

@@ -144,8 +149,12 @@
 		

 	}

 	

-	public void addType(RutaBlock parent, String name, String parentType, List featuresTypes,

+	public void addType(RutaBlock parent, String name, VariableReference parentTypeExpr, List featuresTypes,

           List<Token> featuresNames) {

+          String parentType = "uima.tcas.Annotation";

+          if(parentTypeExpr != null) {

+          	parentType = parentTypeExpr.getName();

+	  }

 	   	 name = parent.getNamespace() + "." + name.trim();

 	   	 String descriptionString = null;

 	   	 if(packageString == null) {

@@ -504,13 +513,13 @@
 		 id = Identifier {addVariable(id.getText(), declareToken.getText());}

 			

 	(

-	{addType($blockDeclaration::env, id.getText(), lazyParent == null ? null : lazyParent.toString());

+	{addType($blockDeclaration::env, id.getText(), lazyParent);

 			declarations.add(StatementFactory.createAnnotationType(id,declareToken));}

 		(

 		

 		COMMA 

 		 id = Identifier {addVariable(id.getText(), declareToken.getText());}

-			{addType($blockDeclaration::env, id.getText(),  lazyParent == null ? null : lazyParent.toString()); 

+			{addType($blockDeclaration::env, id.getText(),  lazyParent); 

 			declarations.add(StatementFactory.createAnnotationType(id,declareToken));}

 		 )* end = SEMI

 		 {

@@ -518,8 +527,6 @@
 		 stmts.add(stmt);

 		 }

 	|

-	declareToken=DECLARE type=annotationType

-	id = Identifier {addVariable(id.getText(), declareToken.getText());}

 		(LPAREN 

 			(

 			obj1 = annotationType{featureTypes.add(obj1);} 

@@ -552,7 +559,7 @@
 		   features.add(StatementFactory.createFeatureDeclaration(eachTO, eachName));  

 		   i++;

 		}

-		addType($blockDeclaration::env, id.getText(), lazyParent == null? "": lazyParent.toString(), featureTypes, featureNames);

+		addType($blockDeclaration::env, id.getText(), lazyParent, featureTypes, featureNames);

 		declarations.add( StatementFactory.createAnnotationType(id,declareToken, lazyParent, features));

 		stmt = StatementFactory.createDeclareDeclarationsStatement(declareToken, declarations, lazyParent, features);

 		stmts.add(stmt);

@@ -2255,14 +2262,14 @@
 	;

 

 //seems OK

-annotationType returns [Expression at = null]

+annotationType returns [VariableReference at = null]

 	: 

 	(

 	atRef = annotationTypeVariableReference {at = atRef;}

 	)

 	;

 		

-annotationTypeVariableReference returns [Expression typeVar = null]

+annotationTypeVariableReference returns [VariableReference typeVar = null]

   :

   atRef = dottedId 

   {typeVar = ExpressionFactory.createAnnotationTypeVariableReference(atRef);}

diff --git a/ruta-ep-textruler/pom.xml b/ruta-ep-textruler/pom.xml
index 176feaa..cee8d97 100644
--- a/ruta-ep-textruler/pom.xml
+++ b/ruta-ep-textruler/pom.xml
@@ -20,7 +20,6 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-ep-textruler</artifactId>

-  <version>2.3.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

diff --git a/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateDescriptorMojo.java b/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateDescriptorMojo.java
index 9830dc0..14fc61e 100644
--- a/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateDescriptorMojo.java
+++ b/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateDescriptorMojo.java
@@ -19,7 +19,6 @@
 package org.apache.uima.ruta.maven;
 
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -63,7 +62,6 @@
 import org.apache.uima.util.InvalidXMLException;
 import org.apache.uima.util.XMLizable;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.Scanner;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
 import org.codehaus.plexus.util.xml.Xpp3DomWriter;
@@ -233,15 +231,21 @@
 
     String[] files = FileUtils.getFilesFromExtension(project.getBasedir().getAbsolutePath(),
             new String[] { "ruta" });
-    
+
     List<File> filesToBuild = new ArrayList<File>();
     for (String each : files) {
       File file = new File(each);
-      if(buildContext.hasDelta(file)) {
+      boolean descriptorMissing = isDescriptorMissing(file);
+      if (descriptorMissing || buildContext.hasDelta(file)) {
         filesToBuild.add(file);
       }
     }
 
+    if (addRutaNature) {
+      addRutaNature();
+      addRutaBuildPath();
+    }
+    
     if (filesToBuild.isEmpty()) {
       getLog().debug("UIMA Ruta Building: Skipped, since no changes were detected.");
       return;
@@ -293,11 +297,26 @@
       getLog().warn("Failed to build UIMA Ruta script: " + scriptName);
     }
 
-    if (addRutaNature) {
-      addRutaNature();
-      addRutaBuildPath();
+  }
+
+  private boolean isDescriptorMissing(File file) {
+    String scriptName = file.getName().substring(0, file.getName().length() - 5);
+
+    String aeName = scriptName + analysisEngineSuffix + ".xml";
+    String[] aeFiles = FileUtils.getFilesFromExtension(
+            analysisEngineOutputDirectory.getAbsolutePath(), new String[] { aeName });
+    if (aeFiles == null || aeFiles.length == 0) {
+      return true;
     }
 
+    String tsName = scriptName + typeSystemOutputDirectory + ".xml";
+    String[] tsFiles = FileUtils.getFilesFromExtension(typeSystemOutputDirectory.getAbsolutePath(),
+            new String[] { tsName });
+    if (tsFiles == null || tsFiles.length == 0) {
+      return true;
+    }
+
+    return false;
   }
 
   private List<String> getExtensionsFromClasspath(ClassLoader classloader) {
@@ -345,6 +364,7 @@
     OutputStream os = null;
     try {
       File out = new File(aFilename);
+      out.getParentFile().mkdirs();
       os = buildContext.newFileOutputStream(out);
       out.getParentFile().mkdirs();
       getLog().debug("Writing descriptor to: " + out);
diff --git a/trunk/LICENSE b/trunk/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/NOTICE b/trunk/NOTICE
deleted file mode 100644
index 60e179e..0000000
--- a/trunk/NOTICE
+++ /dev/null
@@ -1,13 +0,0 @@
-Apache UIMA Ruta

-Copyright 2011 The Apache Software Foundation

-

-This product includes software developed at

-The Apache Software Foundation (http://www.apache.org/).

-

-Portions of UIMA Ruta were originally developed by

-the Universität Würzburg.

-Copyright (c) 2006, 2011 Universität Würzburg.

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License.

diff --git a/trunk/README b/trunk/README
deleted file mode 100644
index 9162450..0000000
--- a/trunk/README
+++ /dev/null
@@ -1,76 +0,0 @@
-

-Apache UIMA Ruta v2.3.0

--------------------------------------------------------------------------

-

-Building from the Source Distribution

--------------------------------------

-

-We use Maven 3.0 or later for building; download this if needed, 

-and set the environment variable MAVEN_OPTS to -Xmx800m -XX:MaxPerSize=256m.

-

-Then do the build by going into the UIMA Ruta directory, and issuing the command

-   mvn clean install

-   

-This builds everything except the ...source-release.zip file. If you want that,

-change the command to 

-

-   mvn clean install -Papache-release

-   

-For more details, please see http://uima.apache.org/building-uima.html   

-

-

--------------------------------------

-

-This release requires an update of script projects and its descriptors, 

-e.g, in the UIMA Ruta Workbench by deleting all descriptors and updating the script project.

-Right-click on a project and select "UIMA Ruta -> Convert to UIMA Ruta project"

-

--------------------------------------

-

-This product was originally released as Apache UIMA TextMarker. The UIMA Ruta Workbench provides

-a command for updating old projects. Please right-click on a project and select "UIMA Ruta -> Update Project". 

-

--------------------------------------

-

-The UIMA Ruta analysis engine requires type priorities for the correct execution of rules. 

-If a CAS is created using the CASCreationUtils, please provide the type priorities, e.g., by:

-

-    URL tpUrl = this.getClass().getResource("/org/apache/uima/ruta/engine/TypePriorities.xml");

-    TypePriorities typePriorities = UIMAFramework.getXMLParser().parseTypePriorities(

-        new XMLInputSource(tpUrl));

-    CAS cas = CasCreationUtils.createCas(descriptor, typePriorities, new FsIndexDescription[0]);

-

--------------------------------------

-

-Using the jcasgen-maven-plugin may cause problems if it creates duplicate classes for the 

-internal UIMA Ruta types (overwriting the implementation of RutaBasic). Depending on the location 

-of the type system descriptors, the plugin should be configured to be limited on the project, 

-or the UIMA Ruta type system descriptors should explicitly be excluded:

-

-    <configuration>

-      <typeSystemExcludes>

-        <typeSystemExclude>/**/BasicTypeSystem.xml</typeSystemExclude>

-        <typeSystemExclude>/**/InternalTypeSystem.xml</typeSystemExclude>

-      </typeSystemExcludes>

-    </configuration>

-

--------------------------------------

-

-If you use the uimaFIT JCasGenPomFriendly in Maven and want to use UIMA Ruta 

-as a standalone annotator you have to exclude the generated UIMA Ruta basic 

-type files from the build, e.g., by adding:

-

-

-   <plugin>

-    <groupId>org.apache.maven.plugins</groupId>

-    <artifactId>maven-compiler-plugin</artifactId>

-    <version>3.0</version>

-    <configuration>

-         <excludes>

-             <exclude>org/apache/uima/ruta/type/*.java</exclude>

-         </excludes>

-    </configuration>

-   </plugin> 

-

-

-

diff --git a/trunk/RELEASE_NOTES.html b/trunk/RELEASE_NOTES.html
deleted file mode 100644
index 2898f4d..0000000
--- a/trunk/RELEASE_NOTES.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<html>

-  <!--

-   ***************************************************************

-   * 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.

-   ***************************************************************

-   -->

-

-<head>

-  <title>Apache UIMA Ruta v2.3.0 Release Notes</title>

-</head>

-<body>

-<h1>Apache UIMA&#8482; Ruta v2.3.0 Release Notes</h1>

-

-<h2>Contents</h2>

-<p>

-<a href="#what.is.uima-as">1. What is UIMA Ruta</a><br/>

-<a href="#major.changes">2. Major Changes in this Release</a><br/>

-<a href="#get.involved">3. How to Get Involved</a><br/>

-<a href="#report.issues">4. How to Report Issues</a><br/>

-<a href="#list.issues">5. List of JIRA Issues Fixed in this Release</a>

-</p>  

-   

-<h2><a name="what.is.uima-as">1. What is UIMA Ruta?</a></h2>

-

-     <p>

-  			Apache UIMA&#8482; Ruta is a rule-based script language supported by Eclipse-based tooling.

-      The language is designed to enable rapid development of text processing applications within UIMA. 

-      A special focus lies on the intuitive and flexible domain specific language for defining 

-      patterns of annotations. The Eclipse-based tooling for Ruta, called the Ruta Workbench,

-      was created to support the user and to facilitate every step when writing Ruta rules. Both the 

-      Ruta rule language and the Ruta Workbench integrate smoothly with Apache UIMA.

-			</p>

-

-<h2><a name="major.changes">2. Major Changes in this Release</a></h2>

-<p>

-  This release requires an update of script projects and its descriptors, 

-  e.g, in the UIMA Ruta Workbench by deleting all descriptors and updating the script project.

-  Right-click on a project and select "UIMA Ruta -> Convert to UIMA Ruta project"

-</p>

-<p>

-<h3>UIMA Ruta Language and Analysis Engine:</h3>

-<ul>

-  <li>

-    Requires Java 7

-  </li>

-  <li>

-    Maven Plugin for UIMA Ruta

-  </li>

-  <li>

-    Extensions and simplifications of the language (external resources, null values, more syntactic sugar)

-  </li>

-  <li>

-    Improvements to Analysis Engines (RutaEngine, HtmlConverter)

-  </li>

-  <li>

-    More exemplary script projects

-  </li>

-  <li>

-    Many, many bug fixes

-  </li>

- </ul>

-<h3>UIMA Ruta Workbench:</h3>

- <ul>

-  <li>

-    Requires Java 7

-  </li>

-  <li>

-    Works now also in other project structures (Maven projects)

-  </li>

-  <li>

-    Bug fixes

-  </li>

- </ul>

-</p>

-<p>

-Please see the <a href="README">README</a> for further information. 

-</p> 

-  

-  

-<h2><a name="get.involved">3. How to Get Involved</a></h2>

-<p>

-The Apache UIMA Ruta project really needs and appreciates any contributions, 

-including documentation help, source code and feedback.  If you are interested

-in contributing, please visit 

-<a href="http://uima.apache.org/get-involved.html">

-  http://uima.apache.org/get-involved.html</a>.

-</p>

-  

-<h2><a name="report.issues">4. How to Report Issues</a></h2>

-<p>

-The Apache UIMA project uses JIRA for issue tracking.  Please report any 

-issues you find at 

-<a href="http://issues.apache.org/jira/browse/uima">http://issues.apache.org/jira/browse/uima</a>

-</p>

-  

-<h2><a name="list.issues">5. List of JIRA Issues Fixed in this Release</a></h2>

-

-Click <a href="issuesFixed/jira-report.html">issuesFixed/jira-report.html</a> for the list of 

-issues fixed in this release.

-

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/example-projects/ExampleProject/.buildpath b/trunk/example-projects/ExampleProject/.buildpath
deleted file mode 100644
index a4d0028..0000000
--- a/trunk/example-projects/ExampleProject/.buildpath
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<buildpath>

-	<buildpathentry kind="src" path="script">

-		<attributes>

-			<attribute name="ruta" value="script"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="descriptor">

-		<attributes>

-			<attribute name="ruta" value="descriptor"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="resources">

-		<attributes>

-			<attribute name="ruta" value="resources"/>

-		</attributes>

-	</buildpathentry>

-</buildpath>

diff --git a/trunk/example-projects/ExampleProject/.project b/trunk/example-projects/ExampleProject/.project
deleted file mode 100644
index 3172d06..0000000
--- a/trunk/example-projects/ExampleProject/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<projectDescription>

-	<name>ExampleProject</name>

-	<comment></comment>

-	<projects>

-	</projects>

-	<buildSpec>

-		<buildCommand>

-			<name>org.eclipse.dltk.core.scriptbuilder</name>

-			<arguments>

-			</arguments>

-		</buildCommand>

-	</buildSpec>

-	<natures>

-		<nature>org.apache.uima.ruta.ide.nature</nature>

-	</natures>

-</projectDescription>

diff --git a/trunk/example-projects/ExampleProject/LICENSE b/trunk/example-projects/ExampleProject/LICENSE
deleted file mode 100644
index 75b5248..0000000
--- a/trunk/example-projects/ExampleProject/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

diff --git a/trunk/example-projects/ExampleProject/NOTICE b/trunk/example-projects/ExampleProject/NOTICE
deleted file mode 100644
index d642f45..0000000
--- a/trunk/example-projects/ExampleProject/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache UIMA Ruta example project

-Copyright 2006, 2014 The Apache Software Foundation

-

-This product includes content developed at

-The Apache Software Foundation (http://www.apache.org/).

-

diff --git a/trunk/example-projects/ExampleProject/descriptor/BasicEngine.xml b/trunk/example-projects/ExampleProject/descriptor/BasicEngine.xml
deleted file mode 100644
index 30e8014..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/BasicEngine.xml
+++ /dev/null
@@ -1,279 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>BasicEngine</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters searchStrategy="language_fallback">

-      <configurationParameter>

-        <name>seeders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debug</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalScripts</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>profile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugWithMatches</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>statistics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalExtensions</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugOnlyFor</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptEncoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngineLoaders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>resourcePaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>defaultFilteredTypes</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>mainScript</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>removeBasics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>dynamicAnchoring</name>

-        <description>Activates dynamic anchoring (possible speed up).</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRuleElement</name>

-        <description>Activates greedy anchoring for rule elements.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRule</name>

-        <description>Activates greedy anchoring for complete rules.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>lowMemoryProfile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>createdBy</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>simpleGreedyForComposed</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalUimafitEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>strictImports</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varNames</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varValues</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>rules</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>debug</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>profile</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>debugWithMatches</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>defaultFilteredTypes</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.type.SPACE</string>

-            <string>org.apache.uima.ruta.type.BREAK</string>

-            <string>org.apache.uima.ruta.type.MARKUP</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>removeBasics</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>seeders</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>createdBy</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="BasicTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities>

-      <priorityList>

-        <type>org.apache.uima.ruta.type.RutaFrame</type>

-        <type>uima.tcas.Annotation</type>

-        <type>org.apache.uima.ruta.type.RutaBasic</type>

-      </priorityList>

-    </typePriorities>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/BasicTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/BasicTypeSystem.xml
deleted file mode 100644
index fea497f..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>BasicTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <imports>

-    <import location="InternalTypeSystem.xml"/>

-  </imports>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ALL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ANY</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.MARKUP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.W</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CAP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PERIOD</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.QUESTION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COMMA</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SEMICOLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WS</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NUM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPECIAL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NBSP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SPACE</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AMP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPACE</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.BREAK</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Document</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TokenSeed</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/InternalTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/InternalTypeSystem.xml
deleted file mode 100644
index e0e207c..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/InternalTypeSystem.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>InternalTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaBasic</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>replacement</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaOptional</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>score</name>

-          <description/>

-          <rangeTypeName>uima.cas.Double</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>applied</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>tried</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>rules</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>matched</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>delegates</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>innerApply</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>baseCondition</name>

-          <description/>

-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>matches</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>ruleAnchor</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaColoring</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>bgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>targetType</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>fgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>selected</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>value</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalsePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>original</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalseNegative</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>time</name>

-          <description/>

-          <rangeTypeName>uima.cas.Long</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaFrame</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Statistics</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>total</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>amount</name>

-          <description/>

-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>part</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TruePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>rule</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/types/BibtexTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/types/BibtexTypeSystem.xml
deleted file mode 100644
index f1237dd..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/types/BibtexTypeSystem.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>BibtexTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>uima.ruta.example.Bibtex</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>author</name>

-          <description/>

-          <rangeTypeName>uima.ruta.example.Author</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>title</name>

-          <description/>

-          <rangeTypeName>uima.ruta.example.Title</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>year</name>

-          <description/>

-          <rangeTypeName>uima.ruta.example.Year</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Author</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Year</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Title</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/AuthorEngine.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/AuthorEngine.xml
deleted file mode 100644
index a5d84f5..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/AuthorEngine.xml
+++ /dev/null
@@ -1,352 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>Author</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExampleProject\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="AuthorTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.Author.FirstName</type>

-                    <type>uima.ruta.example.Author.FirstNameInitial</type>

-                    <type>uima.ruta.example.Author.Name</type>

-                    <type>uima.ruta.example.Author.NameListPart</type>

-                    <type>uima.ruta.example.Author.NameLinker</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.Author.FirstName</type>

-                    <type>uima.ruta.example.Author.FirstNameInitial</type>

-                    <type>uima.ruta.example.Author.Name</type>

-                    <type>uima.ruta.example.Author.NameListPart</type>

-                    <type>uima.ruta.example.Author.NameLinker</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/AuthorTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/AuthorTypeSystem.xml
deleted file mode 100644
index 35c110b..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/AuthorTypeSystem.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>AuthorTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-        <import location="..\..\..\types\BibtexTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.Author.FirstName</name>

-            <description>Type defined in uima.ruta.example.Author</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Author.FirstNameInitial</name>

-            <description>Type defined in uima.ruta.example.Author</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Author.NameListPart</name>

-            <description>Type defined in uima.ruta.example.Author</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Author.Name</name>

-            <description>Type defined in uima.ruta.example.Author</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Author.NameLinker</name>

-            <description>Type defined in uima.ruta.example.Author</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/MainEngine.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/MainEngine.xml
deleted file mode 100644
index b9196b4..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/MainEngine.xml
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>Main</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExampleProject\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array>

-                        <string>uima.ruta.example.Author</string>

-                        <string>uima.ruta.example.Year</string>

-                        <string>uima.ruta.example.Title</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="MainTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/MainTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/MainTypeSystem.xml
deleted file mode 100644
index 59e6461..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/MainTypeSystem.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>MainTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-        <import location="..\..\..\types\BibtexTypeSystem.xml"/>

-        <import location="AuthorTypeSystem.xml"/>

-        <import location="YearTypeSystem.xml"/>

-        <import location="TitleTypeSystem.xml"/>

-    </imports>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/TitleEngine.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/TitleEngine.xml
deleted file mode 100644
index 50e5d61..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/TitleEngine.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>Title</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExampleProject\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="TitleTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.Title.TitleStopper</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.Title.TitleStopper</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/TitleTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/TitleTypeSystem.xml
deleted file mode 100644
index 491efb3..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/TitleTypeSystem.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>TitleTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-        <import location="..\..\..\types\BibtexTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.Title.TitleStopper</name>

-            <description>Type defined in uima.ruta.example.Title</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/YearEngine.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/YearEngine.xml
deleted file mode 100644
index 57b2d10..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/YearEngine.xml
+++ /dev/null
@@ -1,335 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>Year</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExampleProject/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExampleProject\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="YearTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/YearTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/YearTypeSystem.xml
deleted file mode 100644
index 921a031..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/uima/ruta/example/YearTypeSystem.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>YearTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-        <import location="..\..\..\types\BibtexTypeSystem.xml"/>

-    </imports>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/AnnotationWriter.xml b/trunk/example-projects/ExampleProject/descriptor/utils/AnnotationWriter.xml
deleted file mode 100644
index 64ada39..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/AnnotationWriter.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.AnnotationWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the annotation is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Encoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Type</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Type</name>

-        <value>

-          <string>uima.tcas.DocumentAnnotation</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Encoding</name>

-        <value>

-          <string>UTF-8</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/Cutter.xml b/trunk/example-projects/ExampleProject/descriptor/utils/Cutter.xml
deleted file mode 100644
index 9a61571..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/Cutter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaCutter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>keep</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/HtmlAnnotator.xml b/trunk/example-projects/ExampleProject/descriptor/utils/HtmlAnnotator.xml
deleted file mode 100644
index 1acac59..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/HtmlAnnotator.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>onlyContent</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>onlyContent</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="HtmlTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/HtmlConverter.xml b/trunk/example-projects/ExampleProject/descriptor/utils/HtmlConverter.xml
deleted file mode 100644
index d493e4d..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/HtmlConverter.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlConverter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTags</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTagRegExp</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>replaceLinebreaks</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>linebreakReplacement</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPolicy</name>

-        <description>Either heuristic, explicit, or none.

-Defaults to heuristic.</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPatterns</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionReplacements</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>skipWhitespaces</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>processAll</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>skipWhitespaces</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/HtmlTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/utils/HtmlTypeSystem.xml
deleted file mode 100644
index f5fb687..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/HtmlTypeSystem.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>typeSystemDescriptor</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TAG</name>

-      <description></description>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>expandedOffsets</name>

-          <description></description>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeName</name>

-          <description></description>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeValue</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.B</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H1</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H2</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H3</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H4</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H5</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H6</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.COMMENT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TITLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.I</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.U</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BIG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SMALL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FONT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.A</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HEAD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HTML</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.EM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TABLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.DIV</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SPAN</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.UL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.OL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.P</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LI</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TBODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TH</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.IMG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.STYLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SCRIPT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LINK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.INPUT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FORM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.META</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.REMARK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-      <features>

-        <featureDescription>

-          <name>comment</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/Modifier.xml b/trunk/example-projects/ExampleProject/descriptor/utils/Modifier.xml
deleted file mode 100644
index a5a251e..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/Modifier.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>Modifier</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputLocation</name>

-        <description></description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>outputView</name>

-        <value>

-          <string>modified</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <outputSofas>

-          <sofaName>modified</sofaName>

-        </outputSofas>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/PlainTextAnnotator.xml b/trunk/example-projects/ExampleProject/descriptor/utils/PlainTextAnnotator.xml
deleted file mode 100644
index 77a0a55..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/PlainTextAnnotator.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.PlainTextAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters/>

-    <configurationParameterSettings/>

-    <typeSystemDescription>

-      <imports>

-        <import location="PlainTextTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/PlainTextTypeSystem.xml b/trunk/example-projects/ExampleProject/descriptor/utils/PlainTextTypeSystem.xml
deleted file mode 100644
index 7081c20..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/PlainTextTypeSystem.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>PlainTextTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Line</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Paragraph</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WSLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EmptyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EmptyLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AnyLine</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/SourceDocumentInformation.xml b/trunk/example-projects/ExampleProject/descriptor/utils/SourceDocumentInformation.xml
deleted file mode 100644
index 8322d25..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/SourceDocumentInformation.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-   
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-	<name>org.apache.uima.examples.SourceDocumentInformation</name>
-	<description>Defines a type for storing information about the original source document from which the current CAS was initialized</description>
-	<version>1.0</version>
-	<vendor>The Apache Software Foundation</vendor>
-	<types>
-		<typeDescription>
-			<name>org.apache.uima.examples.SourceDocumentInformation</name>
-			<description>Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.</description>
-			<supertypeName>uima.tcas.Annotation</supertypeName>
-			<features>
-				<featureDescription>
-					<name>uri</name>
-					<description>URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)</description>
-					<rangeTypeName>uima.cas.String</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>offsetInSource</name>
-					<description>Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>documentSize</name>
-					<description>Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-				  <name>lastSegment</name>
-				  <description>For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. </description>
-			      <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-			    </featureDescription>				
-			</features>
-		</typeDescription>
-	</types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/StyleMapCreator.xml b/trunk/example-projects/ExampleProject/descriptor/utils/StyleMapCreator.xml
deleted file mode 100644
index 8e150de..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/StyleMapCreator.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.StyleMapCreator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/ViewWriter.xml b/trunk/example-projects/ExampleProject/descriptor/utils/ViewWriter.xml
deleted file mode 100644
index 89b5bf4..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/ViewWriter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>output</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/descriptor/utils/XMIWriter.xml b/trunk/example-projects/ExampleProject/descriptor/utils/XMIWriter.xml
deleted file mode 100644
index 3a935cf..0000000
--- a/trunk/example-projects/ExampleProject/descriptor/utils/XMIWriter.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.XMIWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the xmi is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExampleProject/input/Example1.txt b/trunk/example-projects/ExampleProject/input/Example1.txt
deleted file mode 100644
index 07d1423..0000000
--- a/trunk/example-projects/ExampleProject/input/Example1.txt
+++ /dev/null
@@ -1 +0,0 @@
-Ogren, P.V., Wetzler, P.G., Bethard, S.: ClearTK: A UIMA Toolkit for Statistical Natural Language Processing. In: UIMA for NLP workshop at LREC 08. (2008)

diff --git a/trunk/example-projects/ExampleProject/input/Example2.txt b/trunk/example-projects/ExampleProject/input/Example2.txt
deleted file mode 100644
index 2cecd8b..0000000
--- a/trunk/example-projects/ExampleProject/input/Example2.txt
+++ /dev/null
@@ -1 +0,0 @@
-Stephen Soderland, Claire Cardie, and Raymond Mooney. Learning Information Extraction Rules for Semi-Structured and Free Text. In Machine Learning, volume 34, pages 233–272, 1999.
\ No newline at end of file
diff --git a/trunk/example-projects/ExampleProject/output/Example1.txt.xmi b/trunk/example-projects/ExampleProject/output/Example1.txt.xmi
deleted file mode 100644
index 3783042..0000000
--- a/trunk/example-projects/ExampleProject/output/Example1.txt.xmi
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<xmi:XMI xmlns:Title="http:///uima/ruta/example/Title.ecore" xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:Author="http:///uima/ruta/example/Author.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0">

-    <cas:NULL xmi:id="0"/>

-    <cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="Ogren, P.V., Wetzler, P.G., Bethard, S.: ClearTK: A UIMA Toolkit for Statistical Natural Language Processing. In: UIMA for NLP workshop at LREC 08. (2008)&#13;&#10;"/>

-    <example:Year xmi:id="634" sofa="1" begin="148" end="154"/>

-    <example:Author xmi:id="698" sofa="1" begin="0" end="40"/>

-    <example:Title xmi:id="706" sofa="1" begin="41" end="109"/>

-    <example:Bibtex xmi:id="710" sofa="1" begin="0" end="156" author="698" title="706" year="634"/>

-    <cas:View sofa="1" members="634 698 706 710"/>

-</xmi:XMI>

diff --git a/trunk/example-projects/ExampleProject/output/Example2.txt.xmi b/trunk/example-projects/ExampleProject/output/Example2.txt.xmi
deleted file mode 100644
index a17b137..0000000
--- a/trunk/example-projects/ExampleProject/output/Example2.txt.xmi
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<xmi:XMI xmlns:Title="http:///uima/ruta/example/Title.ecore" xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:Author="http:///uima/ruta/example/Author.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0">

-    <cas:NULL xmi:id="0"/>

-    <cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="Stephen Soderland, Claire Cardie, and Raymond Mooney. Learning Information Extraction Rules for Semi-Structured and Free Text. In Machine Learning, volume 34, pages 233–272, 1999."/>

-    <example:Year xmi:id="544" sofa="1" begin="174" end="179"/>

-    <example:Author xmi:id="608" sofa="1" begin="0" end="53"/>

-    <example:Title xmi:id="616" sofa="1" begin="54" end="126"/>

-    <example:Bibtex xmi:id="620" sofa="1" begin="0" end="179" author="608" title="616" year="544"/>

-    <cas:View sofa="1" members="544 608 616 620"/>

-</xmi:XMI>

diff --git a/trunk/example-projects/ExampleProject/resources/FirstNames.txt b/trunk/example-projects/ExampleProject/resources/FirstNames.txt
deleted file mode 100644
index 31b253d..0000000
--- a/trunk/example-projects/ExampleProject/resources/FirstNames.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Stephen

-Claire

-Raymond
\ No newline at end of file
diff --git a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Author.ruta b/trunk/example-projects/ExampleProject/script/uima/ruta/example/Author.ruta
deleted file mode 100644
index 3c9d7f5..0000000
--- a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Author.ruta
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system:
-TYPESYSTEM types.BibtexTypeSystem;
-
-// define and import an external dictionary containing first names
-WORDLIST FirstNameList = 'FirstNames.txt';
-
-// define some useful annotations
-DECLARE FirstName, FirstNameInitial, Name, NameListPart;
-
-//find the first names
-Document{-> MARKFAST(FirstName, FirstNameList)};
-
-// something that may links names
-DECLARE NameLinker;
-W{REGEXP("and", false) -> MARK(NameLinker)};
-COMMA{ -> MARK(NameLinker)};
-SPECIAL{REGEXP("&") -> MARK(NameLinker)};
-
-// first name initials
-CW{REGEXP(".") -> MARK(FirstNameInitial,1,2)} PERIOD;
-
-// maybe a name
-FirstName+ FirstNameInitial* CW{-> MARK(Name, 1, 2, 3)};
-FirstNameInitial+{-PARTOF(Name)} CW{-> MARK(Name, 1, 2, 3)};
-CW{-PARTOF(Name), -REGEXP(".")} COMMA? FirstNameInitial+{-> MARK(Name, 1, 2, 3)};
-
-// list of names
-Name{-PARTOF(NameListPart)} NameLinker[1,2]{-> MARK(NameListPart,1,2)};
-NameListPart+ Name{-PARTOF(Author),-PARTOF(NameListPart) -> MARK(Author,1,2,3)} ;
-NameListPart+{-PARTOF(Author) -> MARK(Author)};
-
-// expand the author to the following punctation mark
-Author{-> SHIFT(Author,1,2)} PM;
diff --git a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Main.ruta b/trunk/example-projects/ExampleProject/script/uima/ruta/example/Main.ruta
deleted file mode 100644
index 8209d0c..0000000
--- a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Main.ruta
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system 
-// (located in the descriptor folder -> uima.textmarker.example folder)
-TYPESYSTEM types.BibtexTypeSystem;
-
-SCRIPT uima.ruta.example.Author;
-SCRIPT uima.ruta.example.Title;
-SCRIPT uima.ruta.example.Year;
-
-// execute the Year script on the complete input document. 
-// (Try the the go into: ctrl left mouse button on "Year" in the action)
-Document{-> CALL(Year)};
-// execute the Author script on the complete input document
-Document{-> CALL(Author)};
-// execute the Title script on the complete input document
-Document{-> CALL(Title)};
-
-// create bibtex annotation
-Document{-> CREATE(Bibtex, "author" = Author, "title" = Title, "year" = Year)};
-
diff --git a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Title.ruta b/trunk/example-projects/ExampleProject/script/uima/ruta/example/Title.ruta
deleted file mode 100644
index e2d59b5..0000000
--- a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Title.ruta
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system:
-TYPESYSTEM types.BibtexTypeSystem;
-
-// simpified rules for extracting the title
-DECLARE TitleStopper;
-PM W{REGEXP("in", true) -> MARK(TitleStopper)};
-
-// annotate everything between the Author (and an optional a punctation mark) and
-Author PM? ANY+?{-> MARK(Title)} TitleStopper;
diff --git a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Year.ruta b/trunk/example-projects/ExampleProject/script/uima/ruta/example/Year.ruta
deleted file mode 100644
index 2fa94f1..0000000
--- a/trunk/example-projects/ExampleProject/script/uima/ruta/example/Year.ruta
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system:
-TYPESYSTEM types.BibtexTypeSystem;
-
-// find something that maybe indicates the year: a number with four digits starting with 19 or 20
-NUM{REGEXP("19..|20..") -> MARK(Year,1,2)} PM?;
-
-// add parentheses if there are some (by removing the old Year annotation and creating a new one)
-SPECIAL{REGEXP("[(]")} Year{ -> SHIFT(Year,1,2,3,4)} SPECIAL{REGEXP("[)]")} PM?;
-
-
diff --git a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/Example1.txt.xmi b/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/Example1.txt.xmi
deleted file mode 100644
index 3783042..0000000
--- a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/Example1.txt.xmi
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<xmi:XMI xmlns:Title="http:///uima/ruta/example/Title.ecore" xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:Author="http:///uima/ruta/example/Author.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0">

-    <cas:NULL xmi:id="0"/>

-    <cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="Ogren, P.V., Wetzler, P.G., Bethard, S.: ClearTK: A UIMA Toolkit for Statistical Natural Language Processing. In: UIMA for NLP workshop at LREC 08. (2008)&#13;&#10;"/>

-    <example:Year xmi:id="634" sofa="1" begin="148" end="154"/>

-    <example:Author xmi:id="698" sofa="1" begin="0" end="40"/>

-    <example:Title xmi:id="706" sofa="1" begin="41" end="109"/>

-    <example:Bibtex xmi:id="710" sofa="1" begin="0" end="156" author="698" title="706" year="634"/>

-    <cas:View sofa="1" members="634 698 706 710"/>

-</xmi:XMI>

diff --git a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/Example2.txt.xmi b/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/Example2.txt.xmi
deleted file mode 100644
index a17b137..0000000
--- a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/Example2.txt.xmi
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<xmi:XMI xmlns:Title="http:///uima/ruta/example/Title.ecore" xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:Author="http:///uima/ruta/example/Author.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0">

-    <cas:NULL xmi:id="0"/>

-    <cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="Stephen Soderland, Claire Cardie, and Raymond Mooney. Learning Information Extraction Rules for Semi-Structured and Free Text. In Machine Learning, volume 34, pages 233–272, 1999."/>

-    <example:Year xmi:id="544" sofa="1" begin="174" end="179"/>

-    <example:Author xmi:id="608" sofa="1" begin="0" end="53"/>

-    <example:Title xmi:id="616" sofa="1" begin="54" end="126"/>

-    <example:Bibtex xmi:id="620" sofa="1" begin="0" end="179" author="608" title="616" year="544"/>

-    <cas:View sofa="1" members="544 608 616 620"/>

-</xmi:XMI>

diff --git a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/results/Example1.txt.result.xmi b/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/results/Example1.txt.result.xmi
deleted file mode 100644
index 3c5c91e..0000000
--- a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/results/Example1.txt.result.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:Title="http:///uima/ruta/example/Title.ecore" xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:Author="http:///uima/ruta/example/Author.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="Ogren, P.V., Wetzler, P.G., Bethard, S.: ClearTK: A UIMA Toolkit for Statistical Natural Language Processing. In: UIMA for NLP workshop at LREC 08. (2008)&#13;&#10;"/><example:Year xmi:id="669" sofa="1" begin="148" end="154"/><example:Author xmi:id="1089" sofa="1" begin="0" end="40"/><example:Title xmi:id="1145" sofa="1" begin="41" end="109"/><example:Bibtex xmi:id="1153" sofa="1" begin="0" end="156" author="1089" title="1145" year="669"/><tcas:DocumentAnnotation xmi:id="27" sofa="1" begin="0" end="156" language="x-unspecified"/><type:CW xmi:id="32" sofa="1" begin="0" end="5"/><type:CW xmi:id="44" sofa="1" begin="7" end="8"/><type:CW xmi:id="52" sofa="1" begin="9" end="10"/><type:CW xmi:id="68" sofa="1" begin="13" end="20"/><type:CW xmi:id="80" sofa="1" begin="22" end="23"/><type:CW xmi:id="88" sofa="1" begin="24" end="25"/><type:CW xmi:id="104" sofa="1" begin="28" end="35"/><type:CW xmi:id="116" sofa="1" begin="37" end="38"/><type:CW xmi:id="132" sofa="1" begin="41" end="46"/><type:CW xmi:id="148" sofa="1" begin="50" end="51"/><type:CW xmi:id="164" sofa="1" begin="57" end="64"/><type:CW xmi:id="180" sofa="1" begin="69" end="80"/><type:CW xmi:id="188" sofa="1" begin="81" end="88"/><type:CW xmi:id="196" sofa="1" begin="89" end="97"/><type:CW xmi:id="204" sofa="1" begin="98" end="108"/><type:CW xmi:id="216" sofa="1" begin="110" end="112"/><type:COMMA xmi:id="36" sofa="1" begin="5" end="6"/><type:COMMA xmi:id="60" sofa="1" begin="11" end="12"/><type:COMMA xmi:id="72" sofa="1" begin="20" end="21"/><type:COMMA xmi:id="96" sofa="1" begin="26" end="27"/><type:COMMA xmi:id="108" sofa="1" begin="35" end="36"/><type:SPACE xmi:id="40" sofa="1" begin="6" end="7"/><type:SPACE xmi:id="64" sofa="1" begin="12" end="13"/><type:SPACE xmi:id="76" sofa="1" begin="21" end="22"/><type:SPACE xmi:id="100" sofa="1" begin="27" end="28"/><type:SPACE xmi:id="112" sofa="1" begin="36" end="37"/><type:SPACE xmi:id="128" sofa="1" begin="40" end="41"/><type:SPACE xmi:id="144" sofa="1" begin="49" end="50"/><type:SPACE xmi:id="152" sofa="1" begin="51" end="52"/><type:SPACE xmi:id="160" sofa="1" begin="56" end="57"/><type:SPACE xmi:id="168" sofa="1" begin="64" end="65"/><type:SPACE xmi:id="176" sofa="1" begin="68" end="69"/><type:SPACE xmi:id="184" sofa="1" begin="80" end="81"/><type:SPACE xmi:id="192" sofa="1" begin="88" end="89"/><type:SPACE xmi:id="200" sofa="1" begin="97" end="98"/><type:SPACE xmi:id="212" sofa="1" begin="109" end="110"/><type:SPACE xmi:id="224" sofa="1" begin="113" end="114"/><type:SPACE xmi:id="232" sofa="1" begin="118" end="119"/><type:SPACE xmi:id="240" sofa="1" begin="122" end="123"/><type:SPACE xmi:id="248" sofa="1" begin="126" end="127"/><type:SPACE xmi:id="256" sofa="1" begin="135" end="136"/><type:SPACE xmi:id="264" sofa="1" begin="138" end="139"/><type:SPACE xmi:id="272" sofa="1" begin="143" end="144"/><type:SPACE xmi:id="284" sofa="1" begin="147" end="148"/><type:PERIOD xmi:id="48" sofa="1" begin="8" end="9"/><type:PERIOD xmi:id="56" sofa="1" begin="10" end="11"/><type:PERIOD xmi:id="84" sofa="1" begin="23" end="24"/><type:PERIOD xmi:id="92" sofa="1" begin="25" end="26"/><type:PERIOD xmi:id="120" sofa="1" begin="38" end="39"/><type:PERIOD xmi:id="208" sofa="1" begin="108" end="109"/><type:PERIOD xmi:id="280" sofa="1" begin="146" end="147"/><type:COLON xmi:id="124" sofa="1" begin="39" end="40"/><type:COLON xmi:id="140" sofa="1" begin="48" end="49"/><type:COLON xmi:id="220" sofa="1" begin="112" end="113"/><type:CAP xmi:id="136" sofa="1" begin="46" end="48"/><type:CAP xmi:id="156" sofa="1" begin="52" end="56"/><type:CAP xmi:id="228" sofa="1" begin="114" end="118"/><type:CAP xmi:id="244" sofa="1" begin="123" end="126"/><type:CAP xmi:id="268" sofa="1" begin="139" end="143"/><type:SW xmi:id="172" sofa="1" begin="65" end="68"/><type:SW xmi:id="236" sofa="1" begin="119" end="122"/><type:SW xmi:id="252" sofa="1" begin="127" end="135"/><type:SW xmi:id="260" sofa="1" begin="136" end="138"/><type:NUM xmi:id="276" sofa="1" begin="144" end="146"/><type:NUM xmi:id="292" sofa="1" begin="149" end="153"/><type:SPECIAL xmi:id="288" sofa="1" begin="148" end="149"/><type:SPECIAL xmi:id="296" sofa="1" begin="153" end="154"/><type:BREAK xmi:id="300" sofa="1" begin="154" end="155"/><type:BREAK xmi:id="304" sofa="1" begin="155" end="156"/><type:RutaBasic xmi:id="308" sofa="1" begin="0" end="5"/><type:RutaBasic xmi:id="313" sofa="1" begin="5" end="6"/><type:RutaBasic xmi:id="318" sofa="1" begin="6" end="7"/><type:RutaBasic xmi:id="323" sofa="1" begin="7" end="8"/><type:RutaBasic xmi:id="328" sofa="1" begin="8" end="9"/><type:RutaBasic xmi:id="333" sofa="1" begin="9" end="10"/><type:RutaBasic xmi:id="338" sofa="1" begin="10" end="11"/><type:RutaBasic xmi:id="343" sofa="1" begin="11" end="12"/><type:RutaBasic xmi:id="348" sofa="1" begin="12" end="13"/><type:RutaBasic xmi:id="353" sofa="1" begin="13" end="20"/><type:RutaBasic xmi:id="358" sofa="1" begin="20" end="21"/><type:RutaBasic xmi:id="363" sofa="1" begin="21" end="22"/><type:RutaBasic xmi:id="368" sofa="1" begin="22" end="23"/><type:RutaBasic xmi:id="373" sofa="1" begin="23" end="24"/><type:RutaBasic xmi:id="378" sofa="1" begin="24" end="25"/><type:RutaBasic xmi:id="383" sofa="1" begin="25" end="26"/><type:RutaBasic xmi:id="388" sofa="1" begin="26" end="27"/><type:RutaBasic xmi:id="393" sofa="1" begin="27" end="28"/><type:RutaBasic xmi:id="398" sofa="1" begin="28" end="35"/><type:RutaBasic xmi:id="403" sofa="1" begin="35" end="36"/><type:RutaBasic xmi:id="408" sofa="1" begin="36" end="37"/><type:RutaBasic xmi:id="413" sofa="1" begin="37" end="38"/><type:RutaBasic xmi:id="418" sofa="1" begin="38" end="39"/><type:RutaBasic xmi:id="423" sofa="1" begin="39" end="40"/><type:RutaBasic xmi:id="428" sofa="1" begin="40" end="41"/><type:RutaBasic xmi:id="433" sofa="1" begin="41" end="46"/><type:RutaBasic xmi:id="438" sofa="1" begin="46" end="48"/><type:RutaBasic xmi:id="443" sofa="1" begin="48" end="49"/><type:RutaBasic xmi:id="448" sofa="1" begin="49" end="50"/><type:RutaBasic xmi:id="453" sofa="1" begin="50" end="51"/><type:RutaBasic xmi:id="458" sofa="1" begin="51" end="52"/><type:RutaBasic xmi:id="463" sofa="1" begin="52" end="56"/><type:RutaBasic xmi:id="468" sofa="1" begin="56" end="57"/><type:RutaBasic xmi:id="473" sofa="1" begin="57" end="64"/><type:RutaBasic xmi:id="478" sofa="1" begin="64" end="65"/><type:RutaBasic xmi:id="483" sofa="1" begin="65" end="68"/><type:RutaBasic xmi:id="488" sofa="1" begin="68" end="69"/><type:RutaBasic xmi:id="493" sofa="1" begin="69" end="80"/><type:RutaBasic xmi:id="498" sofa="1" begin="80" end="81"/><type:RutaBasic xmi:id="503" sofa="1" begin="81" end="88"/><type:RutaBasic xmi:id="508" sofa="1" begin="88" end="89"/><type:RutaBasic xmi:id="513" sofa="1" begin="89" end="97"/><type:RutaBasic xmi:id="518" sofa="1" begin="97" end="98"/><type:RutaBasic xmi:id="523" sofa="1" begin="98" end="108"/><type:RutaBasic xmi:id="528" sofa="1" begin="108" end="109"/><type:RutaBasic xmi:id="533" sofa="1" begin="109" end="110"/><type:RutaBasic xmi:id="538" sofa="1" begin="110" end="112"/><type:RutaBasic xmi:id="543" sofa="1" begin="112" end="113"/><type:RutaBasic xmi:id="548" sofa="1" begin="113" end="114"/><type:RutaBasic xmi:id="553" sofa="1" begin="114" end="118"/><type:RutaBasic xmi:id="558" sofa="1" begin="118" end="119"/><type:RutaBasic xmi:id="563" sofa="1" begin="119" end="122"/><type:RutaBasic xmi:id="568" sofa="1" begin="122" end="123"/><type:RutaBasic xmi:id="573" sofa="1" begin="123" end="126"/><type:RutaBasic xmi:id="578" sofa="1" begin="126" end="127"/><type:RutaBasic xmi:id="583" sofa="1" begin="127" end="135"/><type:RutaBasic xmi:id="588" sofa="1" begin="135" end="136"/><type:RutaBasic xmi:id="593" sofa="1" begin="136" end="138"/><type:RutaBasic xmi:id="598" sofa="1" begin="138" end="139"/><type:RutaBasic xmi:id="603" sofa="1" begin="139" end="143"/><type:RutaBasic xmi:id="608" sofa="1" begin="143" end="144"/><type:RutaBasic xmi:id="613" sofa="1" begin="144" end="146"/><type:RutaBasic xmi:id="618" sofa="1" begin="146" end="147"/><type:RutaBasic xmi:id="623" sofa="1" begin="147" end="148"/><type:RutaBasic xmi:id="628" sofa="1" begin="148" end="149"/><type:RutaBasic xmi:id="633" sofa="1" begin="149" end="153"/><type:RutaBasic xmi:id="638" sofa="1" begin="153" end="154"/><type:RutaBasic xmi:id="643" sofa="1" begin="154" end="155"/><type:RutaBasic xmi:id="648" sofa="1" begin="155" end="156"/><Author:NameLinker xmi:id="797" sofa="1" begin="5" end="6"/><Author:NameLinker xmi:id="805" sofa="1" begin="11" end="12"/><Author:NameLinker xmi:id="813" sofa="1" begin="20" end="21"/><Author:NameLinker xmi:id="821" sofa="1" begin="26" end="27"/><Author:NameLinker xmi:id="829" sofa="1" begin="35" end="36"/><Author:FirstNameInitial xmi:id="853" sofa="1" begin="7" end="9"/><Author:FirstNameInitial xmi:id="865" sofa="1" begin="9" end="11"/><Author:FirstNameInitial xmi:id="881" sofa="1" begin="22" end="24"/><Author:FirstNameInitial xmi:id="893" sofa="1" begin="24" end="26"/><Author:FirstNameInitial xmi:id="909" sofa="1" begin="37" end="39"/><Author:Name xmi:id="973" sofa="1" begin="0" end="11"/><Author:Name xmi:id="993" sofa="1" begin="13" end="26"/><Author:Name xmi:id="1013" sofa="1" begin="28" end="39"/><Author:NameListPart xmi:id="1061" sofa="1" begin="0" end="12"/><Author:NameListPart xmi:id="1073" sofa="1" begin="13" end="27"/><Title:TitleStopper xmi:id="1129" sofa="1" begin="110" end="112"/><type:TruePositive xmi:id="1172" sofa="1" begin="0" end="156" original="1177"/><type:TruePositive xmi:id="1184" sofa="1" begin="0" end="40" original="1189"/><type:TruePositive xmi:id="1193" sofa="1" begin="41" end="109" original="1198"/><type:TruePositive xmi:id="1202" sofa="1" begin="148" end="154" original="1207"/><example:Year xmi:id="1207" sofa="1" begin="148" end="154"/><example:Title xmi:id="1198" sofa="1" begin="41" end="109"/><example:Author xmi:id="1189" sofa="1" begin="0" end="40"/><example:Bibtex xmi:id="1177" sofa="1" begin="0" end="156"/><cas:View sofa="1" members="669 1089 1145 1153 27 32 44 52 68 80 88 104 116 132 148 164 180 188 196 204 216 36 60 72 96 108 40 64 76 100 112 128 144 152 160 168 176 184 192 200 212 224 232 240 248 256 264 272 284 48 56 84 92 120 208 280 124 140 220 136 156 228 244 268 172 236 252 260 276 292 288 296 300 304 308 313 318 323 328 333 338 343 348 353 358 363 368 373 378 383 388 393 398 403 408 413 418 423 428 433 438 443 448 453 458 463 468 473 478 483 488 493 498 503 508 513 518 523 528 533 538 543 548 553 558 563 568 573 578 583 588 593 598 603 608 613 618 623 628 633 638 643 648 797 805 813 821 829 853 865 881 893 909 973 993 1013 1061 1073 1129 1172 1184 1193 1202"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/results/Example2.txt.result.xmi b/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/results/Example2.txt.result.xmi
deleted file mode 100644
index a0dc908..0000000
--- a/trunk/example-projects/ExampleProject/test/uima/ruta/example/Main/results/Example2.txt.result.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:Title="http:///uima/ruta/example/Title.ecore" xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:Author="http:///uima/ruta/example/Author.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="Stephen Soderland, Claire Cardie, and Raymond Mooney. Learning Information Extraction Rules for Semi-Structured and Free Text. In Machine Learning, volume 34, pages 233–272, 1999."/><example:Year xmi:id="587" sofa="1" begin="174" end="179"/><example:Author xmi:id="983" sofa="1" begin="0" end="53"/><example:Title xmi:id="1031" sofa="1" begin="54" end="126"/><example:Bibtex xmi:id="1039" sofa="1" begin="0" end="179" author="983" title="1031" year="587"/><tcas:DocumentAnnotation xmi:id="27" sofa="1" begin="0" end="179" language="x-unspecified"/><type:CW xmi:id="32" sofa="1" begin="0" end="7"/><type:CW xmi:id="40" sofa="1" begin="8" end="17"/><type:CW xmi:id="52" sofa="1" begin="19" end="25"/><type:CW xmi:id="60" sofa="1" begin="26" end="32"/><type:CW xmi:id="80" sofa="1" begin="38" end="45"/><type:CW xmi:id="88" sofa="1" begin="46" end="52"/><type:CW xmi:id="100" sofa="1" begin="54" end="62"/><type:CW xmi:id="108" sofa="1" begin="63" end="74"/><type:CW xmi:id="116" sofa="1" begin="75" end="85"/><type:CW xmi:id="124" sofa="1" begin="86" end="91"/><type:CW xmi:id="140" sofa="1" begin="96" end="100"/><type:CW xmi:id="148" sofa="1" begin="101" end="111"/><type:CW xmi:id="164" sofa="1" begin="116" end="120"/><type:CW xmi:id="172" sofa="1" begin="121" end="125"/><type:CW xmi:id="184" sofa="1" begin="127" end="129"/><type:CW xmi:id="192" sofa="1" begin="130" end="137"/><type:CW xmi:id="200" sofa="1" begin="138" end="146"/><type:SPACE xmi:id="36" sofa="1" begin="7" end="8"/><type:SPACE xmi:id="48" sofa="1" begin="18" end="19"/><type:SPACE xmi:id="56" sofa="1" begin="25" end="26"/><type:SPACE xmi:id="68" sofa="1" begin="33" end="34"/><type:SPACE xmi:id="76" sofa="1" begin="37" end="38"/><type:SPACE xmi:id="84" sofa="1" begin="45" end="46"/><type:SPACE xmi:id="96" sofa="1" begin="53" end="54"/><type:SPACE xmi:id="104" sofa="1" begin="62" end="63"/><type:SPACE xmi:id="112" sofa="1" begin="74" end="75"/><type:SPACE xmi:id="120" sofa="1" begin="85" end="86"/><type:SPACE xmi:id="128" sofa="1" begin="91" end="92"/><type:SPACE xmi:id="136" sofa="1" begin="95" end="96"/><type:SPACE xmi:id="152" sofa="1" begin="111" end="112"/><type:SPACE xmi:id="160" sofa="1" begin="115" end="116"/><type:SPACE xmi:id="168" sofa="1" begin="120" end="121"/><type:SPACE xmi:id="180" sofa="1" begin="126" end="127"/><type:SPACE xmi:id="188" sofa="1" begin="129" end="130"/><type:SPACE xmi:id="196" sofa="1" begin="137" end="138"/><type:SPACE xmi:id="208" sofa="1" begin="147" end="148"/><type:SPACE xmi:id="216" sofa="1" begin="154" end="155"/><type:SPACE xmi:id="228" sofa="1" begin="158" end="159"/><type:SPACE xmi:id="236" sofa="1" begin="164" end="165"/><type:SPACE xmi:id="256" sofa="1" begin="173" end="174"/><type:COMMA xmi:id="44" sofa="1" begin="17" end="18"/><type:COMMA xmi:id="64" sofa="1" begin="32" end="33"/><type:COMMA xmi:id="204" sofa="1" begin="146" end="147"/><type:COMMA xmi:id="224" sofa="1" begin="157" end="158"/><type:COMMA xmi:id="252" sofa="1" begin="172" end="173"/><type:SW xmi:id="72" sofa="1" begin="34" end="37"/><type:SW xmi:id="132" sofa="1" begin="92" end="95"/><type:SW xmi:id="156" sofa="1" begin="112" end="115"/><type:SW xmi:id="212" sofa="1" begin="148" end="154"/><type:SW xmi:id="232" sofa="1" begin="159" end="164"/><type:PERIOD xmi:id="92" sofa="1" begin="52" end="53"/><type:PERIOD xmi:id="176" sofa="1" begin="125" end="126"/><type:PERIOD xmi:id="264" sofa="1" begin="178" end="179"/><type:SPECIAL xmi:id="144" sofa="1" begin="100" end="101"/><type:SPECIAL xmi:id="244" sofa="1" begin="168" end="169"/><type:NUM xmi:id="220" sofa="1" begin="155" end="157"/><type:NUM xmi:id="240" sofa="1" begin="165" end="168"/><type:NUM xmi:id="248" sofa="1" begin="169" end="172"/><type:NUM xmi:id="260" sofa="1" begin="174" end="178"/><type:RutaBasic xmi:id="268" sofa="1" begin="0" end="7"/><type:RutaBasic xmi:id="273" sofa="1" begin="7" end="8"/><type:RutaBasic xmi:id="278" sofa="1" begin="8" end="17"/><type:RutaBasic xmi:id="283" sofa="1" begin="17" end="18"/><type:RutaBasic xmi:id="288" sofa="1" begin="18" end="19"/><type:RutaBasic xmi:id="293" sofa="1" begin="19" end="25"/><type:RutaBasic xmi:id="298" sofa="1" begin="25" end="26"/><type:RutaBasic xmi:id="303" sofa="1" begin="26" end="32"/><type:RutaBasic xmi:id="308" sofa="1" begin="32" end="33"/><type:RutaBasic xmi:id="313" sofa="1" begin="33" end="34"/><type:RutaBasic xmi:id="318" sofa="1" begin="34" end="37"/><type:RutaBasic xmi:id="323" sofa="1" begin="37" end="38"/><type:RutaBasic xmi:id="328" sofa="1" begin="38" end="45"/><type:RutaBasic xmi:id="333" sofa="1" begin="45" end="46"/><type:RutaBasic xmi:id="338" sofa="1" begin="46" end="52"/><type:RutaBasic xmi:id="343" sofa="1" begin="52" end="53"/><type:RutaBasic xmi:id="348" sofa="1" begin="53" end="54"/><type:RutaBasic xmi:id="353" sofa="1" begin="54" end="62"/><type:RutaBasic xmi:id="358" sofa="1" begin="62" end="63"/><type:RutaBasic xmi:id="363" sofa="1" begin="63" end="74"/><type:RutaBasic xmi:id="368" sofa="1" begin="74" end="75"/><type:RutaBasic xmi:id="373" sofa="1" begin="75" end="85"/><type:RutaBasic xmi:id="378" sofa="1" begin="85" end="86"/><type:RutaBasic xmi:id="383" sofa="1" begin="86" end="91"/><type:RutaBasic xmi:id="388" sofa="1" begin="91" end="92"/><type:RutaBasic xmi:id="393" sofa="1" begin="92" end="95"/><type:RutaBasic xmi:id="398" sofa="1" begin="95" end="96"/><type:RutaBasic xmi:id="403" sofa="1" begin="96" end="100"/><type:RutaBasic xmi:id="408" sofa="1" begin="100" end="101"/><type:RutaBasic xmi:id="413" sofa="1" begin="101" end="111"/><type:RutaBasic xmi:id="418" sofa="1" begin="111" end="112"/><type:RutaBasic xmi:id="423" sofa="1" begin="112" end="115"/><type:RutaBasic xmi:id="428" sofa="1" begin="115" end="116"/><type:RutaBasic xmi:id="433" sofa="1" begin="116" end="120"/><type:RutaBasic xmi:id="438" sofa="1" begin="120" end="121"/><type:RutaBasic xmi:id="443" sofa="1" begin="121" end="125"/><type:RutaBasic xmi:id="448" sofa="1" begin="125" end="126"/><type:RutaBasic xmi:id="453" sofa="1" begin="126" end="127"/><type:RutaBasic xmi:id="458" sofa="1" begin="127" end="129"/><type:RutaBasic xmi:id="463" sofa="1" begin="129" end="130"/><type:RutaBasic xmi:id="468" sofa="1" begin="130" end="137"/><type:RutaBasic xmi:id="473" sofa="1" begin="137" end="138"/><type:RutaBasic xmi:id="478" sofa="1" begin="138" end="146"/><type:RutaBasic xmi:id="483" sofa="1" begin="146" end="147"/><type:RutaBasic xmi:id="488" sofa="1" begin="147" end="148"/><type:RutaBasic xmi:id="493" sofa="1" begin="148" end="154"/><type:RutaBasic xmi:id="498" sofa="1" begin="154" end="155"/><type:RutaBasic xmi:id="503" sofa="1" begin="155" end="157"/><type:RutaBasic xmi:id="508" sofa="1" begin="157" end="158"/><type:RutaBasic xmi:id="513" sofa="1" begin="158" end="159"/><type:RutaBasic xmi:id="518" sofa="1" begin="159" end="164"/><type:RutaBasic xmi:id="523" sofa="1" begin="164" end="165"/><type:RutaBasic xmi:id="528" sofa="1" begin="165" end="168"/><type:RutaBasic xmi:id="533" sofa="1" begin="168" end="169"/><type:RutaBasic xmi:id="538" sofa="1" begin="169" end="172"/><type:RutaBasic xmi:id="543" sofa="1" begin="172" end="173"/><type:RutaBasic xmi:id="548" sofa="1" begin="173" end="174"/><type:RutaBasic xmi:id="553" sofa="1" begin="174" end="178"/><type:RutaBasic xmi:id="558" sofa="1" begin="178" end="179"/><Author:FirstName xmi:id="619" sofa="1" begin="0" end="7"/><Author:FirstName xmi:id="623" sofa="1" begin="19" end="25"/><Author:FirstName xmi:id="627" sofa="1" begin="38" end="45"/><Author:NameLinker xmi:id="651" sofa="1" begin="34" end="37"/><Author:NameLinker xmi:id="695" sofa="1" begin="112" end="115"/><Author:NameLinker xmi:id="731" sofa="1" begin="17" end="18"/><Author:NameLinker xmi:id="739" sofa="1" begin="32" end="33"/><Author:NameLinker xmi:id="747" sofa="1" begin="146" end="147"/><Author:NameLinker xmi:id="755" sofa="1" begin="157" end="158"/><Author:NameLinker xmi:id="763" sofa="1" begin="172" end="173"/><Author:Name xmi:id="851" sofa="1" begin="0" end="17"/><Author:Name xmi:id="863" sofa="1" begin="19" end="32"/><Author:Name xmi:id="875" sofa="1" begin="38" end="52"/><Author:NameListPart xmi:id="955" sofa="1" begin="0" end="18"/><Author:NameListPart xmi:id="967" sofa="1" begin="19" end="37"/><Title:TitleStopper xmi:id="1011" sofa="1" begin="127" end="129"/><type:TruePositive xmi:id="1058" sofa="1" begin="0" end="179" original="1063"/><type:TruePositive xmi:id="1070" sofa="1" begin="0" end="53" original="1075"/><type:TruePositive xmi:id="1079" sofa="1" begin="54" end="126" original="1084"/><type:TruePositive xmi:id="1088" sofa="1" begin="174" end="179" original="1093"/><example:Year xmi:id="1093" sofa="1" begin="174" end="179"/><example:Title xmi:id="1084" sofa="1" begin="54" end="126"/><example:Author xmi:id="1075" sofa="1" begin="0" end="53"/><example:Bibtex xmi:id="1063" sofa="1" begin="0" end="179"/><cas:View sofa="1" members="587 983 1031 1039 27 32 40 52 60 80 88 100 108 116 124 140 148 164 172 184 192 200 36 48 56 68 76 84 96 104 112 120 128 136 152 160 168 180 188 196 208 216 228 236 256 44 64 204 224 252 72 132 156 212 232 92 176 264 144 244 220 240 248 260 268 273 278 283 288 293 298 303 308 313 318 323 328 333 338 343 348 353 358 363 368 373 378 383 388 393 398 403 408 413 418 423 428 433 438 443 448 453 458 463 468 473 478 483 488 493 498 503 508 513 518 523 528 533 538 543 548 553 558 619 623 627 651 695 731 739 747 755 763 851 863 875 955 967 1011 1058 1070 1079 1088"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/ExtensionsExample/.buildpath b/trunk/example-projects/ExtensionsExample/.buildpath
deleted file mode 100644
index a4d0028..0000000
--- a/trunk/example-projects/ExtensionsExample/.buildpath
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<buildpath>

-	<buildpathentry kind="src" path="script">

-		<attributes>

-			<attribute name="ruta" value="script"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="descriptor">

-		<attributes>

-			<attribute name="ruta" value="descriptor"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="resources">

-		<attributes>

-			<attribute name="ruta" value="resources"/>

-		</attributes>

-	</buildpathentry>

-</buildpath>

diff --git a/trunk/example-projects/ExtensionsExample/.project b/trunk/example-projects/ExtensionsExample/.project
deleted file mode 100644
index fe336aa..0000000
--- a/trunk/example-projects/ExtensionsExample/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<projectDescription>

-	<name>ExtensionsExample</name>

-	<comment></comment>

-	<projects>

-	</projects>

-	<buildSpec>

-		<buildCommand>

-			<name>org.eclipse.dltk.core.scriptbuilder</name>

-			<arguments>

-			</arguments>

-		</buildCommand>

-	</buildSpec>

-	<natures>

-		<nature>org.apache.uima.ruta.ide.nature</nature>

-	</natures>

-</projectDescription>

diff --git a/trunk/example-projects/ExtensionsExample/LICENSE b/trunk/example-projects/ExtensionsExample/LICENSE
deleted file mode 100644
index 75b5248..0000000
--- a/trunk/example-projects/ExtensionsExample/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

diff --git a/trunk/example-projects/ExtensionsExample/NOTICE b/trunk/example-projects/ExtensionsExample/NOTICE
deleted file mode 100644
index e8ee256..0000000
--- a/trunk/example-projects/ExtensionsExample/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache UIMA Ruta extensions example project

-Copyright 2006, 2014 The Apache Software Foundation

-

-This product includes content developed at

-The Apache Software Foundation (http://www.apache.org/).

-

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/BasicEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/BasicEngine.xml
deleted file mode 100644
index 30e8014..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/BasicEngine.xml
+++ /dev/null
@@ -1,279 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>BasicEngine</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters searchStrategy="language_fallback">

-      <configurationParameter>

-        <name>seeders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debug</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalScripts</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>profile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugWithMatches</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>statistics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalExtensions</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugOnlyFor</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptEncoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngineLoaders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>resourcePaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>defaultFilteredTypes</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>mainScript</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>removeBasics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>dynamicAnchoring</name>

-        <description>Activates dynamic anchoring (possible speed up).</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRuleElement</name>

-        <description>Activates greedy anchoring for rule elements.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRule</name>

-        <description>Activates greedy anchoring for complete rules.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>lowMemoryProfile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>createdBy</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>simpleGreedyForComposed</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalUimafitEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>strictImports</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varNames</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varValues</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>rules</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>debug</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>profile</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>debugWithMatches</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>defaultFilteredTypes</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.type.SPACE</string>

-            <string>org.apache.uima.ruta.type.BREAK</string>

-            <string>org.apache.uima.ruta.type.MARKUP</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>removeBasics</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>seeders</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>createdBy</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="BasicTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities>

-      <priorityList>

-        <type>org.apache.uima.ruta.type.RutaFrame</type>

-        <type>uima.tcas.Annotation</type>

-        <type>org.apache.uima.ruta.type.RutaBasic</type>

-      </priorityList>

-    </typePriorities>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/BasicTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/BasicTypeSystem.xml
deleted file mode 100644
index fea497f..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>BasicTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <imports>

-    <import location="InternalTypeSystem.xml"/>

-  </imports>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ALL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ANY</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.MARKUP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.W</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CAP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PERIOD</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.QUESTION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COMMA</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SEMICOLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WS</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NUM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPECIAL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NBSP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SPACE</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AMP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPACE</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.BREAK</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Document</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TokenSeed</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/InternalTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/InternalTypeSystem.xml
deleted file mode 100644
index e0e207c..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/InternalTypeSystem.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>InternalTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaBasic</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>replacement</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaOptional</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>score</name>

-          <description/>

-          <rangeTypeName>uima.cas.Double</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>applied</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>tried</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>rules</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>matched</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>delegates</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>innerApply</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>baseCondition</name>

-          <description/>

-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>matches</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>ruleAnchor</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaColoring</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>bgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>targetType</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>fgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>selected</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>value</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalsePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>original</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalseNegative</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>time</name>

-          <description/>

-          <rangeTypeName>uima.cas.Long</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaFrame</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Statistics</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>total</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>amount</name>

-          <description/>

-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>part</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TruePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>rule</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleActionEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleActionEngine.xml
deleted file mode 100644
index 6fd594e..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleActionEngine.xml
+++ /dev/null
@@ -1,335 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>ExampleAction</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExtensionsExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="ExampleActionTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleActionTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleActionTypeSystem.xml
deleted file mode 100644
index 9c06143..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleActionTypeSystem.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>ExampleActionTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-    </imports>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBlockEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBlockEngine.xml
deleted file mode 100644
index 9f71d25..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBlockEngine.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varNames</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varValues</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>rules</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>ExampleBlock</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/ExtensionsExample/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/ExtensionsExample/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>D:\work\ws-tutorial\ExtensionsExample\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <imports>
-                <import location="ExampleBlockTypeSystem.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-            <capability>
-                <inputs>
-                    <type>uima.ruta.example.ExampleBlock.T1</type>
-                    <type>uima.ruta.example.ExampleBlock.T2</type>
-                    <type>uima.ruta.example.ExampleBlock.T3</type>
-                    <type>uima.ruta.example.ExampleBlock.T4</type>
-                </inputs>
-                <outputs>
-                    <type>uima.ruta.example.ExampleBlock.T1</type>
-                    <type>uima.ruta.example.ExampleBlock.T2</type>
-                    <type>uima.ruta.example.ExampleBlock.T3</type>
-                    <type>uima.ruta.example.ExampleBlock.T4</type>
-                </outputs>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBlockTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBlockTypeSystem.xml
deleted file mode 100644
index 3cff4b7..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBlockTypeSystem.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>ExampleBlockTypeSystem</name>
-    <imports>
-        <import location="..\..\..\BasicTypeSystem.xml"/>
-    </imports>
-    <types>
-        <typeDescription>
-            <name>uima.ruta.example.ExampleBlock.T1</name>
-            <description>Type defined in uima.ruta.example.ExampleBlock</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.ExampleBlock.T2</name>
-            <description>Type defined in uima.ruta.example.ExampleBlock</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.ExampleBlock.T3</name>
-            <description>Type defined in uima.ruta.example.ExampleBlock</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.ExampleBlock.T4</name>
-            <description>Type defined in uima.ruta.example.ExampleBlock</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBooleanFunctionEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBooleanFunctionEngine.xml
deleted file mode 100644
index 5db5bae..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBooleanFunctionEngine.xml
+++ /dev/null
@@ -1,348 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>ExampleBooleanFunction</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExtensionsExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="ExampleBooleanFunctionTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.ExampleBooleanFunction.T1</type>

-                    <type>uima.ruta.example.ExampleBooleanFunction.T2</type>

-                    <type>uima.ruta.example.ExampleBooleanFunction.T3</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.ExampleBooleanFunction.T1</type>

-                    <type>uima.ruta.example.ExampleBooleanFunction.T2</type>

-                    <type>uima.ruta.example.ExampleBooleanFunction.T3</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBooleanFunctionTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBooleanFunctionTypeSystem.xml
deleted file mode 100644
index 086bd9d..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleBooleanFunctionTypeSystem.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>ExampleBooleanFunctionTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleBooleanFunction.T3</name>

-            <description>Type defined in uima.ruta.example.ExampleBooleanFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleBooleanFunction.T2</name>

-            <description>Type defined in uima.ruta.example.ExampleBooleanFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleBooleanFunction.T1</name>

-            <description>Type defined in uima.ruta.example.ExampleBooleanFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleConditionEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleConditionEngine.xml
deleted file mode 100644
index b14cb75..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleConditionEngine.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>ExampleCondition</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExtensionsExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="ExampleConditionTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.ExampleCondition.T1</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.ExampleCondition.T1</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleConditionTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleConditionTypeSystem.xml
deleted file mode 100644
index c486c1b..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleConditionTypeSystem.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>ExampleConditionTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleCondition.T1</name>

-            <description>Type defined in uima.ruta.example.ExampleCondition</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleNumberFunctionEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleNumberFunctionEngine.xml
deleted file mode 100644
index ca34f6a..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleNumberFunctionEngine.xml
+++ /dev/null
@@ -1,348 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>ExampleNumberFunction</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExtensionsExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="ExampleNumberFunctionTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.ExampleNumberFunction.T1</type>

-                    <type>uima.ruta.example.ExampleNumberFunction.T2</type>

-                    <type>uima.ruta.example.ExampleNumberFunction.T3</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.ExampleNumberFunction.T1</type>

-                    <type>uima.ruta.example.ExampleNumberFunction.T2</type>

-                    <type>uima.ruta.example.ExampleNumberFunction.T3</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleNumberFunctionTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleNumberFunctionTypeSystem.xml
deleted file mode 100644
index 5ba29d9..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleNumberFunctionTypeSystem.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>ExampleNumberFunctionTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleNumberFunction.T2</name>

-            <description>Type defined in uima.ruta.example.ExampleNumberFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleNumberFunction.T3</name>

-            <description>Type defined in uima.ruta.example.ExampleNumberFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleNumberFunction.T1</name>

-            <description>Type defined in uima.ruta.example.ExampleNumberFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleStringFunctionEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleStringFunctionEngine.xml
deleted file mode 100644
index 1cecb6c..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleStringFunctionEngine.xml
+++ /dev/null
@@ -1,348 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>ExampleStringFunction</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExtensionsExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="ExampleStringFunctionTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.ExampleStringFunction.T1</type>

-                    <type>uima.ruta.example.ExampleStringFunction.T2</type>

-                    <type>uima.ruta.example.ExampleStringFunction.T3</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.ExampleStringFunction.T1</type>

-                    <type>uima.ruta.example.ExampleStringFunction.T2</type>

-                    <type>uima.ruta.example.ExampleStringFunction.T3</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleStringFunctionTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleStringFunctionTypeSystem.xml
deleted file mode 100644
index 19823ba..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleStringFunctionTypeSystem.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>ExampleStringFunctionTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleStringFunction.T1</name>

-            <description>Type defined in uima.ruta.example.ExampleStringFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleStringFunction.T2</name>

-            <description>Type defined in uima.ruta.example.ExampleStringFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleStringFunction.T3</name>

-            <description>Type defined in uima.ruta.example.ExampleStringFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleTypeFunctionEngine.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleTypeFunctionEngine.xml
deleted file mode 100644
index b4ac4a3..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleTypeFunctionEngine.xml
+++ /dev/null
@@ -1,348 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>ExampleTypeFunction</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/ExtensionsExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\ExtensionsExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="ExampleTypeFunctionTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.ExampleTypeFunction.T1</type>

-                    <type>uima.ruta.example.ExampleTypeFunction.T2</type>

-                    <type>uima.ruta.example.ExampleTypeFunction.T3</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.ExampleTypeFunction.T1</type>

-                    <type>uima.ruta.example.ExampleTypeFunction.T2</type>

-                    <type>uima.ruta.example.ExampleTypeFunction.T3</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleTypeFunctionTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleTypeFunctionTypeSystem.xml
deleted file mode 100644
index 89bab03..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/uima/ruta/example/ExampleTypeFunctionTypeSystem.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>ExampleTypeFunctionTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleTypeFunction.T1</name>

-            <description>Type defined in uima.ruta.example.ExampleTypeFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleTypeFunction.T2</name>

-            <description>Type defined in uima.ruta.example.ExampleTypeFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.ExampleTypeFunction.T3</name>

-            <description>Type defined in uima.ruta.example.ExampleTypeFunction</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/AnnotationWriter.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/AnnotationWriter.xml
deleted file mode 100644
index 64ada39..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/AnnotationWriter.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.AnnotationWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the annotation is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Encoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Type</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Type</name>

-        <value>

-          <string>uima.tcas.DocumentAnnotation</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Encoding</name>

-        <value>

-          <string>UTF-8</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/Cutter.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/Cutter.xml
deleted file mode 100644
index a0543b7..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/Cutter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaCutter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>keep</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlAnnotator.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlAnnotator.xml
deleted file mode 100644
index 1acac59..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlAnnotator.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>onlyContent</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>onlyContent</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="HtmlTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlConverter.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlConverter.xml
deleted file mode 100644
index d493e4d..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlConverter.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlConverter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTags</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTagRegExp</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>replaceLinebreaks</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>linebreakReplacement</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPolicy</name>

-        <description>Either heuristic, explicit, or none.

-Defaults to heuristic.</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPatterns</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionReplacements</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>skipWhitespaces</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>processAll</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>skipWhitespaces</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlTypeSystem.xml
deleted file mode 100644
index f5fb687..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/HtmlTypeSystem.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>typeSystemDescriptor</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TAG</name>

-      <description></description>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>expandedOffsets</name>

-          <description></description>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeName</name>

-          <description></description>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeValue</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.B</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H1</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H2</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H3</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H4</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H5</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H6</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.COMMENT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TITLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.I</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.U</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BIG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SMALL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FONT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.A</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HEAD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HTML</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.EM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TABLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.DIV</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SPAN</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.UL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.OL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.P</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LI</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TBODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TH</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.IMG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.STYLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SCRIPT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LINK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.INPUT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FORM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.META</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.REMARK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-      <features>

-        <featureDescription>

-          <name>comment</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/Modifier.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/Modifier.xml
deleted file mode 100644
index a5a251e..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/Modifier.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>Modifier</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputLocation</name>

-        <description></description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>outputView</name>

-        <value>

-          <string>modified</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <outputSofas>

-          <sofaName>modified</sofaName>

-        </outputSofas>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/PlainTextAnnotator.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/PlainTextAnnotator.xml
deleted file mode 100644
index 77a0a55..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/PlainTextAnnotator.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.PlainTextAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters/>

-    <configurationParameterSettings/>

-    <typeSystemDescription>

-      <imports>

-        <import location="PlainTextTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/PlainTextTypeSystem.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/PlainTextTypeSystem.xml
deleted file mode 100644
index 7081c20..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/PlainTextTypeSystem.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>PlainTextTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Line</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Paragraph</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WSLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EmptyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EmptyLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AnyLine</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/SourceDocumentInformation.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/SourceDocumentInformation.xml
deleted file mode 100644
index 8322d25..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/SourceDocumentInformation.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-   
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-	<name>org.apache.uima.examples.SourceDocumentInformation</name>
-	<description>Defines a type for storing information about the original source document from which the current CAS was initialized</description>
-	<version>1.0</version>
-	<vendor>The Apache Software Foundation</vendor>
-	<types>
-		<typeDescription>
-			<name>org.apache.uima.examples.SourceDocumentInformation</name>
-			<description>Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.</description>
-			<supertypeName>uima.tcas.Annotation</supertypeName>
-			<features>
-				<featureDescription>
-					<name>uri</name>
-					<description>URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)</description>
-					<rangeTypeName>uima.cas.String</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>offsetInSource</name>
-					<description>Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>documentSize</name>
-					<description>Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-				  <name>lastSegment</name>
-				  <description>For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. </description>
-			      <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-			    </featureDescription>				
-			</features>
-		</typeDescription>
-	</types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/StyleMapCreator.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/StyleMapCreator.xml
deleted file mode 100644
index 8e150de..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/StyleMapCreator.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.StyleMapCreator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/ViewWriter.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/ViewWriter.xml
deleted file mode 100644
index 2b3b472..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/ViewWriter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>output</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/ExtensionsExample/descriptor/utils/XMIWriter.xml b/trunk/example-projects/ExtensionsExample/descriptor/utils/XMIWriter.xml
deleted file mode 100644
index 3a935cf..0000000
--- a/trunk/example-projects/ExtensionsExample/descriptor/utils/XMIWriter.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.XMIWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the xmi is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ExtensionsExample/input/test.txt b/trunk/example-projects/ExtensionsExample/input/test.txt
deleted file mode 100644
index 0a92e4b..0000000
--- a/trunk/example-projects/ExtensionsExample/input/test.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a test.

-1900/12/24 and 24.4.1982

-CW

-org.apache.uima.ruta.type.NUM
\ No newline at end of file
diff --git a/trunk/example-projects/ExtensionsExample/output/test.txt.xmi b/trunk/example-projects/ExtensionsExample/output/test.txt.xmi
deleted file mode 100644
index 4d3c4cc..0000000
--- a/trunk/example-projects/ExtensionsExample/output/test.txt.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:ExampleBlock="http:///uima/ruta/example/ExampleBlock.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:tcas="http:///uima/tcas.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="This is a test.&#13;&#10;1900/12/24 and 24.4.1982&#13;&#10;CW&#13;&#10;org.apache.uima.ruta.type.NUM"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="76" language="x-unspecified"/><type:CW xmi:id="13" sofa="1" begin="0" end="4"/><type:SPACE xmi:id="17" sofa="1" begin="4" end="5"/><type:SPACE xmi:id="25" sofa="1" begin="7" end="8"/><type:SPACE xmi:id="33" sofa="1" begin="9" end="10"/><type:SPACE xmi:id="73" sofa="1" begin="27" end="28"/><type:SPACE xmi:id="81" sofa="1" begin="31" end="32"/><type:SW xmi:id="21" sofa="1" begin="5" end="7"/><type:SW xmi:id="29" sofa="1" begin="8" end="9"/><type:SW xmi:id="37" sofa="1" begin="10" end="14"/><type:SW xmi:id="77" sofa="1" begin="28" end="31"/><type:SW xmi:id="125" sofa="1" begin="47" end="50"/><type:SW xmi:id="133" sofa="1" begin="51" end="57"/><type:SW xmi:id="141" sofa="1" begin="58" end="62"/><type:SW xmi:id="149" sofa="1" begin="63" end="67"/><type:SW xmi:id="157" sofa="1" begin="68" end="72"/><type:PERIOD xmi:id="41" sofa="1" begin="14" end="15"/><type:PERIOD xmi:id="89" sofa="1" begin="34" end="35"/><type:PERIOD xmi:id="97" sofa="1" begin="36" end="37"/><type:PERIOD xmi:id="129" sofa="1" begin="50" end="51"/><type:PERIOD xmi:id="137" sofa="1" begin="57" end="58"/><type:PERIOD xmi:id="145" sofa="1" begin="62" end="63"/><type:PERIOD xmi:id="153" sofa="1" begin="67" end="68"/><type:PERIOD xmi:id="161" sofa="1" begin="72" end="73"/><type:BREAK xmi:id="45" sofa="1" begin="15" end="16"/><type:BREAK xmi:id="49" sofa="1" begin="16" end="17"/><type:BREAK xmi:id="105" sofa="1" begin="41" end="42"/><type:BREAK xmi:id="109" sofa="1" begin="42" end="43"/><type:BREAK xmi:id="117" sofa="1" begin="45" end="46"/><type:BREAK xmi:id="121" sofa="1" begin="46" end="47"/><type:NUM xmi:id="53" sofa="1" begin="17" end="21"/><type:NUM xmi:id="61" sofa="1" begin="22" end="24"/><type:NUM xmi:id="69" sofa="1" begin="25" end="27"/><type:NUM xmi:id="85" sofa="1" begin="32" end="34"/><type:NUM xmi:id="93" sofa="1" begin="35" end="36"/><type:NUM xmi:id="101" sofa="1" begin="37" end="41"/><type:SPECIAL xmi:id="57" sofa="1" begin="21" end="22"/><type:SPECIAL xmi:id="65" sofa="1" begin="24" end="25"/><type:CAP xmi:id="113" sofa="1" begin="43" end="45"/><type:CAP xmi:id="165" sofa="1" begin="73" end="76"/><type:RutaBasic xmi:id="169" sofa="1" begin="0" end="4"/><type:RutaBasic xmi:id="174" sofa="1" begin="4" end="5"/><type:RutaBasic xmi:id="179" sofa="1" begin="5" end="7"/><type:RutaBasic xmi:id="184" sofa="1" begin="7" end="8"/><type:RutaBasic xmi:id="189" sofa="1" begin="8" end="9"/><type:RutaBasic xmi:id="194" sofa="1" begin="9" end="10"/><type:RutaBasic xmi:id="199" sofa="1" begin="10" end="14"/><type:RutaBasic xmi:id="204" sofa="1" begin="14" end="15"/><type:RutaBasic xmi:id="209" sofa="1" begin="15" end="16"/><type:RutaBasic xmi:id="214" sofa="1" begin="16" end="17"/><type:RutaBasic xmi:id="219" sofa="1" begin="17" end="21"/><type:RutaBasic xmi:id="224" sofa="1" begin="21" end="22"/><type:RutaBasic xmi:id="229" sofa="1" begin="22" end="24"/><type:RutaBasic xmi:id="234" sofa="1" begin="24" end="25"/><type:RutaBasic xmi:id="239" sofa="1" begin="25" end="27"/><type:RutaBasic xmi:id="244" sofa="1" begin="27" end="28"/><type:RutaBasic xmi:id="249" sofa="1" begin="28" end="31"/><type:RutaBasic xmi:id="254" sofa="1" begin="31" end="32"/><type:RutaBasic xmi:id="259" sofa="1" begin="32" end="34"/><type:RutaBasic xmi:id="264" sofa="1" begin="34" end="35"/><type:RutaBasic xmi:id="269" sofa="1" begin="35" end="36"/><type:RutaBasic xmi:id="274" sofa="1" begin="36" end="37"/><type:RutaBasic xmi:id="279" sofa="1" begin="37" end="41"/><type:RutaBasic xmi:id="284" sofa="1" begin="41" end="42"/><type:RutaBasic xmi:id="289" sofa="1" begin="42" end="43"/><type:RutaBasic xmi:id="294" sofa="1" begin="43" end="45"/><type:RutaBasic xmi:id="299" sofa="1" begin="45" end="46"/><type:RutaBasic xmi:id="304" sofa="1" begin="46" end="47"/><type:RutaBasic xmi:id="309" sofa="1" begin="47" end="50"/><type:RutaBasic xmi:id="314" sofa="1" begin="50" end="51"/><type:RutaBasic xmi:id="319" sofa="1" begin="51" end="57"/><type:RutaBasic xmi:id="324" sofa="1" begin="57" end="58"/><type:RutaBasic xmi:id="329" sofa="1" begin="58" end="62"/><type:RutaBasic xmi:id="334" sofa="1" begin="62" end="63"/><type:RutaBasic xmi:id="339" sofa="1" begin="63" end="67"/><type:RutaBasic xmi:id="344" sofa="1" begin="67" end="68"/><type:RutaBasic xmi:id="349" sofa="1" begin="68" end="72"/><type:RutaBasic xmi:id="354" sofa="1" begin="72" end="73"/><type:RutaBasic xmi:id="359" sofa="1" begin="73" end="76"/><ExampleBlock:T1 xmi:id="592" sofa="1" begin="10" end="15"/><ExampleBlock:T1 xmi:id="621" sofa="1" begin="47" end="51"/><ExampleBlock:T1 xmi:id="642" sofa="1" begin="51" end="58"/><ExampleBlock:T1 xmi:id="663" sofa="1" begin="58" end="63"/><ExampleBlock:T1 xmi:id="684" sofa="1" begin="63" end="68"/><ExampleBlock:T1 xmi:id="705" sofa="1" begin="68" end="73"/><ExampleBlock:T2 xmi:id="734" sofa="1" begin="8" end="15"/><ExampleBlock:T3 xmi:id="811" sofa="1" begin="5" end="15"/><ExampleBlock:T4 xmi:id="896" sofa="1" begin="0" end="15"/><type:DebugFailedRuleMatch xmi:id="940" sofa="1" begin="5" end="7" time="3" elements="948" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="1020" sofa="1" begin="8" end="9" time="3" elements="1028" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="1184" sofa="1" begin="28" end="31" time="3" elements="1192" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="1706" sofa="1" begin="5" end="7" time="2" elements="1714" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="1870" sofa="1" begin="10" end="14" time="2" elements="1878" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="1950" sofa="1" begin="28" end="31" time="2" elements="1958" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2030" sofa="1" begin="47" end="50" time="2" elements="2038" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2110" sofa="1" begin="51" end="57" time="2" elements="2118" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2190" sofa="1" begin="58" end="62" time="2" elements="2198" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2270" sofa="1" begin="63" end="67" time="2" elements="2278" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2350" sofa="1" begin="68" end="72" time="2" elements="2358" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2536" sofa="1" begin="8" end="9" time="2" elements="2544" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2616" sofa="1" begin="10" end="14" time="2" elements="2624" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2696" sofa="1" begin="28" end="31" time="2" elements="2704" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2776" sofa="1" begin="47" end="50" time="2" elements="2784" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2856" sofa="1" begin="51" end="57" time="2" elements="2864" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="2936" sofa="1" begin="58" end="62" time="2" elements="2944" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="3016" sofa="1" begin="63" end="67" time="2" elements="3024" matched="false" delegates=""/><type:DebugFailedRuleMatch xmi:id="3096" sofa="1" begin="68" end="72" time="2" elements="3104" matched="false" delegates=""/><type:DebugMatchedRuleMatch xmi:id="1100" sofa="1" begin="10" end="15" time="3" elements="1108" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="1264" sofa="1" begin="47" end="51" time="3" elements="1272" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="1348" sofa="1" begin="51" end="58" time="3" elements="1356" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="1432" sofa="1" begin="58" end="63" time="3" elements="1440" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="1516" sofa="1" begin="63" end="68" time="3" elements="1524" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="1600" sofa="1" begin="68" end="73" time="3" elements="1608" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="1786" sofa="1" begin="8" end="15" time="2" elements="1794" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="2452" sofa="1" begin="5" end="15" time="2" elements="2460" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="3198" sofa="1" begin="0" end="15" time="0" elements="3206" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="3302" sofa="1" begin="0" end="76" time="0" elements="3310" matched="true" delegates=""/><type:DebugMatchedRuleMatch xmi:id="3353" sofa="1" begin="0" end="76" time="0" elements="3361" matched="true" delegates=""/><type:DebugBlockApply xmi:id="905" sofa="1" begin="0" end="76" time="7" element="BLOCK(ExampleBlock) uima.tcas.DocumentAnnotation " applied="1" tried="1" rules="3353" id="0" innerApply="917"/><type:Statistics xmi:id="3402" total="1.0" amount="9" part="0.1111"><name/></type:Statistics><type:DebugCreatedBy xmi:id="364" rule="provided" annotation="8" script="" id="-1"/><type:DebugCreatedBy xmi:id="369" rule="provided" annotation="13" script="" id="-1"/><type:DebugCreatedBy xmi:id="374" rule="provided" annotation="17" script="" id="-1"/><type:DebugCreatedBy xmi:id="379" rule="provided" annotation="21" script="" id="-1"/><type:DebugCreatedBy xmi:id="384" rule="provided" annotation="25" script="" id="-1"/><type:DebugCreatedBy xmi:id="389" rule="provided" annotation="29" script="" id="-1"/><type:DebugCreatedBy xmi:id="394" rule="provided" annotation="33" script="" id="-1"/><type:DebugCreatedBy xmi:id="399" rule="provided" annotation="37" script="" id="-1"/><type:DebugCreatedBy xmi:id="404" rule="provided" annotation="41" script="" id="-1"/><type:DebugCreatedBy xmi:id="409" rule="provided" annotation="45" script="" id="-1"/><type:DebugCreatedBy xmi:id="414" rule="provided" annotation="49" script="" id="-1"/><type:DebugCreatedBy xmi:id="419" rule="provided" annotation="53" script="" id="-1"/><type:DebugCreatedBy xmi:id="424" rule="provided" annotation="57" script="" id="-1"/><type:DebugCreatedBy xmi:id="429" rule="provided" annotation="61" script="" id="-1"/><type:DebugCreatedBy xmi:id="434" rule="provided" annotation="65" script="" id="-1"/><type:DebugCreatedBy xmi:id="439" rule="provided" annotation="69" script="" id="-1"/><type:DebugCreatedBy xmi:id="444" rule="provided" annotation="73" script="" id="-1"/><type:DebugCreatedBy xmi:id="449" rule="provided" annotation="77" script="" id="-1"/><type:DebugCreatedBy xmi:id="454" rule="provided" annotation="81" script="" id="-1"/><type:DebugCreatedBy xmi:id="459" rule="provided" annotation="85" script="" id="-1"/><type:DebugCreatedBy xmi:id="464" rule="provided" annotation="89" script="" id="-1"/><type:DebugCreatedBy xmi:id="469" rule="provided" annotation="93" script="" id="-1"/><type:DebugCreatedBy xmi:id="474" rule="provided" annotation="97" script="" id="-1"/><type:DebugCreatedBy xmi:id="479" rule="provided" annotation="101" script="" id="-1"/><type:DebugCreatedBy xmi:id="484" rule="provided" annotation="105" script="" id="-1"/><type:DebugCreatedBy xmi:id="489" rule="provided" annotation="109" script="" id="-1"/><type:DebugCreatedBy xmi:id="494" rule="provided" annotation="113" script="" id="-1"/><type:DebugCreatedBy xmi:id="499" rule="provided" annotation="117" script="" id="-1"/><type:DebugCreatedBy xmi:id="504" rule="provided" annotation="121" script="" id="-1"/><type:DebugCreatedBy xmi:id="509" rule="provided" annotation="125" script="" id="-1"/><type:DebugCreatedBy xmi:id="514" rule="provided" annotation="129" script="" id="-1"/><type:DebugCreatedBy xmi:id="519" rule="provided" annotation="133" script="" id="-1"/><type:DebugCreatedBy xmi:id="524" rule="provided" annotation="137" script="" id="-1"/><type:DebugCreatedBy xmi:id="529" rule="provided" annotation="141" script="" id="-1"/><type:DebugCreatedBy xmi:id="534" rule="provided" annotation="145" script="" id="-1"/><type:DebugCreatedBy xmi:id="539" rule="provided" annotation="149" script="" id="-1"/><type:DebugCreatedBy xmi:id="544" rule="provided" annotation="153" script="" id="-1"/><type:DebugCreatedBy xmi:id="549" rule="provided" annotation="157" script="" id="-1"/><type:DebugCreatedBy xmi:id="554" rule="provided" annotation="161" script="" id="-1"/><type:DebugCreatedBy xmi:id="559" rule="provided" annotation="165" script="" id="-1"/><type:DebugCreatedBy xmi:id="596" rule="(SW PERIOD){ -&gt; T1} " annotation="592" script="uima.ruta.example.ExampleBlock" id="5"/><type:DebugCreatedBy xmi:id="625" rule="(SW PERIOD){ -&gt; T1} " annotation="621" script="uima.ruta.example.ExampleBlock" id="5"/><type:DebugCreatedBy xmi:id="646" rule="(SW PERIOD){ -&gt; T1} " annotation="642" script="uima.ruta.example.ExampleBlock" id="5"/><type:DebugCreatedBy xmi:id="667" rule="(SW PERIOD){ -&gt; T1} " annotation="663" script="uima.ruta.example.ExampleBlock" id="5"/><type:DebugCreatedBy xmi:id="688" rule="(SW PERIOD){ -&gt; T1} " annotation="684" script="uima.ruta.example.ExampleBlock" id="5"/><type:DebugCreatedBy xmi:id="709" rule="(SW PERIOD){ -&gt; T1} " annotation="705" script="uima.ruta.example.ExampleBlock" id="5"/><type:DebugCreatedBy xmi:id="738" rule="(SW T1){ -&gt; T2} " annotation="734" script="uima.ruta.example.ExampleBlock" id="4"/><type:DebugCreatedBy xmi:id="815" rule="(SW T2){ -&gt; T3} " annotation="811" script="uima.ruta.example.ExampleBlock" id="3"/><type:DebugCreatedBy xmi:id="900" rule="(CW T3){ -&gt; T4} " annotation="896" script="uima.ruta.example.ExampleBlock" id="2"/><type:DebugRuleApply xmi:id="3187" sofa="1" begin="0" end="15" time="0" element="(CW T3){ -&gt; T4} " applied="1" tried="1" rules="3198" id="2" script="uima.ruta.example.ExampleBlock"/><type:DebugRuleApply xmi:id="2441" sofa="1" begin="5" end="72" time="2" element="(SW T2){ -&gt; T3} " applied="1" tried="9" rules="2452 2536 2616 2696 2776 2856 2936 3016 3096" id="3" script="uima.ruta.example.ExampleBlock"/><type:DebugRuleApply xmi:id="1695" sofa="1" begin="5" end="72" time="2" element="(SW T1){ -&gt; T2} " applied="1" tried="9" rules="1706 1786 1870 1950 2030 2110 2190 2270 2350" id="4" script="uima.ruta.example.ExampleBlock"/><type:DebugRuleApply xmi:id="929" sofa="1" begin="5" end="73" time="3" element="(SW PERIOD){ -&gt; T1} " applied="6" tried="9" rules="940 1020 1100 1184 1264 1348 1432 1516 1600" id="5" script="uima.ruta.example.ExampleBlock"/><type:DebugBlockApply xmi:id="917" sofa="1" begin="0" end="76" time="7" element="BLOCK(REVERSE) Document " applied="1" tried="1" rules="3302" id="0" innerApply="929 1695 2441 3187"/><type:DebugEvaluatedCondition xmi:id="3373" element="uima.tcas.DocumentAnnotation" value="true"/><type:DebugRuleElementMatch xmi:id="3365" sofa="1" begin="0" end="76" time="0" baseCondition="3373" conditions=""/><type:DebugRuleElementMatches xmi:id="3361" matches="3365" element="uima.tcas.DocumentAnnotation" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="3322" element="Document" value="true"/><type:DebugRuleElementMatch xmi:id="3314" sofa="1" begin="0" end="76" time="0" baseCondition="3322" conditions=""/><type:DebugRuleElementMatches xmi:id="3310" matches="3314" element="Document" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="3255" element="T3" value="true"/><type:DebugRuleElementMatch xmi:id="3247" sofa="1" begin="5" end="15" time="0" baseCondition="3255" conditions=""/><type:DebugRuleElementMatches xmi:id="3243" matches="3247" element="T3" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="3234" element="CW" value="true"/><type:DebugRuleElementMatch xmi:id="3226" sofa="1" begin="0" end="4" time="0" baseCondition="3234" conditions=""/><type:DebugRuleElementMatches xmi:id="3222" matches="3226" element="CW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="3218" element="(CW T3){ -&gt; T4}" value="true"/><type:DebugRuleElementMatch xmi:id="3210" sofa="1" begin="0" end="15" time="0" baseCondition="3218" conditions="" elements="3222 3243"/><type:DebugRuleElementMatches xmi:id="3206" matches="3210" element="(CW T3){ -&gt; T4}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2509" element="T2" value="true"/><type:DebugRuleElementMatch xmi:id="2501" sofa="1" begin="8" end="15" time="0" baseCondition="2509" conditions=""/><type:DebugRuleElementMatches xmi:id="2497" matches="2501" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2488" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2480" sofa="1" begin="5" end="7" time="0" baseCondition="2488" conditions=""/><type:DebugRuleElementMatches xmi:id="2476" matches="2480" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2472" element="(SW T2){ -&gt; T3}" value="true"/><type:DebugRuleElementMatch xmi:id="2464" sofa="1" begin="5" end="15" time="0" baseCondition="2472" conditions="" elements="2476 2497"/><type:DebugRuleElementMatches xmi:id="2460" matches="2464" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1843" element="T1" value="true"/><type:DebugRuleElementMatch xmi:id="1835" sofa="1" begin="10" end="15" time="0" baseCondition="1843" conditions=""/><type:DebugRuleElementMatches xmi:id="1831" matches="1835" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1822" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1814" sofa="1" begin="8" end="9" time="0" baseCondition="1822" conditions=""/><type:DebugRuleElementMatches xmi:id="1810" matches="1814" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1806" element="(SW T1){ -&gt; T2}" value="true"/><type:DebugRuleElementMatch xmi:id="1798" sofa="1" begin="8" end="15" time="0" baseCondition="1806" conditions="" elements="1810 1831"/><type:DebugRuleElementMatches xmi:id="1794" matches="1798" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1657" element="PERIOD" value="true"/><type:DebugRuleElementMatch xmi:id="1649" sofa="1" begin="72" end="73" time="0" baseCondition="1657" conditions=""/><type:DebugRuleElementMatches xmi:id="1645" matches="1649" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1636" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1628" sofa="1" begin="68" end="72" time="0" baseCondition="1636" conditions=""/><type:DebugRuleElementMatches xmi:id="1624" matches="1628" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1620" element="(SW PERIOD){ -&gt; T1}" value="true"/><type:DebugRuleElementMatch xmi:id="1612" sofa="1" begin="68" end="73" time="0" baseCondition="1620" conditions="" elements="1624 1645"/><type:DebugRuleElementMatches xmi:id="1608" matches="1612" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1573" element="PERIOD" value="true"/><type:DebugRuleElementMatch xmi:id="1565" sofa="1" begin="67" end="68" time="0" baseCondition="1573" conditions=""/><type:DebugRuleElementMatches xmi:id="1561" matches="1565" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1552" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1544" sofa="1" begin="63" end="67" time="0" baseCondition="1552" conditions=""/><type:DebugRuleElementMatches xmi:id="1540" matches="1544" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1536" element="(SW PERIOD){ -&gt; T1}" value="true"/><type:DebugRuleElementMatch xmi:id="1528" sofa="1" begin="63" end="68" time="0" baseCondition="1536" conditions="" elements="1540 1561"/><type:DebugRuleElementMatches xmi:id="1524" matches="1528" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1489" element="PERIOD" value="true"/><type:DebugRuleElementMatch xmi:id="1481" sofa="1" begin="62" end="63" time="0" baseCondition="1489" conditions=""/><type:DebugRuleElementMatches xmi:id="1477" matches="1481" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1468" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1460" sofa="1" begin="58" end="62" time="0" baseCondition="1468" conditions=""/><type:DebugRuleElementMatches xmi:id="1456" matches="1460" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1452" element="(SW PERIOD){ -&gt; T1}" value="true"/><type:DebugRuleElementMatch xmi:id="1444" sofa="1" begin="58" end="63" time="0" baseCondition="1452" conditions="" elements="1456 1477"/><type:DebugRuleElementMatches xmi:id="1440" matches="1444" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1405" element="PERIOD" value="true"/><type:DebugRuleElementMatch xmi:id="1397" sofa="1" begin="57" end="58" time="0" baseCondition="1405" conditions=""/><type:DebugRuleElementMatches xmi:id="1393" matches="1397" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1384" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1376" sofa="1" begin="51" end="57" time="0" baseCondition="1384" conditions=""/><type:DebugRuleElementMatches xmi:id="1372" matches="1376" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1368" element="(SW PERIOD){ -&gt; T1}" value="true"/><type:DebugRuleElementMatch xmi:id="1360" sofa="1" begin="51" end="58" time="0" baseCondition="1368" conditions="" elements="1372 1393"/><type:DebugRuleElementMatches xmi:id="1356" matches="1360" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1321" element="PERIOD" value="true"/><type:DebugRuleElementMatch xmi:id="1313" sofa="1" begin="50" end="51" time="0" baseCondition="1321" conditions=""/><type:DebugRuleElementMatches xmi:id="1309" matches="1313" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1300" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1292" sofa="1" begin="47" end="50" time="0" baseCondition="1300" conditions=""/><type:DebugRuleElementMatches xmi:id="1288" matches="1292" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1284" element="(SW PERIOD){ -&gt; T1}" value="true"/><type:DebugRuleElementMatch xmi:id="1276" sofa="1" begin="47" end="51" time="0" baseCondition="1284" conditions="" elements="1288 1309"/><type:DebugRuleElementMatches xmi:id="1272" matches="1276" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1157" element="PERIOD" value="true"/><type:DebugRuleElementMatch xmi:id="1149" sofa="1" begin="14" end="15" time="0" baseCondition="1157" conditions=""/><type:DebugRuleElementMatches xmi:id="1145" matches="1149" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1136" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1128" sofa="1" begin="10" end="14" time="0" baseCondition="1136" conditions=""/><type:DebugRuleElementMatches xmi:id="1124" matches="1128" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1120" element="(SW PERIOD){ -&gt; T1}" value="true"/><type:DebugRuleElementMatch xmi:id="1112" sofa="1" begin="10" end="15" time="0" baseCondition="1120" conditions="" elements="1124 1145"/><type:DebugRuleElementMatches xmi:id="1108" matches="1112" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="3153" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="3145" sofa="1" begin="0" end="0" time="0" baseCondition="3153" conditions=""/><type:DebugRuleElementMatches xmi:id="3141" matches="3145" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="3132" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="3124" sofa="1" begin="68" end="72" time="0" baseCondition="3132" conditions=""/><type:DebugRuleElementMatches xmi:id="3120" matches="3124" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="3116" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="3108" sofa="1" begin="68" end="72" time="0" baseCondition="3116" conditions="" elements="3120 3141"/><type:DebugRuleElementMatches xmi:id="3104" matches="3108" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="3073" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="3065" sofa="1" begin="0" end="0" time="0" baseCondition="3073" conditions=""/><type:DebugRuleElementMatches xmi:id="3061" matches="3065" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="3052" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="3044" sofa="1" begin="63" end="67" time="0" baseCondition="3052" conditions=""/><type:DebugRuleElementMatches xmi:id="3040" matches="3044" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="3036" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="3028" sofa="1" begin="63" end="67" time="0" baseCondition="3036" conditions="" elements="3040 3061"/><type:DebugRuleElementMatches xmi:id="3024" matches="3028" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2993" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="2985" sofa="1" begin="0" end="0" time="0" baseCondition="2993" conditions=""/><type:DebugRuleElementMatches xmi:id="2981" matches="2985" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2972" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2964" sofa="1" begin="58" end="62" time="0" baseCondition="2972" conditions=""/><type:DebugRuleElementMatches xmi:id="2960" matches="2964" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2956" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="2948" sofa="1" begin="58" end="62" time="0" baseCondition="2956" conditions="" elements="2960 2981"/><type:DebugRuleElementMatches xmi:id="2944" matches="2948" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2913" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="2905" sofa="1" begin="0" end="0" time="0" baseCondition="2913" conditions=""/><type:DebugRuleElementMatches xmi:id="2901" matches="2905" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2892" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2884" sofa="1" begin="51" end="57" time="0" baseCondition="2892" conditions=""/><type:DebugRuleElementMatches xmi:id="2880" matches="2884" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2876" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="2868" sofa="1" begin="51" end="57" time="0" baseCondition="2876" conditions="" elements="2880 2901"/><type:DebugRuleElementMatches xmi:id="2864" matches="2868" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2833" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="2825" sofa="1" begin="0" end="0" time="0" baseCondition="2833" conditions=""/><type:DebugRuleElementMatches xmi:id="2821" matches="2825" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2812" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2804" sofa="1" begin="47" end="50" time="0" baseCondition="2812" conditions=""/><type:DebugRuleElementMatches xmi:id="2800" matches="2804" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2796" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="2788" sofa="1" begin="47" end="50" time="0" baseCondition="2796" conditions="" elements="2800 2821"/><type:DebugRuleElementMatches xmi:id="2784" matches="2788" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2753" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="2745" sofa="1" begin="0" end="0" time="0" baseCondition="2753" conditions=""/><type:DebugRuleElementMatches xmi:id="2741" matches="2745" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2732" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2724" sofa="1" begin="28" end="31" time="0" baseCondition="2732" conditions=""/><type:DebugRuleElementMatches xmi:id="2720" matches="2724" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2716" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="2708" sofa="1" begin="28" end="31" time="0" baseCondition="2716" conditions="" elements="2720 2741"/><type:DebugRuleElementMatches xmi:id="2704" matches="2708" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2673" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="2665" sofa="1" begin="0" end="0" time="0" baseCondition="2673" conditions=""/><type:DebugRuleElementMatches xmi:id="2661" matches="2665" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2652" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2644" sofa="1" begin="10" end="14" time="0" baseCondition="2652" conditions=""/><type:DebugRuleElementMatches xmi:id="2640" matches="2644" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2636" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="2628" sofa="1" begin="10" end="14" time="0" baseCondition="2636" conditions="" elements="2640 2661"/><type:DebugRuleElementMatches xmi:id="2624" matches="2628" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2593" element="T2" value="false"/><type:DebugRuleElementMatch xmi:id="2585" sofa="1" begin="0" end="0" time="0" baseCondition="2593" conditions=""/><type:DebugRuleElementMatches xmi:id="2581" matches="2585" element="T2" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2572" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2564" sofa="1" begin="8" end="9" time="0" baseCondition="2572" conditions=""/><type:DebugRuleElementMatches xmi:id="2560" matches="2564" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2556" element="(SW T2){ -&gt; T3}" value="false"/><type:DebugRuleElementMatch xmi:id="2548" sofa="1" begin="8" end="9" time="0" baseCondition="2556" conditions="" elements="2560 2581"/><type:DebugRuleElementMatches xmi:id="2544" matches="2548" element="(SW T2){ -&gt; T3}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2407" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="2399" sofa="1" begin="0" end="0" time="0" baseCondition="2407" conditions=""/><type:DebugRuleElementMatches xmi:id="2395" matches="2399" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2386" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2378" sofa="1" begin="68" end="72" time="0" baseCondition="2386" conditions=""/><type:DebugRuleElementMatches xmi:id="2374" matches="2378" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2370" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="2362" sofa="1" begin="68" end="72" time="0" baseCondition="2370" conditions="" elements="2374 2395"/><type:DebugRuleElementMatches xmi:id="2358" matches="2362" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2327" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="2319" sofa="1" begin="0" end="0" time="0" baseCondition="2327" conditions=""/><type:DebugRuleElementMatches xmi:id="2315" matches="2319" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2306" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2298" sofa="1" begin="63" end="67" time="0" baseCondition="2306" conditions=""/><type:DebugRuleElementMatches xmi:id="2294" matches="2298" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2290" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="2282" sofa="1" begin="63" end="67" time="0" baseCondition="2290" conditions="" elements="2294 2315"/><type:DebugRuleElementMatches xmi:id="2278" matches="2282" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2247" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="2239" sofa="1" begin="0" end="0" time="0" baseCondition="2247" conditions=""/><type:DebugRuleElementMatches xmi:id="2235" matches="2239" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2226" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2218" sofa="1" begin="58" end="62" time="0" baseCondition="2226" conditions=""/><type:DebugRuleElementMatches xmi:id="2214" matches="2218" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2210" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="2202" sofa="1" begin="58" end="62" time="0" baseCondition="2210" conditions="" elements="2214 2235"/><type:DebugRuleElementMatches xmi:id="2198" matches="2202" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2167" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="2159" sofa="1" begin="0" end="0" time="0" baseCondition="2167" conditions=""/><type:DebugRuleElementMatches xmi:id="2155" matches="2159" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2146" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2138" sofa="1" begin="51" end="57" time="0" baseCondition="2146" conditions=""/><type:DebugRuleElementMatches xmi:id="2134" matches="2138" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2130" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="2122" sofa="1" begin="51" end="57" time="0" baseCondition="2130" conditions="" elements="2134 2155"/><type:DebugRuleElementMatches xmi:id="2118" matches="2122" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2087" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="2079" sofa="1" begin="0" end="0" time="0" baseCondition="2087" conditions=""/><type:DebugRuleElementMatches xmi:id="2075" matches="2079" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2066" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="2058" sofa="1" begin="47" end="50" time="0" baseCondition="2066" conditions=""/><type:DebugRuleElementMatches xmi:id="2054" matches="2058" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="2050" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="2042" sofa="1" begin="47" end="50" time="0" baseCondition="2050" conditions="" elements="2054 2075"/><type:DebugRuleElementMatches xmi:id="2038" matches="2042" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="2007" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="1999" sofa="1" begin="0" end="0" time="0" baseCondition="2007" conditions=""/><type:DebugRuleElementMatches xmi:id="1995" matches="1999" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1986" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1978" sofa="1" begin="28" end="31" time="0" baseCondition="1986" conditions=""/><type:DebugRuleElementMatches xmi:id="1974" matches="1978" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1970" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="1962" sofa="1" begin="28" end="31" time="0" baseCondition="1970" conditions="" elements="1974 1995"/><type:DebugRuleElementMatches xmi:id="1958" matches="1962" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1927" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="1919" sofa="1" begin="0" end="0" time="0" baseCondition="1927" conditions=""/><type:DebugRuleElementMatches xmi:id="1915" matches="1919" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1906" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1898" sofa="1" begin="10" end="14" time="0" baseCondition="1906" conditions=""/><type:DebugRuleElementMatches xmi:id="1894" matches="1898" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1890" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="1882" sofa="1" begin="10" end="14" time="0" baseCondition="1890" conditions="" elements="1894 1915"/><type:DebugRuleElementMatches xmi:id="1878" matches="1882" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1763" element="T1" value="false"/><type:DebugRuleElementMatch xmi:id="1755" sofa="1" begin="0" end="0" time="0" baseCondition="1763" conditions=""/><type:DebugRuleElementMatches xmi:id="1751" matches="1755" element="T1" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1742" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1734" sofa="1" begin="5" end="7" time="0" baseCondition="1742" conditions=""/><type:DebugRuleElementMatches xmi:id="1730" matches="1734" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1726" element="(SW T1){ -&gt; T2}" value="false"/><type:DebugRuleElementMatch xmi:id="1718" sofa="1" begin="5" end="7" time="0" baseCondition="1726" conditions="" elements="1730 1751"/><type:DebugRuleElementMatches xmi:id="1714" matches="1718" element="(SW T1){ -&gt; T2}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1241" element="PERIOD" value="false"/><type:DebugRuleElementMatch xmi:id="1233" sofa="1" begin="0" end="0" time="0" baseCondition="1241" conditions=""/><type:DebugRuleElementMatches xmi:id="1229" matches="1233" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1220" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1212" sofa="1" begin="28" end="31" time="0" baseCondition="1220" conditions=""/><type:DebugRuleElementMatches xmi:id="1208" matches="1212" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1204" element="(SW PERIOD){ -&gt; T1}" value="false"/><type:DebugRuleElementMatch xmi:id="1196" sofa="1" begin="28" end="31" time="0" baseCondition="1204" conditions="" elements="1208 1229"/><type:DebugRuleElementMatches xmi:id="1192" matches="1196" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1077" element="PERIOD" value="false"/><type:DebugRuleElementMatch xmi:id="1069" sofa="1" begin="0" end="0" time="0" baseCondition="1077" conditions=""/><type:DebugRuleElementMatches xmi:id="1065" matches="1069" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="1056" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="1048" sofa="1" begin="8" end="9" time="0" baseCondition="1056" conditions=""/><type:DebugRuleElementMatches xmi:id="1044" matches="1048" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="1040" element="(SW PERIOD){ -&gt; T1}" value="false"/><type:DebugRuleElementMatch xmi:id="1032" sofa="1" begin="8" end="9" time="0" baseCondition="1040" conditions="" elements="1044 1065"/><type:DebugRuleElementMatches xmi:id="1028" matches="1032" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="997" element="PERIOD" value="false"/><type:DebugRuleElementMatch xmi:id="989" sofa="1" begin="0" end="0" time="0" baseCondition="997" conditions=""/><type:DebugRuleElementMatches xmi:id="985" matches="989" element="PERIOD" ruleAnchor="false"/><type:DebugEvaluatedCondition xmi:id="976" element="SW" value="true"/><type:DebugRuleElementMatch xmi:id="968" sofa="1" begin="5" end="7" time="0" baseCondition="976" conditions=""/><type:DebugRuleElementMatches xmi:id="964" matches="968" element="SW" ruleAnchor="true"/><type:DebugEvaluatedCondition xmi:id="960" element="(SW PERIOD){ -&gt; T1}" value="false"/><type:DebugRuleElementMatch xmi:id="952" sofa="1" begin="5" end="7" time="0" baseCondition="960" conditions="" elements="964 985"/><type:DebugRuleElementMatches xmi:id="948" matches="952" element="(SW PERIOD){ -&gt; T1}" ruleAnchor="false"/><cas:View sofa="1" members="8 13 17 25 33 73 81 21 29 37 77 125 133 141 149 157 41 89 97 129 137 145 153 161 45 49 105 109 117 121 53 61 69 85 93 101 57 65 113 165 169 174 179 184 189 194 199 204 209 214 219 224 229 234 239 244 249 254 259 264 269 274 279 284 289 294 299 304 309 314 319 324 329 334 339 344 349 354 359 592 621 642 663 684 705 734 811 896 940 1020 1184 1706 1870 1950 2030 2110 2190 2270 2350 2536 2616 2696 2776 2856 2936 3016 3096 1100 1264 1348 1432 1516 1600 1786 2452 3198 3302 3353 905 3402 364 369 374 379 384 389 394 399 404 409 414 419 424 429 434 439 444 449 454 459 464 469 474 479 484 489 494 499 504 509 514 519 524 529 534 539 544 549 554 559 596 625 646 667 688 709 738 815 900"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleAction.ruta b/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleAction.ruta
deleted file mode 100644
index 3a71c9f..0000000
--- a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleAction.ruta
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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 uima.ruta.example;
-
-CW{ -> ExampleAction(1, 2, 3, 4, 5)} SW SW SW PERIOD;
-
-
-
diff --git a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBlock.ruta b/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBlock.ruta
deleted file mode 100644
index c8ea10e..0000000
--- a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBlock.ruta
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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 uima.ruta.example;
-
-DECLARE T1, T2, T3, T4;
-
-//This is a test.
-REVERSE Document{}{
-  (CW T3){-> T4};
-  (SW T2){-> T3};
-  (SW T1){-> T2};
-  (SW PERIOD){-> T1};
-}
diff --git a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBooleanFunction.ruta b/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBooleanFunction.ruta
deleted file mode 100644
index 1cd0c53..0000000
--- a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleBooleanFunction.ruta
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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 uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-Document{-IF(ExampleBooleanFunction(Document)) -> MARK(T1)};
-
-
-
diff --git a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleCondition.ruta b/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleCondition.ruta
deleted file mode 100644
index 07af8ad..0000000
--- a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleCondition.ruta
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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 uima.ruta.example;
-
-
-DECLARE T1;
-(NUM (PERIOD | SPECIAL) NUM (PERIOD | SPECIAL) NUM){OR(ExampleCondition("24.02.1981", "dd.mm.yyyy"),
-     ExampleCondition("1981/02/24", "yyyy/mm/dd")) -> MARK(T1)};
\ No newline at end of file
diff --git a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleNumberFunction.ruta b/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleNumberFunction.ruta
deleted file mode 100644
index 1d959cb..0000000
--- a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleNumberFunction.ruta
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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 uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-Document{IF((ExampleNumberFunction(Document) == 4)) -> MARK(T1)};
-
-
-
-
-
diff --git a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleStringFunction.ruta b/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleStringFunction.ruta
deleted file mode 100644
index 985adbb..0000000
--- a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleStringFunction.ruta
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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 uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-CAP{REGEXP(ExampleStringFunction(CW)) ->  MARK(T1)}; 
-
-
-
-
-
-
diff --git a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleTypeFunction.ruta b/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleTypeFunction.ruta
deleted file mode 100644
index e7ccac2..0000000
--- a/trunk/example-projects/ExtensionsExample/script/uima/ruta/example/ExampleTypeFunction.ruta
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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 uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-STRING typeString;
-CAP{-> MATCHEDTEXT(typeString), MARK(ExampleTypeFunction(typeString))};
-
-ExampleTypeFunction(typeString){-> MARK(T1)};
-
-(W PERIOD W PERIOD W PERIOD W PERIOD W PERIOD CAP){-> MATCHEDTEXT(typeString), MARK(ExampleTypeFunction(typeString))};
-
-ExampleTypeFunction(typeString){-> MARK(T2)};
-
-
-
-
-
-
diff --git a/trunk/example-projects/GermanNovels/.buildpath b/trunk/example-projects/GermanNovels/.buildpath
deleted file mode 100644
index a4d0028..0000000
--- a/trunk/example-projects/GermanNovels/.buildpath
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<buildpath>

-	<buildpathentry kind="src" path="script">

-		<attributes>

-			<attribute name="ruta" value="script"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="descriptor">

-		<attributes>

-			<attribute name="ruta" value="descriptor"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="resources">

-		<attributes>

-			<attribute name="ruta" value="resources"/>

-		</attributes>

-	</buildpathentry>

-</buildpath>

diff --git a/trunk/example-projects/GermanNovels/.classpath b/trunk/example-projects/GermanNovels/.classpath
deleted file mode 100644
index 0a1dadd..0000000
--- a/trunk/example-projects/GermanNovels/.classpath
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java">
-		<attributes>
-			<attribute name="optional" value="true"/>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
-		<attributes>
-			<attribute name="optional" value="true"/>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
-		<attributes>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
-		<attributes>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/trunk/example-projects/GermanNovels/.project b/trunk/example-projects/GermanNovels/.project
deleted file mode 100644
index c2e732d..0000000
--- a/trunk/example-projects/GermanNovels/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>GermanNovels</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.dltk.core.scriptbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.m2e.core.maven2Builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.m2e.core.maven2Nature</nature>
-		<nature>org.apache.uima.ruta.ide.nature</nature>
-	</natures>
-</projectDescription>
diff --git a/trunk/example-projects/GermanNovels/LICENSE b/trunk/example-projects/GermanNovels/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/trunk/example-projects/GermanNovels/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
diff --git a/trunk/example-projects/GermanNovels/NOTICE b/trunk/example-projects/GermanNovels/NOTICE
deleted file mode 100644
index 6f9e70b..0000000
--- a/trunk/example-projects/GermanNovels/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache UIMA Ruta example project: GermanNovels
-Copyright 2006, 2014 The Apache Software Foundation
-
-This product includes content developed at
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/trunk/example-projects/GermanNovels/descriptor/BasicEngine.xml b/trunk/example-projects/GermanNovels/descriptor/BasicEngine.xml
deleted file mode 100644
index 48e04b6..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/BasicEngine.xml
+++ /dev/null
@@ -1,279 +0,0 @@
-<?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.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>BasicEngine</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters searchStrategy="language_fallback">
-      <configurationParameter>
-        <name>seeders</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>debug</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalScripts</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>profile</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>debugWithMatches</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>statistics</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalEngines</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalExtensions</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>debugOnlyFor</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>scriptEncoding</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalEngineLoaders</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>resourcePaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>defaultFilteredTypes</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>mainScript</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>scriptPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>removeBasics</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>dynamicAnchoring</name>
-        <description>Activates dynamic anchoring (possible speed up).</description>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>greedyRuleElement</name>
-        <description>Activates greedy anchoring for rule elements.</description>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>greedyRule</name>
-        <description>Activates greedy anchoring for complete rules.</description>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>lowMemoryProfile</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>createdBy</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>simpleGreedyForComposed</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalUimafitEngines</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>strictImports</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>varNames</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>varValues</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>rules</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>debug</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>profile</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>debugWithMatches</name>
-        <value>
-          <boolean>true</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>defaultFilteredTypes</name>
-        <value>
-          <array>
-            <string>org.apache.uima.ruta.type.SPACE</string>
-            <string>org.apache.uima.ruta.type.BREAK</string>
-            <string>org.apache.uima.ruta.type.MARKUP</string>
-          </array>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>removeBasics</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>seeders</name>
-        <value>
-          <array>
-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-          </array>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>createdBy</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription>
-      <imports>
-        <import location="BasicTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities>
-      <priorityList>
-        <type>org.apache.uima.ruta.type.RutaFrame</type>
-        <type>uima.tcas.Annotation</type>
-        <type>org.apache.uima.ruta.type.RutaBasic</type>
-      </priorityList>
-    </typePriorities>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/BasicTypeSystem.xml b/trunk/example-projects/GermanNovels/descriptor/BasicTypeSystem.xml
deleted file mode 100644
index 911035a..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>BasicTypeSystem</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <imports>
-    <import location="InternalTypeSystem.xml"/>
-  </imports>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.ALL</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.ANY</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.MARKUP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.CW</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.W</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SW</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.PM</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.CAP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.COLON</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.PERIOD</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.QUESTION</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.COMMA</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SEMICOLON</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.WS</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.NUM</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SPECIAL</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.NBSP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SPACE</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.AMP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SPACE</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.BREAK</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Document</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.TokenSeed</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/GeneratedDKProCoreTypes.xml b/trunk/example-projects/GermanNovels/descriptor/GeneratedDKProCoreTypes.xml
deleted file mode 100644
index 64f2a40..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/GeneratedDKProCoreTypes.xml
+++ /dev/null
@@ -1,1136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <types>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.coref.type.CoreferenceChain</name>
-            <description>Marks the beginning of a chain.</description>
-            <supertypeName>uima.cas.AnnotationBase</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>first</name>
-                    <description>This is the first corefernce link in coreference chain</description>
-                    <rangeTypeName>de.tudarmstadt.ukp.dkpro.core.api.coref.type.CoreferenceLink</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.coref.type.CoreferenceLink</name>
-            <description>A link in the coreference chain.</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>next</name>
-                    <description>If there is one, it is the next coreference link to the current coreference link</description>
-                    <rangeTypeName>de.tudarmstadt.ukp.dkpro.core.api.coref.type.CoreferenceLink</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>referenceType</name>
-                    <description>The role or type which the covered text has in the coreference chain.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>referenceRelation</name>
-                    <description>The type of relation between this link and the next link in the chain.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.morph.Morpheme</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>morphTag</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.ADJ</name>
-            <description>Adjectives</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.ADV</name>
-            <description>Adverbs</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.ART</name>
-            <description>Determiners and articles</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.CARD</name>
-            <description>Numerals</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.CONJ</name>
-            <description>Conjunctions</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.N</name>
-            <description>Nouns</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.NN</name>
-            <description>Common noun</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.N</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.NP</name>
-            <description>Noun phrase</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.N</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.O</name>
-            <description>Catch-all for other categories such as abbreviations or foreign words</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</name>
-            <description>The part of speech of a word or a phrase.</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>PosValue</name>
-                    <description>The string representation of POS. Mostly it is the POS
-                        representation of the wrapped POS tagger.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.PP</name>
-            <description>Prepositions and postpositions</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.PR</name>
-            <description>Pronoun</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.PRT</name>
-            <description>Particles</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.PUNC</name>
-            <description>Punctuation marks</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.V</name>
-            <description>Verbs</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.AT</name>
-            <description>at-mention (indicates another user as a recipient of a tweet)</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.O</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.DM</name>
-            <description>discourse marker, indications of continuation of a message across multiple tweets</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.O</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.EMO</name>
-            <description>emoticon</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.O</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.HASH</name>
-            <description>Hashtag (indicates topic/category for tweet)</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.O</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.INT</name>
-            <description>proper noun + verbal</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.O</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.NNV</name>
-            <description>nominal + verbal</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.N</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.NPV</name>
-            <description>proper noun + verbal</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.N</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.tweet.URL</name>
-            <description>URL or email address</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.O</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData</name>
-            <description/>
-            <supertypeName>uima.tcas.DocumentAnnotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>documentTitle</name>
-                    <description>The human readable title of the document.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>documentId</name>
-                    <description>The id of the document.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>documentUri</name>
-                    <description>The URI of the document.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>collectionId</name>
-                    <description>The ID of the whole document collection.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>documentBaseUri</name>
-                    <description>Base URI of the document.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>isLastSegment</name>
-                    <description>CAS de-multipliers need to know whether a CAS is the
-						last multiplied segment.
-						Thus CAS multipliers should set this field to true for the last CAS
-						they produce.</description>
-                    <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.metadata.type.TagDescription</name>
-            <description>Description of an individual tag.</description>
-            <supertypeName>uima.cas.TOP</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>name</name>
-                    <description>The name of the tag.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.metadata.type.TagsetDescription</name>
-            <description>Information about a tagset (controlled vocabulary).</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>layer</name>
-                    <description>The layer to which the tagset applies. This is
-						typically the name of an UIMA type such as
-						"de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS".</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>name</name>
-                    <description>The name of the tagset.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>tags</name>
-                    <description>Descriptions of the tags belonging to this tagset.</description>
-                    <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-                    <elementType>de.tudarmstadt.ukp.dkpro.core.api.metadata.type.TagDescription</elementType>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Animal</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Cardinal</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.ContactInfo</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Date</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Disease</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Event</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Fac</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.FacDesc</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Game</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Gpe</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.GpeDesc</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Language</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Law</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Location</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Money</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>value</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Nationality</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Norp</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Ordinal</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.OrgDesc</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Organization</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.PerDesc</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Percent</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Person</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Plant</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Product</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.ProductDesc</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Quantity</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Substance</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.Time</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.ner.type.WorkOfArt</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Compound</name>
-            <description>This type represents a decompounding word, i.e.: flowerpot. Each Compound one have at least two Splits.</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>splits</name>
-                    <description>A word that can be decomposed into different parts.</description>
-                    <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-                    <elementType>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Split</elementType>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.CompoundPart</name>
-            <description>A CompoundPart represents one fragment from the compounding word. Besides that, it can store other CompoundParts if it can be split again. The way it stores a decompounding word represents a decompounding tree.</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Split</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Document</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Heading</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>value</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.LinkingMorpheme</name>
-            <description>This type represents a linking morpheme between two CompoundParts.</description>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Split</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.NGram</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>text</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Paragraph</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Sentence</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Split</name>
-            <description>This type represents a part of a decompounding word. A Split can be either a CompoundPart or a LinkingMorpheme.</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>splits</name>
-                    <description>Sub-splits of the current split.</description>
-                    <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-                    <elementType>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Split</elementType>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Stem</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>value</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.StopWord</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token</name>
-            <description>Token is one of the two types commonly produced by a segmenter (the other being {@link Sentence}). A Token usually represents a word, although it may be used to represent multiple tightly connected words (e.g. "New York") or parts of a word (e.g. the possessive "'s"). One may choose to split compound words into multiple tokens, e.g. ("CamelCase" -&gt; "Camel", "Case"; "Zauberstab" -&gt; "Zauber", "stab"). Most processing components operate on Tokens, usually within the limits of the surrounding Sentence. E.g. a part-of-speech tagger analyses each Token in a Sentence and assigns a part-of-speech to each Token.
-&lt;p&gt;</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>parent</name>
-                    <description>the parent of this token. This feature is meant to be used in when the token participates in a constituency parse and then refers to a constituent containing this token. The type of this feature is {@link Annotation} to avoid adding a dependency on the syntax API module.</description>
-                    <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>lemma</name>
-                    <description/>
-                    <rangeTypeName>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>stem</name>
-                    <description/>
-                    <rangeTypeName>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Stem</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>pos</name>
-                    <description/>
-                    <rangeTypeName>de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.semantics.type.SemanticArgument</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>role</name>
-                    <description>The role which the argument takes. The value depends on the theory being used, e.g. Arg0, Arg1, etc. or Buyer, Seller, etc.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.semantics.type.SemanticField</name>
-            <description>The semantic field a noun, verb or adjective belongs to. This is a coarse-grained semantic category and this information is available, e.g., in WordNet.</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>value</name>
-                    <description>The value or name of the semantic field. Examples of semantic field values are: location, artifact, event, communication, attribute</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.semantics.type.SemanticPredicate</name>
-            <description>One of the predicates of a sentence (often a main verb, but nouns and adjectives can also be predicates).</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>category</name>
-                    <description>A more detailed specification of the predicate type depending on the theory being used, e.g. a frame name.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>arguments</name>
-                    <description>The predicate's arguments.</description>
-                    <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-                    <elementType>de.tudarmstadt.ukp.dkpro.core.api.semantics.type.SemanticArgument</elementType>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.PennTree</name>
-            <description>The Penn Treebank-style phrase structure string</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>PennTree</name>
-                    <description>Contains a Penn Treebank-style representation of a tree.</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>TransformationNames</name>
-                    <description>The name(s) of the transformation(s) that have been performed on the PennTree</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.Tag</name>
-            <description>A multi purpose tag</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>value</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.ADJC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.ADVC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.CONCJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>chunkValue</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.INTJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.LST</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.NC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.O</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.PC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.PRT</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.VC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.ADJP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.ADVP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.CONJP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>constituentType</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>parent</name>
-                    <description>The parent constituent</description>
-                    <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>children</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-                    <elementType>uima.tcas.Annotation</elementType>
-                </featureDescription>
-                <featureDescription>
-                    <name>syntacticFunction</name>
-                    <description/>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.FRAG</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.INTJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.LST</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.NAC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.NP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.NX</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.PP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.PRP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.PRT</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.QP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.ROOT</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.RRC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.S</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.SBAR</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.SBARQ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.SINV</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.SQ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.UCP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.VP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.WHADJP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.WHADVP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.WHNP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.WHPP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.X</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.constituent.Constituent</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.ABBREV</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.ACOMP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.ADVCL</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.ADVMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.AGENT</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.AMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.APPOS</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.ATTR</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.AUX0</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.AUXPASS</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.CC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.CCOMP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.COMPLM</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.CONJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.CONJP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.CONJ_YET</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.COP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.CSUBJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.CSUBJPASS</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.DEP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.DET</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.DOBJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</name>
-            <description>A dependency relation between two tokens. The dependency annotation begin and end offsets correspond to those of the dependent.</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-            <features>
-                <featureDescription>
-                    <name>Governor</name>
-                    <description>The governor word</description>
-                    <rangeTypeName>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>Dependent</name>
-                    <description>The dependent word</description>
-                    <rangeTypeName>de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token</rangeTypeName>
-                </featureDescription>
-                <featureDescription>
-                    <name>DependencyType</name>
-                    <description>The dependency type</description>
-                    <rangeTypeName>uima.cas.String</rangeTypeName>
-                </featureDescription>
-            </features>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.EXPL</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.INFMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.IOBJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.MARK</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.MEASURE</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.MWE</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NEG</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NN</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NPADVMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NSUBJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NSUBJPASS</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NUM</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NUMBER</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PARATAXIS</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PARTMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PCOMP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.POBJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.POSS</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.POSSESSIVE</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PRECONJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PRED</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PREDET</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PREP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PREPC</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PRT</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PUNCT</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.PURPCL</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.QUANTMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.RCMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.REF</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.REL</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.TMOD</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.XCOMP</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.XSUBJ</name>
-            <description/>
-            <supertypeName>de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/InternalTypeSystem.xml b/trunk/example-projects/GermanNovels/descriptor/InternalTypeSystem.xml
deleted file mode 100644
index 5ff5b42..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/InternalTypeSystem.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>InternalTypeSystem</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaBasic</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>replacement</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaOptional</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>score</name>
-          <description/>
-          <rangeTypeName>uima.cas.Double</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>annotation</name>
-          <description/>
-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>
-      <features>
-        <featureDescription>
-          <name>applied</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>tried</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>rules</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>id</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>script</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>elements</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>matched</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>delegates</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>element</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>
-      <features>
-        <featureDescription>
-          <name>innerApply</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>baseCondition</name>
-          <description/>
-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>conditions</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>elements</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>
-          <multipleReferencesAllowed>false</multipleReferencesAllowed>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>matches</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>element</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>ruleAnchor</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaColoring</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>bgColor</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>targetType</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>fgColor</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>selected</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>element</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>value</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>conditions</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.FalsePositive</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>original</name>
-          <description/>
-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.FalseNegative</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>time</name>
-          <description/>
-          <rangeTypeName>uima.cas.Long</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaFrame</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Statistics</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>name</name>
-          <description/>
-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>total</name>
-          <description/>
-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>amount</name>
-          <description/>
-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>part</name>
-          <description/>
-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.TruePositive</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>rule</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>annotation</name>
-          <description/>
-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>script</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>id</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/DirectSpeechEngine.xml b/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/DirectSpeechEngine.xml
deleted file mode 100644
index d61e6c1..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/DirectSpeechEngine.xml
+++ /dev/null
@@ -1,341 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.NBSP</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>uima.ruta.example.DirectSpeech</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/workspace-ruta/GermanNovels/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/workspace-ruta/GermanNovels/target/classes</string>
-                        <string>D:/work/workspace-ruta/GermanNovels/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>D:\work\workspace-ruta\GermanNovels\resources</string>
-                        <string>D:\work\workspace-ruta\GermanNovels\target\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <name>uima.ruta.example.DirectSpeechTypeSystem</name>
-            <imports>
-                <import location="../../../BasicTypeSystem.xml"/>
-            </imports>
-            <types>
-                <typeDescription>
-                    <name>uima.ruta.example.DirectSpeech.DirectSpeech</name>
-                    <description>Type defined in uima.ruta.example.DirectSpeech</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.DirectSpeech.DirectSpeech</name>
-                    <description>Type defined in uima.ruta.example.DirectSpeech</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-            </types>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-            <capability>
-                <inputs>
-                    <type>uima.ruta.example.DirectSpeech.DirectSpeech</type>
-                </inputs>
-                <outputs>
-                    <type>uima.ruta.example.DirectSpeech.DirectSpeech</type>
-                </outputs>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/DirectSpeechTypeSystem.xml b/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/DirectSpeechTypeSystem.xml
deleted file mode 100644
index 7f9b89e..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/DirectSpeechTypeSystem.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>uima.ruta.example.DirectSpeechTypeSystem</name>
-    <imports>
-        <import location="../../../BasicTypeSystem.xml"/>
-    </imports>
-    <types>
-        <typeDescription>
-            <name>uima.ruta.example.DirectSpeech.DirectSpeech</name>
-            <description>Type defined in uima.ruta.example.DirectSpeech</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.DirectSpeech.DirectSpeech</name>
-            <description>Type defined in uima.ruta.example.DirectSpeech</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/MainEngine.xml b/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/MainEngine.xml
deleted file mode 100644
index 9a006dd..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/MainEngine.xml
+++ /dev/null
@@ -1,342 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varNames</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varValues</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>rules</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>Main</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/GermanNovels/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/GermanNovels/target/classes</string>
-                        <string>D:/work/ws-tutorial/GermanNovels/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>D:\work\ws-tutorial\GermanNovels\resources</string>
-                        <string>D:\work\ws-tutorial\GermanNovels\target\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array>
-                        <string>uima.ruta.example.Name</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array>
-                        <string>de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordSegmenter</string>
-                        <string>de.tudarmstadt.ukp.dkpro.core.treetagger.TreeTaggerPosLemmaTT4J</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <imports>
-                <import location="MainTypeSystem.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/MainTypeSystem.xml b/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/MainTypeSystem.xml
deleted file mode 100644
index 3682a25..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/MainTypeSystem.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>MainTypeSystem</name>
-    <imports>
-        <import location="..\..\..\BasicTypeSystem.xml"/>
-        <import location="..\..\..\GeneratedDKProCoreTypes.xml"/>
-        <import location="NameTypeSystem.xml"/>
-    </imports>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/NameEngine.xml b/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/NameEngine.xml
deleted file mode 100644
index 68be0a5..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/NameEngine.xml
+++ /dev/null
@@ -1,477 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.NBSP</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>uima.ruta.example.Name</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/workspace-ruta/GermanNovels/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/workspace-ruta/GermanNovels/target/classes</string>
-                        <string>D:/work/workspace-ruta/GermanNovels/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>D:\work\workspace-ruta\GermanNovels\resources</string>
-                        <string>D:\work\workspace-ruta\GermanNovels\target\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array>
-                        <string>uima.ruta.example.DirectSpeech</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <name>uima.ruta.example.NameTypeSystem</name>
-            <imports>
-                <import location="../../../BasicTypeSystem.xml"/>
-                <import location="../../../GeneratedDKProCoreTypes.xml"/>
-                <import location="DirectSpeechTypeSystem.xml"/>
-            </imports>
-            <types>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.PersName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.AddName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.FirstName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.LastName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.AnAnimal</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.RelativesTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.GeneralTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.MilitaryTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.NobleTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.Job</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.BodyPart</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.IMPhrase</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.PersName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.AddName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.FirstName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.LastName</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.AnAnimal</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.RelativesTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.GeneralTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.MilitaryTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.NobleTitle</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.Job</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.BodyPart</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>uima.ruta.example.Name.IMPhrase</name>
-                    <description>Type defined in uima.ruta.example.Name</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-            </types>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-            <capability>
-                <inputs>
-                    <type>uima.ruta.example.Name.PersName</type>
-                    <type>uima.ruta.example.Name.AddName</type>
-                    <type>uima.ruta.example.Name.FirstName</type>
-                    <type>uima.ruta.example.Name.LastName</type>
-                    <type>uima.ruta.example.Name.AnAnimal</type>
-                    <type>uima.ruta.example.Name.RelativesTitle</type>
-                    <type>uima.ruta.example.Name.GeneralTitle</type>
-                    <type>uima.ruta.example.Name.MilitaryTitle</type>
-                    <type>uima.ruta.example.Name.NobleTitle</type>
-                    <type>uima.ruta.example.Name.Job</type>
-                    <type>uima.ruta.example.Name.BodyPart</type>
-                    <type>uima.ruta.example.Name.IMPhrase</type>
-                </inputs>
-                <outputs>
-                    <type>uima.ruta.example.Name.PersName</type>
-                    <type>uima.ruta.example.Name.AddName</type>
-                    <type>uima.ruta.example.Name.FirstName</type>
-                    <type>uima.ruta.example.Name.LastName</type>
-                    <type>uima.ruta.example.Name.AnAnimal</type>
-                    <type>uima.ruta.example.Name.RelativesTitle</type>
-                    <type>uima.ruta.example.Name.GeneralTitle</type>
-                    <type>uima.ruta.example.Name.MilitaryTitle</type>
-                    <type>uima.ruta.example.Name.NobleTitle</type>
-                    <type>uima.ruta.example.Name.Job</type>
-                    <type>uima.ruta.example.Name.BodyPart</type>
-                    <type>uima.ruta.example.Name.IMPhrase</type>
-                </outputs>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/NameTypeSystem.xml b/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/NameTypeSystem.xml
deleted file mode 100644
index 4e8661c..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/uima/ruta/example/NameTypeSystem.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>uima.ruta.example.NameTypeSystem</name>
-    <imports>
-        <import location="../../../BasicTypeSystem.xml"/>
-        <import location="../../../GeneratedDKProCoreTypes.xml"/>
-        <import location="DirectSpeechTypeSystem.xml"/>
-    </imports>
-    <types>
-        <typeDescription>
-            <name>uima.ruta.example.Name.PersName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.AddName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.FirstName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.LastName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.AnAnimal</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.RelativesTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.GeneralTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.MilitaryTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.NobleTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.Job</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.BodyPart</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.IMPhrase</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.PersName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.AddName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.FirstName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.LastName</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.AnAnimal</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.RelativesTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.GeneralTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.MilitaryTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.NobleTitle</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.Job</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.BodyPart</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>uima.ruta.example.Name.IMPhrase</name>
-            <description>Type defined in uima.ruta.example.Name</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/AnnotationWriter.xml b/trunk/example-projects/GermanNovels/descriptor/utils/AnnotationWriter.xml
deleted file mode 100644
index a404fd9..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/AnnotationWriter.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.AnnotationWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>ReferenceSectionWriterDescriptor</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>Output</name>
-        <description>Location where the annotation is stored</description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>true</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>Encoding</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>Type</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>true</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>Output</name>
-        <value>
-          <string>/../output/</string>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>Type</name>
-        <value>
-          <string>uima.tcas.DocumentAnnotation</string>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>Encoding</name>
-        <value>
-          <string>UTF-8</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/Cutter.xml b/trunk/example-projects/GermanNovels/descriptor/utils/Cutter.xml
deleted file mode 100644
index a0543b7..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/Cutter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaCutter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>keep</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/HtmlAnnotator.xml b/trunk/example-projects/GermanNovels/descriptor/utils/HtmlAnnotator.xml
deleted file mode 100644
index f9ec9f4..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/HtmlAnnotator.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlAnnotator</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>PlainTextAnnotator</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>onlyContent</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>onlyContent</name>
-        <value>
-          <boolean>true</boolean>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription>
-      <imports>
-        <import location="HtmlTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/HtmlConverter.xml b/trunk/example-projects/GermanNovels/descriptor/utils/HtmlConverter.xml
deleted file mode 100644
index 59859b8..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/HtmlConverter.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?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.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlConverter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>newlineInducingTags</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>newlineInducingTagRegExp</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>replaceLinebreaks</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>linebreakReplacement</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>conversionPolicy</name>
-        <description>Either heuristic, explicit, or none.
-Defaults to heuristic.</description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>conversionPatterns</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>conversionReplacements</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    <configurationParameter>
-        <name>skipWhitespaces</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    <configurationParameter>
-        <name>processAll</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>skipWhitespaces</name>
-        <value>
-          <boolean>true</boolean>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/HtmlTypeSystem.xml b/trunk/example-projects/GermanNovels/descriptor/utils/HtmlTypeSystem.xml
deleted file mode 100644
index f88b4ab..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/HtmlTypeSystem.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>typeSystemDescriptor</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TAG</name>
-      <description></description>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>name</name>
-          <description></description>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>expandedOffsets</name>
-          <description></description>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>attributeName</name>
-          <description></description>
-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>
-          <multipleReferencesAllowed>false</multipleReferencesAllowed>
-        </featureDescription>
-        <featureDescription>
-          <name>attributeValue</name>
-          <description/>
-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>
-          <multipleReferencesAllowed>false</multipleReferencesAllowed>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.B</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H1</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H2</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H3</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H4</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H5</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H6</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.COMMENT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TITLE</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.I</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.U</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.BIG</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.SMALL</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.FONT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.A</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.HEAD</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.HTML</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.BODY</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.EM</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TABLE</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.DIV</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.SPAN</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.UL</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.OL</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.P</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.LI</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TBODY</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TD</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TR</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TH</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.IMG</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.STYLE</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.SCRIPT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.LINK</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.INPUT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.FORM</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.META</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.BR</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.REMARK</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-      <features>
-        <featureDescription>
-          <name>comment</name>
-          <description></description>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/Modifier.xml b/trunk/example-projects/GermanNovels/descriptor/utils/Modifier.xml
deleted file mode 100644
index c3d40d0..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/Modifier.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>Modifier</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>styleMap</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputLocation</name>
-        <description></description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>outputView</name>
-        <value>
-          <string>modified</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <outputSofas>
-          <sofaName>modified</sofaName>
-        </outputSofas>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/PlainTextAnnotator.xml b/trunk/example-projects/GermanNovels/descriptor/utils/PlainTextAnnotator.xml
deleted file mode 100644
index 7ea5a72..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/PlainTextAnnotator.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.PlainTextAnnotator</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>PlainTextAnnotator</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters/>
-    <configurationParameterSettings/>
-    <typeSystemDescription>
-      <imports>
-        <import location="PlainTextTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/PlainTextTypeSystem.xml b/trunk/example-projects/GermanNovels/descriptor/utils/PlainTextTypeSystem.xml
deleted file mode 100644
index 17b579c..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/PlainTextTypeSystem.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>PlainTextTypeSystem</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Line</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Paragraph</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.WSLine</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EmptyLine</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.EmptyLine</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.AnyLine</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/SourceDocumentInformation.xml b/trunk/example-projects/GermanNovels/descriptor/utils/SourceDocumentInformation.xml
deleted file mode 100644
index 8322d25..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/SourceDocumentInformation.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-   
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-	<name>org.apache.uima.examples.SourceDocumentInformation</name>
-	<description>Defines a type for storing information about the original source document from which the current CAS was initialized</description>
-	<version>1.0</version>
-	<vendor>The Apache Software Foundation</vendor>
-	<types>
-		<typeDescription>
-			<name>org.apache.uima.examples.SourceDocumentInformation</name>
-			<description>Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.</description>
-			<supertypeName>uima.tcas.Annotation</supertypeName>
-			<features>
-				<featureDescription>
-					<name>uri</name>
-					<description>URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)</description>
-					<rangeTypeName>uima.cas.String</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>offsetInSource</name>
-					<description>Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>documentSize</name>
-					<description>Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-				  <name>lastSegment</name>
-				  <description>For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. </description>
-			      <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-			    </featureDescription>				
-			</features>
-		</typeDescription>
-	</types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/StyleMapCreator.xml b/trunk/example-projects/GermanNovels/descriptor/utils/StyleMapCreator.xml
deleted file mode 100644
index 43f1b5c..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/StyleMapCreator.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.StyleMapCreator</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>ReferenceSectionWriterDescriptor</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>styleMap</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/ViewWriter.xml b/trunk/example-projects/GermanNovels/descriptor/utils/ViewWriter.xml
deleted file mode 100644
index 2b3b472..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/ViewWriter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>output</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/descriptor/utils/XMIWriter.xml b/trunk/example-projects/GermanNovels/descriptor/utils/XMIWriter.xml
deleted file mode 100644
index 9aafb29..0000000
--- a/trunk/example-projects/GermanNovels/descriptor/utils/XMIWriter.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.XMIWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>ReferenceSectionWriterDescriptor</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>Output</name>
-        <description>Location where the xmi is stored</description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>true</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>Output</name>
-        <value>
-          <string>/../output/</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/GermanNovels/pom.xml b/trunk/example-projects/GermanNovels/pom.xml
deleted file mode 100644
index 4d6b822..0000000
--- a/trunk/example-projects/GermanNovels/pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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.    
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.apache.uima</groupId>
-	<artifactId>ruta-example-german-novels</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
-	<dependencies>
-		<dependency>
-			<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
-			<artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-asl</artifactId>
-			<version>1.5.0</version>
-		</dependency>
-		<dependency>
-			<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
-			<artifactId>de.tudarmstadt.ukp.dkpro.core.stanfordnlp-gpl</artifactId>
-			<version>1.5.0</version>
-		</dependency>
-	</dependencies>
-	<repositories>
-		<repository>
-			<id>ukp-oss-model-releases</id>
-			<url>http://zoidberg.ukp.informatik.tu-darmstadt.de/artifactory/public-model-releases-local</url>
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-		</repository>
-	</repositories>
-</project>
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/Animals.txt b/trunk/example-projects/GermanNovels/resources/Animals.txt
deleted file mode 100644
index cf3324f..0000000
--- a/trunk/example-projects/GermanNovels/resources/Animals.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Hase
-Hase
-Hund
-Hündin
-Kaninchen
-Kater
-Katze
-Maus
-Papagei
-Wellensittich
-Vogel
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/FirstNames.txt b/trunk/example-projects/GermanNovels/resources/FirstNames.txt
deleted file mode 100644
index 9025ed9..0000000
--- a/trunk/example-projects/GermanNovels/resources/FirstNames.txt
+++ /dev/null
@@ -1,13293 +0,0 @@
-Aaron
-Aaron
-Abraham
-Achi
-Achim
-Adalbert
-Adalberta
-Adalia
-Adam
-Adama
-Adelbert
-Adele
-Adelfried
-Adelgard
-Adelgund
-Adelgunde
-Adelhaid
-Adelheid
-Adelheit
-Adelia
-Adelina
-Adelinde
-Adeline
-Adelmar
-Adeltraud
-Adi
-Adolf
-Adrian
-Adriana
-Adriane
-Adrianna
-Adrianne
-Adriano
-Adrianus
-Afanasi
-Afanasy
-Aganeta
-Agata
-Agate
-Agatha
-Agathe
-Agnes
-Agnetha
-Agnis
-Agustin
-Agustina
-Aharon
-Ahlbert
-Ahlrich
-Aida
-Aila
-Alain
-Alan
-Alba
-Albert
-Alberta
-Albertina
-Albertine
-Albrecht
-Aldina
-Aldine
-Alea
-Aleksandar
-Aleksander
-Aleksandra
-Alena
-Alenka
-Alessandra
-Alessandro
-Alex
-Alexa
-Alexander
-Alexandra
-Alf
-Alfons
-Alfred
-Alfrid
-Alfried
-Alida
-Alma
-Almida
-Almin
-Alois
-Altfried
-Amadeus
-Amanda
-Amber
-Ameli
-Amelia
-Amin
-Amina
-Amir
-Ana
-Anabel
-Anastasia
-Anca
-Andi
-Andre
-Andrea
-Andreas
-Andrejewitsch
-Aneliese
-Anellise
-Anemarie
-Anette
-Angela
-Angelica
-Angelika
-Angelina
-Angeline
-Angelique
-Angelita
-Angi
-Angie
-Angrid
-Anica
-Anika
-Anissa
-Anita
-Anja
-Anka
-Anke
-Anken
-Ann
-Anna
-Annabel
-Annabell
-Annabelle
-Annagret
-Annalies
-Annaliese
-Annalisa
-Annalise
-Annamari
-Annamaria
-Annamarie
-Anne
-Annegret
-Annegrete
-Annekathrin
-Annekatrin
-Anneli
-Annelie
-Annelies
-Anneliese
-Annelis
-Annelise
-Annelore
-Annelotte
-Annemargreth
-Annemari
-Annemarie
-Annemie
-Annemone
-Annerose
-Annet
-Annete
-Annett
-Annetta
-Annette
-Anngret
-Anngrit
-Annhild
-Anni
-Annica
-Annick
-Annie
-Annik
-Annika
-Annina
-Annita
-Annja
-Annlies
-Ansfried
-Ansgar
-Antchen
-Anthia
-Anthonia
-Anthonius
-Anthony
-Antia
-Antina
-Antine
-Antje
-Antke
-Anton
-Antonette
-Antonia
-Antonietta
-Antoniette
-Antonina
-Antonios
-Antonius
-Antony
-Anya
-Anyka
-Arabella
-Arabelle
-Araceli
-Arend
-Arendt
-Arent
-Ari
-Ariana
-Ariane
-Arianna
-Arianne
-Ariel
-Ariela
-Armanda
-Armando
-Armelia
-Armgard
-Armin
-Armina
-Arnd
-Arndt
-Arne
-Arner
-Arnfred
-Arnfrid
-Arnfried
-Arnhild
-Arnhold
-Arni
-Arnica
-Arnika
-Arno
-Arnold
-Arnost
-Arnsgar
-Arnt
-Aron
-Arthur
-Artur
-Arvid
-Astrid
-August
-Augusta
-Auguste
-Augustin
-Augustina
-Augustine
-Augustinus
-Aurelia
-Aurelian
-Austin
-Axel
-Ayda
-Baat
-Baba
-Babaca
-Babayigit
-Babet
-Babett
-Babetta
-Babette
-Babioch
-Babo
-Babs
-Bacaksiz
-Bacik
-Back
-Backa
-Badia
-Badiye
-Baerbel
-Bagajeta
-Bagdat
-Baha
-Bahaddin
-Bahadir
-Bahaeddin
-Bahar
-Bahattin
-Bahir
-Bahmann
-Bahne
-Bahram
-Bahri
-Bahriye
-Bahsi
-Bahtijar
-Bahtiyar
-Bajran
-Bajrovic
-Bakal
-Baki
-Bakir
-Bakirhan
-Bakiye
-Bakkal
-Bala
-Balaban
-Balabey
-Balbina
-Baldassare
-Baldo
-Baldovino
-Balduin
-Baldur
-Bali
-Balic
-Balint
-Balki
-Balta
-Baltasar
-Baltes
-Balthasar
-Balz
-Balzer
-Bani
-Bano
-Banu
-Baptist
-Bara
-Barak
-Baratali
-Barb
-Barbara
-Barbaros
-Barber
-Barbera
-Barbi
-Barblin
-Barbra
-Bard
-Bardo
-Bardolf
-Barend
-Baria
-Barije
-Barin
-Baris
-Bark
-Barlam
-Barlas
-Barna
-Barnabas
-Barnie
-Barnim
-Barry
-Barsaum
-Barsovm
-Bart
-Bartel
-Barth
-Barthel
-Bartho
-Barthold
-Bartholomeus
-Bartolo
-Bartolome
-Bartolomeo
-Barzan
-Bas
-Basak
-Basal
-Basar
-Basaran
-Basat
-Bascha
-Baschir
-Basharat
-Bashir
-Basia
-Basil
-Basile
-Basilio
-Basilius
-Basim
-Basir
-Baskurt
-Basri
-Bassam
-Bassem
-Basso
-Bastian
-Bati
-Battal
-Battista
-Batu
-Bauke
-Bavaria
-Bayar
-Bayat
-Baybars
-Baycan
-Baynam
-Bayrak
-Bayram
-Bayran
-Baysal
-Bazil
-Bea
-Beat
-Beata
-Beate
-Beatric
-Beatrice
-Beatrix
-Beatrixe
-Beatriz
-Beauty
-Bebe
-Bechthold
-Becirovic
-Beck
-Becky
-Beda
-Bede
-Bedi
-Bedia
-Bedii
-Bedir
-Bedirhan
-Bedja
-Bedrettin
-Bedri
-Bedriye
-Bedzet
-Beek
-Beganovic
-Begi
-Begic
-Begonia
-Begzada
-Behcet
-Behice
-Behiye
-Behnam
-Behnan
-Behram
-Behrend
-Behrija
-Behrooz
-Behrouz
-Behzat
-Beier
-Bejtula
-Bejtush
-Bekdemir
-Beker
-Beki
-Bekir
-Bektas
-Bel
-Bela
-Bele
-Belen
-Belesoglu
-Belgien
-Belgin
-Belgizar
-Belinda
-Belkis
-Bella
-Belle
-Belma
-Belsin
-Ben
-Benaissa
-Benamar
-Bendix
-Bendrick
-Benedetta
-Benedetto
-Benedick
-Benedict
-Benedicta
-Benedictus
-Benedik
-Benedikt
-Benedikta
-Benedikte
-Benedykt
-Bengt
-Bengu
-Beniamino
-Benigno
-Benina
-Benita
-Benito
-Benjamin
-Benjamina
-Benli
-Benne
-Bennet
-Benni
-Benno
-Benny
-Benon
-Benoni
-Benson
-Bent
-Bente
-Benthe
-Bentz
-Benyebka
-Benz
-Beppo
-Ber
-Berardo
-Berat
-Berbane
-Berbel
-Berbert
-Berc
-Bercin
-Berd
-Bereket
-Bereli
-Beren
-Berend
-Berendina
-Berendine
-Berendje
-Berenike
-Bergisa
-Bergit
-Berhard
-Berin
-Beringer
-Berit
-Berkan
-Berkant
-Berkel
-Berkras
-Berlind
-Berlinde
-Berna
-Bernabe
-Bernadette
-Bernadina
-Bernadine
-Bernard
-Bernarda
-Bernardine
-Bernardino
-Bernardo
-Bernardus
-Bernat
-Bernd
-Berndm
-Berndt
-Bernfried
-Bernhadine
-Bernhard
-Bernhardiene
-Bernhardin
-Bernhardine
-Bernhardt
-Bernhild
-Bernhilde
-Bernhold
-Berni
-Bernis
-Bernita
-Berno
-Bernold
-Bernt
-Bernward
-Bero
-Berold
-Berry
-Bersa
-Bert
-Berta
-Bertan
-Berte
-Bertel
-Berth
-Bertha
-Berthe
-Berthild
-Berthilde
-Berthold
-Berti
-Bertil
-Bertild
-Bertin
-Bertina
-Bertine
-Bertino
-Bertl
-Bertold
-Bertolt
-Bertram
-Bertrand
-Bertus
-Bertwin
-Berty
-Beryl
-Beryll
-Besa
-Beser
-Besim
-Besime
-Besimi
-Besir
-Besje
-Bessy
-Bestami
-Beta
-Beth
-Bethany
-Bethel
-Bethesda
-Bethleem
-Beti
-Betin
-Betina
-Bettal
-Betti
-Bettina
-Bettine
-Betty
-Betz
-Beujconin
-Beuno
-Bevyll
-Beyer
-Beyhan
-Beytullah
-Bia
-Biagio
-Bianca
-Bianco
-Bianka
-Bibi
-Bibiana
-Bibiane
-Bicon
-Bie
-Biem
-Biggi
-Bijan
-Bike
-Bilal
-Bilant
-Bilen
-Bilge
-Bilger
-Bilgi
-Bilgin
-Bilginer
-Bilha
-Bilhan
-Biljana
-Bill
-Bille
-Billie
-Billy
-Bilsen
-Binali
-Binat
-Bing
-Binia
-Binja
-Binnaz
-Binno
-Bino
-Binyamin
-Bircan
-Birdal
-Birga
-Birge
-Birger
-Birgid
-Birgit
-Birgita
-Birgitt
-Birgitta
-Birgitte
-Birgul
-Birigit
-Birk
-Birka
-Birke
-Birkhild
-Birko
-Birol
-Birsel
-Birsen
-Birte
-Birthe
-Bisar
-Biserka
-Bisrat
-Bital
-Biyilki
-Bjarne
-Bjoern
-Björn
-Blanca
-Blanco
-Blanda
-Blandina
-Blandine
-Blank
-Blanka
-Blas
-Blasius
-Blazej
-Blekic
-Bliek
-Boa
-Boas
-Bob
-Bobbie
-Bobby
-Bode
-Bodia
-Bodil
-Bodo
-Bogdan
-Bogislav
-Bogomir
-Bogos
-Bogumil
-Bogumila
-Boguslaw
-Bohattin
-Bohdan
-Bohn
-Boi
-Boika
-Bojan
-Bojana
-Boje
-Bojric
-Bojung
-Bolat
-Boleslaw
-Bolkan
-Bolko
-Bolten
-Bon
-Bona
-Bondraham
-Boniface
-Bonifacio
-Bonita
-Bonke
-Bora
-Boran
-Borchard
-Borg
-Borges
-Borghild
-Borgitta
-Boris
-Borislav
-Bork
-Born
-Borris
-Bort
-Bortolomej
-Bosal
-Bosiljka
-Bosse
-Bostijan
-Bote
-Botho
-Boto
-Bouden
-Boudjemaa
-Bouhadou
-Boulkine
-Boumaftah
-Boussouf
-Bouziri
-Boy
-Boydas
-Boye
-Bozali
-Bozam
-Bozdemir
-Bozena
-Bozkurt
-Bozkus
-Bozo
-Braco
-Brad
-Bradley
-Branca
-Branco
-Branislav
-Branka
-Branko
-Braun
-Brecht
-Bredo
-Bregitta
-Brenda
-Brgitte
-Brian
-Brice
-Brieta
-Briga
-Brigid
-Brigida
-Brigit
-Brigite
-Brigitt
-Brigitta
-Brigitte
-Brigitteg
-Brik
-Brinkman
-Brit
-Brita
-Britt
-Britta
-Brix
-Broder
-Broer
-Bronislaus
-Bronislaw
-Bronislawa
-Brown
-Bruce
-Bruina
-Brun
-Bruna
-Brune
-Brunetto
-Brunhild
-Brunhilde
-Brunhilt
-Bruni
-Bruno
-Brunold
-Bryan
-Bryce
-Brygida
-Brynja
-Buck
-Budak
-Budolf
-Buelent
-Buhak
-Buijs
-Bukowsli
-Bulent
-Bully
-Bulut
-Burak
-Buran
-Burchard
-Burckhard
-Burckhardt
-Bureau
-Burg
-Burga
-Burgel
-Burger
-Burghard
-Burghardt
-Burghart
-Burghild
-Burgl
-Burglind
-Burglinde
-Burgunda
-Burgunde
-Burhan
-Burhanettin
-Burhard
-Burk
-Burkard
-Burkardt
-Burke
-Burkhard
-Burkhardt
-Burkhart
-Busra
-Busso
-But
-Byron
-Bärbel
-Bärbl
-Cabar
-Cabbor
-Cabir
-Cabuk
-Cacal
-Caecilia
-Caecilie
-Caesar
-Cafer
-Cagatay
-Caglar
-Caglayan
-Cahide
-Cahil
-Cahir
-Cahit
-Cai
-Cain
-Caius
-Cajetan
-Cakar
-Cakat
-Cakin
-Cakir
-Cakmak
-Calagero
-Calamon
-Calice
-California
-Calik
-Calin
-Calla
-Calli
-Calman
-Calogera
-Calogero
-Calvina
-Cam
-Camal
-Camci
-Camdzic
-Camelia
-Camer
-Camiel
-Camil
-Camila
-Camill
-Camilla
-Camille
-Camillo
-Camilo
-Campo
-Can
-Canaka
-Canan
-Canay
-Canbay
-Candan
-Candar
-Candemir
-Candide
-Candido
-Candlemir
-Candy
-Cane
-Caner
-Canio
-Cankoy
-Cansel
-Canseven
-Cansu
-Capan
-Capelja
-Capraz
-Caprice
-Cara
-Cardia
-Cardoso
-Carel
-Caren
-Caret
-Carin
-Carina
-Carine
-Carl
-Carla
-Carlh
-Carlo
-Carlos
-Carlota
-Carlote
-Carlotta
-Carls
-Carlton
-Carman
-Carmela
-Carmelia
-Carmelina
-Carmelo
-Carmen
-Carmine
-Carol
-Carola
-Carole
-Carolin
-Carolina
-Caroline
-Carolus
-Carolyn
-Carrol
-Carry
-Carsta
-Carsten
-Carstens
-Cary
-Casilda
-Casimir
-Casimiro
-Caspar
-Cassandra
-Cassian
-Cassius
-Castillejo
-Casto
-Castro
-Cataldo
-Catalina
-Catarina
-Catello
-Catena
-Caterina
-Catharina
-Catharine
-Catherina
-Catherine
-Cathleen
-Cathrin
-Cathrine
-Cathy
-Cati
-Catin
-Catinka
-Catja
-Catrin
-Catrina
-Caty
-Cavat
-Cavidan
-Cavit
-Cavus
-Cay
-Cayo
-Cazim
-Cazip
-Cebe
-Cebrail
-Cecil
-Cecile
-Cecilia
-Cecilie
-Cecilio
-Cecylia
-Cedide
-Cedrick
-Cefin
-Cekic
-Celai
-Celal
-Celalettin
-Celali
-Celattin
-Celebi
-Celenk
-Celeste
-Celestin
-Celestina
-Celestine
-Celestino
-Celia
-Celie
-Celik
-Celiktas
-Celil
-Celina
-Celine
-Celio
-Celso
-Cem
-Cemal
-Cemalettin
-Cemil
-Cemile
-Cenan
-Cenap
-Cengez
-Cengis
-Cengiz
-Cengizhan
-Cengrz
-Cennet
-Centa
-Cenzia
-Cerat
-Cerdet
-Ceril
-Cerit
-Cerkez
-Cernile
-Cerstin
-Cesar
-Cesare
-Cesareo
-Cesario
-Cesim
-Cetal
-Cetin
-Cetinkaya
-Cettina
-Ceudet
-Cevahir
-Cevat
-Cevdat
-Cevdet
-Cevher
-Cevik
-Ceyda
-Ceyhan
-Ceyla
-Ceylan
-Ceynal
-Cezar
-Cezary
-Cezmi
-Chad
-Chadhry
-Chaib
-Chaim
-Cham
-Chamiran
-Chamsiddin
-Chana
-Chander
-Chandra
-Chantal
-Charalabos
-Charalambos
-Charalampos
-Chariklia
-Charilaos
-Charis
-Charistel
-Charitas
-Charito
-Chariton
-Charity
-Charlene
-Charles
-Charlette
-Charli
-Charlie
-Charlott
-Charlotte
-Charly
-Chaudhry
-Chaya
-Cheander
-Cherima
-Cherine
-Cheryl
-Chiara
-Chien
-Chihab
-Chima
-Chleo
-Chris
-Chrisostomos
-Chrissi
-Chrissoula
-Christa
-Christal
-Christanta
-Christel
-Christelle
-Christer
-Christfried
-Christhart
-Christia
-Christiaan
-Christian
-Christiana
-Christiane
-Christiene
-Christilan
-Christin
-Christina
-Christine
-Christioph
-Christjan
-Christl
-Christmann
-Christo
-Christof
-Christofer
-Christoff
-Christoffer
-Christofoor
-Christoph
-Christophe
-Christopher
-Christore
-Christos
-Christov
-Christus
-Christy
-Chrstian
-Chrstoph
-Chrysostomos
-Ciadem
-Cicek
-Ciceron
-Cicmir
-Cidik
-Cigdem
-Ciggieri
-Cigtem
-Cihan
-Cihanger
-Cihangir
-Cihangiv
-Cihani
-Cihat
-Cikla
-Cilem
-Cilli
-Cilly
-Cimen
-Cinar
-Cindo
-Cindy
-Cingil
-Cinna
-Cino
-Cinthia
-Cinzia
-Ciprian
-Cipriano
-Cira
-Ciray
-Circi
-Circis
-Ciria
-Ciriaki
-Ciril
-Cirillo
-Cirino
-Ciro
-Cisse
-Cissy
-Cita
-Civan
-Civildak
-Claas
-Claes
-Clair
-Claire
-Clara
-Clare
-Clarissa
-Clark
-Clas
-Clau
-Claude
-Claudette
-Claudia
-Claudine
-Claudio
-Claudius
-Claus
-Clauspeter
-Clea
-Clelia
-Clemen
-Clemens
-Clement
-Clemente
-Clementina
-Clementine
-Cleo
-Cliff
-Clifford
-Clifton
-Clint
-Clinton
-Clio
-Clirim
-Clito
-Clive
-Clivia
-Clodoaldo
-Clorinda
-Clothilde
-Clovis
-Clyde
-Coban
-Cobus
-Cohen
-Colak
-Coleta
-Coletta
-Colette
-Colin
-Collart
-Collin
-Colman
-Colo
-Colomba
-Colombo
-Comchita
-Comfort
-Community
-Como
-Concepcion
-Concetta
-Concettina
-Concetto
-Concha
-Conchita
-Connection
-Conni
-Connie
-Conny
-Cono
-Conon
-Conrad
-Conrada
-Consiglio
-Consolata
-Constance
-Constant
-Constante
-Constantin
-Constantina
-Constantine
-Constantino
-Constantinos
-Constantinus
-Constanza
-Constanze
-Consuelo
-Coob
-Coos
-Cora
-Coralie
-Corc
-Cord
-Cordelia
-Cordula
-Corena
-Corey
-Corina
-Corinna
-Corinne
-Corinto
-Cornel
-Cornelia
-Cornelie
-Cornelis
-Cornelius
-Cornell
-Cornella
-Cornna
-Corny
-Corona
-Corrado
-Corrie
-Corry
-Corso
-Corvin
-Cosar
-Cosima
-Cosimo
-Cosio
-Coskum
-Coskun
-Cosmas
-Cosme
-Cosmea
-Cosmo
-Cosqun
-Costa
-Costante
-Costantino
-Costanza
-Courtney
-Coustantin
-Craig
-Creszentia
-Crispino
-Cristiana
-Cristina
-Cristine
-Cristobal
-Cristos
-Crocifissa
-Crysanthos
-Csaba
-Csilla
-Cubana
-Cudi
-Cuffaro
-Cuma
-Cumali
-Cumhur
-Cuno
-Cura
-Curd
-Curia
-Curt
-Curtis
-Cynthia
-Cyprian
-Cyria
-Cyriakus
-Cyril
-Cyrill
-Cyrus
-Czeslaw
-Czeslawa
-Dado
-Dafni
-Dag
-Daghan
-Dagistan
-Dagmar
-Dagmara
-Dagmer
-Dagmunde
-Dagna
-Dagnie
-Dagny
-Dagobert
-Dahho
-Dahlia
-Daia
-Daimond
-Daisy
-Dajana
-Dale
-Dali
-Dalia
-Dalibor
-Dalila
-Dalipi
-Daller
-Damar
-Damara
-Damaris
-Damasus
-Damian
-Damiano
-Damianos
-Damjan
-Dan
-Dana
-Danah
-Dane
-Danela
-Danelo
-Danho
-Dani
-Dania
-Danica
-Daniel
-Daniela
-Daniele
-Daniella
-Danielle
-Danijela
-Danila
-Danilo
-Danis
-Danja
-Danjana
-Danka
-Dankert
-Dankha
-Dankmar
-Danko
-Dankward
-Dankwart
-Danlahiri
-Dannie
-Danny
-Dante
-Danuet
-Danut
-Danuta
-Dany
-Daoud
-Daphne
-Darala
-Dare
-Dari
-Daria
-Darinka
-Dario
-Daris
-Darius
-Dariusch
-Dariusz
-Dariuá
-Darja
-Darko
-Darnell
-Darrell
-Darren
-Darwin
-Dary
-Darya
-Daryan
-Dascha
-Dasikan
-Daud
-Daut
-Dave
-Daver
-David
-Davide
-Davis
-Davud
-Davut
-Dawid
-Dawn
-Day
-Daya
-Dayana
-Dea
-Dean
-Deane
-Debby
-Debora
-Deborah
-Dede
-Dedo
-Deen
-Degenhard
-Degenhardt
-Degenhart
-Dehar
-Deia
-Deik
-Deirdre
-Dejan
-Delan
-Delbert
-Deli
-Delia
-Delice
-Delius
-Della
-Delphina
-Delphine
-Delta
-Demeke
-Demet
-Demeter
-Demetri
-Demetrius
-Demir
-Demiran
-Demiray
-Demirbag
-Demircan
-Demirci
-Demirel
-Demirezen
-Demirhan
-Demirkaya
-Demirkol
-Demirok
-Demirova
-Demirtas
-Denho
-Denis
-Denise
-Deniz
-Denni
-Dennie
-Dennis
-Denny
-Dennys
-Derakhshan
-Derckina
-Dere
-Derek
-Deri
-Derick
-Derk
-Dern
-Dernis
-Derrick
-Derrik
-Dervis
-Derya
-Des
-Desiderio
-Desiree
-Desmond
-Despina
-Dessenderius
-Detert
-Dethard
-Dethart
-Dethlef
-Detlef
-Detlev
-Detmar
-Detta
-Dette
-Detthold
-Dettmar
-Dettmer
-Dev
-Devlet
-Devrim
-Dexter
-Deze
-Dezider
-Dhia
-Dia
-Diagio
-Diamantis
-Diana
-Diane
-Dianne
-Diaz
-Diba
-Dick
-Dickson
-Dicky
-Diddo
-Didier
-Dido
-Diederich
-Diederike
-Diedrich
-Diego
-Diel
-Diem
-Diemo
-Diemut
-Dierk
-Dieta
-Dietbert
-Dietburg
-Dieter
-Dieterfritz
-Dietfried
-Dietgard
-Dietger
-Diethard
-Diethardt
-Dietheim
-Diethelm
-Diether
-Diethild
-Dietlind
-Dietlinde
-Dietloff
-Dietmar
-Dietolf
-Dietrich
-Dietsch
-Dietwald
-Dietward
-Dietwart
-Dietz
-Dieudonne
-Diez
-Digna
-Dijana
-Dik
-Dika
-Diken
-Dikran
-Diktas
-Diku
-Dilahni
-Dilaver
-Dilber
-Dildar
-Dilek
-Dilmac
-Dilsad
-Dilyar
-Dimas
-Dimitra
-Dimitri
-Dimitrij
-Dimitrije
-Dimitrios
-Dimitrius
-Dimitros
-Dimo
-Dimosthenis
-Dina
-Dinah
-Dinc
-Dincer
-Dine
-Dingeman
-Dini
-Dino
-Diogenes
-Diogenis
-Dion
-Dionigi
-Dionisia
-Dionisio
-Dionisios
-Dionys
-Dionysius
-Dirawi
-Dirck
-Dirdane
-Dirk
-Disa
-Dita
-Ditha
-Ditmar
-Ditta
-Ditte
-Dittmar
-Dittmer
-Diva
-Diyap
-Djahangir
-Djalal
-Djamchid
-Djarad
-Djavad
-Djawad
-Djordje
-Djura
-Djurdja
-Dlavid
-Dmitri
-Dobrila
-Dodo
-Doerte
-Doerthe
-Dogan
-Dogru
-Dogum
-Doina
-Dolf
-Doll
-Dolores
-Dolu
-Domenic
-Domenica
-Domenico
-Domenik
-Domenika
-Domenique
-Domicio
-Domingo
-Domingos
-Domini
-Dominic
-Dominica
-Dominicus
-Dominik
-Dominika
-Dominike
-Dominikus
-Dominique
-Domitila
-Domna
-Domnio
-Don
-Dona
-Donald
-Donaldo
-Donar
-Donat
-Donata
-Donatella
-Donatien
-Donato
-Donatus
-Dondu
-Dong
-Donia
-Donica
-Doniela
-Donka
-Donkor
-Donna
-Donovan
-Dook
-Doortje
-Dora
-Dorcas
-Dordie
-Dore
-Doreen
-Dorel
-Dorett
-Dorette
-Dori
-Doriana
-Dorina
-Dorinda
-Doris
-Dorit
-Dorita
-Dorith
-Dorkas
-Dorle
-Dorli
-Dorly
-Doro
-Dorota
-Dorothe
-Dorothea
-Dorotheal
-Dorothee
-Dorothy
-Dorrit
-Dorte
-Dorthe
-Dorthea
-Doski
-Doug
-Douglas
-Doxakis
-Doza
-Draga
-Dragan
-Dragana
-Dragi
-Dragica
-Draginja
-Drago
-Dragojla
-Dragoliub
-Dragoljub
-Dragomir
-Dragutin
-Drahsan
-Dre
-Dres
-Dresel
-Drew
-Driek
-Drik
-Dris
-Driss
-Droste
-Druda
-Dtlef
-Duane
-Dubravka
-Duc
-Dude
-Dudu
-Dueter
-Dula
-Dulce
-Duman
-Dumat
-Duncan
-Dunia
-Dunja
-Durak
-Dural
-Durali
-Duran
-Durbaba
-Durck
-Durdu
-Durhan
-Duri
-Durkadi
-Durkadin
-Durmus
-Duro
-Dursum
-Dursun
-Duru
-Duruk
-Durun
-Dusan
-Dusanca
-Dusanka
-Dusic
-Dusica
-Dutmus
-Duygu
-Duzali
-Dwayne
-Dzeladin
-Dzemail
-Dzemil
-Dzevada
-Dzevat
-Dzhfer
-Earl
-Ebba
-Ebben
-Ebbi
-Ebenezer
-Eberard
-Eberhard
-Eberhardine
-Eberhardt
-Eberhart
-Ebert
-Ebke
-Ebo
-Ebrahim
-Ebru
-Ecaterina
-Ece
-Ecevit
-Echard
-Ecif
-Eck
-Eckanrd
-Eckard
-Eckardt
-Eckart
-Eckbert
-Eckehard
-Eckehardt
-Eckehart
-Eckert
-Eckhard
-Eckhardt
-Eckhart
-Eckwin
-Ed
-Eda
-Edbert
-Edburg
-Edda
-Eddi
-Eddie
-Eddine
-Eddo
-Eddy
-Edel
-Edelbert
-Edelburg
-Edelburga
-Edelfried
-Edelgard
-Edelgart
-Edelhard
-Edelret
-Edelt
-Edeltraud
-Edeltraut
-Edeltrud
-Edeltrude
-Eden
-Eder
-Edesio
-Edgar
-Edgard
-Edgardo
-Edhem
-Edi
-Edial
-Edibe
-Edigna
-Edin
-Edina
-Edinhard
-Edip
-Edis
-Edit
-Edita
-Edite
-Edith
-Editha
-Ediz
-Edla
-Edlef
-Edlin
-Edltraud
-Edmar
-Edmond
-Edmund
-Edmunda
-Edmundo
-Edna
-Ednail
-Ednan
-Edo
-Edoard
-Edoardo
-Edouard
-Edris
-Edser
-Eduard
-Eduarda
-Eduardo
-Eduart
-Edvard
-Edwald
-Edward
-Edwi
-Edwin
-Edwina
-Edwine
-Edy
-Edyta
-Edzard
-Eeltje
-Een
-Eero
-Efdal
-Efe
-Efend
-Efendi
-Effi
-Effrim
-Efim
-Efisio
-Efkan
-Eflatun
-Efnim
-Efrail
-Efraim
-Efram
-Efrem
-Efrim
-Efsal
-Efstathios
-Efstatios
-Efstratia
-Efstratios
-Efthimios
-Eftimia
-Egbert
-Ege
-Eggert
-Eggo
-Eghbal
-Egid
-Egidio
-Egidius
-Egilmez
-Egils
-Egin
-Eginhard
-Egino
-Egli
-Egloff
-Egmont
-Egmund
-Egner
-Egolf
-Egon
-Egor
-Ehi
-Ehlert
-Ehmad
-Ehrem
-Ehrenfried
-Ehrenhard
-Ehrenreich
-Ehrentraud
-Ehrentraut
-Ehrfried
-Ehrgott
-Ehrhard
-Ehrhardt
-Ehrig
-Ehsan
-Eibe
-Eibo
-Eichhorn
-Eicke
-Eid
-Eida
-Eide
-Eifried
-Eija
-Eik
-Eika
-Eike
-Eiko
-Eildert
-Eileen
-Eilene
-Eiler
-Eilert
-Eilhard
-Eilika
-Eimo
-Einar
-Einert
-Einhard
-Einhart
-Eirich
-Eirwen
-Eisa
-Eisen
-Eitel
-Eith
-Eithel
-Ejaz
-Ejdar
-Eka
-Ekaterina
-Ekaterini
-Ekber
-Eke
-Eken
-Eker
-Ekhard
-Ekim
-Ekin
-Ekip
-Ekkard
-Ekke
-Ekkehard
-Ekkehart
-Ekkerhard
-Ekkhart
-Ekmel
-Ekmer
-Eko
-Ekrem
-Eksi
-El
-Eladio
-Elaine
-Elard
-Elayne
-Elbe
-Elbin
-Elbisa
-Elborg
-Elbustu
-Elci
-Eldert
-Eldib
-Eldon
-Eldor
-Eldora
-Ele
-Eleanor
-Eleanora
-Elef
-Elefriede
-Elefterios
-Eleftherios
-Elein
-Elek
-Elemer
-Elen
-Elena
-Elene
-Eleni
-Elenore
-Eleonora
-Eleonore
-Eleuterio
-Elevtherios
-Elfanne
-Elfe
-Elfi
-Elfie
-Elfrede
-Elfride
-Elfried
-Elfriede
-Elfrun
-Elga
-Elgard
-Elgin
-Elgrin
-Elham
-Elhamad
-Eli
-Elia
-Elian
-Eliana
-Eliane
-Elias
-Elibertus
-Elida
-Elie
-Eliesabeth
-Eliese
-Elif
-Eligio
-Eligius
-Elijah
-Elika
-Elimar
-Elin
-Elina
-Elinor
-Elinore
-Elio
-Elionore
-Eliot
-Elis
-Elisa
-Elisab
-Elisabeah
-Elisabet
-Elisabeth
-Elisabetha
-Elisabethe
-Elisabetta
-Elisama
-Elisaweta
-Elisbeth
-Elise
-Elissa
-Elita
-Elithan
-Eliyo
-Eliza
-Elizabet
-Elizabeth
-Elize
-Eliziario
-Elk
-Elka
-Elkan
-Elke
-Elkje
-Elko
-Elkoukouchi
-Elkrem
-Ella
-Elleke
-Ellen
-Ellenburg
-Elleno
-Ellens
-Ellentraud
-Elli
-Ellin
-Ellinor
-Ellionor
-Elliott
-Ellis
-Ello
-Ellrun
-Elly
-Elma
-Elmar
-Elmas
-Elmaz
-Elmer
-Elmi
-Elmira
-Elmire
-Elmo
-Elmothaz
-Elna
-Elni
-Elnor
-Elo
-Elodie
-Elof
-Eloi
-Eloisa
-Elona
-Elonka
-Elony
-Eloy
-Elpidio
-Els
-Elsa
-Elsabe
-Elsaid
-Elsayed
-Elsbe
-Elsbet
-Elsbeth
-Else
-Elsebeth
-Elsedore
-Elsie
-Elsk
-Elske
-Elsmarie
-Elsner
-Elso
-Elter
-Eltje
-Elva
-Elvan
-Elvera
-Elvi
-Elvid
-Elvier
-Elvine
-Elvino
-Elvir
-Elvira
-Elvis
-Elwin
-Elwine
-Elwira
-Ely
-Elyas
-Elza
-Elzbieta
-Ema
-Emad
-Emanuel
-Emanuela
-Emanuele
-Emel
-Emelie
-Emelienne
-Emelinda
-Emeline
-Emer
-Emeran
-Emerich
-Emerson
-Emese
-Emet
-Emeti
-Emetullah
-Emi
-Emidio
-Emil
-Emile
-Emilia
-Emilian
-Emiliana
-Emiliano
-Emilie
-Emilienne
-Emilija
-Emilio
-Emily
-Emin
-Emina
-Emine
-Emir
-Emira
-Emirayse
-Emma
-Emmanuel
-Emmanuela
-Emmanuele
-Emmanuelle
-Emme
-Emmeline
-Emmely
-Emmeram
-Emmeran
-Emmerich
-Emmett
-Emmi
-Emmo
-Emmy
-Emos
-Emrah
-Emre
-Emriye
-Emrullah
-Emsal
-Emur
-Emy
-Ena
-Enayatullah
-Enbiya
-Encarnacion
-Ender
-Enderlein
-Enders
-Endre
-Endres
-Endrid
-Enea
-Enes
-Engelbert
-Engelburg
-Engelhard
-Engelhardt
-Engelina
-Engeline
-Engert
-Engin
-Enginay
-Enginer
-Enging
-Englbert
-Englert
-Eni
-Enieke
-Enis
-Eniz
-Enka
-Enke
-Enna
-Enne
-Enni
-Ennio
-Enno
-Eno
-Enoch
-Enrer
-Enric
-Enrica
-Enrichetta
-Enrico
-Enrique
-Enst
-Enstina
-Entia
-Envariye
-Enver
-Envers
-Enyonam
-Enza
-Enzo
-Epaminondas
-Ephrath
-Epifanio
-Epke
-Eppe
-Equipment
-Eral
-Eraldo
-Eran
-Eranil
-Erasmia
-Erasmus
-Eray
-Erbay
-Erbil
-Ercan
-Ercihan
-Ercilian
-Ercin
-Ercogil
-Erda
-Erdal
-Erdel
-Erdem
-Erdemir
-Erdenay
-Erdener
-Erdil
-Erdin
-Erdinc
-Erdirc
-Erdmann
-Erdmut
-Erdmute
-Erdmuthe
-Erdogan
-Erel
-Eren
-Erena
-Erencem
-Erenlcen
-Erfried
-Ergan
-Erghioum
-Ergin
-Ergun
-Erhan
-Erhard
-Erhardt
-Erhart
-Erholt
-Eri
-Eribert
-Eric
-Erica
-Erich
-Erick
-Erico
-Erik
-Erika
-Erikin
-Eriko
-Eriks
-Erin
-Erinc
-Eris
-Erisken
-Erk
-Erkan
-Erkek
-Erken
-Erker
-Erkin
-Erkki
-Erko
-Erkul
-Erkus
-Erkut
-Erla
-Erland
-Erling
-Erman
-Ermanno
-Ermano
-Ermelinda
-Ermenegildo
-Ermentraud
-Ermin
-Ermine
-Erminio
-Ermis
-Erna
-Ernan
-Erne
-Ernest
-Ernestina
-Ernestine
-Ernesto
-Erngard
-Ernhard
-Erni
-Ernike
-Ernst
-Ernstfried
-Ernstine
-Ernt
-Erny
-Erogul
-Erol
-Eros
-Erou
-Errol
-Ersal
-Ersan
-Ersel
-Ersen
-Ersin
-Ersoy
-Ersun
-Ertan
-Ertas
-Ertekin
-Ertel
-Erten
-Ertugrol
-Ertugrul
-Ertunc
-Ertung
-Erturan
-Ervin
-Erwein
-Erwhn
-Erwin
-Erwine
-Eryilmaz
-Erzebet
-Erzsebet
-Esa
-Esad
-Esat
-Esatollah
-Esben
-Esbender
-Eschborn
-Eschek
-Escher
-Esda
-Ese
-Esedullah
-Esefa
-Esen
-Eser
-Eset
-Eshetu
-Esin
-Eske
-Esma
-Esmail
-Esmana
-Esmat
-Esme
-Esmer
-Esmeralda
-Esmina
-Esperanza
-Esra
-Esref
-Esret
-Esri
-Essam
-Essen
-Essi
-Esteban
-Estela
-Estelle
-Ester
-Estera
-Estevao
-Estha
-Esther
-Estrella
-Estrid
-Eta
-Ete
-Etelka
-Etem
-Ethan
-Ethel
-Ethelbert
-Ethem
-Ethraim
-Etienne
-Etnan
-Etta
-Ette
-Etteus
-Ettine
-Ettore
-Etty
-Euat
-Euclides
-Eufemia
-Eugen
-Eugene
-Eugeni
-Eugenia
-Eugenie
-Eugenio
-Eugenius
-Eugeniusz
-Euginie
-Euke
-Eulalia
-Eulogio
-Eunice
-Euro
-Eusebio
-Eustachius
-Eustasio
-Eustathios
-Eva
-Evagelia
-Evald
-Evalore
-Evamaria
-Evamarie
-Evan
-Evangelia
-Evangeline
-Evangelista
-Evangelos
-Evans
-Evanthia
-Evaristus
-Eve
-Evek
-Eveliese
-Evelin
-Evelinde
-Eveline
-Evelyn
-Evelyne
-Even
-Everhard
-Everhart
-Everilda
-Evert
-Evertz
-Evgin
-Evi
-Evin
-Evira
-Evmarie
-Evstratios
-Evy
-Evylin
-Evzal
-Ewa
-Ewald
-Ewalda
-Ewaldine
-Ewangelos
-Eward
-Ewdokia
-Ewe
-Ewelina
-Ewert
-Ewgeni
-Ewgenij
-Ewgenija
-Ewold
-Exclusive
-Eybe
-Eyibil
-Eylem
-Eylert
-Eylip
-Eynar
-Eyup
-Eyyup
-Ezequiel
-Ezri
-Ezzedine
-Faas
-Fabia
-Fabian
-Fabien
-Fabienne
-Fabio
-Fabiola
-Fabrice
-Fabrizio
-Facundo
-Fadi
-Fadik
-Fadil
-Fadila
-Fadile
-Fadime
-Fadumo
-Faegh
-Faheem
-Fahim
-Fahir
-Fahreddin
-Fahrettin
-Fahri
-Fahria
-Fahrid
-Fahriye
-Fahti
-Faik
-Faika
-Faina
-Fais
-Faissal
-Fait
-Faith
-Faiz
-Faize
-Faketa
-Fakhro
-Falco
-Falih
-Faliha
-Falk
-Falko
-Famaramarz
-Fani
-Fanj
-Fanja
-Fannerl
-Fanni
-Fanny
-Fanon
-Fantine
-Fanya
-Faouzi
-Farah
-Farahnaz
-Faraidun
-Faramarz
-Fares
-Farhad
-Farhat
-Farid
-Farida
-Faridin
-Farih
-Fariha
-Farina
-Faris
-Fariz
-Farjamnia
-Farkas
-Farman
-Faroog
-Farooq
-Faruk
-Faruque
-Farut
-Farzad
-Farzan
-Fasih
-Fata
-Fatah
-Fatemah
-Fateme
-Fateza
-Fathia
-Fathie
-Fati
-Fatih
-Fatija
-Fatima
-Fatime
-Fatin
-Fatine
-Fatma
-Fatmat
-Fatmata
-Fatos
-Faustin
-Faustina
-Fausto
-Faustyn
-Fauzi
-Fauzia
-Favelio
-Favlus
-Fawad
-Fawaz
-Fawwas
-Fawwaz
-Fawzi
-Fawzia
-Fayadh
-Fayik
-Fayyaz
-Faza
-Fazi
-Fazia
-Fazil
-Fazio
-Fazlija
-Fazlur
-Feary
-Februnija
-Fechret
-Fecri
-Fedai
-Fedalh
-Fedayi
-Fedder
-Fedele
-Federico
-Fedine
-Fedor
-Fedra
-Fee
-Fehim
-Fehime
-Fehin
-Fehmi
-Fehmiye
-Fekry
-Felal
-Felemez
-Felibe
-Felic
-Felice
-Felicia
-Felician
-Feliciano
-Felicie
-Felicitas
-Feliks
-Felipe
-Felis
-Felisa
-Felit
-Felix
-Felizia
-Felizitas
-Fema
-Femia
-Femke
-Fenja
-Fenna
-Fenni
-Fenzi
-Ferah
-Feramuz
-Ferat
-Feraá
-Ferda
-Ferdane
-Ferdaye
-Ferdens
-Ferdettin
-Ferdi
-Ferdinand
-Ferdinande
-Ferdinando
-Ferdinant
-Ferdl
-Ferdun
-Ferdy
-Ferdynand
-Ferenc
-Ferenz
-Ferfuli
-Fergus
-Ferha
-Ferhan
-Ferhat
-Feri
-Feria
-Ferial
-Ferida
-Feride
-Feridun
-Feriha
-Ferit
-Ferman
-Fermin
-Fernand
-Fernanda
-Fernande
-Fernandez
-Fernando
-Ferndinant
-Fernsehen
-Feros
-Ferrante
-Ferreira
-Ferruccio
-Ferruh
-Ferry
-Feruze
-Feryal
-Ferzende
-Ferzi
-Ferzullah
-Fesih
-Festus
-Feta
-Fetah
-Fethi
-Fethiye
-Feti
-Fetma
-Fettah
-Fetullah
-Fevci
-Fevzi
-Fevziye
-Fexhri
-Fey
-Feysi
-Feyyaz
-Feyzan
-Feyzi
-Feyzullah
-Feza
-Fia
-Fidan
-Fidel
-Fidelis
-Fidelity
-Fidon
-Fiedler
-Fielmann
-Fien
-Fiete
-Figaro
-Figen
-Fika
-Fikrek
-Fikret
-Fikri
-Fikrige
-Fikriye
-Fil
-Filifos
-Filip
-Filipe
-Filipo
-Filipos
-Filipp
-Filippa
-Filippo
-Filippos
-Filippowna
-Filiz
-Filizaliye
-Filo
-Filomena
-Filomeno
-Fina
-Fine
-Fini
-Finka
-Finn
-Finny
-Fiona
-Fioravante
-Fiore
-Fiorella
-Fiorentino
-Fiorenzo
-Fiorina
-Fips
-Fira
-Firas
-Firat
-Firdes
-Firdevs
-Firial
-Firkat
-Firkret
-Firuz
-Fissahage
-Fisseha
-Fisun
-Fitnat
-Fjodor
-Flavia
-Flavie
-Flavio
-Flavius
-Fleur
-Flor
-Flora
-Florcia
-Florence
-Florencia
-Florencio
-Florentin
-Florentina
-Florentine
-Florentino
-Florenz
-Florette
-Floria
-Florian
-Floriana
-Florin
-Florina
-Florine
-Florio
-Floris
-Flori n
-Flower
-Foariz
-Focke
-Focko
-Fod
-Fodor
-Foelke
-Fokke
-Fokko
-Foline
-Folkard
-Folke
-Folker
-Folkert
-Folkmar
-Folko
-Follerich
-Folly
-Folma
-Folmar
-Folt
-Folus
-Foots
-Fores
-Forese
-Fortunato
-Fortune
-Fotini
-Fotios
-Fouad
-Foula
-Fouzia
-Fran
-Franc
-Franca
-France
-Frances
-Francesca
-Francesco
-Francia
-Francina
-Francine
-Francis
-Francisc
-Francisca
-Francisco
-Franciscus
-Franciska
-Francisko
-Franciszek
-Franck
-Franclim
-Franco
-Francois
-Francoise
-Frane
-Franjo
-Frank
-Franka
-Franke
-Frankie
-Franklin
-Franko
-Frano
-Frans
-Frantisek
-Frantz
-Franz
-Franzis
-Franzisco
-Franziska
-Franziskus
-Franzjosef
-Franzl
-Franzleo
-Frauke
-Fred
-Freda
-Freddi
-Freddy
-Frede
-Frederek
-Frederic
-Frederick
-Fredericke
-Frederico
-Frederik
-Frederike
-Frederique
-Fredhelm
-Fredi
-Fredie
-Fredin
-Fredo
-Fredrich
-Fredrik
-Fredy
-Freed
-Freia
-Freidoun
-Freimut
-Freimuth
-Frein
-Freitag
-Freke
-Frena
-Frenz
-Frerat
-Frerich
-Frerichs
-Frerk
-Frevein
-Frey
-Freya
-Frhedrich
-Frick
-Frida
-Fridbert
-Frideriki
-Friderun
-Fridhard
-Fridhild
-Fridi
-Fridjof
-Fridl
-Frido
-Fridobert
-Fridolin
-Fridon
-Fridrich
-Fridtjof
-Fried
-Frieda
-Friedbert
-Friedchen
-Friede
-Friedebert
-Friedegard
-Friedegund
-Friedegunde
-Friedel
-Friedemann
-Friedemarie
-Frieder
-Friederich
-Friedericka
-Friedericke
-Friederika
-Friederike
-Friederk
-Friedgar
-Friedgard
-Friedger
-Friedgund
-Friedgunde
-Friedh
-Friedhard
-Friedhart
-Friedheim
-Friedhelm
-Friedhilde
-Friedhold
-Friedich
-Friedjof
-Friedl
-Friedlieb
-Friedlinde
-Friedmann
-Friedmar
-Friedmund
-Friedo
-Friedolf
-Friedolin
-Friedoline
-Friedrich
-Friedrichkarl
-Friedrike
-Friedrun
-Friedwald
-Frieling
-Fries
-Friese
-Friesen
-Frigga
-Frigge
-Frigyes
-Frik
-Friso
-Frithjof
-Fritjof
-Frits
-Fritz
-Friz
-Frode
-Frohmut
-Frost
-Frowin
-Fryderyk
-Frydoon
-Fuad
-Fuat
-Fuente
-Fuesun
-Fulgencio
-Fulvio
-Fulya
-Funda
-Furqan
-Furug
-Fynn
-GLASER
-Gaafar
-Gabel
-Gaber
-Gabi
-Gabie
-Gabiele
-Gabin
-Gabina
-Gabino
-Gabiriele
-Gabor
-Gabri
-Gabriel
-Gabriela
-Gabriele
-Gabriella
-Gabrielle
-Gaby
-Gad
-Gada
-Gaetana
-Gaetano
-Gaffar
-Gafur
-Gagna
-Gaho
-Gala
-Galal
-Galdi
-Gali
-Galina
-Galip
-Gallina
-Gallion
-Gamal
-Gamli
-Gamze
-Gandolf
-Gandolfo
-Ganet
-Ganev
-Gangolf
-Gani
-Ganimet
-Ganka
-Ganna
-Garabet
-Garbo
-Gard
-Garde
-Gardenia
-Gardina
-Gardy
-Gareth
-Garin
-Garip
-Garlich
-Garner
-Garrelt
-Garrit
-Garry
-Gary
-Gas
-Gaschim
-Gaselis
-Gashaw
-Gaspar
-Gaspare
-Gaston
-Gaudenz
-Gaudenzia
-Gautam
-Gauthier
-Gavin
-Gavril
-Gay
-Gaye
-Gazal
-Gazale
-Gazali
-Gazanfer
-Gazi
-Gazmati
-Gebhard
-Gebhardt
-Gebina
-Gebro
-Geckeler
-Gedikli
-Gediz
-Geele
-Geelke
-Geerd
-Geerhard
-Geerling
-Geert
-Geertje
-Geesche
-Gehard
-Geiko
-Gela
-Geli
-Gelske
-Geltrude
-Gena
-Genadi
-Genc
-Gencal
-Gencarslan
-Gencay
-Gencel
-Generoso
-Geni
-Genia
-Gennadi
-Gennaro
-Gennet
-Genovefa
-Genoveva
-Genowefa
-Genrich
-Gentile
-Geo
-Geoff
-Geoffrey
-Geoffry
-Geogios
-Georg
-George
-Georgel
-Georges
-Georgette
-Georghios
-Georgi
-Georgia
-Georgie
-Georgina
-Georgine
-Georgior
-Georgios
-Georgis
-Georgius
-Gerald
-Geraldinde
-Geraldine
-Geralf
-Gerard
-Gerarda
-Gerardina
-Gerardo
-Gerardus
-Gerasimo
-Gerassimos
-Gerbard
-Gerboga
-Gerburg
-Gerco
-Gerd
-Gerda
-Gerde
-Gerdi
-Gerdie
-Gerdina
-Gerdine
-Gerdje
-Gerdrut
-Gerdruth
-Gerdtraude
-Gereb
-Geremia
-Gereon
-Geret
-Gerfrid
-Gerfried
-Gerges
-Gergo
-Gerh
-Gerhard
-Gerharda
-Gerhardine
-Gerhardt
-Gerhardus
-Gerhart
-Gerhild
-Gerhilde
-Gerhold
-Gerholt
-Geri
-Geriet
-Gerit
-Gerlach
-Gerlando
-Gerlind
-Gerlinda
-Gerlinde
-Germa
-Germain
-Germaine
-Germana
-Germania
-Germano
-Gerno
-Gernod
-Gernold
-Gernot
-Gero
-Gerold
-Gerolde
-Gerolf
-Gerriet
-Gerrit
-Gerry
-Gersom
-Gerson
-Gert
-Gerta
-Gertaud
-Gerth
-Gertha
-Gerthold
-Gerti
-Gertie
-Gertin
-Gertina
-Gertine
-Gertke
-Gertlind
-Gertraud
-Gertraude
-Gertraudt
-Gertraut
-Gertraute
-Gertrud
-Gertruda
-Gertrude
-Gertrudis
-Gertrut
-Gertrute
-Gertud
-Gerturd
-Gerty
-Gerulf
-Gervais
-Gervasio
-Gerwald
-Gerwig
-Gerwin
-Gerwine
-Gesa
-Gesar
-Gesche
-Geseke
-Gesina
-Gesine
-Gesualdo
-Getachew
-Getha
-Getraude
-Getrud
-Getrude
-Geva
-Gevaert
-Gevrige
-Gevriye
-Geyik
-Geza
-Gezina
-Ghaderi
-Ghaleb
-Ghani
-Gharib
-Ghassan
-Ghassem
-Ghazal
-Ghazi
-Gheorg
-Ghita
-Gholam
-Gholamhosein
-Ghorban
-Ghristos
-Ghrjbi
-Ghulam
-Giacinto
-Giacobbe
-Giacoma
-Giacomo
-Giambattista
-Giammaria
-Giampaolo
-Giampiero
-Giancario
-Giancarlo
-Giandomenico
-Gianfranco
-Gianglaudio
-Gianluca
-Gianluigi
-Gianna
-Gianni
-Gianpiero
-Gideon
-Gido
-Giesbert
-Giesel
-Giesela
-Gigi
-Gil
-Gila
-Gilbert
-Gilberta
-Gilberte
-Gilberto
-Gilda
-Gilde
-Gildo
-Giles
-Gili
-Gill
-Gilla
-Gilles
-Gillian
-Gilsun
-Gimette
-Gina
-Gindo
-Gini
-Ginka
-Ginny
-Gino
-Ginseppina
-Ginter
-Gioacchina
-Gioacchino
-Gioachino
-Giob
-Giocchino
-Gioconda
-Gion
-Giordano
-Giorgia
-Giorgina
-Giorgio
-Giorgios
-Giosue
-Giovambattista
-Giovane
-Giovanna
-Giovanni
-Giraldo
-Girgin
-Girmansak
-Girolamo
-Gisa
-Gisbert
-Gisela
-Gisele
-Giselher
-Giselinde
-Gisella
-Giselle
-Gisette
-Gislind
-Gislinde
-Giso
-Gita
-Giti
-Gitta
-Gitte
-Gitti
-Giulia
-Giuliana
-Giuliano
-Giulio
-Giunia
-Giusela
-Giusep
-Giuseppa
-Giuseppe
-Giuseppina
-Giusi
-Giustino
-Giusto
-Givaseppina
-Givyurk
-Giyas
-Giyasettin
-Gizella
-Gladis
-Gladys
-Glaserei
-Glenda
-Glenn
-Gloria
-Gloriane
-Glykeria
-Glyn
-Glynis
-Gobins
-Godart
-Godber
-Godehard
-Godehardt
-Godelind
-Godfred
-Godfrey
-Godfried
-Godje
-Godwin
-Goenuel
-Goldammer
-Goldmann
-Goli
-Golo
-Gomes
-Gomez
-Goncagul
-Gonne
-Gonzales
-Gonzalez
-Gonzalo
-Goran
-Gorch
-Gorda
-Gordana
-Gorden
-Gordian
-Gordon
-Gorgani
-Gosbert
-Gose
-Gosemin
-Goskun
-Goswin
-Gotelind
-Gotho
-Gotja
-Gottfried
-Gottfriede
-Gotthard
-Gotthardt
-Gotthart
-Gotthelf
-Gotthilf
-Gotthold
-Gottlieb
-Gottlob
-Gottreich
-Gottwald
-Goy
-Grace
-Gracia
-Gracian
-Graciela
-Grada
-Gradincic
-Graeme
-Graham
-Granja
-Gratz
-Graz
-Grazia
-Graziano
-Graziella
-Grazilla
-Grazyna
-Grbavac
-Greda
-Greet
-Greg
-Gregoire
-Gregor
-Gregoria
-Gregorio
-Gregorios
-Gregory
-Gret
-Greta
-Gretchen
-Grete
-Gretel
-Gretha
-Grethe
-Greti
-Gretje
-Gretl
-Gretus
-Grevald
-Grgor
-Grgorios
-Grid
-Griet
-Grietje
-Griffin
-Grigor
-Grigore
-Grigori
-Grigorios
-Grim
-Griseldis
-Grit
-Grita
-Gritt
-Gritta
-Gritz
-Groá
-Grundl
-Grynet
-Grzegorz
-Gserhard
-Gualtiero
-Gudio
-Gudrun
-Gudula
-Guel
-Gueler
-Guelhizar
-Guellue
-Gueluesan
-Guenter
-Guenther
-Guerino
-Guglielmo
-Guhn
-Guida
-Guido
-Guidon
-Guilherme
-Guillaume
-Guillermina
-Guillermo
-Guiseppe
-Gul
-Gulam
-Gulan
-Gulay
-Gulboy
-Gulinaz
-Gulizar
-Gullan
-Gulli
-Gullmullah
-Gulnar
-Gulsade
-Gulumser
-Guluzar
-Gumersindo
-Gun
-Guna
-Gunar
-Gunars
-Gunawati
-Gunda
-Gunde
-Gundel
-Gundela
-Gundelinde
-Gunder
-Gundi
-Gundis
-Gundo
-Gundolf
-Gundram
-Gundrata
-Gundula
-Gunduz
-Gundy
-Gunhild
-Gunhilde
-Gunhilt
-Gunild
-Gunilla
-Gunnar
-Guntbert
-Gunter
-Gunthar
-Gunthard
-Gunther
-Gunthild
-Gunthilde
-Guntram
-Gunul
-Guoming
-Gurbe
-Gurli
-Gus
-Guschi
-Guset
-Guslav
-Guss
-Gust
-Gusta
-Gustaaf
-Gustaf
-Gustav
-Gustavo
-Gustaw
-Gustel
-Gusti
-Gustl
-Guta
-Guzi
-Gwendolin
-Gwido
-Gyde
-Gylay
-Gylfe
-Gyula
-Haaf
-Haak
-Haan
-Haantis
-Habbe
-Habbo
-Habib
-Habiba
-Habibe
-Habibullah
-Habil
-Habip
-Habsaoudi
-Hacer
-Hacere
-Haci
-Hacibey
-Hacik
-Hacikurban
-Hacim
-Hack
-Hackach
-Haco
-Hadad
-Hadar
-Hadassa
-Haddon
-Haddouzi
-Hadi
-Hadian
-Hadice
-Hadise
-Hadmut
-Hado
-Hadwig
-Hady
-Haf
-Hafeez
-Hafid
-Hafida
-Hafiz
-Hafiza
-Hafize
-Hafozi
-Haga
-Hagdar
-Hage
-Hagen
-Haghighi
-Hahki
-Hai
-Haico
-Haidar
-Haide
-Haider
-Haidi
-Haij
-Haije
-Haijo
-Haike
-Haiko
-Hail
-Haila
-Haileyesus
-Hailian
-Haim
-Haimo
-Haind
-Hainer
-Hainrich
-Haio
-Hajdar
-Hajdin
-Haje
-Hajnalka
-Hajo
-Hajreta
-Hajrija
-Hajrudin
-Hajung
-Hakan
-Hake
-Haki
-Hakim
-Hakima
-Hakime
-Hakke
-Hakki
-Hakverdi
-Hala
-Halay
-Haldis
-Haldor
-Haldun
-Hale
-Halef
-Haleh
-Halfi
-Halici
-Halide
-Halife
-Halil
-Halilibrahim
-Halilovic
-Halim
-Halima
-Halime
-Halina
-Haline
-Halis
-Halise
-Halit
-Hall
-Halli
-Halma
-Halmut
-Halnil
-Haluk
-Hama
-Hamadoni
-Haman
-Hamdi
-Hamdija
-Hamdiye
-Hamdo
-Hamdoun
-Hamdullah
-Hamdy
-Hamed
-Hamedani
-Hameed
-Hamer
-Hamet
-Hami
-Hamida
-Hamide
-Hamidreza
-Hamidullah
-Hamiol
-Hamit
-Hamiyet
-Hamlet
-Hamo
-Hamon
-Hamsa
-Hamseh
-Hamurabi
-Hamza
-Hana
-Hanan
-Hanana
-Handan
-Handi
-Hane
-Hanefi
-Hanelore
-Hanfried
-Hani
-Hania
-Hanif
-Hanife
-Hanifi
-Hanili
-Hanim
-Hanime
-Hanimi
-Haninzer
-Hanjo
-Hank
-Hanka
-Hanke
-Hanko
-Hanna
-Hannah
-Hannamarie
-Hannchen
-Hanndore
-Hanne
-Hannedore
-Hannegret
-Hanneke
-Hannel
-Hannele
-Hannelie
-Hannelies
-Hanneliese
-Hannelore
-Hannelotte
-Hannerose
-Hannes
-Hannfried
-Hanni
-Hanno
-Hanns
-Hannu
-Hanny
-Hano
-Hans
-Hansa
-Hansan
-Hansdieter
-Hansel
-Hansen
-Hansfried
-Hansg
-Hansgeorg
-Hansgerd
-Hansgert
-Hanshagen
-Hansheiner
-Hansheinrich
-Hansi
-Hansibert
-Hansine
-Hansjakob
-Hansjoachim
-Hansjochen
-Hanskarl
-Hansmartin
-Hansotto
-Hanspaul
-Hanspeter
-Hanstheo
-Hanswalter
-Hanswerner
-Hanun
-Hany
-Happe
-Hapsuno
-Hara
-Harald
-Harandi
-Harbo
-Hardi
-Hardmut
-Hardo
-Hardy
-Hares
-Hari
-Haribald
-Haribert
-Harice
-Harie
-Hariet
-Harife
-Hariold
-Hariolf
-Hariton
-Hark
-Harke
-Harm
-Harma
-Harman
-Harmannus
-Harmantepe
-Harmen
-Harmine
-Harminus
-Harms
-Harmut
-Harold
-Haroun
-Harrald
-Harri
-Harriet
-Harris
-Harro
-Harry
-Hartfried
-Hartl
-Hartlieb
-Hartmann
-Hartmaut
-Hartmund
-Hartmut
-Hartmuth
-Hartwig
-Hartwin
-Harum
-Harun
-Harvey
-Hary
-Hasa
-Hasan
-Hasbi
-Haser
-Hasi
-Hasib
-Hasiba
-Hasibe
-Hasim
-Hasip
-Hasmet
-Hasna
-Hasnah
-Haso
-Hasret
-Hassan
-Hassar
-Hasso
-Hasum
-Hatayi
-Hatem
-Hatemi
-Hatice
-Hatida
-Hatidza
-Hatim
-Hatip
-Hatmone
-Hatto
-Hatun
-Haubert
-Hauk
-Hauke
-Hauser
-Hava
-Havazer
-Haver
-Havva
-Hawa
-Hayal
-Hayat
-Hayati
-Hayatin
-Haydar
-Haydee
-Hayder
-Haydor
-Hayen
-Hayke
-Haym
-Haymo
-Haynettin
-Hayno
-Hayo
-Hayrani
-Hayrettin
-Hayri
-Hayriye
-Hayrulla
-Hayrullah
-Haytham
-Hayung
-Hazan
-Hazar
-Hazim
-Hazine
-Hazir
-Hbiba
-Heather
-Hebert
-Hebine
-Heck
-Hector
-Hedda
-Heddi
-Heddies
-Hede
-Hedi
-Hedia
-Hedise
-Hediye
-Hedwig
-Hedy
-Hee
-Hege
-Hehnz
-Heico
-Heida
-Heide
-Heidelies
-Heideliese
-Heidelind
-Heidelinde
-Heidelore
-Heidemaria
-Heidemarid
-Heidemarie
-Heider
-Heiderose
-Heideruth
-Heidi
-Heidje
-Heidrun
-Heidwolf
-Heidy
-Heiga
-Heijo
-Heika
-Heike
-Heikki
-Heiko
-Heilgard
-Heilke
-Heilko
-Heilmann
-Heilo
-Heilrun
-Heilwig
-Heim
-Heiman
-Heimbert
-Heimerich
-Heimfried
-Heimke
-Heimo
-Hein
-Heina
-Heinemann
-Heiner
-Heinerich
-Heinfried
-Heini
-Heinicke
-Heinka
-Heinke
-Heinko
-Heino
-Heinold
-Heinr
-Heinrich
-Heins
-Heintje
-Heiny
-Heinz
-Heinzgert
-Heinzjosef
-Heinzpeter
-Heio
-Heisam
-Heizung
-Hekar
-Hekim
-Hekmet
-Hela
-Helci
-Helda
-Heldi
-Heldur
-Hele
-Heleanne
-Helen
-Helena
-Helene
-Helfred
-Helfrich
-Helfrid
-Helfried
-Helfriede
-Helfriedt
-Helg
-Helga
-Helgard
-Helge
-Helgi
-Helgo
-Helgrid
-Heli
-Helia
-Heliena
-Helier
-Heliodoro
-Helios
-Helka
-Helke
-Hella
-Hellburga
-Helle
-Hellen
-Hellfried
-Helli
-Hellmut
-Hellmuth
-Hello
-Helma
-Helmar
-Helme
-Helmer
-Helmfried
-Helmgard
-Helmi
-Helmine
-Helmo
-Helmtraud
-Helmtraut
-Helmtrud
-Helmut
-Helmuth
-Helmward
-Helmy
-Helvi
-Helwart
-Helwig
-Helwin
-Hema
-Hemmine
-Hemmo
-Henderika
-Henderike
-Hendrick
-Hendricus
-Hendrik
-Hendrika
-Hendrike
-Hendrikje
-Hendrikus
-Hendrina
-Hendrk
-Hendry
-Hendryk
-Hendullah
-Henel
-Henk
-Henkel
-Hennek
-Hennelore
-Henner
-Henni
-Hennig
-Henning
-Henno
-Henny
-Henri
-Henric
-Henrich
-Henricus
-Henriette
-Henrik
-Henrika
-Henrike
-Henriks
-Henrique
-Henry
-Henryk
-Henryka
-Hens
-Hentiette
-Henze
-Hep
-Heranus
-Herb
-Herber
-Herberg
-Herbert
-Herbet
-Herculano
-Herdem
-Herden
-Herdine
-Herdis
-Herdith
-Herfrid
-Herfried
-Hergen
-Herger
-Hergit
-Herib
-Heriber
-Heribert
-Heriberto
-Herlinde
-Herlov
-Herm
-Herma
-Herman
-Hermann
-Hermanus
-Hermelinde
-Hermenegild
-Hermes
-Hermfried
-Hermi
-Hermiene
-Hermina
-Hermine
-Herminia
-Herminio
-Herms
-Hermut
-Hermy
-Hernando
-Hernz
-Hero
-Herold
-Herolf
-Heron
-Heros
-Herrad
-Herrmann
-Herry
-Herta
-Hertel
-Hertha
-Hertra
-Hertwig
-Hertz
-Herve
-Herwald
-Herward
-Herwart
-Herwarth
-Herwig
-Herwin
-Hesamaldin
-Hetha
-Heti
-Hetta
-Hetti
-Hetty
-Heva
-Hevzat
-Heye
-Heyes
-Heyke
-Heyno
-Heyo
-Hezer
-Hezir
-Heá
-Hicabi
-Hicham
-Hicole
-Hicran
-Hicri
-Hida
-Hidayef
-Hidayet
-Hidda
-Hidde
-Hidegard
-Hideki
-Hideyet
-Hidir
-Hidiv
-Hieronim
-Hieronymus
-Hifzi
-Higinio
-Hikaru
-Hikmat
-Hikmet
-Hilaire
-Hilal
-Hilalyasim
-Hilar
-Hilaria
-Hilario
-Hilarius
-Hilary
-Hilbert
-Hild
-Hilda
-Hildburg
-Hildburga
-Hilde
-Hildebert
-Hildebrand
-Hildefard
-Hildeg
-Hildegard
-Hildegarde
-Hildegart
-Hildegrim
-Hildegun
-Hildegund
-Hildegunde
-Hilden
-Hildo
-Hildor
-Hildrun
-Hildtrud
-Hilga
-Hilgriet
-Hilka
-Hilke
-Hilko
-Hilla
-Hillard
-Hillary
-Hille
-Hillechien
-Hiller
-Hillert
-Hillrich
-Hilma
-Hilmar
-Hilmer
-Hilmi
-Hilmija
-Hilmo
-Hilpert
-Hilrich
-Hilrid
-Hiltraud
-Hiltraut
-Hiltrud
-Hiltrude
-Hiltrudis
-Hiltrun
-Hiltrut
-Hilwert
-Hima
-Himan
-Himmet
-Hinderikus
-Hinderk
-Hindertje
-Hindrik
-Hindrika
-Hinnerike
-Hinnerk
-Hinrich
-Hinriette
-Hinrika
-Hinrike
-Hiob
-Hipolito
-Hippe
-Hippolyt
-Hiram
-Hirije
-Hiro
-Hironimus
-Hiroshi
-Hisham
-Hiskeline
-Hitto
-Hizarci
-Hizir
-Hizli
-Hizmi
-Hjalmar
-Hobby
-Hocine
-Hoda
-Hoek
-Hoevel
-Hoger
-Hojrmllo
-Hol
-Holde
-Holder
-Holdine
-Holge
-Holger
-Holil
-Holke
-Hollie
-Holm
-Holmer
-Holst
-Homa
-Homayun
-Hon
-Honorato
-Honorine
-Honsa
-Hooshang
-Hope
-Hoppe
-Horacio
-Horand
-Horatio
-Horne
-Horst
-Horstmar
-Horstpeter
-Hortensia
-Hortensie
-Hosai
-Hossain
-Hossam
-Hossein
-Hossien
-Hossin
-Houria
-Housein
-Houssam
-Houssein
-Howard
-Hoyer
-Hristos
-Hub
-Hubert
-Huberta
-Hubertine
-Hubertus
-Hubet
-Hubs
-Hudaverdi
-Hudayi
-Huesamettin
-Huesejin
-Hueseyin
-Hueseyn
-Huesnue
-Huesyin
-Hugh
-Hugo
-Huguette
-Hulda
-Huldreich
-Hulki
-Hulusi
-Hulya
-Huma
-Humbert
-Humberto
-Hume
-Humphrey
-Huna
-Hung
-Hunold
-Hurai
-Huri
-Hurige
-Hurinaz
-Huriye
-Hursit
-Husa
-Husam
-Husamettin
-Huse
-Husein
-Husejin
-Huseyin
-Husinye
-Huskic
-Husne
-Husni
-Huso
-Hussain
-Hussameddin
-Hussein
-Hussen
-Husseyin
-Husseyn
-Husui
-Huyliem
-Hyacinthe
-Hyad
-Hyazinth
-Hyazinthe
-Hysein
-Hysen
-Hyseyin
-Hyungmo
-Iain
-Ian
-Iana
-Ianis
-Iaso
-Iason
-Ib
-Iba
-Ibahim
-Ibis
-Ibo
-Ibolya
-Ibrahim
-Ibraim
-Ibraimi
-Ibro
-Ibtehal
-Ichtiajor
-Icli
-Ida
-Idalia
-Ide
-Iden
-Idi
-Idil
-Idina
-Ido
-Idowu
-Idris
-Idriz
-Ifakat
-Ifaket
-Iffel
-Iffet
-Ifigenia
-Ifthikar
-Iftikhar
-Iftikhard
-Igal
-Igde
-Ige
-Iginio
-Igino
-Igna
-Ignace
-Ignacia
-Ignacio
-Ignatius
-Ignatz
-Ignaz
-Ignazio
-Igneci
-Igo
-Igor
-Ihasan
-Ihne
-Ihno
-Ihsam
-Ihsan
-Ihsaniye
-Ihson
-Iines
-Ijaz
-Ijlal
-Ika
-Ikbal
-Iki
-Iko
-Iksan
-Ikuko
-Il
-Ilan
-Ilarion
-Ilarione
-Ilbeyi
-Ilda
-Ildefons
-Ildefonso
-Ildelsaht
-Ildico
-Ildiko
-Ildiz
-Ile
-Ileana
-Ileri
-Ilga
-Ilgar
-Ilham
-Ilhami
-Ilhan
-Ilhani
-Ilia
-Iliana
-Ilias
-Ilija
-Ilijo
-Iliyo
-Ilja
-Iljana
-Iljas
-Iljasa
-Iljber
-Iljmi
-Ilka
-Ilkay
-Ilke
-Ilken
-Ilker
-Ilkim
-Ilkka
-Ilknur
-Ilko
-Ilkur
-Illa
-Illo
-Illona
-Ilmars
-Ilmi
-Ilmiye
-Ilona
-Ilonca
-Ilonka
-Ilpern
-Ilsa
-Ilse
-Ilsebill
-Ilsedore
-Ilselore
-Ilsemaria
-Ilsemarie
-Ilsetraud
-Ilter
-Ilva
-Ilvira
-Ilyas
-Ilza
-Ima
-Imad
-Imagina
-Iman
-Imant
-Imants
-Imanuel
-Imbor
-Imdad
-Imdat
-Imelda
-Imerli
-Imke
-Imkea
-Imko
-Imma
-Immacolata
-Immannus
-Immanuel
-Imme
-Immel
-Immihan
-Immo
-Imo
-Imocente
-Imogen
-Imran
-Imre
-Imtiaz
-Ina
-Inal
-Inan
-Inanc
-Ince
-Inci
-Indalecio
-India
-Indira
-Indra
-Ine
-Ineke
-Ines
-Inessa
-Ineta
-Inez
-Inga
-Ingala
-Ingbert
-Ingborg
-Inge
-Ingeborg
-Ingeburg
-Ingela
-Ingelene
-Ingelore
-Ingelotte
-Ingemar
-Ingemarie
-Ingena
-Inger
-Ingetraud
-Ingetraut
-Ingfried
-Ingird
-Ingken
-Ingmar
-Ingo
-Ingobald
-Ingobert
-Ingold
-Ingolde
-Ingolf
-Ingomar
-Ingri
-Ingrid
-Ingried
-Ingriet
-Ingrit
-Ingrun
-Ingulf
-Ingunn
-Ingvar
-Ingvild
-Ingwald
-Ingwelde
-Ingwer
-Ingwert
-Inhisaf
-Ini
-Iniga
-Inis
-Inka
-Inke
-Inken
-Inko
-Inma
-Inna
-Inno
-Ino
-Insa
-Insaf
-Inse
-Intezar
-Ioan
-Ioanis
-Ioanna
-Ioannis
-Iolanda
-Ion
-Iona
-Ionis
-Iordanis
-Ipek
-Iprahim
-Iptisem
-Ira
-Iraida
-Iraklis
-Irawan
-Irek
-Iren
-Irena
-Irene
-Ireneo
-Ireneusz
-Irfan
-Irgard
-Irham
-Iri
-Iria
-Irina
-Irini
-Iris
-Irit
-Irita
-Irja
-Irma
-Irmak
-Irmburg
-Irmel
-Irmela
-Irmeli
-Irmelin
-Irmengard
-Irmentraud
-Irmfried
-Irmfriede
-Irmg
-Irmgard
-Irmgart
-Irmhild
-Irmhilde
-Irmi
-Irmina
-Irmine
-Irmingard
-Irmintraut
-Irmis
-Irmlind
-Irmtraud
-Irmtraut
-Irmtrud
-Irna
-Irran
-Irsadi
-Irshad
-Irv
-Irvine
-Irwin
-Isa
-Isaac
-Isaak
-Isabe
-Isabel
-Isabela
-Isabell
-Isabella
-Isabelle
-Isaf
-Isai
-Isaia
-Isak
-Isan
-Isay
-Iscan
-Ischebeck
-Ise
-Isela
-Isen
-Isfan
-Isfendiyar
-Isfendyar
-Ishah
-Ishak
-Ishild
-Ishmael
-Ishtiaq
-Isidor
-Isidora
-Isidoro
-Isidro
-Isik
-Isil
-Isilak
-Isilay
-Isin
-Isis
-Iskan
-Iskandar
-Iske
-Iskemder
-Iskendar
-Iskender
-Islam
-Islim
-Isma
-Ismael
-Ismahan
-Ismail
-Isman
-Ismayil
-Ismene
-Ismet
-Ismeta
-Ismihan
-Ismilda
-Ismuni
-Isnail
-Iso
-Isolde
-Isotta
-Ispiro
-Isra
-Israel
-Israfil
-Israil
-Issa
-Issah
-Issam
-Isset
-Issifu
-Issy
-Istayfan
-Istayfo
-Istim
-Isturai
-Istvan
-Isuf
-Ita
-Italia
-Italiano
-Italo
-Ito
-Itris
-Iulian
-Iva
-Ivan
-Ivana
-Ivanda
-Ivanka
-Ivano
-Ivar
-Iven
-Iver
-Ivett
-Ivetta
-Ivette
-Ivica
-Ivka
-Ivo
-Ivon
-Ivona
-Ivone
-Ivonne
-Ivor
-Iwan
-Iwanowitsch
-Iwer
-Iwo
-Iwona
-Iyad
-Iyidogan
-Izabella
-Izeltin
-Izet
-Izeta
-Izhak
-Izidor
-Izmedin
-Izo
-Izzeddian
-Izzet
-Izzettin
-Jaafar
-Jaak
-Jaali
-Jaana
-Jaap
-Jabbo
-Jabra
-Jac
-Jacek
-Jachigar
-Jachim
-Jacinta
-Jacintha
-Jacinto
-Jack
-Jackie
-Jackob
-Jackow
-Jackson
-Jacky
-Jaclin
-Jacob
-Jacoba
-Jacobe
-Jacobus
-Jacqueline
-Jacquelyn
-Jacques
-Jacuado
-Jacueline
-Jad
-Jadeviga
-Jadigar
-Jadwiga
-Jaeono
-Jafar
-Jafer
-Jafia
-Jaglidere
-Jagoda
-Jahamil
-Jahangir
-Jahic
-Jahja
-Jahn
-Jaime
-Jake
-Jaki
-Jakim
-Jako
-Jakob
-Jakobine
-Jakobs
-Jakobus
-Jakop
-Jakov
-Jakow
-Jakub
-Jakup
-Jakupi
-Jalal
-Jalcin
-Jale
-Jalil
-Jalke
-Jalle
-Jam
-Jama
-Jamal
-Jaman
-Jamchid
-James
-Jamet
-Jamie
-Jamil
-Jamila
-Jamile
-Jamileh
-Jamiletta
-Jamin
-Jamina
-Jamir
-Jamshed
-Jamshid
-Jan
-Jana
-Janai
-Jane
-Janek
-Janet
-Janett
-Janette
-Janez
-Janfried
-Janhangim
-Jani
-Janica
-Janice
-Janicza
-Janie
-Janik
-Janin
-Janina
-Janine
-Janis
-Janita
-Janja
-Janka
-Janke
-Janko
-Jann
-Janna
-Janne
-Janneke
-Jannes
-Jannet
-Jannetje
-Jannette
-Janni
-Jannica
-Jannice
-Jannick
-Jannis
-Janny
-Jano
-Janos
-Janosch
-Janpeter
-Jans
-Janssen
-Jantje
-Jantjen
-January
-Janus
-Janusch
-Janusz
-Japaree
-Jaqueline
-Jaques
-Jara
-Jarah
-Jarek
-Jarg
-Jari
-Jarid
-Jariya
-Jarl
-Jarmila
-Jarno
-Jaro
-Jaromir
-Jaros
-Jaroslaus
-Jaroslav
-Jaroslava
-Jaroslaw
-Jasar
-Jasari
-Jascha
-Jaschik
-Jasemin
-Jasenka
-Jaser
-Jashid
-Jasin
-Jasmin
-Jasmina
-Jasmine
-Jasminka
-Jasna
-Jason
-Jasper
-Jassim
-Jassin
-Javed
-Javier
-Javus
-Jawad
-Jawaid
-Jawald
-Jawhar
-Jawid
-Jay
-Jayne
-Jean
-Jeanett
-Jeanette
-Jeanine
-Jeanna
-Jeanne
-Jeannette
-Jeannine
-Jed
-Jedvige
-Jef
-Jeff
-Jeffery
-Jeffrey
-Jeffry
-Jehab
-Jehia
-Jekatarina
-Jekaterina
-Jela
-Jelena
-Jelger
-Jeli
-Jelica
-Jelka
-Jella
-Jelsa
-Jelsche
-Jelste
-Jelto
-Jem
-Jemina
-Jemla
-Jemmy
-Jendoubi
-Jeniffer
-Jennefer
-Jenni
-Jennifer
-Jennipher
-Jenny
-Jennyfer
-Jens
-Jensen
-Jenz
-Jeremy
-Jerg
-Jerko
-Jeroen
-Jerome
-Jeronimo
-Jeroslaw
-Jerry
-Jerzy
-Jes
-Jesko
-Jesper
-Jess
-Jesse
-Jessica
-Jessie
-Jessika
-Jessy
-Jessyka
-Jesus
-Jeter
-Jette
-Jetty
-Jevsi
-Jewi
-Jeying
-Jhonny
-Jibbo
-Jihad
-Jila
-Jill
-Jim
-Jimmy
-Jiri
-Jirka
-Jirko
-Jirre
-Jit
-Jitka
-Jjochen
-Jlija
-Jo
-Joachim
-Joacim
-Joakim
-Joamana
-Joan
-Joana
-Joanis
-Joanna
-Joanne
-Joannis
-Joao
-Joaquim
-Joaquin
-Joathan
-Jobje
-Jobst
-Jocelyn
-Jocelyne
-Jochaim
-Jochem
-Jochen
-Jochim
-Jochum
-Jockel
-Jod
-Joda
-Jodwiga
-Jody
-Joe
-Joedjan
-Joel
-Joelle
-Joen
-Joep
-Joerg
-Joey
-Johan
-Johanes
-Johanfir
-Johann
-Johanna
-Johanne
-Johannes
-Johannette
-Johannis
-John
-Johnanna
-Johnie
-Johnny
-Johnson
-Johny
-Jojo
-Joke
-Jokiel
-Jokob
-Jokow
-Jola
-Jolan
-Jolanda
-Jolande
-Jolanta
-Jolante
-Jolanthe
-Jolly
-Jon
-Jona
-Jonas
-Jonat
-Jonathan
-Jones
-Jonhannes
-Jonka
-Jonn
-Jonna
-Jonni
-Jonnie
-Jonny
-Jons
-Jonus
-Jonuz
-Jony
-Joos
-Joost
-Jop
-Jordan
-Jordana
-Jordi
-Joren
-Jorg
-Jorge
-Jori
-Jorinde
-Jorita
-Jorjet
-Jork
-Jorke
-Jorn
-Jorny
-Jos
-Josche
-Joschi
-Jose
-Josef
-Josefa
-Josefin
-Josefina
-Josefine
-Josepf
-Joseph
-Josepha
-Josephe
-Josephine
-Josette
-Joshua
-Josi
-Josiane
-Josie
-Josif
-Josip
-Josipa
-Jost
-Josua
-Josue
-Josy
-Joumaa
-Jousef
-Jova
-Jovan
-Jovanka
-Jovica
-Jovo
-Jowan
-Joy
-Joyce
-Jozef
-Jozo
-Jozsa
-Jozsef
-Jradj
-Jrfan
-Jrma
-Juan
-Juana
-Juanita
-Jude
-Judica
-Judit
-Judita
-Judite
-Judith
-Juditha
-Judwig
-Judy
-Juelende
-Juergen
-Jugoslaw
-Juha
-Juhani
-Jukka
-Jukovic
-Jula
-Jule
-Julia
-Julian
-Juliana
-Juliane
-Julianka
-Julianna
-Julianne
-Julie
-Julien
-Juliet
-Julietta
-Juliette
-Julija
-Julijana
-Julika
-Julio
-Julita
-Julitta
-Julius
-July
-June
-Junita
-Junus
-Junzo
-Jupp
-Jura
-Juraj
-Jurdanur
-Jure
-Jurek
-Jurgen
-Juri
-Jurij
-Jurina
-Jurine
-Jurinus
-Juris
-Juro
-Jury
-Jusef
-Juso
-Jussi
-Just
-Justice
-Justin
-Justina
-Justine
-Justiniano
-Justino
-Justinus
-Justo
-Justus
-Justyna
-Jusuf
-Juta
-Jutta
-Juwelen
-Jvone
-Jytte
-Kaan
-Kabil
-Kablan
-Kabri
-Kada
-Kadar
-Kaddour
-Kadem
-Kadema
-Kader
-Kadev
-Kadhim
-Kadia
-Kadin
-Kadir
-Kadire
-Kadiri
-Kadmi
-Kadri
-Kadriye
-Kaduiye
-Kaethe
-Kafiye
-Kagan
-Kagir
-Kahla
-Kahraman
-Kahriman
-Kahrman
-Kahtan
-Kai
-Kaie
-Kaija
-Kain
-Kaisa
-Kaisu
-Kaj
-Kaja
-Kajetan
-Kajo
-Kakil
-Kal
-Kala
-Kalhan
-Kali
-Kalia
-Kalim
-Kalina
-Kaljic
-Kalkan
-Kalle
-Kalli
-Kalliopi
-Kaloudis
-Kalpak
-Kaltoum
-Kalus
-Kalust
-Kaluza
-Kam
-Kama
-Kamal
-Kamaran
-Kamber
-Kambis
-Kamd
-Kamel
-Kamer
-Kami
-Kamiel
-Kamil
-Kamila
-Kamile
-Kamilla
-Kamillus
-Kaminran
-Kamuran
-Kan
-Kanber
-Kanci
-Kanco
-Kander
-Kanfred
-Kani
-Kanischka
-Kanjo
-Kannici
-Kanssar
-Kant
-Kaplan
-Kaptan
-Kar
-KarWilhelm
-Kara
-Karabas
-Karabay
-Karabey
-Karabiyik
-Karabulat
-Karaca
-Karacaoglan
-Karacelik
-Karachalil
-Karadal
-Karadayi
-Karademir
-Karail
-Karakas
-Karakus
-Karakuzu
-Karalina
-Karaman
-Karamani
-Karamese
-Karan
-Karanfil
-Karaoglan
-Karatas
-Karda
-Karder
-Kardesler
-Kare
-Karel
-Karem
-Karen
-Karena
-Karfried
-Karheinz
-Kari
-Karia
-Kariheinz
-Karim
-Karima
-Karin
-Karina
-Karine
-Karip
-Karita
-Karkonjafarabadi
-Karl
-Karla
-Karlaugust
-Karlfred
-Karlfried
-Karlfriedrich
-Karlhans
-Karlheinz
-Karli
-Karlin
-Karlis
-Karljosef
-Karlmann
-Karlo
-Karlpeter
-Karma
-Karman
-Karmelo
-Karmen
-Karmi
-Karol
-Karola
-Karolin
-Karolina
-Karoline
-Karolus
-Karoly
-Karolyne
-Kars
-Karst
-Karsta
-Karsten
-Kartal
-Kartharina
-Karthrin
-Kartrin
-Karzim
-Kasal
-Kascha
-Kaschif
-Kasem
-Kasetcilik
-Kasi
-Kasif
-Kasife
-Kasim
-Kasimir
-Kaspar
-Kasper
-Kassandra
-Kassein
-Kassem
-Kassen
-Kassian
-Kast
-Kastulus
-Kata
-Katalin
-Katar
-Katarina
-Katarzyna
-Kate
-Katerina
-Katerine
-Kath
-Katharin
-Katharina
-Katharine
-Katherina
-Katherine
-Kathi
-Kathie
-Kathl
-Kathleen
-Kathlen
-Kathrein
-Kathrin
-Kathrina
-Kathryn
-Kathy
-Kati
-Katia
-Katie
-Katina
-Katip
-Katirye
-Katja
-Katjana
-Katleen
-Kato
-Katoliki
-Katri
-Katrin
-Katrina
-Katy
-Kaus
-Kavas
-Kay
-Kaya
-Kayacan
-Kayahan
-Kayhan
-Kayra
-Kazak
-Kazanfer
-Kazazic
-Kazem
-Kazim
-Kazimierz
-Kazimir
-Kazuo
-Kea
-Kebair
-Kebir
-Kefli
-Kehkshan
-Kei
-Keija
-Keike
-Keir
-Keith
-Keiwan
-Kekez
-Keksal
-Kelava
-Kelemen
-Keles
-Kelly
-Kemal
-Kemaletin
-Kemalettin
-Kemali
-Kemar
-Kemed
-Kemerkaya
-Keml
-Ken
-Kenadenu
-Kenan
-Kendra
-Keni
-Kennedy
-Kenneth
-Kenny
-Keno
-Kenon
-Kent
-Keramet
-Keramettin
-Keran
-Kerem
-Keren
-Kerim
-Keriman
-Kerime
-Kerine
-Keris
-Kerkes
-Kermanshani
-Kerrin
-Kersin
-Kerst
-Kersten
-Kersti
-Kerstin
-Kesegi
-Keser
-Keskin
-Kesten
-Kester
-Ketel
-Ketharina
-Kethe
-Kevin
-Kevni
-Kevser
-Keyvan
-Kezban
-Keziban
-Khachfe
-Khadra
-Khalaf
-Khald
-Khaled
-Khalid
-Khalil
-Khami
-Khamliti
-Khan
-Khanaqa
-Khasro
-Khattar
-Kheirallah
-Khemais
-Khodr
-Khoei
-Khosrawan
-Khosro
-Khurshid
-Kian
-Kibar
-Kicill
-Kiel
-Kierstin
-Kiessling
-Kiet
-Kiki
-Kikic
-Kilian
-Kilic
-Killi
-Killian
-Kim
-Kimberley
-Kimberly
-Kimmo
-Kimon
-Kin
-Kina
-King
-Kinga
-Kingsley
-Kinik
-Kiper
-Kir
-Kira
-Kiraz
-Kiriaki
-Kiriakitsa
-Kiriakos
-Kirik
-Kirjakos
-Kirk
-Kirman
-Kirsten
-Kirsti
-Kirstie
-Kirstin
-Kis
-Kismet
-Kitidis
-Kitso
-Kitti
-Kitty
-Kivanc
-Kivrak
-Kiyam
-Kiyan
-Kiyas
-Kiyasettin
-Kiymet
-Kjartan
-Kjel
-Kjeld
-Kjell
-Klaas
-Klara
-Klarin
-Klarissa
-Klarlies
-Klas
-Klaudia
-Klaudius
-Klaus
-Klausdieter
-Klauspeter
-Klein
-Klemens
-Klement
-Klementine
-Klements
-Klemenz
-Klenie
-Kleo
-Kleopatra
-Klodwald
-Klos
-Klothilde
-Knapp
-Knobelsdorf
-Knoll
-Knonsani
-Knstantin
-Knud
-Knut
-Knuth
-Kobra
-Kobus
-Koc
-Koca
-Kocademir
-Kocak
-Koclu
-Kocyigit
-Koen
-Koester
-Kofi
-Kofinkansah
-Kofl
-Kohsar
-Koi
-Kolja
-Kolman
-Kolos
-Kolumban
-Komini
-Konca
-Konde
-Konni
-Konny
-Konrad
-Konradin
-Konradine
-Konsantions
-Konstadinos
-Konstance
-Konstand
-Konstandinos
-Konstandinus
-Konstantia
-Konstantin
-Konstantina
-Konstantinas
-Konstantinos
-Konstantinus
-Konstanze
-Koo
-Koop
-Koopman
-Kor
-Kora
-Koral
-Koraltan
-Koray
-Korbinian
-Kord
-Kordel
-Kordi
-Kordmahalleh
-Kordula
-Koreay
-Korina
-Korinna
-Korkut
-Korl
-Kornel
-Kornela
-Kornelia
-Kornelius
-Kosa
-Kosakio
-Kosi
-Kosima
-Kosmas
-Kosta
-Kostak
-Kostakis
-Kostas
-Kourosch
-Kovac
-Koyuncu
-Kraen
-Krafft
-Krasimira
-Kredel
-Kreil
-Krein
-Krenzlin
-Kreske
-Kreszentia
-Kreszenz
-Kreszenzia
-Kriemhild
-Kriemhilde
-Krien
-Krimhild
-Krimhilde
-Krina
-Kriona
-Kris
-Krishna
-Krista
-Kristel
-Kristell
-Kristen
-Krister
-Kristian
-Kristiana
-Kristiane
-Kristin
-Kristina
-Kristine
-Kristjan
-Kristo
-Kristof
-Krste
-Krunoslav
-Kruse
-Krystian
-Krystina
-Krystyna
-Krzystof
-Krzysztof
-Ksenia
-Ksenija
-Kubat
-Kubi
-Kubilay
-Kublay
-Kuddusi
-Kudret
-Kuffour
-Kujtim
-Kukus
-Kula
-Kulak
-Kulem
-Kulwant
-Kum
-Kuman
-Kumar
-Kumro
-Kumru
-Kund
-Kuni
-Kunibert
-Kunigunda
-Kunigunde
-Kuno
-Kunt
-Kunter
-Kuny
-Kurban
-Kurbani
-Kurd
-Kureys
-Kurt
-Kurtbey
-Kurth
-Kurtulus
-Kuryo
-Kuscu
-Kutlu
-Kutluhan
-Kutret
-Kuyumcusu
-Kwadwo
-Kwaku
-Kwame
-Kwane
-Kwasi
-Kypiakos
-Kyra
-Kyriakos
-Kyrill
-Kzim
-Laaraichi
-Labitzue
-Lada
-Ladan
-Ladislau
-Ladislaus
-Ladislav
-Ladislava
-Lado
-Lady
-Lago
-Lahad
-Lahdo
-Lahi
-Laila
-Laios
-Lajos
-Lakdhar
-Lakhdar
-Lakis
-Lal
-Lala
-Lale
-Lam
-Lamadane
-Lambert
-Lambertine
-Lambertus
-Lambrecht
-Lambros
-Lamia
-Lamina
-Lamis
-Lampert
-Lamprecht
-Lampros
-Lana
-Lander
-Landolf
-Lanfranco
-Lans
-Lanz
-Lara
-Larba
-Larisa
-Larissa
-Larkin
-Larrisa
-Larry
-Lars
-Laslo
-Lasse
-Laszek
-Laszlo
-Lateef
-Latif
-Latifa
-Latife
-Lau
-Laura
-Laure
-Laureano
-Laurence
-Laurencja
-Laurent
-Laurentius
-Laurenz
-Laurette
-Lauri
-Lauriano
-Lauritz
-Lauro
-Laus
-Laux
-Lawrence
-Lazar
-Lazara
-Lazare
-Lazaros
-Lazo
-Le
-Lea
-Leal
-Lean
-Leana
-Leander
-Leandro
-Leandros
-Lech
-Leda
-Leen
-Leena
-Leendert
-Lefika
-Leida
-Leidia
-Leif
-Leila
-Leilah
-Leili
-Lein
-Leina
-Leino
-Lejla
-Lekic
-Lel
-Lela
-Lelia
-Lem
-Leman
-Lemke
-Lemme
-Lemonia
-Lemonie
-Lemos
-Lena
-Lenard
-Lenchen
-Lene
-Lengiz
-Lenhard
-Leni
-Lenka
-Lenke
-Lennard
-Lennart
-Lennert
-Leny
-Lenz
-Leo
-Leocadio
-Leocardia
-Leokadia
-Leon
-Leona
-Leonard
-Leonarda
-Leonardo
-Leone
-Leonel
-Leonhard
-Leonhardt
-Leoni
-Leonia
-Leonid
-Leonida
-Leonidas
-Leonides
-Leonids
-Leonie
-Leonisa
-Leonora
-Leonore
-Leontin
-Leontina
-Leontine
-Leopold
-Leopoldine
-Leopolt
-Lepold
-Ler
-Lerna
-Lerzan
-Lesbeth
-Lesley
-Leslie
-Leszek
-Leta
-Letekidan
-Leticia
-Letizia
-Leuk
-Leuthold
-Lev
-Levat
-Leve
-Levent
-Levin
-Levis
-Lew
-Lewe
-Lewis
-Lex
-Ley
-Leyla
-Lia
-Liada
-Liana
-Liane
-Lianne
-Liberal
-Libni
-Liborio
-Liborius
-Libwin
-Lida
-Liddi
-Liddy
-Lidi
-Lidia
-Lidija
-Lidio
-Lido
-Lidwina
-Lie
-Liebella
-Liebgard
-Lien
-Lienhard
-Liesa
-Liesbet
-Liesbeth
-Lieschen
-Liese
-Liesel
-Lieselore
-Lieselott
-Lieselotte
-Lieska
-Liesl
-Liet
-Ligia
-Lihovac
-Liidia
-Lila
-Lile
-Lili
-Lilia
-Lilian
-Liliana
-Liliane
-Lilie
-Lilija
-Lilio
-Lilith
-Lilja
-Liljana
-Lill
-Lilla
-Lilli
-Lillian
-Lilly
-Lilo
-Lily
-Lim
-Liman
-Lin
-Lina
-Linchen
-Lind
-Linda
-Linder
-Lindsey
-Lindy
-Line
-Linea
-Linhs
-Lini
-Link
-Linn
-Lino
-Linus
-Lioba
-Lion
-Lionel
-Lippert
-Lirija
-Lirije
-Lis
-Lisa
-Lisanne
-Lisbet
-Lisbeth
-Lise
-Lisel
-Liselene
-Liselott
-Liselotte
-Lisetta
-Lisette
-Lisi
-Liska
-Lisl
-Lisowicz
-Liss
-Lissa
-Lisse
-Lissi
-Lissy
-Litse
-Litterio
-Liubica
-Liudger
-Liv
-Live
-Livia
-Livio
-Livius
-Liya
-Liza
-Lizette
-Lizzy
-Ljiljana
-Ljow
-Ljuba
-Ljuban
-Ljubica
-Ljubinka
-Ljubisa
-Ljubivoje
-Ljubo
-Ljubomir
-Ljubow
-Ljuca
-Ljudmila
-Llewelyn
-Lloyd
-Lobo
-Loebnitz
-Loher
-Loic
-Lokman
-Lola
-Lolita
-Lolo
-Lona
-Lone
-Longin
-Longina
-Loni
-Lonie
-Lonn
-Lonny
-Lony
-Lookmann
-Lopes
-Lopez
-Lora
-Lorant
-Lorchen
-Lore
-Loredana
-Lorelies
-Loren
-Lorena
-Lorenette
-Lorens
-Lorentz
-Lorenz
-Lorenza
-Lorenze
-Lorenzo
-Loreta
-Loreto
-Loretta
-Lorette
-Lori
-Lorin
-Lorina
-Loris
-Lorita
-Loritz
-Lorle
-Lorna
-Lorraine
-Lory
-Lotar
-Lotfi
-Lotha
-Lothar
-Lother
-Lotje
-Lotta
-Lottchen
-Lotte
-Lottegrete
-Lotti
-Lotty
-Lotz
-Lou
-Louis
-Louisa
-Louise
-Louisette
-Loukas
-Loukili
-Loulou
-Lourdes
-Lourenco
-Lovro
-Loy
-Lrs
-Lu
-Luana
-Luba
-Lubbo
-Lubisch
-Lubitza
-Lubomir
-Luc
-Luca
-Lucan
-Lucano
-Lucas
-Luci
-Lucia
-Lucian
-Luciana
-Luciano
-Lucic
-Lucie
-Lucien
-Lucienne
-Lucija
-Lucina
-Lucinka
-Lucio
-Lucius
-Lucja
-Lucjan
-Lucretia
-Lucrezia
-Lucy
-Lucyna
-Ludgarda
-Ludger
-Ludgera
-Ludgerus
-Ludi
-Ludmila
-Ludmilla
-Ludo
-Ludof
-Ludolf
-Ludolfine
-Ludovic
-Ludovica
-Ludovico
-Ludovika
-Ludowika
-Ludvik
-Ludwig
-Ludwiga
-Ludwik
-Ludwin
-Ludwina
-Ludwine
-Ludwing
-Luer
-Luetfi
-Lui
-Luigi
-Luigia
-Luigino
-Luis
-Luisa
-Luise
-Luisella
-Luitgard
-Luitgart
-Luitjen
-Luitpold
-Luiza
-Luka
-Lukadia
-Lukardis
-Lukas
-Lul
-Lule
-Lulu
-Lulzim
-Luna
-Lund
-Lupo
-Lupold
-Lurtz
-Lusia
-Luta
-Lutfi
-Lutfiye
-Lutger
-Luther
-Lutvi
-Lutvija
-Lutwin
-Lutz
-Luule
-Lux
-Luz
-Luzha
-Luzi
-Luzia
-Luzian
-Luzie
-Luzifer
-Luzine
-Luzy
-Ly
-Lya
-Lyda
-Lydia
-Lydie
-Lydija
-Lykke
-Lyle
-Lynda
-Lynn
-Lynne
-Lysann
-Lyubica
-MEROLA
-Maadour
-Maam
-Maan
-Maarit
-Maat
-Maatje
-Mab
-Mabel
-Mable
-Mabrouk
-Mac
-Machi
-Machir
-Macide
-Maciej
-Macit
-Mack
-Macke
-Madalena
-Maddalena
-Maddy
-Madelaine
-Madeleine
-Madelen
-Madeline
-Madia
-Madina
-Madjid
-Madlen
-Madlena
-Madonna
-Mads
-Madunic
-Mady
-Mae
-Maena
-Mafalda
-Mafuk
-Magareta
-Magarete
-Magaretha
-Magarethe
-Magda
-Magdalen
-Magdalena
-Magdalene
-Magdalina
-Magdelena
-Magdi
-Magdolna
-Magdy
-Maged
-Maggi
-Maggie
-Magidy
-Magita
-Magna
-Magni
-Magno
-Magnus
-Magret
-Magreta
-Magrit
-Magsood
-Mahamoud
-Maharan
-Mahboob
-Mahboub
-Mahbub
-Mahbube
-Mahdi
-Maher
-Mahfooz
-Mahgul
-Mahin
-Mahinic
-Mahir
-Mahitipol
-Mahjouba
-Mahjoubi
-Mahmad
-Mahmat
-Mahmed
-Mahmet
-Mahmmood
-Mahmond
-Mahmood
-Mahmoud
-Mahmound
-Mahmout
-Mahmud
-Mahmure
-Mahmut
-Mahrdeha
-Mahsuni
-Maic
-Maida
-Maide
-Maidel
-Maidlin
-Maija
-Maik
-Maika
-Maike
-Maiken
-Maiko
-Maimana
-Main
-Maina
-Maio
-Maiqorota
-Maira
-Mais
-Maita
-Maja
-Majbritt
-Majda
-Majde
-Majdi
-Majeed
-Majida
-Majna
-Majo
-Majre
-Makas
-Makbule
-Makir
-Maksut
-Malaika
-Malaine
-Malcher
-Malcolm
-Maleika
-Malek
-Malen
-Malene
-Malgorzata
-Mali
-Malic
-Maliehe
-Malies
-Maliha
-Malik
-Malika
-Malike
-Malikejder
-Malimure
-Malin
-Malina
-Malitta
-Malka
-Malki
-Malkic
-Malla
-Malle
-Malou
-Malte
-Malve
-Malwine
-Mamdouh
-Mamo
-Mamoun
-Manada
-Manda
-Mandana
-Mandus
-Mandy
-Manel
-Manfr
-Manfred
-Manfredi
-Manfredo
-Manfried
-Mangold
-Mangrethe
-Mani
-Maniela
-Manik
-Manina
-Manirul
-Manja
-Manjen
-Manoah
-Manola
-Manolito
-Manolya
-Manon
-Manouchehr
-Manrico
-Mansoar
-Mansoor
-Mansour
-Mansueto
-Mansur
-Manu
-Manuel
-Manuela
-Manuele
-Manuelle
-Manutchehr
-Manutschehr
-Many
-Manzoor
-Mao
-Maqsood
-Mara
-Maral
-Marange
-Maranje
-Marat
-Marauge
-Maravge
-Maravgi
-Marc
-Marcel
-Marcela
-Marcelino
-Marcell
-Marcella
-Marcelle
-Marcellina
-Marcello
-Marcelo
-Marchak
-Marcia
-Marciana
-Marciano
-Marcin
-Marcinek
-Marco
-Marcos
-Marcous
-Marcus
-Mardjan
-Mare
-Mareen
-Marei
-Mareike
-Mareile
-Marek
-Mareka
-Mareke
-Marella
-Marem
-Maren
-Marena
-Maresa
-Maresi
-Maret
-Marga
-Margaliese
-Margard
-Margaret
-Margareta
-Margarete
-Margareth
-Margaretha
-Margarethe
-Margarida
-Margarita
-Margaritta
-Margarte
-Margerete
-Margerita
-Marget
-Margherita
-Margid
-Margit
-Margita
-Margite
-Margith
-Margitta
-Margot
-Margotd
-Margott
-Margred
-Margreet
-Margret
-Margrete
-Margreth
-Margrethe
-Margrid
-Margrit
-Margrita
-Margrith
-Marguerite
-Margund
-Mari
-Maria
-Mariam
-Marian
-Mariana
-Mariane
-Mariangela
-Mariann
-Marianna
-Marianne
-Mariano
-Mariawalburg
-Marica
-Marichen
-Marie
-Marieanne
-Mariechen
-Marieen
-Mariela
-Mariele
-Marielen
-Marielena
-Marielies
-Marieliese
-Marielise
-Mariella
-Marielle
-Marielo
-Marielu
-Marieluise
-Marieta
-Marietheres
-Marietta
-Mariette
-Marifa
-Marij
-Marija
-Marijan
-Marijana
-Marijka
-Marijke
-Marik
-Marika
-Marike
-Mariko
-Marile
-Marilen
-Marilena
-Marilene
-Marili
-Marilie
-Marilies
-Marilyn
-Marilyne
-Marin
-Marina
-Marine
-Marinel
-Marinetta
-Marinko
-Marino
-Marinos
-Marinus
-Mario
-Marioara
-Mariola
-Marion
-Mariona
-Maris
-Marisa
-Mariska
-Marisol
-Marit
-Marita
-Maritha
-Maritheres
-Marithres
-Maritta
-Maritza
-Marius
-Mariusz
-Marivan
-Marja
-Marjan
-Marjana
-Marjanna
-Marjeta
-Marjetta
-Marjo
-Marjorie
-Marjut
-Mark
-Market
-Marketa
-Markfried
-Markje
-Markku
-Marko
-Markos
-Markus
-Markward
-Markwart
-Marla
-Marlanne
-Marleen
-Marlen
-Marlena
-Marlene
-Marli
-Marlien
-Marlies
-Marliese
-Marlis
-Marlise
-Marlit
-Marlitt
-Marlon
-Marlow
-Marlowe
-Marly
-Marma
-Marnix
-Marny
-Maro
-Marogi
-Maron
-Marona
-Marouf
-Marrazzo
-Marret
-Marri
-Marry
-Marshall
-Marta
-Marte
-Marten
-Martens
-Martha
-Marthe
-Marthen
-Marthias
-Marti
-Martia
-Martien
-Martin
-Martina
-Martine
-Martinez
-Martinho
-Martino
-Martins
-Martje
-Martl
-Marton
-Martos
-Martti
-Martyna
-Maruf
-Marugi
-Marulyn
-Marus
-Marvin
-Marwan
-Marwin
-Marx
-Mary
-Maryam
-Maryan
-Maryana
-Maryline
-Marylyn
-Maryse
-Marzell
-Marzella
-Marzellin
-Marzena
-Marziye
-Marzouk
-Masa
-Masallah
-Masaud
-Mascha
-Masen
-Mases
-Masha
-Maslu
-Maso
-Masoom
-Masoud
-Masoume
-Masoumeh
-Masoumek
-Masrur
-Massimiliano
-Massimo
-Massoud
-Mastouri
-Masuda
-Masum
-Masut
-Mat
-Mate
-Mateja
-Maternus
-Mathewkutty
-Mathias
-Mathieu
-Mathilde
-Mathilder
-Mathis
-Matias
-Matie
-Matieu
-Matija
-Matije
-Matilda
-Matilde
-Matina
-Matis
-Matka
-Mato
-Matos
-Matouk
-Mats
-Matt
-Matteo
-Matthes
-Mattheus
-Matthew
-Matthia
-Matthias
-Matthis
-Matti
-Mattias
-Matvei
-Maud
-Maude
-Mauran
-Maureen
-Mauri
-Maurice
-Mauricio
-Mauritius
-Mauritz
-Maurizio
-Mauro
-Maus
-Mavis
-Mavizer
-Mawuli
-Max
-Maxi
-Maxim
-Maxime
-Maximilian
-Maximiliane
-Maximino
-Maximo
-Maximus
-Maxwell
-May
-Maya
-Maybrit
-Maybritt
-Maybritta
-Mayed
-Mayer
-Mayir
-Mayk
-Mayr
-Maysar
-Mazen
-Mazgen
-Mazhar
-Mazlum
-Mazlun
-Mcgowan
-Mchael
-Meart
-Meaza
-Mebrat
-Mecatten
-Mecdi
-Mechmet
-Mechtab
-Mechthild
-Mechthilde
-Mechtild
-Mechtilde
-Mecide
-Mecit
-Meclude
-Mecnun
-Medard
-Medardus
-Medea
-Medeni
-Medet
-Media
-Mediha
-Medina
-Medine
-Medini
-Medo
-Medtin
-Medzad
-Medzid
-Mee
-Meena
-Meent
-Meer
-Mefa
-Meftun
-Megan
-Meggi
-Meggie
-Meggy
-Mehamed
-Mehamet
-Mehbube
-Mehdi
-Mehic
-Mehida
-Mehinbasic
-Mehinovic
-Mehir
-Mehmed
-Mehmedalija
-Mehmedov
-Mehment
-Mehmet
-Mehmetali
-Mehmetmusa
-Mehmood
-Mehmut
-Mehrdad
-Mehrdokht
-Mehriban
-Mehtap
-Mehttin
-Mehyieldin
-Meibrit
-Meic
-Meicel
-Meik
-Meike
-Meiko
-Meina
-Meinart
-Meinert
-Meinhard
-Meinhardt
-Meinhart
-Meinhold
-Meino
-Meinolf
-Meinrad
-Meint
-Meio
-Meira
-Meit
-Melahat
-Melaine
-Melakat
-Melani
-Melania
-Melanie
-Melanius
-Melany
-Melba
-Melchior
-Melchiore
-Melchiorre
-Melchor
-Melda
-Melek
-Melemez
-Melet
-Melf
-Melida
-Melih
-Meliha
-Melik
-Melime
-Melina
-Melinda
-Melisa
-Melissa
-Melita
-Melitta
-Melk
-Melki
-Melle
-Melona
-Melsene
-Melven
-Melvin
-Memduh
-Memet
-Memeth
-Memili
-Memis
-Memmo
-Memnuna
-Memsud
-Men
-Menachem
-Menai
-Menda
-Mendel
-Menderes
-Mendrers
-Menduh
-Menekse
-Menelaos
-Menendi
-Meneo
-Mengistn
-Mengonli
-Menke
-Menko
-Menna
-Menne
-Menno
-Meno
-Menotti
-Mensad
-Menso
-Mensur
-Mensure
-Mentor
-Mentz
-Menz
-Meral
-Mercan
-Mercedes
-Mercy
-Merdan
-Merdanovic
-Merdin
-Meredith
-Meremi
-Merete
-Merga
-Mergem
-Meri
-Meriam
-Meric
-Merike
-Meris
-Merit
-Merita
-Meriyem
-Merja
-Merk
-Merle
-Merlin
-Merlut
-Mermet
-Merna
-Merobi
-Merset
-Mert
-Merte
-Merter
-Mertin
-Merve
-Mery
-Meryem
-Meryen
-Meryern
-Merzal
-Meset
-Mesina
-Mesnet
-Mesrur
-Messaoui
-Messelina
-Mestan
-Mesud
-Mesure
-Mesut
-Meta
-Mete
-Metella
-Metha
-Metim
-Metin
-Metiye
-Metodije
-Metta
-Mette
-Mevia
-Mevlit
-Mevludin
-Mevlut
-Meyer
-Meyveci
-Mezakez
-Mezian
-Mezit
-Mfid
-Mgoter
-Mhamed
-Mia
-Miammer
-Mian
-Miane
-Mica
-Micael
-Micaela
-Micah
-Micha
-Michael
-Michaela
-Michaele
-Michaelis
-Michail
-Michal
-Michalakis
-Michale
-Michalina
-Michaly
-Michan
-Miche
-Michel
-Michela
-Michelangelo
-Michele
-Michelina
-Micheline
-Michelino
-Michell
-Michelle
-Michi
-Michiko
-Michle
-Michuael
-Mick
-Mickey
-Micky
-Mico
-Midhad
-Midhat
-Mie
-Mieczylaw
-Mieczyslaw
-Mieczyslawa
-Mieke
-Miena
-Miesa
-Miftar
-Mignon
-Miguel
-Mih
-Mihaela
-Mihai
-Mihail
-Mihajlo
-Mihaly
-Mihat
-Miho
-Mihrali
-Mihran
-Mihriban
-Mihrican
-Miina
-Mijo
-Mika
-Mikael
-Mikaela
-Mikail
-Mikala
-Mikayil
-Mikdat
-Mike
-Mikel
-Mikhail
-Mikie
-Mikki
-Mikko
-Miklos
-Miko
-Mikolaj
-Miktat
-Mila
-Milada
-Milagros
-Milan
-Milana
-Milanka
-Milda
-Mildred
-Mile
-Milena
-Milenka
-Milenko
-Mileva
-Milhazim
-Milica
-Milicia
-Milina
-Milita
-Milivoje
-Miliza
-Miljan
-Miljena
-Miljenka
-Milko
-Milla
-Milli
-Millicent
-Millichent
-Millo
-Milly
-Milomir
-Milorad
-Milos
-Milosev
-Milosz
-Miloud
-Miltiades
-Miltiadis
-Milutin
-Milva
-Milvan
-Mima
-Mimi
-Mimke
-Mimmi
-Mimon
-Mimoun
-Mimount
-Mina
-Minas
-Minchen
-Mine
-Ming
-Minhild
-Mini
-Minje
-Minka
-Minko
-Minna
-Minni
-Minny
-Mino
-Minou
-Mioara
-Miodrag
-Mira
-Mirabi
-Mirahmad
-Mirali
-Miranda
-Mirat
-Mircea
-Mirco
-Mireille
-Mirella
-Mirelle
-Mireme
-Mireya
-Mirgun
-Miri
-Miriam
-Mirijam
-Mirilashvili
-Mirilla
-Mirja
-Mirjam
-Mirjami
-Mirjan
-Mirjana
-Mirka
-Mirko
-Mirma
-Mirna
-Mirnije
-Miro
-Miroljubika
-Miroslaus
-Miroslav
-Miroslava
-Miroslaw
-Miroslawa
-Miroslowa
-Mirsad
-Mirsada
-Mirwais
-Mirwaiss
-Miryam
-Mirza
-Mirzet
-Mirzeta
-Misa
-Misael
-Misali
-Misbah
-Mischa
-Misha
-Misko
-Misto
-Misu
-Misut
-Mita
-Mitat
-Mitchell
-Mithat
-Mithra
-Mitja
-Mitkat
-Mitko
-Mito
-Mitra
-Mitsou
-Miyase
-Mizgin
-Miábach
-Mladen
-Mmartin
-Modest
-Modesta
-Modesto
-Moed
-Mofjtaba
-Mogens
-Moh
-Mohamad
-Mohamed
-Mohamedin
-Mohamer
-Mohammad
-Mohammed
-Mohammet
-Mohammid
-Mohand
-Mohandas
-Mohmadiy
-Mohmand
-Mohmaned
-Mohmud
-Mohsen
-Mohssen
-Mohtaram
-Mohyeldin
-Moia
-Moiken
-Moise
-Moises
-Mojgan
-Mokhtar
-Mokhtet
-Moladad
-Molly
-Molo
-Molood
-Molud
-Momme
-Momoun
-Mona
-Monawara
-Moncef
-Mondher
-Mone
-Monett
-Moni
-Monica
-Moniera
-Monik
-Monika
-Monique
-Monira
-Monita
-Monitore
-Monja
-Monka
-Montesclaros
-Montgomery
-Monzer
-Mopic
-Morad
-Morandinus
-Morat
-Mordai
-Mordan
-Moreira
-Morel
-Morena
-Morice
-Morid
-Morina
-Moris
-Moritz
-Morris
-Morten
-Morteza
-Morton
-Mosa
-Moschos
-Moses
-Mosolf
-Mostafa
-Mostapha
-Mota
-Mote
-Mouloud
-Moumtaz
-Mouna
-Mounir
-Mousa
-Moussa
-Moustafa
-Mouzaffar
-Mrie
-Muaed
-Mualla
-Muamer
-Muammer
-Muammet
-Muatafa
-Mubacher
-Mubarac
-Mubarik
-Mubashar
-Mubasher
-Mudassar
-Muersel
-Mufail
-Mugaddes
-Mugain
-Muha
-Muhabbet
-Muhamad
-Muhamber
-Muhamed
-Muhament
-Muhammad
-Muhammed
-Muhammer
-Muhammet
-Muharem
-Muharema
-Muharram
-Muharrem
-Muharren
-Muharvem
-Muhattin
-Muhiddin
-Muhide
-Muhip
-Muhit
-Muhittin
-Muhlis
-Muho
-Muhsem
-Muhsen
-Muhsin
-Muhsine
-Muhtalip
-Muhteber
-Muhterem
-Muhtesem
-Muhummut
-Muhyettin
-Muir
-Muja
-Mujagic
-Mujgan
-Mujo
-Mukadder
-Mukaddes
-Mukarrem
-Mukheimer
-Mukhtar
-Mukhter
-Mukremin
-Muktet
-Mulawa
-Mulise
-Muljazim
-Mulla
-Mumin
-Mumine
-Mumtaz
-Mun
-Munat
-Munawar
-Mundi
-Mundus
-Munib
-Munir
-Munnawar
-Munnes
-Munur
-Mura
-Murad
-Muradiye
-Murat
-Murath
-Murato
-Murharrem
-Muriel
-Muriye
-Murlat
-Murray
-Mursel
-Mursit
-Murtaza
-Murtez
-Murteze
-Murwan
-Mus
-Musa
-Musaf
-Musaffer
-Musah
-Musan
-Musavet
-Musawar
-Muse
-Mushtao
-Mushtaq
-Musi
-Music
-Musie
-Muslat
-Musli
-Muslih
-Muslim
-Muslu
-Muslum
-Musrettin
-Mussawar
-Mustafa
-Mustaja
-Mustak
-Mustapha
-Mustfa
-Muteber
-Mutlu
-Mutsan
-Muttalig
-Muttalip
-Muvaffak
-Muzafer
-Muzaffar
-Muzaffer
-Muzajfer
-Muzekka
-Muzzafer
-Mviserref
-Myke
-Myrah
-Myren
-Myriam
-Myrjam
-Myrta
-Myrte
-Myrtha
-Myrthe
-Naaman
-Naazar
-Nabahat
-Nabar
-Nabi
-Nabih
-Nabil
-Nabila
-Nabili
-Nacar
-Naci
-Naciye
-Nacrye
-Nada
-Nadedja
-Nadeem
-Nader
-Naderschah
-Nadeschda
-Nadesha
-Nadeshda
-Nadezda
-Nadi
-Nadia
-Nadica
-Nadide
-Nadim
-Nadin
-Nadine
-Nadir
-Nadira
-Nadire
-Nadiya
-Nadiye
-Nadja
-Nadjeschda
-Nadjiba
-Nadjibollah
-Nadschibeh
-Nadya
-Naeem
-Naen
-Nafasat
-Nafees
-Nafi
-Nafia
-Nafis
-Nafisa
-Nafissa
-Nafiye
-Nafiz
-Nafka
-Nafuh
-Nagaschzade
-Nagenguel
-Nagibullah
-Nagihan
-Nagip
-Nagiyen
-Nagkmek
-Naglaa
-Nagwa
-Nahayan
-Nahdia
-Naheem
-Nahid
-Nahide
-Nahim
-Nahit
-Nahmen
-Nahrim
-Naide
-Naig
-Naika
-Nail
-Naile
-Naim
-Naima
-Naime
-Naine
-Naip
-Nais
-Najia
-Najib
-Najiba
-Najibullah
-Najma
-Najmi
-Nake
-Naki
-Nakiye
-Nalan
-Nalis
-Namaz
-Nami
-Namice
-Namik
-Namiye
-Namli
-Namuk
-Nana
-Nancy
-Nand
-Nanda
-Nandi
-Nandlal
-Nandor
-Nanel
-Nanett
-Nanette
-Nanja
-Nanke
-Nanna
-Nanne
-Nannet
-Nannete
-Nannette
-Nanni
-Nanno
-Nanny
-Nante
-Nantke
-Nany
-Naomi
-Napoleon
-Naquiwollah
-Narcelio
-Narciso
-Narges
-Naria
-Narije
-Nariman
-Narin
-Nart
-Nasar
-Naseer
-Naser
-Nasfi
-Nasibe
-Nasife
-Nasih
-Nasiha
-Nasim
-Nasimzabah
-Nasip
-Nasir
-Nasire
-Nasis
-Nasita
-Nasmiye
-Nasouh
-Nasreddin
-Nasreen
-Nasrin
-Nasrullah
-Nasser
-Nassrin
-Nastasi
-Nastasja
-Nasuf
-Nasuh
-Natacha
-Natale
-Natalia
-Natalie
-Natalija
-Natalina
-Natalino
-Natalio
-Natalja
-Nataly
-Natalya
-Natanja
-Natasa
-Natascha
-Natascia
-Natasha
-Nathalia
-Nathalie
-Nathaly
-Nathan
-Natice
-Natik
-Natividad
-Natja
-Natthias
-Natursteine
-Natzie
-Naum
-Naun
-Nausikaa
-Navin
-Naviz
-Nawae
-Nawal
-Nawaz
-Nawzad
-Nayif
-Nayme
-Naymetten
-Nazaire
-Nazan
-Nazar
-Nazareno
-Nazari
-Naze
-Nazi
-Nazif
-Nazife
-Nazih
-Naziha
-Nazije
-Nazik
-Nazike
-Naziker
-Naziknaz
-Nazile
-Nazim
-Nazime
-Nazin
-Nazip
-Nazir
-Nazire
-Nazit
-Naziye
-Nazli
-Nazmettin
-Nazmi
-Nazmije
-Nazmiye
-Nazrul
-Nazzareno
-Neaga
-Neati
-Nebahat
-Nebahattin
-Nebat
-Nebe
-Nebi
-Nebih
-Nebiha
-Nebil
-Nebiye
-Nebojsa
-Necat
-Necati
-Necatin
-Necattin
-Necdet
-Necedet
-Necef
-Necemettin
-Neceti
-Necfa
-Necia
-Necibe
-Necip
-Necit
-Necla
-Necmetin
-Necmettin
-Necmi
-Necmittin
-Necmiye
-Nectet
-Neda
-Nedaret
-Neddal
-Nedeljko
-Nedeltcho
-Nedim
-Nedime
-Nedin
-Nedine
-Nedjalko
-Nedo
-Nedret
-Nedzad
-Neel
-Neeltje
-Neera
-Neeus
-Nefise
-Negar
-Negead
-Nehat
-Nehbatti
-Neidet
-Neidhard
-Neil
-Neithard
-Nejat
-Nejda
-Nejdet
-Nejme
-Nejmi
-Nektarios
-Nela
-Nelda
-Nele
-Nelja
-Nelli
-Nellie
-Nellies
-Nello
-Nelly
-Nelson
-Nelu
-Nena
-Nenad
-Neon
-Neonila
-Nepomuk
-Neral
-Nerdzad
-Nerettin
-Nergis
-Nergiz
-Neriman
-Neriyman
-Nermin
-Nermina
-Nerzat
-Nesanet
-Nesanir
-Nesat
-Nese
-Nesefi
-Neset
-Nesia
-Nesib
-Nesibe
-Neside
-Nesil
-Nesim
-Nesimi
-Nesip
-Neslihan
-Neso
-Nesrim
-Nesrin
-Nessin
-Nestor
-Net
-Neta
-Neto
-Nette
-Neurize
-Neus
-Neusa
-Neuzat
-Neva
-Nevaf
-Neval
-Nevenka
-Neves
-Nevim
-Nevin
-Nevra
-Nevriye
-Nevruz
-Nevsat
-Nevzat
-Nevzet
-Nexhmi
-Neydet
-Nezafet
-Nezahat
-Nezahet
-Nezaket
-Nezamettin
-Nezamuddin
-Nezehat
-Neziah
-Nezih
-Nezihe
-Nezinat
-Nezir
-Nezntet
-Nezra
-Ngoc
-Nia
-Niazi
-Nic
-Nica
-Nicanor
-Nicat
-Niccolo
-Nicholas
-Nichole
-Nicile
-Nick
-Nickel
-Nickels
-Nicklas
-Nickmohammad
-Nickolaus
-Nickolei
-Nicky
-Niclas
-Nico
-Nicodemus
-Nicoie
-Nicol
-Nicola
-Nicolai
-Nicolaie
-Nicolangelo
-Nicolaos
-Nicolas
-Nicolaus
-Nicolay
-Nicold
-Nicole
-Nicolett
-Nicoletta
-Nicolette
-Nicolina
-Nicoline
-Nicolle
-Nicolo
-Nicos
-Nida
-Nidal
-Nidayi
-Nidia
-Niels
-Nies
-Nieves
-Nifiye
-Nigar
-Nigazi
-Nigel
-Nigisti
-Nihad
-Nihal
-Nihan
-Nihat
-Nihayet
-Nijaz
-Nijazi
-Nik
-Nike
-Niki
-Nikifor
-Nikiforos
-Nikita
-Niklaos
-Niklas
-Niklaus
-Niko
-Nikodemus
-Nikodije
-Nikola
-Nikolai
-Nikolaj
-Nikolajewitsch
-Nikolajs
-Nikolaos
-Nikolas
-Nikolaus
-Nikolay
-Nikole
-Nikolei
-Nikoletta
-Nikolina
-Nikoline
-Nikolos
-Nikos
-Niku
-Nil
-Nilay
-Nilefar
-Niler
-Nilgun
-Nilla
-Nilofar
-Nilolaj
-Nils
-Nilufer
-Nima
-Nimer
-Nimet
-Nimettin
-Nimfa
-Nimon
-Nina
-Ninel
-Ninette
-Nini
-Ninja
-Nino
-Ninon
-Nis
-Nisane
-Nisani
-Nisar
-Nisha
-Nisveta
-Nita
-Nives
-Niyazi
-Niyzzi
-Niza
-Nizam
-Nizamethin
-Nizamettin
-Nizami
-Nizomettin
-Nlandu
-Noa
-Noack
-Noah
-Nobert
-Noberto
-Noble
-Noe
-Noel
-Noi
-Noman
-Nomi
-Nomine
-Nonna
-Noor
-Noorahmad
-Noori
-Nopakao
-Nora
-Norban
-Norber
-Norbert
-Norberto
-Norbet
-Norbrt
-Nord
-Nordika
-Nordin
-Nordmann
-Nore
-Noreen
-Norena
-Norfried
-Nori
-Noria
-Noriko
-Norma
-Norman
-Normann
-Normen
-Norna
-Norsen
-Nortje
-Nortrud
-Norwin
-Notburga
-Notger
-Notker
-Notruf
-Nouraddin
-Nourbakhsh
-Nourdin
-Noureddine
-Nouri
-Nouro
-Novica
-Noyal
-Noyan
-Nuammer
-Nubia
-Nuell
-Nufat
-Nuh
-Nuha
-Nuhi
-Nuhmehmet
-Nuho
-Numan
-Nunita
-Nuno
-Nunzia
-Nunziata
-Nunzio
-Nura
-Nurahmet
-Nural
-Nuran
-Nurat
-Nurattin
-Nurau
-Nuray
-Nurbanu
-Nurcan
-Nurcin
-Nurdan
-Nurdane
-Nurden
-Nurdogan
-Nure
-Nureddin
-Nurel
-Nuretin
-Nurettin
-Nureyttin
-Nurhan
-Nurhayat
-Nurhayaz
-Nurhayet
-Nuri
-Nuria
-Nurittin
-Nuriye
-Nurkan
-Nurma
-Nurretin
-Nursan
-Nursefa
-Nursel
-Nursen
-Nursun
-Nurten
-Nurulla
-Nurullah
-Nurzettin
-Nuserettin
-Nusiys
-Nusrat
-Nusret
-Nusse
-Nydia
-Oalf
-Oba
-Obaid
-Obdulia
-Obed
-Occo
-Ocke
-Octavia
-Octavian
-Octavio
-Oda
-Odabas
-Odal
-Odett
-Odetta
-Odette
-Odile
-Odilia
-Odilie
-Odin
-Odo
-Odri
-Odysseus
-Oed
-Oehmer
-Oemer
-Oentwerk
-Oezdemir
-Oezel
-Oezer
-Oflu
-Ogul
-Ogun
-Oguz
-Oguzhan
-Oguzkan
-Ohannes
-Okan
-Okay
-Okban
-Okcan
-Okcu
-Oke
-Okko
-Oksan
-Oktan
-Oktav
-Oktay
-Okumus
-Okutan
-Ola
-Olaf
-Olav
-Olberz
-Olcay
-Olcayto
-Olda
-Oldrich
-Ole
-Oleg
-Olegario
-Olena
-Olev
-Olf
-Olga
-Olgan
-Olgierd
-Olgun
-Olimpia
-Olimpio
-Olina
-Olinda
-Oliva
-Olive
-Olivella
-Oliver
-Oliveri
-Olivia
-Olivie
-Olivier
-Oliviero
-Oliwa
-Olla
-Olli
-Olly
-Olof
-Olrik
-Olsay
-Oltmann
-Olu
-Oluf
-Olympia
-Omana
-Omar
-Omareit
-Ome
-Omer
-Ommo
-Omri
-Ona
-Onat
-Onay
-Onder
-Onesimus
-Onke
-Onmaz
-Onnen
-Onner
-Onnik
-Onno
-Onofrio
-Onorato
-Ontje
-Onu
-Onur
-Onzas
-Ophelia
-Opitz
-Orak
-Oranna
-Orazia
-Orazio
-Orbay
-Orcun
-Ored
-Orest
-Oreste
-Orestis
-Orhan
-Orhankazi
-Orhant
-Orhun
-Oriano
-Orkun
-Orlando
-Orlega
-Orlinde
-Orman
-Ornan
-Ornella
-Oronzo
-Orpa
-Orpha
-Orpheus
-Orta
-Ortlieb
-Ortraud
-Ortrud
-Ortrun
-Ortwin
-Oruc
-Osama
-Osazee
-Osborne
-Oscar
-Oschwald
-Ose
-Osei
-Osgit
-Oshan
-Oskar
-Osman
-Osmanzisan
-Osmar
-Osmic
-Osmo
-Ossamah
-Ossana
-Ossi
-Ostaja
-Osvaldo
-Oswald
-Oswaldo
-Oswalt
-Oswin
-Oswina
-Otfried
-Otger
-Othman
-Othmar
-Otilia
-Otilie
-Otmar
-Oto
-Ott
-Ottaviano
-Ottavio
-Ottfried
-Ottheinrich
-Otti
-Ottilde
-Ottilia
-Ottilie
-Ottillie
-Ottmar
-Otto
-Ottokar
-Ottomar
-Otty
-Otward
-Otwin
-Otylia
-Ouahid
-Ouba
-Oussama
-Out
-Outi
-Ova
-Ovali
-Ove
-Ovid
-Ovidio
-Ovidiu
-Owe
-Oxana
-Oya
-Oymak
-Ozan
-Ozcan
-Ozimek
-Ozkan
-Ozlem
-Ozra
-Paavo
-Pablo
-Paca
-Pacifico
-Paco
-Paddlel
-Pagona
-Paisan
-Pak
-Pakize
-Pal
-Pala
-Palizdar
-Palle
-Palma
-Paloma
-Pam
-Pamela
-Pamin
-Pamuk
-Pan
-Panagiatis
-Panagiodis
-Panagiota
-Panagiotes
-Panagiotis
-Panagrotis
-Panahi
-Panayota
-Panayotis
-Pancrazio
-Pandora
-Pankraz
-Pano
-Pantaleo
-Pantaleon
-Panteleimon
-Pantelis
-Panthelis
-Paola
-Paolini
-Paolo
-Papatya
-Paplos
-Paquito
-Parameswara
-Paraschos
-Paraskevi
-Paraskiewa
-Parfen
-Parfenowitsch
-Paricia
-Paridocht
-Parthena
-Partow
-Parvaneh
-Parvez
-Parvin
-Parvis
-Parviz
-Parwis
-Pasa
-Pasaga
-Pasal
-Pasan
-Pasana
-Pascal
-Pascale
-Pascha
-Paschale
-Paschalina
-Paschalis
-Pasin
-Paskal
-Paso
-Pasqale
-Pasqua
-Pasquale
-Pasqualina
-Passos
-Pastore
-Pat
-Patience
-Patric
-Patrice
-Patricia
-Patricio
-Patrick
-Patrik
-Patriz
-Patrizia
-Patrizio
-Patrtrick
-Patrus
-Patrycja
-Patti
-Patze
-Pau
-Paul
-Paula
-Paule
-Paulette
-Pauli
-Paulin
-Paulina
-Pauline
-Paulino
-Paulo
-Paulos
-Paulsen
-Paulus
-Pauna
-Pavel
-Pavlicek
-Pavlina
-Pavlos
-Pavo
-Pawel
-Pax
-Payan
-Paylos
-Pea
-Pecunia
-Pedro
-Peer
-Peggi
-Peggy
-Pehlivan
-Peinhard
-Pejo
-Pekin
-Pekka
-Peko
-Pelagia
-Pelin
-Pellegrina
-Pellegrino
-Pembe
-Penelope
-Penpe
-Pepe
-Pepi
-Peppi
-Peppino
-Pepsi
-Per
-Peran
-Peraya
-Percy
-Perdita
-Pere
-Pereira
-Perez
-Peri
-Periha
-Perihan
-Perikles
-Periklis
-Peris
-Perisan
-Peristera
-Periza
-Perjan
-Pernille
-Pero
-Perpetua
-Perplies
-Perry
-Persida
-Persieval
-Perta
-Peruz
-Pervin
-Peta
-Petar
-Pete
-Peter
-Peteris
-Peters
-Petra
-Petrat
-Petre
-Petrea
-Petri
-Petrick
-Petrina
-Petro
-Petronela
-Petronella
-Petronilla
-Petros
-Petru
-Petrus
-Petruschka
-Petter
-Peupe
-Pevrul
-Peyman
-Peymaneh
-Peyton
-Pha
-Pharam
-Phil
-Philhard
-Philine
-Philip
-Philipe
-Philipp
-Philippa
-Philippe
-Philippine
-Philippo
-Philippos
-Phillip
-Philomena
-Philomene
-Phyllis
-Pia
-Pidder
-Piek
-Pier
-Pierangelo
-Piere
-Piergiorgio
-Pierino
-Pierluigi
-Piermaurizio
-Piero
-Pierre
-Piers
-Pieruschka
-Piesztal
-Piet
-Pieter
-Pietra
-Pietro
-Pietsch
-Pilar
-Pile
-Pilgrim
-Piliz
-Pillai
-Pina
-Pinar
-Pinarbasi
-Pine
-Ping
-Pino
-Pio
-Piotr
-Piperre
-Pippa
-Pippo
-Piraye
-Pire
-Piri
-Pirino
-Pirjo
-Pirkko
-Pirmin
-Pirminius
-Piroska
-Piruz
-Pit
-Pitt
-Pius
-Pjeer
-Placido
-Plato
-Platon
-Plutarch
-Poeten
-Pol
-Polat
-Polatkan
-Pole
-Polikarpos
-Polina
-Polixeni
-Polte
-Polykarpos
-Polyxeni
-Pompeo
-Pompeyo
-Popke
-Popoola
-Porgy
-Porkash
-Posavec
-Pour
-Powel
-Poyraz
-Prachuap
-Praxedis
-Preben
-Predrag
-Prguda
-Primiano
-Primino
-Primo
-Prince
-Princeford
-Prisca
-Priscilla
-Priska
-Prokop
-Prosper
-Prospero
-Protas
-Provino
-Pru
-Publio
-Punito
-Pura
-Pyro
-Qadi
-Qadir
-Qamar
-Qasim
-Quadeer
-Quasam
-Qudratullah
-Queenie
-Quincy
-Quintino
-Quinto
-Quintus
-Quirin
-Quirina
-Quirino
-Quiroga
-Raaemallah
-Raas
-Rab
-Raba
-Rabab
-Raban
-Rabbah
-Rabbani
-Rabe
-Rabea
-Rabi
-Rabia
-Rabieh
-Rabih
-Rabii
-Rabija
-Rabiou
-Rabiye
-Rabo
-Rached
-Rachel
-Rachid
-Rachida
-Raci
-Radek
-Radela
-Radhika
-Radi
-Radic
-Radinka
-Radir
-Radisa
-Radivoj
-Radivoje
-Radmila
-Radmilla
-Radoja
-Radojka
-Radolf
-Radomir
-Radoslav
-Radoslaw
-Radoslay
-Radovan
-Raduolf
-Rae
-Raed
-Raf
-Rafa
-Rafael
-Rafaela
-Rafaele
-Rafal
-Rafaquat
-Rafat
-Rafe
-Rafet
-Raff
-Raffael
-Raffaela
-Raffaele
-Raffaella
-Raffaello
-Rafida
-Rafie
-Rafik
-Rafiq
-Rafique
-Ragiba
-Ragip
-Ragna
-Ragnar
-Ragnhild
-Rahal
-Rahali
-Raham
-Rahel
-Rahela
-Rahim
-Rahima
-Rahime
-Rahina
-Rahine
-Rahman
-Rahmat
-Rahmer
-Rahmi
-Rahnlid
-Rahoul
-Rahsan
-Raide
-Raif
-Raife
-Raija
-Raik
-Raika
-Raila
-Raili
-Raimar
-Raimer
-Raimo
-Raimon
-Raimond
-Raimondo
-Raimund
-Raimundo
-Raina
-Rainald
-Raine
-Rainer
-Rainfred
-Raingard
-Rainhard
-Rainhardt
-Rainhart
-Raino
-Raisa
-Raissa
-Raja
-Rajab
-Rajesh
-Rajha
-Raji
-Rajif
-Rajko
-Rajna
-Raju
-Rakip
-Ralf
-Raliner
-Ralp
-Ralph
-Raluca
-Ram
-Rama
-Ramachandra
-Ramadam
-Ramadan
-Ramadon
-Raman
-Ramasan
-Ramaza
-Ramazan
-Ramazen
-Ramazon
-Rami
-Ramie
-Ramin
-Ramiro
-Ramis
-Ramiz
-Ramiza
-Ramo
-Ramon
-Ramona
-Ramosan
-Ramsan
-Ramzi
-Ramzo
-Rana
-Ranalt
-Rancke
-Randa
-Randall
-Randi
-Randle
-Rando
-Randolf
-Randolph
-Randy
-Ranghild
-Rania
-Ranja
-Ranjan
-Ranka
-Ranko
-Rano
-Raomonoff
-Raoul
-Raphael
-Raphaela
-Raphaele
-Raquel
-Raschid
-Rashed
-Rasheed
-Rashid
-Rashida
-Rashied
-Rasi
-Rasid
-Rasih
-Rasiha
-Rasim
-Rasime
-Rasin
-Rasit
-Rasma
-Rasmus
-Rassan
-Rassoolbibi
-Rath
-Rathard
-Ratib
-Ratka
-Ratko
-Rauazan
-Rauf
-Raul
-Rautgundis
-Raven
-Rawah
-Rawi
-Ray
-Raya
-Rayan
-Rayk
-Rayko
-Raymond
-Raymund
-Raymundo
-Razak
-Razamahmood
-Razija
-Razit
-Raziye
-Re
-Rea
-Read
-Rebeca
-Rebecca
-Rebekka
-Rebelo
-Rebenaque
-Recai
-Recaj
-Recef
-Recep
-Recet
-Rechi
-Records
-Reda
-Redmer
-Redzep
-Redziba
-Reemt
-Reena
-Reent
-Refa
-Refat
-Refayeddin
-Refet
-Refi
-Refik
-Refika
-Refko
-Rega
-Regelinde
-Regina
-Reginald
-Reginaldo
-Reginbert
-Regine
-Regino
-Regula
-Reha
-Rehan
-Rehana
-Rehani
-Rehm
-Rehsan
-Reichert
-Reid
-Reider
-Reidun
-Reihhold
-Reihim
-Reijo
-Reik
-Reiko
-Reimar
-Reimer
-Reimo
-Reimond
-Reimund
-Reina
-Reinald
-Reinalde
-Reinar
-Reinard
-Reinbold
-Reinelde
-Reiner
-Reinert
-Reinfred
-Reinfried
-Reingard
-Reingold
-Reinhard
-Reinhardt
-Reinhart
-Reinhild
-Reinhilde
-Reinhold
-Reinholdt
-Reinholf
-Reinhyard
-Reini
-Reinke
-Reinlinde
-Reinmer
-Reino
-Reinold
-Reint
-Reintraud
-Reintraude
-Reintraut
-Reinulf
-Reinwald
-Reionhold
-Rejai
-Reka
-Rekabi
-Rekardo
-Rekawt
-Rela
-Releff
-Relinde
-Relindis
-Rella
-Rem
-Rembert
-Reme
-Remedios
-Remi
-Remig
-Remigius
-Remme
-Remmer
-Remmert
-Remmo
-Remo
-Remon
-Remus
-Remy
-Remzedin
-Remzi
-Remzia
-Remzige
-Remzija
-Remziye
-Remziyer
-Remzye
-Ren
-Rena
-Renald
-Renaldo
-Renan
-Renat
-Renata
-Renate
-Renato
-Renaud
-Rendel
-Rene
-Renee
-Reni
-Renilde
-Renke
-Renko
-Renne
-Reno
-Rens
-Renskea
-Rente
-Renz
-Renzi
-Renzo
-Res
-Resa
-Resad
-Resai
-Resat
-Rese
-Resel
-Resep
-Reserl
-Resi
-Resie
-Resit
-Resk
-Resli
-Resmi
-Resmiye
-Ressu
-Restom
-Resul
-Reta
-Retlaw
-Reto
-Retse
-Reuben
-Revisor
-Rewert
-Rex
-Rexford
-Reyan
-Reyhan
-Reymund
-Reynaldo
-Reza
-Rezan
-Rezene
-Rezvan
-Rheinhold
-Rhena
-Rhian
-Rhonda
-Rhun
-Ria
-Riad
-Rian
-Ric
-Rica
-Ricard
-Ricarda
-Ricardo
-Riccarda
-Riccardo
-Ricco
-Rich
-Richard
-Richarda
-Richardis
-Richardo
-Richards
-Richardt
-Richmond
-Richy
-Ricia
-Rick
-Ricklef
-Ricky
-Rico
-Ricus
-Rida
-Riduan
-Ridvan
-Rieke
-Riem
-Riemer
-Ries
-Rifar
-Rifat
-Rifi
-Rifki
-Rifo
-Rigas
-Rigat
-Riglef
-Rigmor
-Rigo
-Rigobert
-Rigoletto
-Rihani
-Riitta
-Rijelha
-Rik
-Rika
-Rike
-Riken
-Rikke
-Riko
-Rikus
-Riley
-Rim
-Rima
-Rime
-Rimon
-Rina
-Rinaldo
-Rinda
-Rinelde
-Ringo
-Rinhard
-Rinje
-Rino
-Riprand
-Risa
-Risto
-Rita
-Ritha
-Riti
-Ritta
-Rittana
-Ritva
-Ritz
-Riyad
-Riyat
-Riza
-Rizah
-Rizali
-Rizja
-Rizo
-Rizvan
-Rizvi
-Rizwana
-Roald
-Rob
-Robabeh
-Robbert
-Robby
-Robedrt
-Robert
-Roberta
-Robertino
-Roberto
-Robertus
-Robil
-Robin
-Robina
-Robinson
-Robyn
-Rocco
-Rochus
-Rocio
-Rockson
-Rocky
-Rode
-Roderich
-Roderick
-Roderik
-Rodger
-Rodi
-Rodica
-Rodina
-Rodion
-Rodja
-Rodney
-Rodolfo
-Rodrigo
-Rodrigues
-Rodriguez
-Roef
-Roel
-Roelaf
-Roelof
-Roemer
-Roerd
-Rof
-Rogan
-Roger
-Rogerio
-Rohan
-Rohde
-Rois
-Roisin
-Roja
-Roland
-Rolando
-Rolende
-Rolf
-Rolfe
-Rolka
-Rolla
-Rolo
-Rolph
-Roma
-Romain
-Roman
-Romana
-Romando
-Romano
-Romanus
-Romas
-Romeo
-Romer
-Romi
-Romijn
-Romina
-Rommy
-Romolo
-Romu
-Romuald
-Romualda
-Romualdas
-Romualdo
-Romulo
-Romulus
-Romy
-Ron
-Rona
-Ronald
-Ronaldo
-Ronalt
-Ronda
-Rong
-Roni
-Ronja
-Ronne
-Ronni
-Ronnie
-Ronny
-Rony
-Roohollah
-Rook
-Roolf
-Roos
-Ropbert
-Roque
-Rosa
-Rosalba
-Rosalia
-Rosalie
-Rosalina
-Rosalind
-Rosalinde
-Rosalta
-Rosamaria
-Rosamarie
-Rosamma
-Rosamunde
-Rosan
-Rosana
-Rosanda
-Rosania
-Rosanna
-Rosanne
-Rosaria
-Rosario
-Rosarita
-Rose
-Rosegund
-Rosel
-Roseli
-Roselie
-Roselies
-Roseliese
-Roselinde
-Rosella
-Roselore
-Roselyne
-Rosemaria
-Rosemarie
-Rosemary
-Rosemie
-Rosetta
-Rosi
-Rosia
-Rosie
-Rosieta
-Rosika
-Rosin
-Rosina
-Rosita
-Rositha
-Rosl
-Roslena
-Rosmarie
-Rosmary
-Rosolino
-Ross
-Rossana
-Rossi
-Rosslan
-Rostam
-Rosute
-Roswita
-Roswith
-Roswitha
-Rosy
-Rotafsa
-Rothauge
-Roto
-Rotraud
-Rotraut
-Rouajda
-Rouchsen
-Roussos
-Rouven
-Rowena
-Rowitha
-Roxana
-Roxane
-Roy
-Roya
-Royce
-Roza
-Rozalia
-Rozita
-Rozsa
-Rrustem
-Ruben
-Rubert
-Rubin
-Rubina
-Rubini
-Rubino
-Ruby
-Ruc
-Rude
-Rudhard
-Rudhardt
-Rudhild
-Rudi
-Rudina
-Rudl
-Rudo
-Rudolf
-Rudolfine
-Rudolfo
-Rudolfs
-Rudolph
-Rudy
-Ruediger
-Ruesdue
-Ruestam
-Rufaida
-Rufat
-Rufina
-Rufino
-Rufus
-Ruggiero
-Ruhan
-Ruhi
-Ruhin
-Ruhine
-Ruhsar
-Ruhsen
-Rui
-Rukije
-Rukiye
-Rul
-Rula
-Ruland
-Rulf
-Rulmann
-Rumen
-Rumiye
-Rumjana
-Rumo
-Runa
-Rune
-Runwald
-Rupert
-Ruperta
-Ruperto
-Rupertus
-Rupi
-Ruppert
-Ruppiner
-Rupprecht
-Ruprecht
-Rusanna
-Rusen
-Rusia
-Rusmila
-Rusmir
-Russell
-Rustem
-Rustico
-Rut
-Ruta
-Ruth
-Ruthard
-Rutherford
-Ruthild
-Ruthilde
-Ruthwitha
-Ruwald
-Ruward
-Ruy
-Ruya
-Ruza
-Ruzdija
-Ruzica
-Ruzuna
-Ryan
-Rymund
-Ryszard
-Saad
-Saadet
-Saadia
-Saaed
-Saara
-Saarez
-Saba
-Sabadin
-Sabah
-Sabahaddin
-Sabahadtin
-Sabahaldin
-Sabahat
-Sabahatdin
-Sabahattin
-Sabahattun
-Sabahiddin
-Sabahudin
-Saban
-Sabani
-Sabas
-Sabastian
-Sabat
-Sabatin
-Sabatino
-Sabato
-Sabbas
-Sabdi
-Sabe
-Sabella
-Saber
-Sabetay
-Sabi
-Sabia
-Sabien
-Sabiene
-Sabiha
-Sabin
-Sabina
-Sabine
-Sabino
-Sabir
-Sabire
-Sabit
-Sabiye
-Sabo
-Saboheta
-Saboor
-Sabra
-Sabri
-Sabrija
-Sabrina
-Sabriya
-Sabriye
-Sach
-Sacha
-Sachin
-Sacid
-Sacide
-Sacit
-Sadan
-Sadegh
-Sadet
-Sadeta
-Sadetti
-Sadettin
-Sadi
-Sadidin
-Sadife
-Sadig
-Sadija
-Sadik
-Sadika
-Sadin
-Sadiq
-Sadiye
-Sado
-Sadok
-Sadrettin
-Sadri
-Sadro
-Sadt
-Sadulla
-Sadullah
-Sadun
-Sady
-Saeed
-Saeedeh
-Saeid
-Saem
-Saer
-Saettin
-Safa
-Safaettin
-Safahat
-Safak
-Safeer
-Safer
-Safet
-Safeta
-Saffer
-Saffet
-Saffettin
-Safi
-Safia
-Safien
-Safija
-Safiya
-Safiye
-Safo
-Safoka
-Safularli
-Safwan
-Sagheer
-Saglam
-Saglik
-Sagrario
-Saha
-Sahab
-Sahadettin
-Sahali
-Sahamettin
-Sahan
-Sahap
-Sahaydar
-Saheb
-Saheila
-Sahhanim
-Sahib
-Sahika
-Sahime
-Sahimerdan
-Sahin
-Sahina
-Sahine
-Sahir
-Sahismail
-Sahit
-Sahize
-Sahizer
-Sahlay
-Sahli
-Sahra
-Sahraban
-Sahser
-Sahset
-Sahsigul
-Sahsinem
-Sahverdi
-Said
-Saida
-Saide
-Saidi
-Saidt
-Saika
-Saila
-Saim
-Saima
-Saime
-Saimi
-Sainah
-Sainer
-Saip
-Sait
-Saiyed
-Sajda
-Sajeda
-Sak
-Saka
-Sakar
-Sakari
-Sakarya
-Sake
-Saki
-Sakib
-Sakibe
-Sakiha
-Sakim
-Sakin
-Sakine
-Sakip
-Sakir
-Sakire
-Sako
-Sakriye
-Sal
-Sala
-Salah
-Salahadin
-Salahattin
-Salame
-Salameh
-Salan
-Saldiray
-Sale
-Saleem
-Saleh
-Salem
-Salhattin
-Sali
-Saliba
-Salice
-Salih
-Saliha
-Salik
-Salika
-Salim
-Salime
-Salin
-Salina
-Salindar
-Salise
-Salitt
-Saliye
-Salka
-Salkan
-Salke
-Salko
-Sallam
-Sallo
-Sally
-Salma
-Salmai
-Salman
-Salme
-Salmina
-Salome
-Salomea
-Salomon
-Salomone
-Saltan
-Salum
-Salustiano
-Salvador
-Salvadore
-Salvator
-Salvatora
-Salvatore
-Salvatrice
-Salve
-Salvina
-Salvino
-Salvo
-Salwa
-Sam
-Sama
-Samad
-Samai
-Saman
-Samantha
-Samar
-Samara
-Samareh
-Samas
-Sambol
-Samca
-Samed
-Samedin
-Samee
-Sameh
-Samel
-Samer
-Samera
-Samet
-Samettin
-Samhal
-Sami
-Samica
-Samih
-Samil
-Samim
-Samir
-Samira
-Samirah
-Samiye
-Samla
-Sammai
-Sammar
-Sammy
-Samojla
-Sampri
-Sampson
-Samson
-Samu
-Samuel
-Samuli
-Samuray
-Samy
-San
-Sana
-Sanaz
-Sancar
-Sancaroglu
-Sancho
-Sanda
-Sander
-Sandor
-Sandorf
-Sandra
-Sandrina
-Sandrine
-Sandro
-Sandy
-Saner
-Sanfila
-Sang
-Sangat
-Sani
-Sanita
-Saniye
-Saniyi
-Sanja
-Sanli
-Sanna
-Sanni
-Santa
-Santangelo
-Sante
-Santiago
-Santina
-Santino
-Santo
-Santos
-Sanur
-Sanver
-Saou
-Sapahaet
-Saphi
-Saphia
-Sara
-Sarac
-Sarafettin
-Sarah
-Saramma
-Saran
-Sarantis
-Sarar
-Saras
-Sargin
-Sargon
-Sari
-Saria
-Saricam
-Sarie
-Sarike
-Sarina
-Sarine
-Sarino
-Sarira
-Sarita
-Sariye
-Sarkawt
-Sarmina
-Saro
-Sartaj
-Sarwar
-Sas
-Sasa
-Sascha
-Sasha
-Saskia
-Sati
-Satilmis
-Satimis
-Satirios
-Satiye
-Satoshi
-Sattler
-Satu
-Saturnina
-Saturnino
-Saudettin
-Saumi
-Savas
-Savasan
-Saveria
-Saverino
-Saverio
-Savina
-Savine
-Savino
-Savli
-Savmi
-Savun
-Savure
-Savvas
-Sawato
-Sawats
-Sawsa
-Say
-Sayar
-Sayd
-Sayde
-Sayed
-Sayer
-Sayeste
-Sayf
-Saygi
-Sayim
-Sayime
-Sayin
-Sayo
-Sayri
-Saziye
-Scarlett
-Schadi
-Schadja
-Schafa
-Schalk
-Schamela
-Schangy
-Scharifa
-Schauckat
-Schaudt
-Scheerien
-Scheila
-Scher
-Schorsch
-Scopece
-Scott
-Seabastian
-Sean
-Sebaattin
-Sebahat
-Sebahattin
-Sebahedin
-Sebahi
-Sebald
-Sebastian
-Sebastiana
-Sebastiane
-Sebastiano
-Sebastiao
-Sebastien
-Sebat
-Sebati
-Sebatino
-Sebatratin
-Sebattin
-Seber
-Sebert
-Sebiha
-Sebile
-Sebina
-Sebnem
-Sebnen
-Sebohat
-Sebri
-Secaat
-Secahattin
-Secat
-Secati
-Secattin
-Secda
-Secgin
-Seckin
-Seco
-Secundino
-Seda
-Sedan
-Sedat
-Sede
-Sedef
-Sedegi
-Sedki
-Seeben
-Seeko
-Sefa
-Sefattin
-Sefcet
-Sefedin
-Sefeldin
-Sefer
-Seffer
-Seffet
-Sefija
-Sefik
-Sefika
-Sefike
-Sefil
-Sefkati
-Sefket
-Sefter
-Seger
-Segolia
-Segundo
-Segura
-Sehavet
-Seher
-Sehid
-Sehida
-Sehil
-Sehmis
-Sehnaz
-Sehniban
-Seho
-Sehriba
-Sehriban
-Sehymus
-Sehzad
-Seida
-Seidel
-Seidi
-Seidnour
-Seiehattin
-Seifried
-Seija
-Seinab
-Seip
-Seir
-Seitz
-Sejad
-Sejd
-Sejdi
-Sejfula
-Sejike
-Sejla
-Seka
-Seker
-Sekine
-Sekip
-Seko
-Sel
-Sela
-Selahaddin
-Selahatin
-Selahattin
-Selahittin
-Selaini
-Selamet
-Selami
-Selattin
-Selcak
-Selcihan
-Selcuk
-Selda
-Seldhattin
-Sele
-Seled
-Selek
-Selem
-Selen
-Selfet
-Selguk
-Selhattin
-Selim
-Selime
-Selin
-Selina
-Selke
-Sella
-Sellhattin
-Selma
-Selman
-Selmani
-Selmar
-Selmet
-Selmi
-Selmon
-Seloski
-Selva
-Selver
-Selvet
-Selveta
-Selvi
-Selvija
-Selvin
-Selviye
-Selwyn
-Selyna
-Sema
-Semahat
-Seman
-Semanuo
-Semen
-Semi
-Semic
-Semih
-Semiha
-Semihan
-Semije
-Semiko
-Semin
-Semira
-Semiramis
-Semiran
-Semire
-Semistan
-Semit
-Semith
-Semitra
-Semjon
-Semjonowitsch
-Semka
-Semma
-Sempa
-Sempaetin
-Semra
-Semran
-Semri
-Semsdin
-Semse
-Semsedin
-Semsethin
-Semsettin
-Semsi
-Semsinur
-Semso
-Semsudin
-Semun
-Semund
-Senada
-Senahid
-Senai
-Senal
-Senan
-Senay
-Senayi
-Senayte
-Sencan
-Senda
-Sendogan
-Sendra
-Senef
-Senel
-Senem
-Sener
-Senferanius
-Sengul
-Senih
-Senija
-Senim
-Senistan
-Senita
-Seniye
-Seniz
-Senkaya
-Senko
-Senni
-Sennon
-Sennur
-Seno
-Senol
-Senoy
-Senquel
-Sens
-Sensettin
-Sensoy
-Senta
-Senze
-Senzel
-Senzka
-Seperovic
-Sepgef
-Sepp
-Seppel
-Seppl
-Seppo
-Sera
-Serafadelin
-Serafeddin
-Serafedin
-Serafet
-Serafetling
-Serafettin
-Seraffetin
-Serafim
-Serafin
-Serafina
-Serafine
-Serafino
-Serafttin
-Seragettin
-Serai
-Serap
-Seraphim
-Seraphin
-Seraphine
-Serat
-Seravettin
-Seray
-Serban
-Sercan
-Serda
-Serdal
-Serdanur
-Serdar
-Serdas
-Seref
-Serefettin
-Serella
-Seren
-Serena
-Seret
-Serf
-Serfinaz
-Serge
-Sergei
-Sergeij
-Sergej
-Sergey
-Sergi
-Sergine
-Sergio
-Sergius
-Serguei
-Sergun
-Sergy
-Serhan
-Serhap
-Serhat
-Seriban
-Serieh
-Serif
-Serife
-Serikan
-Serim
-Serin
-Serina
-Serinci
-Serit
-Serkal
-Serkan
-Serket
-Serki
-Serkis
-Serkiz
-Serla
-Sermet
-Sermin
-Sernat
-Seror
-Serpil
-Serpuhi
-Serrano
-Sert
-Sertel
-Sertip
-Servan
-Servando
-Servatius
-Server
-Servet
-Servete
-Servinaz
-Serzin
-Sestilio
-Sestino
-Seta
-Seth
-Sethan
-Settar
-Setzidan
-Seuda
-Seugi
-Seuket
-Seuleymann
-Sevafettin
-Seval
-Sevasti
-Sevban
-Sevcan
-Sevcihan
-Sevda
-Sevdija
-Sevdije
-Seve
-Seven
-Sever
-Severin
-Severine
-Severino
-Sevgi
-Sevgil
-Sevi
-Sevig
-Sevil
-Sevilay
-Sevilcan
-Sevilmis
-Sevim
-Sevin
-Sevinc
-Sevindik
-Sevine
-Sevket
-Sevki
-Sevkiye
-Sevze
-Sewi
-Seyahn
-Seycan
-Seyda
-Seyde
-Seydi
-Seydo
-Seyedeh
-Seyfeddin
-Seyfettin
-Seyfi
-Seyfulla
-Seyfullah
-Seyhamit
-Seyhan
-Seyhat
-Seyhmus
-Seyhmuslum
-Seyho
-Seyit
-Seyitham
-Seyithan
-Seyithann
-Seymen
-Seyoi
-Seyran
-Seza
-Sezahl
-Sezai
-Sezair
-Sezayi
-Sezcan
-Sezen
-Sezer
-Sezgin
-Sezou
-Shaahin
-Shaban
-Shabani
-Shabbir
-Shadan
-Shadie
-Shafi
-Shafie
-Shafig
-Shafiq
-Shah
-Shahadat
-Shahed
-Shaheen
-Shahida
-Shahidul
-Shahin
-Shahram
-Shahryar
-Shahwali
-Shahwaz
-Shaira
-Shakeel
-Shakib
-Shakil
-Shakor
-Shameem
-Shamim
-Shamlal
-Shamsalhag
-Shanab
-Shane
-Shapur
-Sharaf
-Sharif
-Sharifa
-Sharifzadeh
-Sharon
-Shatur
-Shaun
-Shawn
-Sheba
-Shefget
-Shehzad
-Sheikh
-Sheila
-Sheima
-Shelagh
-Shemol
-Shemsi
-Shemus
-Sher
-Sherco
-Sheri
-Sherida
-Sherif
-Sherin
-Sherry
-Shevket
-Shibbir
-Shila
-Shina
-Shir
-Shireen
-Shirin
-Shirley
-Shoaib
-Shohreh
-Shoka
-Shokrollah
-Shorab
-Shoshana
-Shpen
-Shpresa
-Shuichi
-Shujah
-Sia
-Siamak
-Siamek
-Sian
-Siany
-Siavash
-Siba
-Sibel
-Sibilla
-Sibille
-Sibrigdina
-Sibyll
-Sibylla
-Sibylle
-Sid
-Sida
-Sidan
-Siddig
-Siddik
-Siddique
-Sider
-Sidika
-Sidney
-Sidny
-Sido
-Sidonia
-Sidonie
-Sidonius
-Sidou
-Siebel
-Siebelt
-Siebert
-Siebo
-Sied
-Siegbert
-Siegburg
-Siegesmund
-Siegfr
-Siegfrid
-Siegfried
-Sieghard
-Sieghardt
-Sieghart
-Sieghilde
-Siegholde
-Siegismund
-Sieglind
-Sieglinde
-Siegmar
-Siegmund
-Siegrid
-Siegried
-Siegrun
-Siegtrud
-Siegurd
-Siegwald
-Siegward
-Siegwin
-Sieke
-Siemen
-Siemon
-Siene
-Sientje
-Siet
-Sievert
-Sievi
-Siewert
-Sifi
-Sig
-Siga
-Siganur
-Sigard
-Sigbert
-Sigehardus
-Sigfrid
-Sigfried
-Siggi
-Sighard
-Sighild
-Sighilde
-Sigi
-Sigisbert
-Sigismund
-Sigit
-Siglinde
-Sigmar
-Sigmund
-Signe
-Sigold
-Sigrid
-Sigried
-Sigrit
-Sigrun
-Sigtraud
-Sigulf
-Sigurd
-Sigvard
-Sigward
-Sihan
-Sihmehmet
-Siho
-Siim
-Siiri
-Sija
-Sika
-Sike
-Sikiru
-Sikko
-Sikret
-Sikri
-Sikrite
-Sila
-Silahattin
-Silana
-Silas
-Sile
-Silesia
-Silfigar
-Silja
-Silka
-Silke
-Silki
-Silko
-Silmi
-Silo
-Silva
-Silvan
-Silvana
-Silvano
-Silver
-Silverio
-Silverius
-Silvester
-Silvestra
-Silvestre
-Silvestro
-Silvia
-Silvie
-Silvin
-Silvino
-Silvio
-Silviu
-Silvo
-Silwa
-Sim
-Sima
-Sime
-Simen
-Simendiene
-Simeon
-Simeone
-Simin
-Simisa
-Simke
-Simo
-Simom
-Simon
-Simona
-Simone
-Simonetta
-Simonic
-Simos
-Simpert
-Simpson
-Simsek
-Simun
-Sina
-Sinac
-Sinaida
-Sinan
-Sinasi
-Sinaver
-Sine
-Sinel
-Singh
-Sinikka
-Sinisa
-Sinja
-Sinje
-Sintje
-Siobhan
-Sion
-Sipahi
-Sirak
-Sirdin
-Siri
-Sirid
-Sirikit
-Sirin
-Sirke
-Sirko
-Siro
-Sirous
-Sirpa
-Sirri
-Sirvar
-Sirvi
-Sirzat
-Sissi
-Sissy
-Sisto
-Sita
-Sitel
-Sitke
-Sitki
-Sitti
-Siumei
-Siv
-Siva
-Sivalingam
-Sivi
-Sivia
-Sixto
-Sixtus
-Siyami
-Siyret
-Sjut
-Skender
-Sladjan
-Sladjana
-Slata
-Slava
-Slavica
-Slavisa
-Slavka
-Slavko
-Slavna
-Slavojka
-Slavomir
-Slawek
-Slawomir
-Slawomiv
-Sleiman
-Slobodan
-Slobodanka
-Smajl
-Smriko
-Snezana
-Snjezana
-Sobehi
-Sobhy
-Sobiech
-Sodik
-Soenke
-Soeren
-Sofi
-Sofia
-Sofian
-Sofie
-Sofija
-Sofirios
-Sofoklis
-Softic
-Sogny
-Sografa
-Sohail
-Sohaila
-Sohar
-Sohila
-Sohrab
-Soichrio
-Soizic
-Sokol
-Sokratis
-Solange
-Soldan
-Soledad
-Solgado
-Soli
-Soliman
-Solmaz
-Solomon
-Soltan
-Soltana
-Solveg
-Solveig
-Solveigh
-Solvey
-Solvig
-Solweyg
-Solwieg
-Soma
-Somboon
-Somer
-Somkhid
-Sona
-Sonat
-Sonay
-Sonbahar
-Sondra
-Sone
-Soner
-Songer
-Songul
-Soni
-Sonia
-Sonja
-Sonnhild
-Sonnhilde
-Sonni
-Sonny
-Sonya
-Sophia
-Sophie
-Sophieu
-Sophus
-Sopia
-Soraja
-Soraya
-Soren
-Sorina
-Sorka
-Sosi
-Sosthenes
-Sosun
-Sotere
-Sotilia
-Sotinos
-Sotirios
-Sotiris
-Soubhi
-Soudabe
-Soudabeh
-Souli
-Soumela
-Soumer
-Sousa
-Sousan
-Soussan
-Soyer
-Soylu
-Spahic
-Spiridon
-Spiridoula
-Spiro
-Spiros
-Splinter
-Spomenka
-Sport
-Spyridon
-Spyridou
-Srbislav
-Srboljub
-Sreten
-Sri
-Ssekina
-Sta
-Staats
-Stacey
-Stade
-Stamatios
-Stamatis
-Stan
-Stana
-Stani
-Stanica
-Stanimir
-Stanisa
-Stanislao
-Stanislaus
-Stanislav
-Stanislaw
-Stanislawa
-Stanko
-Stanley
-Stanoje
-Star
-Stasys
-Statnam
-Stavros
-Stec
-Steen
-Stefaie
-Stefan
-Stefana
-Stefani
-Stefania
-Stefanie
-Stefanile
-Stefano
-Stefanos
-Stefcia
-Stefen
-Steffan
-Steffen
-Steffi
-Steffie
-Stefi
-Stefos
-Stefphan
-Steganie
-Steinbach
-Steiner
-Steinert
-Steinmeyer
-Stejepan
-Stela
-Stele
-Stelian
-Stelio
-Stella
-Sten
-Stenin
-Stephan
-Stephane
-Stephanie
-Stephanis
-Stephanos
-Stephanus
-Stephen
-Stephn
-Stepthan
-Stergios
-Stevan
-Steve
-Steven
-Stevens
-Stevie
-Stevlinaz
-Stevo
-Stewart
-Stiene
-Stientje
-Stig
-Stilianos
-Stilla
-Stiller
-Stinnes
-Stipan
-Stipe
-Stipica
-Stipo
-Stjepan
-Stjerne
-Stoffel
-Stoja
-Stojan
-Stojance
-Storai
-Storandt
-Storei
-Storm
-Stratos
-Strauá
-Strobl
-Stuart
-Stultan
-Stylianos
-Su
-Suad
-Suada
-Suat
-Suavi
-Suayip
-Subasi
-Subhani
-Subhi
-Subutay
-Suco
-Sucro
-Sudi
-Suekran
-Suekrue
-Suelami
-Sueleyman
-Suevis
-Suha
-Suhdo
-Suheyla
-Suhir
-Suhny
-Suhr
-Suitbert
-Sujit
-Sukran
-Sukriye
-Sukru
-Sula
-Sulaf
-Sulaiman
-Sulamith
-Sule
-Sulejman
-Suleman
-Suleyman
-Sulgai
-Sulhaddin
-Suliman
-Suljo
-Sulta
-Sultan
-Sultana
-Sulymann
-Sumitra
-Summani
-Suna
-Sunal
-Sunay
-Sunel
-Sungu
-Sungur
-Sunhild
-Suni
-Sunny
-Suntay
-Suntka
-Suntke
-Suphi
-Supin
-Suppatra
-Suprimi
-Sur
-Suraye
-Sureyya
-Surmeli
-Surure
-Sururi
-Susa
-Susan
-Susana
-Susane
-Susann
-Susanna
-Susanne
-Suse
-Susen
-Susi
-Sussan
-Susy
-Suvad
-Suvada
-Suvis
-Suyad
-Suza
-Suzan
-Suzana
-Suzann
-Suzanna
-Suzanne
-Suzie
-Svanhild
-Svantje
-Svea
-Svein
-Sven
-Svena
-Svend
-Svenja
-Svenn
-Svetislav
-Svetlana
-Svjetlana
-Swaen
-Swanette
-Swantje
-Swen
-Swena
-Swenja
-Sweta
-Swetlana
-Swibertus
-Swonko
-Sybil
-Sybilla
-Sybille
-Sybren
-Sybylle
-Sydney
-Syed
-Syike
-Syivana
-Syla
-Sylemani
-Sylke
-Sylla
-Sylta
-Sylva
-Sylvain
-Sylvan
-Sylvana
-Sylvanus
-Sylveli
-Sylvere
-Sylvester
-Sylvestre
-Sylvi
-Sylvia
-Sylviane
-Sylvie
-Sylvio
-Sylwia
-Sylyia
-Syndi
-Syrus
-Sys
-Sysel
-Sytti
-Szabo
-Szilvia
-Tabea
-Tabeia
-Tabita
-Tabitha
-Taby
-Tacettin
-Tacittin
-Tadeus
-Tadeusz
-Tadija
-Tado
-Tagi
-Tahamtan
-Tahangir
-Tahar
-Taher
-Tahere
-Tahereh
-Tahic
-Tahir
-Tahire
-Tahlo
-Tahseen
-Tahsin
-Taib
-Taibe
-Taiga
-Taina
-Tairi
-Taisir
-Taissir
-Tajana
-Tajdin
-Tajib
-Tajo
-Tajrioui
-Takashi
-Take
-Taki
-Takiba
-Takin
-Tala
-Talat
-Talea
-Talet
-Taleus
-Talha
-Tali
-Talia
-Talin
-Talip
-Taliye
-Talke
-Tam
-Taman
-Tamar
-Tamara
-Tamas
-Tambul
-Tame
-Tamel
-Tamen
-Tamer
-Tamila
-Tamino
-Tamme
-Tammo
-Tammy
-Tan
-Tana
-Tanar
-Tanasije
-Tane
-Taner
-Tani
-Tania
-Tanis
-Tanja
-Tanju
-Tankred
-Tannitza
-Tannried
-Tansel
-Tanveer
-Tanvir
-Tanwadee
-Tanya
-Tapani
-Tapeten
-Tara
-Tarek
-Tareq
-Tarhar
-Tarhini
-Tari
-Tarig
-Tarik
-Tarim
-Tariq
-Tarja
-Tarjan
-Tarjit
-Tarkan
-Tas
-Tasdemir
-Tasduran
-Tasek
-Tasgir
-Tasim
-Tasio
-Taskin
-Tasneem
-Tasnim
-Tassilo
-Tasso
-Tatar
-Tatia
-Tatiana
-Tatic
-Tatjana
-Tatli
-Tauqir
-Tavas
-Tawfig
-Tay
-Tayebeh
-Tayfun
-Taylan
-Taysir
-Tayyaba
-Tayyar
-Tayyor
-Tazebey
-Teaghes
-Team
-Tebbe
-Teceddin
-Tecla
-Ted
-Teda
-Teddy
-Tedoris
-Tedras
-Tehua
-Teike
-Teilo
-Teimour
-Teisir
-Teja
-Tek
-Tekcan
-Tekci
-Tekin
-Tekiner
-Tekla
-Tekle
-Teksin
-Telat
-Telemachos
-Teleyildirim
-Tella
-Telli
-Telma
-Telsche
-Telse
-Temel
-Temir
-Temmo
-Temorschah
-Temur
-Tena
-Tenhar
-Tennor
-Tensi
-Tenzile
-Teo
-Teodor
-Teodora
-Teodoro
-Teodosia
-Teofanis
-Teofiel
-Teofilo
-Teoman
-Terek
-Terekelli
-Terence
-Teresa
-Terese
-Teresia
-Teresina
-Teresita
-Tereza
-Terezia
-Terezija
-Terhat
-Terlan
-Terry
-Terzia
-Terzioglu
-Terzo
-Tesfamariam
-Teshome
-Tesier
-Tessa
-Tessie
-Tessy
-Tete
-Teter
-Teufik
-Tevfik
-Tevik
-Tevrat
-Tevtik
-Tewfik
-Tex
-Teyfik
-Teymur
-Teyzullah
-Tezcan
-Thad
-Thaddeus
-Thadeus
-Thahir
-Thalia
-Thalke
-Thamara
-Thamm
-Thaschwa
-Thassoula
-Thatjana
-The
-Thea
-Theda
-Thedeus
-Thedor
-Thees
-Thehaxis
-Theis
-Thekla
-Themistoklis
-Theo
-Theobald
-Theocharis
-Theodolinde
-Theodoor
-Theodor
-Theodora
-Theodore
-Theodoros
-Theodorus
-Theodosia
-Theodosio
-Theodosios
-Theodule
-Theofani
-Theofila
-Theofilos
-Theoklitos
-Theophil
-Theophilus
-Theres
-Theresa
-Therese
-Theresia
-Theresina
-Therezia
-Thersia
-Thesi
-Thessy
-Thesy
-Thiel
-Thiele
-Thiemo
-Thierry
-Thies
-Thiess
-Thietmar
-Thieá
-Thilde
-Thilo
-Thim
-Thimo
-Thino
-Thmmo
-Thobias
-Thoma
-Thomas
-Thomi
-Thoms
-Thora
-Thorai
-Thorald
-Thoralf
-Thorben
-Thordis
-Thore
-Thoren
-Thorge
-Thorger
-Thorgund
-Thorolf
-Thorsten
-Thorwald
-Thoukididis
-Thresiamma
-Thrsten
-Thua
-Thure
-Thurid
-Thusnelda
-Thyella
-Thyge
-Tia
-Tiada
-Tib
-Tiba
-Tiberiu
-Tiberius
-Tibet
-Tibor
-Tibri
-Tican
-Tiddo
-Tido
-Tidora
-Tiemo
-Tien
-Tieno
-Tigran
-Tiina
-Til
-Tilbert
-Tilde
-Tile
-Till
-Tilla
-Tilli
-Tillmann
-Tilly
-Tilman
-Tilmann
-Tilmar
-Tilo
-Tim
-Tima
-Timandra
-Timm
-Timme
-Timmie
-Timmy
-Timo
-Timon
-Timona
-Timor
-Timotheus
-Timothy
-Timucin
-Timur
-Timursah
-Tin
-Tina
-Tinaz
-Tindaro
-Tine
-Tineke
-Tini
-Tinny
-Tino
-Tinoush
-Tinus
-Tiny
-Tiras
-Tireze
-Tiro
-Tirsten
-Tirza
-Tislaus
-Tite
-Titi
-Tito
-Titos
-Titus
-Tiziana
-Tiziano
-Tjaard
-Tjabo
-Tjade
-Tjadina
-Tjado
-Tjark
-Tjarko
-Tjebbe
-Tjelaletin
-Tlyas
-Toabias
-Tobe
-Tobeja
-Tobi
-Tobia
-Tobias
-Toby
-Todd
-Todor
-Tofwig
-Togluk
-Toivo
-Tok
-Tokmak
-Toktas
-Tolun
-Tom
-Toma
-Toman
-Tomas
-Tomaso
-Tomasz
-Tome
-Tomic
-Tomislav
-Tomislaw
-Tomke
-Tomma
-Tommas
-Tommaso
-Tommie
-Tommy
-Tomo
-Tomris
-Toms
-Tomy
-Tona
-Toni
-Tonia
-Tonino
-Tonio
-Tonis
-Tonius
-Tonja
-Tonko
-Tonny
-Tony
-Top
-Topal
-Topdur
-Toprak
-Toptas
-Torald
-Toralf
-Toran
-Torben
-Tordis
-Torge
-Toribio
-Torill
-Toris
-Torsten
-Toru
-Torun
-Tory
-Tosca
-Toshio
-Toska
-Tosun
-Touhoufat
-Toujic
-Touradj
-Touran
-Towfic
-Toy
-Tracey
-Tracy
-Traian
-Trajce
-Trajko
-Trane
-Trans
-Trapp
-Traudchen
-Traude
-Traudel
-Traudi
-Traudl
-Traugott
-Traut
-Trautchen
-Traute
-Trautelotte
-Trauthilde
-Trauti
-Trautl
-Trautlieb
-Trautwein
-Treuhild
-Treuhilde
-Trevor
-Triantafilos
-Trientje
-Trifon
-Trigga
-Trina
-Trinchen
-Trinette
-Trinidad
-Triningsih
-Trinus
-Tristan
-Trixi
-Trudbert
-Trude
-Trudel
-Trudi
-Trudl
-Trudlinde
-Trudpert
-Trukie
-Truus
-Trynke
-Tsadik
-Tsampikos
-Tsegereda
-Tsiotsios
-Tuba
-Tudor
-Tufan
-Tufik
-Tugaj
-Tugay
-Tugn
-Tugran
-Tugrul
-Tulay
-Tulin
-Tulio
-Tullio
-Tuna
-Tunal
-Tunay
-Tunc
-Tunca
-Tuncay
-Tuncel
-Tuncer
-Tuncuy
-Tunjo
-Turabi
-Tural
-Turali
-Turan
-Turay
-Turek
-Turgay
-Turgut
-Turhan
-Turic
-Turid
-Turkan
-Turkay
-Turna
-Tursun
-Tusnelda
-Tutca
-Tuula
-Tyrone
-Tzengis
-UIrich
-Ubaldo
-Ubbo
-Ubeydullah
-Uca
-Ucar
-Ucek
-Uckun
-Uda
-Ude
-Udo
-Ueli
-Uezeyir
-Ufuk
-Ugar
-Ugo
-Ugor
-Ugur
-Ugurlu
-Uguv
-Uguvcan
-Uhannis
-Uje
-Uka
-Uko
-Ulas
-Ulbrich
-Ulf
-Ulfert
-Ulfried
-Ulfvon
-Ulhild
-Uli
-Ulian
-Ulika
-Ulises
-Ulkani
-Ulker
-Ulla
-Ulli
-Ullmann
-Ullrich
-Ully
-Ulrich
-Ulricke
-Ulrik
-Ulrika
-Ulrike
-Ultich
-Uluc
-Uluer
-Ulus
-Ulusoy
-Ulutas
-Ulvi
-Ulvija
-Ulviye
-Ulyiye
-Umac
-Umar
-Umberto
-Umeer
-Umit
-Ummahan
-Ummihan
-Ummuhan
-Ummuhani
-Umran
-Umuhan
-Umut
-Una
-Unai
-Unan
-Undine
-Uni
-Unna
-Unni
-Uqur
-Ural
-Uran
-Urban
-Urbanek
-Urda
-Urfet
-Urhan
-Uri
-Urkin
-Urlsula
-Uros
-Urs
-Ursa
-Urschi
-Ursel
-Ursela
-Ursi
-Ursula
-Ursular
-Urszula
-Urte
-Urufi
-Usa
-Usama
-Uschi
-Uschka
-Uschy
-Usiu
-Uslu
-Usman
-Usmanbabar
-Usnla
-Ussat
-Usta
-Ustabas
-Uta
-Ute
-Utemaria
-Uto
-Utta
-Utto
-Utz
-Uunda
-Uusa
-Uuwe
-Uve
-Uwe
-Uws
-Uyanik
-Uyanin
-Uyar
-Uygur
-Uypm
-Uysal
-Uz
-Uzaldi
-Uzan
-Uzar
-Uzun
-Vaas
-Vacit
-Vaclav
-Vade
-Vadettin
-Vadim
-Vadimir
-Vadzit
-Vaes
-Vahaddin
-Vahap
-Vahdeffin
-Vahdet
-Vahdettin
-Vahdi
-Vahi
-Vahid
-Vahide
-Vahip
-Vahit
-Vahlt
-Vaic
-Vail
-Vaino
-Vaios
-Vait
-Vaitsis
-Vakkas
-Val
-Valborg
-Valbrecht
-Valda
-Valde
-Valdemar
-Valdi
-Valdimir
-Valdis
-Valdo
-Vale
-Valeida
-Valeissia
-Valent
-Valentin
-Valentina
-Valentine
-Valenting
-Valentino
-Valeri
-Valeria
-Valerian
-Valerie
-Valerij
-Valerio
-Valeris
-Valerius
-Valery
-Valeska
-Valfredo
-Vali
-Valko
-Van
-Vanco
-Vanda
-Vanessa
-Vanja
-Var
-Vara
-Varli
-Varlik
-Varol
-Varvara
-Vasco
-Vasfi
-Vasfiye
-Vasif
-Vasil
-Vasile
-Vasileios
-Vasilelos
-Vasili
-Vasilici
-Vasilie
-Vasilij
-Vasiliki
-Vasilio
-Vasilios
-Vasiliái
-Vasken
-Vasko
-Vassili
-Vassiliki
-Vassilios
-Vassilos
-Vassjlios
-Vasva
-Vasvija
-Veap
-Veba
-Vecdet
-Vecdi
-Veciha
-Vecihe
-Vedad
-Vedat
-Vedi
-Vedran
-Veena
-Veerle
-Vefi
-Vefik
-Vehbi
-Vehid
-Veikko
-Veiko
-Veit
-Veitel
-Veith
-Vejislar
-Veladzic
-Veli
-Velibor
-Velinka
-Velji
-Veljko
-Velma
-Veloozic
-Velta
-Velten
-Vendel
-Vendula
-Venetia
-Veniero
-Venizelos
-Venka
-Veno
-Ventura
-Vera
-Veran
-Verda
-Verde
-Verena
-Vereni
-Verenz
-Vergili
-Verginia
-Verica
-Veriman
-Veritas
-Verna
-Verner
-Vernon
-Vernonika
-Verona
-Veronica
-Veronika
-Veronique
-Vesa
-Vesel
-Vesile
-Vesim
-Vesna
-Vesper
-Veysal
-Veysel
-Veysi
-Vezir
-Vial
-Vibeke
-Vicdan
-Vicente
-Vicki
-Vicky
-Victor
-Victoria
-Victorino
-Victorio
-Vicy
-Vida
-Vidal
-Vidan
-Vidmantas
-Vido
-Vidosava
-Vidovic
-Vig
-Vigil
-Viktor
-Viktori
-Viktoria
-Viktorija
-Vildan
-Vildana
-Vilis
-Vilja
-Vilma
-Vilmos
-Vilonika
-Vincenco
-Vincenso
-Vincent
-Vincente
-Vincenz
-Vincenza
-Vincenzo
-Vinicio
-Vinicius
-Vinka
-Vinko
-Vinska
-Vinzenz
-Viola
-Violanta
-Violet
-Violeta
-Violetta
-Violette
-Viorel
-Vira
-Virgil
-Virgile
-Virgilia
-Virgilio
-Virgilius
-Virginia
-Virginian
-Virginie
-Virginio
-Virgit
-Virna
-Viron
-Virtus
-Viso
-Visus
-Vit
-Vita
-Vital
-Vitale
-Vitali
-Vitalij
-Vitalis
-Vitalji
-Vitangelo
-Vithania
-Vito
-Vitomir
-Vitor
-Vittoria
-Vittorino
-Vittorio
-Vitus
-Viva
-Vivaldo
-Viveka
-Vivendi
-Vivian
-Viviana
-Viviane
-Vivien
-Vladimir
-Vladislav
-Vlado
-Vlajko
-Vlasta
-Vlatko
-Vojislav
-Vola
-Volanis
-Volbert
-Voldemars
-Voler
-Volf
-Volger
-Volkan
-Volker
-Volkeron
-Volkert
-Volkfried
-Volkhard
-Volkhardt
-Volkhart
-Volkher
-Volkmar
-Volkmer
-Volko
-Volkwart
-Volkwin
-Vollert
-Vollmar
-Vollrad
-Vollrath
-Volmar
-Volmer
-Volodia
-Volz
-Vos
-Vroni
-Vujica
-Vural
-Vurande
-Vuranok
-Vurat
-Vurgun
-Waas
-Wachtel
-Wacker
-Wade
-Wadim
-Wadnan
-Wafa
-Wafaa
-Wafic
-Wafig
-Wafik
-Wagner
-Waheed
-Wahid
-Wahidullah
-Wahnfried
-Waide
-Waiel
-Waios
-Waitraud
-Wajdi
-Wala
-Walafried
-Walawal
-Walburg
-Walburga
-Walburgis
-Walda
-Waldburga
-Waldefried
-Waldemar
-Waldfried
-Waldi
-Waldislawa
-Waldo
-Waldraut
-Waldtraut
-Waldu
-Wale
-Walentin
-Walentina
-Walenty
-Waleri
-Walerian
-Walfried
-Walfriede
-Wali
-Waliuollah
-Walja
-Waljor
-Wallace
-Walle
-Walli
-Wally
-Walpurga
-Walpurgis
-Waltemart
-Walter
-Walterio
-Walters
-Walther
-Waltin
-Waltr
-Waltraud
-Waltraude
-Waltraudt
-Waltraund
-Waltraut
-Waltraute
-Waltrud
-Waltrude
-Waltrun
-Wanda
-Wandine
-Wane
-Waqaf
-Ward
-Warin
-Warja
-Warnfried
-Warren
-Warrilow
-Warwara
-Waseem
-Wasil
-Wasili
-Wasiliki
-Wasilios
-Wasilius
-Wasiljewitsch
-Wasim
-Wasji
-Wasse
-Wassilew
-Wassili
-Wassilij
-Wassiliki
-Wassilios
-Wayne
-Wazir
-Wedel
-Wedsad
-Weert
-Wegayehu
-Wegener
-Weike
-Weinhold
-Weizis
-Welda
-Welf
-Welly
-Welmoed
-Wencke
-Wendel
-Wendela
-Wendelin
-Wendeline
-Wendo
-Wendula
-Wendy
-Wener
-Wenke
-Wennemar
-Wenz
-Wenzel
-Wenzeslaus
-Wenzl
-Wera
-Werburg
-Werena
-Werenfried
-Werer
-Werkgruppe
-Werkzeugbau
-Wermer
-Werner
-Wernfried
-Werra
-Wesche
-Wesley
-Wessel
-Westermann
-Wetzel
-Weysel
-Wharda
-Whlhelmine
-Wiard
-Wibke
-Wichard
-Wichmann
-Wida
-Wido
-Widukind
-Wiebke
-Wiegand
-Wiegmann
-Wieke
-Wieland
-Wielfried
-Wiemer
-Wien
-Wienfried
-Wies
-Wieslaw
-Wieslawa
-Wiete
-Wifried
-Wiga
-Wigand
-Wigbert
-Wigg
-Wiggert
-Wihelm
-Wihlhelm
-Wija
-Wiktor
-Wiktoria
-Wil
-Wilbert
-Wildan
-Wildo
-Wilf
-Wilfgang
-Wilfr
-Wilfred
-Wilfredo
-Wilfrid
-Wilfried
-Wilfriede
-Wilgard
-Wilgart
-Wilh
-Wilhard
-Wilhe
-Wilheim
-Wilhel
-Wilhelm
-Wilhelma
-Wilhelmina
-Wilhelmine
-Wilhelmus
-Wilhem
-Wiliam
-Wilja
-Wilke
-Wilken
-Wilko
-Will
-Willebold
-Willem
-Willer
-Willfried
-Willhart
-Willhelm
-Willi
-William
-Williams
-Willibald
-Willibalt
-Willibert
-Willibrord
-Willie
-Willigis
-Willmuth
-Willo
-Willtrud
-Willy
-Willybald
-Wilm
-Wilma
-Wilman
-Wilmar
-Wilmut
-Wilrich
-Wilson
-Wilters
-Wiltraud
-Wiltraut
-Wiltrud
-Wim
-Winand
-Wincenza
-Winfr
-Winfred
-Winfrid
-Winfried
-Winfriede
-Winhard
-Winhold
-Winifred
-Winifrid
-Winifried
-Winnefred
-Winnes
-Winni
-Winnie
-Winnifred
-Winold
-Winrich
-Wioletta
-Wira
-Wisar
-Wise
-Wissam
-Witali
-Wito
-Witold
-Witte
-Wittich
-Wjatscheslaw
-Wladimir
-Wladinir
-Wladislaus
-Wladislav
-Wladislaw
-Wladislawa
-Wladyslaw
-Wladyslawa
-Wlodzimierz
-Wobina
-Wobkea
-Wofgang
-Wofram
-Wohnstift
-Wojciech
-Wojcieck
-Wojtek
-Wolbert
-Wolde
-Woldemar
-Woldy
-Wolf
-Wolfgang
-Wolfhard
-Wolfhardt
-Wolfhart
-Wolfman
-Wolfram
-Wolfried
-Wolgang
-Wolgard
-Wolgfgang
-Wolrad
-Wolter
-World
-Wotan
-Wouter
-Wulf
-Wulff
-Wulfhardt
-Wulfhild
-Wunibald
-Wybren
-Xanthippos
-Xaver
-Xavier
-Xenia
-Xhavit
-Ximena
-Yacob
-Yacoub
-Yacub
-Yade
-Yadigar
-Yadikar
-Yadilyas
-Yadullah
-Yael
-Yafes
-Yagiz
-Yagmur
-Yahia
-Yahko
-Yahti
-Yahya
-Yako
-Yakob
-Yakub
-Yakup
-Yakut
-Yakya
-Yalan
-Yalcim
-Yalcin
-Yalcintas
-Yaldirak
-Yalkin
-Yalman
-Yama
-Yaman
-Yamina
-Yan
-Yanar
-Yaneuz
-Yanik
-Yanit
-Yank
-Yann
-Yannic
-Yannick
-Yanus
-Yanya
-Yao
-Yapishan
-Yar
-Yara
-Yarar
-Yardim
-Yarsar
-Yasabey
-Yasar
-Yasariye
-Yasas
-Yasattin
-Yaschar
-Yasemen
-Yasemin
-Yaser
-Yasime
-Yasin
-Yasir
-Yasmin
-Yasmina
-Yasmine
-Yasor
-Yasser
-Yassine
-Yassir
-Yauruz
-Yausi
-Yaver
-Yavuz
-Yaw
-Yawuz
-Yayla
-Yayli
-Yazan
-Yazar
-Yazgan
-Yazgi
-Yazicioglu
-Yazile
-Ydmaz
-Yefim
-Yehia
-Yekta
-Yelal
-Yelda
-Yelemerli
-Yeliz
-Yener
-Yenev
-Yenice
-Yenievdi
-Yenny
-Yesica
-Yesil
-Yesildag
-Yesim
-Yesirci
-Yesmin
-Yesna
-Yeter
-Yetis
-Yetkin
-Yevhen
-Yevsi
-Yeysel
-Yeziri
-Yidiz
-Yigit
-Yigiter
-Yikar
-Yilderem
-Yildiran
-Yildiray
-Yildirim
-Yildiz
-Yildizhan
-Yildrim
-Yilgez
-Yilmar
-Yilmas
-Yilmaz
-Yilmazer
-Yilmikar
-Yiyen
-Ylker
-Ylmaz
-Ylva
-Ymer
-Yoann
-Yoao
-Yodit
-Yolanda
-Yoma
-Yonca
-Yonis
-Yonus
-York
-Yosemeh
-Yoshihiko
-Yoshiko
-Yosief
-Yosma
-Yosuf
-Yosun
-Younes
-Youness
-Young
-Youri
-Yousef
-Yousif
-Youssef
-Youssouf
-Yousuf
-Yozef
-Yozo
-Ysar
-Ysuf
-Yubivoje
-Yucel
-Yuecel
-Yueksel
-Yuhannun
-Yui
-Yuksel
-Yunes
-Yunis
-Yuntdag
-Yunus
-Yuosuf
-Yurdaer
-Yurdaguel
-Yurdakul
-Yurdal
-Yurdanur
-Yurga
-Yuri
-Yuriy
-Yusuf
-Yusulf
-Yusut
-Yvan
-Yvelise
-Yves
-Yvetta
-Yvette
-Yvona
-Yvone
-Yvonn
-Yvonne
-Zaber
-Zabihulla
-Zabit
-Zacarias
-Zacharias
-Zacharie
-Zachary
-Zada
-Zadeh
-Zadran
-Zafar
-Zafer
-Zaferhan
-Zafir
-Zagal
-Zaged
-Zagorka
-Zaharias
-Zaheer
-Zahid
-Zahida
-Zahide
-Zahie
-Zahir
-Zahire
-Zahoor
-Zahoov
-Zahra
-Zahredine
-Zaid
-Zaida
-Zaik
-Zaika
-Zain
-Zainal
-Zaja
-Zakaria
-Zakir
-Zakira
-Zakiyh
-Zalmai
-Zaman
-Zamora
-Zanani
-Zandra
-Zaneta
-Zanko
-Zara
-Zarah
-Zareena
-Zarif
-Zarifa
-Zarife
-Zarip
-Zarko
-Zati
-Zayakh
-Zber
-Zbeyde
-Zbeyir
-Zbigniew
-Zdenek
-Zdenka
-Zdenko
-Zdislaw
-Zdravka
-Zdravko
-Zdzislaw
-Zdzislawa
-Zech
-Zef
-Zehide
-Zehiralden
-Zehni
-Zehra
-Zeiad
-Zeid
-Zeinab
-Zeinas
-Zejdi
-Zejna
-Zejnel
-Zejnil
-Zeka
-Zekai
-Zekariya
-Zekayi
-Zeke
-Zekerijah
-Zekeriya
-Zekeriye
-Zekeriyen
-Zekerya
-Zekerye
-Zeki
-Zekige
-Zekije
-Zekine
-Zekirija
-Zekiye
-Zelena
-Zelic
-Zeliha
-Zelika
-Zeliko
-Zelinda
-Zeljka
-Zeljko
-Zelko
-Zemedkun
-Zemina
-Zemine
-Zemira
-Zemra
-Zena
-Zenaida
-Zenan
-Zenepe
-Zengin
-Zenita
-Zennet
-Zennure
-Zeno
-Zenon
-Zenona
-Zenta
-Zenzi
-Zenzl
-Zerdal
-Zeren
-Zeria
-Zerin
-Zerise
-Zernisan
-Zero
-Zerrin
-Zexnep
-Zeya
-Zeycan
-Zeyhu
-Zeynal
-Zeynat
-Zeynel
-Zeynelabidin
-Zeynep
-Zeyni
-Zeytin
-Zeytun
-Zhal
-Zhre
-Zhtu
-Zia
-Ziad
-Ziaullah
-Ziba
-Zidi
-Ziekeriya
-Zieler
-Ziena
-Ziga
-Zigo
-Ziher
-Zihni
-Zihnullah
-Zija
-Zijad
-Ziki
-Zikos
-Zikrija
-Zikriye
-Zilfo
-Zilkijad
-Zilli
-Zilon
-Zin
-Zina
-Zinaida
-Zine
-Zinet
-Zineta
-Zineti
-Zinnecker
-Zinnet
-Zinnur
-Zion
-Zissi
-Zissis
-Zita
-Zitta
-Ziver
-Zivko
-Zivojin
-Zivomir
-Zivorad
-Ziya
-Ziyad
-Ziyaeddin
-Ziyaedtin
-Ziyaettin
-Ziyamet
-Ziyattin
-Ziynet
-Zlal
-Zlatho
-Zlatimir
-Zlatko
-Zlbiye
-Zlestin
-Zleyha
-Zleyka
-Zlfi
-Zlfikan
-Zlfikar
-Zlgane
-Zoe
-Zofia
-Zohar
-Zohreh
-Zoi
-Zoila
-Zoltan
-Zonko
-Zora
-Zoran
-Zoric
-Zorica
-Zorka
-Zosimo
-Zoulikha
-Zourab
-Zozan
-Zsolt
-Zsuzsa
-Zubair
-Zubeyde
-Zuhai
-Zuhair
-Zuhal
-Zuhayla
-Zuhdija
-Zulcufli
-Zuleyha
-Zuleyka
-Zulfi
-Zulfigar
-Zulfiqar
-Zulkf
-Zunal
-Zuri
-Zusanne
-Zuzana
-Zvi
-Zvijezdan
-Zvonimir
-Zvonko
-Zwanette
-Zwantien
-Zwier
-Zygfryd
-Zygmunt
-Zylvia
-Zyriak
-cal
-cler
-gauer
-gidius
-ice
-kce
-kkes
-ktem
-letro
-lker
-lle
-lmez
-mer
-met
-mmehan
-mmet
-mmu
-mmuhan
-mran
-mrol
-nal
-naldi
-nay
-ncel
-ncoy
-nder
-nne
-nni
-nny
-nsal
-nver
-ozevim
-techn
-tuning
-usuf
-yvind
-zalp
-zay
-zbay
-zbek
-zcab
-zcakir
-zcan
-zcanli
-zcelik
-zciger
-zdamar
-zdan
-zdemir
-zden
-zdilek
-zdogan
-zel
-zen
-zenyir
-zer
-zeyie
-zeyier
-zeyin
-zeyir
-zgen
-zgevran
-zhan
-zicer
-zkalp
-zkan
-zkemal
-zkiran
-zlem
-zler
-zmekik
-zmen
-znur
-zsahin
-zsan
-zsoy
-ztan
-ztas
-ztekin
-ztekin
-ztrk
-zver
-zyilmaz
-zyurt
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt b/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt
deleted file mode 100644
index 7cde4e4..0000000
--- a/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Bürger
-Bürger
-Bürgerin
-Candidat
-Candidatin
-Ehrenbürger
-Ehrenbürgerin
-Familie
-Frau
-Freund
-Freundin
-Fräulein
-Herr
-Herrin
-Herrn
-Jungfer
-Junker
-Kandidat
-Kandidatin
-Lady
-Madame
-Master
-Meister
-Miss
-Mister
-Mistress
-Mr.
-Mrs.
-Ms.
-Nachbar
-Nachbarin
-Waschfrau
-Weib
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/IMPhrases.txt b/trunk/example-projects/GermanNovels/resources/IMPhrases.txt
deleted file mode 100644
index 638e02f..0000000
--- a/trunk/example-projects/GermanNovels/resources/IMPhrases.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Ich bin
-Ich bin
-Ich heiße
-Mein Name ist
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/Jobs.txt b/trunk/example-projects/GermanNovels/resources/Jobs.txt
deleted file mode 100644
index 07ca740..0000000
--- a/trunk/example-projects/GermanNovels/resources/Jobs.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-Advokat
-Advokat
-Advokatin
-Anwalt
-Anwältin
-Arzt
-Ärztin
-Autor
-Autorin
-Bäcker
-Bäckerin
-Banquier
-Bauer
-Bäuerin
-Beamter
-Beamtin
-Bürgermeister
-Bürgermeisterin
-Diener
-Dienerin
-Doctor
-Doktor
-Doktorin
-Dr.
-Förster
-Gouvernante
-Hirte
-Hirtin
-Kalkulator
-Kalkulatorin
-Kantor
-Kapellmeister
-Kaufmann
-Künstler
-Künstlerin
-Legationssekretär
-Legationssekretärin
-Lehrer
-Lehrerin
-Maler
-Malerin
-Metzger
-Metzgerin
-Pastor
-Pfarrer
-Polizist
-Polizistin
-Professor
-Professorin
-Sänger
-Sängerin
-Schriftsteller
-Schriftstellerin
-Sekretär
-Sekretärin
-Wirt
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt b/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt
deleted file mode 100644
index be179f8..0000000
--- a/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Brigadier
-Brigadier
-Divisionär
-Fachoffizier
-Fachoffizierin
-General
-Generalin
-Hauptmann
-Korpskommandant
-Leutnant
-Major
-Marketender
-Marketenderin
-Oberleutnant
-Oberst
-Offizier
-Offizierin
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/NobleTitles.txt b/trunk/example-projects/GermanNovels/resources/NobleTitles.txt
deleted file mode 100644
index ff97e67..0000000
--- a/trunk/example-projects/GermanNovels/resources/NobleTitles.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-Baron
-Baron
-Baronesse
-Baronin
-Burggraf
-Burggräfin
-Durchlaucht
-Erbgraf
-Erbgroßherzog
-Erbgroßherzogin
-Erbgräfin
-Erlaucht
-Erzherzog
-Erzherzogin
-Exzellenz
-Freiherr
-Freiin
-Fürst
-Fürstin
-Graf
-Großherzog
-Großherzogin
-Gräfin
-Herzog
-Herzogin
-Hochgeboren
-Hochwohlgeboren
-Hoheit
-Hoheit
-Junker
-Junkfrau
-Kaiser
-Kaiserin
-Komtess
-Kronprinz
-Kronprinzessin
-Kurfürst
-Kurfürstin
-Kurprinz
-Kurprinzessin
-König
-Königin
-Landgraf
-Landgräfin
-Majestät
-Markgraf
-Markgräfin
-Pfalzgraf
-Pfalzgräfin
-Prinz
-Prinzessin
-Raugraf
-Raugräfin
-Reichsgraf
-Reichsgräfin
-Rheingraf
-Rheingräfin
-Ritter
-Uradel
-Waldgraf
-Waldgräfin
-Wildgraf
-Wildgräfin
-Zar
-Zariza
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/ObjectWords.txt b/trunk/example-projects/GermanNovels/resources/ObjectWords.txt
deleted file mode 100644
index 4f3476e..0000000
--- a/trunk/example-projects/GermanNovels/resources/ObjectWords.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-das
-das
-dasselbe
-dieses
-ein
-jenes
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt b/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt
deleted file mode 100644
index 1269962..0000000
--- a/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-Adoptivbruder
-Adoptivbruder
-Adoptivmutter
-Adoptivschwester
-Adoptivsohn
-Adoptivtochter
-Adoptivvater
-Bruder
-Cousin
-Cousine
-Ehefrau
-Ehemann
-Enkel
-Enkelkind
-Enkelsohn
-Enkeltochter
-Gatte
-Gattin
-Gemahl
-Gemahlin
-Goßpapa
-Großcousin
-Großcousine
-Großmama
-Großmutter
-Großvater
-Mama
-Muhme
-Mutter
-Nichte
-Oheim
-Oma
-Onkel
-Opa
-Papa
-Schwager
-Schwester
-Schwiegermama
-Schwiegermutter
-Schwiegeronkel
-Schwiegerpapa
-Schwiegersohn
-Schwiegertante
-Schwiegertochter
-Schwiegervater
-Schwippschwager
-Schwippschwägerin
-Schwägerin
-Sohn
-Stiefmama
-Stiefmutter
-Stiefpapa
-Stiefsohn
-Stieftochter
-Stiefvater
-Tante
-Tochter
-Urenkel
-Urenkelin
-Urgroßmama
-Urgroßmutter
-Urgroßpapa
-Urgroßvater
-Vater
-Vetter
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/resources/Verbs.txt b/trunk/example-projects/GermanNovels/resources/Verbs.txt
deleted file mode 100644
index ab3aa31..0000000
--- a/trunk/example-projects/GermanNovels/resources/Verbs.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-antworten
-antworten
-beginnen
-bemerken
-bestätigen
-denken
-drängen
-echoen
-erwidern
-erzählen
-fahren
-fallen
-fragen
-fügen
-kichern
-lachen
-murmeln
-rufen
-sagen
-schreien
-stimmen
-unterbrechen
-versetzen
-wenden
-werfen
-wiederholen
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta b/trunk/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta
deleted file mode 100644
index 0edcabd..0000000
--- a/trunk/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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 uima.ruta.example;

-

-DECLARE DirectSpeech;

-

-"›" #{-> MARK(DirectSpeech, 1, 2, 3)} "‹";

-"»" #{-> MARK(DirectSpeech, 1, 2, 3)} "«";

-"‘" #{-> MARK(DirectSpeech, 1, 2, 3)} "’";

-"“" #{-> MARK(DirectSpeech, 1, 2, 3)} "”";

-"‚" #{-> MARK(DirectSpeech, 1, 2, 3)} "‛";

-"„" #{-> MARK(DirectSpeech, 1, 2, 3)} "‟";
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta b/trunk/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta
deleted file mode 100644
index c2f06dd..0000000
--- a/trunk/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta
+++ /dev/null
@@ -1,34 +0,0 @@
-// 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 uima.ruta.example;
-
-IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM GeneratedDKProCoreTypes AS pos;
-IMPORT de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma FROM GeneratedDKProCoreTypes;
-
-UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordSegmenter;
-UIMAFIT de.tudarmstadt.ukp.dkpro.core.treetagger.TreeTaggerPosLemmaTT4J;
-
-SCRIPT uima.ruta.example.Name;
-
-Document{-CONTAINS(pos.POS)} -> {
-	Document{-> SETFEATURE("language", "de")};
-	Document{-> EXEC(StanfordSegmenter)};
-	Document{-> EXEC(TreeTaggerPosLemmaTT4J, {pos.POS})};
-};
-
-Document{-> CALL(Name)};
\ No newline at end of file
diff --git a/trunk/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta b/trunk/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta
deleted file mode 100644
index 2dcde96..0000000
--- a/trunk/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta
+++ /dev/null
@@ -1,129 +0,0 @@
-// 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 uima.ruta.example;
-
-IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM GeneratedDKProCoreTypes AS pos;
-IMPORT de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma FROM GeneratedDKProCoreTypes;
-
-SCRIPT uima.ruta.example.DirectSpeech;
-
-WORDLIST AnimalList = 'Animals.txt';
-WORDLIST FirstNameList = 'FirstNames.txt';
-WORDLIST GeneralTitleList = 'GeneralTitles.txt';
-WORDLIST PhraseList = 'IMPhrases.txt';
-WORDLIST JobList = 'Jobs.txt';
-WORDLIST MilitaryTitleList = 'MilitaryTitles.txt';
-WORDLIST NobleTitleList = 'NobleTitles.txt';
-WORDLIST ObjectWordList = 'ObjectWords.txt';
-WORDLIST RelativesTitleList = 'RelativesTitles.txt';
-WORDLIST VerbList = 'Verbs.txt';
-
-STRINGLIST AddNames;
-STRINGLIST FirstNames;
-STRINGLIST LastNames;
-STRINGLIST PersNames;
-STRING Match;
-
-DECLARE PersName, AddName, FirstName, LastName, AnAnimal,
-RelativesTitle, GeneralTitle, MilitaryTitle, NobleTitle,
-Job, BodyPart, IMPhrase;
-
-Document{-> CALL(DirectSpeech)};
-Document{-> RETAINTYPE(SPACE)};
-Document{-> MARKFAST(AnAnimal, AnimalList)};
-Document{-> MARKFAST(FirstName, FirstNameList)};
-Document{-> MARKFAST(GeneralTitle, GeneralTitleList)};
-Document{-> MARKFAST(IMPhrase, PhraseList)};
-Document{-> MARKFAST(Job, JobList)};
-Document{-> MARKFAST(MilitaryTitle, MilitaryTitleList)};
-Document{-> MARKFAST(NobleTitle, NobleTitleList)};
-Document{-> MARKFAST(RelativesTitle, RelativesTitleList)};
-Document{-> RETAINTYPE};
-
-//-------------------------------------- VORNAMEN -----------------------------------------------\\
-
-// Titel, nach denen wahrscheinlich ein Vorname kommt
-(RelativesTitle|AnAnimal) pos.N{-PARTOF(FirstName), -PARTOF(SPECIAL)
--> MARK(FirstName), MATCHEDTEXT(Match), ADD(FirstNames, Match)};
-
-// Vornamen, die mit "s" enden speichern
-FirstName{-> MATCHEDTEXT(Match), ADD(FirstNames, Match + "s")};
-
-// Alle Vornamen in der Liste FirstNames markieren
-pos.N{-PARTOF(FirstName), INLIST(FirstNames) -> MARK(FirstName)};
-
-// Vorname + Vorname = Vorname
-FirstName{-> SHIFT(FirstName, 1, 2)} FirstName{-> UNMARK(FirstName)};
-
-
-//-------------------------------------- NACHNAMEN ----------------------------------------------\\
-
-// Vornamen +  CW (-> Nachname)
-CW{INLIST(FirstNameList)} "von"? CW{-PARTOF(FirstName), -PARTOF(LastName), -PARTOF(pos.PP)
--> MARK(LastName, 2, 3), MATCHEDTEXT(Match), ADD(LastNames, Match)};
-
-// Titel, nach denen wahrscheinlich ein Nachname kommt
-(GeneralTitle|MilitaryTitle|NobleTitle|Job) "von"? CW{-PARTOF(GeneralTitle), -PARTOF(Job),
--PARTOF(NobleTitle), -PARTOF(MilitaryTitle), -PARTOF(RelativesTitle), -PARTOF(FirstName),
--PARTOF(LastName) -> MARK(LastName, 2, 3), MATCHEDTEXT(Match), ADD(LastNames, Match)};
-
-// Nachnamen, die mit "s" enden speichern
-LastName{-> MATCHEDTEXT(Match), ADD(LastNames, Match + "s")};
-
-// Markieren der Namen in LastName
-pos.N{-PARTOF(FirstName), -PARTOF(LastName), INLIST(LastNames) -> MARK(LastName)};
-
-
-//-------------------------------------- ADDNAMEN -----------------------------------------------\\
-
-// Verschiedene Titel zusammenfassen
-(AnAnimal|RelativesTitle|GeneralTitle|MilitaryTitle|NobleTitle|Job)
-{-> MARK(AddName), MATCHEDTEXT(Match), ADD(AddNames, Match)};
-
-// Alle Zusatztitel in der Liste AddNames markieren
-pos.N{-PARTOF(AddName), INLIST(AddNames, Lemma.value) -> MARK(AddName)};
-
-
-//-------------------------------------- PERSONEN -----------------------------------------------\\
-
-// AddName + FirstName + LastName = PersName
-(AddName* @FirstName LastName*){-PARTOF(PersName) -> MARK(PersName)};
-(AddName* FirstName? @LastName){-PARTOF(PersName) -> MARK(PersName)};
-
-// Sprecher nach direkter Rede als Person markieren
-DirectSpeech COMMA? pos.V{INLIST(VerbList, Lemma.value)} pos.ART? CW+{-PARTOF(PersName)
--> MARK(PersName), MATCHEDTEXT(Match), ADD(PersNames, Match)};
-
-// Alle Personen in der Liste PersNames markieren
-pos.N{-PARTOF(PersName), INLIST(PersNames, Lemma.value) -> MARK(PersName)};
-
-
-//-------------------------------------- KORREKTUR ----------------------------------------------\\
-
-// Eigennamen, die nicht als Vornamen oder Nachnamen erkannt wurden
-Document{-> CLEAR(FirstNames)};
-DirectSpeech COMMA? pos.V{INLIST(VerbList, Lemma.value)} CW+{-PARTOF(FirstName), -PARTOF(LastName),
--PARTOF(AddName) -> MARK(FirstName), MATCHEDTEXT(Match), ADD(FirstNames, Match)};
-
-// Eindeutige Phrasen nach denen ein Name kommt
-IMPhrase CW{-PARTOF(FirstName) -> MARK(FirstName), MATCHEDTEXT(Match),
-ADD(FirstNames, Match, Match + "s")};
-
-// Alle Vornamen in der Liste FirstNames markieren
-pos.N{-PARTOF(FirstName), INLIST(FirstNames) -> MARK(FirstName)};
-FirstName{-PARTOF(PersName) -> MARK(PersName)};
\ No newline at end of file
diff --git a/trunk/example-projects/Misc/.buildpath b/trunk/example-projects/Misc/.buildpath
deleted file mode 100644
index a4d0028..0000000
--- a/trunk/example-projects/Misc/.buildpath
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<buildpath>

-	<buildpathentry kind="src" path="script">

-		<attributes>

-			<attribute name="ruta" value="script"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="descriptor">

-		<attributes>

-			<attribute name="ruta" value="descriptor"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="resources">

-		<attributes>

-			<attribute name="ruta" value="resources"/>

-		</attributes>

-	</buildpathentry>

-</buildpath>

diff --git a/trunk/example-projects/Misc/.project b/trunk/example-projects/Misc/.project
deleted file mode 100644
index 96fe3c6..0000000
--- a/trunk/example-projects/Misc/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>Misc</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.dltk.core.scriptbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.apache.uima.ruta.ide.nature</nature>
-	</natures>
-</projectDescription>
diff --git a/trunk/example-projects/Misc/LICENSE b/trunk/example-projects/Misc/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/trunk/example-projects/Misc/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
diff --git a/trunk/example-projects/Misc/NOTICE b/trunk/example-projects/Misc/NOTICE
deleted file mode 100644
index df7620a..0000000
--- a/trunk/example-projects/Misc/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache UIMA Ruta example project
-Copyright 2006, 2014 The Apache Software Foundation
-
-This product includes content developed at
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/trunk/example-projects/Misc/descriptor/BasicEngine.xml b/trunk/example-projects/Misc/descriptor/BasicEngine.xml
deleted file mode 100644
index 48e04b6..0000000
--- a/trunk/example-projects/Misc/descriptor/BasicEngine.xml
+++ /dev/null
@@ -1,279 +0,0 @@
-<?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.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>BasicEngine</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters searchStrategy="language_fallback">
-      <configurationParameter>
-        <name>seeders</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>debug</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalScripts</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>profile</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>debugWithMatches</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>statistics</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalEngines</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalExtensions</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>debugOnlyFor</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>scriptEncoding</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalEngineLoaders</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>resourcePaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>defaultFilteredTypes</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>mainScript</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>scriptPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>removeBasics</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>dynamicAnchoring</name>
-        <description>Activates dynamic anchoring (possible speed up).</description>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>greedyRuleElement</name>
-        <description>Activates greedy anchoring for rule elements.</description>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>greedyRule</name>
-        <description>Activates greedy anchoring for complete rules.</description>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>lowMemoryProfile</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>createdBy</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>simpleGreedyForComposed</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>additionalUimafitEngines</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>strictImports</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>varNames</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>varValues</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>rules</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>debug</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>profile</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>debugWithMatches</name>
-        <value>
-          <boolean>true</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>defaultFilteredTypes</name>
-        <value>
-          <array>
-            <string>org.apache.uima.ruta.type.SPACE</string>
-            <string>org.apache.uima.ruta.type.BREAK</string>
-            <string>org.apache.uima.ruta.type.MARKUP</string>
-          </array>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>removeBasics</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>seeders</name>
-        <value>
-          <array>
-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-          </array>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>createdBy</name>
-        <value>
-          <boolean>false</boolean>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription>
-      <imports>
-        <import location="BasicTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities>
-      <priorityList>
-        <type>org.apache.uima.ruta.type.RutaFrame</type>
-        <type>uima.tcas.Annotation</type>
-        <type>org.apache.uima.ruta.type.RutaBasic</type>
-      </priorityList>
-    </typePriorities>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/BasicTypeSystem.xml b/trunk/example-projects/Misc/descriptor/BasicTypeSystem.xml
deleted file mode 100644
index 911035a..0000000
--- a/trunk/example-projects/Misc/descriptor/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>BasicTypeSystem</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <imports>
-    <import location="InternalTypeSystem.xml"/>
-  </imports>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.ALL</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.ANY</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.MARKUP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.CW</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.W</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SW</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.PM</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.CAP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.COLON</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.PERIOD</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.QUESTION</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.COMMA</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SEMICOLON</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.WS</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.NUM</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SPECIAL</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.NBSP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.SPACE</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.AMP</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.SPACE</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.BREAK</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Document</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.TokenSeed</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/HtmlViewWriter.xml b/trunk/example-projects/Misc/descriptor/HtmlViewWriter.xml
deleted file mode 100644
index 01b7432..0000000
--- a/trunk/example-projects/Misc/descriptor/HtmlViewWriter.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?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.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>output</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription>
-      <imports>
-        <import location="uima/ruta/example/HtmlConverterTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/InternalTypeSystem.xml b/trunk/example-projects/Misc/descriptor/InternalTypeSystem.xml
deleted file mode 100644
index 5ff5b42..0000000
--- a/trunk/example-projects/Misc/descriptor/InternalTypeSystem.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>InternalTypeSystem</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaBasic</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>replacement</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaOptional</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>score</name>
-          <description/>
-          <rangeTypeName>uima.cas.Double</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>annotation</name>
-          <description/>
-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>
-      <features>
-        <featureDescription>
-          <name>applied</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>tried</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>rules</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>id</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>script</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>elements</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>matched</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>delegates</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>element</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>
-      <features>
-        <featureDescription>
-          <name>innerApply</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>baseCondition</name>
-          <description/>
-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>conditions</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>elements</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>
-          <multipleReferencesAllowed>false</multipleReferencesAllowed>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>matches</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>
-        </featureDescription>
-        <featureDescription>
-          <name>element</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>ruleAnchor</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaColoring</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>bgColor</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>targetType</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>fgColor</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>selected</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>element</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>value</name>
-          <description/>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>conditions</name>
-          <description/>
-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>
-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.FalsePositive</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>original</name>
-          <description/>
-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.FalseNegative</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>time</name>
-          <description/>
-          <rangeTypeName>uima.cas.Long</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.RutaFrame</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Statistics</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>name</name>
-          <description/>
-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>total</name>
-          <description/>
-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>amount</name>
-          <description/>
-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>part</name>
-          <description/>
-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.TruePositive</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>
-      <description/>
-      <supertypeName>uima.cas.TOP</supertypeName>
-      <features>
-        <featureDescription>
-          <name>rule</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>annotation</name>
-          <description/>
-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>script</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>id</name>
-          <description/>
-          <rangeTypeName>uima.cas.Integer</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/TEIViewWriter.xml b/trunk/example-projects/Misc/descriptor/TEIViewWriter.xml
deleted file mode 100644
index ddd553d..0000000
--- a/trunk/example-projects/Misc/descriptor/TEIViewWriter.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?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.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>output</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription>
-      <imports>
-        <import location="uima/ruta/example/TEIConverterTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/ConverterEngine.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/ConverterEngine.xml
deleted file mode 100644
index 9a08d3e..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/ConverterEngine.xml
+++ /dev/null
@@ -1,325 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.NBSP</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>uima.ruta.example.Converter</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>C:/Users/pkluegl/Dropbox/ws-coling/Misc/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>C:/Users/pkluegl/Dropbox/ws-coling/Misc/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>C:\Users\pkluegl\Dropbox\ws-coling\Misc\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array>
-                        <string>utils.ViewWriter</string>
-                        <string>utils.HtmlConverter</string>
-                        <string>utils.HtmlAnnotator</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <name>uima.ruta.example.ConverterTypeSystem</name>
-            <imports>
-                <import location="../../../BasicTypeSystem.xml"/>
-                <import location="../../../utils/HtmlTypeSystem.xml"/>
-                <import location="../../../utils/SourceDocumentInformation.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/ConverterTypeSystem.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/ConverterTypeSystem.xml
deleted file mode 100644
index 07f065c..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/ConverterTypeSystem.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>uima.ruta.example.ConverterTypeSystem</name>
-    <imports>
-        <import location="../../../BasicTypeSystem.xml"/>
-        <import location="../../../utils/HtmlTypeSystem.xml"/>
-        <import location="../../../utils/SourceDocumentInformation.xml"/>
-    </imports>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/HtmlConverterEngine.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/HtmlConverterEngine.xml
deleted file mode 100644
index 3a4cded..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/HtmlConverterEngine.xml
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varNames</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varValues</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>rules</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>HtmlConverter</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/Misc/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/Misc/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>D:\work\ws-tutorial\Misc\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array>
-                        <string>HtmlViewWriter</string>
-                        <string>utils.HtmlConverter</string>
-                        <string>utils.HtmlAnnotator</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <imports>
-                <import location="HtmlConverterTypeSystem.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/HtmlConverterTypeSystem.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/HtmlConverterTypeSystem.xml
deleted file mode 100644
index 6571246..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/HtmlConverterTypeSystem.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>HtmlConverterTypeSystem</name>
-    <imports>
-        <import location="..\..\..\BasicTypeSystem.xml"/>
-        <import location="..\..\..\utils\HtmlTypeSystem.xml"/>
-        <import location="..\..\..\utils\SourceDocumentInformation.xml"/>
-    </imports>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/SorterEngine.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/SorterEngine.xml
deleted file mode 100644
index 84216ae..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/SorterEngine.xml
+++ /dev/null
@@ -1,346 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varNames</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varValues</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>rules</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>Sorter</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/Misc/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/Misc/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>D:\work\ws-tutorial\Misc\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array>
-                        <string>utils.XMIWriter</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <imports>
-                <import location="SorterTypeSystem.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-            <capability>
-                <inputs>
-                    <type>Sorter.Pattern</type>
-                </inputs>
-                <outputs>
-                    <type>Sorter.Pattern</type>
-                </outputs>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/SorterTypeSystem.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/SorterTypeSystem.xml
deleted file mode 100644
index 16df93a..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/SorterTypeSystem.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>SorterTypeSystem</name>
-    <imports>
-        <import location="..\..\..\BasicTypeSystem.xml"/>
-        <import location="..\..\..\utils\SourceDocumentInformation.xml"/>
-    </imports>
-    <types>
-        <typeDescription>
-            <name>Sorter.Pattern</name>
-            <description>Type defined in Sorter</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/TEIConverterEngine.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/TEIConverterEngine.xml
deleted file mode 100644
index 47f06e2..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/TEIConverterEngine.xml
+++ /dev/null
@@ -1,354 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varNames</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>varValues</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>rules</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>TEIConverter</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/Misc/script</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string>D:/work/ws-tutorial/Misc/descriptor</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string>D:\work\ws-tutorial\Misc\resources</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array>
-                        <string>utils.HtmlConverter</string>
-                        <string>TEIViewWriter</string>
-                        <string>utils.HtmlAnnotator</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <imports>
-                <import location="TEIConverterTypeSystem.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-            <capability>
-                <inputs>
-                    <type>TEIConverter.PersName</type>
-                    <type>TEIConverter.LastName</type>
-                    <type>TEIConverter.FirstName</type>
-                    <type>TEIConverter.AddName</type>
-                </inputs>
-                <outputs>
-                    <type>TEIConverter.PersName</type>
-                    <type>TEIConverter.LastName</type>
-                    <type>TEIConverter.FirstName</type>
-                    <type>TEIConverter.AddName</type>
-                </outputs>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/uima/ruta/example/TEIConverterTypeSystem.xml b/trunk/example-projects/Misc/descriptor/uima/ruta/example/TEIConverterTypeSystem.xml
deleted file mode 100644
index 571be3a..0000000
--- a/trunk/example-projects/Misc/descriptor/uima/ruta/example/TEIConverterTypeSystem.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>TEIConverterTypeSystem</name>
-    <imports>
-        <import location="..\..\..\BasicTypeSystem.xml"/>
-        <import location="..\..\..\utils\HtmlTypeSystem.xml"/>
-        <import location="..\..\..\utils\SourceDocumentInformation.xml"/>
-    </imports>
-    <types>
-        <typeDescription>
-            <name>TEIConverter.PersName</name>
-            <description>Type defined in TEIConverter</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>TEIConverter.AddName</name>
-            <description>Type defined in TEIConverter</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>TEIConverter.LastName</name>
-            <description>Type defined in TEIConverter</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>TEIConverter.FirstName</name>
-            <description>Type defined in TEIConverter</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/AnnotationWriter.xml b/trunk/example-projects/Misc/descriptor/utils/AnnotationWriter.xml
deleted file mode 100644
index a404fd9..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/AnnotationWriter.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.AnnotationWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>ReferenceSectionWriterDescriptor</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>Output</name>
-        <description>Location where the annotation is stored</description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>true</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>Encoding</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>Type</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>true</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>Output</name>
-        <value>
-          <string>/../output/</string>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>Type</name>
-        <value>
-          <string>uima.tcas.DocumentAnnotation</string>
-        </value>
-      </nameValuePair>
-      <nameValuePair>
-        <name>Encoding</name>
-        <value>
-          <string>UTF-8</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/Cutter.xml b/trunk/example-projects/Misc/descriptor/utils/Cutter.xml
deleted file mode 100644
index a0543b7..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/Cutter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaCutter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>keep</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/HtmlAnnotator.xml b/trunk/example-projects/Misc/descriptor/utils/HtmlAnnotator.xml
deleted file mode 100644
index f9ec9f4..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/HtmlAnnotator.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlAnnotator</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>PlainTextAnnotator</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>onlyContent</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>onlyContent</name>
-        <value>
-          <boolean>true</boolean>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription>
-      <imports>
-        <import location="HtmlTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/HtmlConverter.xml b/trunk/example-projects/Misc/descriptor/utils/HtmlConverter.xml
deleted file mode 100644
index 59859b8..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/HtmlConverter.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?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.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlConverter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>newlineInducingTags</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>newlineInducingTagRegExp</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>replaceLinebreaks</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>linebreakReplacement</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>conversionPolicy</name>
-        <description>Either heuristic, explicit, or none.
-Defaults to heuristic.</description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>conversionPatterns</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>conversionReplacements</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    <configurationParameter>
-        <name>skipWhitespaces</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    <configurationParameter>
-        <name>processAll</name>
-        <type>Boolean</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>skipWhitespaces</name>
-        <value>
-          <boolean>true</boolean>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/HtmlTypeSystem.xml b/trunk/example-projects/Misc/descriptor/utils/HtmlTypeSystem.xml
deleted file mode 100644
index f88b4ab..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/HtmlTypeSystem.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>typeSystemDescriptor</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TAG</name>
-      <description></description>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>name</name>
-          <description></description>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>expandedOffsets</name>
-          <description></description>
-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>attributeName</name>
-          <description></description>
-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>
-          <multipleReferencesAllowed>false</multipleReferencesAllowed>
-        </featureDescription>
-        <featureDescription>
-          <name>attributeValue</name>
-          <description/>
-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>
-          <multipleReferencesAllowed>false</multipleReferencesAllowed>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.B</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H1</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H2</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H3</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H4</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H5</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.H6</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.COMMENT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TITLE</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.I</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.U</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.BIG</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.SMALL</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.FONT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.A</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.HEAD</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.HTML</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.BODY</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.EM</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TABLE</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.DIV</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.SPAN</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.UL</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.OL</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.P</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.LI</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TBODY</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TD</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TR</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.TH</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.IMG</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.STYLE</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.SCRIPT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.LINK</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.INPUT</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.FORM</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.META</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.BR</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.html.REMARK</name>
-      <description></description>
-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>
-      <features>
-        <featureDescription>
-          <name>comment</name>
-          <description></description>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/Modifier.xml b/trunk/example-projects/Misc/descriptor/utils/Modifier.xml
deleted file mode 100644
index c3d40d0..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/Modifier.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>Modifier</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>styleMap</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputLocation</name>
-        <description></description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>outputView</name>
-        <value>
-          <string>modified</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <outputSofas>
-          <sofaName>modified</sofaName>
-        </outputSofas>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/PlainTextAnnotator.xml b/trunk/example-projects/Misc/descriptor/utils/PlainTextAnnotator.xml
deleted file mode 100644
index 7ea5a72..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/PlainTextAnnotator.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.PlainTextAnnotator</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>PlainTextAnnotator</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters/>
-    <configurationParameterSettings/>
-    <typeSystemDescription>
-      <imports>
-        <import location="PlainTextTypeSystem.xml"/>
-      </imports>
-    </typeSystemDescription>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/PlainTextTypeSystem.xml b/trunk/example-projects/Misc/descriptor/utils/PlainTextTypeSystem.xml
deleted file mode 100644
index 17b579c..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/PlainTextTypeSystem.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>PlainTextTypeSystem</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Line</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.Paragraph</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.WSLine</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.EmptyLine</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.EmptyLine</name>
-      <description/>
-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.type.AnyLine</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/SourceDocumentInformation.xml b/trunk/example-projects/Misc/descriptor/utils/SourceDocumentInformation.xml
deleted file mode 100644
index 8322d25..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/SourceDocumentInformation.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-   
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-	<name>org.apache.uima.examples.SourceDocumentInformation</name>
-	<description>Defines a type for storing information about the original source document from which the current CAS was initialized</description>
-	<version>1.0</version>
-	<vendor>The Apache Software Foundation</vendor>
-	<types>
-		<typeDescription>
-			<name>org.apache.uima.examples.SourceDocumentInformation</name>
-			<description>Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.</description>
-			<supertypeName>uima.tcas.Annotation</supertypeName>
-			<features>
-				<featureDescription>
-					<name>uri</name>
-					<description>URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)</description>
-					<rangeTypeName>uima.cas.String</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>offsetInSource</name>
-					<description>Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>documentSize</name>
-					<description>Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-				  <name>lastSegment</name>
-				  <description>For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. </description>
-			      <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-			    </featureDescription>				
-			</features>
-		</typeDescription>
-	</types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/StyleMapCreator.xml b/trunk/example-projects/Misc/descriptor/utils/StyleMapCreator.xml
deleted file mode 100644
index 43f1b5c..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/StyleMapCreator.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.StyleMapCreator</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>ReferenceSectionWriterDescriptor</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>styleMap</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/ViewWriter.xml b/trunk/example-projects/Misc/descriptor/utils/ViewWriter.xml
deleted file mode 100644
index 2b3b472..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/ViewWriter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>XMLConverter</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>inputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>output</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings/>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/descriptor/utils/XMIWriter.xml b/trunk/example-projects/Misc/descriptor/utils/XMIWriter.xml
deleted file mode 100644
index 9aafb29..0000000
--- a/trunk/example-projects/Misc/descriptor/utils/XMIWriter.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.XMIWriter</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>ReferenceSectionWriterDescriptor</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>Output</name>
-        <description>Location where the xmi is stored</description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>true</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>Output</name>
-        <value>
-          <string>/../output/</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/example-projects/Misc/script/uima/ruta/example/HtmlConverter.ruta b/trunk/example-projects/Misc/script/uima/ruta/example/HtmlConverter.ruta
deleted file mode 100644
index 212fac3..0000000
--- a/trunk/example-projects/Misc/script/uima/ruta/example/HtmlConverter.ruta
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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 uima.ruta.example;
-
-ENGINE utils.HtmlAnnotator;
-ENGINE utils.HtmlConverter;
-ENGINE HtmlViewWriter;
-TYPESYSTEM utils.HtmlTypeSystem;
-TYPESYSTEM utils.SourceDocumentInformation;
-
-Document{-> RETAINTYPE(SPACE,BREAK)};
-Document{->EXEC(HtmlAnnotator)};
-
-Document { -> CONFIGURE(HtmlConverter, "inputView" = "_InitialView", 
-    "outputView" = "plain"), 
-      EXEC(HtmlConverter)};
-
-Document{ -> CONFIGURE(ViewWriter, "inputView" = "plain", 
-    "outputView" = "_InitialView", "output" = "/../converted/"), 
-    EXEC(HtmlViewWriter)};
\ No newline at end of file
diff --git a/trunk/example-projects/Misc/script/uima/ruta/example/Sorter.ruta b/trunk/example-projects/Misc/script/uima/ruta/example/Sorter.ruta
deleted file mode 100644
index 2f6c223..0000000
--- a/trunk/example-projects/Misc/script/uima/ruta/example/Sorter.ruta
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.

-

-ENGINE utils.XMIWriter;

-TYPESYSTEM utils.SourceDocumentInformation;

-

-DECLARE Pattern;

-

-// some rule-based pattern

-(NUM SPECIAL NUM SPECIAL NUM){-> Pattern};

-

-Document{CONTAINS(Pattern)->CONFIGURE(XMIWriter, "Output" = "../with/"), EXEC(XMIWriter)};

-Document{-CONTAINS(Pattern)->CONFIGURE(XMIWriter, "Output" = "../without/"), EXEC(XMIWriter)};

-

-

-

diff --git a/trunk/example-projects/Misc/script/uima/ruta/example/TEIConverter.ruta b/trunk/example-projects/Misc/script/uima/ruta/example/TEIConverter.ruta
deleted file mode 100644
index 15d1c50..0000000
--- a/trunk/example-projects/Misc/script/uima/ruta/example/TEIConverter.ruta
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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.

-

-ENGINE utils.HtmlAnnotator;

-TYPESYSTEM utils.HtmlTypeSystem;

-ENGINE utils.HtmlConverter;

-ENGINE TEIViewWriter;

-TYPESYSTEM utils.SourceDocumentInformation;

-

-DECLARE PersName, LastName, FirstName, AddName;

-

-Document{->EXEC(HtmlAnnotator, {TAG})};

-Document{-> RETAINTYPE(MARKUP,SPACE)};

-TAG.name=="PERSNAME"{-> PersName};

-TAG.name=="SURNAME"{-> LastName};

-TAG.name=="FORENAME"{-> FirstName};

-TAG.name=="ADDNAME"{-> AddName};

-Document{-> RETAINTYPE};

-

-Document { -> CONFIGURE(HtmlConverter, "inputView" = "_InitialView", "outputView" = "plain", "skipWhitespaces" = false), 

-      EXEC(HtmlConverter)};

-

-Document{ -> CONFIGURE(ViewWriter, "inputView" = "plain", "outputView" = "_InitialView", "output" = "/../converted/"), 

-    EXEC(TEIViewWriter)};

diff --git a/trunk/example-projects/TextRulerExample/.buildpath b/trunk/example-projects/TextRulerExample/.buildpath
deleted file mode 100644
index a4d0028..0000000
--- a/trunk/example-projects/TextRulerExample/.buildpath
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<buildpath>

-	<buildpathentry kind="src" path="script">

-		<attributes>

-			<attribute name="ruta" value="script"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="descriptor">

-		<attributes>

-			<attribute name="ruta" value="descriptor"/>

-		</attributes>

-	</buildpathentry>

-	<buildpathentry kind="src" path="resources">

-		<attributes>

-			<attribute name="ruta" value="resources"/>

-		</attributes>

-	</buildpathentry>

-</buildpath>

diff --git a/trunk/example-projects/TextRulerExample/.project b/trunk/example-projects/TextRulerExample/.project
deleted file mode 100644
index 2b3b47c..0000000
--- a/trunk/example-projects/TextRulerExample/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<projectDescription>

-	<name>TextRulerExample</name>

-	<comment></comment>

-	<projects>

-	</projects>

-	<buildSpec>

-		<buildCommand>

-			<name>org.eclipse.dltk.core.scriptbuilder</name>

-			<arguments>

-			</arguments>

-		</buildCommand>

-	</buildSpec>

-	<natures>

-		<nature>org.apache.uima.ruta.ide.nature</nature>

-	</natures>

-</projectDescription>

diff --git a/trunk/example-projects/TextRulerExample/LICENSE b/trunk/example-projects/TextRulerExample/LICENSE
deleted file mode 100644
index 75b5248..0000000
--- a/trunk/example-projects/TextRulerExample/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

diff --git a/trunk/example-projects/TextRulerExample/NOTICE b/trunk/example-projects/TextRulerExample/NOTICE
deleted file mode 100644
index 4fd111e..0000000
--- a/trunk/example-projects/TextRulerExample/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache UIMA Ruta TextRuler example project

-Copyright 2006, 2014 The Apache Software Foundation

-

-This product includes content developed at

-The Apache Software Foundation (http://www.apache.org/).

-

diff --git a/trunk/example-projects/TextRulerExample/data/InfoTypes.txt b/trunk/example-projects/TextRulerExample/data/InfoTypes.txt
deleted file mode 100644
index 86f3f8c..0000000
--- a/trunk/example-projects/TextRulerExample/data/InfoTypes.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-uima.ruta.example.Author

-uima.ruta.example.Date

-uima.ruta.example.Pages

-uima.ruta.example.Publisher

-uima.ruta.example.Institution

-uima.ruta.example.Volume

-uima.ruta.example.Editor

-uima.ruta.example.Title

-uima.ruta.example.Booktitle

-uima.ruta.example.Note

-uima.ruta.example.Journal

-uima.ruta.example.Location

-uima.ruta.example.Tech
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/0.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/0.txt.xmi.xmi
deleted file mode 100644
index 455f0fe..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/0.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Harper, M. P., &amp; Helzerman, R. A.   (1995b).   Managing multiple knowledge sources in constraint-based parsing of spoken language.   Fundamenta Informaticae,   23 (2, 3, 4),   303-353. &#10; Puterman, M. L.   (1994).   Markov Decision Problems.   Wiley,   New York. &#10; Blumer, A., Ehrenfeucht, A., Haussler, D., &amp; Warmuth, M.   (1989).   Learnability and the Vapnik-Chervonenkis dimension.   Journal of the ACM,   36 (4),   929-965. &#10; Forbus, K. D.   (1989).   Introducing Actions in Qualitative Simulation.   Proceedings of IJCAI-89,   1273-1278. &#10; LeBlanc, M., &amp; Tibshirani, R.   (1993).   Combining estimates in regression and classification.   Tech. rep.,   Department of Statistics, U. of Toronto. &#10; Golomb, S., &amp; Baumert, L.   (1965).   Backtrack programming.   J. ACM,   12,   516-524. &#10; Guziec, A., &amp; Ayache, N.   (1992).   Smoothing and matching of 3-d space curves.   Visualization in Biomedical Computing, Proc. SPIE,   1808,   259-273. &#10; Hawley, D. K., &amp; McClure, W. R.   (1983).   Compilation and analysis of escherichia coli promoter DNA sequences.   Nucleic Acids Research,   11 (8),   2237-2255. &#10; McKinsey, J. C. C.   (1943).   The decision problem for some classes of sentences without quantifier.   Journal of Symbolic Logic,   8 (3),   61-76. &#10; Dietterich, T. G., &amp; Bakiri, G.   (1995).   Solving multiclass learning problems via error-correcting output codes.   Journal of Artificial Intelligence Research,   2,   263-286. &#10; Soskin, William F.   (1963).   Verbal Interactions in a Young Married Couple.   University of Kansas Publications,   Lawrence, Kansas. &#10; Dechter, R.   (1992).   From local to global consistency.   Artificial Intelligence,   55,   87-107. &#10; Fikes, R. E., Hart, P. E., &amp; Nilsson, N. J.   (1972).   Learning and executing generalized robot plans.   Artificial Intelligence,   3,   251-288. &#10; Rosenbloom, P. S., Laird, J. E., &amp; Newell, A.   (1988).   The chunking of skill and knowledge. &#10; Spirtes, P., Glymour, C., &amp; Scheines, R.   (1993).   Causation, Prediction, and Search.   Springer-Verlag,   New York. &#10; Bunke, H., &amp; Allermann, G.   (1983).   Inexact graph matching for structural pattern recognition.   Pattern Recognition Letters,   1 (4),   245-253. &#10; Rubinstein, A.   (1982).   Perfect equilibrium in a bargaining model.   Econometrica,   50 (1),   97-109. &#10; Buntine, W.   (1994).   Operations for learning with graphical models.   Journal of Artificial Intelligence Research,   2,   159-225. &#10; Friedman, J. H., &amp; Stuetzle, W.   (1981).   Projection pursuit regression.   Journal of the American Statistics Association,   76,   817-823. &#10; Whitley, D., &amp; Gruau, F.   (1993).   Adding learning to the cellular development of neural networks: Evolution and the Baldwin effect.   Evolutionary Computation,   1,   213-233. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2774" language="x-unspecified"/><example:Author xmi:id="11814" sofa="1" begin="7" end="40"/><example:Author xmi:id="11822" sofa="1" begin="194" end="209"/><example:Author xmi:id="11830" sofa="1" begin="271" end="327"/><example:Author xmi:id="11838" sofa="1" begin="437" end="450"/><example:Author xmi:id="11846" sofa="1" begin="552" end="581"/><example:Author xmi:id="11854" sofa="1" begin="707" end="732"/><example:Author xmi:id="11862" sofa="1" begin="797" end="821"/><example:Author xmi:id="11870" sofa="1" begin="952" end="983"/><example:Author xmi:id="11878" sofa="1" begin="1116" end="1134"/><example:Author xmi:id="11886" sofa="1" begin="1267" end="1298"/><example:Author xmi:id="11894" sofa="1" begin="1448" end="1466"/><example:Author xmi:id="11902" sofa="1" begin="1585" end="1596"/><example:Author xmi:id="11910" sofa="1" begin="1688" end="1731"/><example:Author xmi:id="11918" sofa="1" begin="1837" end="1882"/><example:Author xmi:id="11926" sofa="1" begin="1934" end="1974"/><example:Author xmi:id="11934" sofa="1" begin="2055" end="2081"/><example:Author xmi:id="11942" sofa="1" begin="2206" end="2220"/><example:Author xmi:id="11950" sofa="1" begin="2314" end="2325"/><example:Author xmi:id="11958" sofa="1" begin="2450" end="2481"/><example:Author xmi:id="11966" sofa="1" begin="2594" end="2618"/><example:Date xmi:id="11974" sofa="1" begin="43" end="51"/><example:Date xmi:id="11982" sofa="1" begin="212" end="219"/><example:Date xmi:id="11990" sofa="1" begin="330" end="337"/><example:Date xmi:id="11998" sofa="1" begin="453" end="460"/><example:Date xmi:id="12006" sofa="1" begin="584" end="591"/><example:Date xmi:id="12014" sofa="1" begin="735" end="742"/><example:Date xmi:id="12022" sofa="1" begin="824" end="831"/><example:Date xmi:id="12030" sofa="1" begin="986" end="993"/><example:Date xmi:id="12038" sofa="1" begin="1137" end="1144"/><example:Date xmi:id="12046" sofa="1" begin="1301" end="1308"/><example:Date xmi:id="12054" sofa="1" begin="1469" end="1476"/><example:Date xmi:id="12062" sofa="1" begin="1599" end="1606"/><example:Date xmi:id="12070" sofa="1" begin="1734" end="1741"/><example:Date xmi:id="12078" sofa="1" begin="1885" end="1892"/><example:Date xmi:id="12086" sofa="1" begin="1977" end="1984"/><example:Date xmi:id="12094" sofa="1" begin="2084" end="2091"/><example:Date xmi:id="12102" sofa="1" begin="2223" end="2230"/><example:Date xmi:id="12110" sofa="1" begin="2328" end="2335"/><example:Date xmi:id="12118" sofa="1" begin="2484" end="2491"/><example:Date xmi:id="12126" sofa="1" begin="2621" end="2628"/><example:Pages xmi:id="12134" sofa="1" begin="183" end="191"/><example:Pages xmi:id="12142" sofa="1" begin="426" end="434"/><example:Pages xmi:id="12150" sofa="1" begin="539" end="549"/><example:Pages xmi:id="12158" sofa="1" begin="786" end="794"/><example:Pages xmi:id="12166" sofa="1" begin="941" end="949"/><example:Pages xmi:id="12174" sofa="1" begin="1103" end="1113"/><example:Pages xmi:id="12182" sofa="1" begin="1258" end="1264"/><example:Pages xmi:id="12190" sofa="1" begin="1437" end="1445"/><example:Pages xmi:id="12198" sofa="1" begin="1678" end="1685"/><example:Pages xmi:id="12206" sofa="1" begin="1826" end="1834"/><example:Pages xmi:id="12214" sofa="1" begin="2195" end="2203"/><example:Pages xmi:id="12222" sofa="1" begin="2304" end="2311"/><example:Pages xmi:id="12230" sofa="1" begin="2439" end="2447"/><example:Pages xmi:id="12238" sofa="1" begin="2583" end="2591"/><example:Pages xmi:id="12246" sofa="1" begin="2764" end="2772"/><example:Publisher xmi:id="12254" sofa="1" begin="250" end="256"/><example:Publisher xmi:id="12262" sofa="1" begin="1528" end="1562"/><example:Publisher xmi:id="12270" sofa="1" begin="2024" end="2040"/><example:Institution xmi:id="12278" sofa="1" begin="664" end="704"/><example:Volume xmi:id="12286" sofa="1" begin="167" end="180"/><example:Volume xmi:id="12294" sofa="1" begin="416" end="423"/><example:Volume xmi:id="12302" sofa="1" begin="780" end="783"/><example:Volume xmi:id="12310" sofa="1" begin="933" end="938"/><example:Volume xmi:id="12318" sofa="1" begin="1093" end="1100"/><example:Volume xmi:id="12326" sofa="1" begin="1249" end="1255"/><example:Volume xmi:id="12334" sofa="1" begin="1432" end="1434"/><example:Volume xmi:id="12342" sofa="1" begin="1672" end="1675"/><example:Volume xmi:id="12350" sofa="1" begin="1821" end="1823"/><example:Volume xmi:id="12358" sofa="1" begin="2186" end="2192"/><example:Volume xmi:id="12366" sofa="1" begin="2294" end="2301"/><example:Volume xmi:id="12374" sofa="1" begin="2434" end="2436"/><example:Volume xmi:id="12382" sofa="1" begin="2577" end="2580"/><example:Volume xmi:id="12390" sofa="1" begin="2759" end="2761"/><example:Title xmi:id="12398" sofa="1" begin="54" end="137"/><example:Title xmi:id="12406" sofa="1" begin="222" end="247"/><example:Title xmi:id="12414" sofa="1" begin="340" end="391"/><example:Title xmi:id="12422" sofa="1" begin="463" end="509"/><example:Title xmi:id="12430" sofa="1" begin="594" end="647"/><example:Title xmi:id="12438" sofa="1" begin="745" end="767"/><example:Title xmi:id="12446" sofa="1" begin="834" end="877"/><example:Title xmi:id="12454" sofa="1" begin="996" end="1064"/><example:Title xmi:id="12462" sofa="1" begin="1147" end="1217"/><example:Title xmi:id="12470" sofa="1" begin="1311" end="1382"/><example:Title xmi:id="12478" sofa="1" begin="1479" end="1525"/><example:Title xmi:id="12486" sofa="1" begin="1609" end="1642"/><example:Title xmi:id="12494" sofa="1" begin="1744" end="1791"/><example:Title xmi:id="12502" sofa="1" begin="1895" end="1931"/><example:Title xmi:id="12510" sofa="1" begin="1987" end="2021"/><example:Title xmi:id="12518" sofa="1" begin="2094" end="2152"/><example:Title xmi:id="12526" sofa="1" begin="2233" end="2275"/><example:Title xmi:id="12534" sofa="1" begin="2338" end="2384"/><example:Title xmi:id="12542" sofa="1" begin="2494" end="2524"/><example:Title xmi:id="12550" sofa="1" begin="2631" end="2728"/><example:Booktitle xmi:id="12558" sofa="1" begin="512" end="536"/><example:Journal xmi:id="12566" sofa="1" begin="140" end="164"/><example:Journal xmi:id="12574" sofa="1" begin="394" end="413"/><example:Journal xmi:id="12582" sofa="1" begin="770" end="777"/><example:Journal xmi:id="12590" sofa="1" begin="880" end="930"/><example:Journal xmi:id="12598" sofa="1" begin="1067" end="1090"/><example:Journal xmi:id="12606" sofa="1" begin="1220" end="1246"/><example:Journal xmi:id="12614" sofa="1" begin="1385" end="1429"/><example:Journal xmi:id="12622" sofa="1" begin="1645" end="1669"/><example:Journal xmi:id="12630" sofa="1" begin="1794" end="1818"/><example:Journal xmi:id="12638" sofa="1" begin="2155" end="2183"/><example:Journal xmi:id="12646" sofa="1" begin="2278" end="2291"/><example:Journal xmi:id="12654" sofa="1" begin="2387" end="2431"/><example:Journal xmi:id="12662" sofa="1" begin="2527" end="2574"/><example:Journal xmi:id="12670" sofa="1" begin="2731" end="2756"/><example:Location xmi:id="12678" sofa="1" begin="259" end="268"/><example:Location xmi:id="12686" sofa="1" begin="1565" end="1582"/><example:Location xmi:id="12694" sofa="1" begin="2043" end="2052"/><example:Tech xmi:id="12702" sofa="1" begin="650" end="661"/><cas:View sofa="1" members="8 11814 11822 11830 11838 11846 11854 11862 11870 11878 11886 11894 11902 11910 11918 11926 11934 11942 11950 11958 11966 11974 11982 11990 11998 12006 12014 12022 12030 12038 12046 12054 12062 12070 12078 12086 12094 12102 12110 12118 12126 12134 12142 12150 12158 12166 12174 12182 12190 12198 12206 12214 12222 12230 12238 12246 12254 12262 12270 12278 12286 12294 12302 12310 12318 12326 12334 12342 12350 12358 12366 12374 12382 12390 12398 12406 12414 12422 12430 12438 12446 12454 12462 12470 12478 12486 12494 12502 12510 12518 12526 12534 12542 12550 12558 12566 12574 12582 12590 12598 12606 12614 12622 12630 12638 12646 12654 12662 12670 12678 12686 12694 12702"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/1.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/1.txt.xmi.xmi
deleted file mode 100644
index cab6744..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/1.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Brad Calder and Dirk Gmnwald.   Next cache line and set prediction.   In 22nd Annual International Symposium of Computer Architecture,   pages 287-296.   ACM,   June 1995. &#10; Cary Gray and David Cheriton.   Leases: An efficient faulttolerant mechanism for distributed file cache consistency.   In Proceedings of the Twelfth Symposium on Operating Systems Principles,   pages 202-210.   ACM,   December 1989. &#10; Johan Fagerstrom, Peter Fritzson, Johan Ringstrom, and Mikael Pettersson.   A data-parallel language and its compilation to a formally defined intermediate language.   In Proceedings Fourth International Conference on Computing and Information,   May 1992. &#10; Phillip B. Gibbons and Steven S. Muchnick.   Efficient instruction scheduling for a pipelined architecture.   Proceedings of the SIG-PLAN 1986 Symposium on Compiler Construction,   ACM SIGPLAN Notices,   volume 21, no 7,   July 1986. &#10; William G. Cochran.   Sampling Techniques.   John Wiley and Sons, Inc.,   New York, New York,  1977. &#10; Cherri M. Pancake and Sue Utter.   Models for visualization in parallel debuggers.   In Proceedings Supercomputing '89,   November 1989. &#10; David F. Bacon and Robert E. Strom.   Optimistic Parallelization of Communicating Sequential Processes.   ACM SiGPLAN Symposium on Principles Practice of Parallel Programming,   April 1991. &#10; Marc Shapiro and Susan Horwitz.   Fast and accurate flow-insensitive points-to analysis.   In Proceedings of the 24th Annual ACM Symposium on Principles of Programming Languages,   January 1997. &#10; Lisa F. Rau.   Extracting company names from text.   In Proceedings of the Sixth IEEE Conference on Artificial Intelligence Applications,   1991. &#10; Christian Collberg.   Reverse interpretation + mutation analysis -automatic retargeting.   In Proceedings of the SIGPLAN '97 Conference on Programming Language Design Implementation,   June 1997. &#10; James Laudon, Daniel Lenoski.   The SGI Origin 2000: A ccNUMA Highly Scalable Server.   In Proceedings of the 24th Annual International Symposium on Computer Architecture,   June 1997. &#10; Cary Gray and David Cheriton.   Leases An efficient faulttolerant mechanism for distributed file cache consistency.   In Proceedings of the Twelfth Symposium on Operating Systems Principles,   pages 202-210.   ACM,   December 1989. &#10; David Mosberger and Larry L. Peterson.   Making paths explicit in the Scout operating system.   In Symposium on Operating Systems Design and Implementation,   volume 30,   pages 153–167.   ACM,   1996. &#10; Michael J. Carey, David J. DeWitt, and Jeffrey F. Naughton.   The 007 benchmark.   In Proceedings of the 1993 ACM-SIGMOD Conference on the Management of Data,   Washington York DC,   May 1993. &#10; Sren Se and Kevin Karplus.   Ordering heuristics for ordered binary decision diagrams and canonical if-then-else dags.   In International Workshop on Logic Synthesis,   Lake Tahoe, CA,   May 1993. &#10; Mark Keane, Padraig Cunningham, Mike Brady, and Ruth Byrne, editors.   Proc. Seventh Irish Annual Conference of AI and Cognitive Science.   Dublin University Press,   1994. &#10; Peter Puschner and Anton Schedl.   A tool for the computation of worst case task execution times.   In Proc. of the  5th EUROMICRO Workshop on Real-Time Systems,   1993. &#10; Sarita V. Adve.   Using information from the programmer to implement system optimizations without violating sequential consistency.   Technical Report Technical report TR 9603   (Submitted for publication),   Department of Electrical and Computer Engineering, Rice University,   March 1996. &#10; Arthur M. Keller and Julie Basu.   A predicate-based caching scheme for client-server database architectures.   In Proceedings of PDIS-94,   1994. &#10; Arvind Krishnamurthy and Katherine Yelick.   Optimizing parallel programs with explicit synchronization.   In Proceedings of the ACM SIG-PLAN '95 Conference on Programming Language Design and Implementation,   July 1995. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3918" language="x-unspecified"/><example:Author xmi:id="13015" sofa="1" begin="7" end="36"/><example:Author xmi:id="13023" sofa="1" begin="181" end="210"/><example:Author xmi:id="13031" sofa="1" begin="416" end="489"/><example:Author xmi:id="13039" sofa="1" begin="675" end="717"/><example:Author xmi:id="13047" sofa="1" begin="911" end="930"/><example:Author xmi:id="13055" sofa="1" begin="1014" end="1046"/><example:Author xmi:id="13063" sofa="1" begin="1153" end="1188"/><example:Author xmi:id="13071" sofa="1" begin="1345" end="1376"/><example:Author xmi:id="13079" sofa="1" begin="1542" end="1554"/><example:Author xmi:id="13087" sofa="1" begin="1690" end="1709"/><example:Author xmi:id="13095" sofa="1" begin="1888" end="1917"/><example:Author xmi:id="13103" sofa="1" begin="2075" end="2104"/><example:Author xmi:id="13111" sofa="1" begin="2309" end="2347"/><example:Author xmi:id="13119" sofa="1" begin="2513" end="2572"/><example:Author xmi:id="13127" sofa="1" begin="2708" end="2734"/><example:Author xmi:id="13135" sofa="1" begin="3082" end="3114"/><example:Author xmi:id="13143" sofa="1" begin="3254" end="3269"/><example:Author xmi:id="13151" sofa="1" begin="3547" end="3579"/><example:Author xmi:id="13159" sofa="1" begin="3696" end="3738"/><example:Date xmi:id="13167" sofa="1" begin="168" end="178"/><example:Date xmi:id="13175" sofa="1" begin="399" end="413"/><example:Date xmi:id="13183" sofa="1" begin="663" end="672"/><example:Date xmi:id="13191" sofa="1" begin="898" end="908"/><example:Date xmi:id="13199" sofa="1" begin="1006" end="1011"/><example:Date xmi:id="13207" sofa="1" begin="1136" end="1150"/><example:Date xmi:id="13215" sofa="1" begin="1331" end="1342"/><example:Date xmi:id="13223" sofa="1" begin="1526" end="1539"/><example:Date xmi:id="13231" sofa="1" begin="1682" end="1687"/><example:Date xmi:id="13239" sofa="1" begin="1875" end="1885"/><example:Date xmi:id="13247" sofa="1" begin="2062" end="2072"/><example:Date xmi:id="13255" sofa="1" begin="2292" end="2306"/><example:Date xmi:id="13263" sofa="1" begin="2505" end="2510"/><example:Date xmi:id="13271" sofa="1" begin="2696" end="2705"/><example:Date xmi:id="13279" sofa="1" begin="2895" end="2904"/><example:Date xmi:id="13287" sofa="1" begin="3074" end="3079"/><example:Date xmi:id="13295" sofa="1" begin="3246" end="3251"/><example:Date xmi:id="13303" sofa="1" begin="3533" end="3544"/><example:Date xmi:id="13311" sofa="1" begin="3688" end="3693"/><example:Date xmi:id="13319" sofa="1" begin="3906" end="3916"/><example:Pages xmi:id="13327" sofa="1" begin="144" end="158"/><example:Pages xmi:id="13335" sofa="1" begin="375" end="389"/><example:Pages xmi:id="13343" sofa="1" begin="2268" end="2282"/><example:Pages xmi:id="13351" sofa="1" begin="2481" end="2495"/><example:Publisher xmi:id="13359" sofa="1" begin="161" end="165"/><example:Publisher xmi:id="13367" sofa="1" begin="392" end="396"/><example:Publisher xmi:id="13375" sofa="1" begin="956" end="982"/><example:Publisher xmi:id="13383" sofa="1" begin="2285" end="2289"/><example:Publisher xmi:id="13391" sofa="1" begin="2498" end="2502"/><example:Publisher xmi:id="13399" sofa="1" begin="3047" end="3071"/><example:Institution xmi:id="13407" sofa="1" begin="3463" end="3530"/><example:Volume xmi:id="13415" sofa="1" begin="879" end="895"/><example:Volume xmi:id="13423" sofa="1" begin="2468" end="2478"/><example:Editor xmi:id="13431" sofa="1" begin="2907" end="2975"/><example:Title xmi:id="13439" sofa="1" begin="39" end="74"/><example:Title xmi:id="13447" sofa="1" begin="213" end="297"/><example:Title xmi:id="13455" sofa="1" begin="492" end="581"/><example:Title xmi:id="13463" sofa="1" begin="720" end="782"/><example:Title xmi:id="13471" sofa="1" begin="933" end="953"/><example:Title xmi:id="13479" sofa="1" begin="1049" end="1096"/><example:Title xmi:id="13487" sofa="1" begin="1191" end="1256"/><example:Title xmi:id="13495" sofa="1" begin="1379" end="1433"/><example:Title xmi:id="13503" sofa="1" begin="1557" end="1592"/><example:Title xmi:id="13511" sofa="1" begin="1712" end="1778"/><example:Title xmi:id="13519" sofa="1" begin="1920" end="1973"/><example:Title xmi:id="13527" sofa="1" begin="2107" end="2190"/><example:Title xmi:id="13535" sofa="1" begin="2350" end="2402"/><example:Title xmi:id="13543" sofa="1" begin="2575" end="2593"/><example:Title xmi:id="13551" sofa="1" begin="2737" end="2826"/><example:Title xmi:id="13559" sofa="1" begin="2978" end="3044"/><example:Title xmi:id="13567" sofa="1" begin="3117" end="3179"/><example:Title xmi:id="13575" sofa="1" begin="3272" end="3385"/><example:Title xmi:id="13583" sofa="1" begin="3582" end="3656"/><example:Title xmi:id="13591" sofa="1" begin="3741" end="3800"/><example:Booktitle xmi:id="13599" sofa="1" begin="77" end="141"/><example:Booktitle xmi:id="13607" sofa="1" begin="300" end="372"/><example:Booktitle xmi:id="13615" sofa="1" begin="584" end="660"/><example:Booktitle xmi:id="13623" sofa="1" begin="785" end="853"/><example:Booktitle xmi:id="13631" sofa="1" begin="1099" end="1133"/><example:Booktitle xmi:id="13639" sofa="1" begin="1259" end="1328"/><example:Booktitle xmi:id="13647" sofa="1" begin="1436" end="1523"/><example:Booktitle xmi:id="13655" sofa="1" begin="1595" end="1679"/><example:Booktitle xmi:id="13663" sofa="1" begin="1781" end="1872"/><example:Booktitle xmi:id="13671" sofa="1" begin="1976" end="2059"/><example:Booktitle xmi:id="13679" sofa="1" begin="2193" end="2265"/><example:Booktitle xmi:id="13687" sofa="1" begin="2596" end="2671"/><example:Booktitle xmi:id="13695" sofa="1" begin="2829" end="2874"/><example:Booktitle xmi:id="13703" sofa="1" begin="3182" end="3243"/><example:Booktitle xmi:id="13711" sofa="1" begin="3659" end="3685"/><example:Booktitle xmi:id="13719" sofa="1" begin="3803" end="3903"/><example:Journal xmi:id="13727" sofa="1" begin="856" end="876"/><example:Journal xmi:id="13735" sofa="1" begin="2405" end="2465"/><example:Location xmi:id="13743" sofa="1" begin="985" end="1004"/><example:Location xmi:id="13751" sofa="1" begin="2674" end="2693"/><example:Location xmi:id="13759" sofa="1" begin="2877" end="2892"/><example:Tech xmi:id="13767" sofa="1" begin="3388" end="3429"/><cas:View sofa="1" members="8 13015 13023 13031 13039 13047 13055 13063 13071 13079 13087 13095 13103 13111 13119 13127 13135 13143 13151 13159 13167 13175 13183 13191 13199 13207 13215 13223 13231 13239 13247 13255 13263 13271 13279 13287 13295 13303 13311 13319 13327 13335 13343 13351 13359 13367 13375 13383 13391 13399 13407 13415 13423 13431 13439 13447 13455 13463 13471 13479 13487 13495 13503 13511 13519 13527 13535 13543 13551 13559 13567 13575 13583 13591 13599 13607 13615 13623 13631 13639 13647 13655 13663 13671 13679 13687 13695 13703 13711 13719 13727 13735 13743 13751 13759 13767"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/10.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/10.txt.xmi.xmi
deleted file mode 100644
index a34718f..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/10.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Chapman, D.   (1987).   Planning for conjunctive goals.   Artificial Intelligence,   32,   333-377. &#10; Milgrom, P., &amp; Roberts, J.   (1991).   Adaptive and sophisticated learning in normal form games.   Games and Economic Behavior,   3,   82-100. &#10; Kambhampati, S., Knoblock, C., &amp; Yang, Q.   (1995).   Planning as refinement search: a unified framework for evaluating design tradeoffs in partial-order planning.   Artificial Intelligence,   76,   167-238. &#10; Koppel, M., Feldman, R., &amp; Segre, A. M.   (1994b).   Bias-driven revision of logical domain theories.   Journal of Artificial Intelligence Research,   1,   159-208. &#10; Lewis, D.   (1973).   Counterfactuals.   Harvard University Press,   Cambridge, MA. &#10; Angrist, J., Imbens, G., &amp; Rubin, D.   (1995).   Identification of causal effects using instrumental variables.   Journal of the American Statistical Association,   in press. &#10; Wermuth, N., &amp; Lauritzen, S. L.   (1983).   Graphical and recursive models for contingency tables.   Biometrika,   70,   537-552. &#10; Reiter, R.   (1980).   A logic for default reasoning.   Artificial Intelligence,   13,   81-132. &#10; Emihovich, C., &amp; Miller, G. E.   (1988).   Talking to the turtle: A discourse analysis of Logo instruction.   Discourse Processes,   11,   183-201. &#10; Schaal, S., &amp; Atkeson, C.   (1994).   Robot juggling: An implementation of memory-based learning.   Control Systems,   14,   57-71. &#10; Gent, I. P., &amp; Walsh, T.   (1994a).   Easy problems are sometimes hard.   Artificial Intelligence,   70,   335-345. &#10; Mooney, R. J.   (1990).   Learning plan schemata from observation: Explanation-based learning for plan recognition.   Cognitive Science,   14,   483-509. &#10; Plunkett, K., &amp; Marchman, V.   (1991).   U-shaped learning and frequency effects in a mul-tilayered perceptron: Implications for child language acquisition.   Cognition,   38,   43 - 102. &#10; Hinton, G. E., &amp; Nowlan, S. J.   (1987).   How learning can guide evolution.   Complex Systems,   1,   495-502. &#10; Srinivasan, A., Muggleton, S. H., Sternberg, M. J. E., &amp; King, R. D.   (1996).   Theories for mutagenicity: a study in first-order and feature-based induction.   Artificial Intelligence,   84,   277-299. &#10; Muggleton, S., &amp; De Raedt, L.   (1994).   Inductive logic programming: Theory and methods.   Journal of Logic Programming,   19,   629-679. &#10; Quinlan, J. R.   (1990).   Learning logical definitions from relations.   Machine Learning,   5,   239-266. &#10; Kirkpatrick, S., Gelatt, C., &amp; Vecchi, M.   (1983).   Optimization by simulated annealing.   Science,   220 (4598),   671-680. &#10; Fisher, D. H.   (1987).   Knowledge acquisition via incremental conceptual clustering.   Machine Learning,   2 (2),   139-172. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2702" language="x-unspecified"/><example:Author xmi:id="11423" sofa="1" begin="7" end="18"/><example:Author xmi:id="11431" sofa="1" begin="109" end="135"/><example:Author xmi:id="11439" sofa="1" begin="254" end="295"/><example:Author xmi:id="11447" sofa="1" begin="464" end="503"/><example:Author xmi:id="11455" sofa="1" begin="631" end="640"/><example:Author xmi:id="11463" sofa="1" begin="717" end="753"/><example:Author xmi:id="11471" sofa="1" begin="894" end="925"/><example:Author xmi:id="11479" sofa="1" begin="1026" end="1036"/><example:Author xmi:id="11487" sofa="1" begin="1125" end="1155"/><example:Author xmi:id="11495" sofa="1" begin="1275" end="1300"/><example:Author xmi:id="11503" sofa="1" begin="1409" end="1433"/><example:Author xmi:id="11511" sofa="1" begin="1527" end="1540"/><example:Author xmi:id="11519" sofa="1" begin="1683" end="1711"/><example:Author xmi:id="11527" sofa="1" begin="1873" end="1903"/><example:Author xmi:id="11535" sofa="1" begin="1987" end="2055"/><example:Author xmi:id="11543" sofa="1" begin="2193" end="2222"/><example:Author xmi:id="11551" sofa="1" begin="2335" end="2349"/><example:Author xmi:id="11559" sofa="1" begin="2445" end="2486"/><example:Author xmi:id="11567" sofa="1" begin="2574" end="2587"/><example:Date xmi:id="11575" sofa="1" begin="21" end="28"/><example:Date xmi:id="11583" sofa="1" begin="138" end="145"/><example:Date xmi:id="11591" sofa="1" begin="298" end="305"/><example:Date xmi:id="11599" sofa="1" begin="506" end="514"/><example:Date xmi:id="11607" sofa="1" begin="643" end="650"/><example:Date xmi:id="11615" sofa="1" begin="756" end="763"/><example:Date xmi:id="11623" sofa="1" begin="928" end="935"/><example:Date xmi:id="11631" sofa="1" begin="1039" end="1046"/><example:Date xmi:id="11639" sofa="1" begin="1158" end="1165"/><example:Date xmi:id="11647" sofa="1" begin="1303" end="1310"/><example:Date xmi:id="11655" sofa="1" begin="1436" end="1444"/><example:Date xmi:id="11663" sofa="1" begin="1543" end="1550"/><example:Date xmi:id="11671" sofa="1" begin="1714" end="1721"/><example:Date xmi:id="11679" sofa="1" begin="1906" end="1913"/><example:Date xmi:id="11687" sofa="1" begin="2058" end="2065"/><example:Date xmi:id="11695" sofa="1" begin="2225" end="2232"/><example:Date xmi:id="11703" sofa="1" begin="2352" end="2359"/><example:Date xmi:id="11711" sofa="1" begin="2489" end="2496"/><example:Date xmi:id="11719" sofa="1" begin="2590" end="2597"/><example:Pages xmi:id="11727" sofa="1" begin="98" end="106"/><example:Pages xmi:id="11735" sofa="1" begin="244" end="251"/><example:Pages xmi:id="11743" sofa="1" begin="453" end="461"/><example:Pages xmi:id="11751" sofa="1" begin="620" end="628"/><example:Pages xmi:id="11759" sofa="1" begin="1015" end="1023"/><example:Pages xmi:id="11767" sofa="1" begin="1115" end="1122"/><example:Pages xmi:id="11775" sofa="1" begin="1264" end="1272"/><example:Pages xmi:id="11783" sofa="1" begin="1400" end="1406"/><example:Pages xmi:id="11791" sofa="1" begin="1516" end="1524"/><example:Pages xmi:id="11799" sofa="1" begin="1672" end="1680"/><example:Pages xmi:id="11807" sofa="1" begin="1861" end="1870"/><example:Pages xmi:id="11815" sofa="1" begin="1976" end="1984"/><example:Pages xmi:id="11823" sofa="1" begin="2182" end="2190"/><example:Pages xmi:id="11831" sofa="1" begin="2324" end="2332"/><example:Pages xmi:id="11839" sofa="1" begin="2434" end="2442"/><example:Pages xmi:id="11847" sofa="1" begin="2563" end="2571"/><example:Pages xmi:id="11855" sofa="1" begin="2692" end="2700"/><example:Publisher xmi:id="11863" sofa="1" begin="672" end="697"/><example:Volume xmi:id="11871" sofa="1" begin="92" end="95"/><example:Volume xmi:id="11879" sofa="1" begin="239" end="241"/><example:Volume xmi:id="11887" sofa="1" begin="447" end="450"/><example:Volume xmi:id="11895" sofa="1" begin="615" end="617"/><example:Volume xmi:id="11903" sofa="1" begin="1009" end="1012"/><example:Volume xmi:id="11911" sofa="1" begin="1109" end="1112"/><example:Volume xmi:id="11919" sofa="1" begin="1258" end="1261"/><example:Volume xmi:id="11927" sofa="1" begin="1394" end="1397"/><example:Volume xmi:id="11935" sofa="1" begin="1510" end="1513"/><example:Volume xmi:id="11943" sofa="1" begin="1666" end="1669"/><example:Volume xmi:id="11951" sofa="1" begin="1855" end="1858"/><example:Volume xmi:id="11959" sofa="1" begin="1971" end="1973"/><example:Volume xmi:id="11967" sofa="1" begin="2176" end="2179"/><example:Volume xmi:id="11975" sofa="1" begin="2318" end="2321"/><example:Volume xmi:id="11983" sofa="1" begin="2429" end="2431"/><example:Volume xmi:id="11991" sofa="1" begin="2549" end="2560"/><example:Volume xmi:id="11999" sofa="1" begin="2683" end="2689"/><example:Title xmi:id="12007" sofa="1" begin="31" end="62"/><example:Title xmi:id="12015" sofa="1" begin="148" end="205"/><example:Title xmi:id="12023" sofa="1" begin="308" end="417"/><example:Title xmi:id="12031" sofa="1" begin="517" end="565"/><example:Title xmi:id="12039" sofa="1" begin="653" end="669"/><example:Title xmi:id="12047" sofa="1" begin="766" end="828"/><example:Title xmi:id="12055" sofa="1" begin="938" end="992"/><example:Title xmi:id="12063" sofa="1" begin="1049" end="1079"/><example:Title xmi:id="12071" sofa="1" begin="1168" end="1232"/><example:Title xmi:id="12079" sofa="1" begin="1313" end="1372"/><example:Title xmi:id="12087" sofa="1" begin="1447" end="1480"/><example:Title xmi:id="12095" sofa="1" begin="1553" end="1642"/><example:Title xmi:id="12103" sofa="1" begin="1724" end="1839"/><example:Title xmi:id="12111" sofa="1" begin="1916" end="1949"/><example:Title xmi:id="12119" sofa="1" begin="2068" end="2146"/><example:Title xmi:id="12127" sofa="1" begin="2235" end="2283"/><example:Title xmi:id="12135" sofa="1" begin="2362" end="2406"/><example:Title xmi:id="12143" sofa="1" begin="2499" end="2535"/><example:Title xmi:id="12151" sofa="1" begin="2600" end="2660"/><example:Journal xmi:id="12159" sofa="1" begin="65" end="89"/><example:Journal xmi:id="12167" sofa="1" begin="208" end="236"/><example:Journal xmi:id="12175" sofa="1" begin="420" end="444"/><example:Journal xmi:id="12183" sofa="1" begin="568" end="612"/><example:Journal xmi:id="12191" sofa="1" begin="831" end="879"/><example:Journal xmi:id="12199" sofa="1" begin="995" end="1006"/><example:Journal xmi:id="12207" sofa="1" begin="1082" end="1106"/><example:Journal xmi:id="12215" sofa="1" begin="1235" end="1255"/><example:Journal xmi:id="12223" sofa="1" begin="1375" end="1391"/><example:Journal xmi:id="12231" sofa="1" begin="1483" end="1507"/><example:Journal xmi:id="12239" sofa="1" begin="1645" end="1663"/><example:Journal xmi:id="12247" sofa="1" begin="1842" end="1852"/><example:Journal xmi:id="12255" sofa="1" begin="1952" end="1968"/><example:Journal xmi:id="12263" sofa="1" begin="2149" end="2173"/><example:Journal xmi:id="12271" sofa="1" begin="2286" end="2315"/><example:Journal xmi:id="12279" sofa="1" begin="2409" end="2426"/><example:Journal xmi:id="12287" sofa="1" begin="2538" end="2546"/><example:Journal xmi:id="12295" sofa="1" begin="2663" end="2680"/><example:Location xmi:id="12303" sofa="1" begin="700" end="714"/><cas:View sofa="1" members="8 11423 11431 11439 11447 11455 11463 11471 11479 11487 11495 11503 11511 11519 11527 11535 11543 11551 11559 11567 11575 11583 11591 11599 11607 11615 11623 11631 11639 11647 11655 11663 11671 11679 11687 11695 11703 11711 11719 11727 11735 11743 11751 11759 11767 11775 11783 11791 11799 11807 11815 11823 11831 11839 11847 11855 11863 11871 11879 11887 11895 11903 11911 11919 11927 11935 11943 11951 11959 11967 11975 11983 11991 11999 12007 12015 12023 12031 12039 12047 12055 12063 12071 12079 12087 12095 12103 12111 12119 12127 12135 12143 12151 12159 12167 12175 12183 12191 12199 12207 12215 12223 12231 12239 12247 12255 12263 12271 12279 12287 12295 12303"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/11.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/11.txt.xmi.xmi
deleted file mode 100644
index 49924d9..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/11.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; C. W. Tseng.   Compiler optimizations for eliminating barrier synchronization.   In Proceedings of the Fifth ACM/SiGPLAN Symposium on Principles Practice of Parallel Programming,   pages 144-155,   July 1995. &#10; J. Wiener, H. Gupta, W. Labio, Y. Zhuge, H. Garcia-Molina, and J. Widom.   A system prototype for warehouse view maintenance.   In The Workshop on Materialized Views,   pages 26-33,   June 1996. &#10; A. Gupta, I. Mumick, and V. Subrahmanian.   Maintaining views incrementally.   In Preceedings of the 1993 ACM SIGMOD International Conference on Management of Data,   pages 157-166,   Washington, D. C.,   May 1993. &#10; C. Thekkath, H. Levy, and E. Lazowska.   Efficient Support for Multicomputing on ATM Networks.   Technical Report TR93-04-03,   Department of Computer Science and Engineering, University of Washington,   April 1993. &#10; A. Belussi and C. Faloutsos.   Estimating the Selectivity of Spatial Queries Using the `Correlation' Fractal Dimension.   In Proceedings of the International Conference on Very Large Data Bases,   pages 299--310,   September 1995. &#10; C.P. Gomes, C. Fernández, B. Selman, and C. Bessiere.   Statistical regimes across constrainedness regions.   In Proceedings of CP’04,   pages 32–46,   2004. &#10; T. Saaao.   An application of multiple-valued logic to a design of programmable logic arrays.   In Proceedings of the 8th International Symposium on Multiple-Valued Logic,   1978. &#10; G. C. Necula.   Proof-carrying code.   In Proceedings of the 24th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages,   Paris, France,   January 15-17 1997. &#10; J. Ousterhout, Da Costa, H. Harrison, J Kunze, M. Kupfer, and J. Thompson.   A Trace-Driven Analysis of the Unix 4.2 BSD File System.   In Proceedings of the 10th Symposium on Operating Systems Principles,   pages 15--24,   December 1985. &#10; A. P. Sistla and O. Wolfson.   Temporal Conditions and Integrity Constraints in Active Database Systems.   In Proceedings of the 1995 ACM SIGMOD Intl. Conference on Management of Data,   pages 269-280,   1995. &#10; J. Choi, R. Cytron, and J. Ferrante.   Automatic construction of sparse data flow evaluation graphs.   In Proceedings of the Eighteenth Annual ACM Symposium on the Principles of Programming Languages,   pages 55-66,   Orlando, FL,   January 1991. &#10; H. Raiffa.   The Art and Science of Negotiation.   Harvard Univ. Press,   Cambridge, Mass.,   1982. &#10; U. Vazirani.   Efficiency considerations in using semi-random sources.   In Proceedings of the 19 th Annual ACM Symposium on Theory of Computing,   New York City,   1987. &#10; U. Dayal, H. Garcia-Molina, M. Hsu, B. Kao, and M.- C. Shan.   Third generation TP monitors: A database challenge.   In ACM SIGMOD Conference on Management of Data,   pages 393-397,   Washington, D. C.,   May 1993. &#10; T. Joachims.   A probabilistic analysis of the rocchio algorithm with TFIDF for text categorization.   Technical Report Computer Science Technical Report CMU-CS-96-118,   Carnigie-Mellon University,   1996. &#10; K. Smith, W. Appelbe, and K. Stirewalt.   Incremental dependence analysis for interactive parallelization.   In Proceedings of the 1990 ACM International Conference on Supercomputing,   Amsterdam, The Netherlands,   June 1990. &#10; M.J. Cresswell.   Logics and Languages.   Methuen and Co.,   London,   1973. &#10; S. Hiranandani, K. Kennedy, C. Koelbel, U. Kremer, and C. Tseng.   An overview of the fortran d programming system.   Technical Report CRPC-TR91121,   Dept of computer Science, Rice University,   1991. &#10; M. Kamath and K. Ramamritham.   Modeling, Correctness &amp; Systems Issues in Supporting Advanced Database Applications using Workflow Management Systems.   Technical Report TR 95-50,   University of Massachusetts, Computer Science Dept.,   1995. &#10; H. Balakrishnan, H.S. Rahul, S. Seshan.   An Integrated Congestion Management Architecture for Internet Hosts.   ACM SIGCOMM’99,   1999. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3906" language="x-unspecified"/><example:Author xmi:id="14353" sofa="1" begin="7" end="19"/><example:Author xmi:id="14361" sofa="1" begin="218" end="290"/><example:Author xmi:id="14369" sofa="1" begin="415" end="456"/><example:Author xmi:id="14377" sofa="1" begin="632" end="670"/><example:Author xmi:id="14385" sofa="1" begin="850" end="878"/><example:Author xmi:id="14393" sofa="1" begin="1083" end="1136"/><example:Author xmi:id="14401" sofa="1" begin="1243" end="1252"/><example:Author xmi:id="14409" sofa="1" begin="1425" end="1438"/><example:Author xmi:id="14417" sofa="1" begin="1608" end="1682"/><example:Author xmi:id="14425" sofa="1" begin="1849" end="1877"/><example:Author xmi:id="14433" sofa="1" begin="2061" end="2097"/><example:Author xmi:id="14441" sofa="1" begin="2310" end="2320"/><example:Author xmi:id="14449" sofa="1" begin="2412" end="2424"/><example:Author xmi:id="14457" sofa="1" begin="2585" end="2645"/><example:Author xmi:id="14465" sofa="1" begin="2802" end="2814"/><example:Author xmi:id="14473" sofa="1" begin="3011" end="3050"/><example:Author xmi:id="14481" sofa="1" begin="3240" end="3255"/><example:Author xmi:id="14489" sofa="1" begin="3319" end="3383"/><example:Author xmi:id="14497" sofa="1" begin="3523" end="3552"/><example:Author xmi:id="14505" sofa="1" begin="3768" end="3807"/><example:Date xmi:id="14513" sofa="1" begin="205" end="215"/><example:Date xmi:id="14521" sofa="1" begin="402" end="412"/><example:Date xmi:id="14529" sofa="1" begin="620" end="629"/><example:Date xmi:id="14537" sofa="1" begin="836" end="847"/><example:Date xmi:id="14545" sofa="1" begin="1065" end="1080"/><example:Date xmi:id="14553" sofa="1" begin="1235" end="1240"/><example:Date xmi:id="14561" sofa="1" begin="1417" end="1422"/><example:Date xmi:id="14569" sofa="1" begin="1586" end="1605"/><example:Date xmi:id="14577" sofa="1" begin="1832" end="1846"/><example:Date xmi:id="14585" sofa="1" begin="2053" end="2058"/><example:Date xmi:id="14593" sofa="1" begin="2294" end="2307"/><example:Date xmi:id="14601" sofa="1" begin="2404" end="2409"/><example:Date xmi:id="14609" sofa="1" begin="2577" end="2582"/><example:Date xmi:id="14617" sofa="1" begin="2790" end="2799"/><example:Date xmi:id="14625" sofa="1" begin="3003" end="3008"/><example:Date xmi:id="14633" sofa="1" begin="3227" end="3237"/><example:Date xmi:id="14641" sofa="1" begin="3311" end="3316"/><example:Date xmi:id="14649" sofa="1" begin="3515" end="3520"/><example:Date xmi:id="14657" sofa="1" begin="3760" end="3765"/><example:Date xmi:id="14665" sofa="1" begin="3899" end="3904"/><example:Pages xmi:id="14673" sofa="1" begin="188" end="202"/><example:Pages xmi:id="14681" sofa="1" begin="387" end="399"/><example:Pages xmi:id="14689" sofa="1" begin="582" end="596"/><example:Pages xmi:id="14697" sofa="1" begin="1047" end="1062"/><example:Pages xmi:id="14705" sofa="1" begin="1220" end="1232"/><example:Pages xmi:id="14713" sofa="1" begin="1816" end="1829"/><example:Pages xmi:id="14721" sofa="1" begin="2036" end="2050"/><example:Pages xmi:id="14729" sofa="1" begin="2264" end="2276"/><example:Pages xmi:id="14737" sofa="1" begin="2752" end="2766"/><example:Publisher xmi:id="14745" sofa="1" begin="2361" end="2381"/><example:Publisher xmi:id="14753" sofa="1" begin="3282" end="3298"/><example:Institution xmi:id="14761" sofa="1" begin="760" end="833"/><example:Institution xmi:id="14769" sofa="1" begin="2973" end="3000"/><example:Institution xmi:id="14777" sofa="1" begin="3470" end="3512"/><example:Institution xmi:id="14785" sofa="1" begin="3705" end="3757"/><example:Title xmi:id="14793" sofa="1" begin="22" end="85"/><example:Title xmi:id="14801" sofa="1" begin="293" end="343"/><example:Title xmi:id="14809" sofa="1" begin="459" end="491"/><example:Title xmi:id="14817" sofa="1" begin="673" end="726"/><example:Title xmi:id="14825" sofa="1" begin="881" end="969"/><example:Title xmi:id="14833" sofa="1" begin="1139" end="1190"/><example:Title xmi:id="14841" sofa="1" begin="1255" end="1336"/><example:Title xmi:id="14849" sofa="1" begin="1441" end="1461"/><example:Title xmi:id="14857" sofa="1" begin="1685" end="1741"/><example:Title xmi:id="14865" sofa="1" begin="1880" end="1953"/><example:Title xmi:id="14873" sofa="1" begin="2100" end="2161"/><example:Title xmi:id="14881" sofa="1" begin="2323" end="2358"/><example:Title xmi:id="14889" sofa="1" begin="2427" end="2482"/><example:Title xmi:id="14897" sofa="1" begin="2648" end="2699"/><example:Title xmi:id="14905" sofa="1" begin="2817" end="2902"/><example:Title xmi:id="14913" sofa="1" begin="3053" end="3117"/><example:Title xmi:id="14921" sofa="1" begin="3258" end="3279"/><example:Title xmi:id="14929" sofa="1" begin="3386" end="3434"/><example:Title xmi:id="14937" sofa="1" begin="3555" end="3673"/><example:Title xmi:id="14945" sofa="1" begin="3810" end="3878"/><example:Booktitle xmi:id="14953" sofa="1" begin="88" end="185"/><example:Booktitle xmi:id="14961" sofa="1" begin="346" end="384"/><example:Booktitle xmi:id="14969" sofa="1" begin="494" end="579"/><example:Booktitle xmi:id="14977" sofa="1" begin="972" end="1044"/><example:Booktitle xmi:id="14985" sofa="1" begin="1193" end="1217"/><example:Booktitle xmi:id="14993" sofa="1" begin="1339" end="1414"/><example:Booktitle xmi:id="15001" sofa="1" begin="1464" end="1566"/><example:Booktitle xmi:id="15009" sofa="1" begin="1744" end="1813"/><example:Booktitle xmi:id="15017" sofa="1" begin="1956" end="2033"/><example:Booktitle xmi:id="15025" sofa="1" begin="2164" end="2261"/><example:Booktitle xmi:id="15033" sofa="1" begin="2485" end="2557"/><example:Booktitle xmi:id="15041" sofa="1" begin="2702" end="2749"/><example:Booktitle xmi:id="15049" sofa="1" begin="3120" end="3194"/><example:Booktitle xmi:id="15057" sofa="1" begin="3881" end="3896"/><example:Location xmi:id="15065" sofa="1" begin="599" end="617"/><example:Location xmi:id="15073" sofa="1" begin="1569" end="1583"/><example:Location xmi:id="15081" sofa="1" begin="2279" end="2291"/><example:Location xmi:id="15089" sofa="1" begin="2384" end="2401"/><example:Location xmi:id="15097" sofa="1" begin="2560" end="2574"/><example:Location xmi:id="15105" sofa="1" begin="2769" end="2787"/><example:Location xmi:id="15113" sofa="1" begin="3197" end="3224"/><example:Location xmi:id="15121" sofa="1" begin="3301" end="3308"/><example:Tech xmi:id="15129" sofa="1" begin="729" end="757"/><example:Tech xmi:id="15137" sofa="1" begin="2905" end="2970"/><example:Tech xmi:id="15145" sofa="1" begin="3437" end="3467"/><example:Tech xmi:id="15153" sofa="1" begin="3676" end="3702"/><cas:View sofa="1" members="8 14353 14361 14369 14377 14385 14393 14401 14409 14417 14425 14433 14441 14449 14457 14465 14473 14481 14489 14497 14505 14513 14521 14529 14537 14545 14553 14561 14569 14577 14585 14593 14601 14609 14617 14625 14633 14641 14649 14657 14665 14673 14681 14689 14697 14705 14713 14721 14729 14737 14745 14753 14761 14769 14777 14785 14793 14801 14809 14817 14825 14833 14841 14849 14857 14865 14873 14881 14889 14897 14905 14913 14921 14929 14937 14945 14953 14961 14969 14977 14985 14993 15001 15009 15017 15025 15033 15041 15049 15057 15065 15073 15081 15089 15097 15105 15113 15121 15129 15137 15145 15153"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/12.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/12.txt.xmi.xmi
deleted file mode 100644
index 211d778..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/12.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Jeffrey Kuskin, David Ofelt, Mark Heinrich, John Heinlein, Richard Simoni, Kourosh Gharachorloo, John Chapin, David Nakahira, Joel Baxter, Mark Horowitz, Anoop Gupta, Mendel Rosenbaum, and John Hennessy.   The Stanford FLASH multiprocessor.   In Proceedings of the 21st Annual International Conference on Computer Architecture,   pages 302-313,   April 1994. &#10; Vijay Karamcheti and Andrew Chien.   Software Overhead in Messaging Layers: Where Does the Time Go?.   Proceedings of the 6th International Conference on Architectural Support for Programming Languages Operating Systems,   pages 51-60,   October 1994. &#10; Howard Turtle and W. Bruce Croft.   Inference networks for document retrieval.   In Jean-Luc Vidick, editor,   Proceedings of the 13th Annual International ACM-SIGIR Conference on Research and Development in Information Retrieval,   pages 1-24,   Brussels, Belgium,   September 1990. &#10; James Laudon and Daniel Lenoski.   An optimal sorting algorithm for mesh connected computers.   In Proceedings of the 18th Annual ACM Symposium on Theory of Computing,   pages 255-263,   1986. &#10; Oded Shmueli.   Decidability and expressiveness aspects of logic queries.   In Proceedings of the Sixth Symposium on Principles of Database Systems (PODS),   pages 237-249,   San Diego, CA,   March 1987. &#10; Edith Cohen and Nimrod Megiddo.   Strongly Polynomial-Time and NC Algorithms for Detecting Cycles in Dynamic Graphs.   Proceddings of the 21st ACM Annual Symposium on Theory of Computing,   pages 523-534,   1989. &#10; Phillip B. Gibbons and Ephraim Korach.   On testing cache-coherent shared memories.   In Proceedings of the 6th Annual Symposium on Parallel Algorithms Architectures,   pages 177-188,   New York, NY, USA,   June 1994.   ACM Press. &#10; Arun Garg.   Parallel STREAMS: A multi-processor implementation.   In Proceedings of the Winter 1990 USENIX Conference,   pages 163-176,   Washington, D. C.,   January 1990. &#10; Albert Croker and David Maier.   A Dynamic Tree-Locking Protocol.   In Proceedings of the International Conference in Data Engineering,   pages 49-56,   Los Angeles, CA,   1986. &#10; James Archibald and Jean-Loup Baer.   An economical solution to the cache coherence problem.   In The 11th Annual International Symposium on Computer Architecture,   pages 355-362,   1984. &#10; Anoop Gupta, Andrew Tucker, and Shigeru Urushibara.   The impact of operating system scheduling policies and synchro nization methods on the performance of parallel applications.   In Proceedings of the ACM SIGMETRICS Conference on Measurement and Modeling of Computer Systems,   pages 120-132,   May 1991. &#10; Thomas von Eicken, David E. Culler, Seth Copen Goldstein, and Karl Erik Schauser.   Active messages: A mechanism for integrated communication and computation.   In Proceedings of the 19th Annual International Symposium on Computer Architecture,   pages 256-266,   May 1992. &#10; Paul Hudak, Simon Peyton Jones, and Philip Wadler (Editors).   Report on the Programming Language Haskell, version 1.2.   ACM SIGPLAN Notices,   27(5),   1992. &#10; David Basin and Harald Ganzinger.   Complexity Analysis Based on Ordered Resolution.   In Eleventh Annual IEEE Symposium on Logic in Computer Science,   pages 456--465,   New Brunswick, New Jersey, USA,   July 27--30, 1996.   IEEE Computer Society Press. &#10; James P. Callan, Zhihong Lu, and W. Bruce Croft.   Searching Distributed Collections with Inference Networks.   In Proceedings of the 18th International Conference on Research Development in Information Retrieval,   pages 21-29,   Seattle, WA,   1995. &#10; David Chapman.   Planning for conjunctive goals.   Artificial Intelligence,   32,   1987. &#10; Mark Holland and Garth A. Gibson.   Parity Ieclustering for Continuous Operation in Redundant Disk Arrays.   In Proceedings of 5th Int Conf on Architectural Support for Programming Languages Operating Systems,   pages 23-34,   Oct 1992. &#10; David A. Wood, Satish Chandra, Babak Falsafi, Mark D. Hill, James R. Larus, Alvin R. Lebeck, James C. Lewis, Shubhendu S. Mukherjee, Subbarao Palacharla, and Steven K. Reinhardt.   Mechanisms for Cooperative Shared Memory.   In Proceedings of the 20th Annual International Symposium on Computer Architecture,   pages 156-168,   May 1993. &#10; Edwina L. Rissland and Jody J. Daniels.   A Hybrid CBR-IR Approach to Legal Information Retrieval.   In Proceedings 5th International Conference on Artificial Intelligence an Law,   pages 52-61,   May 1995.   ACM. &#10; Andreas Ermedahl and Jan Gustafsson.   Deriving annotations for tight calculation of execution time.   Department of Computer Systems, University of Uppsala and Department of Computer Engineering, Malardalen University, Sweden.   Submitted to EuroPar'97,   February 1997. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="4722" language="x-unspecified"/><example:Author xmi:id="16063" sofa="1" begin="7" end="210"/><example:Author xmi:id="16071" sofa="1" begin="368" end="402"/><example:Author xmi:id="16079" sofa="1" begin="622" end="655"/><example:Author xmi:id="16087" sofa="1" begin="908" end="940"/><example:Author xmi:id="16095" sofa="1" begin="1103" end="1116"/><example:Author xmi:id="16103" sofa="1" begin="1309" end="1340"/><example:Author xmi:id="16111" sofa="1" begin="1524" end="1562"/><example:Author xmi:id="16119" sofa="1" begin="1757" end="1767"/><example:Author xmi:id="16127" sofa="1" begin="1933" end="1963"/><example:Author xmi:id="16135" sofa="1" begin="2113" end="2148"/><example:Author xmi:id="16143" sofa="1" begin="2304" end="2355"/><example:Author xmi:id="16151" sofa="1" begin="2613" end="2694"/><example:Author xmi:id="16159" sofa="1" begin="3051" end="3084"/><example:Author xmi:id="16167" sofa="1" begin="3308" end="3356"/><example:Author xmi:id="16175" sofa="1" begin="3562" end="3576"/><example:Author xmi:id="16183" sofa="1" begin="3654" end="3687"/><example:Author xmi:id="16191" sofa="1" begin="3893" end="4071"/><example:Author xmi:id="16199" sofa="1" begin="4233" end="4272"/><example:Author xmi:id="16207" sofa="1" begin="4449" end="4485"/><example:Date xmi:id="16215" sofa="1" begin="354" end="365"/><example:Date xmi:id="16223" sofa="1" begin="606" end="619"/><example:Date xmi:id="16231" sofa="1" begin="890" end="905"/><example:Date xmi:id="16239" sofa="1" begin="1095" end="1100"/><example:Date xmi:id="16247" sofa="1" begin="1295" end="1306"/><example:Date xmi:id="16255" sofa="1" begin="1516" end="1521"/><example:Date xmi:id="16263" sofa="1" begin="1731" end="1741"/><example:Date xmi:id="16271" sofa="1" begin="1917" end="1930"/><example:Date xmi:id="16279" sofa="1" begin="2105" end="2110"/><example:Date xmi:id="16287" sofa="1" begin="2296" end="2301"/><example:Date xmi:id="16295" sofa="1" begin="2601" end="2610"/><example:Date xmi:id="16303" sofa="1" begin="2877" end="2886"/><example:Date xmi:id="16311" sofa="1" begin="3043" end="3048"/><example:Date xmi:id="16319" sofa="1" begin="3256" end="3274"/><example:Date xmi:id="16327" sofa="1" begin="3554" end="3559"/><example:Date xmi:id="16335" sofa="1" begin="3646" end="3651"/><example:Date xmi:id="16343" sofa="1" begin="3881" end="3890"/><example:Date xmi:id="16351" sofa="1" begin="4221" end="4230"/><example:Date xmi:id="16359" sofa="1" begin="4430" end="4439"/><example:Date xmi:id="16367" sofa="1" begin="4706" end="4720"/><example:Pages xmi:id="16375" sofa="1" begin="337" end="351"/><example:Pages xmi:id="16383" sofa="1" begin="591" end="603"/><example:Pages xmi:id="16391" sofa="1" begin="855" end="866"/><example:Pages xmi:id="16399" sofa="1" begin="1078" end="1092"/><example:Pages xmi:id="16407" sofa="1" begin="1261" end="1275"/><example:Pages xmi:id="16415" sofa="1" begin="1499" end="1513"/><example:Pages xmi:id="16423" sofa="1" begin="1693" end="1707"/><example:Pages xmi:id="16431" sofa="1" begin="1879" end="1893"/><example:Pages xmi:id="16439" sofa="1" begin="2071" end="2083"/><example:Pages xmi:id="16447" sofa="1" begin="2279" end="2293"/><example:Pages xmi:id="16455" sofa="1" begin="2584" end="2598"/><example:Pages xmi:id="16463" sofa="1" begin="2860" end="2874"/><example:Pages xmi:id="16471" sofa="1" begin="3204" end="3219"/><example:Pages xmi:id="16479" sofa="1" begin="3524" end="3536"/><example:Pages xmi:id="16487" sofa="1" begin="3866" end="3878"/><example:Pages xmi:id="16495" sofa="1" begin="4204" end="4218"/><example:Pages xmi:id="16503" sofa="1" begin="4415" end="4427"/><example:Publisher xmi:id="16511" sofa="1" begin="1744" end="1754"/><example:Publisher xmi:id="16519" sofa="1" begin="3277" end="3305"/><example:Publisher xmi:id="16527" sofa="1" begin="4442" end="4446"/><example:Institution xmi:id="16535" sofa="1" begin="4552" end="4676"/><example:Volume xmi:id="16543" sofa="1" begin="3034" end="3040"/><example:Volume xmi:id="16551" sofa="1" begin="3640" end="3643"/><example:Editor xmi:id="16559" sofa="1" begin="703" end="730"/><example:Editor xmi:id="16567" sofa="1" begin="2889" end="2949"/><example:Title xmi:id="16575" sofa="1" begin="213" end="247"/><example:Title xmi:id="16583" sofa="1" begin="405" end="468"/><example:Title xmi:id="16591" sofa="1" begin="658" end="700"/><example:Title xmi:id="16599" sofa="1" begin="943" end="1001"/><example:Title xmi:id="16607" sofa="1" begin="1119" end="1176"/><example:Title xmi:id="16615" sofa="1" begin="1343" end="1425"/><example:Title xmi:id="16623" sofa="1" begin="1565" end="1607"/><example:Title xmi:id="16631" sofa="1" begin="1770" end="1821"/><example:Title xmi:id="16639" sofa="1" begin="1966" end="1998"/><example:Title xmi:id="16647" sofa="1" begin="2151" end="2205"/><example:Title xmi:id="16655" sofa="1" begin="2358" end="2482"/><example:Title xmi:id="16663" sofa="1" begin="2697" end="2771"/><example:Title xmi:id="16671" sofa="1" begin="2952" end="3008"/><example:Title xmi:id="16679" sofa="1" begin="3087" end="3135"/><example:Title xmi:id="16687" sofa="1" begin="3359" end="3417"/><example:Title xmi:id="16695" sofa="1" begin="3579" end="3610"/><example:Title xmi:id="16703" sofa="1" begin="3690" end="3760"/><example:Title xmi:id="16711" sofa="1" begin="4074" end="4115"/><example:Title xmi:id="16719" sofa="1" begin="4275" end="4331"/><example:Title xmi:id="16727" sofa="1" begin="4488" end="4549"/><example:Booktitle xmi:id="16735" sofa="1" begin="250" end="334"/><example:Booktitle xmi:id="16743" sofa="1" begin="471" end="588"/><example:Booktitle xmi:id="16751" sofa="1" begin="733" end="852"/><example:Booktitle xmi:id="16759" sofa="1" begin="1004" end="1075"/><example:Booktitle xmi:id="16767" sofa="1" begin="1179" end="1258"/><example:Booktitle xmi:id="16775" sofa="1" begin="1428" end="1496"/><example:Booktitle xmi:id="16783" sofa="1" begin="1610" end="1690"/><example:Booktitle xmi:id="16791" sofa="1" begin="1824" end="1876"/><example:Booktitle xmi:id="16799" sofa="1" begin="2001" end="2068"/><example:Booktitle xmi:id="16807" sofa="1" begin="2208" end="2276"/><example:Booktitle xmi:id="16815" sofa="1" begin="2485" end="2581"/><example:Booktitle xmi:id="16823" sofa="1" begin="2774" end="2857"/><example:Booktitle xmi:id="16831" sofa="1" begin="3138" end="3201"/><example:Booktitle xmi:id="16839" sofa="1" begin="3420" end="3521"/><example:Booktitle xmi:id="16847" sofa="1" begin="3763" end="3863"/><example:Booktitle xmi:id="16855" sofa="1" begin="4118" end="4201"/><example:Booktitle xmi:id="16863" sofa="1" begin="4334" end="4412"/><example:Journal xmi:id="16871" sofa="1" begin="3011" end="3031"/><example:Journal xmi:id="16879" sofa="1" begin="3613" end="3637"/><example:Location xmi:id="16887" sofa="1" begin="869" end="887"/><example:Location xmi:id="16895" sofa="1" begin="1278" end="1292"/><example:Location xmi:id="16903" sofa="1" begin="1710" end="1728"/><example:Location xmi:id="16911" sofa="1" begin="1896" end="1914"/><example:Location xmi:id="16919" sofa="1" begin="2086" end="2102"/><example:Location xmi:id="16927" sofa="1" begin="3222" end="3253"/><example:Location xmi:id="16935" sofa="1" begin="3539" end="3551"/><cas:View sofa="1" members="8 16063 16071 16079 16087 16095 16103 16111 16119 16127 16135 16143 16151 16159 16167 16175 16183 16191 16199 16207 16215 16223 16231 16239 16247 16255 16263 16271 16279 16287 16295 16303 16311 16319 16327 16335 16343 16351 16359 16367 16375 16383 16391 16399 16407 16415 16423 16431 16439 16447 16455 16463 16471 16479 16487 16495 16503 16511 16519 16527 16535 16543 16551 16559 16567 16575 16583 16591 16599 16607 16615 16623 16631 16639 16647 16655 16663 16671 16679 16687 16695 16703 16711 16719 16727 16735 16743 16751 16759 16767 16775 16783 16791 16799 16807 16815 16823 16831 16839 16847 16855 16863 16871 16879 16887 16895 16903 16911 16919 16927 16935"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/13.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/13.txt.xmi.xmi
deleted file mode 100644
index 325c0f2..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/13.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; C. Creveuil and G. Roman.   Formal specification and design of a message router.   ACM Transactions on Software Engineering Methodology,   3(4):271-307,   1994. &#10; J. J. Koenderink.   The structure of images.   Biological Cybernetics,   50   363-396,   1984. &#10; J. T. Hecht, Y. Wang, B. Connor, S. H. Blanton, and S. P. Daiger.   Non-syndromic cleft lip and palate: No evidence of linkage to HLA or factor 13a.   American Journal of Human Genetics,   52   1230-1233,   1993. &#10; F. Facchinei and C. Kanzow.   On unconstrained and constrained stationary points of the implicit Lagrangian.   Journal of Optimization Theory and Applications,   92   99-115,   1997. &#10; S. M. Robinson.   Some continuity properties of polyhedral multifunctions.   Mathematical Programming Study,   14   206-214,   1981. &#10; J. C. Butcher.   General linear method: A survey.   Appl. Numer. Math.,   1   273,   1985. &#10; D. Benech, T. Desprats.   A KQML-CORBA based Architecture for Intelligent Agents Communication in Cooperative Service and Network Management.   In Proceedings of IFIP/IEEE International Conference on Management of Multimedia Networks and Services ’97   July 8-10, 1997. &#10; M. C. Speer, L. H. Yamaoka, J. H. Gilchrist, C. P. Gaskell, J. M. Stajich, J. M. Vance, Z. Kazantsev, A. Lastra, C. S. Haynes, J. S. Beckmann, D. Cohen, J. L. Weber, A. D. Roses, and M. A. Pericak-Vance.   Confirmation of genetic heterogeneity in limb-girdle muscular dystrophy: Linkage of an autosomal dominant form to chromosome 5q.   Am. J. Hum. Genet.,   50   1211-1217,   1992. &#10; D. A. Henderson and S. K. Card.   Rooms: The Use of Multiple Virtual Workspaces to Reduce Space Contention in a Window-Based Graphical User interface.   ACM Transactions on Graphics,   5(3):211-243,   1986. &#10; R. Graham.   Bounds on multiprocessing timing anomalies.   SIAM Journal of Computing,   17   416 - 429,   1969. &#10; J. J Koenderink and A. J. van Doorn.   Representation of local geometry in the visual system.   Biological Cybernetics,   55   367-375,   1987. &#10; J. McCarthy.   Circumscription a form of non-monotonic reasoning.   Artificial Intelligence,   13   27-39, 171-172,   1980. &#10; G. L. Peterson.   A new solution to Lamport's concurrent programming problem using small shared variables.   ACM Transactions on Programming Languages Systems,   5(1):56-65,   1983. &#10; U. Kremer, H. Zima, H.-J. Bast, and M. Gerndt.   Advanced tools and techniques for automatic parallelization.   Parallel Computing,   7   387-393,   1988. &#10; D. Callahan and K. Kennedy.   Compiling programs for distributed-memory multiprocessors.   Journal of Supercomputing,   2   151-169,   October 1988. &#10; T. J. Ostrand and M. J. Balcer.   The categorypartition method for specifying and generating functional tests.   Communications of the ACM,   31(6):676-686,   June 1988. &#10; K. P. Eswaran, J. N. Gray, R. A. Lorie, and I. L. Traiger.   The Notions of Consistency and Predicate Locks in a Database System.   Communication of ACM,   19(11):624-633,   November 1976. &#10; J. R. Rossignac and H. B. Voelcker.   Active zones in CSG for accelerating boundary evaluation, redundancy elimination, interference detection and shading algorithms.   ACM Transactions on Graphics,   8(1):51-87,   January 1989. &#10; B. Berthomieu and M. Diaz.   Modeling and verification of time dependent systems using time Petri nets.   IEEE Trans. Softw. Eng.,   17   259-273,   1991. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3389" language="x-unspecified"/><example:Author xmi:id="13578" sofa="1" begin="7" end="32"/><example:Author xmi:id="13586" sofa="1" begin="170" end="187"/><example:Author xmi:id="13594" sofa="1" begin="267" end="332"/><example:Author xmi:id="13602" sofa="1" begin="482" end="509"/><example:Author xmi:id="13610" sofa="1" begin="667" end="682"/><example:Author xmi:id="13618" sofa="1" begin="802" end="816"/><example:Author xmi:id="13626" sofa="1" begin="895" end="918"/><example:Author xmi:id="13634" sofa="1" begin="1167" end="1370"/><example:Author xmi:id="13642" sofa="1" begin="1552" end="1583"/><example:Author xmi:id="13650" sofa="1" begin="1761" end="1771"/><example:Author xmi:id="13658" sofa="1" begin="1875" end="1911"/><example:Author xmi:id="13666" sofa="1" begin="2021" end="2033"/><example:Author xmi:id="13674" sofa="1" begin="2147" end="2162"/><example:Author xmi:id="13682" sofa="1" begin="2331" end="2377"/><example:Author xmi:id="13690" sofa="1" begin="2488" end="2515"/><example:Author xmi:id="13698" sofa="1" begin="2639" end="2670"/><example:Author xmi:id="13706" sofa="1" begin="2811" end="2869"/><example:Author xmi:id="13714" sofa="1" begin="3002" end="3037"/><example:Author xmi:id="13722" sofa="1" begin="3233" end="3259"/><example:Date xmi:id="13730" sofa="1" begin="162" end="167"/><example:Date xmi:id="13738" sofa="1" begin="259" end="264"/><example:Date xmi:id="13746" sofa="1" begin="474" end="479"/><example:Date xmi:id="13754" sofa="1" begin="659" end="664"/><example:Date xmi:id="13762" sofa="1" begin="794" end="799"/><example:Date xmi:id="13770" sofa="1" begin="887" end="892"/><example:Date xmi:id="13778" sofa="1" begin="1148" end="1164"/><example:Date xmi:id="13786" sofa="1" begin="1544" end="1549"/><example:Date xmi:id="13794" sofa="1" begin="1753" end="1758"/><example:Date xmi:id="13802" sofa="1" begin="1867" end="1872"/><example:Date xmi:id="13810" sofa="1" begin="2013" end="2018"/><example:Date xmi:id="13818" sofa="1" begin="2139" end="2144"/><example:Date xmi:id="13826" sofa="1" begin="2323" end="2328"/><example:Date xmi:id="13834" sofa="1" begin="2480" end="2485"/><example:Date xmi:id="13842" sofa="1" begin="2623" end="2636"/><example:Date xmi:id="13850" sofa="1" begin="2798" end="2808"/><example:Date xmi:id="13858" sofa="1" begin="2985" end="2999"/><example:Date xmi:id="13866" sofa="1" begin="3217" end="3230"/><example:Date xmi:id="13874" sofa="1" begin="3382" end="3387"/><example:Pages xmi:id="13882" sofa="1" begin="151" end="159"/><example:Pages xmi:id="13890" sofa="1" begin="248" end="256"/><example:Pages xmi:id="13898" sofa="1" begin="461" end="471"/><example:Pages xmi:id="13906" sofa="1" begin="649" end="656"/><example:Pages xmi:id="13914" sofa="1" begin="783" end="791"/><example:Pages xmi:id="13922" sofa="1" begin="880" end="884"/><example:Pages xmi:id="13930" sofa="1" begin="1531" end="1541"/><example:Pages xmi:id="13938" sofa="1" begin="1742" end="1750"/><example:Pages xmi:id="13946" sofa="1" begin="1854" end="1864"/><example:Pages xmi:id="13954" sofa="1" begin="2002" end="2010"/><example:Pages xmi:id="13962" sofa="1" begin="2121" end="2136"/><example:Pages xmi:id="13970" sofa="1" begin="2314" end="2320"/><example:Pages xmi:id="13978" sofa="1" begin="2469" end="2477"/><example:Pages xmi:id="13986" sofa="1" begin="2612" end="2620"/><example:Pages xmi:id="13994" sofa="1" begin="2787" end="2795"/><example:Pages xmi:id="14002" sofa="1" begin="2974" end="2982"/><example:Pages xmi:id="14010" sofa="1" begin="3208" end="3214"/><example:Pages xmi:id="14018" sofa="1" begin="3371" end="3379"/><example:Volume xmi:id="14026" sofa="1" begin="146" end="151"/><example:Volume xmi:id="14034" sofa="1" begin="243" end="245"/><example:Volume xmi:id="14042" sofa="1" begin="456" end="458"/><example:Volume xmi:id="14050" sofa="1" begin="644" end="646"/><example:Volume xmi:id="14058" sofa="1" begin="778" end="780"/><example:Volume xmi:id="14066" sofa="1" begin="876" end="877"/><example:Volume xmi:id="14074" sofa="1" begin="1526" end="1528"/><example:Volume xmi:id="14082" sofa="1" begin="1737" end="1742"/><example:Volume xmi:id="14090" sofa="1" begin="1849" end="1851"/><example:Volume xmi:id="14098" sofa="1" begin="1997" end="1999"/><example:Volume xmi:id="14106" sofa="1" begin="2116" end="2118"/><example:Volume xmi:id="14114" sofa="1" begin="2309" end="2314"/><example:Volume xmi:id="14122" sofa="1" begin="2465" end="2466"/><example:Volume xmi:id="14130" sofa="1" begin="2608" end="2609"/><example:Volume xmi:id="14138" sofa="1" begin="2781" end="2787"/><example:Volume xmi:id="14146" sofa="1" begin="2967" end="2974"/><example:Volume xmi:id="14154" sofa="1" begin="3203" end="3208"/><example:Volume xmi:id="14162" sofa="1" begin="3366" end="3368"/><example:Title xmi:id="14170" sofa="1" begin="35" end="87"/><example:Title xmi:id="14178" sofa="1" begin="190" end="214"/><example:Title xmi:id="14186" sofa="1" begin="335" end="415"/><example:Title xmi:id="14194" sofa="1" begin="512" end="590"/><example:Title xmi:id="14202" sofa="1" begin="685" end="741"/><example:Title xmi:id="14210" sofa="1" begin="819" end="851"/><example:Title xmi:id="14218" sofa="1" begin="921" end="1036"/><example:Title xmi:id="14226" sofa="1" begin="1373" end="1501"/><example:Title xmi:id="14234" sofa="1" begin="1586" end="1702"/><example:Title xmi:id="14242" sofa="1" begin="1774" end="1817"/><example:Title xmi:id="14250" sofa="1" begin="1914" end="1968"/><example:Title xmi:id="14258" sofa="1" begin="2036" end="2086"/><example:Title xmi:id="14266" sofa="1" begin="2165" end="2253"/><example:Title xmi:id="14274" sofa="1" begin="2380" end="2440"/><example:Title xmi:id="14282" sofa="1" begin="2518" end="2576"/><example:Title xmi:id="14290" sofa="1" begin="2673" end="2749"/><example:Title xmi:id="14298" sofa="1" begin="2872" end="2940"/><example:Title xmi:id="14306" sofa="1" begin="3040" end="3168"/><example:Title xmi:id="14314" sofa="1" begin="3262" end="3336"/><example:Booktitle xmi:id="14322" sofa="1" begin="1039" end="1145"/><example:Journal xmi:id="14330" sofa="1" begin="90" end="143"/><example:Journal xmi:id="14338" sofa="1" begin="217" end="240"/><example:Journal xmi:id="14346" sofa="1" begin="418" end="453"/><example:Journal xmi:id="14354" sofa="1" begin="593" end="641"/><example:Journal xmi:id="14362" sofa="1" begin="744" end="775"/><example:Journal xmi:id="14370" sofa="1" begin="854" end="873"/><example:Journal xmi:id="14378" sofa="1" begin="1504" end="1523"/><example:Journal xmi:id="14386" sofa="1" begin="1705" end="1734"/><example:Journal xmi:id="14394" sofa="1" begin="1820" end="1846"/><example:Journal xmi:id="14402" sofa="1" begin="1971" end="1994"/><example:Journal xmi:id="14410" sofa="1" begin="2089" end="2113"/><example:Journal xmi:id="14418" sofa="1" begin="2256" end="2306"/><example:Journal xmi:id="14426" sofa="1" begin="2443" end="2462"/><example:Journal xmi:id="14434" sofa="1" begin="2579" end="2605"/><example:Journal xmi:id="14442" sofa="1" begin="2752" end="2778"/><example:Journal xmi:id="14450" sofa="1" begin="2943" end="2964"/><example:Journal xmi:id="14458" sofa="1" begin="3171" end="3200"/><example:Journal xmi:id="14466" sofa="1" begin="3339" end="3363"/><cas:View sofa="1" members="8 13578 13586 13594 13602 13610 13618 13626 13634 13642 13650 13658 13666 13674 13682 13690 13698 13706 13714 13722 13730 13738 13746 13754 13762 13770 13778 13786 13794 13802 13810 13818 13826 13834 13842 13850 13858 13866 13874 13882 13890 13898 13906 13914 13922 13930 13938 13946 13954 13962 13970 13978 13986 13994 14002 14010 14018 14026 14034 14042 14050 14058 14066 14074 14082 14090 14098 14106 14114 14122 14130 14138 14146 14154 14162 14170 14178 14186 14194 14202 14210 14218 14226 14234 14242 14250 14258 14266 14274 14282 14290 14298 14306 14314 14322 14330 14338 14346 14354 14362 14370 14378 14386 14394 14402 14410 14418 14426 14434 14442 14450 14458 14466"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/2.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/2.txt.xmi.xmi
deleted file mode 100644
index 5076b8b..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/2.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; R. Reiter.   A theory of diagnosis from first principles.   Artificial Intelligence,   33(1)   57-95,   1987. &#10; N. J. Nilsson.   Probabilistic logic.   Artificial Intelligence,   28(1)   71-87,   1986. &#10; M. von der Beeck.   A comparison of statecharts variants.   In Symposium on FaultTolerant Computing, LNCS.   Springer,   1994. &#10; D. Padua and M. J. Wolfe.   Advanced compiler optimizations for supercomputers.   Communications of the ACM,   29(12)   1184-1201,   December 1986. &#10; N. Benvenuto and F. Piazza.   On the Complex Backpropagation Algorithm.   IEEE Transactions on Signal Processing,   40(4)   967-969,   1992. &#10; D. Georgakopoulos, M. Rusinkiewicz, and A. Sheth.   Using tickets to enforce the serializability of multidatabase transactions.   IEEE Trans. on Knowledge and Data Eng.,   6(1)   166,   February 1994. &#10; K. Li and P. Hudak.   Memory coherence in shared virtual memory systems.   ACM Transactions on Computer Systems,   7(4)   321-359,   November 1989. &#10; B. Shneiderman.   Tree visualization with tree-maps: A 2-d space filling approach.   ACM Transactions on Graphics,   11(1)   1-39,   Jan. 1992. &#10; S. Hiranandani, K. Kennedy, and C. Tseng.   Compiling Fortran D for MIMD distributed-memory machines.   Communications of the ACM,   35(8)   66-80,   Aug. 1992. &#10; D. V. James, A. T. Laundrie, S. Gjessing, and G. S. Sohi.   Scalable Coherent Interface.   IEEE Computer,   23(6) : 74--77,   1990. &#10; N. A. Lorentzos and Y. G. Mitsopoulos.   SQL Extension for Interval Data.   IEEE TKDE,   9(3)   480-499,   May 1997. &#10; P. K. Chrysanthis and K. Ramamritham.   Synthesis of extended transaction models using ACTA.   ACM Transactions on Database Systems,   19(3)   450-491,   September 1994. &#10; A. L. Yuille.   Deformable templates for face recognition.   Journal of Cognitive Neuroscience,   3(1)   59-70,   1991. &#10; J. E. Dennis and R. B. Schnabel.   Numerical Methods for Unconstrained Optimization and Nonlinear Equations.   Prentice-Hall Series in Computational Mathematics.   Prentice-Hall, Inc,   Englewood Cliffs, New Jersey,   1983. &#10; D. Gannon, W. Jalby, and K. Gallivan.   Strategies for cache and local memory management by global program transformation.   Journal of Parallel and Distributed Computing,   5(5)   587-616,   October 1988. &#10; P. Havlak and K. Kennedy.   An implementation of inter procedural bounded regular section analysis.   IEEE Transactions on Parallel and Distributed Systems,   2(3)   350-360,   July 1991. &#10; F. Allen, M. Burke, P. Charles, R. Cytron, and J. Ferrante.   An overview of the PTRAN analysis system for multiprocessing.   In Proceedings of the First International Conference on Supercomputing.   Springer-Verlag,   Athens, Greece,   June 1987. &#10; T. E. Hull, T. F. Fairgrieve, and P. T. P. Tang.   Implementing complex elementary functions using exception handling.   ACM Trans. Math. Softw.,   20(2)   215-244,   1994. &#10; B. Ryder and M. Paull.   Incremental data flow analysis algorithms.   ACM Transactions on Programming Languages and Systems,   10(1)   1-50,   January 1988. &#10; C. Baru, O. Frieder, D. Kandlur, and M. Segal.   Join on a cube: Analysis, simulation, and implementation.   In M. Kitsuregawa and H. Tanaka, editors,   Database Machines and Knowledge Base Machines.   Kluwer Academic Publishers,   1987. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3289" language="x-unspecified"/><example:Author xmi:id="13138" sofa="1" begin="7" end="17"/><example:Author xmi:id="13146" sofa="1" begin="119" end="133"/><example:Author xmi:id="13154" sofa="1" begin="211" end="228"/><example:Author xmi:id="13162" sofa="1" begin="340" end="365"/><example:Author xmi:id="13170" sofa="1" begin="490" end="517"/><example:Author xmi:id="13178" sofa="1" begin="633" end="682"/><example:Author xmi:id="13186" sofa="1" begin="836" end="855"/><example:Author xmi:id="13194" sofa="1" begin="986" end="1001"/><example:Author xmi:id="13202" sofa="1" begin="1132" end="1173"/><example:Author xmi:id="13210" sofa="1" begin="1295" end="1352"/><example:Author xmi:id="13218" sofa="1" begin="1429" end="1467"/><example:Author xmi:id="13226" sofa="1" begin="1548" end="1585"/><example:Author xmi:id="13234" sofa="1" begin="1720" end="1733"/><example:Author xmi:id="13242" sofa="1" begin="1842" end="1874"/><example:Author xmi:id="13250" sofa="1" begin="2068" end="2105"/><example:Author xmi:id="13258" sofa="1" begin="2276" end="2301"/><example:Author xmi:id="13266" sofa="1" begin="2466" end="2525"/><example:Author xmi:id="13274" sofa="1" begin="2716" end="2764"/><example:Author xmi:id="13282" sofa="1" begin="2891" end="2913"/><example:Author xmi:id="13290" sofa="1" begin="3050" end="3096"/><example:Date xmi:id="13298" sofa="1" begin="111" end="116"/><example:Date xmi:id="13306" sofa="1" begin="203" end="208"/><example:Date xmi:id="13314" sofa="1" begin="332" end="337"/><example:Date xmi:id="13322" sofa="1" begin="473" end="487"/><example:Date xmi:id="13330" sofa="1" begin="625" end="630"/><example:Date xmi:id="13338" sofa="1" begin="819" end="833"/><example:Date xmi:id="13346" sofa="1" begin="969" end="983"/><example:Date xmi:id="13354" sofa="1" begin="1119" end="1129"/><example:Date xmi:id="13362" sofa="1" begin="1282" end="1292"/><example:Date xmi:id="13370" sofa="1" begin="1421" end="1426"/><example:Date xmi:id="13378" sofa="1" begin="1536" end="1545"/><example:Date xmi:id="13386" sofa="1" begin="1702" end="1717"/><example:Date xmi:id="13394" sofa="1" begin="1834" end="1839"/><example:Date xmi:id="13402" sofa="1" begin="2060" end="2065"/><example:Date xmi:id="13410" sofa="1" begin="2260" end="2273"/><example:Date xmi:id="13418" sofa="1" begin="2453" end="2463"/><example:Date xmi:id="13426" sofa="1" begin="2703" end="2713"/><example:Date xmi:id="13434" sofa="1" begin="2883" end="2888"/><example:Date xmi:id="13442" sofa="1" begin="3034" end="3047"/><example:Date xmi:id="13450" sofa="1" begin="3282" end="3287"/><example:Pages xmi:id="13458" sofa="1" begin="102" end="108"/><example:Pages xmi:id="13466" sofa="1" begin="194" end="200"/><example:Pages xmi:id="13474" sofa="1" begin="460" end="470"/><example:Pages xmi:id="13482" sofa="1" begin="614" end="622"/><example:Pages xmi:id="13490" sofa="1" begin="812" end="816"/><example:Pages xmi:id="13498" sofa="1" begin="958" end="966"/><example:Pages xmi:id="13506" sofa="1" begin="1111" end="1116"/><example:Pages xmi:id="13514" sofa="1" begin="1273" end="1279"/><example:Pages xmi:id="13522" sofa="1" begin="1411" end="1418"/><example:Pages xmi:id="13530" sofa="1" begin="1525" end="1533"/><example:Pages xmi:id="13538" sofa="1" begin="1691" end="1699"/><example:Pages xmi:id="13546" sofa="1" begin="1825" end="1831"/><example:Pages xmi:id="13554" sofa="1" begin="2249" end="2257"/><example:Pages xmi:id="13562" sofa="1" begin="2442" end="2450"/><example:Pages xmi:id="13570" sofa="1" begin="2872" end="2880"/><example:Pages xmi:id="13578" sofa="1" begin="3026" end="3031"/><example:Publisher xmi:id="13586" sofa="1" begin="320" end="329"/><example:Publisher xmi:id="13594" sofa="1" begin="2006" end="2025"/><example:Publisher xmi:id="13602" sofa="1" begin="2666" end="2682"/><example:Publisher xmi:id="13610" sofa="1" begin="3252" end="3279"/><example:Volume xmi:id="13618" sofa="1" begin="94" end="99"/><example:Volume xmi:id="13626" sofa="1" begin="186" end="191"/><example:Volume xmi:id="13634" sofa="1" begin="451" end="457"/><example:Volume xmi:id="13642" sofa="1" begin="606" end="611"/><example:Volume xmi:id="13650" sofa="1" begin="805" end="809"/><example:Volume xmi:id="13658" sofa="1" begin="951" end="955"/><example:Volume xmi:id="13666" sofa="1" begin="1103" end="1108"/><example:Volume xmi:id="13674" sofa="1" begin="1265" end="1270"/><example:Volume xmi:id="13682" sofa="1" begin="1403" end="1408"/><example:Volume xmi:id="13690" sofa="1" begin="1518" end="1522"/><example:Volume xmi:id="13698" sofa="1" begin="1683" end="1688"/><example:Volume xmi:id="13706" sofa="1" begin="1818" end="1822"/><example:Volume xmi:id="13714" sofa="1" begin="2242" end="2246"/><example:Volume xmi:id="13722" sofa="1" begin="2435" end="2439"/><example:Volume xmi:id="13730" sofa="1" begin="2864" end="2869"/><example:Volume xmi:id="13738" sofa="1" begin="3018" end="3023"/><example:Editor xmi:id="13746" sofa="1" begin="3159" end="3200"/><example:Title xmi:id="13754" sofa="1" begin="20" end="64"/><example:Title xmi:id="13762" sofa="1" begin="136" end="156"/><example:Title xmi:id="13770" sofa="1" begin="231" end="268"/><example:Title xmi:id="13778" sofa="1" begin="368" end="419"/><example:Title xmi:id="13786" sofa="1" begin="520" end="561"/><example:Title xmi:id="13794" sofa="1" begin="685" end="760"/><example:Title xmi:id="13802" sofa="1" begin="858" end="908"/><example:Title xmi:id="13810" sofa="1" begin="1004" end="1068"/><example:Title xmi:id="13818" sofa="1" begin="1176" end="1233"/><example:Title xmi:id="13826" sofa="1" begin="1355" end="1383"/><example:Title xmi:id="13834" sofa="1" begin="1470" end="1502"/><example:Title xmi:id="13842" sofa="1" begin="1588" end="1640"/><example:Title xmi:id="13850" sofa="1" begin="1736" end="1778"/><example:Title xmi:id="13858" sofa="1" begin="1877" end="1950"/><example:Title xmi:id="13866" sofa="1" begin="2108" end="2190"/><example:Title xmi:id="13874" sofa="1" begin="2304" end="2375"/><example:Title xmi:id="13882" sofa="1" begin="2528" end="2589"/><example:Title xmi:id="13890" sofa="1" begin="2767" end="2834"/><example:Title xmi:id="13898" sofa="1" begin="2916" end="2958"/><example:Title xmi:id="13906" sofa="1" begin="3099" end="3156"/><example:Booktitle xmi:id="13914" sofa="1" begin="271" end="317"/><example:Booktitle xmi:id="13922" sofa="1" begin="1953" end="2003"/><example:Booktitle xmi:id="13930" sofa="1" begin="2592" end="2663"/><example:Booktitle xmi:id="13938" sofa="1" begin="3203" end="3249"/><example:Journal xmi:id="13946" sofa="1" begin="67" end="91"/><example:Journal xmi:id="13954" sofa="1" begin="159" end="183"/><example:Journal xmi:id="13962" sofa="1" begin="422" end="448"/><example:Journal xmi:id="13970" sofa="1" begin="564" end="603"/><example:Journal xmi:id="13978" sofa="1" begin="763" end="802"/><example:Journal xmi:id="13986" sofa="1" begin="911" end="948"/><example:Journal xmi:id="13994" sofa="1" begin="1071" end="1100"/><example:Journal xmi:id="14002" sofa="1" begin="1236" end="1262"/><example:Journal xmi:id="14010" sofa="1" begin="1386" end="1400"/><example:Journal xmi:id="14018" sofa="1" begin="1505" end="1515"/><example:Journal xmi:id="14026" sofa="1" begin="1643" end="1680"/><example:Journal xmi:id="14034" sofa="1" begin="1781" end="1815"/><example:Journal xmi:id="14042" sofa="1" begin="2193" end="2239"/><example:Journal xmi:id="14050" sofa="1" begin="2378" end="2432"/><example:Journal xmi:id="14058" sofa="1" begin="2837" end="2861"/><example:Journal xmi:id="14066" sofa="1" begin="2961" end="3015"/><example:Location xmi:id="14074" sofa="1" begin="2028" end="2057"/><example:Location xmi:id="14082" sofa="1" begin="2685" end="2700"/><cas:View sofa="1" members="8 13138 13146 13154 13162 13170 13178 13186 13194 13202 13210 13218 13226 13234 13242 13250 13258 13266 13274 13282 13290 13298 13306 13314 13322 13330 13338 13346 13354 13362 13370 13378 13386 13394 13402 13410 13418 13426 13434 13442 13450 13458 13466 13474 13482 13490 13498 13506 13514 13522 13530 13538 13546 13554 13562 13570 13578 13586 13594 13602 13610 13618 13626 13634 13642 13650 13658 13666 13674 13682 13690 13698 13706 13714 13722 13730 13738 13746 13754 13762 13770 13778 13786 13794 13802 13810 13818 13826 13834 13842 13850 13858 13866 13874 13882 13890 13898 13906 13914 13922 13930 13938 13946 13954 13962 13970 13978 13986 13994 14002 14010 14018 14026 14034 14042 14050 14058 14066 14074 14082"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/3.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/3.txt.xmi.xmi
deleted file mode 100644
index 1b46d97..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/3.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; S. Antoy.   Needed Narrowing in Prolog.   Technical Report 96-2,   Portland State University,   1996. &#10; K. Inoue, T. Ishihara, and K. Murakami.   Way-predicting set-associative cache for high performance and low energy consumption.   In Proceedings of the International Symposium on Low Power Electronics Design ISLPED,   pages 273-g75,   Aug. 1999. &#10; G. Patnaik.   Personal communication,   September 1995. &#10; A. Borgida and T. Imielinski.   Decision making in committees-a framework for dealing with inconsistency and non-monotonicity.   In Proceedings Nonmono-tonic Reasoning Workshop,   pages 21-32,   1984. &#10; T. Bench-Capon and G. Staniford.   PLAID -proactive legal assistance.   In Proceedings of the Fifth International Conference on Artificial Intelligence Law,   pages 81-88,   1995. &#10; L. Lovasz and N. Young.   Lecture notes on evasiveness of graph properties.   Technical Report CS-TR-317-91,   Computer Science Department, Princeton University,   1991. &#10; R. White, F. Muller, C. Healy, D. Whalley, and M. Harmon.   Timing analysis for data caches and set-associative caches.   In Proceedings of the IEEE Real-Time Technology and Applications Symposium,   pages 192-202,   June 1997. &#10; M. J. Feeley and H. M. Levy.   Distributed shared memory with versioned objects.   In OOPSLA '92 Conference Proceedings,   pages 247-262,   October 1992. &#10; M. Galles and E. Williams.   Performance optimizations, implementation, and verification of the SGI Challenge multiprocessor.   In Proceedings of the Twenty-Seventh Hawaii International Conference on System Sciences, volume I: Architecture,   pages 134-143,   January 1994. &#10; D. Lomet and Mark R. Tuttle.   Redo Recovery after System Crashes.   In Proc. of the 21st International Conference on Very Large Data Bases,   Zurich,   Sept. 1995. &#10; W. Cunto and J. Ian Munro.   Average case selection.   Proceedings of the Sixteenth Annual ACM Symposzum on Theory of Computing,   pages 369-375,   1984. &#10; R. Seifert.   The Switch Book. The complete Guide to LAN Switching Technology.   Jonh Wiley &amp; Sons, Inc.,   2000. &#10; M. Wand and D. P. Fredman.   The mystery of the tower revealed: a non-reflective description of the reflective tower.   In Proceedings Symposium on Lisp Functional Programming,   pages 298-307,   ACM,   August 1986. &#10; S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta.   The SPLASH-2 Programs: Characterization and Methodological Considerations.   In Proceedings of the 22nd International Symposium on Computer Architecture,   pages 24-36,   June 1995. &#10; S. Konstantinidou and L. Snyder.   Chaos Router: architecture and performance.   In Proceedings of the 18th International Symposium on Computer Architecture,   pages 212-221,   May 1991. &#10; R. Guindon.   How to interface to advisory systems7 Users request help with a very simple language.   In Proceedings of the ACM SIGCHI Conference Human Factors in Computer Systems,   1988. &#10; D. R. Helman, D. A. Bader, and J. JaJa.   Parallel Algorithms for Personalized Communication and Sorting With an Experimental Study.   In Proceedings of the Eighth Annual ACM Symposium on Parallel Algorithms and Architectures,   pages 211-220,   Padua, Italy,   June 1996. &#10; T. A. Cook and E. A. Harcourt.   A functional specification language for instruction set architectures.   In Proc. 1994 International Conference on Computer Languages,   pages 11-19,   1994. &#10; J. C. Butcher.   Diagonally implicit general linear methods for ordinary differential equations.   Technical report,   University of Auckland,   1993.   Submitted for publication. &#10; A. P. Witkin.   Scale-space filtering.   In Proc. Intl. Joint Conf. Art. Intell.,   pages 1019-1023,   1983. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3678" language="x-unspecified"/><example:Author xmi:id="13369" sofa="1" begin="7" end="16"/><example:Author xmi:id="13377" sofa="1" begin="111" end="150"/><example:Author xmi:id="13385" sofa="1" begin="359" end="370"/><example:Author xmi:id="13393" sofa="1" begin="417" end="446"/><example:Author xmi:id="13401" sofa="1" begin="620" end="652"/><example:Author xmi:id="13409" sofa="1" begin="802" end="825"/><example:Author xmi:id="13417" sofa="1" begin="974" end="1031"/><example:Author xmi:id="13425" sofa="1" begin="1204" end="1232"/><example:Author xmi:id="13433" sofa="1" begin="1360" end="1386"/><example:Author xmi:id="13441" sofa="1" begin="1636" end="1664"/><example:Author xmi:id="13449" sofa="1" begin="1803" end="1829"/><example:Author xmi:id="13457" sofa="1" begin="1959" end="1970"/><example:Author xmi:id="13465" sofa="1" begin="2075" end="2101"/><example:Author xmi:id="13473" sofa="1" begin="2293" end="2351"/><example:Author xmi:id="13481" sofa="1" begin="2538" end="2570"/><example:Author xmi:id="13489" sofa="1" begin="2727" end="2738"/><example:Author xmi:id="13497" sofa="1" begin="2918" end="2957"/><example:Author xmi:id="13505" sofa="1" begin="3193" end="3223"/><example:Author xmi:id="13513" sofa="1" begin="3386" end="3400"/><example:Author xmi:id="13521" sofa="1" begin="3568" end="3581"/><example:Date xmi:id="13529" sofa="1" begin="103" end="108"/><example:Date xmi:id="13537" sofa="1" begin="346" end="356"/><example:Date xmi:id="13545" sofa="1" begin="399" end="414"/><example:Date xmi:id="13553" sofa="1" begin="612" end="617"/><example:Date xmi:id="13561" sofa="1" begin="794" end="799"/><example:Date xmi:id="13569" sofa="1" begin="966" end="971"/><example:Date xmi:id="13577" sofa="1" begin="1191" end="1201"/><example:Date xmi:id="13585" sofa="1" begin="1344" end="1357"/><example:Date xmi:id="13593" sofa="1" begin="1620" end="1633"/><example:Date xmi:id="13601" sofa="1" begin="1789" end="1800"/><example:Date xmi:id="13609" sofa="1" begin="1951" end="1956"/><example:Date xmi:id="13617" sofa="1" begin="2067" end="2072"/><example:Date xmi:id="13625" sofa="1" begin="2278" end="2290"/><example:Date xmi:id="13633" sofa="1" begin="2525" end="2535"/><example:Date xmi:id="13641" sofa="1" begin="2715" end="2724"/><example:Date xmi:id="13649" sofa="1" begin="2910" end="2915"/><example:Date xmi:id="13657" sofa="1" begin="3180" end="3190"/><example:Date xmi:id="13665" sofa="1" begin="3378" end="3383"/><example:Date xmi:id="13673" sofa="1" begin="3531" end="3536"/><example:Date xmi:id="13681" sofa="1" begin="3671" end="3676"/><example:Pages xmi:id="13689" sofa="1" begin="329" end="343"/><example:Pages xmi:id="13697" sofa="1" begin="597" end="609"/><example:Pages xmi:id="13705" sofa="1" begin="779" end="791"/><example:Pages xmi:id="13713" sofa="1" begin="1174" end="1188"/><example:Pages xmi:id="13721" sofa="1" begin="1327" end="1341"/><example:Pages xmi:id="13729" sofa="1" begin="1603" end="1617"/><example:Pages xmi:id="13737" sofa="1" begin="1934" end="1948"/><example:Pages xmi:id="13745" sofa="1" begin="2254" end="2268"/><example:Pages xmi:id="13753" sofa="1" begin="2510" end="2522"/><example:Pages xmi:id="13761" sofa="1" begin="2698" end="2712"/><example:Pages xmi:id="13769" sofa="1" begin="3147" end="3161"/><example:Pages xmi:id="13777" sofa="1" begin="3363" end="3375"/><example:Pages xmi:id="13785" sofa="1" begin="3652" end="3668"/><example:Publisher xmi:id="13793" sofa="1" begin="2040" end="2064"/><example:Publisher xmi:id="13801" sofa="1" begin="2271" end="2275"/><example:Institution xmi:id="13809" sofa="1" begin="74" end="100"/><example:Institution xmi:id="13817" sofa="1" begin="913" end="963"/><example:Institution xmi:id="13825" sofa="1" begin="3505" end="3528"/><example:Title xmi:id="13833" sofa="1" begin="19" end="46"/><example:Title xmi:id="13841" sofa="1" begin="153" end="238"/><example:Title xmi:id="13849" sofa="1" begin="449" end="543"/><example:Title xmi:id="13857" sofa="1" begin="655" end="689"/><example:Title xmi:id="13865" sofa="1" begin="828" end="877"/><example:Title xmi:id="13873" sofa="1" begin="1034" end="1093"/><example:Title xmi:id="13881" sofa="1" begin="1235" end="1284"/><example:Title xmi:id="13889" sofa="1" begin="1389" end="1485"/><example:Title xmi:id="13897" sofa="1" begin="1667" end="1702"/><example:Title xmi:id="13905" sofa="1" begin="1832" end="1855"/><example:Title xmi:id="13913" sofa="1" begin="1973" end="2037"/><example:Title xmi:id="13921" sofa="1" begin="2104" end="2192"/><example:Title xmi:id="13929" sofa="1" begin="2354" end="2428"/><example:Title xmi:id="13937" sofa="1" begin="2573" end="2616"/><example:Title xmi:id="13945" sofa="1" begin="2741" end="2826"/><example:Title xmi:id="13953" sofa="1" begin="2960" end="3050"/><example:Title xmi:id="13961" sofa="1" begin="3226" end="3296"/><example:Title xmi:id="13969" sofa="1" begin="3403" end="3482"/><example:Title xmi:id="13977" sofa="1" begin="3584" end="3606"/><example:Booktitle xmi:id="13985" sofa="1" begin="241" end="326"/><example:Booktitle xmi:id="13993" sofa="1" begin="546" end="594"/><example:Booktitle xmi:id="14001" sofa="1" begin="692" end="776"/><example:Booktitle xmi:id="14009" sofa="1" begin="1096" end="1171"/><example:Booktitle xmi:id="14017" sofa="1" begin="1287" end="1324"/><example:Booktitle xmi:id="14025" sofa="1" begin="1488" end="1600"/><example:Booktitle xmi:id="14033" sofa="1" begin="1705" end="1776"/><example:Booktitle xmi:id="14041" sofa="1" begin="1858" end="1931"/><example:Booktitle xmi:id="14049" sofa="1" begin="2195" end="2251"/><example:Booktitle xmi:id="14057" sofa="1" begin="2431" end="2507"/><example:Booktitle xmi:id="14065" sofa="1" begin="2619" end="2695"/><example:Booktitle xmi:id="14073" sofa="1" begin="2829" end="2907"/><example:Booktitle xmi:id="14081" sofa="1" begin="3053" end="3144"/><example:Booktitle xmi:id="14089" sofa="1" begin="3299" end="3360"/><example:Booktitle xmi:id="14097" sofa="1" begin="3609" end="3649"/><example:Location xmi:id="14105" sofa="1" begin="1779" end="1786"/><example:Location xmi:id="14113" sofa="1" begin="3164" end="3177"/><example:Tech xmi:id="14121" sofa="1" begin="49" end="71"/><example:Tech xmi:id="14129" sofa="1" begin="373" end="396"/><example:Tech xmi:id="14137" sofa="1" begin="880" end="910"/><example:Tech xmi:id="14145" sofa="1" begin="3485" end="3502"/><cas:View sofa="1" members="8 13369 13377 13385 13393 13401 13409 13417 13425 13433 13441 13449 13457 13465 13473 13481 13489 13497 13505 13513 13521 13529 13537 13545 13553 13561 13569 13577 13585 13593 13601 13609 13617 13625 13633 13641 13649 13657 13665 13673 13681 13689 13697 13705 13713 13721 13729 13737 13745 13753 13761 13769 13777 13785 13793 13801 13809 13817 13825 13833 13841 13849 13857 13865 13873 13881 13889 13897 13905 13913 13921 13929 13937 13945 13953 13961 13969 13977 13985 13993 14001 14009 14017 14025 14033 14041 14049 14057 14065 14073 14081 14089 14097 14105 14113 14121 14129 14137 14145"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/4.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/4.txt.xmi.xmi
deleted file mode 100644
index d961721..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/4.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; M. Holliday and M. Stumm.   Performance evaluation of hierarchical ring-based shared memory mutliprocessors.   Technical Report CS-1992-18,   Computer Science Department, Duke University,   1992. &#10; A. Michail.   Data mining library reuse patterns using generalized association rules.   In Proceedings of the 22nd International Conference on Software Engineering,   2000. &#10; D. Haussler.   Quantifying inductive bias: AI learning algorithms and Valiant's learning framework.   Artificial Intelligence,   1988. &#10; P. Keleher, S. Dwarkadas, A. Cox, and W. Zwaenepoel.   Treadmarks: Distributed shared memory on standard workstations and operating systems.   In Proc. 1994 Winter USENIX Conference,   pages 115-131,   1994. &#10; N. Adams and J. frees.   Object-oriented programming in Scheme.   In Proceedings of the ACM Conference on Lisp Functional Programming,   pages 277-288,   1988. &#10; K. Daniels and V. J. Milenkovic.   Multiple Translational Containment: Approximate and Exact Algorithms.   In Proceedirgs of the 6th Annual ACM-SIAM Symposium on Discrete Algorithms,   1995. &#10; J. M. Lalouel.   GEMINI a computer program for optimization of general nonlinear functions.   Technical Report 14,   University of Utah, Department of Medical Biophysics and Computing,   Salt Lake City, Utah,   1979. &#10; V. Guarna, D. Gannon, Y. Gaur, and D. Jablonowski.   Faust: An environment for programming parallel scientific applications.   In Proceedings of Supercomputing '88,   Orlando, FL,   November 1988. &#10; J.P. Singh, W.-D. Weber, and A. Gupta.   SPLASH: Stanford parallel applications for shared-memory.   Technical Report CSL-TR-91-469,   Stanford University,   April 1991. &#10; H. L. Bodlaender, R. G. Downey, M. R. Fellows, and H. T. Wareham.   The parameterized complexity of sequence alignment and consensus (extended abstract).   In Proc. of the Fourth Conference on Combinatorial Pattern Matching (CPM'94),   1994. &#10; M. Rosenblum and J. K. Ousterhout.   The design and implementation of a log-structured file system.   In Proceedings of the Thirteenth ACM Symposium on Operating System Principles,   1991. &#10; J. Whaley and M. Rinard.   Compositional pointer and escape analysis for Java programs.   In Proceedings of the ACM Conference on Object-Oriented Programming Systems Languages Applications OOPSLA'99,   pages 187-206,   Nov. 1999. &#10; A. Cau, R. Kuiper, and W.-P. de Roever.   Formalising Dijkstra's development strategy within Stark's formalism.   In C. B. Jones, R. C. Shaw, and T. Denvir, editors,   Proc. 5th. BCS-FACS Refinement Workshop,   1992. &#10; C. K. I. Williams.   Combining deformable models and neural networks for handprinted digit recognition.   PhD thesis,   Dept. of Computer Science, University of Toronto,   1994. &#10; E. Granston and A. Veidenbaum.   Detecting redundant accesses to array data.   In Proceedings of Supercomputing '91,   Albuquerque, NM,   November 1991. &#10; D. F. Jerding, J. T. Stasko, and T. Ball.   Visualizing interactions in program executions.   In Proceedings of the 19th International Conference on Software Engineering ICSE '97,   pages 360-371,   May 1997. &#10; L. Guibas, D. Salesin, and J. Stolfi.   Epsilon geometry: Building robust algorithms from imprecise computations.   In Proc. of the 5th ACM Symp. on Computational Geometry,   pages 208--217,   1989. &#10; A. Agarwal, B.-H. Lim, D. Kranz, and J. Kubiatowicz.   APRIL: a processor architecture for multiprocessing.   In Proceedings of the 17th Annual International Symposium on Computer Architecture,   pages 104-114,   May 1990. &#10; D. A. Van Veldhuizen and G. B. Lamont.   Multiobjectire Evolutionary Algorithm Test Suites.   In Proceedings of the 1999 ACM Symposium on Applied Computing. ACM,   1999. &#10; D. Callahan, S. Carr, and K. Kennedy.   Improving register allocation for subscripted variables.   In Proceedings of the SIGPLAN '90 Conference on Program Language Design and Implementation,   White Plains, NY,   June 1990. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3927" language="x-unspecified"/><example:Author xmi:id="14077" sofa="1" begin="7" end="32"/><example:Author xmi:id="14085" sofa="1" begin="205" end="216"/><example:Author xmi:id="14093" sofa="1" begin="380" end="392"/><example:Author xmi:id="14101" sofa="1" begin="517" end="569"/><example:Author xmi:id="14109" sofa="1" begin="727" end="749"/><example:Author xmi:id="14117" sofa="1" begin="889" end="921"/><example:Author xmi:id="14125" sofa="1" begin="1082" end="1096"/><example:Author xmi:id="14133" sofa="1" begin="1301" end="1351"/><example:Author xmi:id="14141" sofa="1" begin="1500" end="1538"/><example:Author xmi:id="14149" sofa="1" begin="1672" end="1737"/><example:Author xmi:id="14157" sofa="1" begin="1916" end="1950"/><example:Author xmi:id="14165" sofa="1" begin="2107" end="2131"/><example:Author xmi:id="14173" sofa="1" begin="2339" end="2378"/><example:Author xmi:id="14181" sofa="1" begin="2558" end="2576"/><example:Author xmi:id="14189" sofa="1" begin="2738" end="2768"/><example:Author xmi:id="14197" sofa="1" begin="2893" end="2934"/><example:Author xmi:id="14205" sofa="1" begin="3104" end="3141"/><example:Author xmi:id="14213" sofa="1" begin="3305" end="3357"/><example:Author xmi:id="14221" sofa="1" begin="3530" end="3568"/><example:Author xmi:id="14229" sofa="1" begin="3702" end="3739"/><example:Date xmi:id="14237" sofa="1" begin="197" end="202"/><example:Date xmi:id="14245" sofa="1" begin="372" end="377"/><example:Date xmi:id="14253" sofa="1" begin="509" end="514"/><example:Date xmi:id="14261" sofa="1" begin="719" end="724"/><example:Date xmi:id="14269" sofa="1" begin="881" end="886"/><example:Date xmi:id="14277" sofa="1" begin="1074" end="1079"/><example:Date xmi:id="14285" sofa="1" begin="1293" end="1298"/><example:Date xmi:id="14293" sofa="1" begin="1483" end="1497"/><example:Date xmi:id="14301" sofa="1" begin="1658" end="1669"/><example:Date xmi:id="14309" sofa="1" begin="1908" end="1913"/><example:Date xmi:id="14317" sofa="1" begin="2099" end="2104"/><example:Date xmi:id="14325" sofa="1" begin="2326" end="2336"/><example:Date xmi:id="14333" sofa="1" begin="2550" end="2555"/><example:Date xmi:id="14341" sofa="1" begin="2730" end="2735"/><example:Date xmi:id="14349" sofa="1" begin="2876" end="2890"/><example:Date xmi:id="14357" sofa="1" begin="3092" end="3101"/><example:Date xmi:id="14365" sofa="1" begin="3297" end="3302"/><example:Date xmi:id="14373" sofa="1" begin="3518" end="3527"/><example:Date xmi:id="14381" sofa="1" begin="3694" end="3699"/><example:Date xmi:id="14389" sofa="1" begin="3915" end="3925"/><example:Pages xmi:id="14397" sofa="1" begin="702" end="716"/><example:Pages xmi:id="14405" sofa="1" begin="864" end="878"/><example:Pages xmi:id="14413" sofa="1" begin="2309" end="2323"/><example:Pages xmi:id="14421" sofa="1" begin="3075" end="3089"/><example:Pages xmi:id="14429" sofa="1" begin="3279" end="3294"/><example:Pages xmi:id="14437" sofa="1" begin="3501" end="3515"/><example:Institution xmi:id="14445" sofa="1" begin="149" end="194"/><example:Institution xmi:id="14453" sofa="1" begin="1199" end="1266"/><example:Institution xmi:id="14461" sofa="1" begin="1635" end="1655"/><example:Institution xmi:id="14469" sofa="1" begin="2678" end="2727"/><example:Editor xmi:id="14477" sofa="1" begin="2453" end="2504"/><example:Title xmi:id="14485" sofa="1" begin="35" end="115"/><example:Title xmi:id="14493" sofa="1" begin="219" end="290"/><example:Title xmi:id="14501" sofa="1" begin="395" end="479"/><example:Title xmi:id="14509" sofa="1" begin="572" end="657"/><example:Title xmi:id="14517" sofa="1" begin="752" end="790"/><example:Title xmi:id="14525" sofa="1" begin="924" end="993"/><example:Title xmi:id="14533" sofa="1" begin="1099" end="1173"/><example:Title xmi:id="14541" sofa="1" begin="1354" end="1425"/><example:Title xmi:id="14549" sofa="1" begin="1541" end="1598"/><example:Title xmi:id="14557" sofa="1" begin="1740" end="1825"/><example:Title xmi:id="14565" sofa="1" begin="1953" end="2015"/><example:Title xmi:id="14573" sofa="1" begin="2134" end="2194"/><example:Title xmi:id="14581" sofa="1" begin="2381" end="2450"/><example:Title xmi:id="14589" sofa="1" begin="2579" end="2661"/><example:Title xmi:id="14597" sofa="1" begin="2771" end="2814"/><example:Title xmi:id="14605" sofa="1" begin="2937" end="2984"/><example:Title xmi:id="14613" sofa="1" begin="3144" end="3217"/><example:Title xmi:id="14621" sofa="1" begin="3360" end="3412"/><example:Title xmi:id="14629" sofa="1" begin="3571" end="3621"/><example:Title xmi:id="14637" sofa="1" begin="3742" end="3798"/><example:Booktitle xmi:id="14645" sofa="1" begin="293" end="369"/><example:Booktitle xmi:id="14653" sofa="1" begin="660" end="699"/><example:Booktitle xmi:id="14661" sofa="1" begin="793" end="861"/><example:Booktitle xmi:id="14669" sofa="1" begin="996" end="1071"/><example:Booktitle xmi:id="14677" sofa="1" begin="1428" end="1465"/><example:Booktitle xmi:id="14685" sofa="1" begin="1828" end="1905"/><example:Booktitle xmi:id="14693" sofa="1" begin="2018" end="2096"/><example:Booktitle xmi:id="14701" sofa="1" begin="2197" end="2306"/><example:Booktitle xmi:id="14709" sofa="1" begin="2507" end="2547"/><example:Booktitle xmi:id="14717" sofa="1" begin="2817" end="2854"/><example:Booktitle xmi:id="14725" sofa="1" begin="2987" end="3072"/><example:Booktitle xmi:id="14733" sofa="1" begin="3220" end="3276"/><example:Booktitle xmi:id="14741" sofa="1" begin="3415" end="3498"/><example:Booktitle xmi:id="14749" sofa="1" begin="3624" end="3691"/><example:Booktitle xmi:id="14757" sofa="1" begin="3801" end="3892"/><example:Journal xmi:id="14765" sofa="1" begin="482" end="506"/><example:Location xmi:id="14773" sofa="1" begin="1269" end="1290"/><example:Location xmi:id="14781" sofa="1" begin="1468" end="1480"/><example:Location xmi:id="14789" sofa="1" begin="2857" end="2873"/><example:Location xmi:id="14797" sofa="1" begin="3895" end="3912"/><example:Tech xmi:id="14805" sofa="1" begin="118" end="146"/><example:Tech xmi:id="14813" sofa="1" begin="1176" end="1196"/><example:Tech xmi:id="14821" sofa="1" begin="1601" end="1632"/><example:Tech xmi:id="14829" sofa="1" begin="2664" end="2675"/><cas:View sofa="1" members="8 14077 14085 14093 14101 14109 14117 14125 14133 14141 14149 14157 14165 14173 14181 14189 14197 14205 14213 14221 14229 14237 14245 14253 14261 14269 14277 14285 14293 14301 14309 14317 14325 14333 14341 14349 14357 14365 14373 14381 14389 14397 14405 14413 14421 14429 14437 14445 14453 14461 14469 14477 14485 14493 14501 14509 14517 14525 14533 14541 14549 14557 14565 14573 14581 14589 14597 14605 14613 14621 14629 14637 14645 14653 14661 14669 14677 14685 14693 14701 14709 14717 14725 14733 14741 14749 14757 14765 14773 14781 14789 14797 14805 14813 14821 14829"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/5.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/5.txt.xmi.xmi
deleted file mode 100644
index a2be292..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/5.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; A. Said and W.A. Pearlman,   &quot;A new, fast, and efficient image codec based on set partitioning in hierarchical trees,&quot;   IEEE Transactions on Ciruits and Systems for Video Technology,   vol. 6, no. 3,   pp. 243--249,   June 1996. &#10; M. Yang and L. M. Ni,   &quot;Incremental design of scalable interconnection networks using basic building blocks,&quot;   Symposium of Parallel and Distributed Processing,   pp. 252 -- 259,   Oct. 1995. &#10; L. Hernquist,   &quot;Vectorization of Tree Traversals,&quot;   Journal of Computational Physics,   vol. 87,   1990. &#10; J. Hipp, R. Lober,   &quot;Plastering: All-Hexahedral Mesh Generation Through Connectivity Resolution,&quot;   Proc. 3 rd Int. Meshing Roundtable,   1994. &#10; P. Sarkar,   &quot;An Iterative Algorithm for Optimal Style-Conscious Field Classification,&quot;   Proc. 16th Int’l Conf. Pattern Recognition,   pp. 243-246,   Aug. 2002. &#10; C. Rosene,   &quot;Incremental dependence analysis,&quot;   Ph.D. thesis,   Rice University,   March 1990. &#10; H. J. Landau and H. O. Pollak,   &quot;Prolate spheroidal wave functions, Fourier analysis, and uncertainty—III: The dimension of the space of essentially time- and band-limited signals,&quot;   Bell Syst. Tech. J.,   vol. 41, no. 4,   pp. 1295–1336,   Jul. 1962. &#10; J. Carter and M. Wegman,   &quot;Universal classes of hash functions,&quot;   J. of Computer and System Sciences,   vol. 18, no. 2,   pp. 143-154,   1979. &#10; D. E. Whitney,   &quot;Force feedback control of manipulator fine motions,&quot;   ASME J. Dyn. Syst. Meas. Contr.,   vol. 99, no. 2,   pp. 91–97,   1977. &#10; C. Norris and L. Pollock,   &quot;A scheduler-sensitive global register allocator,&quot;   In Proc. of Supercomputing,   pages 804-813,   1993. &#10; M. J. Harrold and M. L. Soffa,   &quot;An incremental approach to unit testing during maintenance,&quot;   Proceedings of the International Conference on Software Maintenance,   pp. 362-367,   October 1988. &#10; J. H. M. J. Daily and K. Reiser,   &quot;Detecting obstacles in range imagery,&quot;   Proc. of [ARPA] Image Understanding Workshop,   pp. 87-97,   1987. &#10; T. Klemenschits, &amp; E. Bonek,   &quot;Radio Coverage of Road Tunnels at 900 and 1800 MHz by Discrete Antennas,&quot;   The 5th Annual IEEE International Symposium on Personal, Indoor and Mobile Radio Communications,   pp. 411-415,   September, 1994. &#10; M. J. Harrold and M. L. Soffa,   &quot;An Incremental Approach to Unit Testing During Maintenance,&quot;   Proc. of the Conference on Software Maintenance,   pages 362-367,   1988. &#10; H. Shin, C.-C. King and C. Hu,   &quot;Thin Oxide Damage by Plasma Etching and Ashing Process,&quot;   Proc. IEEE/IRPS,   pp. 37-41,   1992. &#10; W. Enkelmann,   &quot;Obstacle detection by evaluation of optical flow fields from image sequence,&quot;   Image and Vision Computing 9,   pp. 160-168,   1991. &#10; T.H. Tzen and L.M. Ni,   &quot;Trapezoidal Self-Scheduling: A Practical Scheme for Parallel Compilers,&quot;   IEEE Trans. Parallel and Distributed Systems,   vol. 4, no. 1,   pp. 87-98,   Jan. 1993. &#10; D. Marcuse,   &quot;Calculation of bit-error probability for a lightwave system with optical amplifiers and post-detection Gaussian noise,&quot;   J. Lightwave Technol.,   vol. 9,   pp. 505--513,   April 1991. &#10; A. D. Kallis and D. Klappholz,   &quot;Reaching definitions analysis on code containing array references,&quot;   Conf. Rec. of the 4th Workshop on Languages and Compilers for Parallel Computing,   Aug. 1991. &#10; H. S. Malvar,   &quot;Lapped biorthogonal transforms for transform coding with reduced blocking and ringing artifacts,&quot;   Proc. Int. Conf. Acoustics, Speech, and Signal Processing,   Munich, Germany,   pp. 2421--2424,   April 1997. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3507" language="x-unspecified"/><example:Author xmi:id="14229" sofa="1" begin="7" end="33"/><example:Author xmi:id="14237" sofa="1" begin="239" end="260"/><example:Author xmi:id="14245" sofa="1" begin="435" end="448"/><example:Author xmi:id="14253" sofa="1" begin="544" end="562"/><example:Author xmi:id="14261" sofa="1" begin="691" end="701"/><example:Author xmi:id="14269" sofa="1" begin="855" end="865"/><example:Author xmi:id="14277" sofa="1" begin="954" end="984"/><example:Author xmi:id="14285" sofa="1" begin="1210" end="1234"/><example:Author xmi:id="14293" sofa="1" begin="1357" end="1371"/><example:Author xmi:id="14301" sofa="1" begin="1504" end="1529"/><example:Author xmi:id="14309" sofa="1" begin="1640" end="1670"/><example:Author xmi:id="14317" sofa="1" begin="1839" end="1871"/><example:Author xmi:id="14325" sofa="1" begin="1985" end="2013"/><example:Author xmi:id="14333" sofa="1" begin="2226" end="2256"/><example:Author xmi:id="14341" sofa="1" begin="2399" end="2429"/><example:Author xmi:id="14349" sofa="1" begin="2532" end="2545"/><example:Author xmi:id="14357" sofa="1" begin="2684" end="2706"/><example:Author xmi:id="14365" sofa="1" begin="2876" end="2887"/><example:Author xmi:id="14373" sofa="1" begin="3078" end="3108"/><example:Author xmi:id="14381" sofa="1" begin="3279" end="3292"/><example:Date xmi:id="14389" sofa="1" begin="226" end="236"/><example:Date xmi:id="14397" sofa="1" begin="422" end="432"/><example:Date xmi:id="14405" sofa="1" begin="536" end="541"/><example:Date xmi:id="14413" sofa="1" begin="683" end="688"/><example:Date xmi:id="14421" sofa="1" begin="842" end="852"/><example:Date xmi:id="14429" sofa="1" begin="940" end="951"/><example:Date xmi:id="14437" sofa="1" begin="1197" end="1207"/><example:Date xmi:id="14445" sofa="1" begin="1349" end="1354"/><example:Date xmi:id="14453" sofa="1" begin="1496" end="1501"/><example:Date xmi:id="14461" sofa="1" begin="1632" end="1637"/><example:Date xmi:id="14469" sofa="1" begin="1823" end="1836"/><example:Date xmi:id="14477" sofa="1" begin="1977" end="1982"/><example:Date xmi:id="14485" sofa="1" begin="2207" end="2223"/><example:Date xmi:id="14493" sofa="1" begin="2391" end="2396"/><example:Date xmi:id="14501" sofa="1" begin="2524" end="2529"/><example:Date xmi:id="14509" sofa="1" begin="2676" end="2681"/><example:Date xmi:id="14517" sofa="1" begin="2863" end="2873"/><example:Date xmi:id="14525" sofa="1" begin="3064" end="3075"/><example:Date xmi:id="14533" sofa="1" begin="3266" end="3276"/><example:Date xmi:id="14541" sofa="1" begin="3494" end="3505"/><example:Pages xmi:id="14549" sofa="1" begin="210" end="223"/><example:Pages xmi:id="14557" sofa="1" begin="404" end="419"/><example:Pages xmi:id="14565" sofa="1" begin="827" end="839"/><example:Pages xmi:id="14573" sofa="1" begin="1180" end="1194"/><example:Pages xmi:id="14581" sofa="1" begin="1334" end="1346"/><example:Pages xmi:id="14589" sofa="1" begin="1483" end="1493"/><example:Pages xmi:id="14597" sofa="1" begin="1615" end="1629"/><example:Pages xmi:id="14605" sofa="1" begin="1808" end="1820"/><example:Pages xmi:id="14613" sofa="1" begin="1964" end="1974"/><example:Pages xmi:id="14621" sofa="1" begin="2192" end="2204"/><example:Pages xmi:id="14629" sofa="1" begin="2374" end="2388"/><example:Pages xmi:id="14637" sofa="1" begin="2511" end="2521"/><example:Pages xmi:id="14645" sofa="1" begin="2661" end="2673"/><example:Pages xmi:id="14653" sofa="1" begin="2850" end="2860"/><example:Pages xmi:id="14661" sofa="1" begin="3048" end="3061"/><example:Pages xmi:id="14669" sofa="1" begin="3476" end="3491"/><example:Institution xmi:id="14677" sofa="1" begin="921" end="937"/><example:Volume xmi:id="14685" sofa="1" begin="193" end="207"/><example:Volume xmi:id="14693" sofa="1" begin="525" end="533"/><example:Volume xmi:id="14701" sofa="1" begin="1162" end="1177"/><example:Volume xmi:id="14709" sofa="1" begin="1316" end="1331"/><example:Volume xmi:id="14717" sofa="1" begin="1465" end="1480"/><example:Volume xmi:id="14725" sofa="1" begin="2656" end="2657"/><example:Volume xmi:id="14733" sofa="1" begin="2833" end="2847"/><example:Volume xmi:id="14741" sofa="1" begin="3038" end="3045"/><example:Title xmi:id="14749" sofa="1" begin="36" end="125"/><example:Title xmi:id="14757" sofa="1" begin="263" end="349"/><example:Title xmi:id="14765" sofa="1" begin="451" end="486"/><example:Title xmi:id="14773" sofa="1" begin="565" end="642"/><example:Title xmi:id="14781" sofa="1" begin="704" end="778"/><example:Title xmi:id="14789" sofa="1" begin="868" end="902"/><example:Title xmi:id="14797" sofa="1" begin="987" end="1136"/><example:Title xmi:id="14805" sofa="1" begin="1237" end="1275"/><example:Title xmi:id="14813" sofa="1" begin="1374" end="1427"/><example:Title xmi:id="14821" sofa="1" begin="1532" end="1582"/><example:Title xmi:id="14829" sofa="1" begin="1673" end="1734"/><example:Title xmi:id="14837" sofa="1" begin="1874" end="1913"/><example:Title xmi:id="14845" sofa="1" begin="2016" end="2090"/><example:Title xmi:id="14853" sofa="1" begin="2259" end="2320"/><example:Title xmi:id="14861" sofa="1" begin="2432" end="2489"/><example:Title xmi:id="14869" sofa="1" begin="2548" end="2626"/><example:Title xmi:id="14877" sofa="1" begin="2709" end="2782"/><example:Title xmi:id="14885" sofa="1" begin="2890" end="3010"/><example:Title xmi:id="14893" sofa="1" begin="3111" end="3179"/><example:Title xmi:id="14901" sofa="1" begin="3295" end="3393"/><example:Booktitle xmi:id="14909" sofa="1" begin="352" end="401"/><example:Booktitle xmi:id="14917" sofa="1" begin="645" end="680"/><example:Booktitle xmi:id="14925" sofa="1" begin="781" end="824"/><example:Booktitle xmi:id="14933" sofa="1" begin="1585" end="1612"/><example:Booktitle xmi:id="14941" sofa="1" begin="1737" end="1805"/><example:Booktitle xmi:id="14949" sofa="1" begin="1916" end="1961"/><example:Booktitle xmi:id="14957" sofa="1" begin="2093" end="2189"/><example:Booktitle xmi:id="14965" sofa="1" begin="2323" end="2371"/><example:Booktitle xmi:id="14973" sofa="1" begin="2492" end="2508"/><example:Booktitle xmi:id="14981" sofa="1" begin="3182" end="3263"/><example:Booktitle xmi:id="14989" sofa="1" begin="3396" end="3454"/><example:Journal xmi:id="14997" sofa="1" begin="128" end="190"/><example:Journal xmi:id="15005" sofa="1" begin="489" end="522"/><example:Journal xmi:id="15013" sofa="1" begin="1139" end="1159"/><example:Journal xmi:id="15021" sofa="1" begin="1278" end="1313"/><example:Journal xmi:id="15029" sofa="1" begin="1430" end="1462"/><example:Journal xmi:id="15037" sofa="1" begin="2629" end="2655"/><example:Journal xmi:id="15045" sofa="1" begin="2785" end="2830"/><example:Journal xmi:id="15053" sofa="1" begin="3013" end="3035"/><example:Location xmi:id="15061" sofa="1" begin="3457" end="3473"/><example:Tech xmi:id="15069" sofa="1" begin="905" end="918"/><cas:View sofa="1" members="8 14229 14237 14245 14253 14261 14269 14277 14285 14293 14301 14309 14317 14325 14333 14341 14349 14357 14365 14373 14381 14389 14397 14405 14413 14421 14429 14437 14445 14453 14461 14469 14477 14485 14493 14501 14509 14517 14525 14533 14541 14549 14557 14565 14573 14581 14589 14597 14605 14613 14621 14629 14637 14645 14653 14661 14669 14677 14685 14693 14701 14709 14717 14725 14733 14741 14749 14757 14765 14773 14781 14789 14797 14805 14813 14821 14829 14837 14845 14853 14861 14869 14877 14885 14893 14901 14909 14917 14925 14933 14941 14949 14957 14965 14973 14981 14989 14997 15005 15013 15021 15029 15037 15045 15053 15061 15069"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/6.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/6.txt.xmi.xmi
deleted file mode 100644
index 766c28d..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/6.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Y. Robert.   The Impact of Vector and Parallel Architectures on the Gaussian Elimination Algorithm.   Halsted Press,   New York,   1990. &#10; R. Bajcsy and C. Tsikos.   Perception via manipulation.   In Proc. of the Int. Symp. &amp; Exposition on Robots,   pages 237--244,   Sydney, Australia,   November 6-10 1988. &#10; J. Massey and D. Costello.   Nonsystematic Convolutional Codes for Sequential Decoding in Space Applications.   IEEE Transactions on Communications,   p. 806--813,   October 1971. &#10; W. W. Carlson and J. M. Draper.   AC for the T3D.   Technical Report SRC-TR-95-141,   Supercomputing Research Center,   Bowie, MD,   February 1995. &#10; R. Harper and G. Morrisett.   Compiling polymorphism using intensional type analysis.   In Conference Record of the 22nd Annual ACM Symposium on Principles of Programming Languages,   San Francisco, CA,   Jan. 1995. &#10; A. Aiken and E. L. Wimmers.   Type inclusion constraints and type iafexence.   In Proceedings of the ACM SIGPLAN Conference on Fundional Programming Languages Computer Architecture,   pages 31-41,   1993. &#10; W. Warwick, S. McIlwaine, R. Hutton, and P. McDermott.   Developing computational models of recognition-primed decision making.   In Proc. of the tenth conference on Computer Generated Forces,   2001. &#10; C. Ruggieri and T. P. Murtagh.   Lifetime analysis of dynamically allocated objects.   In Proceedings of the 15th ACM Symposium on Principles of Programming Languages,   pages 285-293,   1988. &#10; H. Barringer, M. Fisher, G. Gough.   Fair SMG and linear time model checking.   In Proc. Workshop on Automatic Verification Methods for Finite State Systems,   Grenoble, Frankreich,   1989. &#10; W. Lehner, J. Albretch, and H. Wedkind.   Normal forms for multidimensional databases.   In Technical Report,   University of Erlangen-Nuremberg,   Germany,   1998. &#10; M. C. Rinard and M. S. Lam.   Semantic foundations of Jade.   In Record of the Nineteenth Annual ACM Symposium on Principles of Programming Languages,   pages 105-118,   January 1992. &#10; K. Keeton, B. A. Mah, S. Seshan, R. H. Katz, and D. Ferrari.   Providing Connection-Oriented Service to Mobile Hosts.   In Proceedings of the First USENIX Symposium on Mobile and Location-Independent Computing,   August 1993. &#10; C. Mercer, S. Savage and H. Tokuda.   Processor Capacity Reserves: Operating System Support for Multimedia Applications.   Proceedings of the International Conference on Multimedia Computing and Systems,   pp. 90-99,   May 1994. &#10; P. T. Zellweger.   Interactions between high-level debugging and optimised code.   PhD thesis,   Computer Science Division, University of California, Berkeley,   1984.   Published as Xerox PARC Technical Report CSL-84-5. &#10; S. Amarasinghe and M. Lam.   Communication optimization and code generation for distributed memory machines.   In Proceedings of the SIGPLAN '93 Conference on Programming Language Design and Implementation,   Albuquerque, NM,   June 1993. &#10; F. Lockwood Morris.   Advice on structuring compilers and proving them correct.   In Proceedings of the First ACM Symposium on Principles of Programming Languages,   pages 144-152,   1973. &#10; S. J. Eggers, D. R. Keppel, E. J. Koldinger, and H. M. Levy.   Techniques for efficient inline tracing on a shared-memory multiprocessor.   In Proceedings of the International Conference on Measurement and Modeling of Computer Systems,   pages 37-47,   May 1990. &#10; S. Aditya, C. Flood, and J. Hicks.   Garbage collection for strongly-typed languages using run-time type reconstruction.   In Proceedings of the 1994 ACM Conference on Lisp and Functional Programming,   pages 12-23,   Orlando, FL,   June 1994. &#10; R. Fletcher.   Practical Methods of Optimization.   John Wiley &amp; Sons,   1987. &#10; J. K. Peir and R. Cytron.   Minimum distance a method for partitioning recur-resnces for multiprocessors.   In Proceedings of the 1987 International Conference on Parallel Processing,   pages 217-224,   1987. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3934" language="x-unspecified"/><example:Author xmi:id="14191" sofa="1" begin="7" end="17"/><example:Author xmi:id="14199" sofa="1" begin="146" end="170"/><example:Author xmi:id="14207" sofa="1" begin="318" end="344"/><example:Author xmi:id="14215" sofa="1" begin="500" end="531"/><example:Author xmi:id="14223" sofa="1" begin="650" end="677"/><example:Author xmi:id="14231" sofa="1" begin="868" end="895"/><example:Author xmi:id="14239" sofa="1" begin="1075" end="1129"/><example:Author xmi:id="14247" sofa="1" begin="1278" end="1308"/><example:Author xmi:id="14255" sofa="1" begin="1473" end="1507"/><example:Author xmi:id="14263" sofa="1" begin="1665" end="1704"/><example:Author xmi:id="14271" sofa="1" begin="1832" end="1859"/><example:Author xmi:id="14279" sofa="1" begin="2018" end="2078"/><example:Author xmi:id="14287" sofa="1" begin="2246" end="2281"/><example:Author xmi:id="14295" sofa="1" begin="2477" end="2493"/><example:Author xmi:id="14303" sofa="1" begin="2700" end="2726"/><example:Author xmi:id="14311" sofa="1" begin="2941" end="2960"/><example:Author xmi:id="14319" sofa="1" begin="3132" end="3192"/><example:Author xmi:id="14327" sofa="1" begin="3397" end="3431"/><example:Author xmi:id="14335" sofa="1" begin="3643" end="3655"/><example:Author xmi:id="14343" sofa="1" begin="3724" end="3749"/><example:Date xmi:id="14351" sofa="1" begin="138" end="143"/><example:Date xmi:id="14359" sofa="1" begin="296" end="315"/><example:Date xmi:id="14367" sofa="1" begin="484" end="497"/><example:Date xmi:id="14375" sofa="1" begin="633" end="647"/><example:Date xmi:id="14383" sofa="1" begin="855" end="865"/><example:Date xmi:id="14391" sofa="1" begin="1067" end="1072"/><example:Date xmi:id="14399" sofa="1" begin="1270" end="1275"/><example:Date xmi:id="14407" sofa="1" begin="1465" end="1470"/><example:Date xmi:id="14415" sofa="1" begin="1657" end="1662"/><example:Date xmi:id="14423" sofa="1" begin="1824" end="1829"/><example:Date xmi:id="14431" sofa="1" begin="2002" end="2015"/><example:Date xmi:id="14439" sofa="1" begin="2231" end="2243"/><example:Date xmi:id="14447" sofa="1" begin="2465" end="2474"/><example:Date xmi:id="14455" sofa="1" begin="2639" end="2644"/><example:Date xmi:id="14463" sofa="1" begin="2928" end="2938"/><example:Date xmi:id="14471" sofa="1" begin="3124" end="3129"/><example:Date xmi:id="14479" sofa="1" begin="3385" end="3394"/><example:Date xmi:id="14487" sofa="1" begin="3630" end="3640"/><example:Date xmi:id="14495" sofa="1" begin="3716" end="3721"/><example:Date xmi:id="14503" sofa="1" begin="3927" end="3932"/><example:Pages xmi:id="14511" sofa="1" begin="257" end="272"/><example:Pages xmi:id="14519" sofa="1" begin="469" end="481"/><example:Pages xmi:id="14527" sofa="1" begin="1052" end="1064"/><example:Pages xmi:id="14535" sofa="1" begin="1448" end="1462"/><example:Pages xmi:id="14543" sofa="1" begin="1985" end="1999"/><example:Pages xmi:id="14551" sofa="1" begin="2452" end="2462"/><example:Pages xmi:id="14559" sofa="1" begin="3107" end="3121"/><example:Pages xmi:id="14567" sofa="1" begin="3370" end="3382"/><example:Pages xmi:id="14575" sofa="1" begin="3600" end="3612"/><example:Pages xmi:id="14583" sofa="1" begin="3910" end="3924"/><example:Publisher xmi:id="14591" sofa="1" begin="109" end="123"/><example:Publisher xmi:id="14599" sofa="1" begin="3695" end="3713"/><example:Institution xmi:id="14607" sofa="1" begin="586" end="617"/><example:Institution xmi:id="14615" sofa="1" begin="1777" end="1810"/><example:Institution xmi:id="14623" sofa="1" begin="2574" end="2636"/><example:Title xmi:id="14631" sofa="1" begin="20" end="106"/><example:Title xmi:id="14639" sofa="1" begin="173" end="201"/><example:Title xmi:id="14647" sofa="1" begin="347" end="427"/><example:Title xmi:id="14655" sofa="1" begin="534" end="549"/><example:Title xmi:id="14663" sofa="1" begin="680" end="735"/><example:Title xmi:id="14671" sofa="1" begin="898" end="944"/><example:Title xmi:id="14679" sofa="1" begin="1132" end="1202"/><example:Title xmi:id="14687" sofa="1" begin="1311" end="1362"/><example:Title xmi:id="14695" sofa="1" begin="1510" end="1550"/><example:Title xmi:id="14703" sofa="1" begin="1707" end="1751"/><example:Title xmi:id="14711" sofa="1" begin="1862" end="1891"/><example:Title xmi:id="14719" sofa="1" begin="2081" end="2135"/><example:Title xmi:id="14727" sofa="1" begin="2284" end="2366"/><example:Title xmi:id="14735" sofa="1" begin="2496" end="2557"/><example:Title xmi:id="14743" sofa="1" begin="2729" end="2808"/><example:Title xmi:id="14751" sofa="1" begin="2963" end="3020"/><example:Title xmi:id="14759" sofa="1" begin="3195" end="3269"/><example:Title xmi:id="14767" sofa="1" begin="3434" end="3517"/><example:Title xmi:id="14775" sofa="1" begin="3658" end="3692"/><example:Title xmi:id="14783" sofa="1" begin="3752" end="3829"/><example:Booktitle xmi:id="14791" sofa="1" begin="204" end="254"/><example:Booktitle xmi:id="14799" sofa="1" begin="738" end="831"/><example:Booktitle xmi:id="14807" sofa="1" begin="947" end="1049"/><example:Booktitle xmi:id="14815" sofa="1" begin="1205" end="1267"/><example:Booktitle xmi:id="14823" sofa="1" begin="1365" end="1445"/><example:Booktitle xmi:id="14831" sofa="1" begin="1553" end="1630"/><example:Booktitle xmi:id="14839" sofa="1" begin="1894" end="1982"/><example:Booktitle xmi:id="14847" sofa="1" begin="2138" end="2228"/><example:Booktitle xmi:id="14855" sofa="1" begin="2369" end="2449"/><example:Booktitle xmi:id="14863" sofa="1" begin="2811" end="2906"/><example:Booktitle xmi:id="14871" sofa="1" begin="3023" end="3104"/><example:Booktitle xmi:id="14879" sofa="1" begin="3272" end="3367"/><example:Booktitle xmi:id="14887" sofa="1" begin="3520" end="3597"/><example:Booktitle xmi:id="14895" sofa="1" begin="3832" end="3907"/><example:Journal xmi:id="14903" sofa="1" begin="430" end="466"/><example:Location xmi:id="14911" sofa="1" begin="126" end="135"/><example:Location xmi:id="14919" sofa="1" begin="275" end="293"/><example:Location xmi:id="14927" sofa="1" begin="620" end="630"/><example:Location xmi:id="14935" sofa="1" begin="834" end="852"/><example:Location xmi:id="14943" sofa="1" begin="1633" end="1654"/><example:Location xmi:id="14951" sofa="1" begin="1813" end="1821"/><example:Location xmi:id="14959" sofa="1" begin="2909" end="2925"/><example:Location xmi:id="14967" sofa="1" begin="3615" end="3627"/><example:Tech xmi:id="14975" sofa="1" begin="552" end="583"/><example:Tech xmi:id="14983" sofa="1" begin="1754" end="1774"/><example:Tech xmi:id="14991" sofa="1" begin="2560" end="2571"/><cas:View sofa="1" members="8 14191 14199 14207 14215 14223 14231 14239 14247 14255 14263 14271 14279 14287 14295 14303 14311 14319 14327 14335 14343 14351 14359 14367 14375 14383 14391 14399 14407 14415 14423 14431 14439 14447 14455 14463 14471 14479 14487 14495 14503 14511 14519 14527 14535 14543 14551 14559 14567 14575 14583 14591 14599 14607 14615 14623 14631 14639 14647 14655 14663 14671 14679 14687 14695 14703 14711 14719 14727 14735 14743 14751 14759 14767 14775 14783 14791 14799 14807 14815 14823 14831 14839 14847 14855 14863 14871 14879 14887 14895 14903 14911 14919 14927 14935 14943 14951 14959 14967 14975 14983 14991"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/7.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/7.txt.xmi.xmi
deleted file mode 100644
index c4d6357..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/7.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Langley, P., &amp; Simon, H. A.   (1995).   Applications of machine learning and rule induction.   Communications of the ACM,   38 (11),   55-64. &#10; Crawford, J., &amp; Auton, L.   (1993).   Experimental results on the crossover point in satisfiability problems.   Proceedings of the 11th National Conference on Artificial Intelligence,   21-27. &#10; Bergamaschi, S., &amp; Sartori, C.   (1992).   On taxonomic reasoning in conceptual design.   ACM Transaction on Database Systems,   17 (3),   385-422. &#10; Lovejoy, W. S.   (1991b).   Computationally feasible bounds for partially observed Markov decision processes.   Operations Research,   39 (1),   162-175. &#10; Hermans, J., Habbema, J. D. F., &amp; Van der Burght, A. T.   (1974).   Cases of doubt in allocation problems, k populations.   Bulletin of the International Statistics Institute,   45,   523-529. &#10; Wilke, W.   (1993).   Entwurf und Implementierung eines Algorithmus zum wissensintensiven Lernen von Planabstraktionen nach der PABS-Methode.   Projektarbeit,   Universitat Kaiserslautern. &#10; Serra, J.   (1982).   Image Analysis and Mathematical Morphology.   Academic Press,   London. &#10; Lapedes, A., Steeg, E., &amp; Farber, R.   (1995).   Use of adaptive networks to evolve highly predictable protein secondary-structure classes.   Machine Learning,   21,   103-124. &#10; Halpern, J. Y., &amp; Moses, Y.   (1990).   Knowledge and common knowledge in a distributed environment.   Journal of the ACM,   37 (3),   549-587. &#10; Pagallo, G., &amp; Haussler, D.   (1990).   Boolean feature discovery in empirical learning.   Machine Learning,   5 (1),    71-99. &#10; Dempster, A. P., Laird, N. M., &amp; Rubin, D. B.   (1977).   Maximum-likelihood from incomplete data via the EM algorithm.   Journal of Royal Statistical Society B,   39,   1-38. &#10; Oliker, S., Furst, M., &amp; Maimon, O.   (1992).   A distributed genetic algorithm for neural network design and training.   Complex Systems,   6,   459-477. &#10; Shoham, Y., &amp; Tennenholtz, M.   (1994).   Co-learning and the evolution of social activity.   Tech. rep. STAN-CS-TR-94-1511,   Dept. of Computer Science, Stanford University. &#10; Plotkin, G. D.   (1971a).   Automatic Methods of Inductive Inference.   Ph.D. thesis,   Edinburgh University. &#10; Gupta, R., Smolka, S., &amp; Bhaskar, S.   (1994).   On randomization in sequential and distributed algorithms.   ACM Computing Surveys,   26 (1),   7-86. &#10; De Raedt, L., Lavrac, N., &amp; Dzeroski, S.   (1993).   Multiple predicate learning.   In Proceedings of the Third International Workshop on Inductive Logic Programming Bled,   Slovenia. &#10; De Raedt, L., &amp; Bruynooghe, M.   (1990).   Indirect relevance and bias in inductive concept learning.   Knowledge Acquisition,   2,   365-390.   desJardins, M., &amp; Gordon, D. F. (Eds.).   (1995). &#10; Rivest, R. L.   (1987).   Learning decision lists.   Machine Learning,   2 (3),   229-246. &#10; Michalski, R.   (1983).   A theory and methodology of inductive learning.   Artificial Intelligence,   20,   111-161. &#10; Cameron-Jones, R. M., &amp; Quinlan, J. R.   (1994).   Efficient top-down induction of logic programs.   SIGART Bulletin,   5 (1),   33-42. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3099" language="x-unspecified"/><example:Author xmi:id="12973" sofa="1" begin="7" end="34"/><example:Author xmi:id="12981" sofa="1" begin="151" end="176"/><example:Author xmi:id="12989" sofa="1" begin="346" end="376"/><example:Author xmi:id="12997" sofa="1" begin="496" end="510"/><example:Author xmi:id="13005" sofa="1" begin="652" end="707"/><example:Author xmi:id="13013" sofa="1" begin="847" end="856"/><example:Author xmi:id="13021" sofa="1" begin="1038" end="1047"/><example:Author xmi:id="13029" sofa="1" begin="1134" end="1170"/><example:Author xmi:id="13037" sofa="1" begin="1313" end="1340"/><example:Author xmi:id="13045" sofa="1" begin="1459" end="1486"/><example:Author xmi:id="13053" sofa="1" begin="1589" end="1634"/><example:Author xmi:id="13061" sofa="1" begin="1767" end="1802"/><example:Author xmi:id="13069" sofa="1" begin="1924" end="1953"/><example:Author xmi:id="13077" sofa="1" begin="2101" end="2115"/><example:Author xmi:id="13085" sofa="1" begin="2213" end="2249"/><example:Author xmi:id="13093" sofa="1" begin="2366" end="2406"/><example:Author xmi:id="13101" sofa="1" begin="2552" end="2582"/><example:Author xmi:id="13109" sofa="1" begin="2749" end="2762"/><example:Author xmi:id="13117" sofa="1" begin="2842" end="2855"/><example:Author xmi:id="13125" sofa="1" begin="2962" end="3000"/><example:Date xmi:id="13133" sofa="1" begin="37" end="44"/><example:Date xmi:id="13141" sofa="1" begin="179" end="186"/><example:Date xmi:id="13149" sofa="1" begin="379" end="386"/><example:Date xmi:id="13157" sofa="1" begin="513" end="521"/><example:Date xmi:id="13165" sofa="1" begin="710" end="717"/><example:Date xmi:id="13173" sofa="1" begin="859" end="866"/><example:Date xmi:id="13181" sofa="1" begin="1050" end="1057"/><example:Date xmi:id="13189" sofa="1" begin="1173" end="1180"/><example:Date xmi:id="13197" sofa="1" begin="1343" end="1350"/><example:Date xmi:id="13205" sofa="1" begin="1489" end="1496"/><example:Date xmi:id="13213" sofa="1" begin="1637" end="1644"/><example:Date xmi:id="13221" sofa="1" begin="1805" end="1812"/><example:Date xmi:id="13229" sofa="1" begin="1956" end="1963"/><example:Date xmi:id="13237" sofa="1" begin="2118" end="2126"/><example:Date xmi:id="13245" sofa="1" begin="2252" end="2259"/><example:Date xmi:id="13253" sofa="1" begin="2409" end="2416"/><example:Date xmi:id="13261" sofa="1" begin="2585" end="2592"/><example:Date xmi:id="13269" sofa="1" begin="2739" end="2746"/><example:Date xmi:id="13277" sofa="1" begin="2765" end="2772"/><example:Date xmi:id="13285" sofa="1" begin="2858" end="2865"/><example:Date xmi:id="13293" sofa="1" begin="3003" end="3010"/><example:Pages xmi:id="13301" sofa="1" begin="142" end="148"/><example:Pages xmi:id="13309" sofa="1" begin="337" end="343"/><example:Pages xmi:id="13317" sofa="1" begin="485" end="493"/><example:Pages xmi:id="13325" sofa="1" begin="641" end="649"/><example:Pages xmi:id="13333" sofa="1" begin="836" end="844"/><example:Pages xmi:id="13341" sofa="1" begin="1302" end="1310"/><example:Pages xmi:id="13349" sofa="1" begin="1448" end="1456"/><example:Pages xmi:id="13357" sofa="1" begin="1580" end="1586"/><example:Pages xmi:id="13365" sofa="1" begin="1759" end="1764"/><example:Pages xmi:id="13373" sofa="1" begin="1913" end="1921"/><example:Pages xmi:id="13381" sofa="1" begin="2358" end="2363"/><example:Pages xmi:id="13389" sofa="1" begin="2686" end="2694"/><example:Pages xmi:id="13397" sofa="1" begin="2831" end="2839"/><example:Pages xmi:id="13405" sofa="1" begin="2951" end="2959"/><example:Pages xmi:id="13413" sofa="1" begin="3091" end="3097"/><example:Publisher xmi:id="13421" sofa="1" begin="1106" end="1121"/><example:Institution xmi:id="13429" sofa="1" begin="1008" end="1035"/><example:Institution xmi:id="13437" sofa="1" begin="2051" end="2098"/><example:Institution xmi:id="13445" sofa="1" begin="2189" end="2210"/><example:Volume xmi:id="13453" sofa="1" begin="131" end="139"/><example:Volume xmi:id="13461" sofa="1" begin="475" end="482"/><example:Volume xmi:id="13469" sofa="1" begin="631" end="638"/><example:Volume xmi:id="13477" sofa="1" begin="830" end="833"/><example:Volume xmi:id="13485" sofa="1" begin="1296" end="1299"/><example:Volume xmi:id="13493" sofa="1" begin="1438" end="1445"/><example:Volume xmi:id="13501" sofa="1" begin="1570" end="1576"/><example:Volume xmi:id="13509" sofa="1" begin="1753" end="1756"/><example:Volume xmi:id="13517" sofa="1" begin="1908" end="1910"/><example:Volume xmi:id="13525" sofa="1" begin="2348" end="2355"/><example:Volume xmi:id="13533" sofa="1" begin="2681" end="2683"/><example:Volume xmi:id="13541" sofa="1" begin="2822" end="2828"/><example:Volume xmi:id="13549" sofa="1" begin="2945" end="2948"/><example:Volume xmi:id="13557" sofa="1" begin="3082" end="3088"/><example:Editor xmi:id="13565" sofa="1" begin="2697" end="2736"/><example:Title xmi:id="13573" sofa="1" begin="47" end="99"/><example:Title xmi:id="13581" sofa="1" begin="189" end="260"/><example:Title xmi:id="13589" sofa="1" begin="389" end="433"/><example:Title xmi:id="13597" sofa="1" begin="524" end="605"/><example:Title xmi:id="13605" sofa="1" begin="720" end="773"/><example:Title xmi:id="13613" sofa="1" begin="869" end="988"/><example:Title xmi:id="13621" sofa="1" begin="1060" end="1103"/><example:Title xmi:id="13629" sofa="1" begin="1183" end="1273"/><example:Title xmi:id="13637" sofa="1" begin="1353" end="1413"/><example:Title xmi:id="13645" sofa="1" begin="1499" end="1547"/><example:Title xmi:id="13653" sofa="1" begin="1647" end="1708"/><example:Title xmi:id="13661" sofa="1" begin="1815" end="1886"/><example:Title xmi:id="13669" sofa="1" begin="1966" end="2015"/><example:Title xmi:id="13677" sofa="1" begin="2129" end="2170"/><example:Title xmi:id="13685" sofa="1" begin="2262" end="2320"/><example:Title xmi:id="13693" sofa="1" begin="2419" end="2447"/><example:Title xmi:id="13701" sofa="1" begin="2595" end="2653"/><example:Title xmi:id="13709" sofa="1" begin="2775" end="2799"/><example:Title xmi:id="13717" sofa="1" begin="2868" end="2915"/><example:Title xmi:id="13725" sofa="1" begin="3013" end="3060"/><example:Booktitle xmi:id="13733" sofa="1" begin="263" end="334"/><example:Booktitle xmi:id="13741" sofa="1" begin="2450" end="2537"/><example:Journal xmi:id="13749" sofa="1" begin="102" end="128"/><example:Journal xmi:id="13757" sofa="1" begin="436" end="472"/><example:Journal xmi:id="13765" sofa="1" begin="608" end="628"/><example:Journal xmi:id="13773" sofa="1" begin="776" end="827"/><example:Journal xmi:id="13781" sofa="1" begin="1276" end="1293"/><example:Journal xmi:id="13789" sofa="1" begin="1416" end="1435"/><example:Journal xmi:id="13797" sofa="1" begin="1550" end="1567"/><example:Journal xmi:id="13805" sofa="1" begin="1711" end="1750"/><example:Journal xmi:id="13813" sofa="1" begin="1889" end="1905"/><example:Journal xmi:id="13821" sofa="1" begin="2323" end="2345"/><example:Journal xmi:id="13829" sofa="1" begin="2656" end="2678"/><example:Journal xmi:id="13837" sofa="1" begin="2802" end="2819"/><example:Journal xmi:id="13845" sofa="1" begin="2918" end="2942"/><example:Journal xmi:id="13853" sofa="1" begin="3063" end="3079"/><example:Location xmi:id="13861" sofa="1" begin="1124" end="1131"/><example:Location xmi:id="13869" sofa="1" begin="2540" end="2549"/><example:Tech xmi:id="13877" sofa="1" begin="991" end="1005"/><example:Tech xmi:id="13885" sofa="1" begin="2018" end="2048"/><example:Tech xmi:id="13893" sofa="1" begin="2173" end="2186"/><cas:View sofa="1" members="8 12973 12981 12989 12997 13005 13013 13021 13029 13037 13045 13053 13061 13069 13077 13085 13093 13101 13109 13117 13125 13133 13141 13149 13157 13165 13173 13181 13189 13197 13205 13213 13221 13229 13237 13245 13253 13261 13269 13277 13285 13293 13301 13309 13317 13325 13333 13341 13349 13357 13365 13373 13381 13389 13397 13405 13413 13421 13429 13437 13445 13453 13461 13469 13477 13485 13493 13501 13509 13517 13525 13533 13541 13549 13557 13565 13573 13581 13589 13597 13605 13613 13621 13629 13637 13645 13653 13661 13669 13677 13685 13693 13701 13709 13717 13725 13733 13741 13749 13757 13765 13773 13781 13789 13797 13805 13813 13821 13829 13837 13845 13853 13861 13869 13877 13885 13893"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/8.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/8.txt.xmi.xmi
deleted file mode 100644
index 8e82f64..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/8.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; G. E. Blelloch, S. Chatterjee, J. C. Hardwick, J. Sipelstein, and M. Zagha.   Implementation of a portable nested data-parallel language.   In 4th Symposium on Principles and Practice of Parallel Programming. ACM SIGPLAN,   1993. &#10; M. Wand and D. P. Fredman.   The mystery of the tower revealed: a non-reflective description of the reflective tower.   In Proceedings Symposium on Lisp and Functional Programming,   pages 298-307,   ACM,   August 1986. &#10; D. R. Engler, M. F. Kaashoek, J. W. O'Toole Jr.   Exokernel: An Operating System Architecture for Application Level Resource Management.   In Proceedings of the 15th ACM Symposium on Operating Systems Principles,   pages 251-266,   Colorado, USA,   December 1995. &#10; H. Lu, S. Dwarkadas, A. Cox, and W. Zwaenepoel.   Message passing versus distributed shared memory on networks of workstations.   In Proceedings SuperComputing '95,   Dec. 1995. &#10; S. Seneff and J. Polifroni.   A new restaurant guide conversational system: Issues in rapid prototyping for specialized domains.   In Proc. ICSLP,   pages 665--668,   1996. &#10; R. Stansifer and D. Wetklow.   Method reuse in typed object-oriented languages.   In Proceedings of the ACM/SIGAPP Symposium on Applied Computing,   pages 63-70,   1993. &#10; M. Peot and D. E. Smith.   Threat-removal strategies for partial-order planning.   In Proceedings of the Eleventh National Conference on Artificial Intelligence,   pages 492-499,   Washington, D. C.,   1993. &#10; A. Mahanti, D. Eager, M. Vernon, and D. Sundaram-Stukel.   Scalable on-demand media streaming with packet loss recovery.   In Proceedings of SIGCOMM,   August 2001. &#10; A. Bricker, M. Litzkow, and M. Livny.   Condor Technical Summary.   TR 1069,   Computer Sciences Dept., Univ. of Wisconsin-Madison,   January 1992. &#10; J. Heintz and C. P. Schnorr.   Testing polynomials that are easy to compute.   In Proceedings of the lth Annual ACM Symposium on the Theory o f Computing,   pages 262-272,   1980. &#10; W. Yu, J. Wu, D.K. Panda.   Scalable Startup of Parallel Programs over Infiniband.   Technical Report OSU-CISRC-5/04-TR33,   Dept. of Computer and Information Science, The Ohio State University,   Columbus, OH 43210,   2004. &#10; B. K. P. Horn.   Robot Vision.   MIT Press,   Cambridge, MA,   1986. &#10; J. Vaganay and B. Jouvencel.   Motion estimation for rov stabilization with a light-stripe sensor.   In Oceans'96,   Fort Lauderdale, Florida,   September 1996. &#10; S. P. Amarasinghe, J. M. Anderson, C. S. Wilson, S.-W. Liao, B. M. Murphy, R. S. French, M. S. Lam, and M. W. Hall.   Multiprocessors from a software perspective.   IEEE Micro,   pages 5261,   June 1996. &#10; R. Valette, M. Courvoisier, J.M. Bigou, and J. Albukerque.   A Petri Net Based Programmable Logic Controller.   In IFIP First International Conference on Computer Applications in Production and Enginnering,   April 1983. &#10; R. von Hanxleden and K. Kennedy.   Give-N-Take a balanced code placement framework.   In Proceedings of the ACM SIGPLAN 91 Conference on Programming Language Design and Implementation,   June 1994. &#10; J. S. Huang and Y. C. Chow.   Parallel Sorting and Data Partitioning by Sampling.   In Proceedings of the 7th Computer Software and Applications Conference,   pages 627-631,   November 1983. &#10; J.M. Wing and M. Vaziri-Farahani.   Model checking software systems: A case study.   In Proceedings of SIGSOFT'95 Third ACM SIGSOFT Symposium on the Foundations of Software Engineering,   pages 128-139,   October 1995. &#10; H. Schftze and C. Silverstein.   Projections for efficient document clustering.   In Proceedings of the Annual International ACM SIGIR Conference on Research Development in Information Retrieval,   1997. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3672" language="x-unspecified"/><example:Author xmi:id="13880" sofa="1" begin="7" end="82"/><example:Author xmi:id="13888" sofa="1" begin="239" end="265"/><example:Author xmi:id="13896" sofa="1" begin="461" end="508"/><example:Author xmi:id="13904" sofa="1" begin="727" end="774"/><example:Author xmi:id="13912" sofa="1" begin="907" end="934"/><example:Author xmi:id="13920" sofa="1" begin="1082" end="1110"/><example:Author xmi:id="13928" sofa="1" begin="1254" end="1278"/><example:Author xmi:id="13936" sofa="1" begin="1464" end="1520"/><example:Author xmi:id="13944" sofa="1" begin="1631" end="1668"/><example:Author xmi:id="13952" sofa="1" begin="1781" end="1809"/><example:Author xmi:id="13960" sofa="1" begin="1963" end="1988"/><example:Author xmi:id="13968" sofa="1" begin="2190" end="2204"/><example:Author xmi:id="13976" sofa="1" begin="2261" end="2289"/><example:Author xmi:id="13984" sofa="1" begin="2424" end="2539"/><example:Author xmi:id="13992" sofa="1" begin="2630" end="2688"/><example:Author xmi:id="14000" sofa="1" begin="2853" end="2885"/><example:Author xmi:id="14008" sofa="1" begin="3053" end="3080"/><example:Author xmi:id="14016" sofa="1" begin="3246" end="3279"/><example:Author xmi:id="14024" sofa="1" begin="3467" end="3497"/><example:Date xmi:id="14032" sofa="1" begin="231" end="236"/><example:Date xmi:id="14040" sofa="1" begin="446" end="458"/><example:Date xmi:id="14048" sofa="1" begin="710" end="724"/><example:Date xmi:id="14056" sofa="1" begin="894" end="904"/><example:Date xmi:id="14064" sofa="1" begin="1074" end="1079"/><example:Date xmi:id="14072" sofa="1" begin="1246" end="1251"/><example:Date xmi:id="14080" sofa="1" begin="1456" end="1461"/><example:Date xmi:id="14088" sofa="1" begin="1616" end="1628"/><example:Date xmi:id="14096" sofa="1" begin="1765" end="1778"/><example:Date xmi:id="14104" sofa="1" begin="1955" end="1960"/><example:Date xmi:id="14112" sofa="1" begin="2182" end="2187"/><example:Date xmi:id="14120" sofa="1" begin="2253" end="2258"/><example:Date xmi:id="14128" sofa="1" begin="2406" end="2421"/><example:Date xmi:id="14136" sofa="1" begin="2617" end="2627"/><example:Date xmi:id="14144" sofa="1" begin="2839" end="2850"/><example:Date xmi:id="14152" sofa="1" begin="3040" end="3050"/><example:Date xmi:id="14160" sofa="1" begin="3229" end="3243"/><example:Date xmi:id="14168" sofa="1" begin="3451" end="3464"/><example:Date xmi:id="14176" sofa="1" begin="3665" end="3670"/><example:Pages xmi:id="14184" sofa="1" begin="422" end="436"/><example:Pages xmi:id="14192" sofa="1" begin="676" end="690"/><example:Pages xmi:id="14200" sofa="1" begin="1056" end="1071"/><example:Pages xmi:id="14208" sofa="1" begin="1231" end="1243"/><example:Pages xmi:id="14216" sofa="1" begin="1418" end="1432"/><example:Pages xmi:id="14224" sofa="1" begin="1938" end="1952"/><example:Pages xmi:id="14232" sofa="1" begin="2603" end="2614"/><example:Pages xmi:id="14240" sofa="1" begin="3212" end="3226"/><example:Pages xmi:id="14248" sofa="1" begin="3434" end="3448"/><example:Publisher xmi:id="14256" sofa="1" begin="439" end="443"/><example:Publisher xmi:id="14264" sofa="1" begin="2223" end="2233"/><example:Institution xmi:id="14272" sofa="1" begin="1710" end="1762"/><example:Institution xmi:id="14280" sofa="1" begin="2088" end="2157"/><example:Title xmi:id="14288" sofa="1" begin="85" end="144"/><example:Title xmi:id="14296" sofa="1" begin="268" end="356"/><example:Title xmi:id="14304" sofa="1" begin="511" end="597"/><example:Title xmi:id="14312" sofa="1" begin="777" end="854"/><example:Title xmi:id="14320" sofa="1" begin="937" end="1035"/><example:Title xmi:id="14328" sofa="1" begin="1113" end="1161"/><example:Title xmi:id="14336" sofa="1" begin="1281" end="1334"/><example:Title xmi:id="14344" sofa="1" begin="1523" end="1584"/><example:Title xmi:id="14352" sofa="1" begin="1671" end="1696"/><example:Title xmi:id="14360" sofa="1" begin="1812" end="1857"/><example:Title xmi:id="14368" sofa="1" begin="1991" end="2045"/><example:Title xmi:id="14376" sofa="1" begin="2207" end="2220"/><example:Title xmi:id="14384" sofa="1" begin="2292" end="2359"/><example:Title xmi:id="14392" sofa="1" begin="2542" end="2586"/><example:Title xmi:id="14400" sofa="1" begin="2691" end="2739"/><example:Title xmi:id="14408" sofa="1" begin="2888" end="2936"/><example:Title xmi:id="14416" sofa="1" begin="3083" end="3134"/><example:Title xmi:id="14424" sofa="1" begin="3282" end="3328"/><example:Title xmi:id="14432" sofa="1" begin="3500" end="3546"/><example:Booktitle xmi:id="14440" sofa="1" begin="147" end="228"/><example:Booktitle xmi:id="14448" sofa="1" begin="359" end="419"/><example:Booktitle xmi:id="14456" sofa="1" begin="600" end="673"/><example:Booktitle xmi:id="14464" sofa="1" begin="857" end="891"/><example:Booktitle xmi:id="14472" sofa="1" begin="1038" end="1053"/><example:Booktitle xmi:id="14480" sofa="1" begin="1164" end="1228"/><example:Booktitle xmi:id="14488" sofa="1" begin="1337" end="1415"/><example:Booktitle xmi:id="14496" sofa="1" begin="1587" end="1613"/><example:Booktitle xmi:id="14504" sofa="1" begin="1860" end="1935"/><example:Booktitle xmi:id="14512" sofa="1" begin="2362" end="2375"/><example:Booktitle xmi:id="14520" sofa="1" begin="2742" end="2836"/><example:Booktitle xmi:id="14528" sofa="1" begin="2939" end="3037"/><example:Booktitle xmi:id="14536" sofa="1" begin="3137" end="3209"/><example:Booktitle xmi:id="14544" sofa="1" begin="3331" end="3431"/><example:Booktitle xmi:id="14552" sofa="1" begin="3549" end="3662"/><example:Journal xmi:id="14560" sofa="1" begin="2589" end="2600"/><example:Location xmi:id="14568" sofa="1" begin="693" end="707"/><example:Location xmi:id="14576" sofa="1" begin="1435" end="1453"/><example:Location xmi:id="14584" sofa="1" begin="2160" end="2179"/><example:Location xmi:id="14592" sofa="1" begin="2236" end="2250"/><example:Location xmi:id="14600" sofa="1" begin="2378" end="2403"/><example:Tech xmi:id="14608" sofa="1" begin="1699" end="1707"/><example:Tech xmi:id="14616" sofa="1" begin="2048" end="2085"/><cas:View sofa="1" members="8 13880 13888 13896 13904 13912 13920 13928 13936 13944 13952 13960 13968 13976 13984 13992 14000 14008 14016 14024 14032 14040 14048 14056 14064 14072 14080 14088 14096 14104 14112 14120 14128 14136 14144 14152 14160 14168 14176 14184 14192 14200 14208 14216 14224 14232 14240 14248 14256 14264 14272 14280 14288 14296 14304 14312 14320 14328 14336 14344 14352 14360 14368 14376 14384 14392 14400 14408 14416 14424 14432 14440 14448 14456 14464 14472 14480 14488 14496 14504 14512 14520 14528 14536 14544 14552 14560 14568 14576 14584 14592 14600 14608 14616"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half1/9.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half1/9.txt.xmi.xmi
deleted file mode 100644
index 5a570c0..0000000
--- a/trunk/example-projects/TextRulerExample/data/half1/9.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Gmytrasiewicz, P. J., Durfee, E. H., &amp; Wehe, D. K.   (1991a).   A decision theoretic approach to coordinating multiagent interaction.   In Proceedings of the Twelfth International Joint Conference on Artificial Intelligence,   pp. 62-68   Sydney, Australia. &#10; Gmytrasiewicz, P. J., &amp; Durfee, E. H.   (1992).   A logic of knowledge and belief for recursive modeling: Preliminary report.   In Proceedings of the Tenth National Conference on Artificial Intelligence,   pp. 628-634   San Jose, California. &#10; Jennings, N.   (1994).   Commitments and conventions: the foundation of coordination in multi-agent systems.   The Knowledge Engineering Review,   8. &#10; Corkill, D. D.   (1979).   Hierarchical planning in a distributed environment.   In Proceedings of the Sixth International Joint Conference on Artificial Intelligence,   pp. 168-175   Tokyo. &#10; Valiant, L. G.   (1984).   A theory of the learnable.   Communications of the ACM,   27 (11). &#10; Pearl, J.   (1988).   Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference.   Morgan Kaufmann. &#10; Schaffer, C.   (1992).   Sparse data and the effect of overfitting avoidance in decision tree induction.   In AAAI-92 Proceedings of the Tenth National Conference on Artificial Intelligence,   pp. 147-152   San Jose, CA.   AAAI Press. &#10; Fink, E., &amp; Veloso, M.   (1994).   Formalizing the prodigy planning algorithm.   CMU CS Tech Report CMU-CS-94-123. &#10; Morgenstern, L.   (1990).   A formal theory of multiple agent nonmonotonic reasoning.   In Proceedings of the Eighth National Conference on Artificial Intelligence,   pp. 538-544   Boston, Massachusetts. &#10; Whittaker, J.   (1991).   Graphical Models in Applied Multivariate Statistics.   Chichester: Wiley. &#10; Peot, M. A., &amp; Smith, D. E.   (1993).   Threat-removal strategies for partial-order planning.   In Proceedings of the Eleventh National Conference of the American Association for Artificial Intelligence (AAAI-93),   pp. 492-499   Washington, D. C.   Morgan Kaufmann. &#10; Webb, G. I., &amp; Brkic, N.   (1993).   Learning decision lists by prepending inferred rules.   In Proceedings of the Australian Workshop on Machine Learning and Hybrid Systems,   pp. 6-10   Melbourne, Australia. &#10; McDermott, J.   (1982).   R1: A rule-based configurer of computer systems.   Artificial Intelligence,   19. &#10; Narendra, K., &amp; Thathachar, M. A. L.   (1989).   Learning Automata: An Introduction.   Prentice Hall. &#10; Kosslyn, S. M.   (1994).   Image and Brain: the resolution of the imagery debate.   MIT Press. &#10; Aumann, R., &amp; Maschler, M.   (1995).   Repeated Games with Incomplete Information.   The MIT Press. &#10; Baumberg A. M. &amp; Hogg D. C.   [1994].   An efficient method for contour tracking using active shape models.   University of Leeds School of Computer Studies   Research Report Series,   Report 94.11. &#10; Quinlan, J. R., &amp; Cameron-Jones, R. M.   (1993).   FOIL: A midterm report.   In Proceedings of the European Conference on Machine Learning,   pp. 3-20   Vienna. &#10; Hopcroft, J., &amp; Ullman, J.   (1979).   Introduction to Automata Theory, Languages, and Computation.   Addison-Wesley. &#10; Hughes, G. E., &amp; Cresswell, J. M.   (1968).   An Introduction to Modal Logic.   Methuen and Co. Ltd. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3218" language="x-unspecified"/><example:Author xmi:id="12557" sofa="1" begin="7" end="57"/><example:Author xmi:id="12565" sofa="1" begin="267" end="304"/><example:Author xmi:id="12573" sofa="1" begin="511" end="523"/><example:Author xmi:id="12581" sofa="1" begin="663" end="677"/><example:Author xmi:id="12589" sofa="1" begin="856" end="870"/><example:Author xmi:id="12597" sofa="1" begin="952" end="961"/><example:Author xmi:id="12605" sofa="1" begin="1076" end="1088"/><example:Author xmi:id="12613" sofa="1" begin="1313" end="1335"/><example:Author xmi:id="12621" sofa="1" begin="1430" end="1445"/><example:Author xmi:id="12629" sofa="1" begin="1636" end="1649"/><example:Author xmi:id="12637" sofa="1" begin="1738" end="1765"/><example:Author xmi:id="12645" sofa="1" begin="2007" end="2031"/><example:Author xmi:id="12653" sofa="1" begin="2219" end="2232"/><example:Author xmi:id="12661" sofa="1" begin="2329" end="2365"/><example:Author xmi:id="12669" sofa="1" begin="2433" end="2447"/><example:Author xmi:id="12677" sofa="1" begin="2530" end="2556"/><example:Author xmi:id="12685" sofa="1" begin="2632" end="2659"/><example:Author xmi:id="12693" sofa="1" begin="2833" end="2871"/><example:Author xmi:id="12701" sofa="1" begin="2996" end="3022"/><example:Author xmi:id="12709" sofa="1" begin="3116" end="3149"/><example:Date xmi:id="12717" sofa="1" begin="60" end="68"/><example:Date xmi:id="12725" sofa="1" begin="307" end="314"/><example:Date xmi:id="12733" sofa="1" begin="526" end="533"/><example:Date xmi:id="12741" sofa="1" begin="680" end="687"/><example:Date xmi:id="12749" sofa="1" begin="873" end="880"/><example:Date xmi:id="12757" sofa="1" begin="964" end="971"/><example:Date xmi:id="12765" sofa="1" begin="1091" end="1098"/><example:Date xmi:id="12773" sofa="1" begin="1338" end="1345"/><example:Date xmi:id="12781" sofa="1" begin="1448" end="1455"/><example:Date xmi:id="12789" sofa="1" begin="1652" end="1659"/><example:Date xmi:id="12797" sofa="1" begin="1768" end="1775"/><example:Date xmi:id="12805" sofa="1" begin="2034" end="2041"/><example:Date xmi:id="12813" sofa="1" begin="2235" end="2242"/><example:Date xmi:id="12821" sofa="1" begin="2368" end="2375"/><example:Date xmi:id="12829" sofa="1" begin="2450" end="2457"/><example:Date xmi:id="12837" sofa="1" begin="2559" end="2566"/><example:Date xmi:id="12845" sofa="1" begin="2662" end="2669"/><example:Date xmi:id="12853" sofa="1" begin="2874" end="2881"/><example:Date xmi:id="12861" sofa="1" begin="3025" end="3032"/><example:Date xmi:id="12869" sofa="1" begin="3152" end="3159"/><example:Pages xmi:id="12877" sofa="1" begin="234" end="243"/><example:Pages xmi:id="12885" sofa="1" begin="473" end="484"/><example:Pages xmi:id="12893" sofa="1" begin="833" end="844"/><example:Pages xmi:id="12901" sofa="1" begin="1269" end="1280"/><example:Pages xmi:id="12909" sofa="1" begin="1597" end="1608"/><example:Pages xmi:id="12917" sofa="1" begin="1954" end="1965"/><example:Pages xmi:id="12925" sofa="1" begin="2184" end="2192"/><example:Pages xmi:id="12933" sofa="1" begin="2975" end="2983"/><example:Publisher xmi:id="12941" sofa="1" begin="1057" end="1073"/><example:Publisher xmi:id="12949" sofa="1" begin="1299" end="1310"/><example:Publisher xmi:id="12957" sofa="1" begin="1717" end="1735"/><example:Publisher xmi:id="12965" sofa="1" begin="1988" end="2004"/><example:Publisher xmi:id="12973" sofa="1" begin="2416" end="2430"/><example:Publisher xmi:id="12981" sofa="1" begin="2517" end="2527"/><example:Publisher xmi:id="12989" sofa="1" begin="2615" end="2629"/><example:Publisher xmi:id="12997" sofa="1" begin="3098" end="3113"/><example:Publisher xmi:id="13005" sofa="1" begin="3196" end="3216"/><example:Institution xmi:id="13013" sofa="1" begin="2742" end="2788"/><example:Volume xmi:id="13021" sofa="1" begin="658" end="660"/><example:Volume xmi:id="13029" sofa="1" begin="941" end="949"/><example:Volume xmi:id="13037" sofa="1" begin="2323" end="2326"/><example:Title xmi:id="13045" sofa="1" begin="71" end="140"/><example:Title xmi:id="13053" sofa="1" begin="317" end="392"/><example:Title xmi:id="13061" sofa="1" begin="536" end="619"/><example:Title xmi:id="13069" sofa="1" begin="690" end="741"/><example:Title xmi:id="13077" sofa="1" begin="883" end="909"/><example:Title xmi:id="13085" sofa="1" begin="974" end="1054"/><example:Title xmi:id="13093" sofa="1" begin="1101" end="1180"/><example:Title xmi:id="13101" sofa="1" begin="1348" end="1391"/><example:Title xmi:id="13109" sofa="1" begin="1458" end="1515"/><example:Title xmi:id="13117" sofa="1" begin="1662" end="1714"/><example:Title xmi:id="13125" sofa="1" begin="1778" end="1831"/><example:Title xmi:id="13133" sofa="1" begin="2044" end="2097"/><example:Title xmi:id="13141" sofa="1" begin="2245" end="2293"/><example:Title xmi:id="13149" sofa="1" begin="2378" end="2413"/><example:Title xmi:id="13157" sofa="1" begin="2460" end="2514"/><example:Title xmi:id="13165" sofa="1" begin="2569" end="2612"/><example:Title xmi:id="13173" sofa="1" begin="2672" end="2739"/><example:Title xmi:id="13181" sofa="1" begin="2884" end="2907"/><example:Title xmi:id="13189" sofa="1" begin="3035" end="3095"/><example:Title xmi:id="13197" sofa="1" begin="3162" end="3193"/><example:Booktitle xmi:id="13205" sofa="1" begin="143" end="231"/><example:Booktitle xmi:id="13213" sofa="1" begin="395" end="470"/><example:Booktitle xmi:id="13221" sofa="1" begin="744" end="830"/><example:Booktitle xmi:id="13229" sofa="1" begin="1183" end="1266"/><example:Booktitle xmi:id="13237" sofa="1" begin="1518" end="1594"/><example:Booktitle xmi:id="13245" sofa="1" begin="1834" end="1951"/><example:Booktitle xmi:id="13253" sofa="1" begin="2100" end="2181"/><example:Booktitle xmi:id="13261" sofa="1" begin="2910" end="2972"/><example:Journal xmi:id="13269" sofa="1" begin="622" end="655"/><example:Journal xmi:id="13277" sofa="1" begin="912" end="938"/><example:Journal xmi:id="13285" sofa="1" begin="2296" end="2320"/><example:Location xmi:id="13293" sofa="1" begin="246" end="264"/><example:Location xmi:id="13301" sofa="1" begin="487" end="508"/><example:Location xmi:id="13309" sofa="1" begin="847" end="853"/><example:Location xmi:id="13317" sofa="1" begin="1283" end="1296"/><example:Location xmi:id="13325" sofa="1" begin="1611" end="1633"/><example:Location xmi:id="13333" sofa="1" begin="1968" end="1985"/><example:Location xmi:id="13341" sofa="1" begin="2195" end="2216"/><example:Location xmi:id="13349" sofa="1" begin="2986" end="2993"/><example:Tech xmi:id="13357" sofa="1" begin="1394" end="1427"/><example:Tech xmi:id="13365" sofa="1" begin="2817" end="2830"/><cas:View sofa="1" members="8 12557 12565 12573 12581 12589 12597 12605 12613 12621 12629 12637 12645 12653 12661 12669 12677 12685 12693 12701 12709 12717 12725 12733 12741 12749 12757 12765 12773 12781 12789 12797 12805 12813 12821 12829 12837 12845 12853 12861 12869 12877 12885 12893 12901 12909 12917 12925 12933 12941 12949 12957 12965 12973 12981 12989 12997 13005 13013 13021 13029 13037 13045 13053 13061 13069 13077 13085 13093 13101 13109 13117 13125 13133 13141 13149 13157 13165 13173 13181 13189 13197 13205 13213 13221 13229 13237 13245 13253 13261 13269 13277 13285 13293 13301 13309 13317 13325 13333 13341 13349 13357 13365"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/14.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/14.txt.xmi.xmi
deleted file mode 100644
index 1d71c96..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/14.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; A. Elmagarmid, editor.   Transaction Models for Advanced Database Applications.   Morgan-Kaufmann,   1992. &#10; K. Gharachorloo, D. Lenoski, J. Laudon, P. Gibbons, A. Gupta, and J. Hennessy.   Memory consistency and event ordering in scalable shared-memory multiprocessors.   In Proceedings of the 17th Annual International Symposium on Computer Architecture,   pages 15-26,   May 1990. &#10; E. Mohr, D. A. Kranz, and R. H. Halstead.   Lazy Task Creation: a Technique for Increasing the Granularity of Parallel Programs.   In Proceedings of the 1990 ACM Conference on LISP and Functional Programming,   pages 185-197,   June 1990. &#10; A. Aggarwal, B. Alpern, A. K. Chandra, and M. Snil.   A model for hierarchical memory.   In Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing,   pages 305-313,   1987. &#10; J. Dongarra, J. Bunch, C. Moler, and G. Stewart.   LINPACK User's Guide.   SIAM Publications,   Philadelphia, PA,   1979. &#10; A. J. Bernstein.   Analysis of programs for parallel processing.   IEEE Transactions on Electronic Computers,   pages 757-763,   October 1966. &#10; J. Allen and J. Koomen.   Planning using a temporal world model.   In Proc. IJCAI,   pages 741-747,   1983. &#10; T. Fahringer, R. Blasko, and H. Zima.   Automatic performance prediction to support parallelization of Fortran programs for massively parallel systems.   In Proceedings of the 1992 ACM International Conference on Supercomputing,   Washington, DC,   July 1992. &#10; N. Manjikian and Wayne M. Loueks.   High performance parallel logic simulation on a network of workstations.   In Proceedings of the 7th Workshop on Parallel Distributed Simulation,   pages 76-84,   San Diego, CA,   May 1993. &#10; R. Fikes, M. Cutkosky, T. Gruber, and J. V. Baalen.   Knowledge Sharing Technology Project Overview.   Technical Report KSL-91-71,   Knowledge Systems Laboratory, Stanford University,   1991. &#10; O. Shechory and S. Kraus.   Feasible formation of stable coalitions among autonomous agents in general environments.   Computational Intelligence Journal,   1995.   Submitted. &#10; K. Pettis and R. C. Hansen.   Profile guided code positioning.   In Proceedings of the ACM SIGPLAN'90 Conference on Programming Language Design Implementation,   pages 16-27,   1990. &#10; T. Carpenter, K. Driscoll, K. Hoyme, and J. Carciofini.   ARINC659 acheduling: Problem definition.   In Proceedings of the Real Time Systems Symposium,   pages 165-169,   December 1994. &#10; D. Ourston and R. J. Mooney.   Changing the Rules: A Comprehensive Approach to Theory Refinement.   In Proceedings of the Eighth International Conference on Machine Learning,   pages 485-489,   1991. &#10; M. C. Ferris and J.-S. Pang (editors).   Complementarity and variational problems : State of the Art.   SIAM Publications,   1997. &#10; N. Matelan.   The Flex/32 multicomputer.   In Proceedings of the 12th International Symposium on Computer Architecture,   pages 209-213,   Computer Society Press,   June 1985. &#10; J. Adams, W. Brainerd, J. Martin, B. Smith, and J. Wagener.   Fortran 90 Handbook.   McGraw-Hill,   New York, NY,   1992. &#10; J. Singh and J. Hennessy.   An empirical investigation of the effectiveness of and limitations of automatic parallelization.   In Proceedings of the International Symposium on Shared Memory Multiprocessors,   Tokyo, Japan,   April 1991. &#10; M. Gupta and P. Banerjee.   Automatic data partitioning on distributed memory multiprocessors.   In Proceedings of the 6th Distributed Memory Computing Conference,   Portland, OR,   April 1991. &#10; S. Carr, K. S. McKinley, and C.-W. Tseng.   Compiler optimizations for improving data locality.   In Proceedings of the Sixth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-VI),   San Jose, CA,   October 1994. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3784" language="x-unspecified"/><example:Author xmi:id="13733" sofa="1" begin="116" end="194"/><example:Author xmi:id="13741" sofa="1" begin="393" end="434"/><example:Author xmi:id="13749" sofa="1" begin="634" end="685"/><example:Author xmi:id="13757" sofa="1" begin="828" end="876"/><example:Author xmi:id="13765" sofa="1" begin="952" end="968"/><example:Author xmi:id="13773" sofa="1" begin="1097" end="1120"/><example:Author xmi:id="13781" sofa="1" begin="1207" end="1244"/><example:Author xmi:id="13789" sofa="1" begin="1469" end="1502"/><example:Author xmi:id="13797" sofa="1" begin="1697" end="1748"/><example:Author xmi:id="13805" sofa="1" begin="1891" end="1916"/><example:Author xmi:id="13813" sofa="1" begin="2069" end="2096"/><example:Author xmi:id="13821" sofa="1" begin="2254" end="2309"/><example:Author xmi:id="13829" sofa="1" begin="2442" end="2470"/><example:Author xmi:id="13837" sofa="1" begin="2777" end="2788"/><example:Author xmi:id="13845" sofa="1" begin="2955" end="3014"/><example:Author xmi:id="13853" sofa="1" begin="3079" end="3104"/><example:Author xmi:id="13861" sofa="1" begin="3318" end="3343"/><example:Author xmi:id="13869" sofa="1" begin="3514" end="3555"/><example:Date xmi:id="13877" sofa="1" begin="108" end="113"/><example:Date xmi:id="13885" sofa="1" begin="381" end="390"/><example:Date xmi:id="13893" sofa="1" begin="621" end="631"/><example:Date xmi:id="13901" sofa="1" begin="820" end="825"/><example:Date xmi:id="13909" sofa="1" begin="944" end="949"/><example:Date xmi:id="13917" sofa="1" begin="1081" end="1094"/><example:Date xmi:id="13925" sofa="1" begin="1199" end="1204"/><example:Date xmi:id="13933" sofa="1" begin="1456" end="1466"/><example:Date xmi:id="13941" sofa="1" begin="1685" end="1694"/><example:Date xmi:id="13949" sofa="1" begin="1883" end="1888"/><example:Date xmi:id="13957" sofa="1" begin="2048" end="2053"/><example:Date xmi:id="13965" sofa="1" begin="2246" end="2251"/><example:Date xmi:id="13973" sofa="1" begin="2425" end="2439"/><example:Date xmi:id="13981" sofa="1" begin="2636" end="2641"/><example:Date xmi:id="13989" sofa="1" begin="2769" end="2774"/><example:Date xmi:id="13997" sofa="1" begin="2942" end="2952"/><example:Date xmi:id="14005" sofa="1" begin="3071" end="3076"/><example:Date xmi:id="14013" sofa="1" begin="3304" end="3315"/><example:Date xmi:id="14021" sofa="1" begin="3500" end="3511"/><example:Date xmi:id="14029" sofa="1" begin="3769" end="3782"/><example:Pages xmi:id="14037" sofa="1" begin="366" end="378"/><example:Pages xmi:id="14045" sofa="1" begin="604" end="618"/><example:Pages xmi:id="14053" sofa="1" begin="803" end="817"/><example:Pages xmi:id="14061" sofa="1" begin="1064" end="1078"/><example:Pages xmi:id="14069" sofa="1" begin="1182" end="1196"/><example:Pages xmi:id="14077" sofa="1" begin="1653" end="1665"/><example:Pages xmi:id="14085" sofa="1" begin="2231" end="2243"/><example:Pages xmi:id="14093" sofa="1" begin="2408" end="2422"/><example:Pages xmi:id="14101" sofa="1" begin="2619" end="2633"/><example:Pages xmi:id="14109" sofa="1" begin="2899" end="2913"/><example:Publisher xmi:id="14117" sofa="1" begin="89" end="105"/><example:Publisher xmi:id="14125" sofa="1" begin="903" end="921"/><example:Publisher xmi:id="14133" sofa="1" begin="2748" end="2766"/><example:Publisher xmi:id="14141" sofa="1" begin="2916" end="2939"/><example:Publisher xmi:id="14149" sofa="1" begin="3040" end="3052"/><example:Institution xmi:id="14157" sofa="1" begin="1830" end="1880"/><example:Editor xmi:id="14165" sofa="1" begin="7" end="29"/><example:Editor xmi:id="14173" sofa="1" begin="2644" end="2682"/><example:Title xmi:id="14181" sofa="1" begin="32" end="86"/><example:Title xmi:id="14189" sofa="1" begin="197" end="277"/><example:Title xmi:id="14197" sofa="1" begin="437" end="521"/><example:Title xmi:id="14205" sofa="1" begin="688" end="720"/><example:Title xmi:id="14213" sofa="1" begin="879" end="900"/><example:Title xmi:id="14221" sofa="1" begin="971" end="1016"/><example:Title xmi:id="14229" sofa="1" begin="1123" end="1161"/><example:Title xmi:id="14237" sofa="1" begin="1247" end="1358"/><example:Title xmi:id="14245" sofa="1" begin="1505" end="1577"/><example:Title xmi:id="14253" sofa="1" begin="1751" end="1797"/><example:Title xmi:id="14261" sofa="1" begin="1919" end="2007"/><example:Title xmi:id="14269" sofa="1" begin="2099" end="2131"/><example:Title xmi:id="14277" sofa="1" begin="2312" end="2352"/><example:Title xmi:id="14285" sofa="1" begin="2473" end="2539"/><example:Title xmi:id="14293" sofa="1" begin="2685" end="2745"/><example:Title xmi:id="14301" sofa="1" begin="2791" end="2817"/><example:Title xmi:id="14309" sofa="1" begin="3017" end="3037"/><example:Title xmi:id="14317" sofa="1" begin="3107" end="3203"/><example:Title xmi:id="14325" sofa="1" begin="3346" end="3412"/><example:Title xmi:id="14333" sofa="1" begin="3558" end="3609"/><example:Booktitle xmi:id="14341" sofa="1" begin="280" end="363"/><example:Booktitle xmi:id="14349" sofa="1" begin="524" end="601"/><example:Booktitle xmi:id="14357" sofa="1" begin="723" end="800"/><example:Booktitle xmi:id="14365" sofa="1" begin="1164" end="1179"/><example:Booktitle xmi:id="14373" sofa="1" begin="1361" end="1435"/><example:Booktitle xmi:id="14381" sofa="1" begin="1580" end="1650"/><example:Booktitle xmi:id="14389" sofa="1" begin="2134" end="2228"/><example:Booktitle xmi:id="14397" sofa="1" begin="2355" end="2405"/><example:Booktitle xmi:id="14405" sofa="1" begin="2542" end="2616"/><example:Booktitle xmi:id="14413" sofa="1" begin="2820" end="2896"/><example:Booktitle xmi:id="14421" sofa="1" begin="3206" end="3285"/><example:Booktitle xmi:id="14429" sofa="1" begin="3415" end="3481"/><example:Booktitle xmi:id="14437" sofa="1" begin="3612" end="3750"/><example:Journal xmi:id="14445" sofa="1" begin="1019" end="1061"/><example:Journal xmi:id="14453" sofa="1" begin="2010" end="2045"/><example:Location xmi:id="14461" sofa="1" begin="924" end="941"/><example:Location xmi:id="14469" sofa="1" begin="1438" end="1453"/><example:Location xmi:id="14477" sofa="1" begin="1668" end="1682"/><example:Location xmi:id="14485" sofa="1" begin="3055" end="3068"/><example:Location xmi:id="14493" sofa="1" begin="3288" end="3301"/><example:Location xmi:id="14501" sofa="1" begin="3484" end="3497"/><example:Location xmi:id="14509" sofa="1" begin="3753" end="3766"/><example:Tech xmi:id="14517" sofa="1" begin="1800" end="1827"/><cas:View sofa="1" members="8 13733 13741 13749 13757 13765 13773 13781 13789 13797 13805 13813 13821 13829 13837 13845 13853 13861 13869 13877 13885 13893 13901 13909 13917 13925 13933 13941 13949 13957 13965 13973 13981 13989 13997 14005 14013 14021 14029 14037 14045 14053 14061 14069 14077 14085 14093 14101 14109 14117 14125 14133 14141 14149 14157 14165 14173 14181 14189 14197 14205 14213 14221 14229 14237 14245 14253 14261 14269 14277 14285 14293 14301 14309 14317 14325 14333 14341 14349 14357 14365 14373 14381 14389 14397 14405 14413 14421 14429 14437 14445 14453 14461 14469 14477 14485 14493 14501 14509 14517"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/15.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/15.txt.xmi.xmi
deleted file mode 100644
index 4e0e7a9..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/15.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Gene T. J. Wuu and Arthur J. Bernstein.   Efficient solutions to the replicated log and dictionary problems.   In Proceedings of the 3rd Symposium on Principles of Distributed Computing,   pages 233-242,   Vancouver, Canada,   August 1984. &#10; Dorai Sitaram and Matthias Felleisen.   Reasoning with continuations II: Full abstraction for models of control.   In Proceedings 1990 Conference on LISP Functional Programming,   pages 161-175,   June 1990. &#10; Surajit Chaudhuri and Moshe Vardi.   On the equivalence of recursive and nonrecursive data-log programs.   In The Proceedings of the PODS-92,   pages 55-66,   1992. &#10; Joon S. Park and Ravi Sandhu.   RBAC on the web by smart certificates.   In Proceedings of 4th ACM Workshop on Role-Based Access Control,   pages 1-9,   Fairfax, VA,   October 1999.   ACM. &#10; Mihai Barbuceanu, Tom Gray, and Serge Mankovski.   Coordinating with obligations.   In Proceedings of the Second International Conference on Autonmruus Agents Agents98,   pages 62-69,   1998. &#10; David R. Cheriton, Hendrik A. Goosen, and Philip Machanick.   Restructuring a Parallel Simulation to Improve Cache Behavior in a Shared-Memory Multiprocessor: A First Experience.   In International Symposium on Shared Memory Multiprocessing,   pages 109-118,   April 1991. &#10; Robert A. Ballance, Arthur B. Maccabe, and Karl J. Ottenstein.   The program dependence web: A representation supporting control-, data-, and demand-driven interpretation of imperative languages.   In Proc. of Sigplan '90 Conf. on Programming Language Design and Implementation,   pages 257-271,   1990. &#10; Claus-Werner Lermen and Dieter Maurer.   A protocol for distributed reference counting.   In Proceedings 1986 ACM Conference on Lisp Functional Programming,   pages 343-350,   ACM SIGPLAN/SIGACT/SIGART,   Cambridge, Massachusetts,   August 1986. &#10; Atsushi Ohori and Peter Buneman.   Type inference in a database langage.   In ACM Conference on LISP Functional Programming,   pages 174-183,   1988. &#10; Rajagopalan Desikan, Doug Burger, and Stephen W. Keckler.   Measuring experimental error in microprocessor simulation.   In Proceedings of the 28th Annual International Symposium on Computer Architecture,   pages 266-277,   July 2001. &#10; Zarka Cvetanovic and Dileep Bhandarkar.   Characterization of the Alpha AXP Performance Using TP and SPEC Workloads.   In Proceedings of the 21st Annual International Symposium on Computer Architecture,   pages 60-70,   April 1994. &#10; David R. Cheriton and Willy Zwaenepoel.   The distributed V kernel and its performance for diskless workstations.   In Proceedings of the Ninth ACM Symposium on Operating Systems Principles,   pages 129-140,   October 1983. &#10; Steve Pieper, Joseph Rosen, and David Zeltzer.   Interactive computer graphics for plastic surgery: A task-level analysis and implementation.   Proceedings of the ACM 199 Symposium on Interactive SD Graphics,   pages 127-134,   1992. &#10; D Lehmann.   Belief revision, revised.   In Proceedings IJCAI-95,   pages 1534--1540,   1995. &#10; Loic Prylli, Bernard Tourancheau, and Roland Westrelin.   The design for a high performance MPI implementation on the Myrinet network.   In EuroPVM/MPI,   pages 223–230,   1999. &#10; Michael Luby and Erie Vigoda.   Approximately counting up to four.   In Proceedings of the Twenty-Ninth Annual ACM Symposium on Theot3 of Computing,   pages 682-687,   1997. &#10; Dimitrios Georgakopoulos, Marek Rusinkiewicz, and Amit Sheth.   On Serializability of Multidatabase Transactions Through Forced Local Conflicts.   In Proceedings of the Seventh International Conference on Data Engineering,   pages 314--323,   Kobe, Japan,   April 1991. &#10; Dario Giarrizzo, Matthias Kaiserswerth, Thomas Wicki, and Robin C. Williamson.   High-speed parallel protocol implementation.   First IFIP WG6.1/WG6.4 International Workshop on Protocols for High-Speed Networks,   pages 165-180,   May 1989. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="3891" language="x-unspecified"/><example:Author xmi:id="13226" sofa="1" begin="7" end="46"/><example:Author xmi:id="13234" sofa="1" begin="249" end="286"/><example:Author xmi:id="13242" sofa="1" begin="459" end="493"/><example:Author xmi:id="13250" sofa="1" begin="626" end="655"/><example:Author xmi:id="13258" sofa="1" begin="817" end="865"/><example:Author xmi:id="13266" sofa="1" begin="1011" end="1070"/><example:Author xmi:id="13274" sofa="1" begin="1286" end="1348"/><example:Author xmi:id="13282" sofa="1" begin="1592" end="1630"/><example:Author xmi:id="13290" sofa="1" begin="1840" end="1872"/><example:Author xmi:id="13298" sofa="1" begin="1992" end="2049"/><example:Author xmi:id="13306" sofa="1" begin="2229" end="2268"/><example:Author xmi:id="13314" sofa="1" begin="2463" end="2502"/><example:Author xmi:id="13322" sofa="1" begin="2689" end="2735"/><example:Author xmi:id="13330" sofa="1" begin="2925" end="2935"/><example:Author xmi:id="13338" sofa="1" begin="3021" end="3076"/><example:Author xmi:id="13346" sofa="1" begin="3201" end="3230"/><example:Author xmi:id="13354" sofa="1" begin="3377" end="3438"/><example:Author xmi:id="13362" sofa="1" begin="3649" end="3727"/><example:Date xmi:id="13370" sofa="1" begin="234" end="246"/><example:Date xmi:id="13378" sofa="1" begin="446" end="456"/><example:Date xmi:id="13386" sofa="1" begin="618" end="623"/><example:Date xmi:id="13394" sofa="1" begin="794" end="807"/><example:Date xmi:id="13402" sofa="1" begin="1003" end="1008"/><example:Date xmi:id="13410" sofa="1" begin="1272" end="1283"/><example:Date xmi:id="13418" sofa="1" begin="1584" end="1589"/><example:Date xmi:id="13426" sofa="1" begin="1825" end="1837"/><example:Date xmi:id="13434" sofa="1" begin="1984" end="1989"/><example:Date xmi:id="13442" sofa="1" begin="2216" end="2226"/><example:Date xmi:id="13450" sofa="1" begin="2449" end="2460"/><example:Date xmi:id="13458" sofa="1" begin="2673" end="2686"/><example:Date xmi:id="13466" sofa="1" begin="2917" end="2922"/><example:Date xmi:id="13474" sofa="1" begin="3013" end="3018"/><example:Date xmi:id="13482" sofa="1" begin="3193" end="3198"/><example:Date xmi:id="13490" sofa="1" begin="3369" end="3374"/><example:Date xmi:id="13498" sofa="1" begin="3635" end="3646"/><example:Date xmi:id="13506" sofa="1" begin="3880" end="3889"/><example:Pages xmi:id="13514" sofa="1" begin="196" end="210"/><example:Pages xmi:id="13522" sofa="1" begin="429" end="443"/><example:Pages xmi:id="13530" sofa="1" begin="603" end="615"/><example:Pages xmi:id="13538" sofa="1" begin="766" end="776"/><example:Pages xmi:id="13546" sofa="1" begin="988" end="1000"/><example:Pages xmi:id="13554" sofa="1" begin="1255" end="1269"/><example:Pages xmi:id="13562" sofa="1" begin="1567" end="1581"/><example:Pages xmi:id="13570" sofa="1" begin="1751" end="1765"/><example:Pages xmi:id="13578" sofa="1" begin="1967" end="1981"/><example:Pages xmi:id="13586" sofa="1" begin="2199" end="2213"/><example:Pages xmi:id="13594" sofa="1" begin="2434" end="2446"/><example:Pages xmi:id="13602" sofa="1" begin="2656" end="2670"/><example:Pages xmi:id="13610" sofa="1" begin="2900" end="2914"/><example:Pages xmi:id="13618" sofa="1" begin="2993" end="3010"/><example:Pages xmi:id="13626" sofa="1" begin="3176" end="3190"/><example:Pages xmi:id="13634" sofa="1" begin="3352" end="3366"/><example:Pages xmi:id="13642" sofa="1" begin="3602" end="3617"/><example:Pages xmi:id="13650" sofa="1" begin="3863" end="3877"/><example:Publisher xmi:id="13658" sofa="1" begin="810" end="814"/><example:Title xmi:id="13666" sofa="1" begin="49" end="115"/><example:Title xmi:id="13674" sofa="1" begin="289" end="361"/><example:Title xmi:id="13682" sofa="1" begin="496" end="563"/><example:Title xmi:id="13690" sofa="1" begin="658" end="696"/><example:Title xmi:id="13698" sofa="1" begin="868" end="898"/><example:Title xmi:id="13706" sofa="1" begin="1073" end="1189"/><example:Title xmi:id="13714" sofa="1" begin="1351" end="1481"/><example:Title xmi:id="13722" sofa="1" begin="1633" end="1679"/><example:Title xmi:id="13730" sofa="1" begin="1875" end="1912"/><example:Title xmi:id="13738" sofa="1" begin="2052" end="2110"/><example:Title xmi:id="13746" sofa="1" begin="2271" end="2345"/><example:Title xmi:id="13754" sofa="1" begin="2505" end="2576"/><example:Title xmi:id="13762" sofa="1" begin="2738" end="2830"/><example:Title xmi:id="13770" sofa="1" begin="2938" end="2963"/><example:Title xmi:id="13778" sofa="1" begin="3079" end="3155"/><example:Title xmi:id="13786" sofa="1" begin="3233" end="3267"/><example:Title xmi:id="13794" sofa="1" begin="3441" end="3521"/><example:Title xmi:id="13802" sofa="1" begin="3730" end="3774"/><example:Booktitle xmi:id="13810" sofa="1" begin="118" end="193"/><example:Booktitle xmi:id="13818" sofa="1" begin="364" end="426"/><example:Booktitle xmi:id="13826" sofa="1" begin="566" end="600"/><example:Booktitle xmi:id="13834" sofa="1" begin="699" end="763"/><example:Booktitle xmi:id="13842" sofa="1" begin="901" end="985"/><example:Booktitle xmi:id="13850" sofa="1" begin="1192" end="1252"/><example:Booktitle xmi:id="13858" sofa="1" begin="1484" end="1564"/><example:Booktitle xmi:id="13866" sofa="1" begin="1682" end="1748"/><example:Booktitle xmi:id="13874" sofa="1" begin="1915" end="1964"/><example:Booktitle xmi:id="13882" sofa="1" begin="2113" end="2196"/><example:Booktitle xmi:id="13890" sofa="1" begin="2348" end="2431"/><example:Booktitle xmi:id="13898" sofa="1" begin="2579" end="2653"/><example:Booktitle xmi:id="13906" sofa="1" begin="2833" end="2897"/><example:Booktitle xmi:id="13914" sofa="1" begin="2966" end="2990"/><example:Booktitle xmi:id="13922" sofa="1" begin="3158" end="3173"/><example:Booktitle xmi:id="13930" sofa="1" begin="3270" end="3349"/><example:Booktitle xmi:id="13938" sofa="1" begin="3524" end="3599"/><example:Booktitle xmi:id="13946" sofa="1" begin="3777" end="3860"/><example:Journal xmi:id="13954" sofa="1" begin="1768" end="1794"/><example:Location xmi:id="13962" sofa="1" begin="213" end="231"/><example:Location xmi:id="13970" sofa="1" begin="779" end="791"/><example:Location xmi:id="13978" sofa="1" begin="1797" end="1822"/><example:Location xmi:id="13986" sofa="1" begin="3620" end="3632"/><cas:View sofa="1" members="8 13226 13234 13242 13250 13258 13266 13274 13282 13290 13298 13306 13314 13322 13330 13338 13346 13354 13362 13370 13378 13386 13394 13402 13410 13418 13426 13434 13442 13450 13458 13466 13474 13482 13490 13498 13506 13514 13522 13530 13538 13546 13554 13562 13570 13578 13586 13594 13602 13610 13618 13626 13634 13642 13650 13658 13666 13674 13682 13690 13698 13706 13714 13722 13730 13738 13746 13754 13762 13770 13778 13786 13794 13802 13810 13818 13826 13834 13842 13850 13858 13866 13874 13882 13890 13898 13906 13914 13922 13930 13938 13946 13954 13962 13970 13978 13986"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/16.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/16.txt.xmi.xmi
deleted file mode 100644
index 17fc68d..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/16.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Witten, I. H., Neal R. M., and Cleary J. G.   (1987).   Arithmetic coding for data compression.   Communications of the ACM   30,   520-540. &#10; Mostow, J., &amp; Bhatnagar, N.   (1987).   Failsafe: A floor planner that uses ebg to learn from its failures.   In Proceedings IJCAI-87. &#10; Asahiro, Y., Iwama, K., &amp; Miyano, E.   (1993).   Random generation of test instances with controlled attributes.   In Second DIMACS Challenge Workshop. &#10; Ware, C. &amp; Slipp, L.   (1991).   Using velocity control to navigate 3D graphical environments: a comparison of three interfaces.   Proceedings of the Human Factors Society 35th annual meeting. &#10; Genesereth, M., &amp; Nourbakhsh, I. R.   (1993).   Time Saving Tips for Problem Solving with Incomplete Information.   In Proceedings of AAAI-93. &#10; Laird, J. E., Jones, R. M., &amp; Nielsen, P. E.   (1994).   Coordinated behavior of computer generated forces in tacair-soar.   In Proceedings of the Fourth Conference on Computer Generated Forces and Behavioral Representation.   Orlando, Florida:   Institute for Simulation and Training, University of Central Florida. &#10; Baral, C., &amp; Subrahmanian, V.   (1991).   Duality between alternative semantics of logic programs and nonmonotonic formalisms.   In Proc. Intl. Workshop on Logic Programming and Nonmonotonic Reasoning.   Springer. &#10; Tambe, M.   (1996).   Tracking dynamic team activity.   In Proceedings of the National Conference on Artificial Intelligence (AAAI).  &#10; Allen, W.   (1988).   Examining psychic phenomena.   In The Ultimate Humour Book.   London:   Chancellor Press. &#10; Bengio, Y., &amp; Frasconi, P.   (1995a).   Diffusion of credit in Markovian models.   In Tesauro, G., Touretzky, D. S., &amp; Alspector, J. (Eds.),   Advances in Neural Information Processing Systems 7.   MIT Press. &#10; Hirschberg, J.   (1990).   Accent and discourse context: Assigning pitch accent in synthetic speech.   In Proceedings of the Eighth National Conference on Artificial Intelligence (AAAI). &#10; McCarthy, J. F., &amp; Lehnert, W. G.   (1995).   Using decision trees for coreference resolution.   In Proceedings of the Fourteenth International Joint Conference on Artificial Intelligence (IJCAI). &#10; Litman, D., &amp; Hirschberg, J.   (1990).   Disambiguating cue phrases in text and speech.   In Proceedings of the Thirteenth International Conference on Computational Linguistics (COLING). &#10; Hume, D., &amp; Sammut, C.   (1991).   Using inverse resolution to learn relations from experiments.   In Proceedings of the Eighth International Workshop on Machine Learning.   Morgan Kaufmann. &#10; Cohen, W. W.   (1992).   Compiling knowledge into an explicit bias.   In Proceedings of the Ninth International Conference on Machine Learning. &#10; Jordan, J.   (1987).   The informational requirements of local stability in decentralized allocation mechanisms.   In T. Groves, R. Radner, and S. Reiter (Eds.),   Information, Incentives, and Economic Mechanisms.   Minneapolis:   University of Minnesota Press. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2956" language="x-unspecified"/><example:Author xmi:id="10873" sofa="1" begin="7" end="50"/><example:Author xmi:id="10881" sofa="1" begin="150" end="177"/><example:Author xmi:id="10889" sofa="1" begin="287" end="323"/><example:Author xmi:id="10897" sofa="1" begin="441" end="461"/><example:Author xmi:id="10905" sofa="1" begin="636" end="671"/><example:Author xmi:id="10913" sofa="1" begin="781" end="825"/><example:Author xmi:id="10921" sofa="1" begin="1100" end="1129"/><example:Author xmi:id="10929" sofa="1" begin="1316" end="1325"/><example:Author xmi:id="10937" sofa="1" begin="1452" end="1461"/><example:Author xmi:id="10945" sofa="1" begin="1566" end="1592"/><example:Author xmi:id="10953" sofa="1" begin="1777" end="1791"/><example:Author xmi:id="10961" sofa="1" begin="1966" end="1999"/><example:Author xmi:id="10969" sofa="1" begin="2165" end="2193"/><example:Author xmi:id="10977" sofa="1" begin="2354" end="2376"/><example:Author xmi:id="10985" sofa="1" begin="2547" end="2559"/><example:Author xmi:id="10993" sofa="1" begin="2693" end="2703"/><example:Date xmi:id="11001" sofa="1" begin="53" end="60"/><example:Date xmi:id="11009" sofa="1" begin="180" end="187"/><example:Date xmi:id="11017" sofa="1" begin="326" end="333"/><example:Date xmi:id="11025" sofa="1" begin="464" end="471"/><example:Date xmi:id="11033" sofa="1" begin="674" end="681"/><example:Date xmi:id="11041" sofa="1" begin="828" end="835"/><example:Date xmi:id="11049" sofa="1" begin="1132" end="1139"/><example:Date xmi:id="11057" sofa="1" begin="1328" end="1335"/><example:Date xmi:id="11065" sofa="1" begin="1464" end="1471"/><example:Date xmi:id="11073" sofa="1" begin="1595" end="1603"/><example:Date xmi:id="11081" sofa="1" begin="1794" end="1801"/><example:Date xmi:id="11089" sofa="1" begin="2002" end="2009"/><example:Date xmi:id="11097" sofa="1" begin="2196" end="2203"/><example:Date xmi:id="11105" sofa="1" begin="2379" end="2386"/><example:Date xmi:id="11113" sofa="1" begin="2562" end="2569"/><example:Date xmi:id="11121" sofa="1" begin="2706" end="2713"/><example:Pages xmi:id="11129" sofa="1" begin="139" end="147"/><example:Publisher xmi:id="11137" sofa="1" begin="1304" end="1313"/><example:Publisher xmi:id="11145" sofa="1" begin="1546" end="1563"/><example:Publisher xmi:id="11153" sofa="1" begin="1764" end="1774"/><example:Publisher xmi:id="11161" sofa="1" begin="2528" end="2544"/><example:Publisher xmi:id="11169" sofa="1" begin="2924" end="2954"/><example:Institution xmi:id="11177" sofa="1" begin="1028" end="1097"/><example:Volume xmi:id="11185" sofa="1" begin="133" end="136"/><example:Editor xmi:id="11193" sofa="1" begin="1649" end="1706"/><example:Editor xmi:id="11201" sofa="1" begin="2808" end="2854"/><example:Title xmi:id="11209" sofa="1" begin="63" end="102"/><example:Title xmi:id="11217" sofa="1" begin="190" end="257"/><example:Title xmi:id="11225" sofa="1" begin="336" end="399"/><example:Title xmi:id="11233" sofa="1" begin="474" end="569"/><example:Title xmi:id="11241" sofa="1" begin="684" end="749"/><example:Title xmi:id="11249" sofa="1" begin="838" end="903"/><example:Title xmi:id="11257" sofa="1" begin="1142" end="1226"/><example:Title xmi:id="11265" sofa="1" begin="1338" end="1369"/><example:Title xmi:id="11273" sofa="1" begin="1474" end="1502"/><example:Title xmi:id="11281" sofa="1" begin="1606" end="1646"/><example:Title xmi:id="11289" sofa="1" begin="1804" end="1877"/><example:Title xmi:id="11297" sofa="1" begin="2012" end="2060"/><example:Title xmi:id="11305" sofa="1" begin="2206" end="2252"/><example:Title xmi:id="11313" sofa="1" begin="2389" end="2450"/><example:Title xmi:id="11321" sofa="1" begin="2572" end="2614"/><example:Title xmi:id="11329" sofa="1" begin="2716" end="2805"/><example:Booktitle xmi:id="11337" sofa="1" begin="260" end="284"/><example:Booktitle xmi:id="11345" sofa="1" begin="402" end="438"/><example:Booktitle xmi:id="11353" sofa="1" begin="572" end="633"/><example:Booktitle xmi:id="11361" sofa="1" begin="752" end="778"/><example:Booktitle xmi:id="11369" sofa="1" begin="906" end="1005"/><example:Booktitle xmi:id="11377" sofa="1" begin="1229" end="1301"/><example:Booktitle xmi:id="11385" sofa="1" begin="1372" end="1448"/><example:Booktitle xmi:id="11393" sofa="1" begin="1505" end="1533"/><example:Booktitle xmi:id="11401" sofa="1" begin="1709" end="1761"/><example:Booktitle xmi:id="11409" sofa="1" begin="1880" end="1963"/><example:Booktitle xmi:id="11417" sofa="1" begin="2063" end="2162"/><example:Booktitle xmi:id="11425" sofa="1" begin="2255" end="2351"/><example:Booktitle xmi:id="11433" sofa="1" begin="2453" end="2525"/><example:Booktitle xmi:id="11441" sofa="1" begin="2617" end="2690"/><example:Booktitle xmi:id="11449" sofa="1" begin="2857" end="2906"/><example:Journal xmi:id="11457" sofa="1" begin="105" end="130"/><example:Location xmi:id="11465" sofa="1" begin="1008" end="1025"/><example:Location xmi:id="11473" sofa="1" begin="1536" end="1543"/><example:Location xmi:id="11481" sofa="1" begin="2909" end="2921"/><cas:View sofa="1" members="8 10873 10881 10889 10897 10905 10913 10921 10929 10937 10945 10953 10961 10969 10977 10985 10993 11001 11009 11017 11025 11033 11041 11049 11057 11065 11073 11081 11089 11097 11105 11113 11121 11129 11137 11145 11153 11161 11169 11177 11185 11193 11201 11209 11217 11225 11233 11241 11249 11257 11265 11273 11281 11289 11297 11305 11313 11321 11329 11337 11345 11353 11361 11369 11377 11385 11393 11401 11409 11417 11425 11433 11441 11449 11457 11465 11473 11481"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/17.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/17.txt.xmi.xmi
deleted file mode 100644
index d2734c9..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/17.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Warren, D. H. D.   (1976).   Generating Conditional Plans and Programs.   In Proceedings of the Summer Conference on AI and Simulation of Behavior,   Edinburgh. &#10; Parr, R., &amp; Russell, S.   (1995).   Approximating optimal polices for partially observable stochastic domains.   In Proceedings of IJCAI-95,   1088-1094. &#10; Deerwester, S., Dumais, S., Furnas, G., Landauer, T., &amp; Harshman, R.   (1990).   Indexing by latent semantic analysis.   Journal of the American Society for Information Science,   41,   391-407. &#10; Pryor, L., &amp; Collins, G.   (1993).   Cassandra: Planning with contingencies.   Technical report 41,   Institute for the Learning Sciences, Northwestern University. &#10; Chernoff, H.   (1952).   A measure of the asymptotic efficiency for tests of a hypothesis based on the sum of observations.   Annals of Mathematical Statistics,   23,   493-509. &#10; Wellman Kephart, J. O., Hogg, T., &amp; Huberman, B. A.   (1989).   Dynamics of computational ecosystems.   Physical Review A,   40,   404-421. &#10; Weiss, S., &amp; Indurkhya, N.   (1993a).   Optimized Rule Induction.   IEEE Expert,   8 (6),   61-69.  &#10; MacWhinney, B.   (1993).   Connections and symbols: closing the gap.   Cognition,   49 (3),   291-296. &#10; VanLehn, K., Jones, R. M., &amp; Chi, M. T. H.   (1992).   A model of the self-explanation effect.   Journal of the Learning Sciences,   2 (1),   1-59. &#10; Korf, R.   (1985).   Macro-operators: a weak method for learning.   Artificial Intelligence,   26,   35-77. &#10; Mooney, R. J., &amp; Califf, M. E.   (1995).   Induction of first-order decision lists: results on learning the past tense of english verbs.   Journal of Artificial Intelligence Research,   3,   1-24. &#10; Beeri, C.   (1990).   A formal approach to object-oriented databases.   Data and Knowledge Engineering,   5,   353-382. &#10; Catlett, J.   (1991b).   Megainduction: Machine Learning on Very Large Databases.   Ph.D. thesis,   Basser Department of Computer Science, University of Sydney. &#10; Reilly, W. S.   (1996).   Believable Emotional and Social Agents.   Ph.D. thesis,   School of Computer Science, Carnegie Mellon University. &#10; Plunkett, K., &amp; Marchman, V.   (1991).   U-shaped learning and frequency effects in a multilayered perceptron: Implications for child language acquisition.   Cognition,   38,   43 - 102. &#10; Wellman, M.   (1985).   Reasoning about preference models.   Tech. rep. MIT/LCS/TR-340,   Laboratory for Computer Science, MIT. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2422" language="x-unspecified"/><example:Author xmi:id="10106" sofa="1" begin="7" end="23"/><example:Author xmi:id="10114" sofa="1" begin="170" end="193"/><example:Author xmi:id="10122" sofa="1" begin="326" end="394"/><example:Author xmi:id="10130" sofa="1" begin="523" end="547"/><example:Author xmi:id="10138" sofa="1" begin="689" end="701"/><example:Author xmi:id="10146" sofa="1" begin="869" end="920"/><example:Author xmi:id="10154" sofa="1" begin="1011" end="1037"/><example:Author xmi:id="10162" sofa="1" begin="1113" end="1127"/><example:Author xmi:id="10170" sofa="1" begin="1218" end="1260"/><example:Author xmi:id="10178" sofa="1" begin="1368" end="1376"/><example:Author xmi:id="10186" sofa="1" begin="1478" end="1508"/><example:Author xmi:id="10194" sofa="1" begin="1677" end="1686"/><example:Author xmi:id="10202" sofa="1" begin="1799" end="1810"/><example:Author xmi:id="10210" sofa="1" begin="1962" end="1975"/><example:Author xmi:id="10218" sofa="1" begin="2104" end="2132"/><example:Author xmi:id="10226" sofa="1" begin="2293" end="2304"/><example:Date xmi:id="10234" sofa="1" begin="26" end="33"/><example:Date xmi:id="10242" sofa="1" begin="196" end="203"/><example:Date xmi:id="10250" sofa="1" begin="397" end="404"/><example:Date xmi:id="10258" sofa="1" begin="550" end="557"/><example:Date xmi:id="10266" sofa="1" begin="704" end="711"/><example:Date xmi:id="10274" sofa="1" begin="923" end="930"/><example:Date xmi:id="10282" sofa="1" begin="1040" end="1048"/><example:Date xmi:id="10290" sofa="1" begin="1130" end="1137"/><example:Date xmi:id="10298" sofa="1" begin="1263" end="1270"/><example:Date xmi:id="10306" sofa="1" begin="1379" end="1386"/><example:Date xmi:id="10314" sofa="1" begin="1511" end="1518"/><example:Date xmi:id="10322" sofa="1" begin="1689" end="1696"/><example:Date xmi:id="10330" sofa="1" begin="1813" end="1821"/><example:Date xmi:id="10338" sofa="1" begin="1978" end="1985"/><example:Date xmi:id="10346" sofa="1" begin="2135" end="2142"/><example:Date xmi:id="10354" sofa="1" begin="2307" end="2314"/><example:Pages xmi:id="10362" sofa="1" begin="313" end="323"/><example:Pages xmi:id="10370" sofa="1" begin="512" end="520"/><example:Pages xmi:id="10378" sofa="1" begin="858" end="866"/><example:Pages xmi:id="10386" sofa="1" begin="1000" end="1008"/><example:Pages xmi:id="10394" sofa="1" begin="1103" end="1109"/><example:Pages xmi:id="10402" sofa="1" begin="1207" end="1215"/><example:Pages xmi:id="10410" sofa="1" begin="1360" end="1365"/><example:Pages xmi:id="10418" sofa="1" begin="1469" end="1475"/><example:Pages xmi:id="10426" sofa="1" begin="1669" end="1674"/><example:Pages xmi:id="10434" sofa="1" begin="1788" end="1796"/><example:Pages xmi:id="10442" sofa="1" begin="2281" end="2290"/><example:Institution xmi:id="10450" sofa="1" begin="625" end="686"/><example:Institution xmi:id="10458" sofa="1" begin="1899" end="1959"/><example:Institution xmi:id="10466" sofa="1" begin="2046" end="2101"/><example:Institution xmi:id="10474" sofa="1" begin="2383" end="2420"/><example:Volume xmi:id="10482" sofa="1" begin="506" end="509"/><example:Volume xmi:id="10490" sofa="1" begin="852" end="855"/><example:Volume xmi:id="10498" sofa="1" begin="994" end="997"/><example:Volume xmi:id="10506" sofa="1" begin="1094" end="1100"/><example:Volume xmi:id="10514" sofa="1" begin="1197" end="1204"/><example:Volume xmi:id="10522" sofa="1" begin="1351" end="1357"/><example:Volume xmi:id="10530" sofa="1" begin="1463" end="1466"/><example:Volume xmi:id="10538" sofa="1" begin="1664" end="1666"/><example:Volume xmi:id="10546" sofa="1" begin="1783" end="1785"/><example:Volume xmi:id="10554" sofa="1" begin="2275" end="2278"/><example:Title xmi:id="10562" sofa="1" begin="36" end="78"/><example:Title xmi:id="10570" sofa="1" begin="206" end="280"/><example:Title xmi:id="10578" sofa="1" begin="407" end="444"/><example:Title xmi:id="10586" sofa="1" begin="560" end="599"/><example:Title xmi:id="10594" sofa="1" begin="714" end="812"/><example:Title xmi:id="10602" sofa="1" begin="933" end="970"/><example:Title xmi:id="10610" sofa="1" begin="1051" end="1076"/><example:Title xmi:id="10618" sofa="1" begin="1140" end="1181"/><example:Title xmi:id="10626" sofa="1" begin="1273" end="1312"/><example:Title xmi:id="10634" sofa="1" begin="1389" end="1433"/><example:Title xmi:id="10642" sofa="1" begin="1521" end="1614"/><example:Title xmi:id="10650" sofa="1" begin="1699" end="1746"/><example:Title xmi:id="10658" sofa="1" begin="1824" end="1880"/><example:Title xmi:id="10666" sofa="1" begin="1988" end="2027"/><example:Title xmi:id="10674" sofa="1" begin="2145" end="2259"/><example:Title xmi:id="10682" sofa="1" begin="2317" end="2351"/><example:Booktitle xmi:id="10690" sofa="1" begin="81" end="154"/><example:Booktitle xmi:id="10698" sofa="1" begin="283" end="310"/><example:Journal xmi:id="10706" sofa="1" begin="447" end="503"/><example:Journal xmi:id="10714" sofa="1" begin="815" end="849"/><example:Journal xmi:id="10722" sofa="1" begin="973" end="991"/><example:Journal xmi:id="10730" sofa="1" begin="1079" end="1091"/><example:Journal xmi:id="10738" sofa="1" begin="1184" end="1194"/><example:Journal xmi:id="10746" sofa="1" begin="1315" end="1348"/><example:Journal xmi:id="10754" sofa="1" begin="1436" end="1460"/><example:Journal xmi:id="10762" sofa="1" begin="1617" end="1661"/><example:Journal xmi:id="10770" sofa="1" begin="1749" end="1780"/><example:Journal xmi:id="10778" sofa="1" begin="2262" end="2272"/><example:Location xmi:id="10786" sofa="1" begin="157" end="167"/><example:Tech xmi:id="10794" sofa="1" begin="602" end="622"/><example:Tech xmi:id="10802" sofa="1" begin="1883" end="1896"/><example:Tech xmi:id="10810" sofa="1" begin="2030" end="2043"/><example:Tech xmi:id="10818" sofa="1" begin="2354" end="2380"/><cas:View sofa="1" members="8 10106 10114 10122 10130 10138 10146 10154 10162 10170 10178 10186 10194 10202 10210 10218 10226 10234 10242 10250 10258 10266 10274 10282 10290 10298 10306 10314 10322 10330 10338 10346 10354 10362 10370 10378 10386 10394 10402 10410 10418 10426 10434 10442 10450 10458 10466 10474 10482 10490 10498 10506 10514 10522 10530 10538 10546 10554 10562 10570 10578 10586 10594 10602 10610 10618 10626 10634 10642 10650 10658 10666 10674 10682 10690 10698 10706 10714 10722 10730 10738 10746 10754 10762 10770 10778 10786 10794 10802 10810 10818"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/18.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/18.txt.xmi.xmi
deleted file mode 100644
index 57d5c9d..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/18.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Tim Berners-Lee, Robert Cailliau, Jean-Francois Groff, and Bernd Pollermann.   WorldWideWeb: the information universe.   Electronic Networking: Research, Applications and Policy,   2(1)   52-58,   Spring 1992. &#10; Ruth Shapira.   A note on Sugihara's claim.   IEEE Transactions on Pattern Analysis and Machine Intelligence,   6(1)   122-123,   1984. &#10; Nimrod Megiddo.   Linear programming in linear time when the dimension is fixed.   Journal of the ACM,   31(1):114-127,   1984. &#10; Frank Kappe, Hermann Maurer, and Nick Sherbakov.   Hyper-G a universal hypermedia system.   Journal of Educational Multimedia and Hypermedia,   2(1)   39-66,   1993. &#10; George W. Cherry.   S-R Machines: a Visual Formalism for Reactive and Interactive Systems.   ACM Software Engineering Notes,   16(3):52-55,   July 1991. &#10; Borning, Alan.   The Programming Language Aspects of ThingLab, a Constraint-Oriented Simulation Laboratory.   ACM Transactions on Programming Languages Systems,   3(4):353-387,   Oct., 1981. &#10; David R. Karger, Philip N. Klein, and Robert E. Tarjan.   A randomized linear-time algorithm to find minimum spanning trees.   Journal of the ACM,   42(2):321-328,   1995. &#10; Barry Silverman.   Survey of Expert Critiquing Systems: Practical and Theoretical Frontiers.   Communications of the ACM,   35(4):106-127,   April 1992. &#10; James Archibald and Jean-Loup Boer.   Cache coherence protocols: Evaluation using a multiprocessor simulation model.   ACM Transactions on Computer Systems,   4(4):274-298,   November 1986. &#10; Guy L. Steele Jr. and Jon L. White.   How to print floating-point numbers accurately.   ACM SIGPLAN '90 Conference on Programming Language Design Implementation,   25(6):112-126,   June 1990. &#10; Alan Borning.   The programming language aspects of ThingLab, a constraint-oriented simulation laboratory.   A GM 2ansactions on Programming Languages and Systems,   3(4):353-387,   October 1981. &#10; David R. Karger.   Minimum cuts in near-linear time.   In Proceedings of the 28th ACM Symposium on Theory of Computing. ACM,   ACM Press,   May 1996.   Philadelphia PA. &#10; Robert M. Metcalfe and David R. Boggs.   Ethemet: Distributed Packet Switching for Local Computer Networks.   Communications of the ACM,   19(7):395-404,   July, 1976. &#10; Alon Y. Levy, Divesh Srivastava, and Thomas Kirk.   Data model and query evaluation in global information systems.   Journal of Intelligent Information Systems,   1995.   Special Issue on Networked Information Discovery and Retrieval (to appear). &#10; Thomas H. Cormen and David M. Nicol.   Out-of-core FFTs with parallel disks.   ACM SIGMETRICS Performance Evaluation Review,   25(3):3-12,   December 1997. &#10; Thomas F. LaPorta and Mischa Schwartz.   Performance analysis of MSP: Feature-rich high-speed transport protocol.   IEEE/ACM Transactions on Networking,   1(6)   740-753,   December 1993. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2853" language="x-unspecified"/><example:Author xmi:id="10662" sofa="1" begin="7" end="83"/><example:Author xmi:id="10670" sofa="1" begin="219" end="232"/><example:Author xmi:id="10678" sofa="1" begin="357" end="372"/><example:Author xmi:id="10686" sofa="1" begin="487" end="535"/><example:Author xmi:id="10694" sofa="1" begin="655" end="672"/><example:Author xmi:id="10702" sofa="1" begin="810" end="824"/><example:Author xmi:id="10710" sofa="1" begin="1003" end="1058"/><example:Author xmi:id="10718" sofa="1" begin="1177" end="1193"/><example:Author xmi:id="10726" sofa="1" begin="1332" end="1367"/><example:Author xmi:id="10734" sofa="1" begin="1524" end="1559"/><example:Author xmi:id="10742" sofa="1" begin="1718" end="1731"/><example:Author xmi:id="10750" sofa="1" begin="1916" end="1932"/><example:Author xmi:id="10758" sofa="1" begin="2087" end="2125"/><example:Author xmi:id="10766" sofa="1" begin="2257" end="2306"/><example:Author xmi:id="10774" sofa="1" begin="2506" end="2542"/><example:Author xmi:id="10782" sofa="1" begin="2664" end="2702"/><example:Date xmi:id="10790" sofa="1" begin="204" end="216"/><example:Date xmi:id="10798" sofa="1" begin="349" end="354"/><example:Date xmi:id="10806" sofa="1" begin="479" end="484"/><example:Date xmi:id="10814" sofa="1" begin="647" end="652"/><example:Date xmi:id="10822" sofa="1" begin="797" end="807"/><example:Date xmi:id="10830" sofa="1" begin="989" end="1000"/><example:Date xmi:id="10838" sofa="1" begin="1169" end="1174"/><example:Date xmi:id="10846" sofa="1" begin="1318" end="1329"/><example:Date xmi:id="10854" sofa="1" begin="1507" end="1521"/><example:Date xmi:id="10862" sofa="1" begin="1705" end="1715"/><example:Date xmi:id="10870" sofa="1" begin="1900" end="1913"/><example:Date xmi:id="10878" sofa="1" begin="2056" end="2065"/><example:Date xmi:id="10886" sofa="1" begin="2243" end="2254"/><example:Date xmi:id="10894" sofa="1" begin="2420" end="2425"/><example:Date xmi:id="10902" sofa="1" begin="2647" end="2661"/><example:Date xmi:id="10910" sofa="1" begin="2837" end="2851"/><example:Pages xmi:id="10918" sofa="1" begin="195" end="201"/><example:Pages xmi:id="10926" sofa="1" begin="338" end="346"/><example:Pages xmi:id="10934" sofa="1" begin="468" end="476"/><example:Pages xmi:id="10942" sofa="1" begin="638" end="644"/><example:Pages xmi:id="10950" sofa="1" begin="788" end="794"/><example:Pages xmi:id="10958" sofa="1" begin="978" end="986"/><example:Pages xmi:id="10966" sofa="1" begin="1158" end="1166"/><example:Pages xmi:id="10974" sofa="1" begin="1307" end="1315"/><example:Pages xmi:id="10982" sofa="1" begin="1496" end="1504"/><example:Pages xmi:id="10990" sofa="1" begin="1694" end="1702"/><example:Pages xmi:id="10998" sofa="1" begin="1889" end="1897"/><example:Pages xmi:id="11006" sofa="1" begin="2232" end="2240"/><example:Pages xmi:id="11014" sofa="1" begin="2639" end="2644"/><example:Pages xmi:id="11022" sofa="1" begin="2826" end="2834"/><example:Publisher xmi:id="11030" sofa="1" begin="2043" end="2053"/><example:Volume xmi:id="11038" sofa="1" begin="188" end="192"/><example:Volume xmi:id="11046" sofa="1" begin="331" end="335"/><example:Volume xmi:id="11054" sofa="1" begin="462" end="468"/><example:Volume xmi:id="11062" sofa="1" begin="631" end="635"/><example:Volume xmi:id="11070" sofa="1" begin="782" end="788"/><example:Volume xmi:id="11078" sofa="1" begin="973" end="978"/><example:Volume xmi:id="11086" sofa="1" begin="1152" end="1158"/><example:Volume xmi:id="11094" sofa="1" begin="1301" end="1307"/><example:Volume xmi:id="11102" sofa="1" begin="1491" end="1496"/><example:Volume xmi:id="11110" sofa="1" begin="1688" end="1694"/><example:Volume xmi:id="11118" sofa="1" begin="1884" end="1889"/><example:Volume xmi:id="11126" sofa="1" begin="2226" end="2232"/><example:Volume xmi:id="11134" sofa="1" begin="2633" end="2639"/><example:Volume xmi:id="11142" sofa="1" begin="2819" end="2823"/><example:Title xmi:id="11150" sofa="1" begin="86" end="125"/><example:Title xmi:id="11158" sofa="1" begin="235" end="262"/><example:Title xmi:id="11166" sofa="1" begin="375" end="437"/><example:Title xmi:id="11174" sofa="1" begin="538" end="576"/><example:Title xmi:id="11182" sofa="1" begin="675" end="745"/><example:Title xmi:id="11190" sofa="1" begin="827" end="917"/><example:Title xmi:id="11198" sofa="1" begin="1061" end="1127"/><example:Title xmi:id="11206" sofa="1" begin="1196" end="1269"/><example:Title xmi:id="11214" sofa="1" begin="1370" end="1448"/><example:Title xmi:id="11222" sofa="1" begin="1562" end="1609"/><example:Title xmi:id="11230" sofa="1" begin="1734" end="1824"/><example:Title xmi:id="11238" sofa="1" begin="1935" end="1968"/><example:Title xmi:id="11246" sofa="1" begin="2128" end="2194"/><example:Title xmi:id="11254" sofa="1" begin="2309" end="2371"/><example:Title xmi:id="11262" sofa="1" begin="2545" end="2582"/><example:Title xmi:id="11270" sofa="1" begin="2705" end="2777"/><example:Booktitle xmi:id="11278" sofa="1" begin="1612" end="1685"/><example:Booktitle xmi:id="11286" sofa="1" begin="1971" end="2040"/><example:Journal xmi:id="11294" sofa="1" begin="128" end="185"/><example:Journal xmi:id="11302" sofa="1" begin="265" end="328"/><example:Journal xmi:id="11310" sofa="1" begin="440" end="459"/><example:Journal xmi:id="11318" sofa="1" begin="579" end="628"/><example:Journal xmi:id="11326" sofa="1" begin="748" end="779"/><example:Journal xmi:id="11334" sofa="1" begin="920" end="970"/><example:Journal xmi:id="11342" sofa="1" begin="1130" end="1149"/><example:Journal xmi:id="11350" sofa="1" begin="1272" end="1298"/><example:Journal xmi:id="11358" sofa="1" begin="1451" end="1488"/><example:Journal xmi:id="11366" sofa="1" begin="1827" end="1881"/><example:Journal xmi:id="11374" sofa="1" begin="2197" end="2223"/><example:Journal xmi:id="11382" sofa="1" begin="2374" end="2417"/><example:Journal xmi:id="11390" sofa="1" begin="2585" end="2630"/><example:Journal xmi:id="11398" sofa="1" begin="2780" end="2816"/><example:Location xmi:id="11406" sofa="1" begin="2068" end="2084"/><cas:View sofa="1" members="8 10662 10670 10678 10686 10694 10702 10710 10718 10726 10734 10742 10750 10758 10766 10774 10782 10790 10798 10806 10814 10822 10830 10838 10846 10854 10862 10870 10878 10886 10894 10902 10910 10918 10926 10934 10942 10950 10958 10966 10974 10982 10990 10998 11006 11014 11022 11030 11038 11046 11054 11062 11070 11078 11086 11094 11102 11110 11118 11126 11134 11142 11150 11158 11166 11174 11182 11190 11198 11206 11214 11222 11230 11238 11246 11254 11262 11270 11278 11286 11294 11302 11310 11318 11326 11334 11342 11350 11358 11366 11374 11382 11390 11398 11406"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/19.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/19.txt.xmi.xmi
deleted file mode 100644
index c268f57..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/19.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Hel-Or, Y., &amp; Werman, M.   (1992).   Absolute orientation from uncertain data: A unified approach.   In Proc. Intern. Conference on Computer Vision and Pattern Recognition,   pp. 77-82. &#10; Brieman, L., Friedman, J., Olshen, R., &amp; Stone, C.   (1984).   Classification and Regression Trees.   Monterey, CA:   Wadsworth and Brooks. &#10; Knuth, Donald E.   (1998).   The Art of Computer Programming Volume 3: Sorting and Searching.   Reading, Massachusetts:   Addison-Wesley. &#10; Gmytrasiewicz, P. J., Durfee, E. H., &amp; Wehe, D. K.   (1991b).   The utility of communication in coordinating intelligent agents.   In Proceedings of the Ninth National Conference on Artificial Intelligence,   pp. 166-172. &#10; Reichman, R.   (1985).   Getting Computers to Talk Like You and Me: Discourse Context, Focus, and Semantics.   Cambridge, MA:   MIT Press. &#10; MacWhinney, B.   (1990).   The CHILDES Project: Tools for Analyzing Talk.   Hillsdale, NJ:   Erlbaum. &#10; Sussman, G. J.   (1975).   A Computer Model of Skill Acquisition.   New York:   American Elsevier. &#10; Adorni, G., Broggi, A., Conte, G., &amp; D'Andrea, V.   (1993).   A self-tuning system for real-time Optical Flow detection.   In Proceedings IEEE System, Man, and Cybernetics Conf,   Vol. 3,   pp. 7-12. &#10; Rivest, R. L., &amp; Schapire, R. E.   (1989).   Inference of Finite Automata Using Homing Sequences.   In Proceedings of the 21th ACM Symp. on Theory of Computing,   pp. 411-420. &#10; Short, J., Williams, E., &amp; Christie, B.   (1976).   The social psychology of telecommunications.   London:   Wiley. &#10; Domingos, P.   (1996b).   Using partitioning to speed up specific-to-general rule induction.   In Proceedings of the AAAI-96 Workshop on Integrating Multiple Learned Models,   pp. 29-34. &#10; Lavrač, N., &amp; Dˇzeroski, S.   (1994).   Inductive logic programming: Techniques and applications.   Chichester, UK:   Ellis Horwood. &#10; Selman, B., Levesque, H., &amp; Mitchell, D.   (1992).   A new method for solving hard satisfiability problems.   In Proceedings of AAAI-92,   pp. 440-446.   AAAI/MIT Press. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2040" language="x-unspecified"/><example:Author xmi:id="8475" sofa="1" begin="7" end="31"/><example:Author xmi:id="8483" sofa="1" begin="195" end="245"/><example:Author xmi:id="8491" sofa="1" begin="337" end="353"/><example:Author xmi:id="8499" sofa="1" begin="477" end="527"/><example:Author xmi:id="8507" sofa="1" begin="701" end="713"/><example:Author xmi:id="8515" sofa="1" begin="842" end="856"/><example:Author xmi:id="8523" sofa="1" begin="946" end="960"/><example:Author xmi:id="8531" sofa="1" begin="1047" end="1096"/><example:Author xmi:id="8539" sofa="1" begin="1249" end="1281"/><example:Author xmi:id="8547" sofa="1" begin="1427" end="1466"/><example:Author xmi:id="8555" sofa="1" begin="1545" end="1557"/><example:Author xmi:id="8563" sofa="1" begin="1734" end="1761"/><example:Author xmi:id="8571" sofa="1" begin="1869" end="1909"/><example:Date xmi:id="8579" sofa="1" begin="34" end="41"/><example:Date xmi:id="8587" sofa="1" begin="248" end="255"/><example:Date xmi:id="8595" sofa="1" begin="356" end="363"/><example:Date xmi:id="8603" sofa="1" begin="530" end="538"/><example:Date xmi:id="8611" sofa="1" begin="716" end="723"/><example:Date xmi:id="8619" sofa="1" begin="859" end="866"/><example:Date xmi:id="8627" sofa="1" begin="963" end="970"/><example:Date xmi:id="8635" sofa="1" begin="1099" end="1106"/><example:Date xmi:id="8643" sofa="1" begin="1284" end="1291"/><example:Date xmi:id="8651" sofa="1" begin="1469" end="1476"/><example:Date xmi:id="8659" sofa="1" begin="1560" end="1568"/><example:Date xmi:id="8667" sofa="1" begin="1764" end="1771"/><example:Date xmi:id="8675" sofa="1" begin="1912" end="1919"/><example:Pages xmi:id="8683" sofa="1" begin="182" end="192"/><example:Pages xmi:id="8691" sofa="1" begin="686" end="698"/><example:Pages xmi:id="8699" sofa="1" begin="1237" end="1246"/><example:Pages xmi:id="8707" sofa="1" begin="1412" end="1424"/><example:Pages xmi:id="8715" sofa="1" begin="1721" end="1731"/><example:Pages xmi:id="8723" sofa="1" begin="2008" end="2020"/><example:Publisher xmi:id="8731" sofa="1" begin="313" end="334"/><example:Publisher xmi:id="8739" sofa="1" begin="459" end="474"/><example:Publisher xmi:id="8747" sofa="1" begin="829" end="839"/><example:Publisher xmi:id="8755" sofa="1" begin="935" end="943"/><example:Publisher xmi:id="8763" sofa="1" begin="1026" end="1044"/><example:Publisher xmi:id="8771" sofa="1" begin="1536" end="1542"/><example:Publisher xmi:id="8779" sofa="1" begin="1852" end="1866"/><example:Publisher xmi:id="8787" sofa="1" begin="2023" end="2038"/><example:Volume xmi:id="8795" sofa="1" begin="1227" end="1234"/><example:Title xmi:id="8803" sofa="1" begin="44" end="105"/><example:Title xmi:id="8811" sofa="1" begin="258" end="294"/><example:Title xmi:id="8819" sofa="1" begin="366" end="430"/><example:Title xmi:id="8827" sofa="1" begin="541" end="605"/><example:Title xmi:id="8835" sofa="1" begin="726" end="809"/><example:Title xmi:id="8843" sofa="1" begin="869" end="915"/><example:Title xmi:id="8851" sofa="1" begin="973" end="1011"/><example:Title xmi:id="8859" sofa="1" begin="1109" end="1167"/><example:Title xmi:id="8867" sofa="1" begin="1294" end="1346"/><example:Title xmi:id="8875" sofa="1" begin="1479" end="1523"/><example:Title xmi:id="8883" sofa="1" begin="1571" end="1637"/><example:Title xmi:id="8891" sofa="1" begin="1774" end="1831"/><example:Title xmi:id="8899" sofa="1" begin="1922" end="1976"/><example:Booktitle xmi:id="8907" sofa="1" begin="108" end="179"/><example:Booktitle xmi:id="8915" sofa="1" begin="608" end="683"/><example:Booktitle xmi:id="8923" sofa="1" begin="1349" end="1409"/><example:Booktitle xmi:id="8931" sofa="1" begin="1640" end="1718"/><example:Booktitle xmi:id="8939" sofa="1" begin="1979" end="2005"/><example:Journal xmi:id="8947" sofa="1" begin="1170" end="1224"/><example:Location xmi:id="8955" sofa="1" begin="297" end="310"/><example:Location xmi:id="8963" sofa="1" begin="433" end="456"/><example:Location xmi:id="8971" sofa="1" begin="812" end="826"/><example:Location xmi:id="8979" sofa="1" begin="918" end="932"/><example:Location xmi:id="8987" sofa="1" begin="1014" end="1023"/><example:Location xmi:id="8995" sofa="1" begin="1526" end="1533"/><example:Location xmi:id="9003" sofa="1" begin="1834" end="1849"/><cas:View sofa="1" members="8 8475 8483 8491 8499 8507 8515 8523 8531 8539 8547 8555 8563 8571 8579 8587 8595 8603 8611 8619 8627 8635 8643 8651 8659 8667 8675 8683 8691 8699 8707 8715 8723 8731 8739 8747 8755 8763 8771 8779 8787 8795 8803 8811 8819 8827 8835 8843 8851 8859 8867 8875 8883 8891 8899 8907 8915 8923 8931 8939 8947 8955 8963 8971 8979 8987 8995 9003"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/20.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/20.txt.xmi.xmi
deleted file mode 100644
index f8d3c62..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/20.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Bourdoncle, F.   Abstract debugging of higher-order imperative languages.   In ACM SIGPLAN Conference on Programming Language Design and Implementation,   pages 46-55,   1993. &#10; Korhonen, A., and Malmi, L.   Algorithm Simulation with Automatic Assessment.   Proceedings of the 5th Annual SIGCSE/SIGCUE Conference on Innovation Technology in Computer Science Education,   pages 160-163,   Helsinki, Finland,   2000. &#10; Balc'azar, J. L., D'iaz, J., Gabarr'o, J.   Structural Complexity I.   Springer-Verlag,   Berlin,   1988. &#10; Nygren, E., Lind M., Johnson, M. and Sandblad, B.   The an of the obvious' automatically processes components of the task of reading frequently used documents.   In Conference Proceedings for CH1'92, ACM Conference on Human Factors in Computing Systems,   1992. &#10; Akihiko Takano and Erik Meijer. Shortcut deforestation in calculational form.   In Proceedings Conference on Functional Programming Languages Computer Architecture,   pages 306-313,   1995. &#10; Goodenough, J. B., Sha, L.   The Priority Ceiling Protocol: A Method for Minimizing the Blocking of High Priority Ada Tasks.   Proceedings of the International Workshop of ReaI-Time Ada Issues,   June 1988. &#10; Lucassen, J. M.   Types and Effects, towards the integration of functional and imperative programming.   MIT/LCS/TR-408 (Ph. D. Thesis).   MIT Laboratory for Computer Science,   August 1987. &#10; Preist, C. and van Tol, M.   Adaptive Agents in a Persistent Shout Double Auction.   Proceedings of the 1 st International Conference on the Intemet Computing Economics,   ACM Press,   1998. &#10; Berlekamp, E.   Algebraic coding theory.   McGraw Hill,   New York NY,   1968. &#10; Hill, W.   How Some Advice Fails.   Proceedings of the 1989 ACM Conference on Human Factors in Computing Systems,   pages 85-90,   1989. &#10; Geddes, K., Czapor, S., and Labahn, G.   Algorithms for Computer Algebra.   Kluwer Academic Publishers,   Boston,   1992. &#10; Gertz M., Lipeck U. W.   Deriving Integrity Maintaining Triggers from Transition Graphs.   In International Conference on Data Engineering,   1993. &#10; Friedman, J. H. and Silverman, B. W.   Flexible parsimonious smoothing and additive modeling (with discussion).   TECHNOMETRICS.   1989. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2215" language="x-unspecified"/><example:Author xmi:id="8059" sofa="1" begin="7" end="21"/><example:Author xmi:id="8067" sofa="1" begin="185" end="212"/><example:Author xmi:id="8075" sofa="1" begin="424" end="465"/><example:Author xmi:id="8083" sofa="1" begin="532" end="581"/><example:Author xmi:id="8091" sofa="1" begin="796" end="827"/><example:Author xmi:id="8099" sofa="1" begin="988" end="1014"/><example:Author xmi:id="8107" sofa="1" begin="1197" end="1212"/><example:Author xmi:id="8115" sofa="1" begin="1390" end="1416"/><example:Author xmi:id="8123" sofa="1" begin="1583" end="1596"/><example:Author xmi:id="8131" sofa="1" begin="1664" end="1672"/><example:Author xmi:id="8139" sofa="1" begin="1803" end="1841"/><example:Author xmi:id="8147" sofa="1" begin="1927" end="1949"/><example:Author xmi:id="8155" sofa="1" begin="2077" end="2113"/><example:Date xmi:id="8163" sofa="1" begin="177" end="182"/><example:Date xmi:id="8171" sofa="1" begin="416" end="421"/><example:Date xmi:id="8179" sofa="1" begin="524" end="529"/><example:Date xmi:id="8187" sofa="1" begin="788" end="793"/><example:Date xmi:id="8195" sofa="1" begin="980" end="985"/><example:Date xmi:id="8203" sofa="1" begin="1184" end="1194"/><example:Date xmi:id="8211" sofa="1" begin="1375" end="1387"/><example:Date xmi:id="8219" sofa="1" begin="1575" end="1580"/><example:Date xmi:id="8227" sofa="1" begin="1656" end="1661"/><example:Date xmi:id="8235" sofa="1" begin="1795" end="1800"/><example:Date xmi:id="8243" sofa="1" begin="1919" end="1924"/><example:Date xmi:id="8251" sofa="1" begin="2069" end="2074"/><example:Date xmi:id="8259" sofa="1" begin="2208" end="2213"/><example:Pages xmi:id="8267" sofa="1" begin="162" end="174"/><example:Pages xmi:id="8275" sofa="1" begin="378" end="392"/><example:Pages xmi:id="8283" sofa="1" begin="963" end="977"/><example:Pages xmi:id="8291" sofa="1" begin="1780" end="1792"/><example:Publisher xmi:id="8299" sofa="1" begin="495" end="511"/><example:Publisher xmi:id="8307" sofa="1" begin="1562" end="1572"/><example:Publisher xmi:id="8315" sofa="1" begin="1626" end="1638"/><example:Publisher xmi:id="8323" sofa="1" begin="1879" end="1906"/><example:Institution xmi:id="8331" sofa="1" begin="1336" end="1372"/><example:Title xmi:id="8339" sofa="1" begin="24" end="80"/><example:Title xmi:id="8347" sofa="1" begin="215" end="262"/><example:Title xmi:id="8355" sofa="1" begin="468" end="492"/><example:Title xmi:id="8363" sofa="1" begin="584" end="691"/><example:Title xmi:id="8371" sofa="1" begin="828" end="873"/><example:Title xmi:id="8379" sofa="1" begin="1017" end="1112"/><example:Title xmi:id="8387" sofa="1" begin="1215" end="1299"/><example:Title xmi:id="8395" sofa="1" begin="1419" end="1472"/><example:Title xmi:id="8403" sofa="1" begin="1599" end="1623"/><example:Title xmi:id="8411" sofa="1" begin="1675" end="1697"/><example:Title xmi:id="8419" sofa="1" begin="1844" end="1876"/><example:Title xmi:id="8427" sofa="1" begin="1952" end="2015"/><example:Title xmi:id="8435" sofa="1" begin="2116" end="2188"/><example:Booktitle xmi:id="8443" sofa="1" begin="83" end="159"/><example:Booktitle xmi:id="8451" sofa="1" begin="265" end="375"/><example:Booktitle xmi:id="8459" sofa="1" begin="694" end="785"/><example:Booktitle xmi:id="8467" sofa="1" begin="876" end="960"/><example:Booktitle xmi:id="8475" sofa="1" begin="1115" end="1181"/><example:Booktitle xmi:id="8483" sofa="1" begin="1475" end="1559"/><example:Booktitle xmi:id="8491" sofa="1" begin="1700" end="1777"/><example:Booktitle xmi:id="8499" sofa="1" begin="2018" end="2066"/><example:Journal xmi:id="8507" sofa="1" begin="2191" end="2205"/><example:Location xmi:id="8515" sofa="1" begin="395" end="413"/><example:Location xmi:id="8523" sofa="1" begin="514" end="521"/><example:Location xmi:id="8531" sofa="1" begin="1641" end="1653"/><example:Location xmi:id="8539" sofa="1" begin="1909" end="1916"/><example:Tech xmi:id="8547" sofa="1" begin="1302" end="1333"/><cas:View sofa="1" members="8 8059 8067 8075 8083 8091 8099 8107 8115 8123 8131 8139 8147 8155 8163 8171 8179 8187 8195 8203 8211 8219 8227 8235 8243 8251 8259 8267 8275 8283 8291 8299 8307 8315 8323 8331 8339 8347 8355 8363 8371 8379 8387 8395 8403 8411 8419 8427 8435 8443 8451 8459 8467 8475 8483 8491 8499 8507 8515 8523 8531 8539 8547"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/21.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/21.txt.xmi.xmi
deleted file mode 100644
index d952631..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/21.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; M. J. Wolfe and U. Banerjee.   Data dependence and its application to parallel processing.   International Journal of Parallel Programming,   16(2),   137-178,   April 1987. &#10; R. Fagin, J. Halpern, and M. Vardi.   A model-theoretic analysis of knowledge.   Journal of the ACM,   38(2),   382-428,   1991. &#10; D. Waltz.   Understanding line-drawings of scenes with shadows.   Artificial Intelligence,   2,   79-116,   1971. &#10; P. T. Harker and J.-S. Pang.   Finite-dimensional variational inequality and nonlinear complementarity problems: A survey of theory, algorithms, and applications.   Mathematical Programming,   48(2),   161-220,   September 1990. &#10; S. Abiteboul and V. Vianu.   Datalog extensions for database queries and updates.   Journal of Computer and System Sciences,   43,   62-124,   1991. &#10; L. G. Valiant.   A Bridging Model for Parallel Computation.   Communications of the ACM,   33(8),   103-111,   1990. &#10; F. Jahanian and Al Mok.   Safety analysis of timing properties in real-time systems.   IEEE Transactions on Software Engineering,   12(9),   890-904,   September 1986. &#10; R. T. Snodgrass.   The Temporal Query Language TQuel.   ACM TODS,   12(2),   247-298,   June 1987. &#10; C. Ghezzi, D. Mandriolli, and A. Morzenti.   Trio: A logic language for executable specifications of real-time systems.   Journal of Systems and Software,   12(2),   107-123,   May 1990. &#10; W. H. Enright.   Improving the efficiency of matrix operations in the numerical solution of stiff ordinary differential equations.   ACM Trans. Math. Softw.,   4(2),   127-136,   June 1978. &#10; D. J. Burr.   Elastic matching of line drawings.   IEEE Trans. Pattern Analysis and Machine Intelligence,   3(6),   708-713,   1981. &#10; C. Amza, A. L. Cox, S. Dwarkadas, P. Keleher, H. Lu, R. Rajamony, W. Yu, and W. Zwaenepoel.   Tread-Marks: Shared memory computing on networks of workstations.   IEEE Computer,   29(2),   18-28,   February 1996. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1931" language="x-unspecified"/><example:Author xmi:id="7991" sofa="1" begin="7" end="35"/><example:Author xmi:id="7999" sofa="1" begin="183" end="218"/><example:Author xmi:id="8007" sofa="1" begin="314" end="323"/><example:Author xmi:id="8015" sofa="1" begin="430" end="458"/><example:Author xmi:id="8023" sofa="1" begin="661" end="687"/><example:Author xmi:id="8031" sofa="1" begin="812" end="826"/><example:Author xmi:id="8039" sofa="1" begin="931" end="954"/><example:Author xmi:id="8047" sofa="1" begin="1101" end="1117"/><example:Author xmi:id="8055" sofa="1" begin="1202" end="1244"/><example:Author xmi:id="8063" sofa="1" begin="1391" end="1405"/><example:Author xmi:id="8071" sofa="1" begin="1583" end="1594"/><example:Author xmi:id="8079" sofa="1" begin="1718" end="1809"/><example:Date xmi:id="8087" sofa="1" begin="169" end="180"/><example:Date xmi:id="8095" sofa="1" begin="306" end="311"/><example:Date xmi:id="8103" sofa="1" begin="422" end="427"/><example:Date xmi:id="8111" sofa="1" begin="643" end="658"/><example:Date xmi:id="8119" sofa="1" begin="804" end="809"/><example:Date xmi:id="8127" sofa="1" begin="923" end="928"/><example:Date xmi:id="8135" sofa="1" begin="1083" end="1098"/><example:Date xmi:id="8143" sofa="1" begin="1189" end="1199"/><example:Date xmi:id="8151" sofa="1" begin="1379" end="1388"/><example:Date xmi:id="8159" sofa="1" begin="1570" end="1580"/><example:Date xmi:id="8167" sofa="1" begin="1710" end="1715"/><example:Date xmi:id="8175" sofa="1" begin="1915" end="1929"/><example:Pages xmi:id="8183" sofa="1" begin="158" end="166"/><example:Pages xmi:id="8191" sofa="1" begin="295" end="303"/><example:Pages xmi:id="8199" sofa="1" begin="412" end="419"/><example:Pages xmi:id="8207" sofa="1" begin="632" end="640"/><example:Pages xmi:id="8215" sofa="1" begin="794" end="801"/><example:Pages xmi:id="8223" sofa="1" begin="912" end="920"/><example:Pages xmi:id="8231" sofa="1" begin="1072" end="1080"/><example:Pages xmi:id="8239" sofa="1" begin="1178" end="1186"/><example:Pages xmi:id="8247" sofa="1" begin="1368" end="1376"/><example:Pages xmi:id="8255" sofa="1" begin="1559" end="1567"/><example:Pages xmi:id="8263" sofa="1" begin="1699" end="1707"/><example:Pages xmi:id="8271" sofa="1" begin="1906" end="1912"/><example:Volume xmi:id="8279" sofa="1" begin="149" end="155"/><example:Volume xmi:id="8287" sofa="1" begin="286" end="292"/><example:Volume xmi:id="8295" sofa="1" begin="407" end="409"/><example:Volume xmi:id="8303" sofa="1" begin="623" end="629"/><example:Volume xmi:id="8311" sofa="1" begin="788" end="791"/><example:Volume xmi:id="8319" sofa="1" begin="903" end="909"/><example:Volume xmi:id="8327" sofa="1" begin="1063" end="1069"/><example:Volume xmi:id="8335" sofa="1" begin="1169" end="1175"/><example:Volume xmi:id="8343" sofa="1" begin="1359" end="1365"/><example:Volume xmi:id="8351" sofa="1" begin="1551" end="1556"/><example:Volume xmi:id="8359" sofa="1" begin="1691" end="1696"/><example:Volume xmi:id="8367" sofa="1" begin="1897" end="1903"/><example:Title xmi:id="8375" sofa="1" begin="38" end="97"/><example:Title xmi:id="8383" sofa="1" begin="221" end="261"/><example:Title xmi:id="8391" sofa="1" begin="326" end="377"/><example:Title xmi:id="8399" sofa="1" begin="461" end="592"/><example:Title xmi:id="8407" sofa="1" begin="690" end="742"/><example:Title xmi:id="8415" sofa="1" begin="829" end="871"/><example:Title xmi:id="8423" sofa="1" begin="957" end="1015"/><example:Title xmi:id="8431" sofa="1" begin="1120" end="1154"/><example:Title xmi:id="8439" sofa="1" begin="1247" end="1321"/><example:Title xmi:id="8447" sofa="1" begin="1408" end="1521"/><example:Title xmi:id="8455" sofa="1" begin="1597" end="1631"/><example:Title xmi:id="8463" sofa="1" begin="1812" end="1877"/><example:Journal xmi:id="8471" sofa="1" begin="100" end="146"/><example:Journal xmi:id="8479" sofa="1" begin="264" end="283"/><example:Journal xmi:id="8487" sofa="1" begin="380" end="404"/><example:Journal xmi:id="8495" sofa="1" begin="595" end="620"/><example:Journal xmi:id="8503" sofa="1" begin="745" end="785"/><example:Journal xmi:id="8511" sofa="1" begin="874" end="900"/><example:Journal xmi:id="8519" sofa="1" begin="1018" end="1060"/><example:Journal xmi:id="8527" sofa="1" begin="1157" end="1166"/><example:Journal xmi:id="8535" sofa="1" begin="1324" end="1356"/><example:Journal xmi:id="8543" sofa="1" begin="1524" end="1548"/><example:Journal xmi:id="8551" sofa="1" begin="1634" end="1688"/><example:Journal xmi:id="8559" sofa="1" begin="1880" end="1894"/><cas:View sofa="1" members="8 7991 7999 8007 8015 8023 8031 8039 8047 8055 8063 8071 8079 8087 8095 8103 8111 8119 8127 8135 8143 8151 8159 8167 8175 8183 8191 8199 8207 8215 8223 8231 8239 8247 8255 8263 8271 8279 8287 8295 8303 8311 8319 8327 8335 8343 8351 8359 8367 8375 8383 8391 8399 8407 8415 8423 8431 8439 8447 8455 8463 8471 8479 8487 8495 8503 8511 8519 8527 8535 8543 8551 8559"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/22.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/22.txt.xmi.xmi
deleted file mode 100644
index 512e88c..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/22.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; D. A. Henderson, S. K. Card,   Rooms: The Use of Multiple Virtual Workspaces to Reduce Space Contention in a Window-Based Graphical User Interface,   ACM Transactions on Graphics,   volume 5(3),   pages 211-243,   July 1986. &#10; A. V. Aho, J. E. Hopcroft, and J. D. Ullman,   The Design and Analysis of Computer Algorithms,   Addison-Wesley,   Reading, MA,   1974. &#10; A. Bookstein and S. T. Klein,   Detecting content-bearing words by serial clustering,   Proceedings of the Nineteenth Annual International ACM SIGIR Conference on Research and Development in Information Retrieval,   pp. 319327,   1995. &#10; A. Borel,   Linear algebraic groups,   Springer,   1991. &#10; D. C. Schmidt,   Experience Using Design Patterns to Develop Reuseable Object-Oriented Communication Software,   Communications of the ACM Special Issue on Design Patterns,   volume 38, No 10,   1995. &#10; C. Helmberg, B. Mohar, S. Poljak, and F. Rendl,   A spectral approach to bandwidth and separator problems in graphs,   manuscript,   Institut fur Mathematik,   Graz, Austria,   1993. &#10; D. A. Norman,   Things that make us smart,   Addison-Wesley Publishing,   1993. &#10; T. J. Sabin, C. A. L. Bailer-Jones, S. M. Roberts, D. J. C. MacKay, P. J. Withers,   to be presented at THERMEC 97 (International Conference on Thermomechanical Processing),   July 1997. &#10; R. Lipsett, C. Schaefer, C. Ussery,   VHDL: Hardware Description and Design,   Kluwer Academic Publishers,   1989. &#10; T. Imielinski, S. Viswanathan,   Adaptive Wire less Information Systems,   Proc. of SIGDBS Conf.,   Tokyo,   October, 1994. &#10; K. Chandy and J. Misra,   Parallel Program Design: A Foundation,   Addison-Wesley,   1988. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1663" language="x-unspecified"/><example:Author xmi:id="6513" sofa="1" begin="7" end="35"/><example:Author xmi:id="6521" sofa="1" begin="234" end="278"/><example:Author xmi:id="6529" sofa="1" begin="372" end="401"/><example:Author xmi:id="6537" sofa="1" begin="610" end="619"/><example:Author xmi:id="6545" sofa="1" begin="669" end="683"/><example:Author xmi:id="6553" sofa="1" begin="872" end="919"/><example:Author xmi:id="6561" sofa="1" begin="1057" end="1070"/><example:Author xmi:id="6569" sofa="1" begin="1139" end="1221"/><example:Author xmi:id="6577" sofa="1" begin="1328" end="1363"/><example:Author xmi:id="6585" sofa="1" begin="1445" end="1475"/><example:Author xmi:id="6593" sofa="1" begin="1571" end="1594"/><example:Date xmi:id="6601" sofa="1" begin="221" end="231"/><example:Date xmi:id="6609" sofa="1" begin="364" end="369"/><example:Date xmi:id="6617" sofa="1" begin="602" end="607"/><example:Date xmi:id="6625" sofa="1" begin="661" end="666"/><example:Date xmi:id="6633" sofa="1" begin="864" end="869"/><example:Date xmi:id="6641" sofa="1" begin="1049" end="1054"/><example:Date xmi:id="6649" sofa="1" begin="1131" end="1136"/><example:Date xmi:id="6657" sofa="1" begin="1315" end="1325"/><example:Date xmi:id="6665" sofa="1" begin="1437" end="1442"/><example:Date xmi:id="6673" sofa="1" begin="1554" end="1568"/><example:Date xmi:id="6681" sofa="1" begin="1656" end="1661"/><example:Pages xmi:id="6689" sofa="1" begin="204" end="218"/><example:Pages xmi:id="6697" sofa="1" begin="588" end="599"/><example:Publisher xmi:id="6705" sofa="1" begin="331" end="346"/><example:Publisher xmi:id="6713" sofa="1" begin="649" end="658"/><example:Publisher xmi:id="6721" sofa="1" begin="1102" end="1128"/><example:Publisher xmi:id="6729" sofa="1" begin="1407" end="1434"/><example:Publisher xmi:id="6737" sofa="1" begin="1638" end="1653"/><example:Institution xmi:id="6745" sofa="1" begin="1005" end="1029"/><example:Volume xmi:id="6753" sofa="1" begin="189" end="201"/><example:Volume xmi:id="6761" sofa="1" begin="844" end="861"/><example:Title xmi:id="6769" sofa="1" begin="38" end="154"/><example:Title xmi:id="6777" sofa="1" begin="281" end="328"/><example:Title xmi:id="6785" sofa="1" begin="404" end="457"/><example:Title xmi:id="6793" sofa="1" begin="622" end="646"/><example:Title xmi:id="6801" sofa="1" begin="686" end="779"/><example:Title xmi:id="6809" sofa="1" begin="922" end="988"/><example:Title xmi:id="6817" sofa="1" begin="1073" end="1099"/><example:Title xmi:id="6825" sofa="1" begin="1366" end="1404"/><example:Title xmi:id="6833" sofa="1" begin="1478" end="1517"/><example:Title xmi:id="6841" sofa="1" begin="1597" end="1635"/><example:Booktitle xmi:id="6849" sofa="1" begin="460" end="585"/><example:Booktitle xmi:id="6857" sofa="1" begin="1520" end="1542"/><example:Journal xmi:id="6865" sofa="1" begin="157" end="186"/><example:Journal xmi:id="6873" sofa="1" begin="782" end="841"/><example:Location xmi:id="6881" sofa="1" begin="349" end="361"/><example:Location xmi:id="6889" sofa="1" begin="1032" end="1046"/><example:Location xmi:id="6897" sofa="1" begin="1545" end="1551"/><cas:View sofa="1" members="8 6513 6521 6529 6537 6545 6553 6561 6569 6577 6585 6593 6601 6609 6617 6625 6633 6641 6649 6657 6665 6673 6681 6689 6697 6705 6713 6721 6729 6737 6745 6753 6761 6769 6777 6785 6793 6801 6809 6817 6825 6833 6841 6849 6857 6865 6873 6881 6889 6897"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/23.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/23.txt.xmi.xmi
deleted file mode 100644
index c7070ac..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/23.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Kelley, J. F.   An empirical methodology for writing user-friendly natural language computer applications.   In Proceedings of the CHI 83 Conference on Human Factors in Computing Systems   (Boston, Mass New York,   Dec 12-15).   ACM,   New York,   pages 193-196. &#10; Gaver W.   The Affordances Of Media Spaces For Collaboration.   In Proceedings Of ACM Conference On Computer Supported Collabo rative Work   1992.   pages 17-24. &#10; Amdur, E. S.   On the Message Complexity of Byzantine Agreement.   Master's Thesis,   Department of Computer Science, University of Toronto,   September 1988. &#10; Panario, D., Gourdon, X., and Flajolet, P.   An analytic approach to smooth polynomials.   Submitted,   1998. &#10; Knopfmacher, A.   On the number of distinct degree sizes of a polynomial over a finite field.   Preprint,   1996. &#10; Hadzilacos, V.   Issues of Fault Tolerance in Concurrent Computations.   Ph.D. dissertation,   Harvard University,   June 1984. &#10; Deutsch, A.   Modeles Operationnels de Language de Programmation et Representations de Relations sue des Languages Rationnels avec Application a la Determination Statique de Proprietes de Partages Dy-namiques de Donnees.   PhD thesis,   Universite Paris VI,   1992. &#10; Flanagan, C., and Felleisen, M.   Modular and polymorphic set-based analysis: Theory and practice.   Technical Report TR-96-266,   Rice University,   1996. &#10; Abbey, A. &amp; Andrews, F. M.   Modeling the psychological determinants of life quality.   Social Indicators Research ,  16, 1,   1985. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1515" language="x-unspecified"/><example:Author xmi:id="5534" sofa="1" begin="7" end="20"/><example:Author xmi:id="5542" sofa="1" begin="272" end="280"/><example:Author xmi:id="5550" sofa="1" begin="436" end="448"/><example:Author xmi:id="5558" sofa="1" begin="597" end="639"/><example:Author xmi:id="5566" sofa="1" begin="709" end="724"/><example:Author xmi:id="5574" sofa="1" begin="825" end="839"/><example:Author xmi:id="5582" sofa="1" begin="955" end="966"/><example:Author xmi:id="5590" sofa="1" begin="1223" end="1254"/><example:Author xmi:id="5598" sofa="1" begin="1381" end="1407"/><example:Date xmi:id="5606" sofa="1" begin="222" end="233"/><example:Date xmi:id="5614" sofa="1" begin="413" end="418"/><example:Date xmi:id="5622" sofa="1" begin="579" end="594"/><example:Date xmi:id="5630" sofa="1" begin="701" end="706"/><example:Date xmi:id="5638" sofa="1" begin="817" end="822"/><example:Date xmi:id="5646" sofa="1" begin="942" end="952"/><example:Date xmi:id="5654" sofa="1" begin="1215" end="1220"/><example:Date xmi:id="5662" sofa="1" begin="1373" end="1378"/><example:Date xmi:id="5670" sofa="1" begin="1508" end="1513"/><example:Pages xmi:id="5678" sofa="1" begin="255" end="269"/><example:Pages xmi:id="5686" sofa="1" begin="421" end="433"/><example:Publisher xmi:id="5694" sofa="1" begin="236" end="240"/><example:Institution xmi:id="5702" sofa="1" begin="522" end="576"/><example:Institution xmi:id="5710" sofa="1" begin="920" end="939"/><example:Institution xmi:id="5718" sofa="1" begin="1192" end="1212"/><example:Institution xmi:id="5726" sofa="1" begin="1354" end="1370"/><example:Volume xmi:id="5734" sofa="1" begin="1499" end="1505"/><example:Title xmi:id="5742" sofa="1" begin="23" end="113"/><example:Title xmi:id="5750" sofa="1" begin="283" end="333"/><example:Title xmi:id="5758" sofa="1" begin="451" end="500"/><example:Title xmi:id="5766" sofa="1" begin="642" end="685"/><example:Title xmi:id="5774" sofa="1" begin="727" end="802"/><example:Title xmi:id="5782" sofa="1" begin="842" end="895"/><example:Title xmi:id="5790" sofa="1" begin="969" end="1175"/><example:Title xmi:id="5798" sofa="1" begin="1257" end="1321"/><example:Title xmi:id="5806" sofa="1" begin="1410" end="1466"/><example:Booktitle xmi:id="5814" sofa="1" begin="116" end="193"/><example:Booktitle xmi:id="5822" sofa="1" begin="336" end="410"/><example:Journal xmi:id="5830" sofa="1" begin="1469" end="1495"/><example:Location xmi:id="5838" sofa="1" begin="196" end="219"/><example:Location xmi:id="5846" sofa="1" begin="243" end="252"/><example:Tech xmi:id="5854" sofa="1" begin="503" end="519"/><example:Tech xmi:id="5862" sofa="1" begin="805" end="814"/><example:Tech xmi:id="5870" sofa="1" begin="898" end="917"/><example:Tech xmi:id="5878" sofa="1" begin="1178" end="1189"/><example:Tech xmi:id="5886" sofa="1" begin="1324" end="1351"/><cas:View sofa="1" members="8 5534 5542 5550 5558 5566 5574 5582 5590 5598 5606 5614 5622 5630 5638 5646 5654 5662 5670 5678 5686 5694 5702 5710 5718 5726 5734 5742 5750 5758 5766 5774 5782 5790 5798 5806 5814 5822 5830 5838 5846 5854 5862 5870 5878 5886"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/24.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/24.txt.xmi.xmi
deleted file mode 100644
index 5c399ae..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/24.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Brian K. Reid.   A high-level approach to computer document formatting.   In Conference Record of 7th annual Symposium on Principles of Programming Languages.   pages 24-31,   Las Vegas, Nevada,   January 1980. &#10; Aaron Kershenbaum, David Musser, and Alexander Stepanov.   Higher order imperative programming.   Technical report,   Computer Science Department, Rensselaer Polytechnic Institute,   1988. &#10; John Penix, Willem Visser, Eric Engstrom, Aaron Larson, and Nicholas Weininger.   Verification of time partitioning in the deos scheduler kernel.   In Proceedings of the 22nd International Conference on Software Engineering.   ACM Press,   June 2000. &#10; Warren R. Greiff.   Computationally tractable, conceptually plausible classes of link matrices for the inquery inference network.   Technical Report CmpSci TR-96-66,   University of Massachusetts,   Amherst, Massachusetts,   September 1996. &#10; Jinxin Lin and Alberto O. Mendelzon.   Merging databases under constraints.   Manuscript,   1995. &#10; Michael Stonebraker, Anant Jhingaran, Jef-frey Goh, and Spyros Potamianos.   On rules, procedures, caching and views in databases.   Technical Report UCB/ERL M90/36,   University of California, Berkeley,   April 1990. &#10; Alexander Vrchoticky.   Modula/R language definition.   Technical Report TU Wien rr-02-92, version 2.0,   Dept. for Real-Time Systems, Technical University of Vienna,   May 1993. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1407" language="x-unspecified"/><example:Author xmi:id="4688" sofa="1" begin="7" end="21"/><example:Author xmi:id="4696" sofa="1" begin="220" end="276"/><example:Author xmi:id="4704" sofa="1" begin="411" end="490"/><example:Author xmi:id="4712" sofa="1" begin="664" end="681"/><example:Author xmi:id="4720" sofa="1" begin="907" end="943"/><example:Author xmi:id="4728" sofa="1" begin="1007" end="1081"/><example:Author xmi:id="4736" sofa="1" begin="1227" end="1248"/><example:Date xmi:id="4744" sofa="1" begin="204" end="217"/><example:Date xmi:id="4752" sofa="1" begin="403" end="408"/><example:Date xmi:id="4760" sofa="1" begin="651" end="661"/><example:Date xmi:id="4768" sofa="1" begin="889" end="904"/><example:Date xmi:id="4776" sofa="1" begin="999" end="1004"/><example:Date xmi:id="4784" sofa="1" begin="1213" end="1224"/><example:Date xmi:id="4792" sofa="1" begin="1396" end="1405"/><example:Pages xmi:id="4800" sofa="1" begin="168" end="180"/><example:Publisher xmi:id="4808" sofa="1" begin="638" end="648"/><example:Institution xmi:id="4816" sofa="1" begin="338" end="400"/><example:Institution xmi:id="4824" sofa="1" begin="832" end="860"/><example:Institution xmi:id="4832" sofa="1" begin="1175" end="1210"/><example:Institution xmi:id="4840" sofa="1" begin="1333" end="1393"/><example:Title xmi:id="4848" sofa="1" begin="24" end="78"/><example:Title xmi:id="4856" sofa="1" begin="279" end="315"/><example:Title xmi:id="4864" sofa="1" begin="493" end="556"/><example:Title xmi:id="4872" sofa="1" begin="684" end="793"/><example:Title xmi:id="4880" sofa="1" begin="946" end="982"/><example:Title xmi:id="4888" sofa="1" begin="1084" end="1137"/><example:Title xmi:id="4896" sofa="1" begin="1251" end="1280"/><example:Booktitle xmi:id="4904" sofa="1" begin="81" end="165"/><example:Booktitle xmi:id="4912" sofa="1" begin="559" end="635"/><example:Location xmi:id="4920" sofa="1" begin="183" end="201"/><example:Location xmi:id="4928" sofa="1" begin="863" end="886"/><example:Tech xmi:id="4936" sofa="1" begin="318" end="335"/><example:Tech xmi:id="4944" sofa="1" begin="796" end="829"/><example:Tech xmi:id="4952" sofa="1" begin="985" end="996"/><example:Tech xmi:id="4960" sofa="1" begin="1140" end="1172"/><example:Tech xmi:id="4968" sofa="1" begin="1283" end="1330"/><cas:View sofa="1" members="8 4688 4696 4704 4712 4720 4728 4736 4744 4752 4760 4768 4776 4784 4792 4800 4808 4816 4824 4832 4840 4848 4856 4864 4872 4880 4888 4896 4904 4912 4920 4928 4936 4944 4952 4960 4968"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/25.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/25.txt.xmi.xmi
deleted file mode 100644
index 75342fb..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/25.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; K. Kennedy, K. S. McKinley, and C. Tseng.   Analysis and transformation in an interactive parallel programming tool.   Concurrency: Practice &amp; Experience,   5(7):   575--602,   October 1993. &#10; V. Govindu and C. Shekhar.   Alignment using distributions of local geometric properties.   IEEE Transactions on Pattern Analysis and Machine Intelligence,   21(10):   1031–1043,   October 1999. &#10; B. Clifford Neuman and Theodore Ts'o.   Kerberos: an authentication service for computer networks.   IEEE Communications,   32(9):   33-38,   September 1994. &#10; R. Bergamaschi, S. Bhattacharya, R. Wagner, C. Fellenz, M. Muhlada, W. Lee, F. White, and J.-M. Daveau.   Automating the design of SoCs using cores.   IEEE Design &amp; Test of Computers,   18(5):   32--45,   2001. &#10; S. Even and R. E. Tarjan.   Network flow and testing graph connectivity.   SIAM J. on Computing,   4:   507--518,   1975. &#10; P. A. G. Sivilotti.   Specifying and testing the progress properties of distributed components.   May 1999.   21st International Conference on Software Engineering ICSE. &#10; B. P. Leonard.   The ULTIMATE conservative dierence scheme applied to unsteady onedimensional advection.   Comput. Methods Appl. Mech. Engrg.,   88:   17-74,   1991. &#10; M. Kass, A. Witkin, and D. Terzopoulus.   Snakes: Active contour models.   International Journal of Computer Vision,   1(4):   321--331,   1987. &#10; G. A. Kabatyanskii and V. I. Levenshtein.   Bounds for packings on a sphere and in space.   Problems of Information Transmission,   14(1):   1-17,   1978. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1537" language="x-unspecified"/><example:Author xmi:id="6201" sofa="1" begin="7" end="48"/><example:Author xmi:id="6209" sofa="1" begin="200" end="226"/><example:Author xmi:id="6217" sofa="1" begin="397" end="434"/><example:Author xmi:id="6225" sofa="1" begin="557" end="660"/><example:Author xmi:id="6233" sofa="1" begin="770" end="795"/><example:Author xmi:id="6241" sofa="1" begin="894" end="913"/><example:Author xmi:id="6249" sofa="1" begin="1066" end="1080"/><example:Author xmi:id="6257" sofa="1" begin="1234" end="1273"/><example:Author xmi:id="6265" sofa="1" begin="1381" end="1422"/><example:Date xmi:id="6273" sofa="1" begin="184" end="197"/><example:Date xmi:id="6281" sofa="1" begin="381" end="394"/><example:Date xmi:id="6289" sofa="1" begin="539" end="554"/><example:Date xmi:id="6297" sofa="1" begin="762" end="767"/><example:Date xmi:id="6305" sofa="1" begin="886" end="891"/><example:Date xmi:id="6313" sofa="1" begin="992" end="1001"/><example:Date xmi:id="6321" sofa="1" begin="1226" end="1231"/><example:Date xmi:id="6329" sofa="1" begin="1373" end="1378"/><example:Date xmi:id="6337" sofa="1" begin="1530" end="1535"/><example:Pages xmi:id="6345" sofa="1" begin="172" end="181"/><example:Pages xmi:id="6353" sofa="1" begin="368" end="378"/><example:Pages xmi:id="6361" sofa="1" begin="530" end="536"/><example:Pages xmi:id="6369" sofa="1" begin="752" end="759"/><example:Pages xmi:id="6377" sofa="1" begin="874" end="883"/><example:Pages xmi:id="6385" sofa="1" begin="1217" end="1223"/><example:Pages xmi:id="6393" sofa="1" begin="1361" end="1370"/><example:Pages xmi:id="6401" sofa="1" begin="1522" end="1527"/><example:Volume xmi:id="6409" sofa="1" begin="164" end="169"/><example:Volume xmi:id="6417" sofa="1" begin="358" end="365"/><example:Volume xmi:id="6425" sofa="1" begin="521" end="527"/><example:Volume xmi:id="6433" sofa="1" begin="743" end="749"/><example:Volume xmi:id="6441" sofa="1" begin="869" end="871"/><example:Volume xmi:id="6449" sofa="1" begin="1211" end="1214"/><example:Volume xmi:id="6457" sofa="1" begin="1353" end="1358"/><example:Volume xmi:id="6465" sofa="1" begin="1513" end="1519"/><example:Title xmi:id="6473" sofa="1" begin="51" end="123"/><example:Title xmi:id="6481" sofa="1" begin="229" end="289"/><example:Title xmi:id="6489" sofa="1" begin="437" end="495"/><example:Title xmi:id="6497" sofa="1" begin="663" end="705"/><example:Title xmi:id="6505" sofa="1" begin="798" end="842"/><example:Title xmi:id="6513" sofa="1" begin="916" end="989"/><example:Title xmi:id="6521" sofa="1" begin="1083" end="1170"/><example:Title xmi:id="6529" sofa="1" begin="1276" end="1306"/><example:Title xmi:id="6537" sofa="1" begin="1425" end="1470"/><example:Booktitle xmi:id="6545" sofa="1" begin="1004" end="1063"/><example:Journal xmi:id="6553" sofa="1" begin="126" end="161"/><example:Journal xmi:id="6561" sofa="1" begin="292" end="355"/><example:Journal xmi:id="6569" sofa="1" begin="498" end="518"/><example:Journal xmi:id="6577" sofa="1" begin="708" end="740"/><example:Journal xmi:id="6585" sofa="1" begin="845" end="866"/><example:Journal xmi:id="6593" sofa="1" begin="1173" end="1208"/><example:Journal xmi:id="6601" sofa="1" begin="1309" end="1350"/><example:Journal xmi:id="6609" sofa="1" begin="1473" end="1510"/><cas:View sofa="1" members="8 6201 6209 6217 6225 6233 6241 6249 6257 6265 6273 6281 6289 6297 6305 6313 6321 6329 6337 6345 6353 6361 6369 6377 6385 6393 6401 6409 6417 6425 6433 6441 6449 6457 6465 6473 6481 6489 6497 6505 6513 6521 6529 6537 6545 6553 6561 6569 6577 6585 6593 6601 6609"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/26.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/26.txt.xmi.xmi
deleted file mode 100644
index ead0a33..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/26.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; M. J. Zekauskas, W. A. Sawdon, and B. N. Bershad.   Software write detection for distributed shared memory.   In Proceedings of the First USENIX Symposium on Operating System Design and Implementation,   pages 87-100,   November 1994.   27 &#10; Y. Breitbart, A. Silberschatz, and G. R. Thompson.   An approach to recovery management in a multidatabase system.   The VLDB Journal,   1(11),   July 1992. &#10; M. Kitsuregawa, H. Tanaka, and T. Moto-oka.   Application of hash to data base machine and its architecture.   New Generation Computing,   1(1),   1983. &#10; M.C. Johnson and K. Roy.   Datapath scheduling with multiple supply voltages and level converters.   ACM Transactions on Design Automation of Electronic Systems,   18 (no 3),   1997. &#10; A. Romanow and S. Floyd.   The Dynamics of TCP Traffic over ATM Networks.   IEEE Journal on Selected Areas in Communication,   13(4),   May 1995. &#10; I. Lee, P. Bremond-Gregoire, and R. Gerber.   A Process Algebraic Approach to the Specification and Analysis of Resource-Bound Real-Time Systems.   IEEE Proceedings,   82(1),   January 1994. &#10; A. V. Aho, R. Sethi, and J. Ullman.   Compilers: Principles, Techniques, and Tools.   Addison-Wesley,   Reading, MA,   second edition,   1986. &#10; R. B. Kieburtz, B. Agapiev and J. Hook.   Three Monads for Continuations.   In Proceedings of the ACM SIGPLAN Workshop on Continuations,   Department of Computer Science, Stanford University,   Report No. STAN-CS-92-1462,   June 1992. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1470" language="x-unspecified"/><example:Author xmi:id="5765" sofa="1" begin="7" end="56"/><example:Author xmi:id="5773" sofa="1" begin="249" end="299"/><example:Author xmi:id="5781" sofa="1" begin="408" end="451"/><example:Author xmi:id="5789" sofa="1" begin="563" end="587"/><example:Author xmi:id="5797" sofa="1" begin="748" end="772"/><example:Author xmi:id="5805" sofa="1" begin="896" end="939"/><example:Author xmi:id="5813" sofa="1" begin="1089" end="1124"/><example:Author xmi:id="5821" sofa="1" begin="1234" end="1273"/><example:Date xmi:id="5829" sofa="1" begin="227" end="241"/><example:Date xmi:id="5837" sofa="1" begin="395" end="405"/><example:Date xmi:id="5845" sofa="1" begin="555" end="560"/><example:Date xmi:id="5853" sofa="1" begin="740" end="745"/><example:Date xmi:id="5861" sofa="1" begin="884" end="893"/><example:Date xmi:id="5869" sofa="1" begin="1073" end="1086"/><example:Date xmi:id="5877" sofa="1" begin="1226" end="1231"/><example:Date xmi:id="5885" sofa="1" begin="1458" end="1468"/><example:Pages xmi:id="5893" sofa="1" begin="211" end="224"/><example:Pages xmi:id="5901" sofa="1" begin="244" end="246"/><example:Publisher xmi:id="5909" sofa="1" begin="1175" end="1190"/><example:Institution xmi:id="5917" sofa="1" begin="1373" end="1425"/><example:Volume xmi:id="5925" sofa="1" begin="386" end="392"/><example:Volume xmi:id="5933" sofa="1" begin="547" end="552"/><example:Volume xmi:id="5941" sofa="1" begin="727" end="737"/><example:Volume xmi:id="5949" sofa="1" begin="875" end="881"/><example:Volume xmi:id="5957" sofa="1" begin="1064" end="1070"/><example:Title xmi:id="5965" sofa="1" begin="59" end="114"/><example:Title xmi:id="5973" sofa="1" begin="302" end="363"/><example:Title xmi:id="5981" sofa="1" begin="454" end="516"/><example:Title xmi:id="5989" sofa="1" begin="590" end="661"/><example:Title xmi:id="5997" sofa="1" begin="775" end="821"/><example:Title xmi:id="6005" sofa="1" begin="942" end="1041"/><example:Title xmi:id="6013" sofa="1" begin="1127" end="1172"/><example:Title xmi:id="6021" sofa="1" begin="1276" end="1307"/><example:Booktitle xmi:id="6029" sofa="1" begin="117" end="208"/><example:Booktitle xmi:id="6037" sofa="1" begin="1310" end="1370"/><example:Journal xmi:id="6045" sofa="1" begin="366" end="383"/><example:Journal xmi:id="6053" sofa="1" begin="519" end="544"/><example:Journal xmi:id="6061" sofa="1" begin="664" end="724"/><example:Journal xmi:id="6069" sofa="1" begin="824" end="872"/><example:Journal xmi:id="6077" sofa="1" begin="1044" end="1061"/><example:Location xmi:id="6085" sofa="1" begin="1193" end="1205"/><example:Tech xmi:id="6093" sofa="1" begin="1428" end="1455"/><cas:View sofa="1" members="8 5765 5773 5781 5789 5797 5805 5813 5821 5829 5837 5845 5853 5861 5869 5877 5885 5893 5901 5909 5917 5925 5933 5941 5949 5957 5965 5973 5981 5989 5997 6005 6013 6021 6029 6037 6045 6053 6061 6069 6077 6085 6093"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/half2/27.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/half2/27.txt.xmi.xmi
deleted file mode 100644
index e129473..0000000
--- a/trunk/example-projects/TextRulerExample/data/half2/27.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; J.D. Choi and S. L. Min.   Race method frontier: reproducing races in parallel-program debugging.   Proceedings of Third ACM SIGPLAN Symposium on Principles Practice of Parallel Processing,   April 1991 &#10; R. Kadia.   Issues encountered in building a flexible software development environment: Lessons learned from the Arcadia project.   In Proceedings of ACM SIGSOFT '92: Conference Fifth Symposium on Software Development Environments,   December 1999 &#10; R. Farrow and A. Stanculescu.   A VHDL compiler based on attribute grammars.   In Proceedings of the SIGPLAN '89 Conference on Programming Language Design Implementation,   pages 120-130,   1989 &#10; K.L. Clarkson.   A Las Vegas algorithm for linear programming when the dimension is small.   In Proceedings 29th IEEE Syrup on Foundations of Computer Science,   pages 452-456,   1988 &#10; J. Buhler and M. Tompa.   Finding motifs using random projections.   In Proceedings of the Fifth Annual International Conference on Computational Molecular Biology RECOMB-01,   pages 69-76,   Montreal, Canada,   April 2001   ACM Press. &#10; D. Agrawal, A. El Abbadi, A. Singh and T. Yurek.   Efficient View Maintenance at Data Warehouses.   In proceedings of the 1997 ACM international conference on Management of Data,   pages 417-427,   May 1997 &#10; C. Consel and F. Noel.   A General Approach for Run-Time Specialization and its Application to C.   In Conference Record of the 23rd Symposium on Principles of Programming Languages,   pages 145-156,   Jan. 1996 &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1505" language="x-unspecified"/><example:Author xmi:id="5242" sofa="1" begin="7" end="31"/><example:Author xmi:id="5250" sofa="1" begin="212" end="221"/><example:Author xmi:id="5258" sofa="1" begin="462" end="491"/><example:Author xmi:id="5266" sofa="1" begin="659" end="673"/><example:Author xmi:id="5274" sofa="1" begin="845" end="868"/><example:Author xmi:id="5282" sofa="1" begin="1083" end="1131"/><example:Author xmi:id="5290" sofa="1" begin="1292" end="1314"/><example:Date xmi:id="5298" sofa="1" begin="199" end="209"/><example:Date xmi:id="5306" sofa="1" begin="446" end="459"/><example:Date xmi:id="5314" sofa="1" begin="652" end="656"/><example:Date xmi:id="5322" sofa="1" begin="838" end="842"/><example:Date xmi:id="5330" sofa="1" begin="1057" end="1067"/><example:Date xmi:id="5338" sofa="1" begin="1281" end="1289"/><example:Date xmi:id="5346" sofa="1" begin="1494" end="1503"/><example:Pages xmi:id="5354" sofa="1" begin="635" end="649"/><example:Pages xmi:id="5362" sofa="1" begin="821" end="835"/><example:Pages xmi:id="5370" sofa="1" begin="1022" end="1034"/><example:Pages xmi:id="5378" sofa="1" begin="1264" end="1278"/><example:Pages xmi:id="5386" sofa="1" begin="1477" end="1491"/><example:Publisher xmi:id="5394" sofa="1" begin="1070" end="1080"/><example:Title xmi:id="5402" sofa="1" begin="34" end="104"/><example:Title xmi:id="5410" sofa="1" begin="224" end="341"/><example:Title xmi:id="5418" sofa="1" begin="494" end="538"/><example:Title xmi:id="5426" sofa="1" begin="676" end="749"/><example:Title xmi:id="5434" sofa="1" begin="871" end="911"/><example:Title xmi:id="5442" sofa="1" begin="1134" end="1180"/><example:Title xmi:id="5450" sofa="1" begin="1317" end="1389"/><example:Booktitle xmi:id="5458" sofa="1" begin="107" end="196"/><example:Booktitle xmi:id="5466" sofa="1" begin="344" end="443"/><example:Booktitle xmi:id="5474" sofa="1" begin="541" end="632"/><example:Booktitle xmi:id="5482" sofa="1" begin="752" end="818"/><example:Booktitle xmi:id="5490" sofa="1" begin="914" end="1019"/><example:Booktitle xmi:id="5498" sofa="1" begin="1183" end="1261"/><example:Booktitle xmi:id="5506" sofa="1" begin="1392" end="1474"/><example:Location xmi:id="5514" sofa="1" begin="1037" end="1054"/><cas:View sofa="1" members="8 5242 5250 5258 5266 5274 5282 5290 5298 5306 5314 5322 5330 5338 5346 5354 5362 5370 5378 5386 5394 5402 5410 5418 5426 5434 5442 5450 5458 5466 5474 5482 5490 5498 5506 5514"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/single/0.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/single/0.txt.xmi.xmi
deleted file mode 100644
index 455f0fe..0000000
--- a/trunk/example-projects/TextRulerExample/data/single/0.txt.xmi.xmi
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:example2="http:///uima/textmarker/example.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Harper, M. P., &amp; Helzerman, R. A.   (1995b).   Managing multiple knowledge sources in constraint-based parsing of spoken language.   Fundamenta Informaticae,   23 (2, 3, 4),   303-353. &#10; Puterman, M. L.   (1994).   Markov Decision Problems.   Wiley,   New York. &#10; Blumer, A., Ehrenfeucht, A., Haussler, D., &amp; Warmuth, M.   (1989).   Learnability and the Vapnik-Chervonenkis dimension.   Journal of the ACM,   36 (4),   929-965. &#10; Forbus, K. D.   (1989).   Introducing Actions in Qualitative Simulation.   Proceedings of IJCAI-89,   1273-1278. &#10; LeBlanc, M., &amp; Tibshirani, R.   (1993).   Combining estimates in regression and classification.   Tech. rep.,   Department of Statistics, U. of Toronto. &#10; Golomb, S., &amp; Baumert, L.   (1965).   Backtrack programming.   J. ACM,   12,   516-524. &#10; Guziec, A., &amp; Ayache, N.   (1992).   Smoothing and matching of 3-d space curves.   Visualization in Biomedical Computing, Proc. SPIE,   1808,   259-273. &#10; Hawley, D. K., &amp; McClure, W. R.   (1983).   Compilation and analysis of escherichia coli promoter DNA sequences.   Nucleic Acids Research,   11 (8),   2237-2255. &#10; McKinsey, J. C. C.   (1943).   The decision problem for some classes of sentences without quantifier.   Journal of Symbolic Logic,   8 (3),   61-76. &#10; Dietterich, T. G., &amp; Bakiri, G.   (1995).   Solving multiclass learning problems via error-correcting output codes.   Journal of Artificial Intelligence Research,   2,   263-286. &#10; Soskin, William F.   (1963).   Verbal Interactions in a Young Married Couple.   University of Kansas Publications,   Lawrence, Kansas. &#10; Dechter, R.   (1992).   From local to global consistency.   Artificial Intelligence,   55,   87-107. &#10; Fikes, R. E., Hart, P. E., &amp; Nilsson, N. J.   (1972).   Learning and executing generalized robot plans.   Artificial Intelligence,   3,   251-288. &#10; Rosenbloom, P. S., Laird, J. E., &amp; Newell, A.   (1988).   The chunking of skill and knowledge. &#10; Spirtes, P., Glymour, C., &amp; Scheines, R.   (1993).   Causation, Prediction, and Search.   Springer-Verlag,   New York. &#10; Bunke, H., &amp; Allermann, G.   (1983).   Inexact graph matching for structural pattern recognition.   Pattern Recognition Letters,   1 (4),   245-253. &#10; Rubinstein, A.   (1982).   Perfect equilibrium in a bargaining model.   Econometrica,   50 (1),   97-109. &#10; Buntine, W.   (1994).   Operations for learning with graphical models.   Journal of Artificial Intelligence Research,   2,   159-225. &#10; Friedman, J. H., &amp; Stuetzle, W.   (1981).   Projection pursuit regression.   Journal of the American Statistics Association,   76,   817-823. &#10; Whitley, D., &amp; Gruau, F.   (1993).   Adding learning to the cellular development of neural networks: Evolution and the Baldwin effect.   Evolutionary Computation,   1,   213-233. &#10;"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2774" language="x-unspecified"/><example:Author xmi:id="11814" sofa="1" begin="7" end="40"/><example:Author xmi:id="11822" sofa="1" begin="194" end="209"/><example:Author xmi:id="11830" sofa="1" begin="271" end="327"/><example:Author xmi:id="11838" sofa="1" begin="437" end="450"/><example:Author xmi:id="11846" sofa="1" begin="552" end="581"/><example:Author xmi:id="11854" sofa="1" begin="707" end="732"/><example:Author xmi:id="11862" sofa="1" begin="797" end="821"/><example:Author xmi:id="11870" sofa="1" begin="952" end="983"/><example:Author xmi:id="11878" sofa="1" begin="1116" end="1134"/><example:Author xmi:id="11886" sofa="1" begin="1267" end="1298"/><example:Author xmi:id="11894" sofa="1" begin="1448" end="1466"/><example:Author xmi:id="11902" sofa="1" begin="1585" end="1596"/><example:Author xmi:id="11910" sofa="1" begin="1688" end="1731"/><example:Author xmi:id="11918" sofa="1" begin="1837" end="1882"/><example:Author xmi:id="11926" sofa="1" begin="1934" end="1974"/><example:Author xmi:id="11934" sofa="1" begin="2055" end="2081"/><example:Author xmi:id="11942" sofa="1" begin="2206" end="2220"/><example:Author xmi:id="11950" sofa="1" begin="2314" end="2325"/><example:Author xmi:id="11958" sofa="1" begin="2450" end="2481"/><example:Author xmi:id="11966" sofa="1" begin="2594" end="2618"/><example:Date xmi:id="11974" sofa="1" begin="43" end="51"/><example:Date xmi:id="11982" sofa="1" begin="212" end="219"/><example:Date xmi:id="11990" sofa="1" begin="330" end="337"/><example:Date xmi:id="11998" sofa="1" begin="453" end="460"/><example:Date xmi:id="12006" sofa="1" begin="584" end="591"/><example:Date xmi:id="12014" sofa="1" begin="735" end="742"/><example:Date xmi:id="12022" sofa="1" begin="824" end="831"/><example:Date xmi:id="12030" sofa="1" begin="986" end="993"/><example:Date xmi:id="12038" sofa="1" begin="1137" end="1144"/><example:Date xmi:id="12046" sofa="1" begin="1301" end="1308"/><example:Date xmi:id="12054" sofa="1" begin="1469" end="1476"/><example:Date xmi:id="12062" sofa="1" begin="1599" end="1606"/><example:Date xmi:id="12070" sofa="1" begin="1734" end="1741"/><example:Date xmi:id="12078" sofa="1" begin="1885" end="1892"/><example:Date xmi:id="12086" sofa="1" begin="1977" end="1984"/><example:Date xmi:id="12094" sofa="1" begin="2084" end="2091"/><example:Date xmi:id="12102" sofa="1" begin="2223" end="2230"/><example:Date xmi:id="12110" sofa="1" begin="2328" end="2335"/><example:Date xmi:id="12118" sofa="1" begin="2484" end="2491"/><example:Date xmi:id="12126" sofa="1" begin="2621" end="2628"/><example:Pages xmi:id="12134" sofa="1" begin="183" end="191"/><example:Pages xmi:id="12142" sofa="1" begin="426" end="434"/><example:Pages xmi:id="12150" sofa="1" begin="539" end="549"/><example:Pages xmi:id="12158" sofa="1" begin="786" end="794"/><example:Pages xmi:id="12166" sofa="1" begin="941" end="949"/><example:Pages xmi:id="12174" sofa="1" begin="1103" end="1113"/><example:Pages xmi:id="12182" sofa="1" begin="1258" end="1264"/><example:Pages xmi:id="12190" sofa="1" begin="1437" end="1445"/><example:Pages xmi:id="12198" sofa="1" begin="1678" end="1685"/><example:Pages xmi:id="12206" sofa="1" begin="1826" end="1834"/><example:Pages xmi:id="12214" sofa="1" begin="2195" end="2203"/><example:Pages xmi:id="12222" sofa="1" begin="2304" end="2311"/><example:Pages xmi:id="12230" sofa="1" begin="2439" end="2447"/><example:Pages xmi:id="12238" sofa="1" begin="2583" end="2591"/><example:Pages xmi:id="12246" sofa="1" begin="2764" end="2772"/><example:Publisher xmi:id="12254" sofa="1" begin="250" end="256"/><example:Publisher xmi:id="12262" sofa="1" begin="1528" end="1562"/><example:Publisher xmi:id="12270" sofa="1" begin="2024" end="2040"/><example:Institution xmi:id="12278" sofa="1" begin="664" end="704"/><example:Volume xmi:id="12286" sofa="1" begin="167" end="180"/><example:Volume xmi:id="12294" sofa="1" begin="416" end="423"/><example:Volume xmi:id="12302" sofa="1" begin="780" end="783"/><example:Volume xmi:id="12310" sofa="1" begin="933" end="938"/><example:Volume xmi:id="12318" sofa="1" begin="1093" end="1100"/><example:Volume xmi:id="12326" sofa="1" begin="1249" end="1255"/><example:Volume xmi:id="12334" sofa="1" begin="1432" end="1434"/><example:Volume xmi:id="12342" sofa="1" begin="1672" end="1675"/><example:Volume xmi:id="12350" sofa="1" begin="1821" end="1823"/><example:Volume xmi:id="12358" sofa="1" begin="2186" end="2192"/><example:Volume xmi:id="12366" sofa="1" begin="2294" end="2301"/><example:Volume xmi:id="12374" sofa="1" begin="2434" end="2436"/><example:Volume xmi:id="12382" sofa="1" begin="2577" end="2580"/><example:Volume xmi:id="12390" sofa="1" begin="2759" end="2761"/><example:Title xmi:id="12398" sofa="1" begin="54" end="137"/><example:Title xmi:id="12406" sofa="1" begin="222" end="247"/><example:Title xmi:id="12414" sofa="1" begin="340" end="391"/><example:Title xmi:id="12422" sofa="1" begin="463" end="509"/><example:Title xmi:id="12430" sofa="1" begin="594" end="647"/><example:Title xmi:id="12438" sofa="1" begin="745" end="767"/><example:Title xmi:id="12446" sofa="1" begin="834" end="877"/><example:Title xmi:id="12454" sofa="1" begin="996" end="1064"/><example:Title xmi:id="12462" sofa="1" begin="1147" end="1217"/><example:Title xmi:id="12470" sofa="1" begin="1311" end="1382"/><example:Title xmi:id="12478" sofa="1" begin="1479" end="1525"/><example:Title xmi:id="12486" sofa="1" begin="1609" end="1642"/><example:Title xmi:id="12494" sofa="1" begin="1744" end="1791"/><example:Title xmi:id="12502" sofa="1" begin="1895" end="1931"/><example:Title xmi:id="12510" sofa="1" begin="1987" end="2021"/><example:Title xmi:id="12518" sofa="1" begin="2094" end="2152"/><example:Title xmi:id="12526" sofa="1" begin="2233" end="2275"/><example:Title xmi:id="12534" sofa="1" begin="2338" end="2384"/><example:Title xmi:id="12542" sofa="1" begin="2494" end="2524"/><example:Title xmi:id="12550" sofa="1" begin="2631" end="2728"/><example:Booktitle xmi:id="12558" sofa="1" begin="512" end="536"/><example:Journal xmi:id="12566" sofa="1" begin="140" end="164"/><example:Journal xmi:id="12574" sofa="1" begin="394" end="413"/><example:Journal xmi:id="12582" sofa="1" begin="770" end="777"/><example:Journal xmi:id="12590" sofa="1" begin="880" end="930"/><example:Journal xmi:id="12598" sofa="1" begin="1067" end="1090"/><example:Journal xmi:id="12606" sofa="1" begin="1220" end="1246"/><example:Journal xmi:id="12614" sofa="1" begin="1385" end="1429"/><example:Journal xmi:id="12622" sofa="1" begin="1645" end="1669"/><example:Journal xmi:id="12630" sofa="1" begin="1794" end="1818"/><example:Journal xmi:id="12638" sofa="1" begin="2155" end="2183"/><example:Journal xmi:id="12646" sofa="1" begin="2278" end="2291"/><example:Journal xmi:id="12654" sofa="1" begin="2387" end="2431"/><example:Journal xmi:id="12662" sofa="1" begin="2527" end="2574"/><example:Journal xmi:id="12670" sofa="1" begin="2731" end="2756"/><example:Location xmi:id="12678" sofa="1" begin="259" end="268"/><example:Location xmi:id="12686" sofa="1" begin="1565" end="1582"/><example:Location xmi:id="12694" sofa="1" begin="2043" end="2052"/><example:Tech xmi:id="12702" sofa="1" begin="650" end="661"/><cas:View sofa="1" members="8 11814 11822 11830 11838 11846 11854 11862 11870 11878 11886 11894 11902 11910 11918 11926 11934 11942 11950 11958 11966 11974 11982 11990 11998 12006 12014 12022 12030 12038 12046 12054 12062 12070 12078 12086 12094 12102 12110 12118 12126 12134 12142 12150 12158 12166 12174 12182 12190 12198 12206 12214 12222 12230 12238 12246 12254 12262 12270 12278 12286 12294 12302 12310 12318 12326 12334 12342 12350 12358 12366 12374 12382 12390 12398 12406 12414 12422 12430 12438 12446 12454 12462 12470 12478 12486 12494 12502 12510 12518 12526 12534 12542 12550 12558 12566 12574 12582 12590 12598 12606 12614 12622 12630 12638 12646 12654 12662 12670 12678 12686 12694 12702"/></xmi:XMI>
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/data/singleError/0.txt.xmi.xmi b/trunk/example-projects/TextRulerExample/data/singleError/0.txt.xmi.xmi
deleted file mode 100644
index 8a3b954..0000000
--- a/trunk/example-projects/TextRulerExample/data/singleError/0.txt.xmi.xmi
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<xmi:XMI xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/uima/ruta/type.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:tcas="http:///uima/tcas.ecore" xmlns:example="http:///uima/ruta/example.ecore" xmi:version="2.0">

-    <cas:NULL xmi:id="0"/>

-    <cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="CORA:&#10; Harper, M. P., &amp; Helzerman, R. A.   (1995b).   Managing multiple knowledge sources in constraint-based parsing of spoken language.   Fundamenta Informaticae,   23 (2, 3, 4),   303-353. &#10; Puterman, M. L.   (1994).   Markov Decision Problems.   Wiley,   New York. &#10; Blumer, A., Ehrenfeucht, A., Haussler, D., &amp; Warmuth, M.   (1989).   Learnability and the Vapnik-Chervonenkis dimension.   Journal of the ACM,   36 (4),   929-965. &#10; Forbus, K. D.   (1989).   Introducing Actions in Qualitative Simulation.   Proceedings of IJCAI-89,   1273-1278. &#10; LeBlanc, M., &amp; Tibshirani, R.   (1993).   Combining estimates in regression and classification.   Tech. rep.,   Department of Statistics, U. of Toronto. &#10; Golomb, S., &amp; Baumert, L.   (1965).   Backtrack programming.   J. ACM,   12,   516-524. &#10; Guziec, A., &amp; Ayache, N.   (1992).   Smoothing and matching of 3-d space curves.   Visualization in Biomedical Computing, Proc. SPIE,   1808,   259-273. &#10; Hawley, D. K., &amp; McClure, W. R.   (1983).   Compilation and analysis of escherichia coli promoter DNA sequences.   Nucleic Acids Research,   11 (8),   2237-2255. &#10; McKinsey, J. C. C.   (1943).   The decision problem for some classes of sentences without quantifier.   Journal of Symbolic Logic,   8 (3),   61-76. &#10; Dietterich, T. G., &amp; Bakiri, G.   (1995).   Solving multiclass learning problems via error-correcting output codes.   Journal of Artificial Intelligence Research,   2,   263-286. &#10; Soskin, William F.   (1963).   Verbal Interactions in a Young Married Couple.   University of Kansas Publications,   Lawrence, Kansas. &#10; Dechter, R.   (1992).   From local to global consistency.   Artificial Intelligence,   55,   87-107. &#10; Fikes, R. E., Hart, P. E., &amp; Nilsson, N. J.   (1972).   Learning and executing generalized robot plans.   Artificial Intelligence,   3,   251-288. &#10; Rosenbloom, P. S., Laird, J. E., &amp; Newell, A.   (1988).   The chunking of skill and knowledge. &#10; Spirtes, P., Glymour, C., &amp; Scheines, R.   (1993).   Causation, Prediction, and Search.   Springer-Verlag,   New York. &#10; Bunke, H., &amp; Allermann, G.   (1983).   Inexact graph matching for structural pattern recognition.   Pattern Recognition Letters,   1 (4),   245-253. &#10; Rubinstein, A.   (1982).   Perfect equilibrium in a bargaining model.   Econometrica,   50 (1),   97-109. &#10; Buntine, W.   (1994).   Operations for learning with graphical models.   Journal of Artificial Intelligence Research,   2,   159-225. &#10; Friedman, J. H., &amp; Stuetzle, W.   (1981).   Projection pursuit regression.   Journal of the American Statistics Association,   76,   817-823. &#10; Whitley, D., &amp; Gruau, F.   (1993).   Adding learning to the cellular development of neural networks: Evolution and the Baldwin effect.   Evolutionary Computation,   1,   213-233. &#10;"/>

-    <tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="2774" language="x-unspecified"/>

-    <example:Author xmi:id="13" sofa="1" begin="7" end="21"/>

-    <example:Author xmi:id="17" sofa="1" begin="194" end="209"/>

-    <example:Author xmi:id="21" sofa="1" begin="271" end="313"/>

-    <example:Author xmi:id="25" sofa="1" begin="437" end="450"/>

-    <example:Author xmi:id="29" sofa="1" begin="552" end="564"/>

-    <example:Author xmi:id="33" sofa="1" begin="707" end="718"/>

-    <example:Author xmi:id="37" sofa="1" begin="797" end="808"/>

-    <example:Author xmi:id="41" sofa="1" begin="952" end="966"/>

-    <example:Author xmi:id="45" sofa="1" begin="1116" end="1134"/>

-    <example:Author xmi:id="49" sofa="1" begin="1267" end="1285"/>

-    <example:Author xmi:id="53" sofa="1" begin="1448" end="1466"/>

-    <example:Author xmi:id="57" sofa="1" begin="1585" end="1596"/>

-    <example:Author xmi:id="61" sofa="1" begin="1688" end="1714"/>

-    <example:Author xmi:id="65" sofa="1" begin="1837" end="1869"/>

-    <example:Author xmi:id="69" sofa="1" begin="1934" end="1959"/>

-    <example:Author xmi:id="73" sofa="1" begin="2055" end="2065"/>

-    <example:Author xmi:id="77" sofa="1" begin="2206" end="2220"/>

-    <example:Author xmi:id="81" sofa="1" begin="2314" end="2325"/>

-    <example:Author xmi:id="85" sofa="1" begin="2450" end="2466"/>

-    <example:Author xmi:id="89" sofa="1" begin="2594" end="2606"/>

-    <example:Date xmi:id="97" sofa="1" begin="212" end="218"/>

-    <example:Date xmi:id="101" sofa="1" begin="330" end="336"/>

-    <example:Date xmi:id="105" sofa="1" begin="453" end="459"/>

-    <example:Date xmi:id="109" sofa="1" begin="584" end="590"/>

-    <example:Date xmi:id="117" sofa="1" begin="824" end="830"/>

-    <example:Date xmi:id="121" sofa="1" begin="986" end="992"/>

-    <example:Date xmi:id="129" sofa="1" begin="1301" end="1307"/>

-    <example:Date xmi:id="133" sofa="1" begin="1469" end="1475"/>

-    <example:Date xmi:id="137" sofa="1" begin="1599" end="1605"/>

-    <example:Date xmi:id="141" sofa="1" begin="1734" end="1740"/>

-    <example:Date xmi:id="145" sofa="1" begin="1885" end="1891"/>

-    <example:Date xmi:id="149" sofa="1" begin="1977" end="1983"/>

-    <example:Date xmi:id="153" sofa="1" begin="2084" end="2090"/>

-    <example:Date xmi:id="157" sofa="1" begin="2223" end="2229"/>

-    <example:Date xmi:id="161" sofa="1" begin="2328" end="2334"/>

-    <example:Date xmi:id="165" sofa="1" begin="2484" end="2490"/>

-    <example:Date xmi:id="169" sofa="1" begin="2621" end="2627"/>

-    <example:Pages xmi:id="173" sofa="1" begin="183" end="191"/>

-    <example:Pages xmi:id="177" sofa="1" begin="426" end="434"/>

-    <example:Pages xmi:id="181" sofa="1" begin="539" end="549"/>

-    <example:Pages xmi:id="185" sofa="1" begin="786" end="794"/>

-    <example:Pages xmi:id="189" sofa="1" begin="941" end="949"/>

-    <example:Pages xmi:id="193" sofa="1" begin="1103" end="1113"/>

-    <example:Pages xmi:id="197" sofa="1" begin="1258" end="1264"/>

-    <example:Pages xmi:id="201" sofa="1" begin="1437" end="1445"/>

-    <example:Pages xmi:id="205" sofa="1" begin="1678" end="1685"/>

-    <example:Pages xmi:id="209" sofa="1" begin="1826" end="1834"/>

-    <example:Pages xmi:id="213" sofa="1" begin="2195" end="2203"/>

-    <example:Pages xmi:id="217" sofa="1" begin="2304" end="2311"/>

-    <example:Pages xmi:id="221" sofa="1" begin="2439" end="2447"/>

-    <example:Pages xmi:id="225" sofa="1" begin="2583" end="2591"/>

-    <example:Pages xmi:id="229" sofa="1" begin="2764" end="2772"/>

-    <example:Publisher xmi:id="233" sofa="1" begin="250" end="256"/>

-    <example:Publisher xmi:id="237" sofa="1" begin="1528" end="1562"/>

-    <example:Publisher xmi:id="241" sofa="1" begin="2024" end="2040"/>

-    <example:Institution xmi:id="245" sofa="1" begin="664" end="704"/>

-    <example:Volume xmi:id="249" sofa="1" begin="167" end="180"/>

-    <example:Volume xmi:id="253" sofa="1" begin="416" end="423"/>

-    <example:Volume xmi:id="257" sofa="1" begin="780" end="783"/>

-    <example:Volume xmi:id="261" sofa="1" begin="933" end="938"/>

-    <example:Volume xmi:id="265" sofa="1" begin="1093" end="1100"/>

-    <example:Volume xmi:id="269" sofa="1" begin="1249" end="1255"/>

-    <example:Volume xmi:id="273" sofa="1" begin="1432" end="1434"/>

-    <example:Volume xmi:id="277" sofa="1" begin="1672" end="1675"/>

-    <example:Volume xmi:id="281" sofa="1" begin="1821" end="1823"/>

-    <example:Volume xmi:id="285" sofa="1" begin="2186" end="2192"/>

-    <example:Volume xmi:id="289" sofa="1" begin="2294" end="2301"/>

-    <example:Volume xmi:id="293" sofa="1" begin="2434" end="2436"/>

-    <example:Volume xmi:id="297" sofa="1" begin="2577" end="2580"/>

-    <example:Volume xmi:id="301" sofa="1" begin="2759" end="2761"/>

-    <example:Title xmi:id="305" sofa="1" begin="43" end="137"/>

-    <example:Title xmi:id="309" sofa="1" begin="222" end="247"/>

-    <example:Title xmi:id="313" sofa="1" begin="340" end="391"/>

-    <example:Title xmi:id="317" sofa="1" begin="463" end="509"/>

-    <example:Title xmi:id="321" sofa="1" begin="594" end="647"/>

-    <example:Title xmi:id="325" sofa="1" begin="735" end="767"/>

-    <example:Title xmi:id="329" sofa="1" begin="834" end="877"/>

-    <example:Title xmi:id="333" sofa="1" begin="996" end="1064"/>

-    <example:Title xmi:id="337" sofa="1" begin="1137" end="1217"/>

-    <example:Title xmi:id="341" sofa="1" begin="1311" end="1382"/>

-    <example:Title xmi:id="345" sofa="1" begin="1479" end="1525"/>

-    <example:Title xmi:id="349" sofa="1" begin="1609" end="1642"/>

-    <example:Title xmi:id="353" sofa="1" begin="1744" end="1791"/>

-    <example:Title xmi:id="357" sofa="1" begin="1895" end="1931"/>

-    <example:Title xmi:id="361" sofa="1" begin="1987" end="2021"/>

-    <example:Title xmi:id="365" sofa="1" begin="2094" end="2152"/>

-    <example:Title xmi:id="369" sofa="1" begin="2233" end="2275"/>

-    <example:Title xmi:id="373" sofa="1" begin="2338" end="2384"/>

-    <example:Title xmi:id="377" sofa="1" begin="2494" end="2524"/>

-    <example:Title xmi:id="381" sofa="1" begin="2631" end="2728"/>

-    <example:Booktitle xmi:id="385" sofa="1" begin="512" end="536"/>

-    <example:Journal xmi:id="389" sofa="1" begin="140" end="164"/>

-    <example:Journal xmi:id="393" sofa="1" begin="394" end="413"/>

-    <example:Journal xmi:id="397" sofa="1" begin="770" end="777"/>

-    <example:Journal xmi:id="401" sofa="1" begin="880" end="930"/>

-    <example:Journal xmi:id="405" sofa="1" begin="1067" end="1090"/>

-    <example:Journal xmi:id="409" sofa="1" begin="1220" end="1246"/>

-    <example:Journal xmi:id="413" sofa="1" begin="1385" end="1429"/>

-    <example:Journal xmi:id="417" sofa="1" begin="1645" end="1669"/>

-    <example:Journal xmi:id="421" sofa="1" begin="1794" end="1818"/>

-    <example:Journal xmi:id="425" sofa="1" begin="2155" end="2183"/>

-    <example:Journal xmi:id="429" sofa="1" begin="2278" end="2291"/>

-    <example:Journal xmi:id="433" sofa="1" begin="2387" end="2431"/>

-    <example:Journal xmi:id="437" sofa="1" begin="2527" end="2574"/>

-    <example:Journal xmi:id="441" sofa="1" begin="2731" end="2756"/>

-    <example:Location xmi:id="445" sofa="1" begin="259" end="268"/>

-    <example:Location xmi:id="449" sofa="1" begin="1565" end="1582"/>

-    <example:Location xmi:id="453" sofa="1" begin="2043" end="2052"/>

-    <example:Tech xmi:id="457" sofa="1" begin="650" end="661"/>

-    <cas:View sofa="1" members="8 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 97 101 105 109 117 121 129 133 137 141 145 149 153 157 161 165 169 173 177 181 185 189 193 197 201 205 209 213 217 221 225 229 233 237 241 245 249 253 257 261 265 269 273 277 281 285 289 293 297 301 305 309 313 317 321 325 329 333 337 341 345 349 353 357 361 365 369 373 377 381 385 389 393 397 401 405 409 413 417 421 425 429 433 437 441 445 449 453 457"/>

-</xmi:XMI>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/BasicEngine.xml b/trunk/example-projects/TextRulerExample/descriptor/BasicEngine.xml
deleted file mode 100644
index 30e8014..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/BasicEngine.xml
+++ /dev/null
@@ -1,279 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>BasicEngine</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters searchStrategy="language_fallback">

-      <configurationParameter>

-        <name>seeders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debug</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalScripts</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>profile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugWithMatches</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>statistics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalExtensions</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugOnlyFor</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptEncoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngineLoaders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>resourcePaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>defaultFilteredTypes</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>mainScript</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>removeBasics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>dynamicAnchoring</name>

-        <description>Activates dynamic anchoring (possible speed up).</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRuleElement</name>

-        <description>Activates greedy anchoring for rule elements.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRule</name>

-        <description>Activates greedy anchoring for complete rules.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>lowMemoryProfile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>createdBy</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>simpleGreedyForComposed</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalUimafitEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>strictImports</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varNames</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varValues</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>rules</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>debug</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>profile</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>debugWithMatches</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>defaultFilteredTypes</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.type.SPACE</string>

-            <string>org.apache.uima.ruta.type.BREAK</string>

-            <string>org.apache.uima.ruta.type.MARKUP</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>removeBasics</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>seeders</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>createdBy</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="BasicTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities>

-      <priorityList>

-        <type>org.apache.uima.ruta.type.RutaFrame</type>

-        <type>uima.tcas.Annotation</type>

-        <type>org.apache.uima.ruta.type.RutaBasic</type>

-      </priorityList>

-    </typePriorities>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/BasicTypeSystem.xml b/trunk/example-projects/TextRulerExample/descriptor/BasicTypeSystem.xml
deleted file mode 100644
index fea497f..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>BasicTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <imports>

-    <import location="InternalTypeSystem.xml"/>

-  </imports>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ALL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ANY</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.MARKUP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.W</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CAP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PERIOD</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.QUESTION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COMMA</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SEMICOLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WS</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NUM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPECIAL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NBSP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SPACE</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AMP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPACE</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.BREAK</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Document</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TokenSeed</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/InternalTypeSystem.xml b/trunk/example-projects/TextRulerExample/descriptor/InternalTypeSystem.xml
deleted file mode 100644
index e0e207c..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/InternalTypeSystem.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>InternalTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaBasic</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>replacement</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaOptional</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>score</name>

-          <description/>

-          <rangeTypeName>uima.cas.Double</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>applied</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>tried</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>rules</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>matched</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>delegates</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>innerApply</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>baseCondition</name>

-          <description/>

-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>matches</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>ruleAnchor</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaColoring</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>bgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>targetType</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>fgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>selected</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>value</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalsePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>original</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalseNegative</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>time</name>

-          <description/>

-          <rangeTypeName>uima.cas.Long</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaFrame</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Statistics</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>total</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>amount</name>

-          <description/>

-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>part</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TruePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>rule</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/types/Bibtex.xml b/trunk/example-projects/TextRulerExample/descriptor/types/Bibtex.xml
deleted file mode 100644
index d2591ac..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/types/Bibtex.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>Bibtex</name>

-  <description>A TypeSystem for the BibTex format.</description>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>uima.ruta.example.Author</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Title</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Institution</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Note</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Publisher</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Organization</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Volume</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Editor</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Booktitle</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Pages</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Date</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Journal</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Tech</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>uima.ruta.example.Location</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/BaseEngine.xml b/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/BaseEngine.xml
deleted file mode 100644
index e69978d..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/BaseEngine.xml
+++ /dev/null
@@ -1,335 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>Base</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/TextRulerExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/TextRulerExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\TextRulerExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="BaseTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/BaseTypeSystem.xml b/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/BaseTypeSystem.xml
deleted file mode 100644
index 2ac044f..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/BaseTypeSystem.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>BaseTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-        <import location="..\..\..\types\Bibtex.xml"/>

-    </imports>

-</typeSystemDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/FeaturesEngine.xml b/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/FeaturesEngine.xml
deleted file mode 100644
index 14452ac..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/FeaturesEngine.xml
+++ /dev/null
@@ -1,398 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-    <primitive>true</primitive>

-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-    <analysisEngineMetaData>

-        <name>BasicEngine</name>

-        <description/>

-        <version>1.0</version>

-        <vendor/>

-        <configurationParameters searchStrategy="language_fallback">

-            <configurationParameter>

-                <name>seeders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debug</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalScripts</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>profile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugWithMatches</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>statistics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalExtensions</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>debugOnlyFor</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptEncoding</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalEngineLoaders</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>resourcePaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>defaultFilteredTypes</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>mainScript</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>scriptPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>descriptorPaths</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>removeBasics</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>dynamicAnchoring</name>

-                <description>Activates dynamic anchoring (possible speed up).</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRuleElement</name>

-                <description>Activates greedy anchoring for rule elements.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>greedyRule</name>

-                <description>Activates greedy anchoring for complete rules.</description>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>lowMemoryProfile</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>createdBy</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>simpleGreedyForComposed</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>additionalUimafitEngines</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>strictImports</name>

-                <type>Boolean</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varNames</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>varValues</name>

-                <type>String</type>

-                <multiValued>true</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-            <configurationParameter>

-                <name>rules</name>

-                <type>String</type>

-                <multiValued>false</multiValued>

-                <mandatory>false</mandatory>

-            </configurationParameter>

-        </configurationParameters>

-        <configurationParameterSettings>

-            <nameValuePair>

-                <name>debug</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>profile</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>debugWithMatches</name>

-                <value>

-                    <boolean>true</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>defaultFilteredTypes</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.type.SPACE</string>

-                        <string>org.apache.uima.ruta.type.BREAK</string>

-                        <string>org.apache.uima.ruta.type.MARKUP</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>removeBasics</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>seeders</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>createdBy</name>

-                <value>

-                    <boolean>false</boolean>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>mainScript</name>

-                <value>

-                    <string>Features</string>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>scriptPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/TextRulerExample/script</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>descriptorPaths</name>

-                <value>

-                    <array>

-                        <string>D:/work/ws-tutorial/TextRulerExample/descriptor</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>resourcePaths</name>

-                <value>

-                    <array>

-                        <string>D:\work\ws-tutorial\TextRulerExample\resources</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalScripts</name>

-                <value>

-                    <array>

-                        <string>uima.ruta.example.Base</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngines</name>

-                <value>

-                    <array>

-                        <string>utils.PlainTextAnnotator</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalUimafitEngines</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalExtensions</name>

-                <value>

-                    <array>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>

-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>

-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-                    </array>

-                </value>

-            </nameValuePair>

-            <nameValuePair>

-                <name>additionalEngineLoaders</name>

-                <value>

-                    <array/>

-                </value>

-            </nameValuePair>

-        </configurationParameterSettings>

-        <typeSystemDescription>

-            <imports>

-                <import location="FeaturesTypeSystem.xml"/>

-            </imports>

-        </typeSystemDescription>

-        <typePriorities>

-            <priorityList>

-                <type>org.apache.uima.ruta.type.RutaFrame</type>

-                <type>uima.tcas.Annotation</type>

-                <type>org.apache.uima.ruta.type.RutaBasic</type>

-            </priorityList>

-        </typePriorities>

-        <fsIndexCollection/>

-        <capabilities>

-            <capability>

-                <inputs/>

-                <outputs/>

-                <languagesSupported/>

-            </capability>

-            <capability>

-                <inputs>

-                    <type>uima.ruta.example.Features.EditorMarker</type>

-                    <type>uima.ruta.example.Features.EnglishStopWord</type>

-                    <type>uima.ruta.example.Features.FirstName</type>

-                    <type>uima.ruta.example.Features.JournalVolumeMarker</type>

-                    <type>uima.ruta.example.Features.Month</type>

-                    <type>uima.ruta.example.Features.PagesMarker</type>

-                    <type>uima.ruta.example.Features.PublisherInd</type>

-                    <type>uima.ruta.example.Features.Reference</type>

-                    <type>uima.ruta.example.Features.LParen</type>

-                    <type>uima.ruta.example.Features.RParen</type>

-                    <type>uima.ruta.example.Features.YearInd</type>

-                    <type>uima.ruta.example.Features.NameLinker</type>

-                    <type>uima.ruta.example.Features.FirstNameInd</type>

-                    <type>uima.ruta.example.Features.FirstNameInitial</type>

-                    <type>uima.ruta.example.Features.SingleChar</type>

-                    <type>uima.ruta.example.Features.Quote</type>

-                    <type>uima.ruta.example.Features.QuotedStuff</type>

-                    <type>uima.ruta.example.Features.InInd</type>

-                    <type>uima.ruta.example.Features.FirstToken</type>

-                    <type>uima.ruta.example.Features.LastToken</type>

-                    <type>uima.ruta.example.Features.NumPeriod</type>

-                    <type>uima.ruta.example.Features.NumComma</type>

-                    <type>uima.ruta.example.Features.NumColon</type>

-                    <type>uima.ruta.example.Features.PeriodSep</type>

-                    <type>uima.ruta.example.Features.CommaSep</type>

-                    <type>uima.ruta.example.Features.ColonSep</type>

-                </inputs>

-                <outputs>

-                    <type>uima.ruta.example.Features.EditorMarker</type>

-                    <type>uima.ruta.example.Features.EnglishStopWord</type>

-                    <type>uima.ruta.example.Features.FirstName</type>

-                    <type>uima.ruta.example.Features.JournalVolumeMarker</type>

-                    <type>uima.ruta.example.Features.Month</type>

-                    <type>uima.ruta.example.Features.PagesMarker</type>

-                    <type>uima.ruta.example.Features.PublisherInd</type>

-                    <type>uima.ruta.example.Features.Reference</type>

-                    <type>uima.ruta.example.Features.LParen</type>

-                    <type>uima.ruta.example.Features.RParen</type>

-                    <type>uima.ruta.example.Features.YearInd</type>

-                    <type>uima.ruta.example.Features.NameLinker</type>

-                    <type>uima.ruta.example.Features.FirstNameInd</type>

-                    <type>uima.ruta.example.Features.FirstNameInitial</type>

-                    <type>uima.ruta.example.Features.SingleChar</type>

-                    <type>uima.ruta.example.Features.Quote</type>

-                    <type>uima.ruta.example.Features.QuotedStuff</type>

-                    <type>uima.ruta.example.Features.InInd</type>

-                    <type>uima.ruta.example.Features.FirstToken</type>

-                    <type>uima.ruta.example.Features.LastToken</type>

-                    <type>uima.ruta.example.Features.NumPeriod</type>

-                    <type>uima.ruta.example.Features.NumComma</type>

-                    <type>uima.ruta.example.Features.NumColon</type>

-                    <type>uima.ruta.example.Features.PeriodSep</type>

-                    <type>uima.ruta.example.Features.CommaSep</type>

-                    <type>uima.ruta.example.Features.ColonSep</type>

-                </outputs>

-                <languagesSupported/>

-            </capability>

-        </capabilities>

-        <operationalProperties>

-            <modifiesCas>true</modifiesCas>

-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-            <outputsNewCASes>true</outputsNewCASes>

-        </operationalProperties>

-    </analysisEngineMetaData>

-    <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/FeaturesTypeSystem.xml b/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/FeaturesTypeSystem.xml
deleted file mode 100644
index 7138635..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/uima/ruta/example/FeaturesTypeSystem.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-    <name>FeaturesTypeSystem</name>

-    <imports>

-        <import location="..\..\..\BasicTypeSystem.xml"/>

-        <import location="..\..\..\utils\PlainTextTypeSystem.xml"/>

-        <import location="BaseTypeSystem.xml"/>

-    </imports>

-    <types>

-        <typeDescription>

-            <name>uima.ruta.example.Features.EnglishStopWord</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.FirstName</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.RParen</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.EditorMarker</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.JournalVolumeMarker</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.Quote</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.NameLinker</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.FirstNameInitial</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.QuotedStuff</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.LastToken</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.CommaSep</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.FirstToken</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.SingleChar</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.PublisherInd</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.InInd</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.YearInd</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.FirstNameInd</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.ColonSep</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.LParen</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.Month</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.Reference</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.NumComma</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.NumPeriod</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.PagesMarker</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.PeriodSep</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-        <typeDescription>

-            <name>uima.ruta.example.Features.NumColon</name>

-            <description>Type defined in uima.ruta.example.Features</description>

-            <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-    </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/AnnotationWriter.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/AnnotationWriter.xml
deleted file mode 100644
index 64ada39..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/AnnotationWriter.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.AnnotationWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the annotation is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Encoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Type</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Type</name>

-        <value>

-          <string>uima.tcas.DocumentAnnotation</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Encoding</name>

-        <value>

-          <string>UTF-8</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/Cutter.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/Cutter.xml
deleted file mode 100644
index 9a61571..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/Cutter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaCutter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>keep</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlAnnotator.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlAnnotator.xml
deleted file mode 100644
index 1acac59..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlAnnotator.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>onlyContent</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>onlyContent</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="HtmlTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlConverter.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlConverter.xml
deleted file mode 100644
index d493e4d..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlConverter.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlConverter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTags</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTagRegExp</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>replaceLinebreaks</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>linebreakReplacement</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPolicy</name>

-        <description>Either heuristic, explicit, or none.

-Defaults to heuristic.</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPatterns</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionReplacements</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>skipWhitespaces</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>processAll</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>skipWhitespaces</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlTypeSystem.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlTypeSystem.xml
deleted file mode 100644
index f5fb687..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/HtmlTypeSystem.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>typeSystemDescriptor</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TAG</name>

-      <description></description>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>expandedOffsets</name>

-          <description></description>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeName</name>

-          <description></description>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeValue</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.B</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H1</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H2</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H3</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H4</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H5</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H6</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.COMMENT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TITLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.I</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.U</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BIG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SMALL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FONT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.A</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HEAD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HTML</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.EM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TABLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.DIV</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SPAN</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.UL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.OL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.P</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LI</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TBODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TH</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.IMG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.STYLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SCRIPT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LINK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.INPUT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FORM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.META</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.REMARK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-      <features>

-        <featureDescription>

-          <name>comment</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/Modifier.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/Modifier.xml
deleted file mode 100644
index a5a251e..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/Modifier.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>Modifier</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputLocation</name>

-        <description></description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>outputView</name>

-        <value>

-          <string>modified</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <outputSofas>

-          <sofaName>modified</sofaName>

-        </outputSofas>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/PlainTextAnnotator.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/PlainTextAnnotator.xml
deleted file mode 100644
index 77a0a55..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/PlainTextAnnotator.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.PlainTextAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters/>

-    <configurationParameterSettings/>

-    <typeSystemDescription>

-      <imports>

-        <import location="PlainTextTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/PlainTextTypeSystem.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/PlainTextTypeSystem.xml
deleted file mode 100644
index 7081c20..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/PlainTextTypeSystem.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>PlainTextTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Line</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Paragraph</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WSLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EmptyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EmptyLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AnyLine</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/SourceDocumentInformation.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/SourceDocumentInformation.xml
deleted file mode 100644
index 8322d25..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/SourceDocumentInformation.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-   
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-	<name>org.apache.uima.examples.SourceDocumentInformation</name>
-	<description>Defines a type for storing information about the original source document from which the current CAS was initialized</description>
-	<version>1.0</version>
-	<vendor>The Apache Software Foundation</vendor>
-	<types>
-		<typeDescription>
-			<name>org.apache.uima.examples.SourceDocumentInformation</name>
-			<description>Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.</description>
-			<supertypeName>uima.tcas.Annotation</supertypeName>
-			<features>
-				<featureDescription>
-					<name>uri</name>
-					<description>URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)</description>
-					<rangeTypeName>uima.cas.String</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>offsetInSource</name>
-					<description>Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>documentSize</name>
-					<description>Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-				  <name>lastSegment</name>
-				  <description>For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. </description>
-			      <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-			    </featureDescription>				
-			</features>
-		</typeDescription>
-	</types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/StyleMapCreator.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/StyleMapCreator.xml
deleted file mode 100644
index 8e150de..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/StyleMapCreator.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.StyleMapCreator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/ViewWriter.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/ViewWriter.xml
deleted file mode 100644
index 89b5bf4..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/ViewWriter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>output</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/descriptor/utils/XMIWriter.xml b/trunk/example-projects/TextRulerExample/descriptor/utils/XMIWriter.xml
deleted file mode 100644
index 3a935cf..0000000
--- a/trunk/example-projects/TextRulerExample/descriptor/utils/XMIWriter.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.XMIWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the xmi is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/TextRulerExample/resources/EditorMarker.txt b/trunk/example-projects/TextRulerExample/resources/EditorMarker.txt
deleted file mode 100644
index b5a08f3..0000000
--- a/trunk/example-projects/TextRulerExample/resources/EditorMarker.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-(Eds.)

-(eds.)

-(Ed.)

-(ed.)

-Eds.

-eds.

-ed.

-Eds

-eds

-Ed

-ed

-(Eds)

-(eds)

-(Ed)

-(ed)

-editor

-Editor

-Editors

-Editor:

-Editors:

-editors

-(Editor)

-(Editors)

-Hrsg

-Hrsg.

-(Hrsg.)

-(Hrsg.).

-edd

-(edd)

-(edd.)

-edited by
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/resources/EnglishStopWords.txt b/trunk/example-projects/TextRulerExample/resources/EnglishStopWords.txt
deleted file mode 100644
index f8af7bc..0000000
--- a/trunk/example-projects/TextRulerExample/resources/EnglishStopWords.txt
+++ /dev/null
@@ -1,319 +0,0 @@
-a

-about

-above

-across

-after

-afterwards

-again

-against

-all

-almost

-alone

-along

-already

-also

-although

-always

-am

-among

-amongst

-amoungst

-amount

-an

-and

-another

-any

-anyhow

-anyone

-anything

-anyway

-anywhere

-are

-around

-as

-at

-back

-be

-became

-because

-become

-becomes

-becoming

-been

-before

-beforehand

-behind

-being

-below

-beside

-besides

-between

-beyond

-bill

-both

-bottom

-but

-by

-call

-can

-cannot

-cant

-co

-computer

-con

-could

-couldnt

-cry

-de

-describe

-detail

-do

-done

-down

-due

-during

-each

-eg

-eight

-either

-eleven

-else

-elsewhere

-empty

-enough

-etc

-even

-ever

-every

-everyone

-everything

-everywhere

-except

-few

-fifteen

-fify

-fill

-find

-fire

-first

-five

-for

-former

-formerly

-forty

-found

-four

-from

-front

-full

-further

-get

-give

-go

-had

-has

-hasnt

-have

-he

-hence

-her

-here

-hereafter

-hereby

-herein

-hereupon

-hers

-herse”

-him

-himse”

-his

-how

-however

-hundred

-i

-ie

-if

-in

-inc

-indeed

-interest

-into

-is

-it

-its

-itse”

-keep

-last

-latter

-latterly

-least

-less

-ltd

-made

-many

-may

-me

-meanwhile

-might

-mill

-mine

-more

-moreover

-most

-mostly

-move

-much

-must

-my

-myse”

-name

-namely

-neither

-never

-nevertheless

-next

-nine

-no

-nobody

-none

-noone

-nor

-not

-nothing

-now

-nowhere

-of

-off

-often

-on

-once

-one

-only

-onto

-or

-other

-others

-otherwise

-our

-ours

-ourselves

-out

-over

-own

-part

-per

-perhaps

-please

-put

-rather

-re

-same

-see

-seem

-seemed

-seeming

-seems

-serious

-several

-she

-should

-show

-side

-since

-sincere

-six

-sixty

-so

-some

-somehow

-someone

-something

-sometime

-sometimes

-somewhere

-still

-such

-system

-take

-ten

-than

-that

-the

-their

-them

-themselves

-then

-thence

-there

-thereafter

-thereby

-therefore

-therein

-thereupon

-these

-they

-thick

-thin

-third

-this

-those

-though

-three

-through

-throughout

-thru

-thus

-to

-together

-too

-top

-toward

-towards

-twelve

-twenty

-two

-un

-under

-until

-up

-upon

-us

-very

-via

-was

-we

-well

-were

-what

-whatever

-when

-whence

-whenever

-where

-whereafter

-whereas

-whereby

-wherein

-whereupon

-wherever

-whether

-which

-while

-whither

-who

-whoever

-whole

-whom

-whose

-why

-will

-with

-within

-without

-would

-yet

-you

-your

-yours

-yourself

-yourselves
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/resources/FirstNames.txt b/trunk/example-projects/TextRulerExample/resources/FirstNames.txt
deleted file mode 100644
index 1e445e4..0000000
--- a/trunk/example-projects/TextRulerExample/resources/FirstNames.txt
+++ /dev/null
@@ -1,12717 +0,0 @@
-Aakash

-Aalzen

-Aamir

-Aanand

-Aanchal

-Aaron

-Aart

-Aarthi

-Aasrithan

-Abagael

-Abagail

-Abayomi

-Abbas

-Abbe

-Abbey

-Abbi

-Abbie

-Abbot

-Abbott

-Abby

-Abdeddahir

-Abdel

-Abdelah

-Abdelali

-Abdelhak

-Abdeljalil

-Abdelkader

-Abdelmajid

-Abdelnasser

-Abdenaji

-Abdennour

-Abdessamad

-Abdessamia

-Abdesselam

-Abdi

-Abdolhalim

-Abdolreza

-Abdu

-Abdul

-Abdul-Qadir

-Abdulkadir

-Abdulkarim

-Abdulla

-Abdullah

-Abdulwhab

-Abdurrahim

-Abdurrahman

-Abe

-Abeba

-Abedin

-Abel

-Abelard

-Abhay

-Abhaysam

-Abhi

-Abhijit

-Abhijit Hari

-Abhilash

-Abhinandan

-Abhinav

-Abhishek

-Abhishekh

-Abi

-Abid

-Abigael

-Abigail

-Abigale

-Abisha

-Abiye

-Abner

-Abol

-Abou-Zeid

-Abra

-Abraham

-Abram

-Abu

-Aby

-Acacia

-Acar

-Ace

-Acer

-Achal

-Achille

-Achim

-Achintya

-Achmed

-Acram

-Ada

-Adah

-Adair

-Adalbert

-Adalberto

-Adaline

-Adam

-Adama

-Adamo

-Adams

-Adamu

-Adara

-Addie

-Addis

-Addolorata

-Ade

-Adebayo

-Adeeb

-Adeel

-Adekunle

-Adel

-Adela

-Adelaide

-Adelchi

-Adele

-Adelheid

-Adelice

-Adelina

-Adelind

-Adeline

-Adella

-Adelle

-Adem

-Adena

-Adesina

-Adetunji

-Adey

-Adger

-Adi

-Adiana

-Adil

-Adilsom

-Adina

-Aditaya

-Aditya

-Adlai

-Admir

-Adnan

-Adolf

-Adolfo

-Adolph

-Adolphe

-Adolpho

-Adolphus

-Adora

-Adore

-Adoree

-Adorne

-Adrea

-Adria

-Adriaan

-Adriaens

-Adrian

-Adriana

-Adriane

-Adrianna

-Adrianne

-Adriano

-Adrick

-Adrien

-Adriena

-Adrienne

-Adris

-Aecio

-Aeriel

-Aeriela

-Aeriell

-Affan

-Afroz

-Afshin

-Afsin

-Afzal

-Ag

-Agace

-Agamemnon

-Agata

-Agatha

-Agathe

-Aggi

-Aggie

-Aggy

-Agna

-Agnella

-Agnelo

-Agnes

-Agnese

-Agnesse

-Agneta

-Agnieszka

-Agnola

-Agota

-Agretha

-Aguinaldo

-Aguste

-Agustin

-Ahad

-Ahamed

-Aharon

-Ahmad

-Ahmadi

-Ahmadreza

-Ahmed

-Ahmet

-Ahmet Cem

-Ahouab

-Ahsan

-Ahsem

-Aian

-Aida

-Aidan

-Aigars

-Aigneis

-Aila

-Aile

-Ailee

-Aileen

-Ailene

-Ailey

-Aili

-Ailina

-Ailyn

-Aime

-Aimee

-Aimery

-Aimil

-Aina

-Aindrea

-Ainslee

-Ainsley

-Ainslie

-Aitana

-Ajai

-Ajay

-Ajaya

-Ajesh

-Ajibola

-Ajit

-Ajith

-Ajoy

-Akash

-Akbar

-Akeraino

-Akhil

-Akhila

-Akhilesh

-Akif

-Akil

-Akilas

-Akin

-Akinboro

-Akli

-Akos

-Akram

-Akshay

-Akshaya

-Al

-Alaa

-Alain

-Alain-Florent

-Alaine

-Alameda

-Alan

-Alana

-Alanah

-Alane

-Alanna

-Alasdair

-Alastair

-Alayne

-Alba

-Alban

-Albatros

-Albert

-Alberta

-Albertina

-Albertine

-Alberto

-Albertus

-Albina

-Albrecht

-Albu

-Alcorn

-Alden

-Aldis

-Aldo

-Aldric

-Aldrich

-Aldus

-Aldwin

-Alec

-Alecia

-Aleck

-Aleda

-Aleece

-Aleecia

-Aleem

-Aleen

-Alejandra

-Alejandrina

-Alejandro

-Alejandro Perez

-Aleks

-Aleksandar

-Aleksander

-Aleksandra

-Aleksandrs

-Aleksej

-Aleksey

-Alen

-Alena

-Alene

-Ales

-Alesandro

-Alessandra

-Alessandro

-Alessia

-Alessio

-Aleta

-Alethea

-Alex

-Alex Taylor

-Alex Tee

-Alexa

-Alexandar

-Alexander

-Alexander-Mario

-Alexandr

-Alexandra

-Alexandre

-Alexandrina

-Alexandru

-Alexei

-Alexej

-Alexey

-Alexi

-Alexia

-Alexina

-Alexine

-Alexis

-Alf

-Alfie

-Alfons

-Alfons Peter

-Alfonse

-Alfonso

-Alfonzo

-Alford

-Alfred

-Alfreda

-Alfredo

-Algernon

-Ali

-Ali Ekber

-Ali Imran

-Ali Irfan

-Ali Khan

-Ali Nasir

-Ali Reza

-Ali Shah

-Alia

-Alic

-Alica

-Alican

-Alice

-Alicea

-Alicia

-Alicja

-Alida

-Alidia

-Alina

-Aline

-Aliou

-Alireza

-Alis

-Alisa

-Alisdair

-Alisha

-Alison

-Alissa

-Alistair

-Alister

-Alisun

-Alivesa

-Alix

-Aliza

-Alla

-Allah

-Allan

-Alleen

-Allegra

-Allel

-Allen

-Allene

-Alley

-Alli

-Allianora

-Allie

-Allin

-Allina

-Allis

-Allison

-Allissa

-Allsun

-Ally

-Allyce

-Allyn

-Allys

-Allyson

-Alma

-Almane

-Almeda

-Almedin

-Almer

-Almeria

-Almeta

-Almeyda

-Almira

-Almire

-Almut

-Alois

-Aloise

-Aloisia

-Alok

-Aloke

-Alonso

-Alonzo

-Aloys

-Aloysia

-Aloysio

-Aloysius

-Alpa

-Alpaslan

-Alper

-Alphonse

-Alphonso

-Alrun

-Alston

-Alta

-Altadill

-Altaf

-Altagrace

-Altan

-Althea

-Altin

-Alto

-Alton

-Alun

-Alvaro

-Alvera

-Alvin

-Alvina

-Alvinia

-Alvira

-Alwin

-Alyce

-Alyda

-Alys

-Alysa

-Alyse

-Alysia

-Alyson

-Alyss

-Alyssa

-Amabel

-Amabelle

-Amadeus

-Amadou

-Amalea

-Amalee

-Amalesh

-Amaleta

-Amalia

-Amalie

-Amalita

-Amalle

-Aman

-Amancio

-Amanda

-Amandeep Singh

-Amandi

-Amandie

-Amandy

-Amaniyel

-Amanuel

-Amar

-Amara

-Amarendra

-Amargo

-Amarnath

-Amata

-Amavi

-Amber

-Amberly

-Ambika

-Ambresh

-Ambros

-Ambrose

-Ambrosi

-Ambrosia

-Ambrosio

-Ambrosius

-Ambur

-Ame

-Ameed

-Ameet

-Amel

-Amelia

-Amelie

-Amelina

-Ameline

-Amelita

-Amer

-Amery

-Ameya

-Ami

-Amie

-Amier

-Amin

-Amine

-Aminian

-Amir

-Amirali

-Amit

-Amita

-Amitabh

-Amitabha

-Amitava

-Amitev

-Amith

-Amity

-Amjad

-Ammad

-Ammamaria

-Ammar

-Ammed

-Ammy

-Amod

-Amory

-Amos

-Amr

-Amrita

-Amro

-Amruth

-Amsr

-Amthal

-Amuthan

-Amy

-Ana

-Ana-Maria

-Anabel

-Anabella

-Anabelle

-Anais

-Anakpal

-Analiese

-Analise

-Anallese

-Anallise

-Anand

-Ananda

-Anandamoy

-Anandan

-Anandhi

-Anant

-Ananth

-Anantha

-Anantharaman

-Ananyo

-Anapurna

-Anas

-Anastasia

-Anastasie

-Anastasios

-Anastassia

-Anatol

-Anatola

-Anatole

-Anatoli

-Anatolij

-Anatoliy

-Anatollo

-Anatoly

-Anca

-Andee

-Anders

-Andi

-Andi-Tsuyoshi

-Andie

-Andigoni

-Andonis

-Andra

-Andrade

-Andras

-Andre

-Andrea

-Andreana

-Andreas

-Andree

-Andreea

-Andrei

-Andrei-Mihai

-Andrej

-Andres

-Andrew

-Andrey

-Andri

-Andria

-Andriana

-Andriette

-Andrija

-Andrios

-Andriy

-Andromache

-Andromeda

-Andros

-Andrus

-Andrzej

-Andy

-Aneer

-Aneesh

-Aneez

-Anel

-Anesh

-Anestassia

-Anet

-Aneta

-Anett

-Anetta

-Anette

-Ange

-Angel

-Angela

-Angele

-Angelia

-Angelica

-Angelico

-Angelika

-Angeliki

-Angelina

-Angeline

-Angelique

-Angelita

-Angelle

-Angelo

-Angie

-Angil

-Anguel

-Angus

-Angy

-Anh Guan

-Anh Tuan

-Ania

-Anica

-Anil

-Anil Kumar

-Animesh

-Anindya

-Aniruddha

-Anish

-Anissa

-Anita

-Anitha

-Anitra

-Anivesh

-Anj

-Anja

-Anja-Christina

-Anja-Kathrin

-Anja-Martina

-Anjali

-Anjanette

-Anjela

-Anjit

-Anke

-Anke Katrin

-Ankem

-Ankica

-Ankur

-Anmar

-Anmol

-Ann

-Ann Lee

-Ann-Mari

-Ann-Marie

-Anna

-Anna Xinwei

-Anna-Diana

-Anna-Diane

-Anna-Leena

-Anna-Maria

-Annabal

-Annabel

-Annabela

-Annabell

-Annabella

-Annabelle

-Annadiana

-Annadiane

-Annalee

-Annalena

-Annaliese

-Annalisa

-Annalise

-Annalyse

-Annamari

-Annamaria

-Annamarie

-Anne

-Anne Marie

-Anne-Corinne

-Anne-Laure

-Anne-Mar

-Anne-Marie

-Annecorinne

-Annegret

-Anneli

-Anneliese

-Annelise

-Annelly

-Annemaria

-Annemarie

-Annet

-Annetta

-Annette

-Anni

-Annice

-Annick

-Annie

-Annika

-Annissa

-Annmaria

-Annmarie

-Annnora

-Annora

-Anny

-Anouar

-Ansel

-Ansell

-Anselm

-Anselma

-Ansgar

-Ansley

-Anson

-Anstice

-Antal

-Ante

-Ante

-Anthe

-Anthea

-Anthia

-Anthonia

-Anthony

-Antin

-Antje

-Antoine

-Antoinette

-Anton

-Antone

-Antonella

-Antonetta

-Antoni

-Antonia

-Antonica

-Antonie

-Antonietta

-Antonin

-Antonina

-Antonino

-Antonio

-Antonios

-Antonius

-Antony

-Anu

-Anu Bajaj

-Anuar

-Anuj

-Anujan

-Anup

-Anupam

-Anupama

-Anupkumar

-Anura

-Anuradha

-Anurag

-Anusha

-Anushri

-Anwar

-Anwarul

-Anya

-Aparna

-Aphrodite

-Apollo

-Apostolos

-Appolonia

-Appu

-April

-Aprilette

-Apushp

-Aqeelur

-Ara

-Arabel

-Arabela

-Arabele

-Arabella

-Arabelle

-Arabinda

-Arachna

-Aram

-Aramas

-Aramide

-Arash

-Arastoo

-Arathi

-Araujo

-Aravind

-Aravind Babu

-Aravindan

-Arben

-Arcady

-Archana

-Archavir

-Archibald

-Archibold

-Archie

-Archon

-Archy

-Arda

-Ardan

-Ardath

-Ardavan

-Ardeen

-Ardelia

-Ardelis

-Ardella

-Ardelle

-Arden

-Ardene

-Ardenia

-Ardiana

-Ardine

-Ardis

-Ardith

-Ardjan

-Ardra

-Ardyce

-Ardys

-Ardyth

-Areen

-Arek

-Arel

-Arend

-Arestages

-Aretha

-Argiro

-Ari

-Ariadne

-Ariana

-Ariane

-Arianne

-Aribert

-Aridatha

-Arie

-Ariel

-Ariela

-Ariella

-Arielle

-Arif

-Arigirios

-Arijit

-Arisetty

-Aristophanes

-Aristotle

-Arjan

-Arjen

-Arjun

-Arkadi

-Arkadiusz

-Arkadiy

-Arlana

-Arlee

-Arleen

-Arlen

-Arlena

-Arlene

-Arleta

-Arlett

-Arlette

-Arleyne

-Arlie

-Arliene

-Arlina

-Arlinda

-Arline

-Arlo

-Arly

-Arlyn

-Arlyne

-Armagan

-Arman

-Armand

-Armanda

-Armando

-Armann

-Armin

-Armindo

-Armon

-Armond

-Armstrong

-Arn

-Arnaud

-Arnd

-Arndt

-Arne

-Arnel

-Arnie

-Arnim

-Arno

-Arnold

-Arnoldo

-Arnulf

-Aron

-Arora

-Arpad

-Arran

-Arri

-Arron

-Arsalan

-Arsha

-Arshad

-Arshdeep

-Arshi

-Arsim

-Arslan

-Art

-Artak

-Artem

-Arther

-Arthur

-Arti

-Artie

-Arttu

-Artur

-Arturo

-Arulanantham

-Arun

-Aruna

-Arunas

-Arunkumar

-Arunprakash

-Arup

-Arvid

-Arvids

-Arvie

-Arvin

-Arvind

-Arvy

-Arwed

-Aryan

-Aryn

-Arzu

-Asaad

-Asad

-Asbjorn

-Aschalew

-Aschwin

-Asep

-Asfaw

-Ash

-Ash Ghai

-Asha

-Ashalatha

-Ashby

-Ashely

-Ashish

-Ashkan

-Ashlee

-Ashleigh

-Ashlen

-Ashley

-Ashli

-Ashlie

-Ashly

-Ashmeeta

-Ashok

-Ashoka

-Ashot

-Ashraf

-Ashton

-Ashur

-Ashwani

-Ashwin

-Ashwini

-Ashwinikumar

-Asif

-Asim

-Asish

-Asker

-Askia

-Asko

-Asma

-Asmus

-Asok

-Asr

-Assadollah

-Asterios

-Astra

-Astrid

-Astrix

-Aswartha Sannapu

-Aswini

-Atalanta

-Atalay

-Atanas

-Atashi

-Ataul

-Ataur

-Atchut

-Ateeq

-Athanasia

-Athanasios

-Athanassios

-Athena

-Athene

-Athina-Sofia

-Athula

-Atif

-Atlanta

-Atlante

-Atluri

-Atos Origin

-Attila

-Atul

-Aub

-Aube

-Aubert

-Auberta

-Aubin

-Aubine

-Aubree

-Aubrette

-Aubrey

-Aubrie

-Aubry

-Aude

-Audi

-Audie

-Audra

-Audre

-Audrey

-Audrie

-Audry

-Audrye

-Audy

-Augie

-August

-Augusta

-Auguste

-Augustin

-Augustina

-Augustine

-Augusto

-Augustus

-Aura

-Aurangseb

-Aurea

-Aurel

-Aurelea

-Aurelia

-Aurelie

-Aurelio

-Auria

-Aurie

-Aurilia

-Aurlie

-Auroora

-Aurora

-Aurore

-Austen

-Austin

-Austina

-Austine

-Autumn

-Ava

-Avani

-Ave

-Aveline

-Averell

-Averil

-Averill

-Avery

-Averyl

-Avi

-Avie

-Aviel

-Avinash

-Avinoam

-Avio

-Avis

-Avishek

-Aviva

-Avivah

-Avni

-Avnish

-Avraham

-Avram

-Avril

-Avrit

-Avrom

-Avron

-Avy

-Awtar

-Axel

-Ayako

-Ayaz

-Aydin

-Ayham

-Ayhan

-Aykut

-Aylin

-Aylmer

-Ayman

-Aymen

-Ayn

-Ayneka

-Ayodeji

-Ayokunle

-Ayomide

-Aysel

-Aysun

-Ayten

-Ayub

-Ayumi

-Ayush

-Azadeh

-Azeb

-Azeem

-Azher

-Aziz

-Azmat

-Azuka

-Baala

-Bab

-Babak

-Babara

-Babatunde

-Baber

-Babette

-Babita

-Babs

-Babtiste

-Babu

-Babul

-Bach

-Bacher

-Bachi

-Bachir

-Bade

-Badie

-Badr

-Badri

-Baerbel

-Baha

-Bahar

-Bahman

-Bahman Ali

-Bahram

-Bahri

-Baihju

-Baijun

-Bailey

-Bailie

-Baillie

-Baily

-Baird

-Bakare

-Baker

-Bala

-Balachandra

-Balaji

-Balakrishnan

-Balas

-Balasubramanian

-Balasz

-Balazs

-Baldur

-Baldwin

-Balint

-Baljit

-Ballmert

-Balram

-Balthasar

-Balupari

-Balz

-Bambi

-Bambie

-Bamby

-Bancroft

-Bandam

-Bandaru

-Bandhu

-Bangaly

-Banu

-Bao

-Bao Quac

-Baptiste

-Baran

-Barb

-Barbabas

-Barbabra

-Barbara

-Barbara-Anne

-Barbaraanne

-Barbarplanoa

-Barbe

-Barbee

-Barbette

-Barbey

-Barbi

-Barbie

-Barbora

-Barbra

-Barby

-Barclay

-Bard

-Barde

-Bari

-Barinder

-Baris

-Barn

-Barna

-Barnabas

-Barnabe

-Barnaby

-Barnard

-Barnebas

-Barnet

-Barnett

-Barney

-Barnie

-Barny

-Baron

-Barr

-Barret

-Barrett

-Barri

-Barrie

-Barris

-Barron

-Barry

-Bart

-Bartel

-Barth

-Barthel

-Bartholemy

-Bartholomeo

-Bartholomeus

-Bartholomew

-Bartie

-Bartlet

-Bartlett

-Bartolemo

-Bartolome

-Bartolomei

-Bartolomeo

-Barton

-Bartos

-Bartosz

-Barty

-Bary

-Bas

-Basava

-Basheer

-Bashir

-Basia

-Basil

-Baskar

-Basnam

-Bastiaan

-Bastian

-Bastien

-Batholomew

-Bathsheba

-Batsheva

-Bavani

-Baxter

-Bay

-Bayar Bafia

-Bayard

-Bayram

-Bayro

-Bea

-Beale

-Bealle

-Bear

-Bearnard

-Beat

-Beata

-Beate

-Beatrice

-Beatrisa

-Beatrix

-Beatriz

-Beau

-Beaufort

-Beauregard

-Bebe

-Becca

-Beck

-Becka

-Becki

-Beckie

-Becky

-Bedekar

-Bee

-Behrooz

-Behrouz

-Beilul

-Beitris

-Bejoy

-Bekki

-Bel

-Bela

-Belaid

-Belen

-Belia

-Belicia

-Belinda

-Belita

-Bell

-Bella

-Bellala

-Bellamy

-Bellanca

-Belle

-Bellina

-Belva

-Belvia

-Ben

-Benarji

-Benda

-Bendite

-Benedetta

-Benedict

-Benedicta

-Benedicte

-Benedikt

-Benedikta

-Benetta

-Bengisu

-Bengt

-Benita

-Benito

-Benjamen

-Benjamin

-Benjamin James

-Benjamin-Timm

-Benji

-Benjie

-Benjiman

-Benjy

-Benn

-Bennet

-Bennett

-Benni

-Bennie

-Benno

-Benny

-Benoit

-Benoite

-Bens

-Bensara

-Benson

-Bent

-Bentley

-Benton

-Beowulf

-Berchtold

-Berend

-Berenice

-Beret

-Berget

-Berislav

-Berk

-Berke

-Berkeley

-Berkie

-Berkley

-Berlieb

-Berna

-Bernadene

-Bernadette

-Bernadina

-Bernadine

-Bernard

-Bernardina

-Bernardine

-Bernardino

-Bernardo

-Bernd

-Berndt

-Bernelle

-Bernete

-Bernetta

-Bernette

-Bernfried

-Bernhard

-Bernhardt

-Bernhold

-Berni

-Bernice

-Bernie

-Bernita

-Berno

-Bernt

-Berny

-Berri

-Berrie

-Berrin

-Berry

-Bert

-Berta

-Berte

-Bertha

-Berthe

-Berthold

-Berti

-Bertie

-Bertina

-Bertine

-Bertold

-Bertram

-Bertrand

-Berty

-Beryl

-Beryle

-Besart

-Beserithan

-Besir

-Bess

-Bessie

-Bessy

-Bestea

-Beth

-Bethann

-Bethanne

-Bethany

-Bethena

-Bethina

-Betina

-Betsey

-Betsy

-Betta

-Bette

-Bette-Ann

-Betteann

-Betteanne

-Betti

-Bettie

-Bettina

-Bettine

-Betty

-Bettye

-Beulah

-Bev

-Bevely

-Beverie

-Beverlee

-Beverlie

-Beverly

-Bevvy

-Bhagat

-Bhagath

-Bhagirath

-Bhalchandra

-Bhanu

-Bhanupriya

-Bhanurekha

-Bharadwaja

-Bharat

-Bharati

-Bhardwaj

-Bharti

-Bhaskar

-Bhaskara

-Bhat

-Bhaumik

-Bhavana

-Bhavani

-Bhavesh

-Bhawani

-Bhoopal

-Bhupi

-Bhupinder

-Bhushan

-Bhuvan

-Bi Youne

-Bianca

-Bianca-Maria

-Bianka

-Bianto

-Bibhuti

-Bibiane

-Biddy

-Bidget

-Biff

-Bighiu

-Bijan

-Biju

-Bikash

-Bilal

-Biljana

-Bill

-Billi

-Billie

-Billy

-Biman

-Bincy

-Binda

-Bindu

-Bing

-Bingfan

-Binky

-Binni

-Binnie

-Binny

-Binoy

-Bipin

-Biplab

-Bird

-Birdal

-Birdie

-Birger

-Birgit

-Birgitt

-Birgitta

-Birk

-Birol

-Birthe

-Bis

-Bishop

-Biswa

-Biswanath

-Bjarke

-Bjarne

-Bjoern

-Bjorn

-Bjorne

-Blagoje

-Blaine

-Blair

-Blaire

-Blaise

-Blake

-Blakelee

-Blakeley

-Blanca

-Blanch

-Blancha

-Blanche

-Blanco

-Blane

-Blanka

-Blare

-Blayne

-Blinni

-Blinnie

-Blinny

-Bliss

-Blisse

-Blithe

-Blkn

-Blondell

-Blondelle

-Blondie

-Blondy

-Blythe

-Bo

-Boaz

-Bob

-Bobbala

-Bobbette

-Bobbi

-Bobbie

-Bobby

-Bobette

-Bobina

-Bobine

-Bobinette

-Bodewyn

-Bodnar

-Bodo

-Bodo Kai

-Bodo-Norbert

-Boesch

-Bogart

-Bogdan

-Bohus

-Bohuslav

-Bojan

-Bojja

-Bokki

-Bola

-Bommi

-Bon-Minh

-Boniface

-Bonita

-Bonnee

-Bonni

-Bonnie

-Bonny

-Boopathi

-Bora

-Boril

-Boris

-Borislav

-Borja

-Borys

-Bosco

-Bosko

-Botond

-Boubacar

-Bourazza

-Bourke

-Bousari

-Bouz

-Boyan

-Boyce

-Boyd

-Boye

-Bozena

-Bozidar

-Brad

-Braden

-Bradford

-Bradley

-Bradly

-Brady

-Brahim

-Bram

-Bramwell

-Brana

-Brandais

-Brande

-Brandea

-Brandi

-Brandice

-Brandie

-Brandise

-Brandon

-Brandy

-Branimir

-Branislav

-Branko

-Brant

-Brauer

-Braun

-Brea

-Breanne

-Brear

-Bree

-Breena

-Bren

-Brena

-Brenda

-Brendan

-Brenden

-Brenn

-Brenna

-Brennan

-Brent

-Bret

-Bretislav

-Brett

-Brewer

-Brewster

-Bria

-Brian

-Briana

-Brianna

-Brianne

-Brice

-Bride

-Bridget

-Bridgett

-Bridgette

-Bridie

-Brien

-Brier

-Brietta

-Briggs

-Brigid

-Brigida

-Brigit

-Brigitta

-Brigitte

-Brij

-Brijesh

-Brina

-Briney

-Brinkley

-Briny

-Brit

-Brita

-Britaney

-Britani

-Briteny

-Britney

-Britni

-Britt

-Britta

-Brittan

-Brittany

-Britte

-Brittney

-Brock

-Broddie

-Broddy

-Broderic

-Broderick

-Brodie

-Brody

-Bronson

-Brook

-Brooke

-Brooks

-Bruce

-Brunella

-Brunhilda

-Brunhilde

-Brunno

-Bruno

-Brunold

-Bryan

-Bryana

-Bryant

-Bryce

-Bryn

-Bryna

-Brynly

-Brynn

-Brynna

-Brynne

-Bryon

-Bubba

-Bubesh

-Buchholtz

-Buck

-Bucky

-Bucur

-Bud

-Buddy

-Budi

-Buffy

-Bulent

-Bunni

-Bunnie

-Bunny

-Burak

-Burcin

-Burger

-Burgess

-Burghard

-Burghardt

-Burim

-Burkard

-Burke

-Burkel

-Burkhard

-Burkhard Michael

-Burkhardt

-Burkhart

-Burl

-Burnaby

-Burno

-Burt

-Burta

-Burton

-Buster

-Butch

-Butler

-Byoungsu

-Byram

-Byron

-Cabrina

-Cacilia

-Cacilie

-Caesar

-Caglar

-Cahal

-Cahit

-Cai

-Cain

-Caitlin

-Caitrin

-Cal

-Caldwell

-Caleb

-Calhoun

-Calida

-Calin

-Calla

-Calley

-Calli

-Callida

-Callie

-Callistus

-Cally

-Calvin

-Calypso

-Cam

-Cam Thao

-Camala

-Camel

-Camelia

-Camella

-Camellia

-Cameo

-Cameron

-Cami

-Camil

-Camila

-Camile

-Camilla

-Camille

-Cammi

-Cammie

-Cammy

-Campos

-Candace

-Candi

-Candice

-Candida

-Candide

-Candie

-Candis

-Candra

-Candy

-Cappella

-Caprice

-Cara

-Caralie

-Carel

-Caren

-Carena

-Caresa

-Caressa

-Caresse

-Carey

-Cari

-Caria

-Carie

-Caril

-Carilyn

-Carin

-Carina

-Carine

-Cariotta

-Carissa

-Carita

-Caritta

-Carl

-Carl-Rainer

-Carla

-Carlee

-Carleen

-Carleigh

-Carlen

-Carlena

-Carlene

-Carleton

-Carley

-Carli

-Carlie

-Carlin

-Carlina

-Carline

-Carlisle

-Carlita

-Carlo

-Carlos

-Carlota

-Carlotta

-Carlton

-Carly

-Carlye

-Carlyle

-Carlyn

-Carlynn

-Carlynne

-Carma

-Carmel

-Carmela

-Carmelia

-Carmelina

-Carmelita

-Carmella

-Carmelle

-Carmelo

-Carmen

-Carmeron

-Carmina

-Carmine

-Carmita

-Carmon

-Caro

-Carol

-Carol-Jean

-Carola

-Carolan

-Carolann

-Carole

-Carolee

-Caroleen

-Carolie

-Carolin

-Carolina

-Caroline

-Caroljean

-Carolyn

-Carolyne

-Carolynn

-Caron

-Carree

-Carri

-Carrie

-Carrissa

-Carrol

-Carroll

-Carry

-Carson

-Carsten

-Carter

-Cary

-Caryl

-Caryn

-Casaba

-Casandra

-Case

-Casey

-Cash

-Casi

-Casia

-Casie

-Caspar

-Casper

-Cass

-Cassandra

-Cassandre

-Cassandry

-Cassaundra

-Casseus

-Cassey

-Cassi

-Cassian

-Cassie

-Cassondra

-Cassy

-Cat

-Cataldo

-Catalin

-Catarina

-Cate

-Caterina

-Catha

-Catharina

-Catharine

-Cathe

-Cathee

-Catherin

-Catherina

-Catherine

-Cathi

-Cathie

-Cathleen

-Cathlene

-Cathrin

-Cathrine

-Cathryn

-Cathy

-Cathyleen

-Cati

-Catie

-Catina

-Catlaina

-Catlee

-Catlin

-Catrin

-Catrina

-Catriona

-Caty

-Cavit

-Cay

-Cayce

-Cayla

-Cecelia

-Cecil

-Cecile

-Ceciley

-Cecilia

-Cecilla

-Cecily

-Cedrax

-Cedric

-Ceil

-Cele

-Celene

-Celeson

-Celesta

-Celeste

-Celestia

-Celestina

-Celestine

-Celestyn

-Celestyna

-Celia

-Celie

-Celil

-Celina

-Celinda

-Celine

-Celinka

-Celio

-Celisse

-Celle

-Cem

-Cemail

-Cemal

-Cemil

-Cengiz

-Cesar

-Cesar Augusto

-Cesya

-Cetin

-Cevin

-Ceyhan

-Cezar

-Cezmi

-Chad

-Chadd

-Chaddie

-Chaddy

-Chadi

-Chadwick

-Chafik

-Chaim

-Chaitanya

-Chakir

-Chakradhar

-Chakravarthi

-Chakri

-Chalapathi

-Chalmers

-Chalupny

-Chan

-Chance

-Chancey

-Chand

-Chanda

-Chandal

-Chandan

-Chandana

-Chanderjit

-Chandi

-Chandima

-Chandler

-Chandra

-Chandraseker

-Chandrasekhar

-Chandrika

-Chane

-Chang

-Channa

-Channing

-Chantal

-Chantalle

-Chao

-Chaouki

-Charandeep

-Charil

-Charin

-Chariot

-Charis

-Charissa

-Charisse

-Charita

-Charity

-Charla

-Charlean

-Charleen

-Charlena

-Charlene

-Charles

-Charleton

-Charley

-Charlie

-Charline

-Charlot

-Charlott

-Charlotta

-Charlotte

-Charlton

-Charly

-Charmain

-Charmaine

-Charmane

-Charmay

-Charmian

-Charmine

-Charmion

-Charo

-Charu

-Charudatta

-Charushila

-Charyl

-Chas

-Chase

-Chastity

-Chau

-Chaunce

-Chauncey

-Chavadar

-Chawki

-Che

-Cheav Lor

-Cheikh Boutar

-Chelsae

-Chelsea

-Chelsey

-Chelsie

-Chelsy

-Chelton

-Chelvam

-Chen

-Chendra

-Chenna

-Chenwei

-Cher

-Chere

-Cherey

-Cheri

-Cherianne

-Cherice

-Cherida

-Cherie

-Cherif

-Cherilyn

-Cherilynn

-Cherin

-Cherise

-Cherish

-Cherlyn

-Cherri

-Cherrita

-Cherry

-Chery

-Cherye

-Cheryl

-Cheslie

-Chester

-Cheston

-Chet

-Chetan

-Chev

-Chevalier

-Chevy

-Cheyne

-Chhaya

-Chi Quoc

-ChiChi

-Chian

-Chiarra

-Chickie

-Chicky

-Chieze

-Chihwen

-Chikkem

-Ching-Chih

-Chinta

-Chip

-Chiquita

-Chirag

-Chiranjeevi

-Chirika

-Chirra

-Chitralekha

-Chiwing

-Chloe

-Chloette

-Chlorinne

-Chloris

-Choonwee

-Choudary

-Chri

-Chris

-Chrisanthos

-Chrisitan

-Chrisovalantis

-Chriss

-Chrissa

-Chrissan

-Chrissie

-Chrissy

-Christ

-Christa

-Christabel

-Christabella

-Christabelle

-Christal

-Christalle

-Christan

-Christean

-Christel

-Christelle

-Christen

-Christer

-Christi

-Christiaan

-Christian

-Christiana

-Christiane

-Christiano

-Christie

-Christin

-Christina

-Christine

-Christo

-Christof

-Christofer

-Christoforus

-Christoph

-Christophe

-Christopher

-Christopher Emlyn

-Christopher Joachim

-Christopher John

-Christopher Leigh

-Christorpher

-Christos

-Christou

-Christy

-Christyna

-Chrisy

-Chrn

-Chrys

-Chrysa

-Chrysler

-Chrystal

-Chryste

-Chrystel

-Chrystelle

-Chuck

-Chudamani

-Chung

-Chung-Shup

-Churchill

-Chutima

-Chvilyov

-Ciara

-Cicekdagi

-Cicely

-Cicily

-Ciel

-Cierco

-Cigdem

-Cihan

-Cihat

-Cilia

-Cilka

-Cimarron

-Cin

-Cinda

-Cindee

-Cindelyn

-Cinderella

-Cindi

-Cindia

-Cindie

-Cindra

-Cindy

-Cinnamon

-Ciprian

-Ciprian-Sergiu

-Ciro

-Cissie

-Cissy

-Claas

-Claas-Tido

-Claes

-Clair

-Claire

-Clancy

-Clara

-Clarabelle

-Clarance

-Clare

-Clarence

-Claresta

-Clareta

-Claretta

-Clarette

-Clarey

-Clari

-Claribel

-Clarice

-Clarie

-Clarinda

-Clarine

-Clarisa

-Clarissa

-Clarisse

-Clarita

-Clark

-Clarke

-Clary

-Clas Ulrich

-Claude

-Claudelle

-Claudetta

-Claudette

-Claudia

-Claudia-Maria

-Claudie

-Claudina

-Claudine

-Claudio

-Claudiu

-Claudius

-Claus

-Clay

-Clayborn

-Clayborne

-Claybourne

-Clayton

-Clea

-Cleland

-Clem

-Clemence

-Clemens

-Clement

-Clemente

-Clementia

-Clementina

-Clementine

-Clements

-Clemmie

-Clemmy

-Cleo

-Cleopatra

-Clerissa

-Cletus

-Cleva

-Cleveland

-Cliff

-Clifford

-Clifton

-Clint

-Clinten

-Clinton

-Clio

-Cliva

-Clive

-Clo

-Cloe

-Cloris

-Clotilda

-Clotilde

-Clovis

-Clyde

-Cob

-Cobb

-Cobbie

-Cobby

-Codee

-Codi

-Codie

-Cody

-Cognos

-Colbert

-Cole

-Coleen

-Coleman

-Colene

-Coletta

-Colette

-Colin

-Colja

-Colleen

-Collete

-Collette

-Collie

-Collin

-Colline

-Collins

-Collmann

-Colly

-Con

-Conan

-Concettina

-Conchita

-Concordia

-Conder

-Cong

-Cong-Hoan

-Conney

-Conni

-Connie

-Connolly

-Connor

-Conny

-Conrad

-Conroy

-Consolata

-Constance

-Constancia

-Constancy

-Constanta

-Constantia

-Constantin

-Constantina

-Constantine

-Constantinescu

-Constantino

-Constantinos

-Constanze

-Consuela

-Consuelo

-Consultant

-Consultico

-Conway

-Cookie

-Cooper

-Cora

-Corabel

-Corabella

-Corabelle

-Coral

-Coralie

-Coraline

-Coralyn

-Corbin

-Corby

-Cord

-Cordelia

-Cordelie

-Cordey

-Cordie

-Cordula

-Cordy

-Coreen

-Corella

-Corena

-Corenda

-Corene

-Coretta

-Corette

-Corey

-Cori

-Corie

-Corilla

-Corina

-Corine

-Corinna

-Corinne

-Coriolan

-Coriss

-Corissa

-Corky

-Corliss

-Corly

-Cornel

-Cornela

-Cornelia

-Cornelis Antonius

-Corneliu

-Cornelius

-Cornelle

-Cornellis

-Cornie

-Corny

-Corrado

-Correna

-Correy

-Corri

-Corrianne

-Corrie

-Corrina

-Corrine

-Corrinne

-Corry

-Cortese

-Cortney

-Corwin

-Cory

-Cosetta

-Cosette

-Cosimo

-Coskun

-Cosmin

-Cosmo

-Costa

-Cottage

-Courtenay

-Courtney

-Craig

-Crawford

-Creighton

-Cresa

-Cris

-Crispin

-Crissie

-Crissy

-Crista

-Cristabel

-Cristal

-Cristen

-Cristi

-Cristian

-Cristian Xorxe

-Cristie

-Cristin

-Cristina

-Cristine

-Cristinel Florin

-Cristionna

-Cristobal

-Cristoph

-Cristopher

-Cristy

-Crysta

-Crystal

-Crystie

-Csaba

-Cumhur

-Curt

-Curtice

-Curtis

-Cy

-Cyb

-Cybal

-Cybel

-Cybelle

-Cybil

-Cybill

-Cyndi

-Cyndy

-Cynthea

-Cynthia

-Cynthie

-Cynthy

-Cyril

-Cyrill

-Cyrille

-Cyrillus

-Cyrus

-Dabney

-Dacey

-Dacia

-Dacie

-Dacy

-Dael

-Daemeon

-Daffi

-Daffie

-Daffy

-Dafna

-Dag

-Dagmar

-Dagobert

-Dahlia

-Dai

-Daile

-Daisey

-Daisi

-Daisie

-Daisy

-Daiva

-Dak

-Dale

-Dalenna

-Dalia

-Dalibor

-Dalila

-Dallas

-Daloris

-Dalton

-Damara

-Damaris

-Dameon

-Damian

-Damien

-Damir

-Damita

-Dammah

-Dammodar

-Damon

-Dan

-Dan Mihai

-Dana

-Dane

-Danell

-Danella

-Danelle

-Danette

-Dani

-Dania

-Danial

-Danica

-Danice

-Danie

-Daniel

-Daniel-Stefan

-Daniela

-Daniele

-Daniella

-Danielle

-Danijel

-Danijela

-Danika

-Danila

-Danilo

-Danionut

-Danit

-Danita

-Dankwart

-Danna

-Danni

-Dannie

-Danny

-Dannye

-Dante

-Danusch

-Danuta

-Danute

-Dany

-Danya

-Danyang

-Danyelle

-Danyette

-Danyl

-Daouda

-Dapeng

-Daphene

-Daphna

-Daphne

-Dapo

-Dara

-Darb

-Darbie

-Darby

-Darcee

-Darcey

-Darci

-Darcie

-Darcy

-Darda

-Dareen

-Darell

-Darelle

-Daren

-Dari

-Daria

-Darian

-Darice

-Darien

-Darin

-Dario

-Darius

-Dariusz

-Darko

-Darla

-Darleen

-Darlene

-Darline

-Darnell

-Darrel

-Darrell

-Darren

-Darrick

-Darrin

-Darryl

-Darsey

-Darshan

-Darsie

-Darth

-Darwin

-Darya

-Daryl

-Daryle

-Daryn

-Dasgupta

-Dasha

-Dashana

-Dasi

-Dasie

-Dasya

-Dat Sang

-Datakanja

-Datha

-Datla

-Daune

-Davaleen

-Dave

-Daveen

-Daves

-Daveta

-Davey

-David

-David-John

-Davida

-Davidde

-Davide

-Davide Alberto

-Davidson

-Davie

-Davin

-Davina

-Davinder

-Davine

-Davis

-Davita

-Davon

-Davor

-Davorin

-Davoud

-Davut

-Davy

-Dawid

-Dawn

-Dawn Sarah

-Dawna

-Dawson

-Dayimi

-Dayle

-Daymond

-Dayna

-Dea

-Deadrea

-Dean

-Deana

-Deane

-Deanna

-Deanne

-Deasun

-Deb

-Debaraj

-Debbi

-Debbie

-Debbra

-Debby

-Debee

-Debera

-Debi

-Debojyoti

-Debor

-Debora

-Deborah

-Debra

-Debraj

-Dede

-Dedie

-Dedra

-Dee

-Dee Dee

-Deeann

-Deeanne

-Deedee

-Deena

-Deep

-Deepa

-Deepa Sitarama

-Deepak

-Deepali

-Deepankar

-Deepesh

-Deepika

-Deepthi

-Deepti

-Deepu

-Deeraj

-Deerdre

-Dehlia

-Deidre

-Deina

-Deirdre

-Dejan

-Del

-Dela

-Delaney

-Delbert

-Delcina

-Delcine

-Dele

-Delia

-Delila

-Delilah

-Delinda

-Delkhosh

-Dell

-Della

-Delly

-Delmar

-Delora

-Delores

-Deloria

-Deloris

-Delphina

-Delphine

-Delphinia

-Delschad

-Demet

-Demeter

-Demetra

-Demetre

-Demetri

-Demetria

-Demetrios

-Demetris

-Demetrius

-Demian

-Demosthenis

-Dena

-Denes

-Deni

-Denice

-Denis

-Denise

-Deniz

-Denna

-Denni

-Dennie

-Dennis

-Denniver

-Denny

-Deny

-Denyo

-Denys

-Denyse

-Deon

-Deonne

-Derby

-Derek

-Derick

-Derk

-Dermot

-Derrek

-Derren

-Derrick

-Derrin

-Derrol

-Derron

-Derval

-Derya

-Deryck

-Deryl

-Desaree

-Desdemona

-Desiderio

-Desimir

-Desirae

-Desire

-Desiree

-Desiri

-Desislava

-Desmond

-Desmund

-Desolar

-Despina

-Dess

-Detlef

-Detleff

-Detlev

-Deva

-Devan

-Devang

-Devashish

-Develle

-Devender

-Devesh

-Devi

-Devin

-Devina

-Devinim

-Devinne

-Devkinandan

-Devon

-Devondra

-Devonna

-Devonne

-Devora

-Dew

-Dewey

-Dewitt

-Dexter

-Dhamaresh

-Dhana

-Dhananjaya

-Dharmendra

-Dheeraj

-Dhinesh

-Dhiraj

-Dhrity

-Di

-Diahann

-Diamond

-Dian

-Diana

-Diandra

-Diane

-Diane-Marie

-Dianemarie

-Diann

-Dianna

-Dianne

-Diannne

-Dick

-Dickey

-Dickie

-Dickmann-Keden

-Dickson

-Didem

-Didi

-Didier

-Dido

-Diedrich

-Diego

-Diem

-Diemo

-Diena

-Dierdre

-Dierk

-Dieter

-Dietfried

-Diethard

-Diethelm

-Dietmar

-Dietrich

-Dijana

-Dilba

-Dileep

-Dilek

-Dilip

-Dilli

-Dillon

-Dilshad

-Dimas

-Dimiter

-Dimitri

-Dimitrij

-Dimitrios

-Dimitris

-Dimitrou

-Dimitry

-Dimple

-Dina

-Dinah

-Dinand

-Dinesh

-Dinh Chi

-Dinkar

-Dinnie

-Dinny

-Dino

-Diogo

-Dion

-Dione

-Dionis

-Dionne

-Dionne Kivale

-Dionysus

-Dipak

-Dipankar

-Dipen

-Dipty

-Diran

-Dirck

-Dirk

-Dirk Michael

-Dishant

-Dita

-Ditmar

-Dittmar

-Ditto

-Divya

-Diwan

-Dix

-Dixie

-Dixon

-Diyanov

-Djalil

-Djelloul

-Djordje

-Dmeeko

-Dmitri

-Dmitrij

-Dmitriy

-Dmitry

-Dmytro

-Dobre

-Dobromir

-Dodd

-Doddi

-Dode

-Dodi

-Dodie

-Dody

-Doe

-Dokuru

-Dolce

-Doll

-Dolley

-Dolli

-Dollie

-Dolly

-Dolora

-Dolores

-Dolorita

-Doloritas

-Dom

-Dombrowski

-Domenic

-Domenico

-Domiano

-Domingo

-Domingos

-Dominic

-Dominica

-Dominick

-Dominik

-Dominique

-Don

-Dona

-Donal

-Donald

-Donato

-Donavon

-Doncy

-Donella

-Donelle

-Donetta

-Dongmo

-Donia

-Donica

-Donielle

-Donn

-Donna

-Donnajean

-Donnamarie

-Donni

-Donnie

-Donny

-Donovan

-Dora

-Dorairaj

-Doralia

-Doralin

-Doralyn

-Doralynn

-Doralynne

-Dorcas

-Dore

-Doreen

-Dorelia

-Dorella

-Dorelle

-Dorena

-Dorene

-Doretta

-Dorette

-Dorey

-Dori

-Doria

-Dorian

-Dorice

-Dorie

-Dorin

-Dorine

-Doris

-Dorisa

-Dorise

-Dorit

-Dorita

-Dorll

-Doro

-Dorolice

-Dorolisa

-Doron

-Dorota

-Dorotea

-Doroteya

-Dorothea

-Dorothee

-Dorothy

-Dorree

-Dorri

-Dorrie

-Dorris

-Dorry

-Dorthea

-Dorthy

-Doru

-Dory

-Doshi

-Dosi

-Dot

-Doti

-Dotti

-Dottie

-Dotty

-Doug

-Dougal

-Douggie

-Dough

-Dougie

-Douglas

-Douglass

-Douglis

-Dov

-Dove

-Doyle

-Dragan

-Dragana

-Dragisa

-Dragos

-Drake

-Drazen

-Drea

-Drew

-Driss

-Dru

-Dryke

-Duan

-Duane

-Dubizhansky

-Dubravko

-Duc Thanh

-Ducournot

-Dudley

-Duffie

-Duffy

-Dugan

-Duke

-Dulce

-Dulcea

-Dulci

-Dulcia

-Dulciana

-Dulcie

-Dulcine

-Dulcinea

-Dulcy

-Dulsea

-Dunc

-Duncan

-Dunja

-Dunstan

-Durand

-Durant

-Durante

-Duration

-Durell

-Durga

-Durgashish

-Durmus

-Durward

-Dusan

-Duschan

-Dushyantha

-Dusko

-Dustin

-Dusty

-Duval

-Duy

-Dwain

-Dwaine

-Dwane

-Dwayne

-Dwight

-Dyan

-Dyana

-Dyane

-Dyanko

-Dyann

-Dyanna

-Dyanne

-Dylan

-Dymatrix

-Dyna

-Dynah

-Dys

-Dyson

-Dzevair

-Dzmitry

-E'Lane

-ELISABETH

-EMMANUEL

-Eada

-Eadie

-Eadith

-Ealasaid

-Eamonn

-Earenest

-Earl

-Earl-Bertram

-Earle

-Earma

-Eartha

-Eashwari

-Easter

-Easton

-Eba

-Ebage

-Ebba

-Eben

-Ebeneser

-Ebenezer

-Eberhard

-Ebi

-Ebonee

-Ebony

-Echeverria

-Eckard

-Eckart

-Eckehard

-Eckehardt

-Eckehart

-Eckhard

-Eckhardt

-Eckhart

-Ed

-Eda

-Edda

-Eddi

-Eddie

-Eddine

-Eddy

-Ede

-Edee

-Edeline

-Edelyn

-Eden

-Edgar

-Edgardo

-Edi

-Edie

-Edik

-Edin

-Edita

-Edith

-Editha

-Edithe

-Ediva

-Edmond

-Edmund

-Edna

-Edna-Jane

-Edoardo

-Edore

-Edouard

-Edsel

-Edu

-Eduard

-Eduardo

-Edvard

-Edvin

-Edward

-Edwin

-Edwina

-Edy

-Edyth

-Edythe

-Edzard

-Efe

-Effie

-Efim

-Efraim

-Efram

-Efstratios

-Egbert

-Egidius

-Egils

-Egmont

-Egon

-Egor

-Ehson

-Ehud

-Ehyae

-Eidarus

-Eigenmann

-Eike

-Eileen

-Eilis

-Eilish

-Eimile

-Einar

-Eirena

-Eis

-Ekard

-Ekaterina

-Ekaterini

-Ekkart

-Ekkehard

-Ekkhart

-Ekta

-El Bromoe

-El Mostafa

-El Sewisy

-Elaina

-Elaine

-Elan

-Elana

-Elane

-Elarbi

-Elayne

-Elbert

-Elberta

-Elbertina

-Elbertine

-Elden

-Eldin

-Eldon

-Eldred

-Eleanor

-Eleanora

-Eleanore

-Electra

-Eleftherios

-Elena

-Elene

-Eleni

-Elenore

-Eleonora

-Eleonore

-Eleph

-Eleveld

-Elfie

-Elfreda

-Elfrida

-Elfrieda

-Elfriede

-Elga

-Elham

-Eli

-Elian

-Eliane

-Elianora

-Elianore

-Elias

-Elicia

-Elie

-Elihu

-Elijah

-Elin

-Eline

-Elinor

-Elinore

-Elio

-Eliot

-Eliott

-Elis Daniel

-Elisa

-Elisabet

-Elisabeth

-Elisabetta

-Elisaweta

-Elise

-Elisha

-Elissa

-Elita

-Eliza

-Elizabet

-Elizabeth

-Eljakim

-Elka

-Elke

-Ella

-Elladine

-Elle

-Ellen

-Ellene

-Ellette

-Elli

-Ellie

-Elliot

-Elliott

-Ellis

-Ellissa

-Ellsworth

-Ellwood

-Elly

-Ellyn

-Ellynn

-Elmar

-Elmer

-Elmir

-Elmira

-Elmontasser

-Elmore

-Elna

-Elnar

-Elnora

-Elnore

-Eloina

-Eloisa

-Eloise

-Elona

-Elonore

-Elora

-Elric

-Elroy

-Elsa

-Elsbeth

-Else

-Elsey

-Elsi

-Elsie

-Elsinore

-Elspeth

-Elsy

-Elton

-Elva

-Elvera

-Elvin

-Elvina

-Elvira

-Elviro

-Elvis

-Elwin

-Elwina

-Elwira

-Elwood

-Elwyn

-Ely

-Elyn

-Elysa

-Elyse

-Elysee

-Elysha

-Elysia

-Elyssa

-Elzbieta

-Em

-Ema

-Emalee

-Emalia

-Emannuel

-Emanoil

-Emanuel

-Emanuela

-Emanuele

-Emanuil

-Emanule

-Eme-Onwuka

-Emeka

-Emelda

-Emelia

-Emelina

-Emeline

-Emelita

-Emelyne

-Emera

-Emerson

-Emery

-Emil

-Emile

-Emilee

-Emili

-Emilia

-Emilie

-Emiline

-Emilio

-Emily

-Emin

-Emin Islam

-Emir

-Emlyn

-Emlynn

-Emlynne

-Emma

-Emmalee

-Emmaline

-Emmalyn

-Emmalynn

-Emmalynne

-Emmanuel

-Emmeline

-Emmerich

-Emmery

-Emmet

-Emmett

-Emmey

-Emmi

-Emmie

-Emmit

-Emmo

-Emmott

-Emmy

-Emmye

-Emogene

-Emory

-Emrah

-Emran

-Emre

-Emyle

-Emylee

-Ender

-Endora

-Endre

-Engelbart

-Engelbert

-Engele

-Engelhardt

-Engin

-Englebart

-Englebert

-Engler

-Engracia

-Enid

-Enis

-Enitan

-Eniz

-Ennio

-Enno

-Enoch

-Enohebob

-Enow

-Enrica

-Enricao

-Enrichetta

-Enrico

-Enrika

-Enriko

-Enrique

-Enrique Prado

-Enriqueta

-Enrrique

-Ensar

-Ensel

-Enver

-Enya

-Eolanda

-Eolande

-Ephraim

-Ephram

-Ephrayim

-Ephrem

-Er

-Eradin

-Eran

-Erasmia

-Erasmus

-Erastus

-Ercan

-Ercan-Murteza

-Erda

-Erdal

-Erdem

-Erden

-Erdik

-Erdinc

-Erdmute

-Erdogan

-Erek

-Eren

-Erena

-Erhan

-Erhard

-Erhart

-Eric

-Erica

-Erich

-Ericha

-Erick

-Ericka

-Ericson

-Erik

-Erik Arjan

-Erika

-Erikjan

-Erin

-Erina

-Erinn

-Erinna

-Erkan

-Erkki

-Erl

-Erlend

-Erma

-Ermengarde

-Ermentrude

-Ermin

-Ermina

-Erminia

-Erminie

-Erna

-Ernaline

-Ernest

-Ernesta

-Ernestine

-Ernesto

-Ernie

-Erno

-Ernst

-Erny

-Erol

-Errikos

-Errol

-Ersan

-Ersay

-Ersel

-Ersin

-Ertan

-Ertha

-Ertugrul

-Ertunc

-Erturul

-Ervan

-Ervin

-Erwin

-Eryn

-Erzsebet

-Esau

-Esdert

-Eser

-Esferjani

-Esh

-Eshwara

-Esma

-Esmail

-Esmaria

-Esme

-Esmee

-Esmeralda

-Esmerelda

-Esra

-Essa

-Essanhaji

-Essie

-Essy

-Esta

-Esteban

-Estel

-Estele

-Estell

-Estella

-Estelle

-Ester

-Esther

-Estrella

-Estrellita

-Estuardo

-Eswar

-Eszter

-Eteson

-Ethan

-Ethel

-Ethelbert

-Ethelda

-Ethelin

-Ethelind

-Etheline

-Ethelred

-Ethelyn

-Ethyl

-Etienne

-Etl

-Etta

-Etti

-Ettie

-Ettore

-Etty

-Euclid

-Eudora

-Eugen

-Eugene

-Eugenia

-Eugenie

-Eugenio

-Eugeniusz

-Eugine

-Eula

-Eulalie

-Eunice

-Euphemia

-Eustace

-Eustache

-Eustacia

-Ev

-Eva

-Evaleen

-Evan

-Evangelia

-Evangelin

-Evangelina

-Evangeline

-Evangelos

-Evania

-Evanne

-Evans

-Eve

-Eveleen

-Evelin

-Evelina

-Eveline

-Evelyn

-Evelyne

-Even

-Everard

-Everett

-Everton

-Evette

-Evey

-Evgenij

-Evgeny

-Evgueni

-Evi

-Evie

-Evita

-Evonne

-Evrim

-Evstathios

-Evvie

-Evvy

-Evy

-Ewa

-Ewald

-Ewan

-Ewart

-Excelsis

-Eyde

-Eydie

-Ez

-Ezechiel

-Ezekiel

-Ezra

-FANGMING

-Fabian

-Fabiano

-Fabio

-Fabiola

-Fabrianne

-Fabrice

-Fadi

-Fadil

-Fadile

-Fae

-Faina

-Fairfax

-Faisal

-Faith

-Faiz

-Faizullah

-Faizur

-Falah

-Falck

-Falco

-Falguni

-Falk

-Falkmar

-Falko

-Fallon

-Fan

-Fanchette

-Fanchon

-Fancie

-Fancy

-Fanechka

-Fang

-Fania

-Fankhauser

-Fanlong

-Fanni

-Fannie

-Fanny

-Fanya

-Fara

-Farah

-Farakh

-Faramarz

-Farand

-Fararmarz

-Fares Daoud

-Farhad

-Farhat

-Fariba

-Fariborz

-Farica

-Farid

-Farideh

-Faris

-Farley

-Farooq

-Farra

-Farrah

-Farrand

-Farrukh

-Farshad

-Farshid

-Faruk

-Farzad

-Farzin

-Fassoulas

-Fatah

-Fatih

-Fatima

-Fatma

-Fatos

-Faun

-Faunie

-Faustina

-Faustine

-Fawn

-Fawna

-Fawne

-Fawnia

-Fay

-Faydra

-Faye

-Fayette

-Fayina

-Fayre

-Fayssal

-Fayth

-Faythe

-Fazeel

-Fazil

-Fazl

-Fazlollah

-Federica

-Federico

-Fedora

-Fei

-Felecia

-Felicdad

-Felice

-Felicia

-Felicien

-Felicio

-Felicity

-Felicle

-Feliks

-Felipa

-Felipe

-Felisha

-Felita

-Felix

-Feliza

-Femi

-Fen

-Fenelia

-Feng

-Fenician

-Feodora

-Ferd

-Ferdi

-Ferdie

-Ferdinand

-Ferdinanda

-Ferdinande

-Ferdinando

-Ferdy

-Ferenc

-Fergus

-Ferguson

-Ferhat

-Ferinand

-Ferit

-Fern

-Fernanda

-Fernande

-Fernandina

-Fernando

-Ferne

-Feroz

-Ferruccio

-Ferry

-Feukam-Chindji

-Fey

-Fiann

-Fianna

-Fickinger

-Fico

-Fidel

-Fidela

-Fidelia

-Fidelity

-Fifi

-Fifine

-Figula

-Fikret

-Filbert

-Filia

-Filide

-Filip

-Filipe

-Filipov

-Filippa

-Filippo

-Filiz

-Filmore

-Fin

-Fina

-Finbarr

-Findlay

-Finley

-Finn

-Fiona

-Fionan

-Fionna

-Fionnula

-Fiorenze

-Firoz

-Fisaha

-Fitz

-Fitzgerald

-Flavio

-Flem

-Fleming

-Flemming

-Fletch

-Fletcher

-Fleur

-Fleurette

-Flin

-Flinn

-Flint

-Flipper

-Flo

-Floca

-Flor

-Flora

-Florance

-Flore

-Florella

-Florence

-Florencia

-Florencio

-Florent

-Florentia

-Florentin

-Florenza

-Florette

-Flori

-Floria

-Florian

-Florice

-Florida

-Florie

-Florin

-Florina

-Florinda

-Floris

-Florri

-Florrie

-Florry

-Flory

-Flossi

-Flossie

-Flossy

-Flower

-Floyd

-Flynn

-Focke

-Fola

-Folashade

-Folker

-Fons

-Fonsie

-Fonz

-Fonzie

-Forbes

-Ford

-Forest

-Forester

-Foris

-Forough

-Forouhar

-Forrest

-Forrester

-Forster

-Fortuna

-Fortune

-Foster

-Fouad

-Fouzia

-Fowler

-Fox

-Fran

-Franc

-France

-Francene

-Frances

-Francesca

-Francesco

-Francesmary

-Franciene

-Francine

-Francios

-Francis

-Francisca

-Francisco

-Franciska

-Franck

-Franco

-Francois

-Francoise

-Francyne

-Franja

-Frank

-Frank Joachim

-Frankie

-Franklin

-Franklyn

-Franky

-Franni

-Frannie

-Franny

-Frans

-Frantisek

-Franz

-Franz-Josef

-Franz-Joseph

-Franz-Martin

-Franz-Peter

-Franz-Xaver

-Franziska

-Fraser

-Frayda

-Frazier

-Fred

-Freda

-Freddi

-Freddie

-Freddy

-Fredelia

-Frederic

-Frederica

-Frederich

-Frederick

-Fredericka

-Frederico

-Frederik

-Fredi

-Fredia

-Fredjeffry

-Fredra

-Fredric

-Fredrik

-Fredrick

-Fredrika

-Fredy

-Freeman

-Freemon

-Freida

-Freidoun

-Fremont

-French

-Frerk

-Frida

-Fried

-Frieda

-Friedbert

-Friedegard

-Friedel

-Friedemann

-Frieder

-Friederike

-Friedhelm

-Friedmar

-Friedric

-Friedrich

-Friedrick

-Frihjof

-Frithjof

-Fritjof

-Fritz

-Fritz-Dieter

-Frohwalt

-Fru

-Fts

-Fuad

-Fuat

-Fulton

-Fulvia

-Funda

-Funing

-Fyodor

-GUENTER

-Gabbey

-Gabbi

-Gabbie

-Gabe

-Gabey

-Gabi

-Gabie

-Gabor

-Gabriel

-Gabriela

-Gabriele

-Gabriell

-Gabriella

-Gabrielle

-Gabriellia

-Gabriello

-Gabrila

-Gaby

-Gachago

-Gae

-Gael

-Gaetano

-Gagan

-Gagandeep

-Gagar

-Gagik

-Gail

-Gale

-Galen

-Galia

-Galina

-Gallagher

-Galvin

-Galyna

-Gamal

-Gamaliel

-Gameda

-Gana

-Ganapathy

-Ganesan

-Ganesh

-Ganeswara

-Gang

-Ganga

-Gangadhar

-Gangaih

-Gange

-Ganna

-Ganz

-Garcia

-Garcon

-Gardener

-Gardiner

-Gardner

-Gareth

-Garett

-Garey

-Garfield

-Garfinkel

-Garikoitz

-Garland

-Garnet

-Garnette

-Garold

-Garp

-Garret

-Garrett

-Garrido

-Garrot

-Garrott

-Garry

-Garth

-Garv

-Garvey

-Garvin

-Garvy

-Garwin

-Garwood

-Gary

-Gaspar

-Gasper

-Gaston

-Gates

-Gaurang

-Gaurav

-Gauray

-Gautam

-Gautami

-Gautham

-Gautier

-Gav

-Gaven

-Gavin

-Gavra

-Gavriel

-Gavrielle

-Gay

-Gayathri

-Gayatri

-Gayla

-Gayle

-Gayleen

-Gaylene

-Gaynor

-Gbade

-Ge

-Gean

-Gearard

-Gebhard

-Ged

-Gedeon

-Geert

-Geeta

-Geetha

-Geetu

-Gehad

-Gehard

-Gehrig

-Geiger

-Gelya

-Gen

-Gena

-Genadiev

-Gene

-Genela

-Genene

-Generation

-Geneva

-Genevieve

-Genevra

-Gengbin

-Genia

-Genna

-Gennadi

-Gennadij

-Gennadiy

-Gennady

-Gennaro

-Genni

-Gennie

-Gennifer

-Genny

-Genovera

-Genvieve

-Geof

-Geoff

-Geoffrey

-Geoffry

-Georg

-Georg Christian

-Georg Magnus

-Georg Walter

-George

-George Godfrey

-Georgeanna

-Georgeanne

-Georgena

-Georges

-Georgeta

-Georgetta

-Georgette

-Georgi

-Georgia

-Georgiamay

-Georgiana

-Georgianna

-Georgianne

-Georgie

-Georgina

-Georgine

-Georgios

-Georgis

-Georgy

-Gera

-Gerad

-Gerald

-Geralda

-Geraldina

-Geraldine

-Geraldo

-Gerard

-Gerard Paul

-Gerardo

-Gerardus

-Gerd

-Gerd-Uwe

-Gerda

-Gere

-Gergely

-Gerhard

-Gerhardine

-Gerhardt

-Gerhart

-Gerhild

-Geri

-Gerianna

-Gerianne

-Gerion

-Gerjan

-Gerladina

-Gerlinde

-Germain

-Germaine

-German

-Germana

-Germo

-Gernant

-Gernold

-Gernot

-Gero

-Gerold

-Gerolf

-Gerome

-Gerrard

-Gerri

-Gerrick

-Gerrie

-Gerrilee

-Gerrit

-Gerry

-Gershom

-Gershon

-Gert

-Gert-Jan

-Gerta

-Gertcho

-Gerth

-Gerti

-Gertie

-Gertrud

-Gertruda

-Gertrude

-Gertrudis

-Gerty

-Gervais

-Gervasio

-Gerwald

-Gerwin

-Geza

-Ghasan

-Ghassan

-Gheorghe

-Gholamreza

-Gia

-Giacinta

-Giacomo

-Gian

-Giana

-Giancarlo

-Giandomenico

-Gianina

-Gianna

-Gianni

-Gianpaolo

-Giavani

-Gibb

-Gibbs

-Gibson

-Gideon

-Giesela

-Giff

-Giffard

-Giffer

-Giffie

-Gifford

-Giffy

-Gigi

-Gijsbert

-Gil

-Gila

-Gilbert

-Gilberta

-Gilberte

-Gilbertina

-Gilbertine

-Gilberto

-Gilburt

-Gilda

-Giles

-Gill

-Gillan

-Gillbert

-Gilles

-Gilli

-Gillian

-Gillie

-Gilligan

-Gilly

-Gina

-Ginelle

-Ginevra

-Ginger

-Ginni

-Ginnie

-Ginnifer

-Ginny

-Gino

-Giordano

-Giorgi

-Giorgia

-Giorgio

-Giovanna

-Giovanne

-Giovanni

-Gipsy

-Gir

-Giralda

-Giraldo

-Girard

-Giraud

-Giri

-Giridhar

-Girija

-Girish

-Gisbert

-Gisela

-Gisele

-Gisella

-Giselle

-Gita

-Gitta

-Gitte

-Giudo

-Giuliana

-Giuliano

-Giulio

-Giuseppe

-Giuseppe Luciano

-Gizela

-Gizella

-Glad

-Gladi

-Gladis

-Gladys

-Glazman

-Gleb

-Gleda

-Glen

-Glenda

-Glenine

-Glenn

-Glenna

-Glennie

-Glennis

-Gligorce

-Glori

-Gloria

-Gloria-Tamara

-Gloriana

-Gloriane

-Glorianna

-Glory

-Glunde

-Glyn

-Glyn Alexander

-Glynda

-Glynis

-Glynn

-Glynnis

-Gnanavel

-Gnaneshwar

-Gnanvel

-Godard

-Godart

-Goddard

-Goddart

-Godehard

-Godfree

-Godfrey

-Godfry

-Godiva

-Godwin

-Goeran August

-Goerg

-Goergis

-Goetz

-Goetzfried

-Goher

-Goitom

-Golam

-Golda

-Goldarina

-Goldi

-Goldia

-Goldie

-Goldina

-Goldy

-Golmaghani

-Gomer

-Goncalo

-Gonzales

-Gonzalo

-Goober

-Goose

-Gopakumar

-Gopal

-Gopala

-Gopalakrishna

-Gopalasamy

-Gopi

-Gopinath

-Goran

-Gorbir

-Gordan

-Gordana

-Gordian

-Gordie

-Gordon

-Goreja

-Gorkem

-Gosnel

-Gottfried

-Gotthard

-Gouane

-Goudarz

-Govinda

-Govindan

-Gowri

-Gpl

-Grace

-Gracia

-Gracie

-Gracjan

-Grady

-Graehme

-Graeme

-Graham

-Graig

-Grant

-Granville

-Grata

-Gratia

-Gratiana

-Graupp

-Gray

-Grayce

-Grazia

-Graziella

-Grazyna

-Gredel

-Greer

-Greg

-Gregg

-Greggory

-Gregor

-Gregorio

-Gregorius

-Gregory

-Gregoy

-Greta

-Gretal

-Gretchen

-Grete

-Gretel

-Grethel

-Gretna

-Gretta

-Grieb

-Grier

-Griff

-Griffin

-Griffith

-Grigoriy

-Grimm

-Grischa

-Grischan

-Griselda

-Grissel

-Griswold

-Grit

-Grove

-Grover

-Gruve

-Grzegorz

-Gudrun

-Guduru

-Guel

-Guenael

-Guendogan

-Guendolen

-Guenevere

-Guenna

-Guennadi

-Guenther

-Guglielma

-Gui

-Guido

-Guilherme

-Guillaume

-Guillema

-Guillemette

-Guillermo

-Guinevere

-Guinna

-Guiseppe

-Gulam

-Guleena

-Gulp

-Guna

-Gunar

-Gunars

-Gundi

-Gundolf

-Gunilla

-Gunjan

-Gunnar

-Gunnard

-Gunner

-Gunter

-Gunthard

-Gunther

-Guntram

-Gunvor

-Guoqiang

-Gupta

-Gurbir

-Gurcharanjit

-Gurdev

-Gurjith

-Gurmeet

-Gurmit

-Gurpreet

-Gurram

-Gursel

-Guru

-Gurumoorthy

-Guruprasad

-Gururaj

-Gus

-Gusella

-Gussi

-Gussie

-Gussy

-Gusta

-Gustaaf

-Gustaf

-Gustav

-Gustav-Josef

-Gustave

-Gustavo

-Gustavus

-Gusti

-Gustie

-Gusty

-Guthrey

-Guthrie

-Guthry

-Guus

-Guy

-Gwen

-Gwendolen

-Gwendolin

-Gwendolyn

-Gweneth

-Gwenette

-Gwenn

-Gwenneth

-Gwenni

-Gwennie

-Gwenny

-Gwenora

-Gwenore

-Gwyn

-Gwyneth

-Gwynne

-Gyan

-Gyani

-Gyorgy

-Gypsy

-Gyula

-Habeeb

-Haberzettl

-Habib

-Hacen

-Haci

-Hackbarth

-Hadi

-Hadleigh

-Hadley

-Hadria

-Hadrian

-Hafid

-Hafize

-Hagan

-Hagen

-Hai Phan

-Haidar

-Haiko

-Haileab

-Hailee

-Hailey

-Haily

-Haining

-Hair

-Hairong

-Haitem

-Haja

-Hajo

-Hak Joon

-Hakan

-Hakeem

-Hakim

-Hal

-Hale

-Haleigh

-Halette

-Haley

-Hali

-Halidun

-Halie

-Halil

-Halim

-Halimeda

-Hall

-Hallam

-Halley

-Halli

-Hallie

-Hally

-Haluk

-Halvard

-Ham

-Hamadi

-Hamdeh

-Hamdi

-Hamdy

-Hamed

-Hamel

-Hamid

-Hamidreza

-Hamil

-Hamilton

-Hamish

-Hamit

-Hamlen

-Hamlet

-Hamlin

-Hammad

-Hammer

-Hamnet

-Hamza

-Hamzad

-Han

-Han Ting

-Hana

-Hanacek

-Hanan

-Hande

-Hanford

-Hanfried

-Hang

-Hani

-Haniff

-Hanis

-Hank

-Hanman

-Hanna

-Hannah

-Hanne

-Hanneke

-Hannelore

-Hannemann

-Hannes

-Hanni

-Hannibal

-Hannie

-Hannis

-Hanno

-Hanns

-Hanns-Georg

-Hanny

-Hans

-Hans-Peter

-Hansdieter

-Hansel

-Hansen

-Hansjoerg

-Hansjuergen

-Hanson

-Hanspeter

-Hansueli

-Hanumath

-Hao-Wen

-Haojie

-Happy

-Har

-Harald

-Harcourt

-Hardeep

-Hardev

-Hardi

-Hardik

-Hardin

-Hardy

-Hareesh

-Haresh

-Hari

-Hari Prased Reddy

-Hari Sadhan

-Harika

-Harini

-Hariraj

-Haris

-Harish

-Harish Kumat

-Haritha

-Harl

-Harlan

-Harland

-Harlene

-Harley

-Harli

-Harlie

-Harlin

-Harm

-Harman

-Harme

-Harmeet

-Harmon

-Harmonia

-Harmonie

-Harmony

-Harneet

-Harold

-Harpreet

-Harprit

-Harri

-Harrie

-Harriet

-Harriett

-Harrietta

-Harriette

-Harring

-Harriot

-Harriott

-Harris

-Harrison

-Harro

-Harrold

-Harrry

-Harry

-Harsh

-Harsha

-Harshada

-Harshal

-Hart

-Hartley

-Hartmann

-Hartmut

-Hartmuth

-Hartwell

-Hartwig

-Harun

-Harv

-Harvard

-Harvey

-Harvie

-Harwell

-Hasan

-Hasani

-Haseeb

-Hasheem

-Hashem

-Hashemi

-Hashim

-Hasim

-Haskel

-Haskell

-Hassan

-Hassnane

-Hasso

-Hastings

-Hasty

-Hatem

-Hatti

-Hattie

-Hatty

-Hauke

-Haven

-Havivah

-Hawk

-Haydar

-Haydeh

-Hayden

-Haydon

-Haye

-Hayes

-Hayley

-Hayri

-Hayward

-Haywood

-Hazan

-Hazel

-Hazim

-Haziq

-Heath

-Heathcliff

-Heather

-Hebert

-Heberto

-Hechmi

-Hector

-Heda

-Hedda

-Heddi

-Heddie

-Hedi

-Hedvig

-Hedwig

-Hedy

-Heida

-Heide

-Heidi

-Heidie

-Heidrun

-Heijo

-Heike

-Heiko

-Heimo

-Hein

-Heiner

-Heinfried

-Heino

-Heinrich

-Heins

-Heinz

-Heio

-Helaina

-Helaine

-Helen

-Helen-Elizabeth

-Helena

-Helene

-Helfrich

-Helfried

-Helga

-Helge

-Helgo

-Helia

-Helio

-Heliodoro

-Helise

-Hella

-Helle

-Hellene

-Helli

-Hellmut

-Hellmuth

-Helma

-Helmar

-Helmer

-Helmke

-Helmut

-Helmuth

-Heloise

-Helsa

-Helyn

-Hem

-Hema

-Hemant

-Hemanth

-Hemat

-Hemraj

-Henderson

-Hendrick

-Hendrik

-Hendrika

-Henk

-Henka

-Hennadiy

-Henner

-Henning

-Henri

-Henric

-Henrich

-Henricus

-Henrie

-Henrieta

-Henrietta

-Henriette

-Henrik

-Henrike

-Henrique

-Henry

-Henryetta

-Henryk

-Hentry

-Hephzibah

-Heragu

-Herb

-Herbert

-Herbie

-Herby

-Hercule

-Hercules

-Herculie

-Herfried

-Hergen

-Heribert

-Heriberto

-Herley

-Herman

-Hermann

-Hermia

-Hermilo

-Hermina

-Hermine

-Herminia

-Hermione

-Hermon

-Hermy

-Hernando

-Hernani

-Herold

-Herrick

-Herrmann

-Hersch

-Herschel

-Hersh

-Hershel

-Herta

-Hertha

-Herve

-Hervey

-Herwart

-Herwig

-Hery

-Hesam

-Hester

-Hesther

-Hestia

-Hetti

-Hettie

-Hetty

-Hew

-Hewe

-Hewet

-Hewett

-Hewie

-Hewitt

-Heywood

-Hezekiah

-Hibner

-Hicham

-Hidayet

-Hiep

-Hieu

-Higgins

-Hikmet

-Hilal

-Hilari

-Hilarie

-Hilary

-Hilbert

-Hilda

-Hildagard

-Hildagarde

-Hilde

-Hildegaard

-Hildegard

-Hildegarde

-Hildy

-Hilke

-Hilko

-Hill

-Hillard

-Hillary

-Hillel

-Hillery

-Hilliard

-Hilliary

-Hilmar

-Hilton

-Hiltraud

-Hiltrud

-Hima

-Himanshu

-Himesh

-Hinda

-Hinderk

-Hinrich

-Hira

-Hiralal

-Hiram

-Hiranmayi

-Hiren

-Hiro

-Hirsch

-Hirun

-Hischam

-Hiten

-Hitendra

-Hitesh

-Hitter

-Hiwa

-Hjalmar

-Hoang

-Hobart

-Hodge

-Hogan

-Holde

-Holger

-Holley

-Holli

-Hollie

-Hollis

-Holly

-Holly-Anne

-Hollyanne

-Homayoun

-Homer

-Honey

-Hong

-Hongliang

-Hongtze

-Hongwei

-Hongzhong

-Honor

-Honoria

-Hooshang

-Hope

-Horace

-Horacio

-Horatia

-Horatio

-Horatiu

-Horatius

-Horia Radu Razvan

-Horia Vlad

-Horst

-Hortense

-Hortensia

-Hosea

-Hoshang

-Hossai

-Hossam

-Hossein

-Hosursrinivas

-Houda

-Houman

-Houshfar

-Houssem

-Howard

-Howie

-Hoyt

-Huan

-Huang

-Hubert

-Hubertus

-Hudson

-Hue

-Huey

-Hugh

-Hugo

-Hui

-Huibert

-Huig Jan

-Hulda

-Humayun

-Humbert

-Humberto

-Humphrey

-Hunt

-Hunter

-Huntington

-Huntlee

-Huntley

-Hurley

-Husain

-Husam

-Huschang

-Husein

-Huseyin

-Hussain

-Hussein

-Hutan

-Huvat

-Huw

-Huxley

-Huy

-Hy

-Hyacinth

-Hyacintha

-Hyacinthe

-Hyacinthia

-Hyacinthie

-Hyatt

-Hyman

-Hymie

-Hynda

-Hynek

-Iago

-Iain

-Iakov

-Ian

-Iancu

-Ianthe

-Ianto

-Ibbie

-Ibby

-Ibikunle

-Ibolya

-Ibrahim

-Ibs

-Ichabod

-Ida

-Idalia

-Idalina

-Idaline

-Ide

-Idell

-Idelle

-Idette

-Iggie

-Iggy

-Igli

-Ignace

-Ignacio

-Ignacius

-Ignatius

-Ignaz

-Ignazio

-Igor

-Ihsan

-Ike

-Ikey

-Ikhlaq

-Ilan

-Ilana

-Ilango

-Ilario

-Ileana

-Ileane

-Ilene

-Ilhan

-Ilia

-Ilias

-Ilidio

-Ilija

-Ilinka

-Ilise

-Iliyan

-Ilja

-Ilka

-Ilker

-Illa

-Ilona

-Ilsa

-Ilse

-Ilya

-Ilyas

-Ilysa

-Ilyse

-Ilyssa

-Imad

-Imelda

-Imke

-Immad

-Immanuel

-Immo

-Imo

-Imogen

-Imogene

-Imojean

-Imran

-Imre

-Imrich

-Ina

-Inan

-Inci

-Inder

-Inderjit

-Indira

-Indra

-Indu

-Indy

-Ines

-Inese

-Inesita

-Inessa

-Inez

-Infutura

-Inga

-Ingaberg

-Ingaborg

-Ingamar

-Ingbert

-Inge

-Inge-Marie

-Ingeberg

-Ingeborg

-Ingelbert

-Ingemar

-Inger

-Ingke

-Inglebert

-Ingmar

-Ingo

-Ingolf

-Ingram

-Ingrid

-Ingunna

-Inigo

-Inka

-Inna

-Ioan

-Ioana

-Ioannis

-Iolande

-Iolanthe

-Iona

-Ionel

-Iormina

-Ipade

-Iqbal

-Ira

-Iradj

-Irakli

-Iram

-Irena

-Irene

-Ireneusz

-Irfan

-Irina

-Irineo

-Irio

-Iris

-Irita

-Irma

-Irmgard

-Irmhild

-Irvin

-Irvine

-Irving

-Irwin

-Iryna

-Isa

-Isaac

-Isaak

-Isaam

-Isabeau

-Isabel

-Isabela

-Isabelita

-Isabell

-Isabella

-Isabelle

-Isack

-Isador

-Isadora

-Isadore

-Isahella

-Isaiah

-Isak

-Iseabal

-Ishmael

-Isidor

-Isidora

-Isidore

-Isis

-Islam

-Ismail

-Isobel

-Isolde

-Israel

-Issam

-Issi

-Issidoros

-Issie

-Issy

-Istvan

-Italo

-Itamar

-Itay

-Itzchak

-Iulia

-Iva

-Ivan

-Ivana

-Ivar

-Ive

-Iven

-Ives

-Ivett

-Ivette

-Ivica

-Ivie

-Ivo

-Ivonne

-Ivor

-Ivory

-Ivy

-Iwe

-Izaak

-Izabel

-Izabela

-Izak

-Izzi

-Izzy

-Jaap

-Jabez

-Jacckeline

-Jace

-Jacek

-Jacenta

-Jacinda

-Jacinta

-Jacintha

-Jacinthe

-Jack

-Jackelyn

-Jacki

-Jackie

-Jacklin

-Jacklyn

-Jackquelin

-Jackqueline

-Jackson

-Jacky

-Jaclin

-Jaclyn

-Jacob

-Jacobo

-Jacquelin

-Jacqueline

-Jacquelyn

-Jacquelynn

-Jacquenetta

-Jacquenette

-Jacques

-Jacquetta

-Jacquette

-Jacqui

-Jacquie

-Jacynth

-Jaczek

-Jada

-Jade

-Jadranko

-Jadwiga

-Jae

-Jaerock

-Jafar

-Jaffer

-Jagadessh

-Jagadish

-Jagajeevan

-Jagan

-Jagan Mohan

-Jagannath

-Jagdish

-Jagmohan

-Jahan

-Jahan Zaib

-Jahangir

-Jahir

-Jai

-Jaideep

-Jaime

-Jaimie

-Jain

-Jaine

-Jairo

-Jake

-Jakob

-Jakov

-Jakub

-Jaldip

-Jaleh

-Jamah

-Jamal

-Jame

-James

-Jameson

-Jamey

-Jami

-Jamie

-Jamil

-Jamima

-Jammie

-Jamshid

-Jan

-Jana

-Janak

-Janaya

-Janaye

-Jandy

-Jane

-Janean

-Janeczka

-Janeen

-Janek

-Janel

-Janela

-Janella

-Janelle

-Janene

-Janenna

-Janessa

-Janet

-Janeta

-Janete

-Janetta

-Janette

-Janeva

-Janey

-Jani

-Jania

-Janice

-Janie

-Janifer

-Janina

-Janine

-Janir

-Janis

-Janith

-Janka

-Janko

-Jann

-Janna

-Jannel

-Jannelle

-Jannis

-Janos

-Janot

-Janus

-Janusz

-Jany

-Jaquelin

-Jaqueline

-Jaquelyn

-Jaquenetta

-Jaquenette

-Jaquith

-Jaraj

-Jared

-Jarek

-Jarjis

-Jarl

-Jaroslav

-Jaroslaw

-Jarrett

-Jarun

-Jarvis

-Jasbir

-Jashan

-Jashavau

-Jasmeet

-Jasmin

-Jasmina

-Jasmine

-Jasna

-Jason

-Jaspal

-Jasper

-Jatin

-Jatinder

-Jaume

-Jaun

-Javaid

-Javed

-Javid

-Javier

-Jawahar

-Jawaid

-Jaweed

-Jawwad

-Jay

-Jaya

-Jayakrishna

-Jayakumar

-Jayanthi

-Jayaraju

-Jayashree

-Jayasree

-Jayasri

-Jayavel

-Jaydeep

-Jayme

-Jaymee

-Jaymes

-Jayne

-Jaynell

-Jazmin

-Jean

-Jean-Christophe

-Jean-Francois

-Jean-Guy

-Jean-Lou

-Jean-Luc

-Jean-Marc

-Jean-Nat

-Jean-Paul

-Jean-Pierre

-Jeana

-Jeanbaptiste

-Jeane

-Jeanelle

-Jeanena

-Jeanette

-Jeanie

-Jeanine

-Jeanlouis

-Jeanmarc

-Jeanna

-Jeanne

-Jeannene

-Jeannette

-Jeannie

-Jeannine

-Jeanpol

-Jeb

-Jed

-Jedediah

-Jedrzej

-Jeep

-Jeevan

-Jef

-Jeff

-Jefferey

-Jefferson

-Jeffery

-Jeffie

-Jeffrey

-Jeffry

-Jefry

-Jega

-Jehan

-Jehanna

-Jehu

-Jelene

-Jelle

-Jemie

-Jemima

-Jemimah

-Jemmie

-Jemmy

-Jen

-Jena

-Jenda

-Jenelle

-Jenette

-Jeni

-Jenica

-Jeniece

-Jenifer

-Jeniffer

-Jenilee

-Jenin

-Jenine

-Jenn

-Jenna

-Jennee

-Jennette

-Jenni

-Jennica

-Jennie

-Jennifer

-Jennilee

-Jennine

-Jennings

-Jenny

-Jens

-Jensen

-Jeong

-Jephthah

-Jerald

-Jeraldine

-Jeralee

-Jeramie

-Jere

-Jereme

-Jeremiah

-Jeremias

-Jeremie

-Jeremy

-Jeri

-Jerina

-Jermain

-Jermaine

-Jermayne

-Jeroen

-Jerold

-Jerome

-Jeromy

-Jerri

-Jerrie

-Jerrilee

-Jerrilyn

-Jerrine

-Jerrold

-Jerrome

-Jerry

-Jerrylee

-Jervis

-Jerzy

-Jesenia

-Jesper

-Jess

-Jessa

-Jessalin

-Jessalyn

-Jessamine

-Jessamyn

-Jesse

-Jessee

-Jesselyn

-Jessey

-Jessi

-Jessica

-Jessie

-Jessika

-Jessy

-Jesus

-Jesus Omar

-Jet

-Jetchko

-Jeth

-Jethro

-Jewel

-Jewell

-Jewelle

-Jewgenij

-Jeyahan

-Jeyapratha

-Jhangeir

-Jhinn

-Jian

-Jianchun

-Jiangbo

-Jianhe

-Jianjun

-Jiayin

-Jiazhen

-Jibola

-Jidao

-Jie

-Jigesh

-Jigna

-Jignesh

-Jill

-Jillana

-Jillane

-Jillayne

-Jilleen

-Jillene

-Jilli

-Jillian

-Jillie

-Jilly

-Jim

-Jimbo

-Jimmie

-Jimmy

-Jin

-Jin-Ho

-Jinesh

-Jing

-Jingyi

-Jinhee

-Jini

-Jinny

-Jinzhen

-Jip

-Jiri

-Jirka

-Jit

-Jiten

-Jitender

-Jitendra

-Jithen

-Jithendra

-Jithesh

-Jitin

-Jo

-Jo Ann

-Jo-Ann

-Jo-Anne

-JoAnn

-JoAnne

-Joab

-Joachim

-Joakim

-Joan

-Joana

-Joane

-Joanie

-Joann

-Joanna

-Joanne

-Joannes

-Joannis

-Joao

-Joaquin

-Jobey

-Jobi

-Jobie

-Jobina

-Jobst

-Joby

-Jobye

-Jobyna

-Jocelin

-Joceline

-Jocelyn

-Jocelyne

-Jochem

-Jochen

-Jochim

-Jock

-Jodee

-Jodi

-Jodie

-Jody

-Joe

-Joel

-Joela

-Joelie

-Joell

-Joella

-Joelle

-Joellen

-Joelly

-Joellyn

-Joelynn

-Joerg

-Joern

-Joete

-Joey

-Joh

-Johan

-Johann

-Johann Georg

-Johanna

-Johannah

-Johanne

-Johannes

-Joharsyah

-Johm

-John

-John-David

-John-Patrick

-John-Willie

-Johnathan

-Johnathon

-Johnette

-Johnna

-Johnnel

-Johnnie

-Johnny

-Johnson

-Johny

-Joice

-Joji

-Jojo

-Jole

-Jolee

-Joleen

-Jolene

-Joletta

-Joli

-Jolie

-Joline

-Joly

-Jolyn

-Jolynn

-Jommy

-Jon

-Jonah

-Jonas

-Jonathan

-Jonathon

-Jonell

-Jones

-Joni

-Jonie

-Jonis

-Jonnadula

-Jonny

-Joo Sung

-Joop

-Joost

-Joran

-Jordain

-Jordan

-Jordana

-Jordanna

-Jordi

-Jordon

-Jordy

-Jorey

-Jorge

-Jori

-Jorie

-Jorrie

-Jorry

-Jory

-Joscelin

-Jose

-Josean

-Josee

-Josef

-Josefa

-Josefina

-Josefine

-Joselito

-Joselyn

-Josep

-Joseph

-Josepha

-Josephina

-Josephine

-Josephus

-Josey

-Josh

-Joshi

-Joshua

-Joshuah

-Josi

-Josiah

-Josie

-Josip

-Joslyn

-Josselyn

-Jost

-Josu

-Josua

-Josy

-Joszef

-Jotham

-Jothi

-Jourdan

-Jouri

-Jovan

-Joy

-Joya

-Joyan

-Joyann

-Joyce

-Joycelin

-Joydeep

-Joye

-Joyous

-Jozef

-Jozsef

-Juan

-Juan-Luis

-Juana

-Juanita

-Jubran

-Jud

-Judah

-Judas

-Judd

-Jude

-Judi

-Judie

-Judit

-Judith

-Juditha

-Judson

-Judy

-Judye

-Jue

-Juedienne

-Juel da Silva

-Juergen

-Juki

-Jule

-Julee

-Jules

-Juli

-Julia

-Julian

-Juliana

-Juliane

-Juliann

-Julianna

-Julianne

-Julie

-Julien

-Julienne

-Juliet

-Julieta

-Julietta

-Juliette

-Julina

-Juline

-Julio

-Julissa

-Julita

-Julius

-Jun

-Junaid

-June

-Junette

-Junia

-Junichiro

-Junie

-Junina

-Junior

-Juraj

-Jurek

-Jurgen

-Juri

-Jurij

-Justice

-Justin

-Justina

-Justine

-Justis

-Justus

-Jutta

-Juzar

-Jyothi

-Jyothsna

-Jyoti

-Jyotirmai

-KATIE

-Kaari

-Kabil

-Kacey

-Kacie

-Kacy

-Kadambi

-Kade

-Kader

-Kadidja

-Kadir

-Kadosa

-Kae-Shyuan

-Kaetan

-Kaeye

-Kai

-Kai-Uwe

-Kaia

-Kaila

-Kailasa

-Kaile

-Kailey

-Kais

-Kaiser

-Kaitlin

-Kaitlyn

-Kaitlynn

-Kaja

-Kajal

-Kakalina

-Kal

-Kala

-Kaladhar

-Kalam

-Kalathilk

-Kaleb

-Kaleena

-Kali

-Kalie

-Kalil

-Kalila

-Kalina

-Kalinda

-Kalindi

-Kalle

-Kalli

-Kallol

-Kally

-Kalman

-Kalpa

-Kalpana

-Kalpesh

-Kalvin

-Kalyan

-Kalyana

-Kalyani

-Kam

-Kamal

-Kamala

-Kambiz

-Kameko

-Kamel

-Kamen

-Kamesh

-Kamil

-Kamila

-Kamilah

-Kamillah

-Kamlesh

-Kamran

-Kanakagiri

-Kandace

-Kandy

-Kane

-Kang

-Kania

-Kanitz

-Kanmani

-Kanna

-Kannan

-Kant

-Kanth

-Kanwal

-Kanwarjit

-Kanya

-Kaori

-Kapil

-Kappe

-Kar

-Kara

-Kara-Lynn

-Karalee

-Karalynn

-Karan

-Karanveer

-Karayigit

-Kare

-Karee

-Kareem

-Karel

-Karen

-Karen Jane

-Karena

-Kari

-Karia

-Karie

-Karifa

-Karikalan

-Karil

-Karilynn

-Karim

-Karin

-Karin Mercedes

-Karina

-Karine

-Kariotta

-Karipi

-Karisa

-Karissa

-Karita

-Karkhy

-Karl

-Karl Wilhelm

-Karl-Heinz

-Karla

-Karlee

-Karleen

-Karlen

-Karlene

-Karlheinz

-Karlie

-Karlo

-Karlotta

-Karlotte

-Karly

-Karlyn

-Karmen

-Karna

-Karol

-Karola

-Karole

-Karolina

-Karoline

-Karoly

-Karon

-Karrah

-Karrie

-Karry

-Karsten

-Karthi

-Karthik

-Karthikeyan

-Kartik

-Kartini

-Karun

-Karuna

-Kary

-Karyl

-Karylin

-Karyn

-Kas

-Kasey

-Kashif

-Kasi

-Kaspar

-Kass

-Kassandra

-Kassem

-Kassey

-Kassi

-Kassia

-Kassie

-Kaster

-Kasturi

-Kat

-Kata

-Katalin

-Katarina

-Katarzyna

-Kate

-Katee

-Katell

-Katerina

-Katerine

-Katey

-Kath

-Katha

-Katharina

-Katharine

-Katharyn

-Kathe

-Katheleen

-Katherina

-Katherine

-Katheryn

-Kathi

-Kathie

-Kathleen

-Kathlene

-Kathlin

-Kathrin

-Kathrine

-Kathryn

-Kathryne

-Kathy

-Kathye

-Kati

-Katie

-Katina

-Katine

-Katinka

-Katja

-Katleen

-Katlin

-Katrin

-Katrina

-Katrine

-Katrinka

-Katti

-Kattie

-Katuscha

-Katusha

-Katy

-Katya

-Kaur

-Kaushal

-Kaushik

-Kaveh

-Kavin

-Kavita

-Kavitha

-Kay

-Kayal

-Kayan

-Kaycee

-Kaye

-Kayla

-Kayle

-Kaylee

-Kayley

-Kaylil

-Kaylyn

-Kazem

-Kazi

-Kazim

-Ke

-Kedar

-Kee

-Keefe

-Keeley

-Keelia

-Keely

-Keen

-Keenan

-Keene

-Keerthi

-Keerti

-Keiichi

-Keiko

-Keil

-Keino

-Keisha

-Keith

-Kelcey

-Kelci

-Kelcie

-Kelcy

-Kelila

-Kellan

-Kellen

-Kelley

-Kelli

-Kellia

-Kellie

-Kellina

-Kellsie

-Kelly

-Kellyann

-Kelsey

-Kelsi

-Kelsy

-Kelvin

-Kelwin

-Kemail

-Kemal

-Ken

-Kenan

-Kendal

-Kendall

-Kendra

-Kendre

-Kendrick

-Kenn

-Kenna

-Kennedy

-Kenneth

-Kenny

-Kent

-Kenton

-Kenyon

-Kerem

-Keren

-Keri

-Keriann

-Kerianne

-Kermie

-Kermit

-Kerri

-Kerrie

-Kerrill

-Kerrin

-Kerry

-Kersten

-Kerstin

-Keryl

-Kesavan

-Keshav

-Kesley

-Keslie

-Kessia

-Kessiah

-Ketan

-Kethakone

-Ketti

-Kettie

-Ketty

-Keun

-Kevan

-Keve

-Kevien

-Kevin

-Kevina

-Kevyn

-Keyan

-Keyur

-Khaja

-Khaldoun

-Khaled

-Khaleque

-Khalid

-Khalil

-Khamis

-Khamran

-Khan

-Khatchatour

-Khattri

-Khoa

-Khoi

-Khosrow

-Khurram

-Ki

-Kia

-Kiah

-Kial

-Kiara

-Kibar

-Kiele

-Kieron

-Kiersten

-Kikelia

-Kiley

-Kilian

-Kilichan

-Kiljan

-Kim

-Kim John

-Kimball

-Kimber

-Kimberlee

-Kimberley

-Kimberli

-Kimberly

-Kimberlyn

-Kimbra

-Kimmi

-Kimmie

-Kimmo

-Kimmy

-Kimson

-Kin

-Kincaid

-King

-Kinga

-Kingsley

-Kingsly

-Kingston

-Kinna

-Kinnar

-Kip

-Kipp

-Kippie

-Kippy

-Kira

-Kiran

-Kiranmayi

-Kirbee

-Kirbie

-Kirby

-Kiri

-Kiriakos

-Kiril

-Kirill

-Kirk

-Kirsten

-Kirsteni

-Kirsti

-Kirstie

-Kirstin

-Kirstyn

-Kirtzel

-Kishore

-Kiss

-Kissee

-Kissiah

-Kissie

-Kit

-Kitti

-Kittie

-Kitty

-Kizzee

-Kizzie

-Kjell

-Kjetil

-Klaas

-Klaas-Arjan

-Klara

-Klarika

-Klarrisa

-Klaudius

-Klaus

-Klaus-Peter

-Kleantis

-Klee

-Klemens

-Kliebhan

-Knox

-Knud

-Knut

-Koch

-Koganti

-Kokou

-Kokwah

-Kol

-Kolja

-Kolozsvary

-Komla Amenyo

-Komlan

-Kondal

-Kongo

-Konrad

-Konstadinos

-Konstance

-Konstaninos

-Konstantin

-Konstantinos

-Konstanze

-Koo

-Kora

-Koral

-Koralle

-Koray

-Korbinian

-Kordula

-Kore

-Korella

-Koren

-Koressa

-Kori

-Korie

-Kornelius

-Korney

-Koroush

-Korrie

-Korry

-Kory

-Kosa

-Kosawat

-Kosmas

-Kossi

-Kostas

-Koteswararao

-Kothandapani

-Kothari

-Koti

-Koung

-Kourosh

-Kourtney

-Kousik

-Koustubh

-Kozhiparambil

-Kraig

-Krandall

-Kranthi

-Kraygg

-Kreg

-Krikor

-Kris

-Krish

-Krishi

-Krishna

-Krishnamaneni

-Krissie

-Krissy

-Krista

-Kristal

-Kristan

-Kriste

-Kristel

-Kristen

-Krister

-Kristi

-Kristian

-Kristie

-Kristien

-Kristijan

-Kristin

-Kristina

-Kristine

-Kristopher

-Kristos

-Kristy

-Kristyn

-Krisztian

-Kriti

-Krucz

-Krunoslav

-Krupa

-Krupal

-Kruthika

-Krysta

-Krystal

-Krystalle

-Krystle

-Krystyna

-Krzysztof

-Ksawery

-Kshitij

-Kuchernig

-Kudret

-Kuldeep

-Kumar

-Kumaran

-Kumaravel

-Kun

-Kunak

-Kunal

-Kunar

-Kunibert

-Kunle

-Kunter

-Kunverji

-Kunze

-Kurian

-Kuridi

-Kurt

-Kurtis

-Kuruparan

-Kvasnicka

-Kvetoslava

-Kwame

-Kya

-Kyla

-Kyle

-Kylen

-Kylie

-Kylila

-Kylynn

-Kym

-Kynan

-Kynthia

-Kyo

-Kyoung-Yong

-Kyriaki

-Kyrill

-Kyrillos

-Kyrstin

-Labaron

-Lacee

-Lacey

-Lachonda

-Lacie

-Lacy

-Ladislaus

-Ladislav

-Ladonna

-Laetitia

-Laila

-Laina

-Lainey

-Laiqi

-Laird

-Lajos

-Laksh

-Lakshana

-Lakshman

-Lakshmi

-Lakshmikanth

-Lalit

-Lamar

-Lamb

-Lambert

-Lambertus

-Lamonica

-Lamont

-Lamonte

-Lan Quoc

-Lana

-Lance

-Lancelot

-Lane

-Lanette

-Laney

-Lang

-Langston

-Lani

-Lanie

-Lanita

-Lanna

-Lanni

-Lanny

-Lara

-Laraine

-Larbi

-Lari

-Larina

-Larine

-Larisa

-Larissa

-Lark

-Larry

-Lars

-Larysa

-Laryssa

-Lassaad

-Lasse

-Laszlo

-Latashia

-Latchezar

-Lateah

-Latha

-Latia

-Latif

-Latifi

-Latisa

-Latisha

-Latoya

-Latrena

-Latrina

-Laura

-Lauraine

-Laural

-Lauralee

-Laurance

-Laure

-Lauree

-Laureen

-Laurel

-Laurella

-Lauren

-Laurena

-Laurence

-Laurene

-Laurens

-Laurent

-Lauretta

-Laurette

-Lauri

-Laurianne

-Laurice

-Laurie

-Lauryn

-Lavanya

-Lavena

-Lavenya

-Laverna

-Laverne

-Lavin

-Lavina

-Lavinia

-Lavinie

-Lawerence

-Lawrence

-Lawson

-Lawton

-Laxman

-Laxmi

-Lay

-Layla

-Layne

-Layney

-Layton

-Lazar

-Lazare

-Lazaro

-Lazarus

-Lazlo

-Le

-Le Duy

-Lea

-Leah

-Leander

-Leandra

-Leandro

-Leann

-Leanna

-Leanne

-Leanor

-Leanora

-Lebbie

-Lech

-Leda

-Lee

-Lee Ann

-LeeAnn

-Leeann

-Leeanne

-Leeja

-Leela

-Leelah

-Leena

-Leesa

-Leese

-Lefty

-Legra

-Lehvinen

-Lei

-Leia

-Leiah

-Leif

-Leigh

-Leigha

-Leighton

-Leila

-Leilah

-Leilani

-Leisha

-Leiv

-Lela

-Lelah

-Leland

-Lelia

-Lem

-Lemar

-Lemmie

-Lemmy

-Lemuel

-Len

-Lena

-Lenard

-Lenee

-Lenette

-Lenka

-Lenna

-Lennart

-Lenney

-Lennie

-Lenny

-Lenora

-Lenore

-Lenuseni

-Leo

-Leodora

-Leohard

-Leoine

-Leola

-Leoline

-Leon

-Leona

-Leonanie

-Leonard

-Leonard Nigel

-Leonardo

-Leone

-Leonelle

-Leonerd

-Leonhard

-Leonhardt

-Leonid

-Leonidas

-Leonie

-Leonora

-Leonore

-Leontine

-Leontyne

-Leopold

-Leora

-Leorah

-Leroy

-Les

-Leshia

-Lesley

-Lesli

-Leslie

-Lesly

-Lester

-Lesya

-Leta

-Lethia

-Leticia

-Letisha

-Letitia

-Letta

-Letti

-Lettie

-Letty

-Lev

-Levend

-Levent

-Levente

-Levi

-Levik

-Levin

-Levon

-Levy

-Lewey

-Lewis

-Leyla

-Lezlie

-Lia

-Liam

-Lian

-Liana

-Liane

-Liang

-Lianna

-Lianne

-Lib

-Libbey

-Libbi

-Libbie

-Libby

-Libor

-Licha

-Lida

-Lidia

-Liebgard

-Liesegang

-Lieselotte

-Lieven

-Lil

-Lila

-Lilah

-Lilas

-Lilia

-Lilian

-Liliana

-Liliane

-Lilias

-Lilith

-Lilla

-Lilli

-Lillian

-Lilliana

-Lillis

-Lilllie

-Lilly

-Lily

-Lilyan

-Lilye

-Limin

-Lin

-Lina

-Linas

-Lincoln

-Lind

-Linda

-Lindi

-Lindie

-Lindsay

-Lindsey

-Lindsy

-Lindy

-Linea

-Linell

-Linet

-Linette

-Ling

-Lingeswara

-Lingutla

-Linh

-Linhua

-Linlin

-Linn

-Linnart

-Linnea

-Linnell

-Linnet

-Linnie

-Linoel

-Linson

-Linus

-Linzy

-Lion

-Lionel

-Lionello

-Liora

-Liorah

-Liping

-Lira

-Lisa

-Lisabeth

-Lisandra

-Lisbeth

-Lise

-Lisetta

-Lisette

-Lisha

-Lishe

-Lissa

-Lissi

-Lissie

-Lissy

-Lita

-Liudmila

-Liuka

-Livia

-Liviu

-Livius

-Lix

-Liyu

-Liyun

-Liz

-Liza

-Lizabeth

-Lizardi

-Lizbeth

-Lizette

-Lizzie

-Lizzy

-Ljuben

-Ljubisa

-Ljubomir

-Llewellyn

-Lloyd

-Lluis

-Lobo

-Loca

-Locke

-Lockwood

-Loella

-Logan

-Loic

-Lois

-Loise

-Lokesh

-Lola

-Lolande

-Loleta

-Lolita

-Lolly

-Lon

-Lona

-Lonee

-Long

-Longe

-Loni

-Lonna

-Lonni

-Lonnie

-Lonny

-Lora

-Lorain

-Loraine

-Loralee

-Loralie

-Loralyn

-Lorant

-Lore

-Loree

-Loreen

-Lorelei

-Lorelle

-Loren

-Lorena

-Lorene

-Loreno

-Lorens

-Lorenz

-Lorenza

-Lorenzo

-Loretta

-Lorettalorna

-Lorette

-Lori

-Loria

-Lorianna

-Lorianne

-Lorie

-Lorilee

-Lorilyn

-Lorinda

-Lorine

-Loris

-Lorita

-Lorna

-Lorne

-Lorraine

-Lorrayne

-Lorri

-Lorrie

-Lorrin

-Lorry

-Lory

-Lotfi

-Lothar

-Lotta

-Lotte

-Lotthar

-Lotti

-Lottie

-Lotty

-Lou

-Louella

-Louie

-Louis

-Louisa

-Louise

-Louisette

-Love

-Lovell

-Lowell

-Lu

-Luai

-Luan

-Luana

-Luanna

-Luben

-Lubna

-Lubomir

-Lubor

-Lubos

-Luboslav

-Luc

-Luc Touomo

-Luca

-Lucas

-Luce

-Luci

-Lucia

-Lucian

-Luciana

-Luciano

-Lucie

-Lucien

-Lucienne

-Lucijano

-Lucila

-Lucilia

-Lucille

-Lucina

-Lucinda

-Lucine

-Lucio

-Lucita

-Lucius

-Luckie

-Lucky

-Lucretia

-Lucy

-Ludek

-Ludger

-Ludmilla

-Ludvig

-Ludwig

-Ludwin

-Luella

-Luelle

-Luigi

-Luis

-Luis Castano

-Luisa

-Luise

-Luiz

-Luiza

-Lukas

-Lukasz

-Luke

-Lula

-Lulita

-Lulu

-Luna

-Lund

-Luois

-Lupo

-Lupus

-Lura

-Lurangwa

-Lurette

-Lurlean

-Lurleen

-Lurlene

-Lurline

-Lusa

-Lust

-Luther

-Lutz

-Luu

-Lux

-Luying

-Luzia

-Luzian

-Luzius

-Ly-Na

-Lyda

-Lydia

-Lydie

-Lyle

-Lyn

-Lynda

-Lynde

-Lyndel

-Lyndell

-Lyndon

-Lyndsay

-Lyndsey

-Lyndsie

-Lyndy

-Lynea

-Lynelle

-Lynett

-Lynette

-Lynn

-Lynna

-Lynne

-Lynnea

-Lynnell

-Lynnelle

-Lynnet

-Lynnett

-Lynnette

-Lynsey

-Lysandra

-Lyssa

-MICHAEL

-MOCHAMAD

-Maamar

-Maarten

-Mab

-Mabel

-Mabelle

-Mable

-Mac

-MacFarlane

-MacKenzie

-Macario

-Mace

-Machiel

-Machkuri

-Maciej

-Maciek

-Mack

-Mackenzie

-Macygon

-Mada

-Madahavi

-Madalena

-Madalyn

-Madanagopal

-Maddalena

-Maddi

-Maddie

-Maddy

-Madel

-Madelaine

-Madeleine

-Madelena

-Madelene

-Madelin

-Madelina

-Madeline

-Madella

-Madelle

-Madelon

-Madelyn

-Madge

-Madhav

-Madhava

-Madhavi

-Madhawa

-Madhu

-Madhukar

-Madhumalati

-Madhumita

-Madhur

-Madhura

-Madhuri

-Madhusudan

-Madhusudana

-Madi

-Madison

-Madlen

-Madlin

-Madona

-Madonna

-Mady

-Mae

-Maegan

-Mag

-Magaret

-Magarita

-Magda

-Magdaia

-Magdalen

-Magdalena

-Magdalene

-Magdolna

-Magdy-Elia

-Maggee

-Maggi

-Maggie

-Maggy

-Magna

-Magnum

-Magnus

-Mahad

-Mahadev

-Mahala

-Mahalia

-Mahamat Hassane

-Mahapatra

-Mahathi

-Mahavir

-Mahboob

-Mahbubul

-Mahdad

-Mahdavi

-Mahender

-Maher

-Mahesh

-Mahesh Kumar

-Maheshwar

-Mahira

-Mahmood

-Mahmoud

-Mahmud

-Mahmut

-Mahsa

-Mai-Hong

-Maia

-Maible

-Maiga

-Maik

-Maike

-Maimuna

-Mainul

-Mair

-Maire

-Mairead

-Maisey

-Maisie

-Maison

-Maite

-Majella

-Majgaard

-Majid

-Majid Reza

-Major

-Makram

-Maksim

-Maksym

-Mala

-Malanie

-Malcah

-Malcolm

-Malena

-Mali

-Malia

-Malika

-Malin

-Malina

-Malinda

-Malinde

-Malini

-Malissa

-Malissia

-Malka

-Malkah

-Malli

-Mallik

-Mallika

-Mallissa

-Mallorie

-Mallory

-Malmberg

-Malorie

-Malory

-Malte

-Malva

-Malvina

-Maly

-Malynda

-Mamata

-Mamatha

-Mamdouh

-Mame

-Mamie

-Mamoun

-Mamta

-Mamtha

-Manaa

-Manam

-Manas

-Manasa

-Manda

-Mandapati

-Mandar

-Mandava

-Mandeep

-Mandhar

-Mandi

-Mandie

-Mandiro

-Mandy

-Manfred

-Manfredo

-Mangu

-Mani

-Mani Afschar

-Manik

-Manikandan

-Manikanth

-Manimaran

-Manimarran

-Manish

-Manisha

-Manishkumar

-Manjit

-Manjunath

-Manjunatha

-Manjushree

-Manny

-Manohar

-Manoj

-Manole

-Manolis

-Manolj

-Manon

-Manor

-Manpreet

-Mansi

-Mansoor

-Mansour

-Mansur

-Mantena

-Mantis

-Manucher

-Manuel

-Manuela

-Manya

-Mara

-Marabel

-Marat

-Marc

-Marc-Arno

-Marcel

-Marcela

-Marcelia

-Marcell

-Marcella

-Marcelle

-Marcellina

-Marcelline

-Marcello

-Marcellus

-Marcelo

-Marchall

-Marchelle

-Marci

-Marcia

-Marcie

-Marcile

-Marcille

-Marcin

-Marcio

-Marco

-Marcos

-Marcus

-Marcy

-Mardjan

-Marea

-Mareah

-Mareen

-Marei

-Marek

-Maren

-Marena

-Maressa

-Marga

-Margalit

-Margalo

-Margaret

-Margareta

-Margarete

-Margaretha

-Margarethe

-Margaretta

-Margarette

-Margarida

-Margarita

-Margaux

-Marge

-Margeaux

-Margee

-Margery

-Marget

-Margette

-Margi

-Margie

-Margit

-Margitta

-Marglerite

-Margo

-Margot

-Margret

-Margrit

-Marguerite

-Margurite

-Margy

-Mari

-Maria

-Mariah

-Mariam

-Marian

-Mariana

-Mariann

-Marianna

-Marianne

-Mariano

-Maribel

-Maribelle

-Maribeth

-Marice

-Maridel

-Marie

-Marie-Ann

-Marie-Jeanne

-Marieann

-Mariejeanne

-Marieke

-Mariel

-Mariela

-Mariele

-Marielle

-Mariellen

-Marietta

-Mariette

-Marigold

-Marija

-Marijan

-Marijo

-Marika

-Marilee

-Marilin

-Marillin

-Marilu

-Marilyn

-Marin

-Marina

-Marinko

-Marinna

-Mario

-Marion

-Mariquilla

-Maris

-Marisa

-Mariska

-Marissa

-Marit

-Marita

-Maritess

-Maritsa

-Marius

-Mariusz

-Mariya

-Marj

-Marja

-Marje

-Marjetka

-Marji

-Marjie

-Marjorie

-Marjory

-Marjy

-Mark

-Marketa

-Markku

-Marko

-Markos

-Markoto

-Markus

-Markwart

-Marla

-Marlane

-Marleah

-Marlee

-Marleen

-Marlena

-Marlene

-Marley

-Marlie

-Marlies

-Marlin

-Marline

-Marlis

-Marlo

-Marlon

-Marlow

-Marlowe

-Marlyn

-Marmaduke

-Marna

-Marne

-Marney

-Marni

-Marnia

-Marnie

-Maroun

-Marquard

-Marquita

-Marrilee

-Marris

-Marrissa

-Marry

-Marsette

-Marsh

-Marsha

-Marshal

-Marshall

-Marsiella

-Mart

-Marta

-Martainn

-Martelle

-Marten

-Martguerita

-Martha

-Marthe

-Marthena

-Marti

-Martica

-Martie

-Martijn

-Martin

-Martina

-Martine

-Martino

-Martita

-Marty

-Martyn

-Martynne

-Marv

-Marve

-Marven

-Marvin

-Marwan

-Marwin

-Mary

-Marya

-Maryam

-Maryangelyn

-Maryann

-Maryanna

-Maryanne

-Marybelle

-Marybeth

-Maryellen

-Maryjane

-Maryjo

-Maryl

-Marylee

-Marylin

-Marylinda

-Marylou

-Marylynne

-Maryrose

-Marys

-Marysa

-Maryse

-Marzia

-Marzio

-Masen

-Masha

-Masihollah

-Maslanka

-Mason

-Masoud

-Massar

-Massari

-Massimiliano

-Massimo

-Massoud

-Masud

-Mat

-Matej

-Matelda

-Mateo

-Mateusz

-Mathew

-Mathias

-Mathieu

-Mathilda

-Mathilde

-Mathis

-Mathukutty

-Matias

-Matilda

-Matilde

-Mato

-Matous

-Matt

-Mattea

-Matteo

-Matthaeus

-Mattheus

-Matthew

-Matthias

-Matthieu

-Matthiew

-Matthus

-Matti

-Mattia

-Mattias

-Mattie

-Mattios

-Matty

-Matvey

-Maud

-Maude

-Maudie

-Maulik

-Maulin

-Maura

-Maure

-Maureen

-Maureene

-Maurene

-Mauri

-Maurice

-Mauricio

-Maurie

-Maurine

-Maurise

-Maurita

-Maurits

-Mauritz

-Maurizio

-Mauro

-Maury

-Mavis

-Mavra

-Max

-Maxfield

-Maxi

-Maxie

-Maxim

-Maxime

-Maximilian

-Maximiliano

-Maximilien

-Maxine

-Maxwell

-Maxy

-May

-Maya

-Mayank

-Mayares

-Maybelle

-Mayda

-Maye

-Mayer

-Maynak

-Maynard

-Maynord

-Mayo

-Mayor

-Mayuk

-Mayur

-Mazin

-Mazowa

-Mead

-Meade

-Meagan

-Meaghan

-Meara

-Mechelle

-Mecit

-Medved

-Meenu

-Meenu Abinaya

-Meesha

-Meesum

-Meg

-Megan

-Megen

-Meggan

-Meggi

-Meggie

-Meggy

-Megha

-Meghan

-Meghana

-Meghann

-Megna

-Mehdi

-Mehetabel

-Mehmed

-Mehmet

-Mehmood

-Mehran

-Mehrdad

-Mehri

-Mehrshad

-Mehtap

-Mehul

-Mehulbhai

-Mei

-Meier

-Meik

-Meike

-Meinhard

-Meinolf

-Meir

-Meira

-Meitharia

-Mekala

-Mekonen

-Mel

-Mela

-Melamie

-Melania

-Melanie

-Melantha

-Melany

-Melba

-Melchior

-Melendez

-Melesa

-Melessa

-Melicent

-Melih

-Melina

-Melinda

-Melinde

-Melisa

-Melisande

-Melisandra

-Melisenda

-Melisent

-Melissa

-Melisse

-Melita

-Melitta

-Mella

-Melli

-Mellicent

-Mellie

-Mellisa

-Mellisent

-Mellissa

-Melloney

-Melly

-Melodee

-Melodie

-Melody

-Melonie

-Melony

-Melosa

-Melva

-Melvin

-Melvyn

-Memdoh

-Memduh

-Mena

-Menard

-Mendel

-Mendie

-Menka

-Menkreo

-Meral

-Mercedes

-Merci

-Mercie

-Mercy

-Merdan

-Meredeth

-Meredith

-Meredithe

-Merell

-Meridel

-Meridith

-Meriel

-Merijn

-Merilee

-Merill

-Merilyn

-Meris

-Merissa

-Merl

-Merla

-Merle

-Merlin

-Merlina

-Merline

-Merna

-Merola

-Merralee

-Merrel

-Merrick

-Merridie

-Merrie

-Merrielle

-Merril

-Merrile

-Merrilee

-Merrili

-Merrill

-Merrily

-Merry

-Mersey

-Merv

-Mervin

-Merwin

-Meryl

-Mesay

-Mesel

-Mesut

-Mete

-Metehan

-Metin

-Meyer

-Meziane

-Mi-Ok

-Mia

-Mian

-Micaela

-Micah

-Micha

-Michael

-Michaela

-Michaelina

-Michaeline

-Michaella

-Michail

-Michal

-Michalak

-Michale

-Michalis

-Micheal

-Micheil

-Michel

-Michele

-Michelina

-Micheline

-Michell

-Michelle

-Michiel

-Mick

-Mickey

-Micki

-Mickie

-Micky

-Micrea

-Midcy

-Midge

-Mieke

-Mignon

-Mignonne

-Miguel

-Miguela

-Miguelita

-Mihaela

-Mihai

-Mihal

-Mihaly

-Mihir

-Mihojlovic

-Mika

-Mikael

-Mikail

-Mikako

-Mike

-Mikel

-Mikell

-Mikey

-Mikhail

-Miki

-Miklos

-Mikola

-Mikolaj

-Miks

-Mila

-Milan

-Milankovic

-Mildred

-Mildrid

-Mile

-Milen

-Milena

-Miles

-Milica

-Milicent

-Milind

-Milissent

-Milka

-Milli

-Millicent

-Millie

-Millisent

-Milly

-Milo

-Milos

-Miloslav

-Miloud

-Milous

-Milt

-Milton

-Milutin

-Milzie

-Mimi

-Mimina

-Mina

-Minal

-Minas

-Minase

-Minda

-Mindy

-Minerva

-Minetta

-Minette

-Ming

-Minh

-Minh-Bao

-Minh-Ha

-Minh-Tri

-Mini

-Minkie

-Minminu

-Minna

-Minni

-Minnie

-Minny

-Minta

-Minu

-Miodrag

-Miquela

-Mir

-Mir Nasser

-Mira

-Mirabel

-Mirabella

-Mirabelle

-Miran

-Miranda

-Mirco

-Mireielle

-Mireille

-Mirek

-Mirella

-Mirelle

-Miri

-Miriam

-Mirilla

-Mirjam

-Mirko

-Mirna

-Miro

-Miroslav

-Miroslaw

-Miroslawa

-Mirwais

-Mirza

-Mis

-Misa

-Mischa

-Mischo

-Misha

-Mishkin

-Misitha

-Missi

-Missie

-Missy

-Misti

-Misty

-Misty-Lynn

-Mitch

-Mitchael

-Mitchel

-Mitchell

-Mitesh

-Mitko

-Mitra

-Mitzi

-Mmarianne

-Moaad

-Modesta

-Modestia

-Modestine

-Modesty

-Modupe

-Mody

-Moe

-Moehamad

-Moeini

-Mogahed

-Mohamad

-Mohamed

-Mohammad

-Mohammed

-Mohan

-Mohannad

-Mohhamad

-Mohit

-Mohsen

-Mohssen

-Moibi

-Moid

-Moina

-Moira

-Moise

-Moises

-Moishe

-Moji

-Mojmir

-Mokshed

-Moldovanyi

-Molina

-Moll

-Mollee

-Molli

-Mollie

-Molly

-Mommy

-Mona

-Monah

-Moncef

-Mondal

-Monesh

-Monica

-Monika

-Monique

-Monir

-Monireh

-Moniruj

-Monji

-Monjulika

-Monroe

-Montague

-Montasser

-Monte

-Montgomery

-Montserrat

-Monty

-Moore

-Moorthy

-Mora

-Morad

-Mordecai

-Moreen

-Moreira

-Morena

-Morgan

-Morgana

-Morganica

-Morganne

-Morgen

-Moria

-Morissa

-Moritz

-Morlee

-Morley

-Morly

-Morna

-Morrie

-Morris

-Morry

-Morse

-Mort

-Morten

-Morteza

-Mortie

-Mortimer

-Morton

-Morty

-Mory

-Mose

-Moselle

-Moses

-Moshe

-Mosmi

-Moss

-Mostafa

-Motasem

-Mouctar

-Moulay

-Mounika

-Mounir

-Mousa

-Moushmi

-Moya

-Moyna

-Moyra

-Mozelle

-Mua Chuo

-Mubeen

-Muchen

-Mucherla

-Mudasir

-Mudhafar

-Mufazzal

-Muffin

-Muffy

-Mufi

-Mufinella

-Mugsy

-Mugurel

-Muhammad

-Muhammet

-Muhannad

-Muhanned

-Muharem

-Muharrem

-Muhidin

-Muhittin

-Muire

-Mujibur

-Mukesh

-Mukesh Kumar

-Mukherjee

-Mukhopadhyay

-Muktamala

-Mukund

-Munish

-Munmro

-Munroe

-Mur Larkin

-Murali

-Muralidha

-Murat

-Murdoch

-Murdock

-Mureil

-Murial

-Muriel

-Murielle

-Muris

-Muriuki

-Murphy

-Murray

-Mursalin

-Murtaza

-Murthy

-Murugan

-Musa

-Museti

-Mushtaq

-Musloj

-Mustafa

-Mustapha

-Muthu

-Mutlu

-Muyuan

-Muzafer

-Muzaffer

-My-Khanh

-My-Phuong

-Myke

-Mykhailo

-Mykhaylo

-Mykola

-Myles

-Mylo

-Myna

-Myra

-Myrah

-Myranda

-Myriam

-Myrilla

-Myrle

-Myrlene

-Myrna

-Myron

-Myroslav

-Myrta

-Myrtia

-Myrtice

-Myrtie

-Myrtle

-Mysoreondar

-NEKKANTI

-Nabil

-Nabiollah

-Nachiketh

-Naci

-Nada

-Nadean

-Nadeem

-Nadeen

-Nadejda

-Nader

-Nadia

-Nadiatamara

-Nadin

-Nadine

-Nadiya

-Nadja

-Nadjib

-Nady

-Nadya

-Naeem

-Nag

-Naga

-Nagalingam

-Nagaraj

-Nagaraja

-Nagaraju

-Nagaratna

-Nagarjuna

-Nagasankar

-Nagashree

-Nagender

-Nagendra

-Nagesh

-Nageswar

-Naghmeh

-Nagihan

-Nagilla

-Nagraj

-Nahum

-Naim

-Najam

-Nalani

-Nalin

-Nalini

-Nalla

-Nalluri

-Namala

-Namir

-Namita

-Nan

-Nana

-Nananne

-Nance

-Nancee

-Nancey

-Nanci

-Nancie

-Nancy

-Nanda

-Nandamuri

-Nandini

-Nandita

-Nando

-Nanete

-Nanette

-Nani

-Nanice

-Nanine

-Nannette

-Nanni

-Nannie

-Nanny

-Nanon

-Naoma

-Naomaru

-Naomi

-Napoleon

-Nara

-Narasimha

-Narasimhamurthi

-Naravatla Srinivas

-Narayan

-Narayana

-Naren

-Narender

-Narendra

-Naresh

-Narges

-Nari

-Nariko

-Narinder

-Narmadha

-Narsa

-Narvin

-Naseem

-Naseer

-Naseeruddin

-Naser

-Nasir

-Nasr

-Nasser

-Nat

-Nata

-Natala

-Natale

-Natalee

-Natalia

-Natalie

-Natalina

-Nataline

-Nataliya

-Natalya

-Natarajan

-Natasa

-Natascha

-Natasha

-Natassia

-Nate

-Nath

-Nathalia

-Nathalie

-Nathaly

-Nathan

-Nathanael

-Nathanial

-Nathaniel

-Nathanil

-Natka

-Natty

-Nav

-Naveen

-Navid

-Navin

-Navita

-Navjeet

-Navya

-Nawaz

-Nawid

-Nayana

-Nayang

-Nazar

-Nazeer

-Nazib

-Nazih

-Nazik

-Nazim

-Nazir

-Nazli

-Nazmul

-Ndjike

-Neal

-Neala

-Neale

-Neall

-Nealon

-Nealson

-Nealy

-Nebojsa

-Necip

-Ned

-Neda

-Nedal

-Nedda

-Neddie

-Neddy

-Nedi

-Nedim

-Nedzad

-Neel

-Neela

-Neelkanth

-Neely

-Neeraj

-Neeru

-Neeta

-Neg

-Negrete

-Negussie

-Neha

-Nehal

-Neil

-Neila

-Neile

-Neill

-Neilla

-Neille

-Nejla

-Nekisha

-Nela

-Nelapatla

-Nele

-Nelia

-Nelida

-Nelie

-Nell

-Nelle

-Nelli

-Nellie

-Nelly

-Nels

-Nelsen

-Nelson

-Nemi

-Nena

-Nenad

-Nengah

-NeoGeo

-Neophytos

-Nerissa

-Nerita

-Nermin

-Nero

-Neron

-Nerses

-Nert

-Nerta

-Nerte

-Nerti

-Nertie

-Nerty

-Neslihan

-Nessa

-Nessi

-Nessie

-Nessy

-Nesta

-Nester

-Nestor

-Netta

-Netti

-Nettie

-Nettle

-Nettoor

-Netty

-Nev

-Nevil

-Nevile

-Nevill

-Neville

-Nevin

-Nevins

-Nevsa

-Nevzat

-Neway

-Newton

-Neysa

-Nezar

-Nezihe

-Nezir

-Nga

-Ngoc

-Ngoni

-Nguegang

-Nguetoum

-Nguyen

-Nhan

-Niall

-Nic

-Niccole

-Niccolo

-Nichelle

-Nichol

-Nicholas

-Nichole

-Nicholle

-Nichols

-Nick

-Nickey

-Nicki

-Nickie

-Nicklaus

-Nicko

-Nickolas

-Nicky

-Niclas

-Nico

-Nicoara

-Nicol

-Nicola

-Nicolae

-Nicolai

-Nicolaie

-Nicolas

-Nicolaus

-Nicolay

-Nicole

-Nicolea

-Nicolette

-Nicoli

-Nicolina

-Nicoline

-Nicolino

-Nicolle

-Nicolo

-Nicusor

-Nidhameddine

-Nidhi

-Nidia

-Niek

-Niels

-Nigel

-Nigg

-Nihad

-Nihal

-Nihar

-Nihat

-Nik

-Nike

-Nikhil

-Niki

-Nikita

-Nikki

-Nikkie

-Nikko

-Niklas

-Niklaus

-Niko

-Nikola

-Nikolai

-Nikolaj

-Nikolaos

-Nikolas

-Nikolaus

-Nikolaus-Bela

-Nikolay

-Nikoletta

-Nikolia

-Nikos

-Nikunj

-Nikunjkumar

-Nil

-Nilamadhaba

-Nilanjan

-Nilay

-Niles

-Nilesh

-Nilima

-Nilkanth

-Nils

-Nilson

-Nilton

-Nilufer

-Nima

-Nimesh

-Nimi

-Nimisha

-Nimma

-Nimmie

-Nina

-Ninel

-Ninetta

-Ninette

-Ninnetta

-Ninnette

-Nino

-Ninon

-Ninva

-Nirajan

-Niranjan

-Niranka

-Nirav

-Nirdesh

-Nirmal

-Nirosha

-Niru

-Nisa

-Nisha

-Nishant

-Nishanth

-Nishee

-Nishitha

-Nissa

-Nisse

-Nissie

-Nissim

-Nissy

-Nita

-Nitasha

-Nithi

-Nithila

-Nitin

-Nitish

-Nitu

-Niven

-Nivi

-Nixie

-Nixon

-Niyi

-Nizar

-Nizwer

-Nkiruka

-Noach

-Noah

-Noam

-Noami

-Nobert

-Noble

-Noe

-Noel

-Noelani

-Noelia

-Noell

-Noella

-Noelle

-Noellyn

-Noelyn

-Noemi

-Noha

-Nola

-Nolan

-Nolana

-Noland

-Nolie

-Nollie

-Noman

-Nomi

-Nona

-Nonah

-Noni

-Nonie

-Nonna

-Nonnah

-Noorula

-Nora

-Norah

-Norbert

-Norberto

-Norean

-Noreen

-Norene

-Norin

-Norina

-Norine

-Noris

-Norm

-Norma

-Norman

-Normand

-Normie

-Norocel

-Norri

-Norrie

-Norris

-Norry

-Northrop

-Northrup

-Norton

-Norwood

-Noureddine

-Nova

-Novelia

-Novoselac

-Ntrinsic

-Numerica

-Nuno

-Nunzio

-Nur-Ali

-Nuray

-Nurettin

-Nuri

-Nurkan

-Nuwan

-Nydia

-Nyssa

-Obadiah

-Obadias

-Obaydah

-Obeng

-Oberon

-Obie

-Octavia

-Octavio

-Octavius

-Odele

-Odelia

-Odelinda

-Odell

-Odella

-Odelle

-Odessa

-Odetta

-Odette

-Odie

-Odil

-Odilia

-Odille

-Odin

-Odino

-Odissefs

-Odon

-Odysseus

-Oemer

-Oeschger

-Oezcan

-Oezlem

-Ofelia

-Ofella

-Ofilia

-Ogan

-Oganes

-Oguz

-Oier

-Oksana

-Oktay

-Okumus

-Ola

-Olaf

-Olag

-Olajide

-Olamide

-Oland

-Olatokunbo

-Olav

-Olawale

-Olcay

-Oldrich

-Ole

-Oleg

-Oleko

-Oleksandr

-Oleksiy

-Olena

-Olenka

-Olexander

-Olga

-Olha

-Olia

-Olimpia

-Olin

-Olive

-Oliver

-Olivette

-Olivia

-Olivie

-Olivier

-Oliy

-Olle

-Olli

-Ollie

-Olliver

-Olly

-Olu

-Olufemi

-Olumide

-Olushola

-Olusola

-Oluwatoyin

-Olva

-Olwen

-Olympe

-Olympia

-Olympie

-Omana

-Omar

-Omid

-Omied

-Ondrea

-Ondrej

-Oneida

-Onida

-Oniel

-Onkar

-Onlea

-Onofrio

-Onwuka

-Oona

-Opal

-Opalina

-Opaline

-Opere

-Ophelia

-Ophelie

-Oprah

-Ora

-Oral

-Oralee

-Oralia

-Oralie

-Oralla

-Oralle

-Oran

-Orazio

-Orbadiah

-Oregon

-Orel

-Orelee

-Orelia

-Orelie

-Orella

-Orelle

-Oren

-Oreste

-Orhan

-Oriana

-Oriel

-Orin

-Oriol

-Orion

-Orkan

-Orlando

-Orly

-Ornelo

-Orosco

-Orren

-Orrin

-Orsa

-Orsola

-Orson

-Ortensia

-Orton

-Ortrud

-Ortwin

-Orville

-Osbert

-Osborn

-Osborne

-Osbourn

-Osbourne

-Oscar

-Osgood

-Osinachi

-Osiozekhai

-Oskar

-Osman

-Osmond

-Osmund

-Ossie

-Oswald

-Oswell

-Ota

-Otello

-Otes

-Otha

-Othelia

-Othell

-Othella

-Othello

-Othilia

-Othilie

-Othman

-Othmar

-Otho

-Otis

-Otmar

-Oto

-Ottilie

-Ottmar

-Otto

-Ottokar

-Oussama

-Ove

-Ovidiu

-Owain

-Owen

-Oxana

-Oya

-Oyono

-Ozan

-Ozdal

-Ozzie

-Ozzy

-Pablo

-Pace

-Pacifica

-Paco

-Paddie

-Paddy

-Padilla

-Padma

-Padmaja

-Padmanabha

-Padmanath

-Padraig

-Page

-Paige

-Pail

-Paiman

-Pakiaraj

-Pal

-Palak

-Palani

-Palaniselvam

-Paleru

-Pallathu

-Pallavi

-Palmen

-Palmer

-Paloma

-Palvinder

-Pam

-Pamela

-Pamelina

-Pamella

-Pammi

-Pammie

-Pammy

-Panagiotis

-Panaiotis

-Panayot

-Pandora

-Pandurang

-Panikar

-Pankaj

-Pankajroy

-Pankar

-Panos

-Pansie

-Pansy

-Pantazis

-Pantra

-Paola

-Paolina

-Paolo

-Paras

-Pare

-Paresh

-Parfait

-Paride

-Park

-Parke

-Parker

-Parmila

-Parnell

-Parris

-Parrnell

-Parry

-Parsifal

-Partha

-Parthasarathy

-Paruchuri

-Parul

-Parvathi

-Parvinder

-Parvis

-Parviz

-Parwane

-Parwaneh

-Parwis

-Pascal

-Pascale

-Pasha

-Pashalis

-Pasi

-Pasquale

-Pat

-Pate

-Patel

-Paten

-Patience

-Patin

-Patino

-Paton

-Patric

-Patrica

-Patrice

-Patricia

-Patricio

-Patrick

-Patrik

-Patrizia

-Patrizio

-Patrycja

-Patsy

-Patti

-Pattie

-Pattrick

-Patty

-Paul

-Paula

-Paula-Grace

-Paule

-Pauletta

-Paulette

-Pauli

-Paulie

-Pauliina

-Paulina

-Pauline

-Paulita

-Paulo

-Pauly

-Pavan

-Pavankumar

-Pavel

-Pavia

-Pavithra

-Pavla

-Pavol

-Pawan

-Pawel

-Payal

-Payam

-Pazhanisamy

-Pearce

-Pearl

-Pearla

-Pearle

-Pearline

-Pedro

-Peer

-Peg

-Pegeen

-Peggi

-Peggie

-Peggy

-Pegou

-Pei-Hua

-Peirce

-Pelayo

-Pembroke

-Pen

-Penelopa

-Penelope

-Peng

-PengLin

-Pengfei

-Penn

-Penni

-Pennie

-Penny

-Penrod

-Pepe

-Pepi

-Pepillo

-Pepita

-Pepito

-Per

-Perceval

-Percival

-Percy

-Pere

-Peri

-Peria

-Perikles

-Perl

-Perla

-Perle

-Perpetua

-Perri

-Perrine

-Perry

-Persis

-Pertti

-Perveen

-Pervez

-Pet

-Peta

-Petar

-Pete

-Peter

-Peterhans

-Petey

-Petko

-Petr

-Petra

-Petrina

-Petro

-Petronella

-Petronia

-Petronilla

-Petronille

-Petros

-Petrus

-Petunia

-Peyter

-Peyton

-Phaedra

-Phaidra

-Phan

-Phani

-Phanidhar

-Phanindra

-Phanish

-Phatthana

-Phebe

-Phedra

-Phelia

-Phil

-Philbert

-Philip

-Philipa

-Philipp

-Philippa

-Philippe

-Philippine

-Philis

-Phillida

-Phillie

-Phillip

-Phillipe

-Phillipp

-Phillis

-Philly

-Philomena

-Phineas

-Phip

-Phoebe

-Phu-Nhan

-Phuc

-Phylis

-Phyllida

-Phyllis

-Phyllys

-Phylys

-Pia

-Picard

-Pienescu

-Pier

-Pierce

-Pierette

-Pierluigi

-Piero

-Pierpaolo

-Pierre

-Pierrette

-Pierro

-Piers

-Pierson

-Piet

-Pieter

-Pietra

-Pietro

-Piggy

-Pilar

-Pillay

-Pincas

-Pinchas

-Pinckney

-Pincus

-Pinelopi

-Ping

-Pingmei

-Pinisetty

-Pink

-Pinkas

-Pinkesh

-Piotr

-Pip

-Piper

-Pippa

-Pippy

-Pirincci

-Pirmin

-Piskol

-Pit

-Pitlik

-Pius

-Piyush

-Plamen

-Plato

-Poduval

-Pol

-Polina

-Polly

-Pollyanna

-Pomato

-Ponni

-Pooh

-Pooja

-Poor

-Poornima

-Poppy

-Porter

-Portia

-Potan

-Poul

-Poulomi

-Pouria

-Powell

-Pra

-Prabakaran

-Prabhakar

-Prabhat

-Prabhudev

-Prabodh

-Prabs

-Praburam

-Pradeep

-Prafull

-Pragalbh

-Pragati

-Prager

-Prakash

-Prameela

-Pramith

-Pramod

-Pramodh

-Pran

-Pranav

-Pranay

-Praneetf

-Praneeth

-Pranitha

-Prasad

-Prasanna

-Prasant

-Prasanth

-Prasas

-Prasenjit

-Prashant

-Prashanth

-Prasun

-Pratap

-Prathap

-Prathyusha

-Pratik

-Prativadi

-Pravee

-Praveen

-Praveena

-Pravin

-Preben

-Predrag

-Preethi

-Preeti

-Prem

-Prent

-Prentice

-Prentiss

-Prerna

-Prescott

-Preston

-Pretish

-Price

-Prince

-Pris

-Prisca

-Priscella

-Priscilla

-Priska

-Prissie

-Prith

-Prithi

-Prithviraj

-Priti

-Priya

-Priyanca

-Priyanka

-Priyatham

-Promila

-Provanis

-Pru

-Prudence

-Prudi

-Prudy

-Prue

-Prunella

-Pryce

-Pryde Asanji

-Przemek

-Przemyslaw

-Puff

-Pukal

-Pukalenthi

-PullaRao

-Pullak

-Puneet

-Puneeth

-Punitha

-Purab

-Purcell

-Purnima

-Purushottam

-Pushpa

-Putnam

-Pyotr

-Qaseem

-Qasim

-Qiang

-Qingbo

-Quang

-Quang Hung

-Quang Minh

-Quanhui

-Queada

-Queenie

-Quent

-Quentin

-Querida

-Quiggly

-Quigly

-Quigman

-Quill

-Quillan

-Quincey

-Quincy

-Quinlan

-Quinn

-Quint

-Quinta

-Quintana

-Quintilla

-Quintin

-Quintina

-Quinton

-Quintus

-Quirin

-Quoc-Dung

-Qutaiba

-Raad

-Raafat

-Rab

-Rabbi

-Rabi

-Rabih

-Rachael

-Rachana

-Rachel

-Rachele

-Rachelle

-Rachid

-Rad

-Radcliffe

-Radek

-Radha

-Radhakrishnan

-Radhik

-Radhika

-Radim

-Radomin

-Radoslav

-Radoslaw

-Radovan

-Radoy

-Radu

-Raducanu

-Rae

-Raed

-Raef

-Raf

-Rafa

-Rafael

-Rafaela

-Rafaelia

-Rafaelita

-Rafal

-Rafat

-Rafe

-Rafet

-Raffael

-Raffaele

-Rafi

-Rafik

-Rafiq

-Rag

-Raghav

-Raghava

-Raghu

-Ragi

-Ragnar

-Ragnhild

-Ragunathan

-Rahadian

-Rahal

-Raheel

-Rahel

-Rahim

-Rahman

-Rahn

-Rahul

-Rai

-Raihan

-Raik

-Railton

-Raimar

-Raimondo

-Raimund

-Raina

-Raine

-Rainer

-Raisa

-Raisuddin

-Raj

-Raja

-Rajabali

-Rajan

-Rajani

-Rajaram

-Rajaraman

-Rajarshi

-Rajasekar

-Rajasekhar

-Rajashaker

-Rajashekhar

-Rajeev

-Rajender

-Rajendra

-Rajesh

-Rajeshwar

-Rajeshwari

-Rajeswararao

-Rajiv

-Rajko

-Rajneesh

-Rajnikant

-Rajnish

-Raju

-Rajvi

-Rajyalakshmi

-Rakel

-Rakesh

-Raleigh

-Ralf

-Ralf Peter

-Ralina

-Ralitsa

-Ralph

-Ram

-Rama

-Ramachandra

-Ramakanth

-Ramakrishna

-Raman

-Ramanjana

-Ramanpreet

-Ramaraju

-Ramaswami

-Ramazan

-Rambabu

-Ramchander

-Ramdev

-Ramesh

-Rami

-Ramil

-Ramin

-Ramind

-Ramireddy

-Ramit

-Ramon

-Ramona

-Ramonda

-Ramsay

-Ramsey

-Ramu

-Ramy

-Ramya

-Ran

-Rana

-Rand

-Randa

-Randal

-Randall

-Randee

-Randell

-Randene

-Randi

-Randie

-Randolf

-Randolph

-Randy

-Ranee

-Ranga

-Ranganath

-Rani

-Rania

-Ranice

-Ranique

-Ranjan

-Ranjani

-Ranjit

-Ranjith

-Ranna

-Ransell

-Ransom

-Rao

-Raouf Ben

-Raoul

-Raphael

-Raphaela

-Raquel

-Raquela

-Rasa

-Rasched

-Raschke

-Rasheed

-Rashid

-Rashmi

-Rashtbar

-Rasia

-Rasika

-Rasim

-Rasla

-Rasmus

-Rassoul

-Rastislav

-Rasul

-Ratimukta

-Ratna

-Ratnakar

-Raul

-Raveena

-Raveendra

-Raven

-Ravi

-Ravi Kiran

-Ravichandran

-Ravikant

-Ravikumar

-Ravil

-Ravin

-Ravinder

-Ravindra

-Rawley

-Ray

-Raychel

-Raye

-Rayit

-Raymond

-Raymund

-Raymundo

-Rayn

-Rayna

-Raynard

-Raynell

-Rayner

-Raynor

-Rayshell

-Raza

-Razin

-Raziuddin

-Razmik

-Razvan

-Rdghyder

-Rea

-Reagan

-Reba

-Rebbecca

-Rebe

-Rebeca

-Rebecca

-Rebecka

-Rebeka

-Rebekah

-Rebekkah

-Recep

-Reclo

-Red

-Reddy

-Redford

-Redmond

-Ree

-Reeba

-Reece

-Reed

-Reema

-Reena

-Rees

-Reese

-Reeta

-Reetu

-Reeva

-Refik

-Reg

-Regan

-Regen

-Reggi

-Reggie

-Reggis

-Reggy

-Regina

-Reginald

-Reginauld

-Regine

-Rehan

-Rehana

-Rehn

-Reid

-Reiko

-Reilly

-Reimar

-Reimer

-Reimond

-Reimund

-Reina

-Reinald

-Reine

-Reiner

-Reinhard

-Reinhardt

-Reinhart

-Reinhold

-Reinier

-Reinke

-Reino

-Rejy

-Reka

-Rekha

-Rella

-Rem

-Remco

-Remington

-Remitus

-Remko

-Remo

-Remus

-Remy

-Remzi

-Rena

-Renado

-Renae

-Renald

-Renaldo

-Renard

-Renata

-Renate

-Renato

-Renaud

-Renault

-Rene

-Renee

-Renel

-Renell

-Renelle

-Renie

-Renju

-Renke

-Renna

-Rennie

-Reno

-Renu

-Renzo

-Res

-Resa

-Resat

-Reta

-Retamal

-Retha

-Reto

-Reto Andreas

-Reto Thomas

-Rettenmeier

-Reube

-Reuben

-Reuven

-Revathi Priya

-Revathy

-Revkah

-Rex

-Rey

-Reyajuddin

-Reymond

-Reyna

-Reynard

-Reynold

-Reynolds

-Reza

-Rezai

-Rghavendra

-Rhea

-Rheba

-Rheta

-Rhett

-Rhetta

-Rhiamon

-Rhianna

-Rhianon

-Rhoda

-Rhodia

-Rhodie

-Rhody

-Rhona

-Rhonda

-Rhys

-Rian

-Riane

-Riannon

-Rianon

-Rias

-Riaz

-Ribwar

-Ric

-Rica

-Ricard

-Ricarda

-Ricardo

-Ricca

-Riccardo

-Rice

-Rich

-Richard

-Richard Michael

-Richardo

-Richared

-Richbert

-Richie

-Richmond

-Richter

-Richy

-Rici

-Rick

-Rickard

-Rickey

-Ricki

-Rickie

-Ricky

-Rico

-Rida

-Ridda

-Ridha

-Ridvan

-Riessen

-Rigre

-Rik

-Riki

-Rikki

-Riley

-Rimma

-Rimon

-Rimoon

-Rina

-Rinaldo

-Ringo

-Rino

-Rinthu

-Rio

-Ripan

-Ripley

-Risa

-Rish

-Rishabh

-Rissa

-Rita

-Ritch

-Ritchie

-Ritesh

-Ritu

-Riu

-Riva

-Rivalee

-River

-Rivi

-Rivkah

-Rivy

-Riyaz

-Rizky

-Rizwan

-Rngn

-Roana

-Roanna

-Roanne

-Roarke

-Rob

-Robb

-Robbe

-Robbert

-Robbi

-Robbie

-Robbin

-Robby

-Robbyn

-Robena

-Robenia

-Robert

-Roberta

-Roberto

-Robi

-Robin

-Robina

-Robinet

-Robinett

-Robinetta

-Robinette

-Robinia

-Robinson

-Roby

-Robyn

-Rocco

-Roch

-Rochell

-Rochella

-Rochelle

-Rochester

-Rochette

-Rochus

-Rock

-Rockwell

-Rocky

-Rod

-Roda

-Rodd

-Roddie

-Roddy

-Rode

-Roderic

-Roderich

-Roderick

-Roderigo

-Rodge

-Rodger

-Rodi

-Rodica

-Rodie

-Rodina

-Rodney

-Rodolfo

-Rodolph

-Rodolphe

-Rodrick

-Rodrigo

-Rodrigue

-Rodriguez

-Rodrique

-Roel

-Roeland

-Roelf

-Roelof

-Rog

-Roger

-Rogerio

-Rogers

-Rohan

-Rohit

-Rohith

-Roice

-Roja

-Roland

-Rolando

-Rolf

-Rolf Bernd

-Rolf Dieter

-Rolf Georg

-Rolf Ulrich

-Rolfe

-Roli

-Rolland

-Rollin

-Rollins

-Rollo

-Rolph

-Romain

-Roman

-Romana

-Romano

-Romeo

-Romola

-Romona

-Romonda

-Romuald

-Romy

-Ron

-Rona

-Ronald

-Ronalda

-Ronan

-Ronda

-Rone

-Ronen

-Roni

-Ronica

-Ronna

-Ronni

-Ronnica

-Ronnie

-Ronny

-Rony

-Roobbie

-Roopa

-Roopesh

-Roosevelt

-Rora

-Rori

-Rorie

-Rory

-Ros

-Rosa

-Rosa-Maria

-Rosabel

-Rosabella

-Rosabelle

-Rosaleen

-Rosalia

-Rosalie

-Rosalind

-Rosalinda

-Rosalinde

-Rosaline

-Rosalyn

-Rosalynd

-Rosamond

-Rosamund

-Rosana

-Rosanna

-Rosanne

-Rosaria

-Rosario

-Roscoe

-Rose

-Roseann

-Roseanna

-Roseanne

-Roselia

-Roselin

-Roseline

-Rosella

-Roselle

-Roselyn

-Rosemaria

-Rosemarie

-Rosemary

-Rosemonde

-Rosene

-Rosetta

-Rosette

-Roshan

-Roshelle

-Rosi

-Rosie

-Rosina

-Rosita

-Roslyn

-Rosmarie

-Rosmunda

-Ross

-Rossen

-Rostand

-Rostyslav

-Roswitha

-Rosy

-Roth

-Rotimi

-Rouben

-Rourke

-Rouven

-Row

-Rowe

-Rowena

-Rowie

-Rowland

-Roxana

-Roxane

-Roxanna

-Roxanne

-Roxi

-Roxie

-Roxine

-Roxy

-Roy

-Roya

-Royal

-Royce

-Roz

-Rozalie

-Rozalin

-Rozamond

-Rozanna

-Rozanne

-Roze

-Rozele

-Rozella

-Rozelle

-Rozina

-Ru

-Rube

-Ruben

-Rubetta

-Rubi

-Rubia

-Rubie

-Rubika

-Rubin

-Rubina

-Ruby

-Ruchira

-Ruchti

-Rudd

-Ruddie

-Ruddy

-Rudi

-Rudi-Dan

-Rudie

-Rudiger

-Rudolf

-Rudolf Bernhard

-Rudolf Christian

-Rudolfo

-Rudolph

-Rudy

-Rudyard

-Ruedi

-Ruediger

-Ruella

-Rufat

-Rufe

-Rufus

-Ruggero

-Rukhsar

-Rumen

-Rupali

-Rupert

-Ruperta

-Ruperto

-Rupesh

-Rupinder

-Rupon

-Ruppert

-Ruslan

-Rusmin

-Russ

-Russel

-Russel J

-Russell

-Rustie

-Rustin

-Rusty

-Rutger

-Ruth

-Ruthann

-Ruthanne

-Ruthe

-Rutherford

-Ruthi

-Ruthie

-Ruthild

-Ruthy

-Rutledge

-Rutter

-Ruud

-Ruwen

-Ryan

-Ryann

-Rycca

-Ryszard

-Saba

-Sabah

-Sabahattin

-Sabahudim

-Sabatino

-Sabena

-Sabina

-Sabine

-Sabir

-Sabra

-Sabrina

-Sach

-Sacha

-Sachin

-Sachinkumar

-Sachruliman

-Sada

-Sadananda

-Sadasivan

-Sadella

-Sadhan

-Sadhana

-Sadi

-Sadie

-Saed

-Saeed

-Saeid

-Saen

-Saf

-Safar

-Safiye

-Safwat

-Sagar

-Sahayam

-Sahbi

-Saheen

-Sahil

-Sahin

-Sahle

-Sai

-SaiSuresh

-Said

-Said Salah

-Saidou

-Saidu

-Saif

-Sailaja

-Saileela

-Saim

-Sainatarajan

-Sainath

-Saiprasad

-Sairam

-Saisharan

-Saiyd

-Saiyed

-Sajan

-Sajeevan

-Sajjad

-Saju

-Sakhr

-Sal

-Salaar

-Salah

-Salam

-Salar

-Saleem

-Saleh

-Salem

-Salih

-Salil

-Salim

-Salins

-Sallee

-Salli

-Sallie

-Sally

-Sallyann

-Sallyanne

-Salman

-Salmon

-Salome

-Salomo

-Salomon

-Salomone

-Salvador

-Salvatore

-Salvidor

-Sam

-Samak

-Samanth

-Samantha

-Samar

-Samara

-Samaria

-Sambandam

-Sambit

-Sameer

-Sameh

-Samer

-Sami

-Samid

-Samir

-Samira

-Samita

-Samiullah

-Sammi

-Sammie

-Sammy

-Sampat

-Sampath

-Sampson

-Samson

-Samuel

-Samuela

-Samuele

-Samuella

-Samy

-Samya

-San

-Sana

-Sanad

-Sancak

-Sancho

-Sanda

-Sande

-Sandeep

-Sander

-Sanders

-Sanderson

-Sandhya

-Sandi

-Sandie

-Sandilya

-Sandor

-Sandoz

-Sandra

-Sandrine

-Sandro

-Sandy

-Sandye

-Saneet

-Sanford

-Sang-Geon

-Sangamitra

-Sangeetha

-Sanil

-Sanj

-Sanja

-Sanjana

-Sanjay

-Sanjeev

-Sanjeeva

-Sanjith

-Sanjiv

-Sanjive

-Sanjose

-Sanju

-Sanjugtha

-Sankar

-Sanket

-Sanson

-Sansone

-Santhosh

-Santiago

-Santosh

-Sap

-Sapan

-Sapar

-Sapfico

-Sapna

-Sapphira

-Sapphire

-Sara

-Sara-Ann

-Saraann

-Sarabia

-Sarabjeet

-Sarah

-Sarahnell

-Sarai

-Sarajane

-Sarang

-Sarath

-Sarathy

-Saravanan

-Saravjeet

-Sarbendu

-Sarbjit

-Sardar

-Saree

-Sarena

-Sarene

-Sarette

-Sarfaraz

-Sarge

-Sargent

-Sarguru

-Sari

-Sarina

-Sarine

-Sarita

-Sarma

-Sarunas

-Sas

-Sasa

-Sascha

-Sasha

-Sashenka

-Sashi

-Sashidher

-Sasikala

-Saskia

-Sastry

-Satash

-Sateesh

-Satej

-Satheesh

-Sathi

-Sathis

-Sathish

-Sathiyaseelan

-Sathjish

-Sathya

-Satish

-Satishkumar

-Satoshi

-Satya

-Satyakanth

-Satyam

-Satyanarayan

-Satyanarayana

-Saud

-Saudra

-Saugata

-Saul

-Saulle

-Sauncho

-Saunder

-Saunders

-Saunderson

-Saundra

-Saurabh

-Savas

-Saveena

-Saverio

-Savina

-Savitha

-Saw

-Sawan

-Sawyer

-Sawyere

-Sax

-Saxe

-Saxon

-Say

-Sayed

-Sayer

-Sayers

-Sayre

-Sayres

-Scalese

-Scarface

-Scarlet

-Scarlett

-Schahin

-Schahram

-Schenol

-Schilling

-Schindler

-Schlesinger

-Schmidt

-Schneider

-Schreiweis

-Schroeder

-Schuyler

-Schwarz

-Schweng

-Scot

-Scott

-Scotti

-Scottie

-Scotty

-Sead

-Seamus

-Sean

-Seana

-Sebahattin

-Sebastian

-Sebastiano

-Sebastien

-Secunda

-Sedat

-Seema

-Seetha

-Seifu

-Seka

-Sekhar

-Sekib

-Sela

-Selby

-Selcuk

-Selena

-Selene

-Selestina

-Selia

-Selie

-Selig

-Selim

-Selina

-Selinda

-Seline

-Sella

-Selle

-Selma

-Selman

-Selome

-Selva

-Selvakumar

-Selvam

-Selvet

-Selwyn

-Sema

-Semere

-Semir

-Semjon

-Semra

-Sen

-Sena

-Seneshaw

-Senko

-Senthil

-Sephira

-Sepp

-Seraina

-Serano

-Serban

-Serce

-Serdar

-Serena

-Serene

-Serge

-Sergeant

-Sergei

-Sergej

-Sergejus

-Sergent

-Sergey

-Sergije

-Sergio

-Sergiu

-Sergius

-Sergiy

-Serguei

-Serhan

-Serraj

-Sertac

-Serter

-Servet

-Servilien

-Seshadri

-Seshu

-Seth

-Sethembiso

-Sethu

-Sethumadhavan

-Seungwan

-Seval

-Severin

-Sevil

-Sevim

-Seyed

-Seyfettin

-Seyit

-Seymour

-Sezen

-Sha

-Shabbir

-Shabir

-Shadow

-Shady

-Shafeer

-Shafqat

-Shafquat

-Shah

-Shahaadah

-Shahab

-Shaheen

-Shahid

-Shahla

-Shahram

-Shahrokh

-Shaik

-Shail

-Shailaja

-Shailakash

-Shailender

-Shailesh

-Shaimaa

-Shaina

-Shaine

-Shaker

-Shalini

-Shalna

-Shalne

-Shalom

-Shalu

-Shamine

-Shamini

-Shamit

-Shamus

-Shan

-Shana

-Shanan

-Shanda

-Shandee

-Shandie

-Shandra

-Shandy

-Shane

-Shani

-Shanie

-Shankar

-Shanmugasundaram

-Shanna

-Shannah

-Shannan

-Shannen

-Shannon

-Shanon

-Shanta

-Shantanu

-Shantee

-Shanthi

-Shaoguang

-Shaohui

-Shara

-Sharad

-Sharada

-Sharai

-Sharanth

-Sharareh

-Sharath

-Shareen

-Shari

-Sharia

-Sharie

-Sharity

-Sharjeel-Abid

-Sharl

-Sharla

-Sharleen

-Sharlene

-Sharline

-Sharmila

-Sharna

-Sharon

-Sharona

-Sharra

-Sharron

-Sharyl

-Shash

-Shashi

-Shashikanth

-Shaughn

-Shaukat

-Shaun

-Shauna

-Shaw

-Shawn

-Shawna

-Shawnee

-Shay

-Shayan

-Shayba

-Shayla

-Shaylah

-Shaylyn

-Shaylynn

-Shayna

-Shayne

-Shea

-Sheba

-Sheeba

-Sheela

-Sheelagh

-Sheelah

-Sheen

-Sheena

-Sheeree

-Sheetal

-Sheethal

-Sheff

-Sheffie

-Sheffield

-Sheffy

-Shehatnta

-Shehzad

-Sheila

-Sheila-Kathryn

-Sheilah

-Sheilakathryn

-Shekar

-Shekhar

-Shel

-Shelagh

-Shelba

-Shelbi

-Shelby

-Shelden

-Sheldon

-Shelia

-Shelley

-Shelli

-Shellie

-Shelly

-Shelton

-Shem

-Shemiu

-Shena

-Shenaze

-Sheng

-Shep

-Shepard

-Shepherd

-Sheppard

-Shepperd

-Sher

-Sheree

-Shereen

-Sheri

-Sheridan

-Sherie

-Sherif

-Sheril

-Sherill

-Sherilyn

-Sherine

-Sherise

-Sherline

-Sherlock

-Sherlocke

-Sherman

-Sherri

-Sherrie

-Sherry

-Sherwin

-Sherwood

-Sherwynd

-Sherye

-Sheryl

-Shetty

-Shiba

-Shibu

-Shika

-Shilpa

-Shimon

-Shina

-Shine

-Shipra

-Shir

-Shira

-Shirah

-Shiraz

-Shireesha

-Shiri

-Shirin

-Shirl

-Shirlee

-Shirleen

-Shirlene

-Shirley

-Shirley Ann

-Shirline

-Shirly

-Shital

-Shiv

-ShivKumar

-Shiva

-Shivam

-Shivani

-Shivdev

-Shivie

-Shivraj

-Shivran

-Shixin

-Shlomo

-Shobh

-Shobha

-Shofozul

-Shokat

-Shola

-Sholom

-Shoni

-Shorty

-Shoshana

-Shoshanna

-Shoshie

-Shoumya

-Shounak

-Shovit

-Shravan

-Shrenik

-Shri

-Shrika

-Shrikant

-Shripad

-Shruti

-Shubha

-Shuja

-Shujah

-Shujath

-Shujia

-Shumeet

-Shunmuga

-Shuo

-Shurlock

-Shurlocke

-Shurwood

-Shwan

-Shweta

-Shwetal

-Shyam

-Shyamala

-Sia

-Siad

-Siamak

-Siamk

-Siana

-Sianna

-Siar

-Siarhei

-Siawosh

-Sib

-Sibbie

-Sibby

-Sibeal

-Sibel

-Sibella

-Sibelle

-Sibilla

-Sibley

-Sibyl

-Sibylla

-Sibylle

-Sid

-Sid Ahmed

-Siddarth

-Siddhartha

-Sidharth

-Sidnee

-Sidney

-Sidoney

-Sidonia

-Sidonnie

-Siebelt

-Siebo

-Siegbert

-Siegfried

-Sieghard

-Sieglinde

-Siegmar

-Siegmund

-Siegwin

-Sierak

-Sierk

-Siffre

-Sig

-Sigfrid

-Sigfried

-Sighart

-Sigmar

-Sigmund

-Sigrid

-Sigurd

-Sigwart

-Siju Jacob

-Silas

-Sile

-Sileas

-Sileem

-Silja

-Silke

-Silva

-Silvain

-Silvan

-Silvana

-Silvano

-Silvanus

-Silverio

-Silvester

-Silvia

-Silvie

-Silvio

-Silviu

-Sim

-Sima

-Simeon

-Simmonds

-Simo

-Simon

-Simon A

-Simona

-Simone

-Simonette

-Simonne

-Sinaly

-Sinan

-Sinclair

-Sinclare

-Sindee

-Sindhura

-Sindu

-Sinead

-Singh

-Singla

-Sinha

-Sinisa

-Sinisha

-Siobhan

-Sioux

-Siouxie

-Siperian

-Siraj

-Sireesha

-Sirish

-Sirisha

-Sisely

-Sisile

-Sissie

-Sissy

-Sita

-Siva

-Sivakumar

-Sivaprasad

-Sivasankari

-Sivert

-Siward

-Sjoerd

-Skaiste

-Skell

-Skelly

-Skender

-Skip

-Skipp

-Skipper

-Skippie

-Skippy

-Skipton

-Sky

-Skye

-Skylar

-Skyler

-Slade

-Slava

-Slaven

-Slavomir

-Slawomir

-Slawomira

-Slim

-Sloan

-Sloane

-Slobodan

-Sly

-Smail

-Smalladmin

-Smaranda

-Smita

-Smith

-Smitty

-Snijezana

-Socorro

-Socrates

-Sofia

-Sofie

-Sohail

-Soheil

-Soheila

-Soheyl

-Sohil

-Sol

-Solange

-Soldea

-Soleiman

-Soleman

-Solero

-Solina

-Sollie

-Solly

-Solomon

-Soma

-Soman

-Somar

-Somasundaram

-Somerset

-Somesh

-Somnath

-Son

-Sonal

-Sonali

-Sondra

-Soner

-Songtao

-Songul

-Sonia

-Sonja

-Sonni

-Sonnie

-Sonnik

-Sonnnie

-Sonny

-Sonti

-Sony

-Sonya

-Soo-Yong

-Sophey

-Sophi

-Sophia

-Sophie

-Sophronia

-Soraya

-Sorcha

-Soren

-Sorin

-Sorour

-Sosanna

-Souhad

-Souheil

-Soumya

-Soumyakanta

-Soundar

-Souvik

-Sowjanya

-Sowmya

-Soyoung

-Sparky

-Spence

-Spencer

-Spense

-Spenser

-Spike

-Spiro

-Spiros

-Spud

-Spyros

-Srabasti

-Srajan

-Sravan

-Sravanthi

-Sravanti

-Srdan

-Srdjan

-Sreddy

-Sree

-Sree Latha

-Sreedhar

-Sreeji

-Sreekanth

-Sreekantha

-Sreenadh

-Sreeni

-Sreenivas

-Sreenivasa

-Sreenu

-Sreevidya Manoj

-Sri

-Sri Krishna

-SriHari

-Sridevi

-Sridhar

-Sridharan

-Srikant

-Srikanth

-Srikantha

-Srikar

-Srikrishna

-Srikurmam

-Srilakshmi

-Srilatha

-Srinath

-Srini

-Srinivas

-Srinivasa

-Srinivasan

-Sripali

-Sriram

-Sriran

-Srivani

-Srivinas

-Srujan

-Srujana

-Sruthi

-Stace

-Stacee

-Stacey

-Staci

-Stacia

-Stacie

-Stacy

-Stafani

-Staffard

-Stafford

-Staford

-Stan

-Standford

-Stanfield

-Stanford

-Stanimir

-Stanimira

-Stanislaus

-Stanislav

-Stanislava

-Stanislaw

-Stanleigh

-Stanley

-Stanly

-Stanton

-Stanwood

-Starla

-Starlene

-Starlin

-Starr

-Stashima

-Stavros

-Stearn

-Stearne

-Steen Heile

-Stefa

-Stefan

-Stefan Michael

-Stefan-Georg

-Stefanee

-Stefani

-Stefania

-Stefanie

-Stefano

-Steffan

-Steffane

-Steffen

-Steffen-Benjamin

-Steffi

-Steffie

-Steinar

-Stela

-Stella

-Stepan

-Stepha

-Stephan

-Stephan Alexander

-Stephana

-Stephane

-Stephani

-Stephanie

-Stephannie

-Stephanus

-Stephen

-Stephenie

-Stephi

-Stephie

-Stephine

-Stergios

-Sterling

-Stern

-Sterne

-Stesha

-Stevan

-Stevana

-Steve

-Steven

-Stevena

-Stevie

-Stevy

-Stew

-Steward

-Stewart

-Stig

-Stillman

-Stillmann

-Sting

-Stinky

-Stirling

-Stoddard

-Stoil

-Storey

-Storm

-Stormi

-Stormie

-Stormy

-Stoyan

-Stratos

-Stu

-Stuart

-Sturgis

-Sturmius

-Su

-Su-Chen

-Suan

-Suanne

-Subbaiah

-Subbaraju

-Subbiah

-Subbu

-Subbulakshmi

-Subha

-Subhani

-Subhas

-Subhash

-Subir

-Subodh

-Subra

-Subramanian

-Subramanyam

-Subramonian

-Subrata

-Sucharita

-Sudan

-Sudarshan

-Sudeep

-Sudershan

-Sudershanam

-Sudeshwar

-Sudha

-Sudha Raver

-Sudhakar

-Sudhanshu

-Sudheer

-Sudhi

-Sudhir

-Sudhirkumar

-Sudhis

-Sudip

-Sudipta

-Sue

-Sue-elle

-Suellen

-Suereyya

-Sugeetha

-Suhail

-Suj

-Suja

-Sujan

-Sujasree

-Sujata

-Sujatha

-Sujay

-Sujeeth

-Suji

-Sujit

-Sujith

-Sujive

-Sujoy

-Sukesh

-Sukey

-Sukh

-Sukhbir

-Sukhraj

-Suki

-Sukruta

-Sula

-Suley

-Suleyman

-Sullivan

-Sully

-Sultan

-Suma

-Suman

-Sumana

-Sumanr

-Sumanth

-Sumeet

-Sumer

-Sumit

-Sumner

-Sumona

-Sundar

-Sundara

-Sunday

-Sundeep

-Sunder

-Suneel

-Suneet

-Suneetha

-Sung-Su

-Sung-ill

-Sunhild

-Sunil

-Sunita

-Sunitha

-Sunithi

-Sunny

-Sunshine

-Superva

-Supon

-Supraja

-Supriya

-Surabhi

-Suramowli

-Surekha

-Suren

-Surender

-Surendra

-Suresh

-Suri

-Surinder

-Surjeet

-Surjit

-Surya

-Susan

-Susana

-Susanetta

-Susann

-Susanna

-Susannah

-Susanne

-Susette

-Sush

-Susi

-Susie

-Sussi

-Susumu

-Susy

-Sutherland

-Sutton

-Suyash

-Suzan

-Suzana

-Suzann

-Suzanna

-Suzanne

-Suzetta

-Suzette

-Suzi

-Suzie

-Suzy

-Suzzy

-Svein

-Sven

-Sven-Olaf

-Sven-Uwe

-Svend

-Svenja

-Svetlana

-Svetlin

-Svpcio

-Swaantje

-Swagata

-Swamy

-Swantje

-Swapna

-Swapnil

-Swaraj

-Swarna

-Swaroop

-Swarup

-Swarupa

-Swathi

-Swen

-Swen-Holger

-Swetha

-Syam Srinivas

-Sybil

-Sybila

-Sybilla

-Sybille

-Sybyl

-Syd

-Sydel

-Sydelle

-Sydney

-Syed

-Syed Abdul

-Sylke

-Sylvain

-Sylvan

-Sylvester

-Sylvia

-Sylvie

-Sylvio

-Sylwester

-Sylwia

-Szilard

-Tabatha

-Tabb

-Tabbatha

-Tabbi

-Tabbie

-Tabbitha

-Tabby

-Taber

-Tabina

-Tabitha

-Tabor

-Tabraiz

-Tad

-Tadd

-Taddeo

-Taddeus

-Tadeas

-Tadeusz

-Tafankanji

-Taffy

-Taghi

-Taha

-Tahir

-Tai-Hua

-Taibi

-Tailor

-Tait

-Taite

-Taiwo

-Taizoon

-Taj

-Tajani

-Takis

-Takis Martin

-Tako

-Taksina

-Talat

-Talbert

-Talbot

-Taleb

-Talia

-Talip

-Tallia

-Tallie

-Tally

-Talya

-Talyah

-Tam

-Tamanna

-Tamar

-Tamara

-Tamarah

-Tamarra

-Tamas

-Tamer

-Tamera

-Tami

-Tamiko

-Tamil

-Tamma

-Tammara

-Tammi

-Tammie

-Tammo

-Tammy

-Tamra

-Tan

-Tan Loc

-Tana

-Tandi

-Tandie

-Tandy

-Taner

-Tangi

-Tani

-Tania

-Tanja

-Tanju

-Tann

-Tanner

-Tanney

-Tannie

-Tanny

-Tansy

-Tantikone

-Tanvi

-Tanya

-Tao

-Taobo

-Taoufik

-Tapan

-Tapio

-Tara

-Tarah

-Tarak

-Tarakesh

-Taras

-Tarek

-Tariel

-Tarik

-Tariku

-Tariq

-Tariq Ali

-Tarmer

-Tarra

-Tarrah

-Tarrance

-Tarrant

-Tarun

-Taryn

-Tarzan

-Tarzom

-Tasha

-Tasia

-Tasleem

-Tassos

-Tast

-Tate

-Tatiana

-Tatiania

-Tatjana

-Tatum

-Tawfik

-Tawnya

-Tawsha

-Tayfun

-Taylor

-Tayyab

-Tayyeb

-Tazky

-Teador

-Teane

-Ted

-Tedd

-Tedda

-Teddi

-Teddie

-Teddy

-Tedi

-Tedie

-Tedman

-Tedmund

-Tedra

-Tedrick

-Teena

-Teferi

-Teisha

-Tej

-Teja

-Tejas

-Tejash

-Tejinder

-Tek Hwi

-Tekin

-Tekla

-Tella

-Temesgen

-Temi

-Temme

-Temp

-Temple

-Templeton

-Tenzin

-Tenzing

-Teodoor

-Teodor

-Teodora

-Teodorico

-Teodoro

-Teofilo

-Teong

-Tera

-Terahn

-Terence

-Terencio

-Teresa

-TeresaAnne

-Terese

-Teresina

-Teresita

-Teressa

-Teri

-Teriann

-Terina

-Terk

-Terra

-Terrance

-Terrel

-Terrell

-Terrence

-Terrene

-Terri

-Terri-Jo

-Terrianne

-Terrie

-Terrill

-Terry

-Terrye

-Tersina

-Teryl

-Terza

-Tess

-Tessa

-Tessi

-Tessie

-Tessy

-Teuvo

-Tevfik

-Tezcan

-Thacher

-Thad

-Thaddeus

-Thaddius

-Thaddus

-Thadeus

-Thai

-Thai-Binh

-Thain

-Thaine

-Thalia

-Than-Phuong

-Thane

-Thanh

-Thanh Hung

-Thanh Thuan

-Thanh Tung

-Thanh-Binh

-Thanh-Do

-Thao

-Tharachand

-Tharen

-Tharith

-Thatch

-Thatcher

-Thati

-Thaxter

-Thayaseelan

-Thayne

-Thea

-Theada

-Theadora

-Thebault

-Theda

-Thedric

-Thedrick

-Thein

-Thekla

-Thelma

-Theo

-Theobald

-Theodor

-Theodora

-Theodore

-Theodoric

-Theodorus

-Theodosia

-Theofanis

-Theophyllus

-Theresa

-Theresa-Marie

-Therese

-Theresia

-Theresina

-Theresita

-Theressa

-Therine

-Thi Cam Hoa

-Thi Thu

-Thi Thu Dung

-Thi-Ngoc-Thanh

-Thia

-Thiago

-Thibaud

-Thibaut

-Thiemo

-Thien

-Thien-Nghia

-Thierry

-Thies

-Thieu-Duy

-Thilaga

-Thilak

-Thilo

-Thimon

-Thirunavukarasu

-Thirupalu

-Thirza

-Thom

-Thomas

-Thomasa

-Thomasin

-Thomasina

-Thomasine

-Thomee

-Thompson

-Thomson

-Thor

-Thoralf

-Thorben

-Thore

-Thorn

-Thorndike

-Thornie

-Thornton

-Thorny

-Thorpe

-Thorstein

-Thorsten

-Thorvald

-Thoto

-Thu Huyen-Van

-Thulasi

-Thurstan

-Thurston

-Thuy Duong

-Tia

-Tiago

-Tiana

-Tibco

-Tibold

-Tibor

-Tichomir

-Tiebold

-Tiebout

-Tiemo

-Tien

-Tien Nhat

-Tiena

-Tierney

-Tiertza

-Tiff

-Tiffani

-Tiffanie

-Tiffany

-Tiffi

-Tiffie

-Tiffy

-Tiina

-Tijani

-Til

-Tilda

-Tildi

-Tildie

-Tildy

-Tile

-Tiler

-Tilko

-Till

-Tilley

-Tillie

-Tillmann

-Tilly

-Tilman

-Tilmann

-Tilo

-Tim

-Tim Sean

-Timi

-Timm

-Timmi

-Timmie

-Timmy

-Timo

-Timon

-Timothea

-Timothee

-Timotheus

-Timothy

-Timur

-Tina

-Tine

-Tino

-Tiphani

-Tiphanie

-Tiphany

-Tipu

-Tirdad

-Tirrell

-Tish

-Tisha

-Titha

-Tito

-Titos

-Titus

-Tiziano

-Tjark

-Tjarko

-Tobe

-Tobey

-Tobi

-Tobiah

-Tobias

-Tobie

-Tobin

-Tobit

-Tobole

-Toby

-Tobye

-Tod

-Todd

-Toddie

-Toddy

-Todor

-Togi

-Togna

-Toinette

-Tokunbo

-Tolga

-Tom

-Toma

-Tomas

-Tomasina

-Tomasine

-Tomasz

-Tome

-Tomer

-Tomi

-Tomiko

-Tomislav

-Tomiya

-Tomkin

-Tomlin

-Tommaso

-Tommi

-Tommie

-Tommy

-Tong

-Tongai

-Toni

-Toni Lea

-Toni-Lyn

-Tonia

-Tonie

-Tonnie

-Tony

-Tonya

-Tootsie

-Tope

-Toralf

-Torben

-Tore

-Torey

-Torge

-Tori

-Torie

-Torin

-Torley

-Torr

-Torrance

-Torre

-Torrence

-Torrey

-Torrie

-Torrin

-Torry

-Torsten

-Tory

-Toufik

-Touria

-Tova

-Tove

-Town

-Towney

-Townie

-Townsend

-Towny

-Trace

-Tracee

-Tracey

-Traci

-Tracie

-Tracy

-Traian

-Trajan

-Tran Huu

-Traudel

-Traver

-Travers

-Travis

-Tray

-Tre

-Treacy

-Tremain

-Tremaine

-Tremayne

-Trenna

-Trent

-Trenton

-Tresa

-Trescha

-Tressa

-Treutler

-Trev

-Trevar

-Trever

-Trevor

-Trey

-Tri Nhan

-Triantafyllos

-Tricia

-Trina

-Trinh

-Trip

-Tripalsinh

-Triscia

-Trish

-Trisha

-Trista

-Tristan

-Trix

-Trixi

-Trixie

-Trixy

-Trongduc

-Troy

-Truda

-Trude

-Trudey

-Trudi

-Trudie

-Trudy

-Trula

-Truman

-Trung-Truc

-Trusha

-Tsering

-Tsvetoslav

-Tuan

-Tuck

-Tucker

-Tuckie

-Tucky

-Tudor

-Tudor Adrian

-Tuesday

-Tulca

-Tull

-Tulley

-Tully

-Tumma

-Tunay

-Tuncay

-Tung

-Turaj

-Turan

-Turgay

-Turhan

-Turner

-Tushar

-Twila

-Twyla

-Ty

-Tybalt

-Tybi

-Tybie

-Tye

-Tyeniese

-Tyler

-Tymon

-Tymothy

-Tynan

-Tyne

-Tynkova

-Tyrone

-Tyrus

-Tyson

-Tzegai

-Uchendu

-Udale

-Udall

-Uday

-Udaya

-Udell

-Udo

-Ueli

-Uelkue

-Uenal

-Uetto

-Ufuk

-Ugo

-Ugur

-Uhlir

-Ula

-Uladzimir

-Ulberto

-Ulf

-Ulfrid

-Uli

-Ulick

-Ulises

-Ulla

-Ulli

-Ullrich

-Ulric

-Ulrica

-Ulrich

-Ulrick

-Ulrik

-Ulrika

-Ulrike

-Ulysses

-Uma

-Umakanth

-Umamaheswari

-Umang

-Umar

-Umbereen

-Umberto

-Umeko

-Umesh

-Ummed

-Una

-Undine

-Unnsse

-Upasana

-Upendra

-Upton

-Urbain

-Urban

-Urbano

-Urbanus

-Uri

-Uriah

-Uriel

-Uriele

-Urmila

-Urs

-Ursa

-Ursala

-Ursel

-Ursina

-Ursola

-Urson

-Ursula

-Ursulina

-Ursuline

-Urszula

-Urte

-Urvi

-Usama

-Uschi

-Usha

-Ushansh

-Uta

-Ute

-Utkan

-Utz

-Uwe

-Uzay

-Uzma

-Vaceslav

-Vachel

-Vachtang

-Vaclav

-Vadi

-Vadim

-Vadlamudi

-Vadym

-Vahid

-Vaidehi

-Vail

-Vaishnav

-Val

-Valaree

-Valaria

-Valarie

-Valdemar

-Valdet

-Vale

-Valeda

-Valencia

-Valene

-Valenka

-Valentia

-Valentim

-Valentin

-Valentina

-Valentine

-Valentino

-Valera

-Valeri

-Valeria

-Valerie

-Valerij

-Valerio

-Valeriu

-Valeriy

-Valery

-Valerye

-Valida

-Valina

-Valko

-Valle

-Valli

-Vallie

-Valluru

-Vally

-Valma

-Valry

-Vamshi

-Vamsi

-Vamsikrishna

-Van

-Van-Phuong

-Vanaja

-Vance

-Vanco

-Vanda

-Vandana

-Vanessa

-Vani

-Vania

-Vanitha

-Vanna

-Vanni

-Vannie

-Vanny

-Vanya

-Vaqas

-Varada

-Varadharajan

-Varaha

-Varalakshmi

-Varganesha

-Varinder

-Varisetty

-Varma

-Varol

-Varsha

-Varun

-Varuna

-Vasan

-Vasant

-Vasanth

-Vasanthi

-Vasava

-Vasco

-Vasil

-Vasile

-Vasili

-Vasilios

-Vasilis

-Vasily

-Vasireddy

-Vaslav

-Vassili

-Vassilios

-Vassily

-Vasu

-Vasudeva

-Vasudevan

-Vasyl

-Vatima

-Vaughan

-Vaughn

-Veda

-Vedat

-Vedran

-Veena

-Veera

-Veeram

-Veeraswamy

-Veethika

-Vegh

-Veit

-Veli

-Velichtka

-Velimir

-Velma

-Velmurugan

-Velvet

-Ven

-Vena

-Venakteswarlu

-Venance

-Venelin

-Vengaiah

-Venita

-Venkat

-Venkata

-Venkatapathi

-Venkatapati

-Venkataraman

-Venkatesh

-Venkateshwarlu

-Venkateswara

-Venkateswaran

-Venky

-Ventura

-Venu

-Venugopal

-Venugopalan

-Venumadhav

-Venus

-Venvijh

-Vera

-Veradis

-Verbestel

-Verdere

-Vere

-Verena

-Verene

-Verge

-Vergil

-Verhey

-Veriee

-Verile

-Verina

-Verine

-Verislav

-Verla

-Vern

-Verna

-Verne

-Vernen

-Verney

-Vernice

-Vernon

-Vernor

-Veronica

-Veronika

-Veronike

-Veronique

-Vesa

-Vesna

-Vesselin

-Vetrivel

-Vi

-Vi Sieu

-Viachaslau

-Viacheslav

-Vibha

-Vibhu

-Vic

-Vicente

-Vick

-Vicki

-Vickie

-Vicky

-Vickye

-Victor

-Victoria

-Victors

-Vida

-Vidya

-Viet Dung

-Vieth

-Vij

-Vijaj

-Vijay

-VijayBhaskar

-Vijaya

-Vijayabhaskar

-Vijayanth

-Vijayasai

-Vijaykumar

-Vijaynandan

-Vik

-Vikas

-Viki

-Vikki

-Vikkie

-Vikky

-Vikram

-Viktor

-Viktoria

-Vilhelm

-Vilhelmina

-Viliam

-Vilko

-Villy

-Vilma

-Vilmos

-Vimal

-Vimalkumar

-Vin

-Vina

-Vinai

-Vinamra

-Vinay

-Vince

-Vincent

-Vincents

-Vincenz

-Vincenzo

-Vineela

-Vineet

-Vinesh

-VinhAn

-Vinita

-Vinithra

-Vinkat

-Vinni

-Vinnie

-Vinny

-Vinod

-Vinodh

-Vinothini

-Vinu

-Vinutna

-Vinzenz

-Viola

-Violante

-Viole

-Violet

-Violeta

-Violetta

-Violette

-Viorel

-Vipin

-Vipul

-Vir

-Viral

-Virge

-Virgie

-Virgil

-Virgilio

-Virgina

-Virginia

-Virginie

-Visha

-Vishal

-Vishali

-Vishanth

-Vishnu

-Vishwa

-Vishwanath

-Vishwas

-Viswa

-Viswanadh

-Viswanadha

-Vit

-Vita

-Vital

-Vitali

-Vitaliy

-Vitaly

-Vite

-Vitezslav

-Vitia

-Vito

-Vitor

-Vitoria

-Vittoria

-Vittorio

-Viv

-Viva

-Vivek

-Vivekanand

-Vivekananda

-Vivi

-Vivia

-Vivian

-Viviana

-Viviane

-Vivianna

-Vivianne

-Vivie

-Vivien

-Viviene

-Vivienne

-Viviyan

-Vivyan

-Vivyanne

-Vjaceslav

-Vjekoslav

-Vlad

-Vlada

-Vladamir

-Vlademirovic

-Vladimir

-Vladimiro

-Vladislav

-Vladyslav

-Vojko

-Volkan

-Volker

-Volkhard

-Volkhart

-Volkmar

-Volodymyr

-Voltaire

-Vonni

-Vonnie

-Vonny

-Vrajesh

-Vratko

-Vui Van

-Vyoma

-Wade

-Wagner

-Wahida

-Wain

-Waine

-Wainwright

-Wait

-Waite

-Waiter

-Wake

-Wakefield

-Wald

-Waldemar

-Walden

-Waldimiro

-Waldo

-Waldon

-Wale

-Waleed

-Waleri

-Walfried

-Walid

-Walker

-Wallace

-Wallache

-Wallas

-Wallie

-Wallis

-Wally

-Walsh

-Walt

-Walter

-Walther

-Walton

-Waltraud

-Waly

-Wanda

-Wandie

-Wandis

-Waneta

-Wang

-Wanja

-Ward

-Warde

-Wardell

-Warden

-Ware

-Waring

-Waris

-Warner

-Warnke

-Warren

-Wasan

-Wash

-Washington

-Wasili

-Wat

-Waverley

-Waverly

-Waylan

-Wayland

-Waylen

-Waylin

-Waylon

-Wayne

-Webb

-Weber

-Webster

-Weert

-Wei

-Weidar

-Weider

-Weiling

-Welbie

-Welby

-Welch

-Welf

-Wells

-Welsh

-Wenda

-Wendall

-Wendel

-Wendelin

-Wendeline

-Wendell

-Wendi

-Wendie

-Wendy

-Wenhui

-Wenming

-Wenona

-Wenonah

-Werhter

-Werner

-Wernher

-Wernke

-Wes

-Wesley

-Weslie

-West

-Westbrook

-Westbrooke

-Westleigh

-Westley

-Weston

-Weylin

-Wheeler

-Whit

-Whitaker

-Whitby

-Whitman

-Whitney

-Whittaker

-Wiarda

-Wiatt

-Wibke

-Wido

-Wiebke

-Wieland

-Wiert

-Wieslaw

-Wilber

-Wilbert

-Wilbur

-Wilburn

-Wilburt

-Wilden

-Wildon

-Wildrich

-Wileen

-Wilek

-Wiley

-Wilf

-Wilfred

-Wilfrid

-Wilfried

-Wilhard

-Wilhelm

-Wilhelmina

-Wilhelmine

-Wilie

-Wiljo

-Wilko

-Will

-Willa

-Willabella

-Willam

-Willamina

-Willard

-Willdon

-Willem

-Willetta

-Willette

-Willey

-Willfried

-Willhelm

-Willi

-William

-Willibald

-Willibert

-Willie

-Willis

-Willmar

-Willmott

-Willow

-Willy

-Willyt

-Wilm

-Wilma

-Wilmar

-Wilmer

-Wilmette

-Wilona

-Wilone

-Wilow

-Wilson

-Wilt

-Wilton

-Wim

-Win

-Winand

-Winarto

-Windham

-Windsor

-Windy

-Winfield

-Winford

-Winfred

-Winfrid

-Winfried

-Wingman

-Wini

-Winifield

-Winifred

-Winn

-Winna

-Winnah

-Winne

-Winni

-Winnie

-Winnifred

-Winny

-Winona

-Winonah

-Winrich

-Winslow

-Winston

-Winthrop

-Winton

-Wioletta

-Wit

-Witali

-Witold

-Witoslaw

-Wittie

-Witty

-Wladimir

-Wladyslaw

-Wlodzimierz

-Wojchiech

-Wojciech

-Wolf

-Wolfgang

-Wolfhard

-Wolfie

-Wolfrad

-Wolfram

-Wolfy

-Woochang

-Wood

-Woodie

-Woodman

-Woodrow

-Woody

-Worden

-Worth

-Worthington

-Worthy

-Wouter

-Wren

-Wrennie

-Wright

-Wulf

-Wumi

-Wyatan

-Wyatt

-Wye

-Wylie

-Wylma

-Wyn

-Wyndham

-Wynford

-Wynn

-Wynne

-Wynnie

-Wynny

-Wynton

-Xaver

-Xavi

-Xavier

-Xaviera

-Xena

-Xenia

-Xenos

-Xerxes

-Xever

-Xiangqian

-Xiaoling

-Xiaoxuan

-Xiaoyun

-Ximenes

-Ximenez

-Xing

-Xingshu

-Xinhong

-Xochitl

-Xris

-Xu

-Xuemei

-Xuenjun

-Xun

-Xylia

-Xylina

-Xymenes

-Yaakov

-Yacov

-Yadilyas

-Yaghob

-Yago

-Yahya

-Yahya Mohamed

-Yajitha

-Yakiv

-Yalcin

-Yale

-Yalin

-Yalonda

-Yamaris

-Yamini

-Yan

-Yanaton

-Yance

-Yancey

-Yancy

-Yanetzi

-Yang

-Yank

-Yankee

-Yann

-Yanni

-Yannick

-Yannis

-Yanshi

-Yanyan

-Yard

-Yardley

-Yaroslav

-Yasamin

-Yasar

-Yasar Emre

-Yaschar

-Yash

-Yashaswin

-Yasin

-Yasir

-Yasmin

-Yasmine

-Yasu

-Yaswanth

-Yatin

-Yauheni

-Yavuz

-Yehudi

-Yehudit

-Yelamapally

-Yelena

-Yelisaveta

-Yen

-Yener

-Yerendida

-Yetkin

-Yetta

-Yettie

-Yetty

-Yevette

-Yi

-YiHui

-Yiannis

-Yifan

-Yigal

-Yilmaz

-Ying-Hui

-Yirong

-Yitzchak

-Yoann

-Yogendra

-Yogesh

-Yogi

-Yoko

-Yolanda

-Yolande

-Yolane

-Yolanthe

-Yong

-Yong Tak

-Yongfeng

-Yongrim

-Yongxiang

-Yongyi

-Yongzhen

-Yonina

-Yonus

-Yoram

-Yordan

-York

-Yoshi

-Yoshiko

-Yossi

-Younes

-Young-Hoon

-Yousef

-Youssef

-Yovonnda

-Yuan

-Yucel

-Yue

-Yugandhar

-Yuhong

-Yuko

-Yule

-Yunhe

-Yunlian

-Yunus

-Yuping

-Yurdal

-Yuri

-Yuriko

-Yuriy

-Yury

-Yusuf

-Yvan

-Yves

-Yvette

-Yvonne

-Zab

-Zabrina

-Zach

-Zachar

-Zacharia

-Zachariah

-Zacharias

-Zacharie

-Zachary

-Zacherie

-Zachery

-Zack

-Zackariah

-Zadeh

-Zafer

-Zahara

-Zahia

-Zahid

-Zahra

-Zain

-Zak

-Zakaria

-Zakuria

-Zalal

-Zaliha

-Zalman

-Zandra

-Zane

-Zaneta

-Zar

-Zara

-Zarah

-Zared

-Zaria

-Zarjany

-Zarla

-Zary

-Zayna

-Zbigniew

-Zbynek

-Zdenek

-Zdenko

-Zdeno

-Zea

-Zeb

-Zebadiah

-Zebedee

-Zebulen

-Zebulon

-Zechariah

-Zed

-Zedekiah

-Zee

-Zeena

-Zeenath

-Zeeshan

-Zeev

-Zeke

-Zeki

-Zelda

-Zelig

-Zeljko

-Zelma

-Zena

-Zenia

-Zenon

-Zephaniah

-Zerk

-Zeus

-Zeynel

-Zhan

-Zhangmian

-Zhengdao

-Zhenghong

-Zhiguo

-Zhihao

-Zhijun

-Zhiqin

-Zhiwei

-Zhixian

-Zhuan

-Zia

-Ziad

-Ziba

-Zibute

-Zickelkau

-Zied

-Zileyh

-Zilvia

-Zion

-Zippy

-Zisis

-Zita

-Zitella

-Zjef Antonio

-Zlatko

-Zoe

-Zola

-Zoli

-Zollie

-Zolly

-Zoltan

-Zonda

-Zondra

-Zonnya

-Zora

-Zorah

-Zoran

-Zorana

-Zorina

-Zorine

-Zorka

-Zorro

-Zouheir

-Zoungou

-Zsa Zsa

-Zsazsa

-Zsigmond

-Zsofia

-Zsolt

-Zsusanna

-Zsuzsanna

-Zubair

-Zuhair

-Zuhdi

-Zulema

-Zumbahli

-Zunping

-Zuzana

-Zvonimir
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/resources/JournalVolumeMarker.txt b/trunk/example-projects/TextRulerExample/resources/JournalVolumeMarker.txt
deleted file mode 100644
index 816a69b..0000000
--- a/trunk/example-projects/TextRulerExample/resources/JournalVolumeMarker.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-VOL.

-vol.

-vol

-VOL

-volume

-Volume
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/resources/Months.txt b/trunk/example-projects/TextRulerExample/resources/Months.txt
deleted file mode 100644
index 987e67c..0000000
--- a/trunk/example-projects/TextRulerExample/resources/Months.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-Januar

-Jan

-January

-Jan

-Februar

-Feb

-February

-Feb

-März

-mär

-Mrz

-March

-Mar

-April

-Apr

-April

-Apr

-Mai

-Mai

-May

-May

-Juni

-Jun

-June

-Jun

-Juli

-Jul

-July

-Jul

-August

-Aug

-August

-Aug

-September

-Sep

-September

-Sep

-Sept

-Oktober

-Okt

-October

-Oct

-November

-Nov

-November

-Nov

-Dezember

-Dez

-December

-Dec

-Summer

-Fall

-Spring

-Winter

diff --git a/trunk/example-projects/TextRulerExample/resources/PagesMarker.txt b/trunk/example-projects/TextRulerExample/resources/PagesMarker.txt
deleted file mode 100644
index e985dfc..0000000
--- a/trunk/example-projects/TextRulerExample/resources/PagesMarker.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-p.

-pp.

-PP.

-pp

-PP

-pages

-Pages
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/resources/Publishers.txt b/trunk/example-projects/TextRulerExample/resources/Publishers.txt
deleted file mode 100644
index dd211cd..0000000
--- a/trunk/example-projects/TextRulerExample/resources/Publishers.txt
+++ /dev/null
@@ -1,512 +0,0 @@
-Springer Verlag

-Springer-Verlag

-Springer

-Morgan Kaufmann

-Kluwer Academic Publishers

-The MIT Press

-MIT Press

-The AAAI Press

-AAAI Press

-Addison-Wesley

-Addison Wesley

-Association for Computing Machinery 

-Africa Journals Online 

-Bentham Science Publishers 

-Blackwell Publishing 

-BioMed Central 

-Brill 

-Chinese Electronic Periodical Services 

-Cambridge University Press 

-Walter de Gruyter GmbH & Co. KG 

-Elsevier Science 

-Emerald Insight 

-Haworth Press Inc 

-Portal of Scientific Journals of Croatia 

-IEEE 

-Inderscience Publishers 

-Informa plc 

-Japan Science and Technology Information Aggregator, Electronic 

-S. Karger AG 

-Lippincott Williams and Wilkins 

-Maney Publishing 

-NewsRX 

-OECD Publications Centre 

-Oxford University Press 

-Reed Business 

-Sage Publications 

-SciELO 

-Springer 

-Taylor and Francis Group 

-Thieme Medical Publishers 

-John Wiley and Sons 

-World of Information 

-Medium Publishers (30 to 100 journals)

-American Anthropological Association 

-Academic Journals 

-American City Business Journals 

-American Chemical Society 

-Adis International Limited (now part of Wolters Kluwer Health) 

-Academic Electronic Press 

-American Institute of Physics 

-American Library Association 

-Allerton Press Inc 

-American Psychological Association 

-Allen Press Online Publishing 

-Annual Reviews 

-American Society of Civil Engineers 

-Academy of Sciences Library, Czech Republic 

-John Benjamins Publishing Company 

-The Berkeley Electronic Press 

-Bioline International 

-Bioone 

-BMJ Publishing Group 

-Richard Boorberg Verlag 

-Bohn Stafleu Van Loghum 

-Copernicus Group 

-Consejo Superior de Investigaciones Cientificas (Spanish National Research Council) 

-Commonwealth Scientific and Industrial Research Organisation Publishing 

-

-Dove Press Ltd. 

-Duke University Press 

-Eclipse Group 

-EDP Sciences 

-Elsevier Health 

-Emap 

-The European Mathematical Information Service 

-Equinox Publishing Ltd 

-Lawrence Erlbaum Associates, Inc. 

-E. Schweizerbart Science Publishers 

-Edinburgh University Press 

-Frank Cass & Co. Ltd 

-Giuffre Editore 

-Global Science Books 

-Carl Hanser Verlag 

-Harrassowitz Verlag 

-Heldref Publishing 

-Hindawi Publishing Corporation 

-Idea Group Inc 

-The Institution of Electrical Engineers 

-    imbiomed 

-Intellect Ltd 

-Institute of Physics 

-IOS Press 

-Internet Scientific Publications LLC 

-Jane's Information Group 

-John Hopkins University Press 

-Editions Lavoisier 

-Libertas Academica 

-Mary Ann Liebert 

-Masson Editeur 

-Meditsina Publishers 

-Medknow Publications 

-Medwell Journals 

-Edizioni Minerva Medica 

-MIT Press 

-il Mulino 

-Multi-Science Publishing Co Ltd 

-Nova Science Publishers 

-Nature Publishing Group 

-Oldenbourg Wissenschaftsverlag 

-Palgrave Publishers Ltd. 

-Peeters Publishers 

-PennWell Corporation 

-Penton Media 

-Presses Universitaires de France 

-International Academic Publishing Co (Nauka/Interperiodica) 

-Research Trends 

-Rodopi Publishers 

-Royal Society of Chemistry 

-Sabinet Online 

-M. E. Sharpe Inc. 

-Sweet & Maxwell 

-University of Tehran 

-Ten Hagen & Stam BV 

-Thomson American Health Consultants 

-Tehran University of Medical Sciences Publications 

-Universitat de Barcelona 

-University of California Press 

-University of Chicago Press 

-Universidad Complutense de Madrid 

-World Academy of Science, Engineering and Technology 

-WITPress 

-World Scientific Publishing Company 

-

-Small Publishers (3 to 29 journals)

-American Accounting Association 

-American Association for the Advancement of Science 

-American Association for Cancer Research 

-Association for the Advancement in Combinatorial Sciences 

-American Association for Health Education 

-American Association for Laboratory Animal Science 

-American Association of Neurological Surgeons 

-American Academy of Pediatrics 

-American Association of Pharmaceutical Scientists 

-American Astronomical Society 

-AB Academic Publishers 

-American Bar Association 

-King Abdulaziz University – Scientific Publishing Center 

-American Counseling Association 

-Academy Publisher, Finland 

-America's Community Bankers 

-Association for Childhood Education International 

-Australian Council for Educational Research 

-ACG Publishing 

-Academy of Chemistry of Globe Publications 

-American College of Healthcare Executives 

-American Concrete Institute 

-Academy of Natural Sciences 

-Australian Council of Social Service 

-American College of Physicians 

-American Congress on Surveying and Mapping 

-ACTA Press 

-American Diabetes Association 

-Addleton Academic Publishers 

-Adenine Press 

-Astrophysical Data Service 

-Advanstar Communications 

-American Economic Association 

-AEGIS Publications 

-Association for Education in Journalism and Mass Communication 

-American Fisheries Society 

-American Foundry Society 

-American Federation of Teachers 

-Academy of General Dentistry 

-Guttmacher Institute 

-Agra Informa Ltd 

-The American Society of Agronomy 

-American Geophysical Union 

-American Institute of Aeronautics and Astronautics 

-Agricultural Institute of Canada 

-American Institute for Conservation of Historic and Artistic Works 

-American Institute of Chemical Engineers 

-American Institute of Mathematical Sciences 

-American Institute of Musicology 

-Academy & Industry Research Collaboration Center ( AIRCC ) 

-Anthony J. Jannetti, Inc. 

-Andrew John Publishing Inc 

-Akademie Verlag 

-A K Peters Ltd 

-Verlag Karl Alber 

-Allied Academies 

-Allured Publishing Corp 

-Alpe Editores 

-American Marketing Association 

-American Medical Association 

-American Correctional Association 

-Amateur Entomologists' Society (AES) 

-American Geographical Society 

-American Meterological Society 

-American Nuclear Society 

-American Nurses Association 

-The American Physiological Society 

-American Mathematical Society 

-Association for the Advancement of Modelling and Simulation Techniques in Enterprises (AMSE) 

-American Statistical Association 

-The Analytic Press (now part of Taylor & Francis) 

-American Nephrology Nurses' Association 

-ANSInet 

-Association of Official Analytical Chemists 

-The American Oil Chemists' Society 

-Academy of Management 

-American Pharmacists Association 

-American Psychiatric Publishing Inc 

-Applied Probability Trust 

-The American Physical Society 

-The American Phytopathological Society 

-American Physical Therapy Association 

-Association for Preservation Technology International (APT) 

-Thomson Aranzadi 

-Agricultural Research Communication Centre 

-Archaeological Institute of America 

-Africa Resource Center, Inc. 

-American Real Estate Society 

-American Risk and Insurance Association 

-Armand Colin 

-Arnold Publishers 

-Array Publications 

-American Sociological Association 

-American Society for Agricultural Engineers 

-The American Society for Biochemistry and Molecular Biology 

-American Society for Cell Biology 

-American Society for Engineering Education 

-American Society for Education Science Research 

-American Society of Hematology 

-American Speech-Language-Hearing Association. 

-Ashdin Publishing 

-Ashgate Publishing 

-American Society for Horticultural Science 

-American Society for Information Science and Technology 

-American Society of Limnology and Oceanography 

-American Society for Microbiology 

-The American Society of Mechanical Engineers 

-ASM International 

-American Schools of Oriental Research 

-American Scientific Publishers 

-Aspen Publishers 

-American Society for Pharmacology and Experimental Therapeutics 

-American Society for Quality 

-Association for the Advancement of Computing in Education 

-Association for Science Education 

-ASTM International 

-AstonJournals 

-American Thoracic Society 

-Amsterdam University Press 

-Australian Academic Press 

-Australian Mathematical Society 

-Air and Waste Management Association 

-Association of the Scientific Medical Societies in Germany (AWMF) 

-American Water Works Association 

-Baird Publications 

-A.A.Balkema Publishers 

-Bangladesh Journals Online 

-Behavior Analysis Online 

-Bulgarian Academy of Sciences 

-Bauer Media 

-Bayard Inc 

-Bayerische Staatsbibliothek 

-Baywood Publishing Company 

-BC Decker 

-Boston College Law School 

-Verlag C.H. Beck oHG 

-Beech Tree Publishing 

-Begell House Publishing Inc 

-Editions Belin 

-Les Belles Lettres 

-Bellwether Publishing 

-Berg Publishers 

-Berghahn Books 

-University of California, Berkeley, Law School 

-British Herpetological Society 

-Business Information Group 

-Bioinfo Publications 

-The Company of Biologists Ltd 

-Biolife 

-Biochemical Society, London 

-British Institute of Radiology 

-Blackhorse Publishing International 

-Business News Publishing Company (BNP Media) 

-Boehlau Verlag 

-BoomSun 

-Borgis Publishing House 

-NSW Bureau of Crime Statistics and Research (BOSCAR) 

-R.R. Bowker 

-British Psychological Society 

-Council for British Archaeology 

-Brookings Institution 

-Brunton Business Publications 

-Bruylant 

-CABI Publishing 

-College of Aerospace Doctrine, Research and Education, Maxwell Air Force Base, Alabama 

-Canadian Agricultural Economics Society 

-Cairn 

-Cameron May 

-Canadian Medical Association 

-Conference Board of Canada 

-CCH 

-Canadian Center of Science and Education 

-CCS Publishing 

-Canadian Dental Association 

-Centers for Disease Control and Prevention 

-California Digital Library 

-Council for Exceptional Children 

-CEDAM 

-Centaur Communications Ltd. 

-Centro de Estudios Pol 

-Council for Economic Planning and Development 

-Centre for Environment, Social & Economic Research (CESER), India 

-Chadwyck-Healey 

-CIG Media Group, LP. 

-Canadian Institute of Mining, Metallurgy and Petroleum 

-Carden Jennings Publishing 

-Czech Medical Association 

-Clute Institute for Academic Research 

-CMP Media, LLC 

-Canadian Mathematical Society 

-Centre National de la Recherche Scientifique 

-Co-Action Publishing 

-Cognizant Communication Corporation 

-Law School, Columbia University 

-Common Ground Publishing 

-Continuum 

-Cooper Ornithological Society 

-Cornell University 

-Cornetis Publishing House 

-Canadian Psychiatric Association 

-CQ Press 

-Crain Communications Inc 

-CRC Press 

-Centre for Reformation and Renaissance Studies 

-Cambridge Scientific Abstracts 

-Canadian Research & Development Center of Sciences and Cultures 

-CSF Medical Communications Ltd 

-Cold Spring Harbor Laboratory Press 

-Chemical Society of Japan 

-CTSNet 

-Catholic University of America Press 

-Cuneiform Digital Library Initiative 

-Current Medicine Group LLC 

-Curtin University of Technology 

-School of Law, Case Western Reserve University 

-Dalloz 

-Universitatea Danubius, Romania 

-Data Trace Publishing 

-Groupe De Boeck 

-Editions La Decouverte 

-Dempa Publications, Inc 

-Diesel & Gas Turbine Publications 

-Digital Library and Archives 

-DMG World Media (UK) Ltd 

-Dovetail Communications Inc 

-Duke University School of Law 

-Duncker & Humblot 

-Dustri Verlag 

-Dynamic Publishers 

-Euro-American Association of Economic Development Studies 

-Early Music America 

-Earthscan 

-Eashwar Publications 

-The Electrochemical Society 

-Ecomed Verlagsgesellschaft AG 

-eContent Management Pty Ltd 

-Editio Cantor Verlag (ECV) 

-Editecom (Editions Techniques et Economiques) 

-Educause 

-Education Publishing Company Ltd 

-L'Ecole des Hautes Etudes en Sciences Sociales (EHESS) 

-Euromoney Institutional Investor Plc 

-Pharma Publishing & Media Europe (PPM Europe) 

-Elmer Press 

-EMC Consulting Group BVBA 

-E-Med 

-EMH 

-Emory University School of Law 

-Endocrine Society 

-Society for Endocrinology 

-Engineers Australia 

-Engg Journals Publications 

-The Norwegian Entomological Society 

-Editions Eres 

-Erich Schmidt Verlag GmbH 

-Edizioni Erickson 

-European Respiratory Society 

-Ecological Society of America 

-Executive Sciences Institute 

-ESKA Editions 

-L'Esprit du Temps 

-Eurail Press 

-European Journals Inc. 

-Evangelische Verlagsanstalt GmbH 

-Deutscher Fachverlag 

-Fairmont Press, Inc. 

-Food and Agriculture Organization of the United Nations 

-FBCommunication 

-Expert Reviews 

-FDC Reports Inc 

-FDI World Dental Federation 

-Giovanni Fioriti Editore 

-Florida State University College of Law 

-Firearms Marketing Group Publications 

-Fordham University School of Law 

-Freund Publishing House 

-Fuji Technology Press 

-Fordham University Press 

-Future Medicine 

-Future Science 

-Editions Gabalda 

-Gangemi Editore 

-Gauthier-Villars Editeur 

-Gentner Verlag 

-Geographical Association 

-Institute of Geosciences, University of Debrecen, Hungary 

-The Geology Society of America 

-The Geological Society (London) 

-Institute of Geophysics, Polish Academy of Sciences 

-Geothermal Resources Council 

-Georgetown University 

-The Gerontological Society of America 

-Garden History Society 

-Giesel Verlag 

-Drukkerij Giethoorn Ten Brink 

-Geodetical Information & Trading Centre 

-Global Journals 

-Global Science Press 

-Greenleaf Publishing 

-Grosse Verlag 

-Grupo Aran 

-GeoScienceWorld 

-University of Guelph 

-Guildford Publishing Inc 

-Hart Energy Publishing 

-Hatton-Brown Publishers 

-Haymarket Business Publications Ltd 

-Hayward Group plc 

-Harvard Business School Publishing 

-Healthcare Bulletin 

-HealthCare Marketplace 

-Heldermann Verlag 

-Henry Stewart Publications 

-Higher Education Press and Springer 

-Verlag Herder 

-Carl Heymanns Verlag KG 

-Hogrefe & Huber Publishers 

-Human Kinetics Publishers, Inc 

-Harvard Law School 

-HMP Communications 

-Hokkaido University, Japan 

-Horizon Scientific Press 

-Verlag Hans Huber 

-Huss Medien 

-HVG-DGG 

-Hamburg Institute of International Economics (HWWA) 

-HyperSciences Publisher 

-International and American Association of Dental Research 

-International Association of Engineers 

-The Institute for Advanced Interdisciplinary Research 

-International Agency for Research on Cancer (IARC) 

-Indian Academy of Sciences 

-International Bar Association 

-International Bureau of Fiscal Documentation, The Netherlands 

-The International Bee Research Association 

-International Consortium for Alternative Academic Publication 

-Indian Council of Agricultural Research 

-Institute of Chartered Financial Analysts of India (ICFAI) University Press 

-Institution of Chemical Engineers 

-Indian Council of Medical Research 

-Indian Dental Association 

-Institution of Engineers (India) 

-Industrial Fabrics Association International 

-Igaku-Shoin, Japan 

-Igitur - Utrecht Archiving and Publishing Services, Netherlands 

-Institute of Industrial Engineers 

-Institute for International Cooperation of the German Adult Education Association 

-IJENS Publishers 

-International Labour Organisation 

-Institute of Marine Engineering, Science and Technology 

-International Monetary Fund 

-Institute of Materials, Minerals and Mining 

-Institute of Mathematics of the Polish Academy of Sciences 

-Imprint Academic 

-IM Publications 

-Institute of Mathematical Statistics 

-Incisive Media plc 

-Info Presse 

-INFO Project, John Hopkins School of Public Health 

-Informing Science Institute 

-INFORMS 

-Institut National de Recherche Pedagogique 

-Indian National Science Academy 

-INSInet Publication 

-Institutional Investor 

-World Textile Publications Ltd 

-Intellectbase International Consortium 

-Intersentia 

-International Press 

-Inter-Research 

-Institute of Pure and Applied Physics 

-IP Publishing 

-International Reading Association 

-The Instrumentation, Systems, and Automation Society 

-Indian Society for Development and Environment Research 

-Institute of Systematics and Evolution of Animals, Polish Academy of Sciences 

-Intercollegiate Studies Institute 

-The Islamic Society of Scientific Research (ISSR) 
\ No newline at end of file
diff --git a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Base.ruta b/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Base.ruta
deleted file mode 100644
index 10c9d55..0000000
--- a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Base.ruta
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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 uima.ruta.example;
-
-TYPESYSTEM types.Bibtex;
diff --git a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Features.ruta b/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Features.ruta
deleted file mode 100644
index 82c1c7f..0000000
--- a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Features.ruta
+++ /dev/null
@@ -1,102 +0,0 @@
-// 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 uima.ruta.example;
-
-SCRIPT uima.ruta.example.Base;
-
-ENGINE utils.PlainTextAnnotator;
-TYPESYSTEM utils.PlainTextTypeSystem;
-
-WORDLIST EditorMarkerList = 'EditorMarker.txt';
-WORDLIST EnglishStopWordList = 'EnglishStopWords.txt';
-WORDLIST FirstNameList = 'FirstNames.txt';
-WORDLIST JournalVolumeMarkerList = 'JournalVolumeMarker.txt';
-WORDLIST MonthList = 'Months.txt';
-WORDLIST PagesMarkerList = 'PagesMarker.txt';
-WORDLIST PublisherList = 'Publishers.txt';
-
-DECLARE EditorMarker, EnglishStopWord, FirstName, JournalVolumeMarker, Month, PagesMarker, PublisherInd;
-Document{ -> MARKFAST(EditorMarker, EditorMarkerList)};
-Document{ -> MARKFAST(EnglishStopWord,EnglishStopWordList)};
-Document{ -> MARKFAST(FirstName, FirstNameList)};
-Document{ -> MARKFAST(JournalVolumeMarker, JournalVolumeMarkerList)};
-Document{ -> MARKFAST(Month, MonthList)};
-Document{ -> MARKFAST(PagesMarker, PagesMarkerList)};
-Document{ -> MARKFAST(PublisherInd, PublisherList)};
-
-
-DECLARE Reference;
-Document{-> EXEC(PlainTextAnnotator, {Line, Paragraph})};
-Document{-> RETAINTYPE(SPACE, BREAK)};
-Line{-REGEXP("CORA:.*") -> MARK(Reference)};
-Reference{-> TRIM(SPACE, BREAK)};
-Document{-> RETAINTYPE};
-
-DECLARE LParen, RParen;
-SPECIAL{REGEXP("[(]") -> MARK(LParen)};
-SPECIAL{REGEXP("[)]") -> MARK(RParen)};
-
-DECLARE YearInd;
-NUM{REGEXP("19..|20..") -> MARK(YearInd, 1, 2)} SW?{REGEXP("a|b|c|d", true)};
-Document{-> RETAINTYPE(SPACE)};
-CAP YearInd{-> UNMARK(YearInd)};
-Document{-> RETAINTYPE};
-
-
-DECLARE NameLinker;
-W{-PARTOF(NameLinker), REGEXP("and", true) -> MARK(NameLinker)};
-COMMA{-PARTOF(NameLinker) -> MARK(NameLinker)};
-SEMICOLON{-PARTOF(NameLinker) -> MARK(NameLinker)};
-SPECIAL{-PARTOF(NameLinker), REGEXP("&") -> MARK(NameLinker)};
-
-DECLARE FirstNameInd, FirstNameInitial, SingleChar;
-CW{-PARTOF(FirstNameInitial), REGEXP(".")} SPECIAL{-PARTOF(FirstNameInitial), REGEXP("-")} CW{REGEXP(".") -> MARK(FirstNameInitial,1,2,3,4)} PERIOD;
-SPECIAL{-PARTOF(FirstNameInitial), REGEXP("-")} CW{REGEXP(".") -> MARK(FirstNameInitial,1,2,3)} PERIOD;
-CW{-PARTOF(FirstNameInitial), REGEXP(".") -> MARK(FirstNameInitial,1,2)} PERIOD;
-CW{-PARTOF(FirstNameInitial), REGEXP(".") -> MARK(FirstNameInitial)} COMMA;
-CW{-PARTOF(FirstNameInitial), REGEXP(".") -> MARK(SingleChar)};
-
-DECLARE Quote, QuotedStuff;
-SPECIAL[1,2]{REGEXP("[\"'´`‘’“]"), -PARTOF(Quote) -> MARK(Quote)};
-Document{-> RETAINTYPE(SPACE)};
-W Quote{-> UNMARK(Quote)} W;
-Document{-> RETAINTYPE};
-BLOCK(InRef) Reference{}{
-    Quote ANY+{-PARTOF(Quote) -> MARK(QuotedStuff, 1, 2, 3)} Quote;
-}
-
-DECLARE InInd;
-W{REGEXP("In", true)-> MARK(InInd)};
-
-DECLARE FirstToken, LastToken;
-BLOCK(InRef) Reference{}{
-    ANY{POSITION(Reference,1) -> MARK(FirstToken)};
-    Document{-> MARKLAST(LastToken)};
-}
-
-
-DECLARE NumPeriod, NumComma, NumColon;
-Document{-> RETAINTYPE(SPACE, BREAK)};
-NUM PERIOD{-> MARKONCE(NumPeriod)} NUM;
-NUM COMMA{-> MARKONCE(NumComma)} NUM;
-NUM COLON{-> MARKONCE(NumColon)} NUM;
-Document{-> RETAINTYPE};
-DECLARE PeriodSep, CommaSep, ColonSep;
-PERIOD{-PARTOF(FirstNameInitial), -PARTOF(NumPeriod), -PARTOF(FirstToken) -> MARKONCE (PeriodSep)};
-COMMA{-PARTOF(FirstNameInitial), -PARTOF(NumComma), -PARTOF(FirstToken) -> MARKONCE (CommaSep)};
-COLON{-PARTOF(FirstNameInitial), -PARTOF(NumColon), -PARTOF(FirstToken) -> MARKONCE (ColonSep)};
diff --git a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/KEP.ruta b/trunk/example-projects/TextRulerExample/script/uima/ruta/example/KEP.ruta
deleted file mode 100644
index 3b1136e..0000000
--- a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/KEP.ruta
+++ /dev/null
@@ -1,196 +0,0 @@
-// 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 uima.ruta.example;

-

-SCRIPT uima.ruta.example.Features;

-Document{-> CALL(Features)};

-DECLARE AuthorSTART, AuthorEND, DateSTART, DateEND, PagesSTART, PagesEND, PublisherSTART, PublisherEND, InstitutionSTART, InstitutionEND, VolumeSTART, VolumeEND, EditorSTART, EditorEND, TitleSTART, TitleEND, BooktitleSTART, BooktitleEND, NoteSTART, NoteEND, JournalSTART, JournalEND, LocationSTART, LocationEND, TechSTART, TechEND;

-BLOCK(Reference) Reference{} { 

-// uima.ruta.example.Author RULES 

-    FirstToken{->MARKONCE(Author, 1, 7)} COMMA FirstNameInitial[1,2]? NameLinker[1,2]? CW CommaSep FirstNameInitial[1,2]? LParen;   // p=7; n=0

-    FirstToken{->MARKONCE(Author, 1, 4)} CommaSep CW[1,2]? PERIOD LParen;   // p=4; n=0

-    FirstToken{->MARKONCE(Author, 1, 5)} CommaSep FirstNameInitial[1,2]? CW PERIOD SPECIAL; // p=2; n=0

-    FirstToken{->MARKONCE(Author, 1, 15)} CommaSep FirstNameInitial COMMA CW NameLinker FirstNameInitial COMMA CW CommaSep FirstNameInitial NameLinker[1,2]? CW COMMA FirstNameInitial; // p=1; n=0

-

-// uima.ruta.example.AuthorSTART RULES 

-    FirstToken{->MARKONCE(AuthorSTART)};    // p=20; n=0

-

-// uima.ruta.example.AuthorEND RULES 

-    PERIOD{->MARKONCE(AuthorEND)} LParen;   // p=20; n=0

-

-// uima.ruta.example.Date RULES 

-    SPECIAL{->MARKONCE(Date, 1, 4)} YearInd SPECIAL PERIOD; // p=20; n=0

-

-// uima.ruta.example.DateSTART RULES 

-    LParen{->MARKONCE(DateSTART)} YearInd;  // p=20; n=0

-

-// uima.ruta.example.DateEND RULES 

-    SPECIAL PeriodSep{->MARKONCE(DateEND)} CW;  // p=20; n=0

-}

-BLOCK(Paragraph) Paragraph{} { 

-// uima.ruta.example.Pages RULES 

-    NUM{->MARKONCE(Pages, 1, 4)} SPECIAL NUM PeriodSep; // p=15; n=0

-

-// uima.ruta.example.PagesSTART RULES 

-    COMMA NUM{->MARKONCE(PagesSTART)} SPECIAL NUM PERIOD;   // p=15; n=0

-

-// uima.ruta.example.PagesEND RULES 

-    NUM LastToken{->MARKONCE(PagesEND)};    // p=15; n=0

-

-// uima.ruta.example.Publisher RULES 

-    CW{->MARKONCE(Publisher, 1, 4)} SPECIAL CW NameLinker;  // p=1; n=0

-    CW{->MARKONCE(Publisher, 1, 4)} SW CW[1,2]? CommaSep FirstName; // p=1; n=0

-    PERIOD FirstName{->MARKONCE(Publisher, 2, 3)} COMMA;    // p=1; n=0

-

-// uima.ruta.example.PublisherSTART RULES 

-    CW PeriodSep CW{->MARKONCE(PublisherSTART)};    // p=3; n=5

-    PeriodSep CW{->MARKONCE(PublisherSTART)} SPECIAL;   // p=1; n=0

-    PERIOD CW[1,3]? PeriodSep CW{->MARKONCE(PublisherSTART)};   // p=1; n=0

-

-// uima.ruta.example.PublisherEND RULES 

-    PublisherInd CommaSep{->MARKONCE(PublisherEND)} CW; // p=1; n=0

-    CW CommaSep{->MARKONCE(PublisherEND)} FirstName NameLinker; // p=1; n=0

-    PeriodSep FirstName CommaSep{->MARKONCE(PublisherEND)} CW;  // p=1; n=0

-

-// uima.ruta.example.Institution RULES 

-    CW{->MARKONCE(Institution, 1, 8)} EnglishStopWord CW CommaSep FirstNameInitial EnglishStopWord CW PERIOD;   // p=1; n=0

-

-// uima.ruta.example.InstitutionSTART RULES 

-    CommaSep CW{->MARKONCE(InstitutionSTART)} EnglishStopWord;  // p=1; n=0

-

-// uima.ruta.example.InstitutionEND RULES 

-    EnglishStopWord CW LastToken{->MARKONCE(InstitutionEND)};   // p=1; n=0

-

-// uima.ruta.example.Volume RULES 

-    COMMA NUM{->MARKONCE(Volume, 2, 3)} NameLinker Pages;   // p=8; n=0

-    NUM{->MARKONCE(Volume, 1, 5)} SPECIAL NUM RParen NameLinker;    // p=5; n=0

-    NUM{->MARKONCE(Volume, 1, 9)} LParen NUM COMMA NUM NameLinker NUM RParen NameLinker;    // p=1; n=0

-

-// uima.ruta.example.VolumeSTART RULES 

-    COMMA NUM{->MARKONCE(VolumeSTART)} CommaSep Pages;  // p=8; n=0

-    NUM{->MARKONCE(VolumeSTART)} LParen;    // p=6; n=0

-

-// uima.ruta.example.VolumeEND RULES 

-    CommaSep{->MARKONCE(VolumeEND)} PagesSTART; // p=14; n=1

-    SPECIAL CommaSep{->MARKONCE(VolumeEND)} PagesSTART; // p=6; n=0

-}

-BLOCK(Reference) Reference{} { 

-// uima.ruta.example.Title RULES 

-    DateEND CW{->MARKONCE(Title, 2, 4)} SW[1,9]? PeriodSep; // p=10; n=0

-    CW{->MARKONCE(Title, 1, 5)} SW[1,5]? SPECIAL SW[1,5]? PeriodSep;    // p=2; n=0

-    CW[1,2]?{->MARKONCE(Title, 1, 4)} SW[1,2]? CW[1,3]? PeriodSep;  // p=2; n=0

-    CW{->MARKONCE(Title, 1, 8)} NameLinker EnglishStopWord CW SPECIAL CW SW PeriodSep;  // p=1; n=0

-    CW{->MARKONCE(Title, 1, 6)} SW[1,3]? NUM SPECIAL SW[1,3]? PeriodSep;    // p=1; n=0

-    CW{->MARKONCE(Title, 1, 6)} NameLinker SW[1,5]? CAP SW PeriodSep;   // p=1; n=0

-    CW{->MARKONCE(Title, 1, 7)} COMMA CW COMMA EnglishStopWord CW PERIOD;   // p=1; n=0

-    CW{->MARKONCE(Title, 1, 8)} SW[1,8]? COLON CW SW[1,2]? FirstName SW PeriodSep;  // p=1; n=0

-    CW[1,3]?{->MARKONCE(Title, 1, 2)} PeriodSep FirstName;  // p=1; n=0

-

-// uima.ruta.example.TitleSTART RULES 

-    Date CW{->MARKONCE(TitleSTART)};    // p=20; n=0

-

-// uima.ruta.example.TitleEND RULES 

-    PeriodSep{->MARKONCE(TitleEND)} CW; // p=20; n=38

-    SW PeriodSep{->MARKONCE(TitleEND)} CW;  // p=16; n=0

-    PeriodSep{->MARKONCE(TitleEND)} Publisher;  // p=3; n=0

-}

-BLOCK(Paragraph) Paragraph{} { 

-// uima.ruta.example.Booktitle RULES 

-    CW{->MARKONCE(Booktitle, 1, 6)} EnglishStopWord CAP SPECIAL NUM COMMA;  // p=1; n=0

-

-// uima.ruta.example.BooktitleSTART RULES 

-    Title CW{->MARKONCE(BooktitleSTART)} EnglishStopWord CAP;   // p=1; n=0

-

-// uima.ruta.example.BooktitleEND RULES 

-    SPECIAL NUM COMMA{->MARKONCE(BooktitleEND)} PagesSTART SPECIAL; // p=1; n=0

-}

-BLOCK(Paragraph) Paragraph{} { 

-// uima.ruta.example.Journal RULES 

-    PeriodSep CW[1,3]?{->MARKONCE(Journal, 2, 3)} COMMA VolumeSTART;    // p=7; n=0

-    CW{->MARKONCE(Journal, 1, 4)} SW[1,2]? CW[1,3]? COMMA NUM;  // p=4; n=0

-    CW{->MARKONCE(Journal, 1, 4)} EnglishStopWord[1,2]? CAP COMMA;  // p=1; n=0

-    FirstNameInitial{->MARKONCE(Journal, 1, 3)} CAP COMMA;  // p=1; n=0

-    CW{->MARKONCE(Journal, 1, 8)} EnglishStopWord CW[1,2]? NameLinker CW PeriodSep CAP NameLinker;  // p=1; n=0

-

-// uima.ruta.example.JournalSTART RULES 

-    Title CW{->MARKONCE(JournalSTART)}; // p=14; n=6

-    Title CW{->MARKONCE(JournalSTART)} CW;  // p=6; n=0

-    Title CW{->MARKONCE(JournalSTART)} InInd;   // p=1; n=0

-

-// uima.ruta.example.JournalEND RULES 

-    COMMA{->MARKONCE(JournalEND)} Volume;   // p=14; n=0

-

-// uima.ruta.example.Location RULES 

-    CW{->MARKONCE(Location, 1, 3)} FirstName PeriodSep; // p=2; n=0

-    CW{->MARKONCE(Location, 1, 4)} NameLinker CW LastToken; // p=1; n=0

-

-// uima.ruta.example.LocationSTART RULES 

-    PublisherEND CW{->MARKONCE(LocationSTART)}; // p=3; n=0

-

-// uima.ruta.example.LocationEND RULES 

-    CommaSep CW[1,2]? LastToken{->MARKONCE(LocationEND)};   // p=3; n=0

-

-// uima.ruta.example.Tech RULES 

-    CW{->MARKONCE(Tech, 1, 5)} PERIOD SW PeriodSep CommaSep;    // p=1; n=0

-

-// uima.ruta.example.TechSTART RULES 

-    PERIOD CW{->MARKONCE(TechSTART)} PeriodSep; // p=1; n=0

-

-// uima.ruta.example.TechEND RULES 

-    CommaSep{->MARKONCE(TechEND)} Institution;  // p=1; n=0

-}

-

- // BOUNDARY CORRECTION RULES: 

-     PublisherSTART{OR(CONTAINS(Reference), CONTAINS(AuthorSTART), CONTAINS(FirstToken), CONTAINS(Booktitle), CONTAINS(BooktitleSTART))->UNMARK(PublisherSTART)};    // p=0; n=5

-VolumeEND{CONTAINS(BooktitleEND)->UNMARK(VolumeEND)};   // p=0; n=1

-TitleEND{CONTAINS(DateEND)->UNMARK(TitleEND)};  // p=0; n=20

-JournalSTART{OR(CONTAINS(Reference), CONTAINS(AuthorSTART), CONTAINS(FirstToken), CONTAINS(Publisher), CONTAINS(FirstName), CONTAINS(Booktitle), CONTAINS(BooktitleSTART), CONTAINS(Tech), CONTAINS(TechSTART), CONTAINS(PublisherInd))->UNMARK(JournalSTART)}; // p=0; n=6

-

- // CONNECTORS: 

-     BLOCK(ReferenceConnectors) Reference{} { 

-    AuthorSTART{->MARKONCE(Author,1,3)} ANY*? AuthorEND;

-    AuthorSTART{IS(AuthorEND)->MARKONCE(Author)} ;

-    DateSTART{->MARKONCE(Date,1,3)} ANY*? DateEND;

-    DateSTART{IS(DateEND)->MARKONCE(Date)} ;

-    TitleSTART{->MARKONCE(Title,1,3)} ANY*? TitleEND;

-    TitleSTART{IS(TitleEND)->MARKONCE(Title)} ;

-} 

-BLOCK(ParagraphConnectors) Paragraph{} { 

-    PagesSTART{->MARKONCE(Pages,1,3)} ANY*? PagesEND;

-    PagesSTART{IS(PagesEND)->MARKONCE(Pages)} ;

-    PublisherSTART{->MARKONCE(Publisher,1,3)} ANY*? PublisherEND;

-    PublisherSTART{IS(PublisherEND)->MARKONCE(Publisher)} ;

-    InstitutionSTART{->MARKONCE(Institution,1,3)} ANY*? InstitutionEND;

-    InstitutionSTART{IS(InstitutionEND)->MARKONCE(Institution)} ;

-    VolumeSTART{->MARKONCE(Volume,1,3)} ANY*? VolumeEND;

-    VolumeSTART{IS(VolumeEND)->MARKONCE(Volume)} ;

-    BooktitleSTART{->MARKONCE(Booktitle,1,3)} ANY*? BooktitleEND;

-    BooktitleSTART{IS(BooktitleEND)->MARKONCE(Booktitle)} ;

-    JournalSTART{->MARKONCE(Journal,1,3)} ANY*? JournalEND;

-    JournalSTART{IS(JournalEND)->MARKONCE(Journal)} ;

-    LocationSTART{->MARKONCE(Location,1,3)} ANY*? LocationEND;

-    LocationSTART{IS(LocationEND)->MARKONCE(Location)} ;

-    TechSTART{->MARKONCE(Tech,1,3)} ANY*? TechEND;

-    TechSTART{IS(TechEND)->MARKONCE(Tech)} ;

-} 

-EditorSTART{->MARKONCE(Editor,1,3)} ANY*? EditorEND;

-EditorSTART{IS(EditorEND)->MARKONCE(Editor)} ;

-NoteSTART{->MARKONCE(Note,1,3)} ANY*? NoteEND;

-NoteSTART{IS(NoteEND)->MARKONCE(Note)} ;

-

- // CORRECTION RULES: 

diff --git a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/LP2.ruta b/trunk/example-projects/TextRulerExample/script/uima/ruta/example/LP2.ruta
deleted file mode 100644
index 48c38d9..0000000
--- a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/LP2.ruta
+++ /dev/null
@@ -1,390 +0,0 @@
-// 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 uima.ruta.example;
-
-
-// learnt using TextRulerExample\data\single
-
-SCRIPT uima.ruta.example.Features;
-Document{-> CALL(Features)};
-DECLARE AuthorSTART, AuthorEND, DateSTART, DateEND, PagesSTART, PagesEND, PublisherSTART, PublisherEND, InstitutionSTART, InstitutionEND, VolumeSTART, VolumeEND, EditorSTART, EditorEND, TitleSTART, TitleEND, BooktitleSTART, BooktitleEND, NoteSTART, NoteEND, JournalSTART, JournalEND, LocationSTART, LocationEND, TechSTART, TechEND;
-BOOLEAN redoContextualRules;
-
-
-// Slot: Author
-// LEFT BOUNDARY RULES:
-FirstToken{->MARKONCE(AuthorSTART)};	// p=20; n=0
-
-// RIGHT BOUNDARY RULES:
-PERIOD{->MARKONCE(AuthorEND)} LParen;	// p=20; n=0
-
-BLOCK(contextualRules_Author) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	COLON ANY{-IS(AuthorSTART), NEAR(AuthorEND, 0,21,true,true)->MARKONCE(AuthorSTART), ASSIGN(redoContextualRules, true)};	// p=1; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	ANY{-IS(AuthorEND), NEAR(AuthorSTART, 0,21,false,true)->MARKONCE(AuthorEND), ASSIGN(redoContextualRules, true)} LParen;	// p=20; n=1
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Author)};
-}
-
-// Slot: Date
-// LEFT BOUNDARY RULES:
-LParen{->MARKONCE(DateSTART)} ANY{PARTOF(YearInd)};	// p=20; n=0
-
-// RIGHT BOUNDARY RULES:
-RParen PERIOD{->MARKONCE(DateEND)};	// p=20; n=0
-
-BLOCK(contextualRules_Date) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	LParen{-IS(DateSTART), NEAR(DateEND, 0,5,true,true)->MARKONCE(DateSTART), ASSIGN(redoContextualRules, true)};	// p=20; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	PERIOD{-IS(DateEND), NEAR(DateSTART, 0,5,false,true)->MARKONCE(DateEND), ASSIGN(redoContextualRules, true)};	// p=20; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Date)};
-}
-
-// Slot: Pages
-// LEFT BOUNDARY RULES:
-COMMA ANY{->MARKONCE(PagesSTART)} SPECIAL{REGEXP("-")};	// p=15; n=0
-
-// RIGHT BOUNDARY RULES:
-NUM LastToken{->MARKONCE(PagesEND)};	// p=15; n=0
-
-BLOCK(contextualRules_Pages) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	ANY{-IS(PagesSTART), NEAR(PagesEND, 0,4,true,true)->MARKONCE(PagesSTART), ASSIGN(redoContextualRules, true)} SPECIAL;	// p=15; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	LastToken{-IS(PagesEND), NEAR(PagesSTART, 0,4,false,true)->MARKONCE(PagesEND), ASSIGN(redoContextualRules, true)};	// p=15; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Pages)};
-}
-
-// Slot: Publisher
-// LEFT BOUNDARY RULES:
-CW{REGEXP("Wiley")->MARKONCE(PublisherSTART)};	// p=1; n=0
-CW{REGEXP("University")->MARKONCE(PublisherSTART)};	// p=1; n=0
-CW{REGEXP("Springer")->MARKONCE(PublisherSTART)};	// p=1; n=0
-
-// RIGHT BOUNDARY RULES:
-ANY{->MARKONCE(PublisherEND)} CW{REGEXP("New")};	// p=2; n=0
-ANY{->MARKONCE(PublisherEND)} CW{REGEXP("Lawrence")};	// p=1; n=0
-
-BLOCK(contextualRules_Publisher) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	CW PERIOD ANY{-IS(PublisherSTART), NEAR(PublisherEND, 0,5,true,true)->MARKONCE(PublisherSTART), ASSIGN(redoContextualRules, true)};	// p=3; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	COMMA{-IS(PublisherEND), NEAR(PublisherSTART, 0,5,false,true)->MARKONCE(PublisherEND), ASSIGN(redoContextualRules, true)};	// p=3; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Publisher)};
-}
-
-// Slot: Institution
-// LEFT BOUNDARY RULES:
-CW{REGEXP("Department")->MARKONCE(InstitutionSTART)};	// p=1; n=0
-
-// RIGHT BOUNDARY RULES:
-ANY{->MARKONCE(InstitutionEND)} CW{REGEXP("Golomb")};	// p=1; n=0
-
-BLOCK(contextualRules_Institution) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	CW{-IS(InstitutionSTART), NEAR(InstitutionEND, 0,9,true,true)->MARKONCE(InstitutionSTART), ASSIGN(redoContextualRules, true)} EnglishStopWord;	// p=1; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	LastToken{-IS(InstitutionEND), NEAR(InstitutionSTART, 0,9,false,true)->MARKONCE(InstitutionEND), ASSIGN(redoContextualRules, true)};	// p=1; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Institution)};
-}
-
-// Slot: Volume
-// LEFT BOUNDARY RULES:
-CW ANY NUM{->MARKONCE(VolumeSTART)};	// p=11; n=0
-NUM{->MARKONCE(VolumeSTART)} LParen;	// p=6; n=0
-CAP COMMA ANY{->MARKONCE(VolumeSTART)};	// p=3; n=0
-
-// RIGHT BOUNDARY RULES:
-COMMA{->MARKONCE(VolumeEND)} ANY SPECIAL{REGEXP("-")};	// p=14; n=1
-
-BLOCK(contextualRules_Volume) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	CW COMMA ANY{-IS(VolumeSTART), NEAR(VolumeEND, 0,9,true,true)->MARKONCE(VolumeSTART), ASSIGN(redoContextualRules, true)};	// p=11; n=1
-	ANY{-IS(VolumeSTART), NEAR(VolumeEND, 0,9,true,true)->MARKONCE(VolumeSTART), ASSIGN(redoContextualRules, true)} LParen;	// p=6; n=0
-	CAP ANY NUM{-IS(VolumeSTART), NEAR(VolumeEND, 0,9,true,true)->MARKONCE(VolumeSTART), ASSIGN(redoContextualRules, true)};	// p=3; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	ANY{-IS(VolumeEND), NEAR(VolumeSTART, 0,9,false,true)->MARKONCE(VolumeEND), ASSIGN(redoContextualRules, true)} ANY SPECIAL{REGEXP("-")};	// p=14; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Volume)};
-}
-
-// Slot: Editor
-// LEFT BOUNDARY RULES:
-
-// RIGHT BOUNDARY RULES:
-
-BLOCK(contextualRules_Editor) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Editor)};
-}
-
-// Slot: Title
-// LEFT BOUNDARY RULES:
-RParen ANY CW{->MARKONCE(TitleSTART)};	// p=20; n=0
-
-// RIGHT BOUNDARY RULES:
-SW PERIOD{->MARKONCE(TitleEND)} CW;	// p=16; n=0
-ANY{->MARKONCE(TitleEND)} CW{REGEXP("Wiley")};	// p=1; n=0
-PERIOD{->MARKONCE(TitleEND)} ANY SW{REGEXP("of")};	// p=7; n=0
-ANY{->MARKONCE(TitleEND)} CW{REGEXP("Springer")};	// p=1; n=0
-
-BLOCK(contextualRules_Title) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	RParen ANY ANY{-IS(TitleSTART), NEAR(TitleEND, 0,16,true,true)->MARKONCE(TitleSTART), ASSIGN(redoContextualRules, true)};	// p=20; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	PERIOD{-IS(TitleEND), NEAR(TitleSTART, 0,16,false,true)->MARKONCE(TitleEND), ASSIGN(redoContextualRules, true)} ANY EnglishStopWord;	// p=8; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Title)};
-}
-
-// Slot: Booktitle
-// LEFT BOUNDARY RULES:
-CW{REGEXP("Proceedings")->MARKONCE(BooktitleSTART)};	// p=1; n=0
-
-// RIGHT BOUNDARY RULES:
-ANY{->MARKONCE(BooktitleEND)} NUM{REGEXP("1273")};	// p=1; n=0
-
-BLOCK(contextualRules_Booktitle) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	CW{-IS(BooktitleSTART), NEAR(BooktitleEND, 0,6,true,true)->MARKONCE(BooktitleSTART), ASSIGN(redoContextualRules, true)};	// p=1; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	COMMA{-IS(BooktitleEND), NEAR(BooktitleSTART, 0,6,false,true)->MARKONCE(BooktitleEND), ASSIGN(redoContextualRules, true)};	// p=1; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Booktitle)};
-}
-
-// Slot: Note
-// LEFT BOUNDARY RULES:
-
-// RIGHT BOUNDARY RULES:
-
-BLOCK(contextualRules_Note) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Note)};
-}
-
-// Slot: Journal
-// LEFT BOUNDARY RULES:
-SW PERIOD CW{->MARKONCE(JournalSTART)} CW;	// p=6; n=0
-SW PERIOD ANY{->MARKONCE(JournalSTART)} EnglishStopWord;	// p=6; n=0
-PeriodSep ANY{PARTOF(FirstNameInitial)->MARKONCE(JournalSTART)};	// p=1; n=0
-CW{REGEXP("Econometrica")->MARKONCE(JournalSTART)};	// p=1; n=0
-
-// RIGHT BOUNDARY RULES:
-CW ANY{->MARKONCE(JournalEND)} NUM;	// p=11; n=0
-ANY{->MARKONCE(JournalEND)} NUM LParen;	// p=6; n=0
-CAP COMMA{->MARKONCE(JournalEND)};	// p=3; n=0
-
-BLOCK(contextualRules_Journal) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	SW PERIOD ANY{-IS(JournalSTART), NEAR(JournalEND, 0,9,true,true)->MARKONCE(JournalSTART), ASSIGN(redoContextualRules, true)};	// p=14; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	CW COMMA{-IS(JournalEND), NEAR(JournalSTART, 0,9,false,true)->MARKONCE(JournalEND), ASSIGN(redoContextualRules, true)};	// p=11; n=1
-	ANY{-IS(JournalEND), NEAR(JournalSTART, 0,9,false,true)->MARKONCE(JournalEND), ASSIGN(redoContextualRules, true)} ANY LParen;	// p=6; n=0
-	CAP ANY{-IS(JournalEND), NEAR(JournalSTART, 0,9,false,true)->MARKONCE(JournalEND), ASSIGN(redoContextualRules, true)};	// p=3; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Journal)};
-}
-
-// Slot: Location
-// LEFT BOUNDARY RULES:
-CW{REGEXP("New")->MARKONCE(LocationSTART)};	// p=2; n=0
-CW{REGEXP("Lawrence")->MARKONCE(LocationSTART)};	// p=1; n=0
-
-// RIGHT BOUNDARY RULES:
-CW{REGEXP("York")} ANY{->MARKONCE(LocationEND)};	// p=2; n=0
-ANY{->MARKONCE(LocationEND)} CW{REGEXP("Dechter")};	// p=1; n=0
-
-BLOCK(contextualRules_Location) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	CW{-IS(LocationSTART), NEAR(LocationEND, 0,4,true,true)->MARKONCE(LocationSTART), ASSIGN(redoContextualRules, true)} CW;	// p=2; n=0
-	COMMA FirstName{-IS(LocationSTART), NEAR(LocationEND, 0,4,true,true)->MARKONCE(LocationSTART), ASSIGN(redoContextualRules, true)};	// p=1; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	LastToken{-IS(LocationEND), NEAR(LocationSTART, 0,4,false,true)->MARKONCE(LocationEND), ASSIGN(redoContextualRules, true)};	// p=3; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Location)};
-}
-
-// Slot: Tech
-// LEFT BOUNDARY RULES:
-CW{REGEXP("Tech")->MARKONCE(TechSTART)};	// p=1; n=0
-
-// RIGHT BOUNDARY RULES:
-ANY{->MARKONCE(TechEND)} CW{REGEXP("Department")};	// p=1; n=0
-
-BLOCK(contextualRules_Tech) Document{} {
-	Document{->ASSIGN(redoContextualRules, false)}; // reset flag
-
-	// LEFT BOUNDARY CONTEXTUAL RULES:
-	CW{-IS(TechSTART), NEAR(TechEND, 0,5,true,true)->MARKONCE(TechSTART), ASSIGN(redoContextualRules, true)};	// p=1; n=0
-
-	// RIGHT BOUNDARY CONTEXTUAL RULES:
-	COMMA{-IS(TechEND), NEAR(TechSTART, 0,5,false,true)->MARKONCE(TechEND), ASSIGN(redoContextualRules, true)};	// p=1; n=0
-
-	//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_Tech)};
-}
-
-//slot-building rules:
-AuthorSTART{IS(AuthorEND)->UNMARK(AuthorSTART), UNMARK(AuthorEND), MARKONCE(Author)};
-AuthorSTART{->UNMARK(AuthorSTART)} ANY[0, 61]? AuthorEND{->UNMARK(AuthorEND), MARKONCE(Author, 1, 3)};
-
-//cleaning up:
-AuthorSTART{->UNMARK(AuthorSTART)};
-AuthorEND{->UNMARK(AuthorEND)};
-
-//slot-building rules:
-DateSTART{IS(DateEND)->UNMARK(DateSTART), UNMARK(DateEND), MARKONCE(Date)};
-DateSTART{->UNMARK(DateSTART)} ANY[0, 13]? DateEND{->UNMARK(DateEND), MARKONCE(Date, 1, 3)};
-
-//cleaning up:
-DateSTART{->UNMARK(DateSTART)};
-DateEND{->UNMARK(DateEND)};
-
-//slot-building rules:
-PagesSTART{IS(PagesEND)->UNMARK(PagesSTART), UNMARK(PagesEND), MARKONCE(Pages)};
-PagesSTART{->UNMARK(PagesSTART)} ANY[0, 10]? PagesEND{->UNMARK(PagesEND), MARKONCE(Pages, 1, 3)};
-
-//cleaning up:
-PagesSTART{->UNMARK(PagesSTART)};
-PagesEND{->UNMARK(PagesEND)};
-
-//slot-building rules:
-PublisherSTART{IS(PublisherEND)->UNMARK(PublisherSTART), UNMARK(PublisherEND), MARKONCE(Publisher)};
-PublisherSTART{->UNMARK(PublisherSTART)} ANY[0, 13]? PublisherEND{->UNMARK(PublisherEND), MARKONCE(Publisher, 1, 3)};
-
-//cleaning up:
-PublisherSTART{->UNMARK(PublisherSTART)};
-PublisherEND{->UNMARK(PublisherEND)};
-
-//slot-building rules:
-InstitutionSTART{IS(InstitutionEND)->UNMARK(InstitutionSTART), UNMARK(InstitutionEND), MARKONCE(Institution)};
-InstitutionSTART{->UNMARK(InstitutionSTART)} ANY[0, 25]? InstitutionEND{->UNMARK(InstitutionEND), MARKONCE(Institution, 1, 3)};
-
-//cleaning up:
-InstitutionSTART{->UNMARK(InstitutionSTART)};
-InstitutionEND{->UNMARK(InstitutionEND)};
-
-//slot-building rules:
-VolumeSTART{IS(VolumeEND)->UNMARK(VolumeSTART), UNMARK(VolumeEND), MARKONCE(Volume)};
-VolumeSTART{->UNMARK(VolumeSTART)} ANY[0, 25]? VolumeEND{->UNMARK(VolumeEND), MARKONCE(Volume, 1, 3)};
-
-//cleaning up:
-VolumeSTART{->UNMARK(VolumeSTART)};
-VolumeEND{->UNMARK(VolumeEND)};
-
-//slot-building rules:
-EditorSTART{IS(EditorEND)->UNMARK(EditorSTART), UNMARK(EditorEND), MARKONCE(Editor)};
-EditorSTART{->UNMARK(EditorSTART)} EditorEND{->UNMARK(EditorEND), MARKONCE(Editor, 1, 2)};
-
-//cleaning up:
-EditorSTART{->UNMARK(EditorSTART)};
-EditorEND{->UNMARK(EditorEND)};
-
-//slot-building rules:
-TitleSTART{IS(TitleEND)->UNMARK(TitleSTART), UNMARK(TitleEND), MARKONCE(Title)};
-TitleSTART{->UNMARK(TitleSTART)} ANY[0, 46]? TitleEND{->UNMARK(TitleEND), MARKONCE(Title, 1, 3)};
-
-//cleaning up:
-TitleSTART{->UNMARK(TitleSTART)};
-TitleEND{->UNMARK(TitleEND)};
-
-//slot-building rules:
-BooktitleSTART{IS(BooktitleEND)->UNMARK(BooktitleSTART), UNMARK(BooktitleEND), MARKONCE(Booktitle)};
-BooktitleSTART{->UNMARK(BooktitleSTART)} ANY[0, 16]? BooktitleEND{->UNMARK(BooktitleEND), MARKONCE(Booktitle, 1, 3)};
-
-//cleaning up:
-BooktitleSTART{->UNMARK(BooktitleSTART)};
-BooktitleEND{->UNMARK(BooktitleEND)};
-
-//slot-building rules:
-NoteSTART{IS(NoteEND)->UNMARK(NoteSTART), UNMARK(NoteEND), MARKONCE(Note)};
-NoteSTART{->UNMARK(NoteSTART)} NoteEND{->UNMARK(NoteEND), MARKONCE(Note, 1, 2)};
-
-//cleaning up:
-NoteSTART{->UNMARK(NoteSTART)};
-NoteEND{->UNMARK(NoteEND)};
-
-//slot-building rules:
-JournalSTART{IS(JournalEND)->UNMARK(JournalSTART), UNMARK(JournalEND), MARKONCE(Journal)};
-JournalSTART{->UNMARK(JournalSTART)} ANY[0, 25]? JournalEND{->UNMARK(JournalEND), MARKONCE(Journal, 1, 3)};
-
-//cleaning up:
-JournalSTART{->UNMARK(JournalSTART)};
-JournalEND{->UNMARK(JournalEND)};
-
-//slot-building rules:
-LocationSTART{IS(LocationEND)->UNMARK(LocationSTART), UNMARK(LocationEND), MARKONCE(Location)};
-LocationSTART{->UNMARK(LocationSTART)} ANY[0, 10]? LocationEND{->UNMARK(LocationEND), MARKONCE(Location, 1, 3)};
-
-//cleaning up:
-LocationSTART{->UNMARK(LocationSTART)};
-LocationEND{->UNMARK(LocationEND)};
-
-//slot-building rules:
-TechSTART{IS(TechEND)->UNMARK(TechSTART), UNMARK(TechEND), MARKONCE(Tech)};
-TechSTART{->UNMARK(TechSTART)} ANY[0, 13]? TechEND{->UNMARK(TechEND), MARKONCE(Tech, 1, 3)};
-
-//cleaning up:
-TechSTART{->UNMARK(TechSTART)};
-TechEND{->UNMARK(TechEND)};
diff --git a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/TraBaL.ruta b/trunk/example-projects/TextRulerExample/script/uima/ruta/example/TraBaL.ruta
deleted file mode 100644
index 086f1ca..0000000
--- a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/TraBaL.ruta
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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 uima.ruta.example;
-
-SCRIPT uima.ruta.example.Features;
-Document{-> CALL(Features)};
-BLOCK(Iteration_1) Document{} {
-// Date(212, 218] "(1994)" -> Date(212, 219] "(1994)."
-(Date{-> UNMARK(Date)} ANY*{-PARTOF(CW)}){-> MARK(Date)} CW;    // p=34; n=0
-
-// Author(7, 21] "Harper, M. P.," -> Author(7, 40] "Harper, M. P., & Helzerman, R. A."
-(Author{-> UNMARK(Author)} ANY*{-PARTOF(LParen)}){-> MARK(Author)} LParen;  // p=26; n=0
-
-// Title(43, 137] "(1995b).   Managing multiple knowledge sources in constraint-based parsing of spoken language." -> Title(54, 137] "Managing multiple knowledge sources in constraint-based parsing of spoken language."
-LParen{STARTSWITH(Title) -> UNMARK(Title, true)} ANY*{-PARTOF(CW)} (CW ANY*{-PARTOF(CW)}){-> MARK(Title)} CW;   // p=6; n=0
-
-// null -> Date(43, 51] "(1995b)."
-(LParen{NEAR(PERIOD, 1, 1, false, true)} ANY*{-PARTOF(CW)}){-PARTOF(Date) -> MARK(Date)} CW;    // p=3; n=0
-
-}
-
-
diff --git a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Whisk.ruta b/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Whisk.ruta
deleted file mode 100644
index badc12a..0000000
--- a/trunk/example-projects/TextRulerExample/script/uima/ruta/example/Whisk.ruta
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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 uima.ruta.example;
-
-// learnt using TextRulerExample\data\single
-
-SCRIPT uima.ruta.example.Features;
-Document{-> CALL(Features)};
-FirstToken{->MARKONCE(Author, 1, 2)} # LParen;  // p=20; n=0
-LParen{->MARKONCE(Date, 1, 4)} YearInd RParen PeriodSep;    // p=20; n=0
-NUM{->MARKONCE(Pages, 1, 4)} SPECIAL NUM LastToken; // p=15; n=0
-CW{REGEXP("University")->MARKONCE(Publisher, 1, 5)} EnglishStopWord CW CW CommaSep; // p=1; n=0
-PublisherInd{->MARKONCE(Publisher, 1, 2)} CommaSep; // p=1; n=0
-CW{REGEXP("Department")->MARKONCE(Institution, 1, 3)} # PeriodSep;  // p=1; n=0
-NUM{->MARKONCE(Volume, 1, 4)} # RParen CommaSep;    // p=6; n=0
-NUM{REGEXP("1")->MARKONCE(Volume, 1, 2)} CommaSep;  // p=1; n=0
-CW{->MARKONCE(Title, 1, 6)} SW SW SW # PeriodSep;   // p=13; n=0
-CW{REGEXP("Markov")->MARKONCE(Title, 1, 3)} # PERIOD CW;    // p=1; n=0
-CW{->MARKONCE(Title, 1, 6)} SW EnglishStopWord SW # PeriodSep;  // p=5; n=0
-CW{REGEXP("Introducing")->MARKONCE(Title, 1, 3)} # PeriodSep;   // p=1; n=0
-CW{REGEXP("Backtrack")->MARKONCE(Title, 1, 2)} # CW;    // p=1; n=0
-CW{REGEXP("Verbal")->MARKONCE(Title, 1, 3)} # PeriodSep;    // p=1; n=0
-CW{REGEXP("Causation")->MARKONCE(Title, 1, 3)} # PeriodSep; // p=1; n=0
-CW{REGEXP("Projection")->MARKONCE(Title, 1, 2)} # CW;   // p=1; n=0
-CW{REGEXP("Proceedings")->MARKONCE(Booktitle, 1, 3)} # CommaSep;    // p=1; n=0
-CW{REGEXP("Fundamenta")->MARKONCE(Journal, 1, 3)} CW CommaSep;  // p=1; n=0
-CW{->MARKONCE(Journal, 1, 5)} EnglishStopWord EnglishStopWord CAP CommaSep; // p=1; n=0
-FirstNameInitial{->MARKONCE(Journal, 1, 3)} CAP CommaSep;   // p=1; n=0
-CW{->MARKONCE(Journal, 1, 5)} EnglishStopWord CW # NameLinker NUM CommaSep; // p=2; n=0
-CW{REGEXP("Nucleic")->MARKONCE(Journal, 1, 4)} CW CW CommaSep;  // p=1; n=0
-CW{REGEXP("Journal")->MARKONCE(Journal, 1, 5)} EnglishStopWord CW CW CommaSep;  // p=1; n=0
-CW{REGEXP("Artificial")->MARKONCE(Journal, 1, 3)} CW CommaSep;  // p=2; n=0
-CW{REGEXP("Pattern")->MARKONCE(Journal, 1, 4)} CW CW CommaSep;  // p=1; n=0
-CW{REGEXP("Econometrica")->MARKONCE(Journal, 1, 2)} CommaSep;   // p=1; n=0
-CW{REGEXP("Journal")->MARKONCE(Journal, 1, 3)} # NameLinker;    // p=5; n=0
-CW{REGEXP("Evolutionary")->MARKONCE(Journal, 1, 3)} CW CommaSep;    // p=1; n=0
-CW{->MARKONCE(Location, 1, 3)} FirstName LastToken; // p=2; n=0
-FirstName{->MARKONCE(Location, 1, 4)} CommaSep CW LastToken;    // p=1; n=0
-CW{->MARKONCE(Tech, 1, 5)} PeriodSep SW PeriodSep CommaSep; // p=1; n=0
diff --git a/trunk/example-projects/ruta-ep-example-extensions/marker-file-identifying-eclipse-plugin b/trunk/example-projects/ruta-ep-example-extensions/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/example-projects/ruta-ep-example-extensions/plugin.xml b/trunk/example-projects/ruta-ep-example-extensions/plugin.xml
deleted file mode 100644
index a0029a8..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/plugin.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?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.

--->

-

-<plugin>

-   <extension

-         point="org.apache.uima.ruta.ide.actionExtension">

-      <action

-            class="org.apache.uima.ruta.example.extensions.ExampleActionIDEExtension"

-            engine="org.apache.uima.ruta.example.extensions.ExampleActionExtension">

-      </action>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.ide.conditionExtension">

-      <condition

-            class="org.apache.uima.ruta.example.extensions.ExampleConditionIDEExtension"

-            engine="org.apache.uima.ruta.example.extensions.ExampleConditionExtension">

-      </condition>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.ide.typeFunctionExtension">

-      <condition

-            class="org.apache.uima.ruta.example.extensions.ExampleTypeFunctionIDEExtension"

-            engine="org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension">

-      </condition>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.ide.booleanFunctionExtension">

-      <condition

-            class="org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionIDEExtension"

-            engine="org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension">

-      </condition>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.ide.stringFunctionExtension">

-      <condition

-            class="org.apache.uima.ruta.example.extensions.ExampleStringFunctionIDEExtension"

-            engine="org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension">

-      </condition>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.ide.numberFunctionExtension">

-      <condition

-            class="org.apache.uima.ruta.example.extensions.ExampleNumberFunctionIDEExtension"

-            engine="org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension">

-      </condition>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.ide.blockExtension">

-      <block

-            class="org.apache.uima.ruta.example.extensions.ExampleBlockIDEExtension"

-            engine="org.apache.uima.ruta.example.extensions.ExampleBlockExtension">

-      </block>

-   </extension>

-

-</plugin>

diff --git a/trunk/example-projects/ruta-ep-example-extensions/pom.xml b/trunk/example-projects/ruta-ep-example-extensions/pom.xml
deleted file mode 100644
index 57c3f90..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/pom.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?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.    

--->

-

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-ep-example-extensions</artifactId>

-  <name>Apache UIMA Ruta: ${project.artifactId}</name>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <postNoticeText />

-  </properties>

-  <url>${uimaWebsiteUrl}</url>

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide-ui</artifactId>

-      <version>${project.parent.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-   <dependency>

-      <groupId>org.antlr</groupId>

-      <artifactId>antlr-runtime</artifactId>

-      <version>3.5.2</version>

-      <exclusions>

-        <exclusion>

-          <groupId>org.antlr</groupId> 

-          <artifactId>stringtemplate</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>app</artifactId>

-      <version>[1.3.0,2.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.emf.ecore</groupId>

-      <artifactId>xmi</artifactId>

-      <version>[2.7.0,3.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>4.5</version>

-      <scope>test</scope>

-    </dependency>

-  </dependencies>

-  

-  <build>

-    <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

-    <finalName>org.apache.uima.ruta.example.extensions_${parsedVersion.osgiVersion}</finalName>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>release.properties</exclude> <!-- release generated artifact -->

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>issuesFixed/**</exclude>

-                  <exclude>src/test/resources/org/apache/uima/ruta/example/extensions/*.txt</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/example/extensions/*ruta</exclude> <!-- test data -->

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-

-    <plugins>

-      <plugin>

-        <groupId>org.apache.felix</groupId>

-        <artifactId>maven-bundle-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>uima-bundle</id>

-            <configuration>

-              <instructions>

-                <_nouses>true</_nouses>

-                <_exportcontents>

-                  org.apache.uima.ruta.example.extensions

-                </_exportcontents>

-                <Require-Bundle>

-                  org.apache.uima.runtime,

-                  org.apache.uima.ruta.engine,

-                  org.apache.uima.ruta.ide,

-                  org.apache.uima.ruta.ide.ui,

-                  org.eclipse.dltk.core;bundle-version="3.0.0"

-                </Require-Bundle>

-                <Import-Package>

-                </Import-Package>

-                <Bundle-SymbolicName>org.apache.uima.ruta.example.extensions;singleton:=true</Bundle-SymbolicName>

-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>

-                <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>

-                <Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>

-                <!-- <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy> -->

-                <Eclipse-BuddyPolicy>registered</Eclipse-BuddyPolicy>

-                <Eclipse-RegisterBuddy>org.apache.uima.runtime,org.apache.uima.ruta.engine</Eclipse-RegisterBuddy>

-              </instructions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

-    </plugins>

-  </build>

-</project>
\ No newline at end of file
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleAction.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleAction.java
deleted file mode 100644
index 33891df..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Random;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ExampleAction extends AbstractRutaAction {

-

-  private List<INumberExpression> indexExprList;

-

-  public ExampleAction(List<INumberExpression> indexExprList) {

-    super();

-    this.indexExprList = indexExprList;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Integer> indexes = new ArrayList<Integer>();

-    for (INumberExpression each : indexExprList) {

-      RutaBlock parent = element.getParent();

-      int integerValue = each.getIntegerValue(parent, match, element, stream);

-      indexes.add(integerValue);

-    }

-    List<RuleElement> ruleElements = element.getContainer().getRuleElements();

-    for (Integer each : indexes) {

-      if (each > 0 && each <= ruleElements.size()) {

-        Type type = getRandomType(stream);

-        RuleElement ruleElement = ruleElements.get(each - 1);

-        List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(ruleElement);

-        for (AnnotationFS eachMatched : matchedAnnotationsOf) {

-          AnnotationFS newAFS = stream.getCas().createAnnotation(type, eachMatched.getBegin(),

-                  eachMatched.getEnd());

-          stream.addAnnotation(newAFS, true, match);

-        }

-      }

-    }

-  }

-

-  private Type getRandomType(RutaStream stream) {

-    Type annotationType = stream.getCas().getTypeSystem().getType("org.apache.uima.ruta.type.TokenSeed");

-    TypeSystem typeSystem = stream.getCas().getTypeSystem();

-    List<Type> subsumedTypes = typeSystem.getProperlySubsumedTypes(annotationType);

-    Random r = new Random();

-    int nextInt = r.nextInt(subsumedTypes.size());

-    return subsumedTypes.get(nextInt);

-  }

-

-  public List<INumberExpression> getIndexExprList() {

-    return indexExprList;

-  }

-

-  public void setIndexExprList(List<INumberExpression> indexExprList) {

-    this.indexExprList = indexExprList;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleActionExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleActionExtension.java
deleted file mode 100644
index 86af0b5..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleActionExtension.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.extensions.IRutaActionExtension;

-import org.apache.uima.ruta.extensions.RutaParseException;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class ExampleActionExtension implements IRutaActionExtension {

-

-  private final String[] knownExtensions = new String[] { "ExampleAction" };

-

-  private final Class<?>[] extensions = new Class[] { ExampleAction.class };

-

-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {

-    if (element instanceof ExampleAction) {

-      return verbalizeName(element) + "("

-              + verbalizer.verbalizeExpressionList(((ExampleAction) element).getIndexExprList())

-              + ")";

-    } else {

-      return "UnknownAction";

-    }

-  }

-

-  public AbstractRutaAction createAction(String name, List<RutaExpression> args)

-          throws RutaParseException {

-    List<INumberExpression> arguments = new ArrayList<INumberExpression>();

-    if (args != null) {

-      for (RutaExpression each : args) {

-        if (each instanceof INumberExpression) {

-          arguments.add((INumberExpression) each);

-        } else {

-          throw new RutaParseException("ExampleAction accepts only NumberExpressions as arguments");

-        }

-      }

-    }

-    return new ExampleAction(arguments);

-  }

-

-  public String verbalizeName(RutaElement element) {

-    return knownExtensions[0];

-  }

-

-  public String[] getKnownExtensions() {

-    return knownExtensions;

-  }

-

-  public Class<?>[] extensions() {

-    return extensions;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleActionIDEExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleActionIDEExtension.java
deleted file mode 100644
index 87c3617..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleActionIDEExtension.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.antlr.runtime.RecognitionException;

-import org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaAction;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.compiler.problem.IProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-

-public class ExampleActionIDEExtension implements IIDEActionExtension {

-  private final String[] strings = new String[] { "ExampleAction" };

-

-  public String[] getKnownExtensions() {

-    return strings;

-  }

-

-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,

-          IProblemReporter rep) throws RecognitionException {

-    if (element instanceof RutaAction) {

-      RutaAction a = (RutaAction) element;

-      String name = a.getName();

-      if (!name.equals(strings[0])) {

-        IProblem problem = problemFactory.createUnknownActionProblem(a);

-        rep.reportProblem(problem);

-        return false;

-      }

-      boolean ok = true;

-      List<Expression> childs = a.getChilds();

-      for (Expression expression : childs) {

-        if (expression.getKind() != RutaTypeConstants.RUTA_TYPE_N) {

-          IProblem problem = problemFactory.createWrongArgumentTypeProblem(expression,

-                  "NumberExpression");

-          rep.reportProblem(problem);

-          ok = false;

-        }

-      }

-      return ok;

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlock.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlock.java
deleted file mode 100644
index aa2bbde..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlock.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.ruta.example.extensions;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.BlockApply;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.ScriptApply;
-import org.apache.uima.ruta.rule.AbstractRule;
-import org.apache.uima.ruta.rule.AbstractRuleMatch;
-import org.apache.uima.ruta.rule.RuleApply;
-import org.apache.uima.ruta.rule.RuleMatch;
-import org.apache.uima.ruta.rule.RutaRule;
-import org.apache.uima.ruta.rule.RutaRuleElement;
-import org.apache.uima.ruta.visitor.InferenceCrowd;
-
-/**
- * Exemplary implementation of a block extension, which applied its rules in reverse order.
- * 
- */
-public class ExampleBlock extends RutaBlock {
-
-  public ExampleBlock(RutaBlock parent, String defaultNamespace) {
-    super(parent, defaultNamespace, parent != null ? parent.getContext() : null);
-  }
-
-  @Override
-  public ScriptApply apply(RutaStream stream, InferenceCrowd crowd) {
-    BlockApply result = new BlockApply(this);
-    crowd.beginVisit(this, result);
-    RuleApply apply = rule.apply(stream, crowd, true);
-    for (AbstractRuleMatch<? extends AbstractRule> eachMatch : apply.getList()) {
-      if (eachMatch.matched()) {
-        List<AnnotationFS> matchedAnnotations = ((RuleMatch) eachMatch).getMatchedAnnotations(null,
-                null);
-        if (matchedAnnotations == null || matchedAnnotations.isEmpty()) {
-          continue;
-        }
-        AnnotationFS each = matchedAnnotations.get(0);
-        if (each == null) {
-          continue;
-        }
-        List<Type> types = ((RutaRuleElement) rule.getRuleElements().get(0)).getMatcher().getTypes(
-                getParent() == null ? this : getParent(), stream);
-        for (Type eachType : types) {
-          RutaStream window = stream.getWindowStream(each, eachType);
-          List<RutaStatement> elements = new ArrayList<RutaStatement>(getElements());
-          Collections.reverse(elements);
-          for (RutaStatement element : elements) {
-            if (element != null) {
-              element.apply(window, crowd);
-            }
-          }
-        }
-      }
-    }
-    crowd.endVisit(this, result);
-    return result;
-  }
-
-}
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlockExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlockExtension.java
deleted file mode 100644
index 37b92bc..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlockExtension.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.ruta.example.extensions;
-
-import java.util.List;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaElement;
-import org.apache.uima.ruta.expression.RutaExpression;
-import org.apache.uima.ruta.extensions.IRutaBlockExtension;
-import org.apache.uima.ruta.extensions.RutaParseException;
-import org.apache.uima.ruta.verbalize.RutaVerbalizer;
-
-public class ExampleBlockExtension implements IRutaBlockExtension {
-
-  private final String[] knownExtensions = new String[] { "REVERSE" };
-
-  private final Class<?>[] extensions = new Class[] { ExampleBlock.class };
-
-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {
-    if (element instanceof ExampleBlock) {
-      ExampleBlock b = (ExampleBlock) element;
-      String verbalize = verbalizer.verbalize(b, false);
-      verbalize = verbalize.replaceFirst("BLOCK", verbalizeName(element));
-      return verbalize;
-    } else {
-      return "UnknownAction";
-    }
-  }
-
-  @Override
-  public RutaBlock createBlock(String name, List<RutaExpression> args, RutaBlock env)
-          throws RutaParseException {
-    return new ExampleBlock(env, name);
-  }
-
-
-  public String verbalizeName(RutaElement element) {
-    return knownExtensions[0];
-  }
-
-  public String[] getKnownExtensions() {
-    return knownExtensions;
-  }
-
-  public Class<?>[] extensions() {
-    return extensions;
-  }
-
-
-}
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlockIDEExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlockIDEExtension.java
deleted file mode 100644
index 2561d80..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBlockIDEExtension.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.example.extensions;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-
-public class ExampleBlockIDEExtension implements IIDEConditionExtension {
-  private final String[] strings = new String[] { "REVERSE" };
-
-  public String[] getKnownExtensions() {
-    return strings;
-  }
-
-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,
-          IProblemReporter rep) throws RecognitionException {
-    // do not add additional checks in this example
-    return false;
-  }
-
-}
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunction.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunction.java
deleted file mode 100644
index 8016c6e..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ExampleBooleanFunction extends BooleanFunctionExpression {

-

-  private final TypeExpression expr;

-

-  public ExampleBooleanFunction(TypeExpression expr) {

-    super();

-    this.expr = expr;

-  }

-

-  public TypeExpression getExpr() {

-    return expr;

-  }

-

-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Type type = expr.getType(parent);

-    return type.isFeatureFinal();

-  }

-

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return expr.getStringValue(parent, annotation, stream);

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionExtension.java
deleted file mode 100644
index 3bee2ad..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionExtension.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.extensions.IRutaBooleanFunctionExtension;

-import org.apache.uima.ruta.extensions.RutaParseException;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class ExampleBooleanFunctionExtension implements IRutaBooleanFunctionExtension {

-

-  private final String[] knownExtensions = new String[] { "ExampleBooleanFunction" };

-

-  private final Class<?>[] extensions = new Class[] { ExampleBooleanFunction.class };

-

-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {

-    if (element instanceof ExampleBooleanFunction) {

-      return verbalizeName(element) + "("

-              + verbalizer.verbalize(((ExampleBooleanFunction) element).getExpr()) + ")";

-    } else {

-      return "UnknownBooleanFunction";

-    }

-  }

-

-  public ExampleBooleanFunction createBooleanFunction(String name, List<RutaExpression> args)

-          throws RutaParseException {

-    if (args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {

-      throw new RutaParseException(

-              "ExampleBooleanFunction accepts only one TypeExpression as argument!");

-    }

-    return new ExampleBooleanFunction((TypeExpression) args.get(0));

-  }

-

-  public String verbalizeName(RutaElement element) {

-    return knownExtensions[0];

-  }

-

-  public String[] getKnownExtensions() {

-    return knownExtensions;

-  }

-

-  public Class<?>[] extensions() {

-    return extensions;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionIDEExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionIDEExtension.java
deleted file mode 100644
index 27f59f4..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionIDEExtension.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.antlr.runtime.RecognitionException;

-import org.apache.uima.ruta.ide.core.extensions.IIDEBooleanFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.compiler.problem.IProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-

-public class ExampleBooleanFunctionIDEExtension implements IIDEBooleanFunctionExtension {

-  private final String[] strings = new String[] { "ExampleBooleanFunction" };

-

-  public String[] getKnownExtensions() {

-    return strings;

-  }

-

-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,

-          IProblemReporter rep) throws RecognitionException {

-    if (element instanceof RutaFunction) {

-      RutaFunction f = (RutaFunction) element;

-      String name = f.getName();

-      if (!name.equals(strings[0])) {

-        IProblem problem = problemFactory.createUnknownFunctionProblem(f);

-        rep.reportProblem(problem);

-        return false;

-      }

-      boolean ok = true;

-      List<Expression> childs = f.getChilds();

-      if (childs.size() != 1) {

-        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      Expression expr = childs.get(0);

-      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {

-        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      return ok;

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleCondition.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleCondition.java
deleted file mode 100644
index c5ab084..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleCondition.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.text.SimpleDateFormat;

-import java.util.Date;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ExampleCondition extends AbstractRutaCondition {

-

-  private final AbstractStringExpression dateExpr;

-

-  private final AbstractStringExpression formatExpr;

-

-  public ExampleCondition(AbstractStringExpression expr, AbstractStringExpression format) {

-    super();

-    this.dateExpr = expr;

-    this.formatExpr = format;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    String coveredText = annotation.getCoveredText();

-    String dateValue = dateExpr.getStringValue(element.getParent(), annotation, stream);

-    String formatValue = formatExpr.getStringValue(element.getParent(), annotation, stream);

-    SimpleDateFormat dateFormat = new SimpleDateFormat(formatValue);

-    boolean result = false;

-    try {

-      Date matchedDate = dateFormat.parse(coveredText);

-      Date givenDate = dateFormat.parse(dateValue);

-      int compareTo = matchedDate.compareTo(givenDate);

-      result = compareTo < 0;

-    } catch (Exception e) {

-    }

-    return new EvaluatedCondition(this, result);

-  }

-

-  public AbstractStringExpression getExpr() {

-    return dateExpr;

-  }

-

-  public AbstractStringExpression getFormatExpr() {

-    return formatExpr;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleConditionExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleConditionExtension.java
deleted file mode 100644
index 366a6bc..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleConditionExtension.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.extensions.IRutaConditionExtension;

-import org.apache.uima.ruta.extensions.RutaParseException;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class ExampleConditionExtension implements IRutaConditionExtension {

-

-  private final String[] knownExtensions = new String[] { "ExampleCondition" };

-

-  private final Class<?>[] extensions = new Class[] { ExampleCondition.class };

-

-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {

-    if (element instanceof ExampleCondition) {

-      ExampleCondition c = (ExampleCondition) element;

-      return verbalizeName(element) + "(" + verbalizer.verbalize(c.getExpr()) + ", "

-              + verbalizer.verbalize(c.getFormatExpr()) + ")";

-    } else {

-      return "UnknownAction";

-    }

-  }

-

-  public AbstractRutaCondition createCondition(String name, List<RutaExpression> args)

-          throws RutaParseException {

-    if (args != null && args.size() == 2) {

-      if (!(args.get(0) instanceof AbstractStringExpression)) {

-      }

-      if (!(args.get(1) instanceof AbstractStringExpression)) {

-      }

-    } else {

-      throw new RutaParseException(

-              "ExampleCondition accepts exactly two StringExpressions as arguments");

-    }

-    return new ExampleCondition((AbstractStringExpression) args.get(0), (AbstractStringExpression) args.get(1));

-  }

-

-  public String verbalizeName(RutaElement element) {

-    return knownExtensions[0];

-  }

-

-  public String[] getKnownExtensions() {

-    return knownExtensions;

-  }

-

-  public Class<?>[] extensions() {

-    return extensions;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleConditionIDEExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleConditionIDEExtension.java
deleted file mode 100644
index 11ce8b1..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleConditionIDEExtension.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.antlr.runtime.RecognitionException;

-import org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.compiler.problem.IProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-

-public class ExampleConditionIDEExtension implements IIDEConditionExtension {

-  private final String[] strings = new String[] { "ExampleCondition" };

-

-  public String[] getKnownExtensions() {

-    return strings;

-  }

-

-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,

-          IProblemReporter rep) throws RecognitionException {

-    if (element instanceof RutaCondition) {

-      RutaCondition a = (RutaCondition) element;

-      String name = a.getName();

-      if (!name.equals(strings[0])) {

-        IProblem problem = problemFactory.createUnknownConditionProblem(a);

-        rep.reportProblem(problem);

-        return false;

-      }

-      boolean ok = true;

-      List<Expression> childs = a.getChilds();

-      if (childs.size() != 2) {

-        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 2);

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      for (Expression expression : childs) {

-        if (expression.getKind() != RutaTypeConstants.RUTA_TYPE_S) {

-          IProblem problem = problemFactory.createWrongArgumentTypeProblem(expression,

-                  "StringExpression");

-          rep.reportProblem(problem);

-          ok = false;

-        }

-      }

-      return ok;

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunction.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunction.java
deleted file mode 100644
index d21be66..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.NumberFunctionExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ExampleNumberFunction extends NumberFunctionExpression {

-

-  private final TypeExpression expr;

-

-  public ExampleNumberFunction(TypeExpression expr) {

-    super();

-    this.expr = expr;

-  }

-

-  public TypeExpression getExpr() {

-    return expr;

-  }

-

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return expr.getType(parent).getShortName();

-  }

-

-  public int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getFeatureAmount(parent);

-  }

-

-  public double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getFeatureAmount(parent);

-  }

-

-  public float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getFeatureAmount(parent);

-  }

-

-  private int getFeatureAmount(RutaBlock parent) {

-    return expr.getType(parent).getFeatures().size();

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionExtension.java
deleted file mode 100644
index 6a55903..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionExtension.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.number.NumberFunctionExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.extensions.IRutaNumberFunctionExtension;

-import org.apache.uima.ruta.extensions.RutaParseException;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class ExampleNumberFunctionExtension implements IRutaNumberFunctionExtension {

-

-  private final String[] knownExtensions = new String[] { "ExampleNumberFunction" };

-

-  private final Class<?>[] extensions = new Class[] { ExampleNumberFunction.class };

-

-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {

-    if (element instanceof ExampleTypeFunction) {

-      return verbalizeName(element) + "("

-              + verbalizer.verbalize(((ExampleTypeFunction) element).getExpr()) + ")";

-    } else {

-      return "UnknownNumberFunction";

-    }

-  }

-

-  public NumberFunctionExpression createNumberFunction(String name, List<RutaExpression> args)

-          throws RutaParseException {

-    if (args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {

-      throw new RutaParseException("ExampleNumberFunction accepts only one TypeExpression as argument!");

-    }

-    return new ExampleNumberFunction((TypeExpression) args.get(0));

-  }

-

-  public String verbalizeName(RutaElement element) {

-    return knownExtensions[0];

-  }

-

-  public String[] getKnownExtensions() {

-    return knownExtensions;

-  }

-

-  public Class<?>[] extensions() {

-    return extensions;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionIDEExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionIDEExtension.java
deleted file mode 100644
index 7d3ab0f..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionIDEExtension.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.antlr.runtime.RecognitionException;

-import org.apache.uima.ruta.ide.core.extensions.IIDENumberFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.compiler.problem.IProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-

-public class ExampleNumberFunctionIDEExtension implements IIDENumberFunctionExtension {

-  private final String[] strings = new String[] { "ExampleNumberFunction" };

-

-  public String[] getKnownExtensions() {

-    return strings;

-  }

-

-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,

-          IProblemReporter rep) throws RecognitionException {

-    if (element instanceof RutaFunction) {

-      RutaFunction f = (RutaFunction) element;

-      String name = f.getName();

-      if (!name.equals(strings[0])) {

-        IProblem problem = problemFactory.createUnknownFunctionProblem(f);

-        rep.reportProblem(problem);

-        return false;

-      }

-      boolean ok = true;

-      List<Expression> childs = f.getChilds();

-      if (childs.size() != 1) {

-        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      Expression expr = childs.get(0);

-      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {

-        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      return ok;

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunction.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunction.java
deleted file mode 100644
index c0891de..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.StringFunctionExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ExampleStringFunction extends StringFunctionExpression {

-

-  private final TypeExpression expr;

-

-  public ExampleStringFunction(TypeExpression expr) {

-    super();

-    this.expr = expr;

-  }

-

-  public TypeExpression getExpr() {

-    return expr;

-  }

-

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return expr.getType(parent).getShortName();

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionExtension.java
deleted file mode 100644
index 0a8e08a..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionExtension.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.extensions.IRutaStringFunctionExtension;

-import org.apache.uima.ruta.extensions.RutaParseException;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class ExampleStringFunctionExtension implements IRutaStringFunctionExtension {

-

-  private final String[] knownExtensions = new String[] { "ExampleStringFunction" };

-

-  private final Class<?>[] extensions = new Class[] { ExampleStringFunction.class };

-

-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {

-    if (element instanceof ExampleStringFunction) {

-      return verbalizeName(element) + "("

-              + verbalizer.verbalize(((ExampleStringFunction) element).getExpr()) + ")";

-    } else {

-      return "UnknownStringFunction";

-    }

-  }

-

-  public ExampleStringFunction createStringFunction(String name, List<RutaExpression> args)

-          throws RutaParseException {

-    if (args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {

-      throw new RutaParseException("ExampleStringFunction accepts only one TypeExpression as argument!");

-    }

-    return new ExampleStringFunction((TypeExpression) args.get(0));

-  }

-

-  public String verbalizeName(RutaElement element) {

-    return knownExtensions[0];

-  }

-

-  public String[] getKnownExtensions() {

-    return knownExtensions;

-  }

-

-  public Class<?>[] extensions() {

-    return extensions;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionIDEExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionIDEExtension.java
deleted file mode 100644
index 552ffa6..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionIDEExtension.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.antlr.runtime.RecognitionException;

-import org.apache.uima.ruta.ide.core.extensions.IIDEStringFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.compiler.problem.IProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-

-public class ExampleStringFunctionIDEExtension implements IIDEStringFunctionExtension {

-  private final String[] strings = new String[] { "ExampleStringFunction" };

-

-  public String[] getKnownExtensions() {

-    return strings;

-  }

-

-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,

-          IProblemReporter rep) throws RecognitionException {

-    if (element instanceof RutaFunction) {

-      RutaFunction f = (RutaFunction) element;

-      String name = f.getName();

-      if (!name.equals(strings[0])) {

-        IProblem problem = problemFactory.createUnknownFunctionProblem(f);

-        rep.reportProblem(problem);

-        return false;

-      }

-      boolean ok = true;

-      List<Expression> childs = f.getChilds();

-      if (childs.size() != 1) {

-        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      Expression expr = childs.get(0);

-      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {

-        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      return ok;

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunction.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunction.java
deleted file mode 100644
index 538d49e..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.expression.type.TypeFunctionExpression;

-

-public class ExampleTypeFunction extends TypeFunctionExpression {

-

-  private final AbstractStringExpression expr;

-

-  public ExampleTypeFunction(AbstractStringExpression expr) {

-    super();

-    this.expr = expr;

-  }

-

-  public AbstractStringExpression getExpr() {

-    return expr;

-  }

-

-  public Type getType(RutaBlock parent) {

-    String stringValue = expr.getStringValue(parent, null, null);

-    return parent.getEnvironment().getType(stringValue);

-  }

-

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return expr.getStringValue(parent, annotation, stream);

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionExtension.java
deleted file mode 100644
index e3cbb0b..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionExtension.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.expression.type.TypeFunctionExpression;

-import org.apache.uima.ruta.extensions.IRutaTypeFunctionExtension;

-import org.apache.uima.ruta.extensions.RutaParseException;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class ExampleTypeFunctionExtension implements IRutaTypeFunctionExtension {

-

-  private final String[] knownExtensions = new String[] { "ExampleTypeFunction" };

-

-  private final Class<?>[] extensions = new Class[] { ExampleTypeFunction.class };

-

-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {

-    if (element instanceof ExampleTypeFunction) {

-      return verbalizeName(element) + "("

-              + verbalizer.verbalize(((ExampleTypeFunction) element).getExpr()) + ")";

-    } else {

-      return "UnknownTypeFunction";

-    }

-  }

-

-  public TypeFunctionExpression createTypeFunction(String name, List<RutaExpression> args)

-          throws RutaParseException {

-    if (args == null || args.size() != 1 || !(args.get(0) instanceof AbstractStringExpression)) {

-      throw new RutaParseException("ExampleTypeFunction accepts only one StringExpression as argument!");

-    }

-    return new ExampleTypeFunction((AbstractStringExpression) args.get(0));

-  }

-

-  public String verbalizeName(RutaElement element) {

-    return knownExtensions[0];

-  }

-

-  public String[] getKnownExtensions() {

-    return knownExtensions;

-  }

-

-  public Class<?>[] extensions() {

-    return extensions;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionIDEExtension.java b/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionIDEExtension.java
deleted file mode 100644
index 5343720..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/main/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionIDEExtension.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.util.List;

-

-import org.antlr.runtime.RecognitionException;

-import org.apache.uima.ruta.ide.core.extensions.IIDETypeFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.compiler.problem.IProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-

-public class ExampleTypeFunctionIDEExtension implements IIDETypeFunctionExtension {

-  private final String[] strings = new String[] { "ExampleTypeFunction" };

-

-  public String[] getKnownExtensions() {

-    return strings;

-  }

-

-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,

-          IProblemReporter rep) throws RecognitionException {

-    if (element instanceof RutaFunction) {

-      RutaFunction f = (RutaFunction) element;

-      String name = f.getName();

-      if (!name.equals(strings[0])) {

-        IProblem problem = problemFactory.createUnknownFunctionProblem(f);

-        rep.reportProblem(problem);

-        return false;

-      }

-      boolean ok = true;

-      List<Expression> childs = f.getChilds();

-      if (childs.size() != 1) {

-        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      Expression expr = childs.get(0);

-      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_S) {

-        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "NumberExpression");

-        rep.reportProblem(problem);

-        ok = false;

-      }

-      return ok;

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleActionTest.java b/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleActionTest.java
deleted file mode 100644
index dd226cc..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleActionTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.junit.Test;

-

-public class ExampleActionTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    assertEquals(84, cas.getAnnotationIndex().size());

-

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleBlockTest.java b/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleBlockTest.java
deleted file mode 100644
index 5bfb0d5..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleBlockTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.ruta.example.extensions;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.junit.Test;
-
-public class ExampleBlockTest {
-
-  @Test
-  public void test() {
-    String name = this.getClass().getSimpleName();
-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.txt", 50);
-    } catch (Exception e) {
-      e.printStackTrace();
-      assert (false);
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 4);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("This is a test.", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleConditionTest.java b/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleConditionTest.java
deleted file mode 100644
index 1049055..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleConditionTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.junit.Test;

-

-public class ExampleConditionTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    t = RutaTestUtils.getTestType(cas, 1);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    assertEquals("1900/12/24", iterator.next().getCoveredText());

-

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionTest.java b/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionTest.java
deleted file mode 100644
index d594a93..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.junit.Test;

-

-public class ExampleNumberFunctionTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    

-    t = RutaTestUtils.getTestType(cas, 1);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionTest.java b/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionTest.java
deleted file mode 100644
index 41134f0..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleStringFunctionTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.junit.Test;

-

-public class ExampleStringFunctionTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-    

-    t = RutaTestUtils.getTestType(cas, 1);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    assertEquals("CW", iterator.next().getCoveredText());

-    

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionTest.java b/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionTest.java
deleted file mode 100644
index a7284a2..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.junit.Test;

-

-public class ExampleTypeFunctionTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-

-    t = RutaTestUtils.getTestType(cas, 1);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(7, ai.size());

-    

-    t = RutaTestUtils.getTestType(cas, 2);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(8, ai.size());

-

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/RutaTestUtils.java b/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/RutaTestUtils.java
deleted file mode 100644
index 6d4987c..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/java/org/apache/uima/ruta/example/extensions/RutaTestUtils.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*

- * 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.ruta.example.extensions;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URISyntaxException;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-

-public class RutaTestUtils {

-

-  public static class TestFeature {

-    public String name;

-

-    public String description;

-

-    public String range;

-

-    public TestFeature(String name, String description, String range) {

-      super();

-      this.name = name;

-      this.description = description;

-      this.range = range;

-    }

-  }

-

-  public static final String TYPE = "org.apache.uima.T";

-

-  public static CAS process(String ruleFileName, String textFileName, int amount)

-          throws URISyntaxException, IOException, InvalidXMLException,

-          ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    return process(ruleFileName, textFileName, amount, false, false, null, null, null, null);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, int amount,

-          boolean dynamicAnchoring, boolean simpleGreedyForComposed,

-          Map<String, String> complexTypes, String resourceDirName) throws URISyntaxException,

-          IOException, InvalidXMLException, ResourceInitializationException,

-          AnalysisEngineProcessException, ResourceConfigurationException {

-    return process(ruleFileName, textFileName, amount, dynamicAnchoring, simpleGreedyForComposed,

-            complexTypes, null, resourceDirName, null);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, int amount,

-          boolean dynamicAnchoring, boolean simpleGreedyForComposed,

-          Map<String, String> complexTypes, Map<String, List<TestFeature>> features,

-          String resourceDirName) throws URISyntaxException, IOException, InvalidXMLException,

-          ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    return process(ruleFileName, textFileName, amount, dynamicAnchoring, simpleGreedyForComposed,

-            complexTypes, features, resourceDirName, null);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, int amount,

-          boolean dynamicAnchoring, boolean simpleGreedyForComposed,

-          Map<String, String> complexTypes, Map<String, List<TestFeature>> features,

-          String resourceDirName, CAS cas) throws URISyntaxException, IOException,

-          InvalidXMLException, ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    URL ruleURL = RutaTestUtils.class.getClassLoader().getResource(ruleFileName);

-    File ruleFile = new File(ruleURL.toURI());

-    URL textURL = RutaTestUtils.class.getClassLoader().getResource(textFileName);

-    File textFile = new File(textURL.toURI());

-    File resourceFile = null;

-    if (resourceDirName != null) {

-      URL resourceURL = RutaTestUtils.class.getClassLoader().getResource(resourceDirName);

-      resourceFile = new File(resourceURL.toURI());

-    }

-    URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/example/extensions/TestEngine.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-

-    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-    for (int i = 1; i <= amount; i++) {

-      basicTypeSystem.addType(TYPE + i, "Type for Testing", "uima.tcas.Annotation");

-    }

-

-    if (complexTypes != null) {

-      Set<Entry<String, String>> entrySet = complexTypes.entrySet();

-      for (Entry<String, String> entry : entrySet) {

-        String name = entry.getKey();

-        TypeDescription addType = basicTypeSystem.addType(name, "Type for Testing",

-                entry.getValue());

-        if (features != null) {

-          List<TestFeature> list = features.get(name);

-          for (TestFeature f : list) {

-            addType.addFeature(f.name, f.description, f.range);

-          }

-        }

-      }

-    }

-

-    Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-    tsds.add(basicTypeSystem);

-    TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-    aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { ruleFile

-            .getParentFile().getPath() });

-    String name = ruleFile.getName();

-    if (name.endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {

-      name = name.substring(0, name.length() - 5);

-    }

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-    ae.setConfigParameterValue(RutaEngine.PARAM_DYNAMIC_ANCHORING, dynamicAnchoring);

-    ae.setConfigParameterValue(RutaEngine.PARAM_SIMPLE_GREEDY_FOR_COMPOSED, simpleGreedyForComposed);

-    if (resourceFile != null) {

-      ae.setConfigParameterValue(RutaEngine.PARAM_RESOURCE_PATHS,

-              new String[] { resourceFile.getPath() });

-    }

-

-    ae.reconfigure();

-    if (cas == null) {

-      cas = ae.newCAS();

-      cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));

-    }

-    ae.process(cas);

-

-    ae.destroy();

-    return cas;

-  }

-

-  public static Type getTestType(CAS cas, int i) {

-    if (cas == null)

-      return null;

-    return cas.getTypeSystem().getType(TYPE + i);

-  }

-}

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/BasicTypeSystem.xml b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/BasicTypeSystem.xml
deleted file mode 100644
index d6cb49a..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>BasicTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <imports>

-    <import location="InternalTypeSystem.xml"/>

-  </imports>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ALL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ANY</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.MARKUP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.W</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CAP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PERIOD</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.QUESTION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COMMA</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SEMICOLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WS</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NUM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPECIAL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NBSP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AMP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPACE</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.BREAK</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Document</name>

-      <description/>

-      <supertypeName>uima.tcas.DocumentAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TokenSeed</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleActionTest.ruta b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleActionTest.ruta
deleted file mode 100644
index 2b33cb2..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleActionTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE uima.ruta.example;
-
-CW{ -> ExampleAction(1, 2, 3, 4, 5)} SW SW SW PERIOD;
-
-
-
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleBlockTest.ruta b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleBlockTest.ruta
deleted file mode 100644
index cf67d4b..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleBlockTest.ruta
+++ /dev/null
@@ -1,20 +0,0 @@
-PACKAGE uima.ruta.example;
-
-DECLARE T1, T2, T3, T4;
-
-//This is a test.
-REVERSE Document{}{
-  (CW T3){-> T4};
-  (SW T2){-> T3};
-  (SW T1){-> T2};
-  (SW PERIOD){-> T1};
-}
-
-
-
-
-
-
-
-
-
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionTest.ruta b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionTest.ruta
deleted file mode 100644
index b9e1794..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleBooleanFunctionTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-Document{-IF(ExampleBooleanFunction(Document)) -> MARK(T1)};
-
-
-
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleConditionTest.ruta b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleConditionTest.ruta
deleted file mode 100644
index f390f58..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleConditionTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE uima.ruta.example;
-
-
-DECLARE T1;
-(NUM (PERIOD | SPECIAL) NUM (PERIOD | SPECIAL) NUM){OR(ExampleCondition("24.02.1981", "dd.mm.yyyy"),
-     ExampleCondition("1981/02/24", "yyyy/mm/dd")) -> MARK(T1)};
\ No newline at end of file
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionTest.ruta b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionTest.ruta
deleted file mode 100644
index 0eb56a7..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleNumberFunctionTest.ruta
+++ /dev/null
@@ -1,11 +0,0 @@
-PACKAGE uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-Document{IF((ExampleNumberFunction(Document) == 4)) -> MARK(T1)};
-
-
-
-
-
-
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleStringFunctionTest.ruta b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleStringFunctionTest.ruta
deleted file mode 100644
index 273bfd3..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleStringFunctionTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-CAP{REGEXP(ExampleStringFunction(CW)) ->  MARK(T1)}; 
-
-
-
-
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionTest.ruta b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionTest.ruta
deleted file mode 100644
index 5867b3a..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/ExampleTypeFunctionTest.ruta
+++ /dev/null
@@ -1,18 +0,0 @@
-PACKAGE uima.ruta.example;
-
-DECLARE T1, T2, T3;
-
-STRING typeString;
-CAP{-> MATCHEDTEXT(typeString), MARK(ExampleTypeFunction(typeString))};
-
-ExampleTypeFunction(typeString){-> MARK(T1)};
-
-(W PERIOD W PERIOD W PERIOD W PERIOD W PERIOD CAP){-> MATCHEDTEXT(typeString), MARK(ExampleTypeFunction(typeString))};
-
-ExampleTypeFunction(typeString){-> MARK(T2)};
-
-
-
-
-
-
diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/InternalTypeSystem.xml b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/InternalTypeSystem.xml
deleted file mode 100644
index aabf9a0..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/InternalTypeSystem.xml
+++ /dev/null
@@ -1,345 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>InternalTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaBasic</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>replacement</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>score</name>

-          <description/>

-          <rangeTypeName>uima.cas.Double</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>applied</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>tried</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>rules</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>matched</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>delegates</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>innerApply</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>baseCondition</name>

-          <description/>

-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>matches</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>ruleAnchor</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaColoring</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>bgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>targetType</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>fgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>selected</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>value</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalsePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>original</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalseNegative</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>time</name>

-          <description/>

-          <rangeTypeName>uima.cas.Long</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaFrame</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Statistics</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>total</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>amount</name>

-          <description/>

-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>part</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TruePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>rule</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/TestEngine.xml b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/TestEngine.xml
deleted file mode 100644
index 71c7532..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/TestEngine.xml
+++ /dev/null
@@ -1,245 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>BasicEngine</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters searchStrategy="language_fallback">

-      <configurationParameter>

-        <name>seeders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debug</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalScripts</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>profile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugWithMatches</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>statistics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalExtensions</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugOnlyFor</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptEncoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngineLoaders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>resourcePaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>defaultFilteredTypes</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>mainScript</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>removeBasics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>dynamicAnchoring</name>

-        <description>Activates dynamic achoring (possible speed up).</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>lowMemoryProfile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>createdBy</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>debug</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>profile</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>debugWithMatches</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>defaultFilteredTypes</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.type.SPACE</string>

-            <string>org.apache.uima.ruta.type.NBSP</string>

-            <string>org.apache.uima.ruta.type.BREAK</string>

-            <string>org.apache.uima.ruta.type.MARKUP</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>removeBasics</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>seeders</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>createdBy</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>additionalExtensions</name>

-          <value>

-              <array>

-                  <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>

-                  <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>

-                  <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>

-                  <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>

-                  <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>

-                  <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>

-              <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>

-          </array>

-          </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="BasicTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities>

-      <priorityList>

-        <type>org.apache.uima.ruta.type.RutaFrame</type>

-        <type>uima.tcas.Annotation</type>

-        <type>org.apache.uima.ruta.type.RutaBasic</type>

-      </priorityList>

-    </typePriorities>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/TypePriorities.xml b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/TypePriorities.xml
deleted file mode 100644
index 22bba9b..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/TypePriorities.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
--->
-
-<typePriorities xmlns="http://uima.apache.org/resourceSpecifier">
-<name>TypePrioritites</name>
-<description></description>
-<version>1.0</version>
-<vendor></vendor>
-
-      <priorityList>
-        <type>org.apache.uima.ruta.type.RutaFrame</type>
-        <type>uima.tcas.Annotation</type>
-        <type>org.apache.uima.ruta.type.RutaBasic</type>
-      </priorityList>
-    

-    
-</typePriorities>
-

diff --git a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/test.txt b/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/test.txt
deleted file mode 100644
index 0a92e4b..0000000
--- a/trunk/example-projects/ruta-ep-example-extensions/src/test/resources/org/apache/uima/ruta/example/extensions/test.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a test.

-1900/12/24 and 24.4.1982

-CW

-org.apache.uima.ruta.type.NUM
\ No newline at end of file
diff --git a/trunk/example-projects/ruta-maven-example/pom.xml b/trunk/example-projects/ruta-maven-example/pom.xml
deleted file mode 100644
index c9a649a..0000000
--- a/trunk/example-projects/ruta-maven-example/pom.xml
+++ /dev/null
@@ -1,301 +0,0 @@
-<?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. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>ruta-maven-example</artifactId>
-	<parent>
-		<groupId>org.apache.uima</groupId>
-		<artifactId>ruta-parent</artifactId>
-		<version>2.3.0</version>
-		<relativePath>ruta-parent/pom.xml</relativePath>
-	</parent>
-	<url>${uimaWebsiteUrl}</url>
-	<scm>
-		<url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/example-projects/ruta-maven-example</url>
-		<connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/example-projects/ruta-maven-example</connection>
-		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/example-projects/ruta-maven-example</developerConnection>
-	</scm>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.uima</groupId>
-			<artifactId>ruta-core</artifactId>
-			<version>${project.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.uima</groupId>
-			<artifactId>ruta-core-ext</artifactId>
-			<version>${project.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>4.5</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-
-	<build>
-		<resources>
-			<resource>
-				<directory>src/main/ruta</directory>
-			</resource>
-			<resource>
-				<directory>src/main/resources</directory>
-			</resource>
-			<resource>
-				<directory>${project.build.directory}/generated-sources/ruta/descriptor</directory>
-			</resource>
-			<resource>
-				<directory>${project.build.directory}/generated-sources/ruta/resources</directory>
-			</resource>
-		</resources>
-
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>org.apache.rat</groupId>
-					<artifactId>apache-rat-plugin</artifactId>
-					<executions>
-						<execution>
-							<id>default-cli</id>
-							<configuration>
-								<excludes>
-									<exclude>.buildpath</exclude> <!-- generate IDE file -->
-									<exclude>src/main/resources/FirstNames.txt</exclude> <!-- dictionary -->
-									<exclude>issuesFixed/**</exclude> <!-- generated -->
-								</excludes>
-							</configuration>
-						</execution>
-					</executions>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-
-		<plugins>
-			<plugin>
-				<groupId>org.apache.uima</groupId>
-				<artifactId>ruta-maven-plugin</artifactId>
-				<version>${project.version}</version>
-				<configuration>
-
-					<!-- This is a exemplary configuration, which explicitly specifies the 
-						default configuration values if not mentioned otherwise. -->
-
-					<!-- The directory where the generated type system descriptors will 
-						be written stored. -->
-					<!-- default value: ${project.build.directory}/generated-sources/ruta/descriptor -->
-					<typeSystemOutputDirectory>${project.build.directory}/generated-sources/ruta/descriptor</typeSystemOutputDirectory>
-
-					<!-- The directory where the generated analysis engine descriptors will 
-						be stored. -->
-					<!-- default value: ${project.build.directory}/generated-sources/ruta/descriptor -->
-					<analysisEngineOutputDirectory>${project.build.directory}/generated-sources/ruta/descriptor</analysisEngineOutputDirectory>
-
-					<!-- The template descriptor for the generated type system. By default 
-						the descriptor of the maven dependency is loaded. -->
-					<!-- default value: none -->
-					<!-- not used in this example <typeSystemTemplate>...</typeSystemTemplate> -->
-
-					<!-- The template descriptor for the generated analysis engine. By default 
-						the descriptor of the maven dependency is loaded. -->
-					<!-- default value: none -->
-					<!-- not used in this example <analysisEngineTemplate>...</analysisEngineTemplate> -->
-
-					<!-- Script paths of the generated analysis engine descriptor. -->
-					<!-- default value: none -->
-					<scriptPaths>
-						<scriptPath>${basedir}/src/main/ruta/</scriptPath>
-					</scriptPaths>
-
-					<!-- Descriptor paths of the generated analysis engine descriptor. -->
-					<!-- default value: none -->
-					<descriptorPaths>
-						<descriptorPath>${project.build.directory}/generated-sources/ruta/descriptor</descriptorPath>
-					</descriptorPaths>
-
-					<!-- Resource paths of the generated analysis engine descriptor. -->
-					<!-- default value: none -->
-					<resourcePaths>
-						<resourcePath>${basedir}/src/main/resources/</resourcePath>
-						<resourcePath>${project.build.directory}/generated-sources/ruta/resources/</resourcePath>
-					</resourcePaths>
-
-					<!-- Suffix used for the generated type system descriptors. -->
-					<!-- default value: Engine -->
-					<analysisEngineSuffix>Engine</analysisEngineSuffix>
-
-					<!-- Suffix used for the generated analysis engine descriptors. -->
-					<!-- default value: TypeSystem -->
-					<typeSystemSuffix>TypeSystem</typeSystemSuffix>
-
-					<!-- Source file encoding. -->
-					<!-- default value: ${project.build.sourceEncoding} -->
-					<encoding>UTF-8</encoding>
-
-					<!-- Type of type system imports. false = import by location. -->
-					<!-- default value: false -->
-					<importByName>false</importByName>
-
-					<!-- Option to resolve imports while building. -->
-					<!-- default value: false -->
-					<resolveImports>false</resolveImports>
-
-					<!-- Amount of retries for building dependent descriptors. Default value 
-						-1 leads to three retires for each script. -->
-					<!-- default value: -1 -->
-					<maxBuildRetries>-1</maxBuildRetries>
-
-					<!-- List of packages with language extensions -->
-					<!-- default value: none -->
-					<extensionPackages>
-						<extensionPackage>org.apache.uima.ruta</extensionPackage>
-					</extensionPackages>
-
-					<!-- Add UIMA Ruta nature to .project -->
-					<!-- default value: false -->
-					<addRutaNature>true</addRutaNature>
-
-
-					<!-- Buildpath of the UIMA Ruta Workbench (IDE) for this project -->
-					<!-- default value: none -->
-					<buildPaths>
-						<buildPath>script:src/main/ruta/</buildPath>
-						<buildPath>descriptor:target/generated-sources/ruta/descriptor/</buildPath>
-						<buildPath>resources:src/main/resources/</buildPath>
-					</buildPaths>
-
-				</configuration>
-				<executions>
-					<execution>
-						<id>default</id>
-						<phase>process-classes</phase>
-						<goals>
-							<goal>generate</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.uima</groupId>
-				<artifactId>ruta-maven-plugin</artifactId>
-				<version>2.3.0</version>
-				<configuration />
-				<executions>
-					<execution>
-						<id>default</id>
-						<phase>process-classes</phase>
-						<goals>
-							<goal>twl</goal>
-						</goals>
-						<configuration>
-							<!-- This is a exemplary configuration, which explicitly specifies 
-								the default configuration values if not mentioned otherwise. -->
-
-							<!-- Compress resulting tree word list. -->
-							<!-- default value: true -->
-							<compress>true</compress>
-
-							<!-- The source files for the tree word list. -->
-							<!-- default value: none -->
-							<inputFiles>
-								<directory>${basedir}/src/main/resources</directory>
-								<includes>
-									<include>*.txt</include>
-								</includes>
-							</inputFiles>
-
-							<!-- The directory where the generated tree word lists will be written 
-								to. -->
-							<!-- default value: ${project.build.directory}/generated-sources/ruta/resources/ -->
-							<outputDirectory>${project.build.directory}/generated-sources/ruta/resources/</outputDirectory>
-
-							<!-- Source file encoding. -->
-							<!-- default value: ${project.build.sourceEncoding} -->
-							<encoding>UTF-8</encoding>
-
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.uima</groupId>
-				<artifactId>ruta-maven-plugin</artifactId>
-				<version>2.3.0</version>
-				<configuration />
-				<executions>
-					<execution>
-						<id>default</id>
-						<phase>process-classes</phase>
-						<goals>
-							<goal>mtwl</goal>
-						</goals>
-						<configuration>
-							<!-- This is a exemplary configuration, which explicitly specifies 
-								the default configuration values if not mentioned otherwise. -->
-
-							<!-- Compress resulting tree word list. -->
-							<!-- default value: true -->
-							<compress>true</compress>
-
-							<!-- The source files for the multi tree word list. -->
-							<!-- default value: none -->
-							<inputFiles>
-								<directory>${basedir}/src/main/resources</directory>
-								<includes>
-									<include>*.txt</include>
-								</includes>
-							</inputFiles>
-
-							<!-- The directory where the generated tree word list will be written 
-								to. -->
-							<!-- default value: ${project.build.directory}/generated-sources/ruta/resources/generated.mtwl -->
-							<outputFile>${project.build.directory}/generated-sources/ruta/resources/generated.mtwl</outputFile>
-
-							<!-- Source file encoding. -->
-							<!-- default value: ${project.build.sourceEncoding} -->
-							<encoding>UTF-8</encoding>
-
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.uima</groupId>
-				<artifactId>jcasgen-maven-plugin</artifactId>
-				<version>2.7.0</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>generate</goal>
-						</goals>
-						<!-- runs in phase process-resources by default -->
-						<configuration>
-
-							<!-- one or more ant-like file patterns identifying top level descriptors -->
-							<typeSystemIncludes>
-								<typeSystemInclude>src/main/resources/types/BibtexTypeSystem.xml</typeSystemInclude>
-							</typeSystemIncludes>
-
-							<limitToProject>true</limitToProject>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-</project>
\ No newline at end of file
diff --git a/trunk/example-projects/ruta-maven-example/src/main/resources/FirstNames.txt b/trunk/example-projects/ruta-maven-example/src/main/resources/FirstNames.txt
deleted file mode 100644
index f981878..0000000
--- a/trunk/example-projects/ruta-maven-example/src/main/resources/FirstNames.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Stephen
-Claire
-Raymond
\ No newline at end of file
diff --git a/trunk/example-projects/ruta-maven-example/src/main/resources/types/BibtexTypeSystem.xml b/trunk/example-projects/ruta-maven-example/src/main/resources/types/BibtexTypeSystem.xml
deleted file mode 100644
index 0042d8a..0000000
--- a/trunk/example-projects/ruta-maven-example/src/main/resources/types/BibtexTypeSystem.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>BibtexTypeSystem</name>
-  <description/>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>uima.ruta.example.Bibtex</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>author</name>
-          <description/>
-          <rangeTypeName>uima.ruta.example.Author</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>title</name>
-          <description/>
-          <rangeTypeName>uima.ruta.example.Title</rangeTypeName>
-        </featureDescription>
-        <featureDescription>
-          <name>year</name>
-          <description/>
-          <rangeTypeName>uima.ruta.example.Year</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>uima.ruta.example.Author</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>uima.ruta.example.Year</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>uima.ruta.example.Title</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Author.ruta b/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Author.ruta
deleted file mode 100644
index 3c9d7f5..0000000
--- a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Author.ruta
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system:
-TYPESYSTEM types.BibtexTypeSystem;
-
-// define and import an external dictionary containing first names
-WORDLIST FirstNameList = 'FirstNames.txt';
-
-// define some useful annotations
-DECLARE FirstName, FirstNameInitial, Name, NameListPart;
-
-//find the first names
-Document{-> MARKFAST(FirstName, FirstNameList)};
-
-// something that may links names
-DECLARE NameLinker;
-W{REGEXP("and", false) -> MARK(NameLinker)};
-COMMA{ -> MARK(NameLinker)};
-SPECIAL{REGEXP("&") -> MARK(NameLinker)};
-
-// first name initials
-CW{REGEXP(".") -> MARK(FirstNameInitial,1,2)} PERIOD;
-
-// maybe a name
-FirstName+ FirstNameInitial* CW{-> MARK(Name, 1, 2, 3)};
-FirstNameInitial+{-PARTOF(Name)} CW{-> MARK(Name, 1, 2, 3)};
-CW{-PARTOF(Name), -REGEXP(".")} COMMA? FirstNameInitial+{-> MARK(Name, 1, 2, 3)};
-
-// list of names
-Name{-PARTOF(NameListPart)} NameLinker[1,2]{-> MARK(NameListPart,1,2)};
-NameListPart+ Name{-PARTOF(Author),-PARTOF(NameListPart) -> MARK(Author,1,2,3)} ;
-NameListPart+{-PARTOF(Author) -> MARK(Author)};
-
-// expand the author to the following punctation mark
-Author{-> SHIFT(Author,1,2)} PM;
diff --git a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/AuthorWithMTWL.ruta b/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/AuthorWithMTWL.ruta
deleted file mode 100644
index 4398e10..0000000
--- a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/AuthorWithMTWL.ruta
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system:
-TYPESYSTEM types.BibtexTypeSystem;
-
-// define and import an external dictionary containing first names
-WORDLIST dict = 'generated.mtwl';
-
-// define some useful annotations
-DECLARE FirstName, FirstNameInitial, Name, NameListPart;
-
-//find the first names
-Document{-> TRIE("FirstNames.txt"=FirstName, dict, true, 4, false, 0, ".,-/")};
-
-// something that may links names
-DECLARE NameLinker;
-W{REGEXP("and", false) -> MARK(NameLinker)};
-COMMA{ -> MARK(NameLinker)};
-SPECIAL{REGEXP("&") -> MARK(NameLinker)};
-
-// first name initials
-CW{REGEXP(".") -> MARK(FirstNameInitial,1,2)} PERIOD;
-
-// maybe a name
-FirstName+ FirstNameInitial* CW{-> MARK(Name, 1, 2, 3)};
-FirstNameInitial+{-PARTOF(Name)} CW{-> MARK(Name, 1, 2, 3)};
-CW{-PARTOF(Name), -REGEXP(".")} COMMA? FirstNameInitial+{-> MARK(Name, 1, 2, 3)};
-
-// list of names
-Name{-PARTOF(NameListPart)} NameLinker[1,2]{-> MARK(NameListPart,1,2)};
-NameListPart+ Name{-PARTOF(Author),-PARTOF(NameListPart) -> MARK(Author,1,2,3)} ;
-NameListPart+{-PARTOF(Author) -> MARK(Author)};
-
-// expand the author to the following punctation mark
-Author{-> SHIFT(Author,1,2)} PM;
diff --git a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Main.ruta b/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Main.ruta
deleted file mode 100644
index 8209d0c..0000000
--- a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Main.ruta
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system 
-// (located in the descriptor folder -> uima.textmarker.example folder)
-TYPESYSTEM types.BibtexTypeSystem;
-
-SCRIPT uima.ruta.example.Author;
-SCRIPT uima.ruta.example.Title;
-SCRIPT uima.ruta.example.Year;
-
-// execute the Year script on the complete input document. 
-// (Try the the go into: ctrl left mouse button on "Year" in the action)
-Document{-> CALL(Year)};
-// execute the Author script on the complete input document
-Document{-> CALL(Author)};
-// execute the Title script on the complete input document
-Document{-> CALL(Title)};
-
-// create bibtex annotation
-Document{-> CREATE(Bibtex, "author" = Author, "title" = Title, "year" = Year)};
-
diff --git a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Title.ruta b/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Title.ruta
deleted file mode 100644
index e2d59b5..0000000
--- a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Title.ruta
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system:
-TYPESYSTEM types.BibtexTypeSystem;
-
-// simpified rules for extracting the title
-DECLARE TitleStopper;
-PM W{REGEXP("in", true) -> MARK(TitleStopper)};
-
-// annotate everything between the Author (and an optional a punctation mark) and
-Author PM? ANY+?{-> MARK(Title)} TitleStopper;
diff --git a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Year.ruta b/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Year.ruta
deleted file mode 100644
index 2fa94f1..0000000
--- a/trunk/example-projects/ruta-maven-example/src/main/ruta/uima/ruta/example/Year.ruta
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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 uima.ruta.example;
-
-// import the types of this type system:
-TYPESYSTEM types.BibtexTypeSystem;
-
-// find something that maybe indicates the year: a number with four digits starting with 19 or 20
-NUM{REGEXP("19..|20..") -> MARK(Year,1,2)} PM?;
-
-// add parentheses if there are some (by removing the old Year annotation and creating a new one)
-SPECIAL{REGEXP("[(]")} Year{ -> SHIFT(Year,1,2,3,4)} SPECIAL{REGEXP("[)]")} PM?;
-
-
diff --git a/trunk/example-projects/ruta-maven-example/src/test/java/org/apache/uima/ruta/example/ExampleTest.java b/trunk/example-projects/ruta-maven-example/src/test/java/org/apache/uima/ruta/example/ExampleTest.java
deleted file mode 100644
index f71770b..0000000
--- a/trunk/example-projects/ruta-maven-example/src/test/java/org/apache/uima/ruta/example/ExampleTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*

- * 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.ruta.example;

-

-import static org.junit.Assert.assertEquals;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.Collection;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.fit.util.JCasUtil;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-import uima.ruta.example.Author;

-import uima.ruta.example.Bibtex;

-

-public class ExampleTest {

-

-  @Test

-  public void testMain() throws InvalidXMLException, IOException, ResourceInitializationException,

-          AnalysisEngineProcessException, CASException {

-    File aeFile = new File(

-            "target/generated-sources/ruta/descriptor/uima/ruta/example/MainEngine.xml");

-

-    AnalysisEngineDescription aed = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(

-            new XMLInputSource(aeFile));

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);

-    CAS cas = ae.newCAS();

-    cas.setDocumentText("Ogren, P.V., Wetzler, P.G., Bethard, S.: ClearTK: A UIMA Toolkit for Statistical Natural Language Processing. In: UIMA for NLP workshop at LREC 08. (2008)");

-    ae.process(cas);

-

-    JCas jCas = cas.getJCas();

-    Collection<Bibtex> bibtexs = JCasUtil.select(jCas, Bibtex.class);

-    assertEquals(1, bibtexs.size());

-    Bibtex bibtex = bibtexs.iterator().next();

-    assertEquals(

-            "Ogren, P.V., Wetzler, P.G., Bethard, S.: ClearTK: A UIMA Toolkit for Statistical Natural Language Processing. In: UIMA for NLP workshop at LREC 08. (2008)",

-            bibtex.getCoveredText());

-    assertEquals("Ogren, P.V., Wetzler, P.G., Bethard, S.:", bibtex.getAuthor().getCoveredText());

-    assertEquals("ClearTK: A UIMA Toolkit for Statistical Natural Language Processing.", bibtex

-            .getTitle().getCoveredText());

-    assertEquals("(2008)", bibtex.getYear().getCoveredText());

-  }

-  

-  @Test

-  public void testAuthorWithMTWL() throws InvalidXMLException, IOException, ResourceInitializationException,

-          AnalysisEngineProcessException, CASException {

-    File aeFile = new File(

-            "target/generated-sources/ruta/descriptor/uima/ruta/example/AuthorWithMTWLEngine.xml");

-

-    AnalysisEngineDescription aed = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(

-            new XMLInputSource(aeFile));

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);

-    CAS cas = ae.newCAS();

-    cas.setDocumentText("Stephen Soderland, Claire Cardie, and Raymond Mooney. Learning Information Extraction Rules for Semi-Structured and Free Text. In Machine Learning, volume 34, pages 233–272, 1999.");

-    ae.process(cas);

-

-    JCas jCas = cas.getJCas();

-    Collection<Author> authors = JCasUtil.select(jCas, Author.class);

-    assertEquals(1, authors.size());

-    Author author = authors.iterator().next();

-    assertEquals(

-            "Stephen Soderland, Claire Cardie, and Raymond Mooney.",

-            author.getCoveredText());

-  }

-

-}

diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/.project b/trunk/example-projects/ruta-tutorial-GermanNovels/.project
deleted file mode 100644
index 3601b3a..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>ruta-tutorial-GermanNovels</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>net.sourceforge.texlipse.builder.TexlipseBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>net.sourceforge.texlipse.builder.TexlipseNature</nature>
-	</natures>
-</projectDescription>
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/.texlipse b/trunk/example-projects/ruta-tutorial-GermanNovels/.texlipse
deleted file mode 100644
index 4d8b624..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/.texlipse
+++ /dev/null
@@ -1,14 +0,0 @@
-#TeXlipse project settings

-#Tue Sep 30 14:20:26 CEST 2014

-markTmpDer=true

-builderNum=2

-outputDir=bin/

-makeIndSty=

-bibrefDir=

-outputFormat=pdf

-tempDir=tmp

-mainTexFile=tutorial-GermanNovels.tex

-outputFile=tutorial-GermanNovels.pdf

-langSpell=en

-markDer=true

-srcDir=src/

diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/basic_token.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/basic_token.png
deleted file mode 100644
index 048333c..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/basic_token.png
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0501\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0501\051.png"
deleted file mode 100644
index 907fe8d..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0501\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05010+11\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05010+11\051.png"
deleted file mode 100644
index 0c86362..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05010+11\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05012\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05012\051.png"
deleted file mode 100644
index f265069..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05012\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05013+14\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05013+14\051.png"
deleted file mode 100644
index d890e9d..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\05013+14\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0502+3\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0502+3\051.png"
deleted file mode 100644
index a16492d..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0502+3\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0504+5\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0504+5\051.png"
deleted file mode 100644
index b61cd15..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0504+5\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0506\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0506\051.png"
deleted file mode 100644
index e997f2f..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0506\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0507+8\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0507+8\051.png"
deleted file mode 100644
index 53f065f..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0507+8\051.png"
+++ /dev/null
Binary files differ
diff --git "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0509\051.png" "b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0509\051.png"
deleted file mode 100644
index 8079019..0000000
--- "a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture\0509\051.png"
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_marked.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_marked.png
deleted file mode 100644
index 3a3a1f3..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_marked.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_rules.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_rules.png
deleted file mode 100644
index bd58d5c..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_rules.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_text.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_text.png
deleted file mode 100644
index 3882159..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_text.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_text2.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_text2.png
deleted file mode 100644
index f12f0db..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_text2.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_wordlist.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_wordlist.png
deleted file mode 100644
index 9afe088..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/capture_wordlist.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/final_result.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/final_result.png
deleted file mode 100644
index 4be9fb1..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/final_result.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/final_rules.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/final_rules.png
deleted file mode 100644
index 3b445cc..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/final_rules.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/m2e_install.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/m2e_install.png
deleted file mode 100644
index ff07085..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/m2e_install.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_error.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_error.png
deleted file mode 100644
index d8f77b3..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_error.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_install.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_install.png
deleted file mode 100644
index c194aab..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_install.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_m2e.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_m2e.png
deleted file mode 100644
index cb74cfe..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_m2e.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_marketplace.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_marketplace.png
deleted file mode 100644
index 676e022..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_marketplace.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_quickfix.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_quickfix.png
deleted file mode 100644
index 23791f1..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/maven_quickfix.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_annotate.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_annotate.png
deleted file mode 100644
index 5cb7d45..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_annotate.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_main.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_main.png
deleted file mode 100644
index 4ee3a7d..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_main.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_mode.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_mode.png
deleted file mode 100644
index e00aaec..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_mode.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_pref.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_pref.png
deleted file mode 100644
index 8fcfa6a..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_pref.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_result.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_result.png
deleted file mode 100644
index 859cb75..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_result.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_thumb.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_thumb.png
deleted file mode 100644
index 2e07aa4..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_thumb.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_view.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_view.png
deleted file mode 100644
index eaf6782..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/test_view.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_ano.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_ano.png
deleted file mode 100644
index 5d281ee..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_ano.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_convert.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_convert.png
deleted file mode 100644
index 5b5bb9d..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_convert.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_dkpro.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_dkpro.png
deleted file mode 100644
index ee6a4fc..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_dkpro.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_main.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_main.png
deleted file mode 100644
index 26baf62..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_main.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_maven.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_maven.png
deleted file mode 100644
index a698645..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_maven.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_mavenupdate.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_mavenupdate.png
deleted file mode 100644
index 1e2dc16..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_mavenupdate.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_name.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_name.png
deleted file mode 100644
index b60c538..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_name.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_name2.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_name2.png
deleted file mode 100644
index 6a5baf9..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_name2.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_newpom.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_newpom.png
deleted file mode 100644
index 51e4da7..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_newpom.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_overview.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_overview.png
deleted file mode 100644
index 3d4b68f..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_overview.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pom.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pom.png
deleted file mode 100644
index 5954d8d..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pom.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pom2.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pom2.png
deleted file mode 100644
index 6e3d03a..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pom2.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pos.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pos.png
deleted file mode 100644
index 0aaa155..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pos.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pos2.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pos2.png
deleted file mode 100644
index 1541bbd..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_pos2.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_speech.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_speech.png
deleted file mode 100644
index 4ebe2f5..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_speech.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_speech2.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_speech2.png
deleted file mode 100644
index aefd193..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_speech2.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_titles.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_titles.png
deleted file mode 100644
index a29f4f1..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/tt_titles.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/typesystem.png b/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/typesystem.png
deleted file mode 100644
index 2c40b4e..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/figs/typesystem.png
+++ /dev/null
Binary files differ
diff --git a/trunk/example-projects/ruta-tutorial-GermanNovels/src/tutorial-GermanNovels.tex b/trunk/example-projects/ruta-tutorial-GermanNovels/src/tutorial-GermanNovels.tex
deleted file mode 100644
index b49e5a9..0000000
--- a/trunk/example-projects/ruta-tutorial-GermanNovels/src/tutorial-GermanNovels.tex
+++ /dev/null
@@ -1,632 +0,0 @@
-%  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.
-
-\documentclass{article}
-\setcounter{tocdepth}{2}
-
-\usepackage[utf8]{inputenc}
-\usepackage[ngerman]{babel}
-
-\usepackage[pdftex]{graphicx}
-\usepackage{listings}
-\usepackage[svgnames]{xcolor}
-\usepackage{hyperref}
-
-\definecolor{mygreen}{RGB}{1,121,111} %pinegreen
-\pagestyle{plain}
-
-% listings for uima ruta
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\definecolor{rutaAction}{rgb}{0,0,0.5}%0,0,128 bold
-\definecolor{rutaBasic}{rgb}{0.5,0.5,0.5}%128,128,128 bold
-\definecolor{rutaCondition}{rgb}{0,0.5,0}%0,128,0 bold
-\definecolor{rutaDeclaration}{rgb}{0.5,0,0}%128,0,0 bold
-\definecolor{rutaString}{rgb}{0.16,0,1}%42,0,255
-\definecolor{rutaComment}{rgb}{0.24,0.5,0.37}%63,127,95
-
-\renewcommand{\lstlistingname}{UIMA Ruta Quelltext}
-
-\lstnewenvironment{Ruta}[1][]
-    {\lstset{float=htpb,#1}} 
-    {}
-\lstset{
-	language=Java,
-    basicstyle=\normalfont\ttfamily\scriptsize,
-	%caption=Descriptive Caption Text,
-	%label=DescriptiveLabel
- 	frame=L,
-    %rulesepcolor=\color{blue},
-	% xleftmargin=.5in,
-    % xrightmargin=.5in,
-    %rulesep=.2in,
-    framesep=.1in,
-    captionpos=t,
-    numbers=none,                   % where to put the line-numbers
-    numberstyle=\tiny\color{gray},  % the style that is used for the line-numbers
-    showstringspaces=false,
-    %rutaAction
-    keywords=[2]{DEL, CALL, MARK, MARKSCORE, COLOR, LOG, REPLACE,      FILLOBJECT, RETAINTYPE, SETFEATURE, ASSIGN, PUTINLIST, ATTRIBUTE, MARKFAST,      FILTERTYPE, CREATE, FILL, MARKTABLE, UNMARK, TRANSFER, MARKONCE, TRIE,      GATHER, EXEC, MARKLAST, ADD, REMOVE, MERGE, GET, GETLIST, REMOVEDUPLICATE, GETFEATURE, MATCHEDTEXT, CLEAR, UNMARKALL, SHIFT, CONFIGURE, DYNAMICANCHORING, TRIM, ADDRETAINTYPE, REMOVERETAINTYPE, ADDFILTERTYPE, REMOVEFILTERTYPE, MARKFIRST},
-    keywordstyle=[2]\color{rutaAction}\bfseries,
-    %rutaBasic
-    keywords=[3]{ALL, ANY, AMP, BREAK, W, NUM, PM, Document,
-      MARKUP, SW, CW, CAP, PERIOD, NBSP, SENTENCEEND, COLON, COMMA, SEMICOLON, WS, SPACE, SPECIAL, EXCLAMATION, QUESTION},
-    keywordstyle=[3]\color{rutaBasic}\bfseries,
-    %rutaCondition
-    keywords=[4]{CONTAINS, IF, INLIST, PARTOF, TOTALCOUNT, CURRENTCOUNT, CONTEXTCOUNT, LAST, VOTE, COUNT, NEAR, REGEXP, POSITION, SCORE, ISLISTEMPTY, MOFN, AND, OR, FEATURE, PARSE, IS, BEFORE, AFTER,      STARTSWITH, ENDSWITH, PARTOFNEQ, SIZE, NOT},
-    keywordstyle=[4]\color{rutaCondition}\bfseries,
-    %rutaDeclaration
-    keywords=[5]{WORDLIST, DECLARE, BOOLEAN, PACKAGE, TYPE, TYPESYSTEM, INT, DOUBLE, FLOAT, STRING, SCRIPT, WORDTABLE, ENGINE, BLOCK, RULES, BOOLEANLIST, INTLIST, DOUBLELIST, FLOATLIST, STRINGLIST, TYPELIST, UIMAFIT, IMPORT, FROM},
-    keywordstyle=[5]\color{rutaDeclaration}\bfseries,
-    commentstyle=\color{rutaComment},       % comment style
-    stringstyle=\color{rutaString}   % string literal style
- }
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-\title{Detecting mentions of characters in German novels with Apache UIMA{\texttrademark} Ruta\\
-(in German)
-}
-
-\begin{document}
-
-\maketitle
-
-
-\tableofcontents
-
-\section{Einleitung}
-
-In diesem Tutorial wird die regelbasierte Skriptsprache UIMA Ruta anhand eines Beispiels vorgestellt. Das Ziel ist es, jedes Vorkommen einer Person (Vorname, Nachname etc.) in einem literarischen Text zu annotieren. Zunächst werden die Programme Eclipse, UIMA Ruta und TreeTagger installiert und konfiguriert. Zur Einführung in die Entwicklung werden grundlegende Elemente der Sprache Ruta erläutert und die Ordnerstruktur innerhalb eines Projekts beschrieben. Anschließend wird das erste Kapitel eines Romans auf eindeutige Muster untersucht, um wichtige Merkmale zum Auffinden von Personen zu erhalten. Die Erläuterung verschiedener Regeln soll dabei helfen, die Syntax zu verstehen und Grundtechniken kennenzulernen. Nachdem TreeTagger vollständig in ein Projekt integriert wurde, können mehr Typen zur Regelentwicklung genutzt werden. Zum Schluss wird der \textit{Annotation Test} in die Entwicklung miteinbezogen, der das Testen der Regeln automatisiert. Speziell hierfür wird ein vorher markiertes Referenzdokument benötigt.
-
-\section{Installation}
-
-\subsection{Eclipse}
-Wir rufen zunächst die Internetpräsenz \url{www.eclipse.org} auf. Dort klicken wir auf den Reiter \textit{Downloads} oder die Schaltfläche \textit{Download Eclipse}. Auf der nachfolgenden Seite wird das Paket \textit{Eclipse Standard} heruntergeladen. Zuvor müssen wir noch das entsprechende Betriebssystem und den Systemtyp auswählen. In Windows finden wir die Information unter \textbf{Windows $\rightarrow$ Computer $\rightarrow$ Rechts\-klick $\rightarrow$ Eigenschaften} im Abschnitt \textit{System}. Wenn wir das Paket heruntergeladen haben, muss es, z.B. mit dem freien Packprogramm 7-Zip\footnote{\url{http://www.7-zip.org/}}, entpackt werden. In dem entpackten Ordner ist die Datei \textit{eclipse.exe}, mit der die Anwendung gestartet wird. Beim Start von Eclipse muss ein Ordner angegeben werden, in den alle Projekte gespeichert werden. Mit Klicken auf \textit{Use this as the default and do not ask again} werden wir nicht bei jedem Start aufgefordert einen Arbeitsplatz anzugeben.
-
-\subsection{UIMA Ruta}
-Wir befinden uns nun auf der Arbeitsoberfläche von Eclipse und wollen UIMA Ruta installieren. Dazu navigieren wir zu \textbf{Help $\rightarrow$ Install New Software...}. Anschließend erstellen wir unter \textit{Add...} ein neues Repository mit dem Link \url{http://www.apache.org/dist/uima/eclipse-update-site/}. Jetzt wird nach den Paketen von UIMA Ruta gesucht und vor dem Eintrag \textit{Apache UIMA Ruta} ein Haken gesetzt. Wir bestätigen zweimal und akzeptieren die Lizenzbedingungen. Daraufhin wird das Programm mit allen benötigten Paketen installiert. Nachdem Eclipse neu gestartet wurde, kann die UIMA Ruta Workbench benutzt werden. Im Fenster rechts oben klicken wir noch auf das Fenstersymbol mit dem Plus und bestätigen den Eintrag UIMA Ruta, um die Perspektive zu wechseln.
-
-\subsection{TreeTagger}\label{tt}
-TreeTagger weist jedem Wort einer Wortart zu und bestimmt dessen Grundform. Die Wortarten sind dann in UIMA Ruta als Typen verfügbar und können in den Regeln benutzt werden. Wir laden uns das Programm auf der Internetseite \url{http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/} unter der Überschrift \textit{Windows version} herunter. Außerdem werden für die Entwicklung deutscher Texte die deutschen Parameterdateien benötigt. Nachdem wir alles entpackt haben, kopieren wir die Parameterdateien in den Unterordner \textit{lib}. Jetzt erstellen wir eine Kopie von der größeren \textit{german-utf8.par} Datei und benennen sie in \textit{tagger-de-litte-endian.par} um. Danach wird ein neues Textdokument mit dem Inhalt \glqq encoding=utf8\grqq{} erstellt. Diese erhält den selben Namen, hat jedoch die Dateiendung \glqq .properties\grqq{}. Dabei ist darauf zu achten, dass der Dateityp in den Eigenschaften anschließend \textit{PROPERTIES-Datei} und nicht \textit{Textdokument} ist. Damit UIMA Ruta den Part-of-speech Tagger auf dem Datenträger findet, muss ein neuer Eintrag in den Umgebungsvariablen von Windows erstellt werden. Wir klicken auf \textbf{Windows $\rightarrow$ Computer $\rightarrow$ Rechtsklick $\rightarrow$ Eigenschaften} und links im Reiter auf \textbf{Erweiterte Systemeinstellungen}. Dort kann unter \textit{Umgebungsvariablen...} eine neue Systemvariable erstellt werden. Diese muss den Namen \glqq TREETAGGER\textunderscore HOME\grqq{} haben und als Wert den Speicherort von TreeTagger, also beispielsweise \glqq C:\textbackslash Programme\textbackslash TreeTagger\grqq{}.
-
-\section{Erste Schritte}
-
-\subsection{Die UIMA Ruta Workbench}
-Nach der Installation von Eclipse und UIMA Ruta befinden wir uns auf der Arbeitsoberfläche von Eclipse (Abb.~\ref{workbench1}). Die Arbeitsoberfläche ist zunächst aufgeteilt in vier Bereiche. Auf der linken Seite ist der \textit{Script Explorer}, in dem sämtliche Projekte verwaltet und in einer hierarchischen Struktur angezeigt werden. Unten und auf der rechten Seite gibt es verschiedene Teilbereiche, die beispielsweise Fehler in der Programmsyntax anzeigen. Die wichtigsten Teilbereiche für unser Beispiel sind der \textit{Selection View}, der \textit{Annotation Test} und der \textit{Annotation Browser View}. Der obere Teil der Arbeitsoberfläche ist der eigentliche Arbeitsbereich. Hier werden die Regeln für das NER-System entwickelt, aber auch die markierten Dokumente angezeigt oder bearbeitet.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/capture(1).png}
-\caption{Die UIMA Ruta Workbench.}
-\label{workbench1}
-\end{figure}
-
-Bevor wir loslegen, sollte noch die  Textkodierung in den Einstellungen von Eclipse geändert werden. Dazu rufen wir die Einstellungen mit \textbf{Window $\rightarrow$ Preferences} auf (Abb.~\ref{pref}). Anschließend navigieren wir zu \textbf{General $\rightarrow$ Work\-space} und ändern bei \textit{Text file encoding} den Eintrag in \textit{UTF-8}.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/capture(2+3).png}
-\caption{Die Einstellungen von Eclipse aufrufen und die Textkodierung ändern.}
-\label{pref}
-\end{figure}
-
-\subsection{Das erste Projekt}\label{first_project}
-UIMA Ruta organisiert die Projekte im \textit{Script Explorer} auf der linken Seite der Arbeitsoberfläche. Um ein neues Projekt zu erzeugen klickt man in einen freien Bereich des \textit{Script Explorers} mit \textbf{Rechtsklick $\rightarrow$ New $\rightarrow$ UIMA Ruta Project} (Abb.~\ref{newproject}). Im folgenden Fenster muss jetzt nur noch ein passender Name für das Projekt eingegeben und mit \textit{Finish} bestätigt werden. UIMA Ruta erstellt daraufhin das Projekt mit allen nötigen Ordnern. Das ausgeklappte Projekt mit der vordefinierten Ordnerstruktur wird in Abb.~\ref{folders} gezeigt. Das Projekt untergliedert sich in die Ordner \textit{script}, \textit{descriptor}, \textit{input}, \textit{output}, \textit{resources} und \textit{test}.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/capture(4+5).png}
-\caption{Ein neues Projekt erstellen und einen Namen angeben.}
-\label{newproject}
-\end{figure}
-
-Im \textit{script} Ordner werden alle UIMA Ruta Skripte und Pakete gespeichert, die im Laufe der Programmentwicklung entstehen. Das Analysewerkzeug und die verschiedenen Typesystems von UIMA Ruta befinden sich in \textit{descriptor}. Hier können auch eigene Typesystems eingefügt und benutzt werden. Als Anfänger sollte allerdings nichts verändert werden, da sonst unerwartete Fehler auftreten könnten. In \textit{input} speichert man die Texte, die von den Skripten bearbeitet werden sollen. Dies können Text-, HTML- oder XMI-Dateien sein. XMI-Dateien sind von UIMA Ruta erstellte Textdokumente, die bereits mit Annotationen versehen sind. Die vom Skript annotierten Dateien werden dann im \textit{output} Ordner als XMI-Dateien gespeichert. Auf jede Datei im \textit{input} Ordner folgt eine Datei in \textit{output}. UIMA Ruta bietet die Möglichkeit Wortlisten, Wörterbücher oder Tabellen zur Regelentwicklung einzubeziehen. Diese Zusatzdateien werden im Ordner \textit{resources} gespeichert, damit UIMA Ruta darauf zugreifen kann. Zum Evaluieren der Regeln gibt es den Ordner \textit{test}. Hier werden markierte XMI-Dokumente in den jeweiligen Ordnern als Referenz gespeichert. Der \textit{Annotation Test} prüft dann, wie gut die aktuellen Regeln auf die Texte zugeschnitten sind.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/capture(6).png}
-\caption{Das neue Projekt mit vordefinierter Ordnerstruktur.}
-\label{folders}
-\end{figure}
-
-Ist ein größeres Projekt geplant, kann der Ordner \textit{script} noch weiter in sog. Pakete aufgeteilt werden. Um ein neues Paket zu erstellen, klickt man einfach auf \textit{script} mit \textbf{Rechtsklick $\rightarrow$ New $\rightarrow$ UIMA Ruta Package} (Abb.~\ref{newpack}). Der Name wird dann im nächsten Fenster mit \textit{Finish} bestätigt.
-
-Die Ansicht der Paketstruktur kann störend sein, wenn bei jedem Start von Eclipse durch die Pakete geklickt werden muss. Deshalb sollten wir noch die Einstellungen des \textit{Script Explorer} aufsuchen und die hierarchische Struktur mit Klicken auf \textbf{Dreieck $\rightarrow$ Script Folder Presentation $\rightarrow$ Flat} (Abb.~\ref{workbench4}) ändern.\\
-Ein neues Skript wird durch Klicken auf das jeweilige Paket mit \textbf{Rechtsklick $\rightarrow$ New $\rightarrow$ UIMA Ruta File} (Abb.~\ref{newscript}) erstellt. Der Name wird dann wieder mit \textit{Finish} bestätigt.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/capture(7+8).png}
-\caption{Ein neues Paket erstellen und einen Namen angeben.}
-\label{newpack}
-\end{figure}
-
-\begin{figure}
-\centering
-\includegraphics[scale=0.5]{figs/capture(9).png}
-\caption{Hierarchische in flache Struktur ändern.}
-\label{workbench4}
-\end{figure}
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/capture(10+11).png}
-\caption{Ein neues Skript erstellen und einen Namen angeben.}
-\label{newscript}
-\end{figure}
-
-\newpage
-Das waren die ersten Schritte in UIMA Ruta. In Abb.~\ref{workbench5} ist die Arbeitsoberfläche nach erfolgreichem Anlegen aller Dateien. Nun kann mit dem Schreiben der Regeln begonnen werden.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/capture(12).png}
-\caption{Die Arbeitsoberfläche nach erfolgreichem Anlegen eines neuen Projekts.}
-\label{workbench5}
-\end{figure}
-
-\section{Die Sprache UIMA Ruta}\label{lang}
-Ein kleines Einstiegsbeispiel soll dabei helfen, die Sprache zu verstehen. Zunächst brauchen wir einen Text, auf dem wir die Regeln entwickeln. Dazu klicken wir auf \textit{input} mit \textbf{Rechtsklick $\rightarrow$ New $\rightarrow$ File} (Abb.~\ref{newdoc}) und wählen im folgenden Fenster einen Namen mit der Endung \glqq .txt\grqq{} für ein Textdokument.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/capture(13+14).png}
-\caption{Ein neues Textdokument erstellen und einen Namen angeben.}
-\label{newdoc}
-\end{figure}
-
-Danach füllen wir das neu erzeugte Dokument mit einem Text, den wir anschließend mit UIMA Ruta bearbeiten wollen. In Abb.~\ref{text} steht ein Text mit mehreren Personen. Wir wollen versuchen diese Personen zu annotieren.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/capture_text.png}
-\caption{Beispieltext zum Entwickeln von Regeln.}
-\label{text}
-\end{figure}
-
-Der erste Schritt der Regelentwicklung ist die Analyse des gegebenen Textes. Ein zentraler Punkt ist, dass in der deutschen Sprache jeder Name großgeschrieben wird. Wir können uns also auf diese Teilmenge der Wörter im Text beschränken. Außerdem fällt im Beispiel auf, dass immer nach \glqq Herr\grqq{} bzw. \glqq Frau\grqq{} ein Nachname steht. Nach dieser Art von Mustern müssen wir also Ausschau halten, wenn wir automatisiert nach Personen suchen wollen. Die  Vornamen im Text sind etwas schwerer ausfindig zu machen. Eine weitere Mög\-lich\-keit in UIMA Ruta ist daher die Verwendung von Wortlisten. \glqq Klaus\grqq{}, \glqq Lisa\grqq{} und \glqq Stefan\grqq{} sind gängige Vornamen. Warum sollte man diese also nicht zur Verwendung in eine Wortliste schreiben?
-
-Die aufgeführten Punkte sind das Gerüst für unsere Regeln. Als erstes wird der Text analysiert und die Ergebnisse notiert. Erst danach überlegt man sich, wie die Informationen umgesetzt werden sollen. In Abb.~\ref{rules} sieht man das Ergebnis unserer Regelumsetzung. Im \textit{Script Explorer} ist jetzt zusätzlich die vom Skript erstellte Ausgabedatei im \textit{output} Ordner. Außerdem wurde \textit{resources} eine Wortliste mit Vornamen hinzugefügt. Auf der rechten Seite ist das Skript.\\
-Die Wortlisten sind immer so aufgebaut, dass in jeder Zeile ein Ausdruck stehen muss. Ein Ausdruck ist in unserem Fall ein Vorname. Dies bedeutet aber nicht, dass nur ein Wort pro Zeile stehen darf. Suchen wir beispielsweise den Ort \glqq Frankfurt am Main\grqq, können wir das auch genau so in eine Zeile schreiben. Abb.~\ref{wordlist} zeigt die Wortliste \textit{FirstNames.txt} aus unserem Beispiel. Das Erstellen einer Wortliste ist analog zur Erstellung einer Eingabedatei.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/capture_rules.png}
-\caption{Auf der linken Seite ist die vordefinierte Ordnerstruktur mit Inhalt. Auf der rechten Seite ist das Skript mit den Regeln zur Personenfindung im Beispieltext.}
-\label{rules}
-\end{figure}
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/capture_wordlist.png}
-\caption{Zeilenweiser Aufbau der Wortliste mit Vornamen.}
-\label{wordlist}
-\end{figure}
-
-Wenden wir uns zu den Regeln in Abb.~\ref{rules} und gehen das Skript Zeile für Zeile durch. \texttt{PACKAGE} gibt das Paket des Skriptes an, sodass UIMA Ruta den Speicherort findet. Danach folgen zwei Kommentarzeilen, die mit einem doppelten Slash (\texttt{//}) eingeleitet werden. Ein Kommentar dient der Beschreibung eines Abschnittes in einem Programm bzw. Skript. So kann sich eine zweite Person schnell zurechtfinden, ohne den Code zeilenweise durchgehen zu müssen. Die Wortliste wird mit \texttt{WORDLIST} eingebunden. Vor dem Gleichheitszeichen steht der Variablenname, mit dem wir die Wortliste innerhalb der Regeln ansprechen können. Danach kommt der Dateiname in einfachen Anführungszeichen. Jede Definition, Deklaration oder Regel wird mit einem Strichpunkt (\texttt{;}) beendet. Mit \texttt{DECLARE} definieren wir neue Annotationstypen \textit{FirstName} und \textit{PersName}. Alle vordefinierten Annotationstypen sind in Abb.~\ref{tokens} abgebildet und werden von UIMA Ruta selbst erzeugt.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/basic_token.png}
-\caption{Sämtliche Klassen von Tokens von UIMA Ruta.}
-\label{tokens}
-\end{figure}
-
-Unsere Deklarationen werden erst im Skript erzeugt, indem wir einen gefundenen Abschnitt markieren. Eine Option wäre \texttt{MARKFAST}. Dazu muss zunächst mit \texttt{Document} das aktuelle Dokument angesprochen werden. Jetzt folgt die Aktion in geschweiften Klammern (\texttt{$\{\}$}) und einem Pfeil nach rechts (\texttt{->}). Die Aktion \texttt{MARKFAST} nimmt dann zwei Parameter entgegen. Der Erste ist der Annotationstyp, den wir annotieren wollen. Der zweite Parameter ist die Wortliste, mit der wir das Dokument abgleichen. Anschließend wird das gesamte Dokument auf die Zeilen in der Wortliste geprüft. Jeder Treffer wird als \textit{FirstName} markiert und ist als solcher in den Regeln verfügbar. Eine andere Option ist \texttt{MARK}. Die Aktion \texttt{MARK} hat meistens einen Parameter. Dieser ist der Annotationstyp mit dem wir einen bestimmten Abschnitt annotieren wollen, hier als \textit{PersName}. Der Ausdruck vor der geschweiften Klammer steht in runden Klammern (\texttt{()}). Somit wird jeder Abschnitt, der den Regeln innerhalb der Klammern entspricht, als \textit{PersName} markiert. Die Regel \texttt{FirstName CW?} sucht nach einem \textit{FirstName} und prüft dann, ob ein großgeschriebenes Wort (CW = capitalized word) folgt. Ist dies der Fall, wird beides als \textit{PersName} markiert. Ein Treffer in unserem Text ist also \glqq Lisa Kufstein\grqq{}, da \glqq Lisa\grqq{} zuvor als \textit{FirstName} markiert wurde und \glqq Kufstein\grqq{} ein großgeschriebenes Wort ist. Das Fragezeichen (\texttt{?}) ist ein Quantifizierer, der die Optionalität von \texttt{CW} ausdrückt. Deswegen wird auch \glqq Stefan\grqq{} und \glqq Klaus\grqq{} als \textit{PersName} markiert. Die letzte Regel \texttt{("Herr"$\mid$"Frau") CW} sucht nach dem Ausdruck \glqq Herr\grqq{} oder \glqq Frau\grqq{}. Folgt darauf ein großgeschriebenes Wort, wird es als \textit{PersName} markiert. Diese Regel findet \glqq Herr Müller\grqq{} und \glqq Frau Kufstein\grqq{} in unserem Beispiel. Wir starten das Skript, indem wir den grünen Kreis mit dem Pfeil unterhalb der Menüleiste drücken. Mit einem Doppelklick auf die Datei im \textit{output} Ordner lässt sie sich einsehen. Sollte UIMA Ruta nach einem geeigneten Typesystem fragen (Abb.~\ref{typesystem}), sucht ihr den Namen eures Skripts mit angehängtem \glqq TypeSystem.xml\grqq{}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/typesystem.png}
-\caption{Auswahlfenster für ein Typesystem.}
-\label{typesystem}
-\end{figure}
-
-Das Ergebnis unserer Entwicklung ist in Abb.~\ref{marked} zu sehen. Auf der linken Seite ist der markierte Text, während auf der rechten Seite im \textit{Annotation Browser View} jede Annotation des angezeigten Textes ausgewählt werden kann.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/capture_marked.png}
-\caption{Auf der linken Seite ist der markierte Text. Rechts im \textit{Annotation Browser View} können Annoationstypen ausgewählt werden, die im Text markiert werden sollen}
-\label{marked}
-\end{figure}
-
-Jeder Annotationstyp wird in einer eindeutigen Farbe hervorgehoben. Mit dem angefertigten Skript haben wir jede Person in dem Beispieltext gefunden. Im nächsten Kapitel wenden wir uns dem literarischen Text zu. Eine vollständige Auflistung und Erklärung aller Spracheigenschaften von UIMA Ruta ist im \textit{Apache UIMA{\texttrademark} Ruta Guide and Reference}\footnote{\url{https://uima.apache.org/d/ruta-current/tools.ruta.book.html}}.
-
-\section{Personenfindung in \glqq Der Idiot\grqq}
-Das Wissen aus Kapitel~\ref{lang} wollen wir nun auf das erste Kapitel von Dostojewskis \glqq Der Idiot\grqq anwenden. Es werden fortgeschrittene Regeln verwendet, die u.a. nicht auf die Technik des \textit{Part-of-speech Tagging} verzichten können. Dabei wird jedes Wort und Satzzeichen einer Wortart (part of speech) zugeordnet. Es werden sowohl Wortdefinitionen, als auch der Kontext zur Analyse herangezogen. Der in Kapitel~\ref{tt} vorgestellte TreeTagger ist ein solches Analysewerkzeug, den wir für unser Beispiel in UIMA Ruta einbinden werden.
-
-\subsection{Einbindung von TreeTagger}
-Als erstes muss das Projekt \textit{Firefly} konvertiert werden. Dazu klicken wir auf das Projekt mit \textbf{Rechtsklick $\rightarrow$ Configure $\rightarrow$ Convert to Maven Project}, wie in Abb.~\ref{convert} dargestellt. Im darauffolgenden Fenster wird mit \textit{Finish} ein neues \textit{pom.xml} erstellt. Ist der Eintrag \textit{Convert to Maven Project} nicht verfügbar, fehlt das entsprechende Paket. Zur Installation des Paketes gehen wir zu \textbf{Help $\rightarrow$ Install New Software...} und wählen unter \textit{Work with} alle eingetragenen Seiten aus (Abb.~\ref{m2e_install}). Anschließend suchen wir das Paket \textit{m2e - Maven Integration for Eclipse} unter dem Punkt \textit{Collaboration}. Die Installation startet, nachdem wir zweimal auf \textit{Next} drücken und den Lizenzbedingungen zustimmen. Falls während der Installation ein Fenster erscheint, das uns vor unsigniertem Inhalt warnt, wird es einfach mit \textit{OK} bestätigt.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/tt_convert.png}
-\caption{Das UIMA Ruta Projekt wird in ein Maven Projekt konvertiert.}
-\label{convert}
-\end{figure}
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/m2e_install.png}
-\caption{Im Menü \textit{Help} wird die Softwareinstallation ausgewählt. Anschließend müssen die entsprechenden Pakete zur Installation ausgewählt werden.}
-\label{m2e_install}
-\end{figure}
-
-Ist die Datei \textit{pom.xml} erstellt, öffnet sie sich sofort in der Übersicht (Abb.~\ref{overview}). Wir navigieren unten von \textit{Overview} nach \textit{pom.xml}, um den Inhalt der Datei zu bearbeiten (Abb.~\ref{pom}).
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/tt_overview.png}
-\caption{Übersicht der POM-Datei.}
-\label{overview}
-\end{figure}
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/tt_pom.png}
-\caption{Der Inhalt von \textit{pom.xml} nach der Konvertierung.}
-\label{pom}
-\end{figure}
-
-\newpage
-
-Vor dem Eintrag \texttt{</project>} muss zur Einbdinung von TreeTagger folgender Text eingefügt werden:
-
-\begin{center}
-\begin{lstlisting}[language=XML,
-frame=L,
-stepnumber=0,
-basicstyle=\scriptsize\ttfamily,
-morekeywords={parent,groupId,artifactId,dependencies,dependency,
-repositories,repository,id,url,snapshots, enabled},
-keywordstyle=\color{mygreen},
-keepspaces=true]
-<parent>
-  <groupId>org.apache.uima</groupId>
-  <artifactId>ruta-parent</artifactId>
-  <version>2.1.0</version>
-</parent>
-<dependencies>
-  <dependency>
-    <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
-    <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-asl</artifactId>
-    <version>1.5.0</version>
-  </dependency>
-  <dependency>
-    <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
-    <artifactId>de.tudarmstadt.ukp.dkpro.core.stanfordnlp-gpl</artifactId>
-    <version>1.5.0</version>
-  </dependency>
-</dependencies>
-<repositories>
-  <repository>
-    <id>ukp-oss-model-releases</id>
-    <url>
-      http://zoidberg.ukp.informatik.tu-darmstadt.de/
-      artifactory/public-model-releases-local
-    </url>
-    <snapshots>
-      <enabled>false</enabled>
-    </snapshots>
-  </repository>
-</repositories>
-\end{lstlisting}
-\end{center}
-
-Das Ergebnis ist in Abb.~\ref{pom2} zu sehen.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/tt_pom2.png}
-\caption{Der Inhalt des \textit{pom.xml} nach Einfügen der Abhängigkeiten.}
-\label{pom2}
-\end{figure}
-
-Nachdem das \textit{pom.xml} bearbeitet wurde, müssen wir das Projekt updaten. Dazu klicken wir auf das Projekt und drücken \textbf{Alt + F5}. Darauf erscheint ein Fenster zum Aktualisieren des Projektes (Abb.~\ref{update}), das wir einfach mit \textit{OK} bestätigen.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/tt_maven.png}
-\caption{Fenster zum Aktualisieren eines Maven Projektes.}
-\label{update}
-\end{figure}
-
-Sollte nun unter \textit{Problems} der Fehler aus Abb.~\ref{error} vorhanden sein, beheben wir ihn mit der Schnellhilfe. Dazu klicken wir auf den Eintrag mit \textbf{Rechtsklick $\rightarrow$ Quick Fix} und bestätigen das nächste Fenster mit \textit{Finish}.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/maven_error.png}
-\caption{Möglicher Fehler nach der Projektkonvertierung.}
-\label{error}
-\end{figure}
-
-Anschließend öffnet sich der \textit{m2e Marketplace} (Abb.~\ref{marketplace}), den wir ebenfalls mit einem \textit{Finish} bestätigen. Wir folgen den Schritten zur Installation des \textit{buildhelper}, nach denen der Fehler behoben sein sollte.
-
-Der nächste Schritt fügt das Typesystem von TreeTagger hinzu. Dazu kopieren wir die  Datei \textit{GeneratedDKProCoreTypes.xml} aus dem Anhang in den Ordner \textit{descriptor}. Anschließend sollte der \textit{Script Explorer} wie in Abb.~\ref{dkpro} aussehen.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/maven_marketplace.png}
-\caption{Der \textit{m2e Marketplace}.}
-\label{marketplace}
-\end{figure}
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/tt_dkpro.png}
-\caption{Das Typesystem DKPro in \textit{descriptor} kopieren.}
-\label{dkpro}
-\end{figure}
-
-Nun kann TreeTagger in UIMA Ruta verwendet werden. Als letzten Schritt erzeugen wir, wie in Kapitel~\ref{first_project} beschrieben, ein neues Paket und Skript. Dieses Skript ruft den Part-of-speech Tagger auf und versieht das Eingabedokument mit neuen Annotationstypen. Jetzt kann es in \textit{Main.ruta} aufgerufen werden, damit wir die Annotationstypen in unseren Regeln nutzen können. Der Inhalt des neuen Skripts ist in Abb.~\ref{pos} zu sehen.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/tt_pos.png}
-\caption{Ein Skript zum Ausführen des TreeTaggers.}
-\label{pos}
-\end{figure}
-
-Führt man das Skript auf dem Eingabetext aus, können im \textit{Annotation Browser View} weitere Annotationstypen ausgewählt werden (Abb.~\ref{pos2}).
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/tt_pos2.png}
-\caption{Im \textit{Annotation Browser View} sind alle Annotationstypen von TreeTagger ausgewählt. Für jedes Wort gibt es links eine spezielle Zuordnung.}
-\label{pos2}
-\end{figure}
-
-\subsection{Weiterentwicklung der Regeln}
-Das Projekt wird immer größer, also ist es ratsam, möglichst jede Aufgabe aufzuteilen. Das bedeutet, wir haben ein Skript für die Annotationstypen von TreeTagger, ein Skript für das Finden von Namen im Text und ein anderes, das alle Skripte aufruft und somit das Hauptskript wird. Jetzt kann jeder Teilbereich getestet werden, ohne, dass wir jedes Skript ausführen müssen. Das Hauptskript wird \textit{Main.ruta} sein (Abb.~\ref{main}) und alle anderen relevanten Skripte aufrufen. Der Befehl \texttt{SCRIPT} importiert ein Skript, während es der Befehl \texttt{CALL} ausführt. Die zwei Zeilen vor dem Skriptimport müssen in jedes Skript eingefügt werden, das TreeTagger nutzt.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/tt_main.png}
-\caption{Das Hauptskript, indem alle Skripte aufgerufen und ausgeführt werden.}
-\label{main}
-\end{figure}
-
-Die bisher entwickelten Regeln kopieren wir in das Skript \textit{Name.ruta}, wie in Abb.~\ref{name} zu sehen ist. Dabei ist wieder zu beachten, dass die zwei Zeilen im Kopfteil eingefügt werden.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/tt_name.png}
-\caption{Der ursprüngliche Inhalt des Hauptskriptes wird in \textit{Name.ruta} kopiert.}
-\label{name}
-\end{figure}
-
-Der erste Schritt für unser neues Dokument ist wieder die Textanalyse. Zunächst kopieren wir aber das beigefügte Dokument \textit{dostoevskij - idiot.txt} in den \textit{input} Ordner und löschen die Datei \textit{test.txt} aus \textit{input} und \textit{output}. Durch Doppelklicken öffnen wir das Textdokument und beginnen mit der Analyse. Währenddessen können die Vornamen, die noch nicht in unserer Liste stehen, hinzugefügt werden. Es fällt auf, dass häufig direkte Reden verwendet werden. Vor einer direkten Rede, bzw. danach, ist der Sprecher oft erwähnt. Weiter fällt auf, dass ein Titel, wie \glqq Herr\grqq{}, und ein folgendes großgeschriebenes Wort auf eine Person hindeutet. Ein Titel ist dabei ganz allgemein gehalten oder kann eine Berufsbezeichnung, Adelstitel oder Familienzugehörigkeit sein. Mit diesen Informationen können einfache Regeln realisiert werden. Wie für die Vornamen brauchen wir auch für alle Titel eine Wortliste. Dazu legen wir ein paar neue Wortlisten in \textit{resources} an, wie es in Kapitel~\ref{first_project} beschrieben wurde. Alle Titel sollten alphabetisch geordnet sein, damit ein weiteres Hinzufügen von Titeln nicht zu Problemen führt. Zum Schluss haben wir jeweils eine Liste für Berufe, Adelstitel, Angehörige und Militärgrad. Die Titel bzw. Vornamen werden manuell eingefügt oder können aus einer Internetdatenbank heruntergeladen werden. Ein Ausschnitt der Wortlisten ist in Abb.~\ref{titles} zu sehen.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.6\textwidth]{figs/tt_titles.png}
-\caption{Ausschnitt der verschiedenen Wortlisten.}
-\label{titles}
-\end{figure}
-
-Als nächstes müssen nur noch die Regeln angepasst und erweitert werden. Dazu zählen die neuen Wortlisten, neue Deklarationen für die Titel und das Durchlaufen des Dokuments mit \texttt{MARKFAST}. Die Änderungen und die neuen Regeln sind in Abb.~\ref{name2} zu sehen. Zur besseren Verständlichkeit ist jeder Regelabschnitt mit einem großgeschriebenen Kommentar als Überschrift gekennzeichnet.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/tt_name2.png}
-\caption{Die neuen Wortlisten werden eingefügt und die Regeln erweitert.}
-\label{name2}
-\end{figure}
-
-Die erste Regel im Vornamenabschnitt sucht nach Titeln, die zuvor als \textit{RelativesTitle} markiert wurden. Folgt danach ein großgeschriebenes Wort, ist dies ein potenzieller Vorname und wird als \textit{FirstName} markiert. Der \texttt{-PARTOF} Befehl verhindert, dass ein schon annotierter \textit{FirstName} doppelt markiert wird. Die zweite Regel findet einen \textit{FirstName} gefolgt von einem \textit{FirstName}. In \glqq Der Idiot\grqq{} hat fast jede Person einen zweiten Vornamen. Diese Vorkommen wollen wir finden und beide Vornamen zu einem einzigen \textit{FirstName} verbinden. \texttt{SHIFT} weitet dabei die Annotation des ersten \textit{FirstName} auf das zweiten \textit{FirstName} aus. Jetzt ist der zweite Vorname allerdings doppelt markiert und muss mit \texttt{UNMARK} wieder demarkiert werden. Im Nachnamenabschnitt suchen wir zunächst nach Vornamen mit einem angehängten, großgeschriebenen Wort. Trifft die Regel auf einen Abschnitt zu, wird das letzte Wort als \textit{LastName} markiert. Mit der zweiten Regel suchen wir Personen, wie \glqq Generalin Jepantschina\grqq{}. Folgt \texttt{CW} auf ein \textit{MilitaryTitle} o.ä., wird das letzte Wort als \textit{LastName} markiert. Dies geschieht wiederum nur, wenn das gefundene \texttt{CW} noch kein \textit{LastName} ist (\texttt{-PARTOF}). Im letzten Abschnitt verbinden wir nun die \textit{FirstName} und \textit{LastName} zu einer Person als \textit{PersName}. \texttt{MARK(PersName, 1, 2)} weitet die Annotation auf das erste und zweite Element in der Regel aus. Das Ergebnis unserer Entwicklung ist in Abb.~\ref{ano} zu sehen.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/tt_ano.png}
-\caption{Das Ergebnis der Erweiterungen links im Fenster. Personen werden teilweise vollständig erkannt.}
-\label{ano}
-\end{figure}
-
-Für den Ansatz, mit direkter Rede auf eine Person zu schließen, erstellen wir ein neues Skript. Darin befinden sich sämtliche Regeln, die eine direkte Rede erkennen und als \textit{DirectSpeech} markieren (Abb.~\ref{speech}). Das Zeichen \texttt{\#} stellt den gesamten Inhalt zwischen dem ersten und letzten Zeichen der Regel dar. Dies wäre also die gesamte Aussage einer Person. \texttt{MARK(DirectSpeech, 1, 2, 3)} markiert anschließend den gesamten Abschnitt als \textit{DirectSpeech}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/tt_speech.png}
-\caption{Das Skript zum Erkennen direkter Rede.}
-\label{speech}
-\end{figure}
-
-Anschließend importieren wir das Skript mit \texttt{SCRIPT} in \textit{Name.ruta} und füh\-ren es mit \texttt{CALL} aus. Für die Regel ist nun der zuvor eingerichtete TreeTagger notwendig. Mit diesem können wir nicht nur kleine und große Wörter erkennen, sondern sie auch einer Wortart zuordnen. Zusätzlich benötigen wir noch eine Liste mit Verben, die eine direkte Rede einleiten bzw. beenden. Dies wären beispielsweise Wörter wie \glqq sagen\grqq{} oder \glqq antworten\grqq{}. Die Liste sollte als Wortliste definiert, aber nicht mit \texttt{MARKFAST} ausgeführt werden. Die Regel aus Abb.~\ref{speech2} wird dann am Ende des Personenabschnittes eingefügt. Diese markiert den Sprecher nach einer direkten Rede als \textit{PersName}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.9\textwidth]{figs/tt_speech2.png}
-\caption{Die Regel, um Sprecher nach einer direkten Rede zu erkennen.}
-\label{speech2}
-\end{figure}
-
-Die Annotationstypen, die mit \glqq pos.\grqq{} eingeleitet werden, sind von TreeTagger und reichen von Nomen und Verben, bis zu Personal- und Reflexivpronomen. Der gesamte Umfang der Annotationstypen des Part-of-speech Taggers ist in der entsprechenden Dokumentation\footnote{\url{http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/stts_guide.pdf}} zu finden. Zunächst sucht UIMA Ruta nach einer direkten Rede und einem optionalen Komma. Danach muss ein Verb aus unserer Wortliste stehen. \texttt{INLIST} gleicht das Verb mit der Wortliste ab. Das Besondere dabei ist, dass der \textit{Lemma.value} des gefundenen Wortes überprüft wird, nicht das Verb selbst. Somit steht in unserer Wortliste nur die Grundform eines Verbs, z.B. \glqq sagen\grqq{}, und nicht jede Deklination, z.B. \glqq sagte\grqq{}. Der \textit{Lemma.value} eines Wortes ist also die Grundform. Jedes \textit{Lemma.value} kann im \textit{Selection View} eines geöffneten Dokumentes eingesehen werden, das mit dem TreeTagger bearbeitet wurde. Nach dem Verb folgt ein Artikel mit dem großgeschriebenen Wort. Das \texttt{CW} ist unsere gefundene Person und wird als \textit{PersName} annotiert. Das Plus (\texttt{+}) ist ein Quantifizierer und drückt aus, dass mindestens ein \texttt{CW} folgt. Die Regel findet sowohl \glqq Schwarzhaarige\grqq{}, als auch \glqq Schweizer Patient\grqq{}.
-
-\section{Der Annotation Test}
-Der \textit{Annotation Test} hilft uns dabei, unsere Regeln automatisch zu evaluieren. Bei sehr großen oder vielen Texten ist es nur sehr aufwendig, das Ergebnis manuell zu überprüfen. Der \textit{Annotation Test} hingegen liefert uns einen genauen Überblick über unsere Trefferquote.
-
-\subsection{Das Referenzdokument}
-
-Damit der Test überhaupt durchgeführt werden kann, benötigen wir ein Referenzdokument. In diesem Dokument müssen alle Annotationen vorhanden sein, die wir mit unserem Skript finden wollen. Bei der späteren Bearbeitung dieses Dokumentes müssen die entsprechenden Annotationstypen in der XMI-Datei vorhanden sein. Neue Annotationstypen können nicht erstellt werden. Deswegen starten wir das Skript \textit{Main.ruta} und kopieren das Ausgabedokument aus \textit{output} in den Unterordner \textit{test $\rightarrow$ uima $\rightarrow$ ruta $\rightarrow$ firefly $\rightarrow$ Name}. Anschließend wählen wir das Skript \textit{Name.ruta} an und klicken auf den Reiter \textit{Annotation Test}. Die Arbeitsoberfläche sollte jetzt ähnlich der Abb.~\ref{test_main} sein.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/test_main.png}
-\caption{Im \textit{Script Explorer} ist die Struktur des Testordner zu erkennen. Das relevante Skript muss angeklickt werden, damit unten der \textit{Annotation Test} angezeigt wird.}
-\label{test_main}
-\end{figure}
-
-Auf der linken Seite ist der \textit{Script Explorer} mit allen Unterordnern von \textit{test}. Das zu testende Dokument wird in den entsprechenden Ordner eingefügt. Testen wir also das Skript \textit{Name.ruta}, kopieren wir das Referenzdokument in den Unterordner \textit{Name}. Der Unterordner \textit{results} enthält die Ergebnisdateien des \textit{Annotation Test}. Neben den ursprünglichen Annotationstypen sind zusätzlich die Typen \textit{TruePositive}, \textit{FalsePositive} und \textit{FalseNegative} gespeichert. \textit{TruePositive} sind dabei die richtig markierten Abschnitte. Alle \textit{FalsePositive} sind fälschlicherweise markiert, während hingegen alle \textit{FalseNegative} fälschlicherweise nicht markiert sind. Die Anzahl dieser Typen ist im \textit{Annotation Test} bei \textit{TP}, \textit{FP} und \textit{FN} zu finden. Der \textit{F1-Wert} liegt im Zahlenbereich zwischen 0 und 1. Umso höher der Wert, desto besser die Trefferquote. Wenn ein Test gestartet werden soll, wird der grüne Pfeil gedrückt. Da das derzeitige Referenzdokument eine exakte Kopie des Ausgabedokumentes ist, gibt es nur \textit{TruePositives} und der F1-Wert ist genau 1. Wird einer der beiden Daumen gedrückt, erscheint das Auswahlfenster (Abb.~\ref{thumb}), in dem sämtliche Annotationstypen ausgewählt werden können. Der \glqq Daumen nach unten\grqq{} lässt uns Annotationstypen auswählen, die wir nicht testen wollen, wohingegen der \glqq Daumen nach oben\grqq{} zwischen den relevanten Typen auswählen lässt.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/test_thumb.png}
-\caption{Auswahl relevanter oder irrelevanter Annotationstypen.}
-\label{thumb}
-\end{figure}
-
-Daneben können bei den beiden Zahnrädern weitere Ein\-stel\-lungs\-mög\-lich\-kei\-ten vorgenommen werden (Abb.~\ref{test_pref}). Das Aktivieren von \textit{Use all types} stellt sicher, dass zunächst alle Typen zum Test genutzt werden, außer man spezialisiert seine Suche mit Hilfe der Typenwahl (Abb.~\ref{thumb}). Der Punkt \textit{Extend classpath} sollte aktiviert sein, wenn wir TreeTagger nutzen, da sonst kein Test durchgeführt werden kann. Unter \textit{Evaluator} kann die Art der Übereinstimmung gewählt werden. Bei \textit{Exact Match} muss das Ergebnis exakt der Referenzannotation entsprechen, während \textit{Partial Match} auch bei teilweise richtiger Markierung ein \textit{TruePositive} liefert.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/test_pref.png}
-\caption{Einstellungen des \textit{Annotation Test}.}
-\label{test_pref}
-\end{figure}
-
-Das vorletzte Symbol aus Abb.~\ref{test_main} exportiert das Testergebnis als Tabelle in einer CSV-Datei, während das Letzte die Option \textit{Extend classpath} symbolisiert. Im Moment haben wir noch kein nutzbares Referenzdokument, da wir lediglich das Ausgabedokument in den Testordner kopiert haben. Deswegen müssen wir das Dokument im Testordner mit allen richtigen Annotationen versehen. Dazu öffnen wir das Dokument mit einem Doppelklick und wählen im \textit{Annotation Browser View} alle Annotationstypen aus, die wir bearbeiten wollen. In unserem Beispiel ist das \textit{FirstName}, \textit{LastName} und \textit{PersName}, weil wir später nur die Trefferquote dieser Typen überprüfen wollen. Finden wir eine Person, müssen wir zunächst bestimmen, zu welchem Annotationstyp diese gehört. In Abb.~\ref{annotate} ist \glqq Rogoschin\grqq{} weder als \textit{LastName}, noch als \textit{PersName} markiert. Wir annotieren das Wort mit \textbf{Doppelklick $\rightarrow$ Rechtsklick $\rightarrow$ Annotate $\rightarrow$ LastName} als \textit{LastName}.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.75\textwidth]{figs/test_annotate.png}
-\caption{Manuelles Annotieren der Referenzdatei mit \textit{Annotate}.}
-\label{annotate}
-\end{figure}
-
-Es werden nur diejenigen Wörter als \textit{PersName} markiert, die keine Namen sind, z.B. \glqq Schwarzhaarige\grqq{}. Dies spart uns in diesem Text viel Zeit, da wir im Anschluss mit \textit{Quick Annotate} schneller arbeiten. Sind also alle Namen als \textit{FirstName} bzw. \textit{LastName} und jedes Synonym als \textit{PersName} markiert, verändern wir den Annotationsmodus. Dazu klicken wir im Text auf \textbf{Rechtsklick $\rightarrow$ Mode} und navigieren zu \textit{PersName}, wie in Abb.~\ref{mode}. Jetzt kann das gesamte Dokument überflogen werden, ohne jeden Satz lesen zu müssen. Jede vorhandene Annotation wird markiert und mit \textbf{Enter} als \textit{PersName} markiert. Natürlich sollen die zuvor markierten \textit{PersName} nicht wiederholt markiert werden. Außerdem ist darauf zu achten, dass beispielsweise \glqq Parfen Rogoschin\grqq{} als Ganzes markiert wird, nicht einzeln. Auch ist beispielsweise \glqq Generalin Jepantschina\grqq{} ein \textit{PersName}, da der General und die Generalin zwei unterschiedliche Personen sind.
-
-\begin{figure}
-\centering
-\includegraphics[width=0.5\textwidth]{figs/test_mode.png}
-\caption{Ändern des Annotationsmodus über \textit{Mode}.}
-\label{mode}
-\end{figure}
-
-\newpage
-
-Zusätzlich gibt es die Möglichkeit, eine Annotation zu entfernen. Dies ist notwendig, da wir das Referenzdokument aus dem \textit{output} Ordner kopiert haben und dort möglicherweise falsche Annotationen vorhanden sind. Die erste Option ist es, in den jeweiligen Annotationsmodus zu wechseln und die Annotation mit \textbf{Entf} bzw. \textbf{Del} zu entfernen. Bei der zweiten Option müssen wir die jeweilige Annotation im \textit{Annotation Browser View} suchen und ebenfalls mit \textbf{Entf} löschen.
-
-\subsection{Fehleranalyse und Verbesserung}
-
-Ist das gesamte Dokument vollständig mit Annotationstypen versehen, kann der \textit{Annotation Test} gestartet werden. Dazu wählen wir nur die Typen \textit{FirstName}, \textit{LastName} und \textit{PersName} aus und starten den Test. Das Ergebnis ist in Abb.~\ref{test_result} zu sehen.
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/test_result.png}
-\caption{Der erste Test mit dem unangepassten Skript findet gerade 32 Personen.}
-\label{test_result}
-\end{figure}
-
-Der F1-Wert liegt bei über 0.5. Wenn wir jedoch den Wert in der Zeile von \textit{PersName} betrachten, sehen wir, dass wir nur knapp 20\,\% der Personen gefunden haben. Wenn wir wissen wollen, woran das liegt und wie das verbessert werden kann, öffnen wir das Ergebnisdokument mit einem Doppelklick im Fenster links. Im \textit{Annotation Browser View} markieren wir die Typen \textit{TruePositive}, \textit{FalsePositive} und \textit{FalseNegative}, um uns einen ersten Überblick des Ergebnisses zu verschaffen. Außerdem ordnen wir die Ansicht der Fenster per Drag\&Drop um, sodass wir schnell eine Liste der Treffer haben (Abb.~\ref{test_view}).
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/test_view.png}
-\caption{Im linken Fenster sind alle \textit{TruePositive}, \textit{FalsePositive} und \textit{FalseNegative} markiert. In der rechten Ansicht ist eine detaillierte Übersicht der (nicht) gefundenen Vornamen, Nachnamen und Personen.}
-\label{test_view}
-\end{figure}
-
-Wir sehen, dass viele Namen zuverlässig gefunden wurden, aber die gleiche Person an einer anderen Textstelle nicht. Das liegt daran, dass wir beispielsweise \glqq Herr Rogoschin\grqq{} finden, nicht aber ein einzeln stehendes \glqq Rogoschin\grqq{}. Des Weiteren gibt es auch noch keine Regel die eine Abwandlung der Namen, wie \glqq Rogoschins\grqq{}, findet. Um das zu beheben gibt es nicht nur statische Wortlisten, sondern auch dynamische Stringlisten. Diese werden mit dem Befehl \texttt{STRINGLIST} erstellt und beinhalten \texttt{STRING} Elemente, die wir in die Regeln einbauen werden. Das vollständige Skript ist im Quelltext~\ref{final_rules} zu sehen.
-
-\begin{Ruta}[caption={Das finale Skript Name.ruta.}\label{final_rules}]
-PACKAGE uima.ruta.firefly;
-
-IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos
-FROM GeneratedDKProCoreTypes AS pos;
-IMPORT de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma
-FROM GeneratedDKProCoreTypes;
-
-SCRIPT uima.ruta.firefly.DirectSpeech;
-
-// Definition von Wortlisten
-WORDLIST FirstNameList = 'FirstNames.txt';
-WORDLIST GeneralTitleList = 'GeneralTitles.txt';
-WORDLIST JobList = 'Jobs.txt';
-WORDLIST MilitaryTitleList = 'MilitaryTitles.txt';
-WORDLIST NobleTitleList = 'NobleTitles.txt';
-WORDLIST RelativesTitleList = 'RelativesTitles.txt';
-WORDLIST VerbList = 'Verbs.txt';
-
-// Definition von Stringlisten und Stringvariable
-STRINGLIST FirstNames;
-STRINGLIST LastNames;
-STRINGLIST PersNames;
-STRING MatchedName;
-
-// Deklaration neuer Annotationstypen
-DECLARE FirstName, LastName, PersName,
-GeneralTitle, Job, MilitaryTitle, NobleTitle, RelativesTitle;
-
-// Importierte Skripte ausfuehren
-Document{-> CALL(DirectSpeech)};
-
-// Abgleichen der Wortlisten mit input
-Document{-> MARKFAST(FirstName, FirstNameList)};
-Document{-> MARKFAST(GeneralTitle, GeneralTitleList)};
-Document{-> MARKFAST(Job, JobList)};
-Document{-> MARKFAST(MilitaryTitle, MilitaryTitleList)};
-Document{-> MARKFAST(NobleTitle, NobleTitleList)};
-Document{-> MARKFAST(RelativesTitle, RelativesTitleList)};
-
-// VORNAMEN
-// Folgt nach einem RelativesTitle ein grossgeschriebenes Wort,
-// so wird CW als FirstName markiert und in die Liste FirstNames gespeichert
-RelativesTitle pos.N{-PARTOF(FirstName) ->
-MARK(FirstName), MATCHEDTEXT(MatchedName), ADD(FirstNames, MatchedName)};
-// An alle Vornamen ein "s" haengen und in FirstNames speichern
-FirstName{-> MATCHEDTEXT(MatchedName), ADD(FirstNames, MatchedName + "s")};
-// Vornamen aus der Liste FirstNames markieren
-CW{-PARTOF(FirstName), INLIST(FirstNames) -> MARK(FirstName)};
-// Vorname + Vorname = Vorname
-FirstName{-> SHIFT(FirstName, 1, 2)} FirstName{-> UNMARK(FirstName)};
-
-// NACHNAMEN
-// Folgt nach einem Firstname ein grossgeschriebenes Wort,
-// so wird CW als LastName markiert und in die Liste LastNames gespeichert
-FirstName pos.N{->
-MARK(LastName), MATCHEDTEXT(MatchedName), ADD(LastNames, MatchedName)};
-// Folgt nach einem der Titel ein grossgeschriebenes Wort,
-// so wird CW als LastName markiert
-(GeneralTitle|Job|MilitaryTitle|NobleTitle) pos.N{-PARTOF(LastName)
--> MARK(LastName), MATCHEDTEXT(MatchedName), ADD(LastNames, MatchedName)};
-// An alle Nachnamen ein "s" haengen und in LastNames speichern
-LastName{-> MATCHEDTEXT(MatchedName), ADD(LastNames, MatchedName + "s")};
-// Nachnamen aus der Liste LastNames markieren
-CW{-PARTOF(LastName), INLIST(LastNames) -> MARK(LastName)};
-
-// PERSONEN
-// Das Vorkommen eines ganzen Namens (Vorname + Nachname),
-// als PersName markieren
-(RelativesTitle|GeneralTitle|Job|MilitaryTitle|NobleTitle)* @FirstName
-LastName{-> MARK(PersName, 1, 2, 3)};
-(RelativesTitle|GeneralTitle|Job|MilitaryTitle|NobleTitle)* @FirstName
-{-PARTOF(PersName) -> MARK(PersName, 1, 2)};
-(RelativesTitle|GeneralTitle|Job|MilitaryTitle|NobleTitle)* @LastName
-{-PARTOF(PersName) -> MARK(PersName, 1, 2)};
-// Sprecher nach einer direkten Rede erkennen
-DirectSpeech COMMA? pos.V{INLIST(VerbList, Lemma.value)} pos.ART CW+
-{-> MARK(PersName), MATCHEDTEXT(MatchedName), ADD(PersNames, MatchedName)};
-// Personen aus der Liste PersNames markieren
-CW{-PARTOF(PersName), INLIST(PersNames) -> MARK(PersName)};
-\end{Ruta}
-
-\newpage
-
-Für jeden Abschnitt haben wir eine Stringliste definiert, da wir diese am Ende jedes Abschnitts verwenden. In die Stringvariable schreiben wir einen gefundenen Namen bzw. Person, um ihn in eine Liste speichern zu können. Die erste Regel wurde so erweitert, dass mit \texttt{MATCHEDTEXT} der potenzielle Vorname in den String \textit{MatchedName} gespeichert wird. Anschließend fügen wir mit \texttt{ADD} den gefundenen Vornamen in unsere Stringliste, in die alle Vornamen gespeichert werden, die nicht in der Wortliste \textit{FirstNameList} sind. Zusätzlich wurde \texttt{CW} durch \texttt{pos.N} ersetzt, da wir sonst auch Wörter wie \glqq Sie\grqq{} finden würden, das zu den Pronomen gehört und nicht zu den Nomen. Im zweiten Schritt suchen wir nochmals nach Vornamen, schreiben diese aber mit einem angehängten \glqq s\grqq{} in die Stringliste, um so auch kleine Abwandlungen von Namen zu finden. Die nächste neue Regel untersucht alle \texttt{CW} im Text und prüft mit \texttt{INLIST}, ob es in unserer Liste \textit{FirstNames} gibt. Bei jeder Regel ist zu beachten, dass wir einen schon markierten Abschnitt nicht doppelt annotieren. Im Skript \textit{Name.ruta} verhindern wir mögliche Probleme, da \texttt{-PARTOF} dies ausschließt. Der zweite Abschnitt ist nach dem selben Prinzip erweitert worden, wie der Erste. Potenzielle Nachnamen werden in eine Liste geschrieben, Abwandlungen werden gespeichert und zum Schluss annotiert. Der letzte Abschnitt fügt Titel, Vornamen und Nachnamen zu einer Person zusammen. Jeder Annotationstyp, der mit einem Stern (\texttt{*}) endet, kann keinmal oder mehrmals vorkommen. Das Zeichen \texttt{@} vor einem Annotationstyp heißt, dass UIMA Ruta zuerst nach diesem im Text sucht und dann prüft, ob die restliche Regel zutrifft. Bei richtiger Nutzung führt dies zu einer Geschwindigkeitssteigerung. Personen nach direkten Reden werden ebenfalls in einer Liste gespeichert und anschließend im gesamten Text gefunden. Wenn das Skript erneut getestet wird, können wir eine erhebliche Steigerung des Ergebnisses erkennen (Abb.\ref{final_result}). 
-
-\begin{figure}
-\centering
-\includegraphics[width=1\textwidth]{figs/final_result.png}
-\caption{Das Endergebnis des Beispiels zeigt eine Steigerung der (korrekt) gefundenen Personen von 32 auf 120.}
-\label{final_result}
-\end{figure}
-
-Mit den vorgestellten Techniken von UIMA Ruta, der Textanalyse, TreeTagger und dem \textit{Annotation Test} kann sehr schnell eine hohe Trefferquote erzielt werden. Mit Hilfe des \textit{Annotation Test} muss zum Schluss jede Regel weiter verfeinert werden, bis ein akzeptables Niveau erreicht ist.
-
-\end{document}
\ No newline at end of file
diff --git a/trunk/pom.xml b/trunk/pom.xml
deleted file mode 100644
index ad0bbf6..0000000
--- a/trunk/pom.xml
+++ /dev/null
@@ -1,239 +0,0 @@
-<?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. -->

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>ruta-parent/pom.xml</relativePath>

-  </parent>

-

-  <artifactId>ruta</artifactId>

-  <packaging>pom</packaging>

-  <name>Apache UIMA Ruta: ${project.artifactId}</name>

-  <description>The top project for Apache UIMA Ruta</description>

-  <url>${uimaWebsiteUrl}</url>

-  <properties>

-    <jiraVersion>12327502</jiraVersion>

-    <!-- 

-     <assembly.attach>false</assembly.attach>

-     -->

-  </properties>

-

-  <!-- override pom setting in the build project. JIRA 5.1 needs different URL -->

-  <issueManagement>

-    <system>Jira</system>

-    <url>https://issues.apache.org/jira/browse/UIMA</url>

-  </issueManagement>

-

-  <!-- Special inheritance note even though the <scm> element that follows is exactly the same as those 

-    in super poms, it cannot be inherited because there is some special code that computes the connection 

-    elements from the chain of parent poms, if this is omitted. Keeping this a bit factored allows cutting/pasting 

-    the <scm> element, and just changing the following two properties -->

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0</developerConnection>

-  </scm>

-

-  <!-- dependencies used during assembly -->

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core-ext</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-addons</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-caseditor</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-engine</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-textruler</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-core-ext</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-	<dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-maven-plugin</artifactId>

-      <version>${project.version}</version>

-    </dependency>

-  </dependencies>

-  

-  <modules>

-    <module>ruta-parent</module>

-    <module>ruta-core</module>

-    <module>ruta-core-ext</module>

-

-    <module>ruta-ep-engine</module>

-    <module>ruta-ep-ide</module>

-    <module>ruta-ep-ide-ui</module>

-    <module>ruta-ep-caseditor</module>

-    <module>ruta-ep-addons</module>

-    <module>ruta-ep-textruler</module>

-    <module>ruta-ep-core-ext</module>

-

-	  <module>ruta-maven-plugin</module>

-	

-    <module>ruta-docbook</module>

-    <module>ruta-eclipse-feature</module>

-    

-    <module>example-projects/ruta-ep-example-extensions</module>

-    <module>example-projects/ruta-maven-example</module>

-  </modules>

-  <build>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <!-- run Release Audit Tool (RAT) -->

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>target/**</exclude>

-                  <exclude>example-projects/**</exclude>

-                  <exclude>README*</exclude>

-                  <exclude>RELEASE_NOTES*</exclude>

-                  <exclude>issuesFixed/**</exclude>

-                  <exclude>src/main/resources/docbook-shared/titlepage/*.xsl</exclude>

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>ruta-eclipse-update-site/marker-file-identifying-*</exclude>

-                  <exclude>DEPENDENCIES</exclude>

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-changes-plugin</artifactId>

-          <version>2.8</version>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <goals>

-                <goal>jira-report</goal>

-              </goals>

-

-              <phase>generate-resources</phase>

-              <configuration>

-                <useJql>true</useJql>

-                <fixVersionIds>${jiraVersion}</fixVersionIds>

-                <component>Ruta</component>

-                <columnNames>Type,Key,Status,Summary</columnNames>

-                <resolution>Fixed</resolution>

-                <status>Closed,Resolved</status>

-                <sortColumnNames>Type, Status, Key</sortColumnNames>

-                <outputDirectory>${basedir}/issuesFixed/</outputDirectory>

-                <maxEntries>1000</maxEntries>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-  </build>

-  <profiles>

-            <!-- 

-    <profile>

-      <id>build distribution</id>

-      <build>

-        <plugins>

-          <plugin>

-            <artifactId>maven-deploy-plugin</artifactId>      

-            <configuration>

-              <skip>false</skip>

-            </configuration>

-          </plugin>

-        </plugins>

-      </build>

-    </profile>

-             -->

-      

-    <profile>

-      <id>apache-release</id>

-      <build>

-        <plugins>

-          <!-- Run jira report -->

-          <!-- depends on having -DjiraVersion set -->

-          <plugin>

-            <artifactId>maven-changes-plugin</artifactId>

-            <version>2.8</version>

-            <executions>

-              <execution>

-                <id>default-cli</id>

-                <configuration>

-                  <fixVersionIds>${jiraVersion}</fixVersionIds>

-                  <sortColumnNames>Type, Status, Key</sortColumnNames>

-                </configuration>

-              </execution>

-            </executions>

-          </plugin>

-           <plugin>

-		        <artifactId>maven-antrun-plugin</artifactId>

-		        <inherited>false</inherited>

-		        <executions>

-		          <execution>

-		            <id>ExtendSourceRelease</id>

-		            <phase>package</phase>

-		            <configuration>

-		              <target>

-		                <zip destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" update="true">

-									    <zipfileset dir="${basedir}/example-projects/ExampleProject/" includes=".project" prefix="${project.artifactId}-${project.version}/example-projects/ExampleProject/" />

-									  </zip>

-									  <zip destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" update="true">

-                      <zipfileset dir="${basedir}/example-projects/ExtensionsExample/" includes=".project" prefix="${project.artifactId}-${project.version}/example-projects/ExtensionsExample/" />

-                    </zip>

-                    <zip destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" update="true">

-                      <zipfileset dir="${basedir}/example-projects/TextRulerExample/" includes=".project" prefix="${project.artifactId}-${project.version}/example-projects/TextRulerExample/" />

-                    </zip>

-		              </target>

-		            </configuration>

-		            <goals>

-		              <goal>run</goal>

-		            </goals>

-		          </execution>

-		        </executions>

-		      </plugin>

-        </plugins>

-      </build>

-    </profile>

-  </profiles>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-core-ext/pom.xml b/trunk/ruta-core-ext/pom.xml
deleted file mode 100644
index c31cb69..0000000
--- a/trunk/ruta-core-ext/pom.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>ruta-core-ext</artifactId>
-
-	<name>Apache UIMA Ruta: ${project.artifactId}</name>
-	<url>${uimaWebsiteUrl}</url>
-	<description>Additional extensions of the UIMA Ruta language</description>
-
-	<parent>
-		<groupId>org.apache.uima</groupId>
-		<artifactId>ruta-parent</artifactId>
-		<version>2.3.0</version>
-		<relativePath>../ruta-parent/pom.xml</relativePath>
-	</parent>
-	<properties>
-		<uimaScmProject>${project.artifactId}</uimaScmProject>
-		<postNoticeText />
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.uima</groupId>
-			<artifactId>ruta-core</artifactId>
-			<version>${project.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>4.5</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-	<scm>
-		<url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-core-ext</url>
-		<connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-core-ext</connection>
-		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-core-ext</developerConnection>
-	</scm>
-	<build>
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>org.apache.rat</groupId>
-					<artifactId>apache-rat-plugin</artifactId>
-					<executions>
-						<execution>
-							<id>default-cli</id>
-							<configuration>
-								<excludes>
-									<exclude>src/test/resources/org/apache/uima/ruta/block/fst/*.txt</exclude> <!-- test data -->
-									<exclude>issuesFixed/**</exclude> <!-- generated -->
-								</excludes>
-							</configuration>
-						</execution>
-					</executions>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-
-</project>
\ No newline at end of file
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlock.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlock.java
deleted file mode 100644
index b1fa760..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlock.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.ruta.block;
-
-import java.util.List;
-
-import org.apache.uima.UimaContext;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.BlockApply;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.ScriptApply;
-import org.apache.uima.ruta.rule.AbstractRule;
-import org.apache.uima.ruta.rule.AbstractRuleMatch;
-import org.apache.uima.ruta.rule.RuleApply;
-import org.apache.uima.ruta.rule.RuleMatch;
-import org.apache.uima.ruta.rule.RutaRuleElement;
-import org.apache.uima.ruta.visitor.InferenceCrowd;
-
-/**
- * A block construct in UIMA Ruta, which stops applying its elements after the first successful
- * statement
- * 
- */
-public class OnlyFirstBlock extends RutaBlock {
-
-  public OnlyFirstBlock(RutaBlock parent, String defaultNamespace) {
-    super(parent, defaultNamespace, parent != null ? parent.getContext() : null);
-  }
-
-  @Override
-  public ScriptApply apply(RutaStream stream, InferenceCrowd crowd) {
-    BlockApply result = new BlockApply(this);
-    crowd.beginVisit(this, result);
-    RuleApply apply = rule.apply(stream, crowd, true);
-    for (AbstractRuleMatch<? extends AbstractRule> eachMatch : apply.getList()) {
-      if (eachMatch.matched()) {
-        List<AnnotationFS> matchedAnnotations = ((RuleMatch) eachMatch).getMatchedAnnotations(null,
-                null);
-        if (matchedAnnotations == null || matchedAnnotations.isEmpty()) {
-          continue;
-        }
-        AnnotationFS each = matchedAnnotations.get(0);
-        if (each == null) {
-          continue;
-        }
-        boolean stop = false;
-        List<Type> types = ((RutaRuleElement) rule.getRuleElements().get(0)).getMatcher().getTypes(
-                getParent() == null ? this : getParent(), stream);
-        for (Type eachType : types) {
-          RutaStream window = stream.getWindowStream(each, eachType);
-          for (RutaStatement element : getElements()) {
-            if (stop)
-              break;
-            if (element != null) {
-              ScriptApply elementApply = element.apply(window, crowd);
-              if (elementApply instanceof BlockApply) {
-                BlockApply ba = (BlockApply) elementApply;
-                if (ba.getRuleApply().getApplied() > 0) {
-                  stop = true;
-                }
-              } else if (elementApply instanceof RuleApply) {
-                RuleApply ra = (RuleApply) elementApply;
-                if (ra.getApplied() > 0) {
-                  stop = true;
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    crowd.endVisit(this, result);
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlockExtension.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlockExtension.java
deleted file mode 100644
index 345b9f3..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlockExtension.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.ruta.block;
-
-import java.util.List;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaElement;
-import org.apache.uima.ruta.expression.RutaExpression;
-import org.apache.uima.ruta.extensions.IRutaBlockExtension;
-import org.apache.uima.ruta.extensions.RutaParseException;
-import org.apache.uima.ruta.verbalize.RutaVerbalizer;
-
-public class OnlyFirstBlockExtension implements IRutaBlockExtension {
-
-  private final String[] knownExtensions = new String[] { "ONLYFIRST" };
-
-  private final Class<?>[] extensions = new Class[] { OnlyFirstBlock.class };
-
-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {
-    if (element instanceof OnlyFirstBlock) {
-      OnlyFirstBlock b = (OnlyFirstBlock) element;
-      String verbalize = verbalizer.verbalize(b, false);
-      verbalize = verbalize.replaceFirst("BLOCK", verbalizeName(element));
-      return verbalize;
-    } else {
-      return "UnknownAction";
-    }
-  }
-
-  @Override
-  public RutaBlock createBlock(String name, List<RutaExpression> args, RutaBlock env)
-          throws RutaParseException {
-    return new OnlyFirstBlock(env, name);
-  }
-
-
-  public String verbalizeName(RutaElement element) {
-    return knownExtensions[0];
-  }
-
-  public String[] getKnownExtensions() {
-    return knownExtensions;
-  }
-
-  public Class<?>[] extensions() {
-    return extensions;
-  }
-
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlock.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlock.java
deleted file mode 100644
index 1dd485b..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlock.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.ruta.block;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaScriptBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.ScriptApply;
-import org.apache.uima.ruta.visitor.InferenceCrowd;
-
-/**
- * A block construct in UIMA Ruta, in which each rule matches only once and additional positions are
- * skipped.
- * 
- */
-public class OnlyOnceBlock extends RutaScriptBlock {
-
-  public OnlyOnceBlock(RutaBlock parent, String defaultNamespace) {
-    super(null, null, null, parent, defaultNamespace);
-  }
-
-  @Override
-  public ScriptApply apply(RutaStream stream, InferenceCrowd crowd) {
-    boolean oldSetting = stream.isOnlyOnce();
-    stream.setOnlyOnce(true);
-    ScriptApply result = super.apply(stream, crowd);
-    stream.setOnlyOnce(oldSetting);
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlockExtension.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlockExtension.java
deleted file mode 100644
index c7e18d2..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlockExtension.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.ruta.block;
-
-import java.util.List;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaElement;
-import org.apache.uima.ruta.expression.RutaExpression;
-import org.apache.uima.ruta.extensions.IRutaBlockExtension;
-import org.apache.uima.ruta.extensions.RutaParseException;
-import org.apache.uima.ruta.verbalize.RutaVerbalizer;
-
-public class OnlyOnceBlockExtension implements IRutaBlockExtension {
-
-  private final String[] knownExtensions = new String[] { "ONLYONCE" };
-
-  private final Class<?>[] extensions = new Class[] { OnlyOnceBlock.class };
-
-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {
-    if (element instanceof OnlyOnceBlock) {
-      OnlyOnceBlock b = (OnlyOnceBlock) element;
-      String verbalize = verbalizer.verbalize(b, false);
-      verbalize = verbalize.replaceFirst("BLOCK", verbalizeName(element));
-      return verbalize;
-    } else {
-      return "UnknownAction";
-    }
-  }
-
-  @Override
-  public RutaBlock createBlock(String name, List<RutaExpression> args, RutaBlock env)
-          throws RutaParseException {
-    return new OnlyOnceBlock(env, name);
-  }
-
-
-  public String verbalizeName(RutaElement element) {
-    return knownExtensions[0];
-  }
-
-  public String[] getKnownExtensions() {
-    return knownExtensions;
-  }
-
-  public Class<?>[] extensions() {
-    return extensions;
-  }
-
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/AbstractState.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/AbstractState.java
deleted file mode 100644
index 5d59ca1..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/AbstractState.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-
-import org.apache.uima.ruta.rule.RuleElement;
-
-public abstract class AbstractState {
-
-  protected LinkedList<RuleElement> possibleTransitions;
-
-  protected HashMap<RuleElement, AbstractState> transitions;
-
-  protected int depth;
-
-  public AbstractState(int depth) {
-    this.transitions = new HashMap<RuleElement, AbstractState>();
-    this.possibleTransitions = new LinkedList<RuleElement>();
-    this.depth = depth;
-  }
-
-  public abstract AbstractState getTransition(RuleElement elem);
-
-  public int getDepth() {
-    return this.depth;
-  }
-
-  public void addTransition(RuleElement element, AbstractState targetState) {
-    this.possibleTransitions.add(element);
-    this.transitions.put(element, targetState);
-  }
-
-  public LinkedList<RuleElement> getPossibleTransitions() {
-    return this.possibleTransitions;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/Automaton.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/Automaton.java
deleted file mode 100644
index b0b68c3..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/Automaton.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.condition.AbstractRutaCondition;
-import org.apache.uima.ruta.expression.MatchReference;
-import org.apache.uima.ruta.expression.feature.FeatureExpression;
-import org.apache.uima.ruta.rule.EvaluatedCondition;
-import org.apache.uima.ruta.rule.RuleElement;
-import org.apache.uima.ruta.rule.RutaMatcher;
-import org.apache.uima.ruta.rule.RutaRule;
-import org.apache.uima.ruta.rule.RutaRuleElement;
-import org.apache.uima.ruta.rule.RuleMatch;
-import org.apache.uima.ruta.rule.RuleElementMatch;
-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;
-import org.apache.uima.ruta.rule.RutaTypeMatcher;
-import org.apache.uima.ruta.verbalize.RutaVerbalizer;
-import org.apache.uima.ruta.visitor.InferenceCrowd;
-
-public class Automaton {
-
-  private RutaVerbalizer verbalizer;
-
-  private RootState root;
-
-  /**
-   * Constructor that builds the FST from the Rules in rulesList
-   * 
-   * @param rulesList
-   *          - the rules to build the FST from
-   */
-  public Automaton(List<RutaStatement> rulesList) {
-    this.verbalizer = new RutaVerbalizer();
-    this.root = this.buildAutomaton(rulesList);
-  }
-
-  /**
-   * Builds the FST from the Rules in rulesList.
-   * 
-   * @param rulesList
-   *          - the rules to build the FST from
-   * @return the RootState for the built FST
-   */
-  public RootState buildAutomaton(List<RutaStatement> rulesList) {
-    RootState root = new RootState();
-    for (RutaStatement statement : rulesList) {
-      AbstractState startState = root;
-      if (statement instanceof RutaRule) {
-        RutaRule rule = (RutaRule) statement;
-        int depth = 1;
-        for (RuleElement element : rule.getRuleElements()) {
-          AbstractState targetState = null;
-          for (RuleElement toCompare : startState.getPossibleTransitions()) {
-            if (ruleElementEquals(element, toCompare)) {
-              targetState = startState.getTransition(toCompare);
-            }
-            if (targetState instanceof EndState) {
-              // Falls zwei Regeln genau gleich, erstelle trotzdem
-              // zwei verschiedene Endzustände
-              targetState = null;
-            }
-          }
-          if (targetState == null) { // Erstelle neuen Zielzustand
-            if (depth == rule.getRuleElements().size()) {
-              targetState = new EndState(statement, depth);
-            } else {
-              targetState = new TransitionState(depth);
-              ((TransitionState) targetState).addRule(statement);
-            }
-            startState.addTransition(element, targetState);
-          } else { // Benutze existierenden Zielzustand
-            if (targetState instanceof TransitionState) {
-              ((TransitionState) targetState).addRule(statement);
-            }
-          }
-          startState = targetState;
-          depth++;
-        }
-      }
-    }
-    return root;
-  }
-
-  /**
-   * Compares two RuleElements. They are if their verbalization, e. g. "CW" or "SW" is equal, not if
-   * elem1 == elem2 or elem1.equals(elem2)
-   * 
-   * @param elem1
-   *          - The first RuleElement to compare
-   * @param elem2
-   *          - The second RuleElement to compare
-   * 
-   * @return true if the verbalization of the two RuleElements equals, else false
-   */
-  public boolean ruleElementEquals(RuleElement elem1, RuleElement elem2) {
-    return verbalizer.verbalize(elem1).equals(verbalizer.verbalize(elem2));
-  }
-
-  /**
-   * Starts the execution of the Automaton in the rootState
-   * 
-   * @param stream
-   *          - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   * @param parent
-   *          - the RutaBlock (is needed in called functions)
-   */
-  public void apply(RutaStream stream, InferenceCrowd crowd, RutaBlock parent) {
-    for (RuleElement element : root.getPossibleTransitions()) {
-      AbstractState targetState = root.getTransition(element);
-      RutaMatcher matcher = ((RutaRuleElement) element).getMatcher();
-      for (AnnotationFS annoFS : matcher.getMatchingAnnotations(stream, parent)) {
-        if (targetState instanceof TransitionState) {
-          LinkedList<RuleMatch> ruleMatches = createMatches(annoFS,
-                  ((TransitionState) targetState).getRules(), stream, crowd);
-          doTransition((TransitionState) targetState, annoFS, element, ruleMatches, stream, crowd,
-                  parent);
-        } else {
-          RuleMatch ruleMatch = createMatch(annoFS, (RutaRule) ((EndState) targetState).getRule(),
-                  stream, crowd);
-          addAnnotation((EndState) targetState, ruleMatch, stream, crowd);
-        }
-      }
-    }
-  }
-
-  /**
-   * Pursues the execution of the Automaton in the next state.
-   * 
-   * @param startState
-   *          - the state to go on from
-   * @param anno
-   *          - the matched Annotation from the previous transition
-   * @param ruleElement
-   *          - the last matched RuleElement
-   * @param matches
-   *          - the list of RuleMatches corresponding to the rules in the state
-   * @param stream
-   *          - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   * @param parent
-   *          - the RutaBlock (is needed in called functions)
-   */
-  private void doTransition(TransitionState startState, AnnotationFS anno, RuleElement ruleElement,
-          LinkedList<RuleMatch> matches, RutaStream stream, InferenceCrowd crowd, RutaBlock parent) {
-    for (RuleElement element : startState.getPossibleTransitions()) {
-      RutaMatcher matcher = ((RutaRuleElement) element).getMatcher();
-      AbstractState targetState = startState.getTransition(element);
-      for (AnnotationFS annoFS : matcher.getAnnotationsAfter((RutaRuleElement) ruleElement, anno,
-              stream, parent)) {
-        if (targetState instanceof TransitionState) {
-          LinkedList<RuleMatch> ruleMatches = filterMatches(annoFS, matches,
-                  (TransitionState) targetState, stream, crowd);
-          doTransition((TransitionState) targetState, annoFS, element, ruleMatches, stream, crowd,
-                  parent);
-        } else {
-          RuleMatch ruleMatch = filterMatch(annoFS, matches, (EndState) targetState, stream, crowd);
-          addAnnotation((EndState) targetState, ruleMatch, stream, crowd);
-        }
-      }
-    }
-  }
-
-  /**
-   * Creates the Annotation after a full matching of a rule, this means the FST reached an EndState
-   * 
-   * 
-   * @param targetState
-   *          - the reached Endstate representing the rule
-   * @param ruleMatch
-   *          - the RuleMatch corresponding the Rule
-   * @param stream
-   *          - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   */
-  public void addAnnotation(EndState targetState, RuleMatch ruleMatch, RutaStream stream,
-          InferenceCrowd crowd) {
-    RutaStatement statement = targetState.getRule();
-    if (statement instanceof RutaRule) {
-      RutaRule rule = (RutaRule) statement;
-      rule.getRoot().apply(ruleMatch, stream, crowd);
-    }
-  }
-
-  /**
-   * Checks the matching of the annotation and updates the RuleMatch
-   * 
-   * @param annotation
-   *          - the matched Annotation
-   * @param ruleMatch
-   *          - the RuleMatch to update
-   * @param element
-   *          - the matched RuleElement
-   * @param containerMatch
-   *          - the ComposedRuleElement of the rule containing element
-   * @param stream
-   *          - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   */
-  private void doMatch(AnnotationFS annotation, RuleMatch ruleMatch, RuleElement element,
-          ComposedRuleElementMatch containerMatch, RutaStream stream, InferenceCrowd crowd) {
-    RuleElementMatch result = new RuleElementMatch(element, containerMatch);
-    List<EvaluatedCondition> evaluatedConditions = new ArrayList<EvaluatedCondition>(element
-            .getConditions().size());
-    // boolean base = matcher.match(annotation, stream, getParent());
-    boolean base = true;
-    RutaMatcher matcher = ((RutaRuleElement) element).getMatcher();
-    if (matcher instanceof RutaTypeMatcher) {
-      RutaTypeMatcher rtm = (RutaTypeMatcher) matcher;
-      MatchReference mr = (MatchReference) rtm.getExpression();
-      FeatureExpression featureExpression = mr.getFeatureExpression(element.getParent());
-      if (featureExpression != null) {
-        base = matcher.match(annotation, stream, element.getParent());
-      }
-    }
-    List<AnnotationFS> textsMatched = new ArrayList<AnnotationFS>(1);
-    if (base) {
-      for (AbstractRutaCondition condition : element.getConditions()) {
-        crowd.beginVisit(condition, null);
-        EvaluatedCondition eval = condition.eval(annotation, element, stream, crowd);
-        crowd.endVisit(condition, null);
-        evaluatedConditions.add(eval);
-      }
-    }
-    if (annotation != null) {
-      textsMatched.add(annotation);
-    }
-    result.setMatchInfo(base, textsMatched, evaluatedConditions, stream);
-    ruleMatch.setMatched(ruleMatch.matched() && result.matched());
-  }
-
-  /**
-   * Creates a list of RuleMatches with one RuleMatch with the annotation for every rule for a
-   * transition from the RootState into a TransitionState
-   * 
-   * @param annoFS
-   *          - the matched annotation
-   * @param rulesList
-   *          - the list of rules
-   * @param stream
-   *          - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   * 
-   * @return - a list with the created RuleMatches
-   */
-  private LinkedList<RuleMatch> createMatches(AnnotationFS annoFS, List<RutaStatement> rulesList,
-          RutaStream stream, InferenceCrowd crowd) {
-    // RootState -> TransitionState
-    LinkedList<RuleMatch> ruleMatches = new LinkedList<RuleMatch>();
-    for (RutaStatement statement : rulesList) {
-      RutaRule rule = (RutaRule) statement;
-      RuleElement element = rule.getRuleElements().get(0);
-      RuleMatch match = new RuleMatch(rule);
-      ComposedRuleElementMatch rootMatch = new ComposedRuleElementMatch(rule.getRoot(), null);
-      match.setRootMatch(rootMatch);
-      doMatch(annoFS, match, element, rootMatch, stream, crowd);
-      ruleMatches.add(match);
-    }
-    return ruleMatches;
-  }
-
-  /**
-   * Creates the match for the transition from the RootState directly into an EndState (happens if
-   * the rule only has one RuleElement).
-   * 
-   * @param annoFS
-   *          - the matches annotation for the RuleMatch
-   * @param rule
-   *          - the matched rule for the RuleMatch
-   * @param stream
-   *          - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   * 
-   * @return the created RuleMatch for the rule with the matched annotation
-   */
-  private RuleMatch createMatch(AnnotationFS annoFS, RutaRule rule, RutaStream stream,
-          InferenceCrowd crowd) {
-    // RootState -> EndState
-    RuleElement element = rule.getRuleElements().get(0);
-    RuleMatch match = new RuleMatch(rule);
-    ComposedRuleElementMatch rootMatch = new ComposedRuleElementMatch(rule.getRoot(), null);
-    match.setRootMatch(rootMatch);
-    doMatch(annoFS, match, element, rootMatch, stream, crowd);
-    return match;
-  }
-
-  /**
-   * Filters the rules for a transition from a TransitionState into a TransitionState and adds an
-   * InnerMatch for the matched Annotationen to the corresponding RuleMatches
-   * 
-   * @param annoFS
-   *          - the matched Annotation
-   * @param ruleMatches
-   *          - the RuleMatches which are filtered
-   * @param targetState
-   *          - the TransitionState for which the RuleMatches are filtered
-   * @param stream
-   *          - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   * 
-   * @return the RuleMatches for the Rules which are represented by the TransitionState targetState
-   */
-  private LinkedList<RuleMatch> filterMatches(AnnotationFS annoFS,
-          LinkedList<RuleMatch> ruleMatches, TransitionState targetState, RutaStream stream,
-          InferenceCrowd crowd) {
-    // TransitionState -> TransitionState
-    LinkedList<RuleMatch> retList = new LinkedList<RuleMatch>();
-    for (RuleMatch match : ruleMatches) {
-      for (RutaStatement statement : targetState.getRules()) {
-        RutaRule rule = (RutaRule) statement;
-        if (match.getRule().equals(rule)) {
-          RuleElement element = rule.getRuleElements().get(targetState.getDepth() - 1);
-          doMatch(annoFS, match, element, match.getRootMatch(), stream, crowd);
-          retList.add(match);
-        }
-      }
-    }
-    return retList;
-  }
-
-  /**
-   * Filters the one RuleMatch from the list of RuleMatches, which corresponds to the Rule from the
-   * EndState state and adds the Annotation to the list of matched Annotation of this RuleMatch
-   * 
-   * @param annoFS
-   *          - the Annotation to add
-   * @param ruleMatches
-   *          - the list of RuleMatches to filter the single RuleMatch from
-   * @param state
-   *          - the state the rule gets taken from
-   * @param stream
-   *          stream - the RutaStream (is needed in the called functions)
-   * @param crowd
-   *          - the InferenceCrowd (is needed in the called functions)
-   * 
-   * @return the single RuleMatch corresponding to the rule from the state
-   */
-  private RuleMatch filterMatch(AnnotationFS annoFS, LinkedList<RuleMatch> ruleMatches,
-          EndState state, RutaStream stream, InferenceCrowd crowd) {
-    // TransitionState -> EndState
-    RutaRule rule = (RutaRule) state.getRule();
-    for (RuleMatch match : ruleMatches) {
-      if (rule.equals(match.getRule())) {
-        RuleElement element = rule.getRuleElements().get(state.getDepth() - 1);
-        doMatch(annoFS, match, element, match.getRootMatch(), stream, crowd);
-        return match;
-      }
-    }
-    // Should not happen!
-    return ruleMatches.get(0);
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/EndState.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/EndState.java
deleted file mode 100644
index 02fed48..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/EndState.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.rule.RuleElement;
-
-public class EndState extends AbstractState {
-  
-  private RutaStatement rule;
-
-  public EndState(RutaStatement rule, int depth) {
-    super(depth);
-    this.rule = rule;
-  }
-
-  public RutaStatement getRule() {
-    return this.rule;
-  }
-  
-  @Override
-  public String toString() {
-    return "EndState";
-  }
-  
-  @Override
-  public AbstractState getTransition(RuleElement elem) {
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlock.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlock.java
deleted file mode 100644
index 8b81da1..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlock.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import java.util.List;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.BlockApply;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.ScriptApply;
-import org.apache.uima.ruta.rule.AbstractRule;
-import org.apache.uima.ruta.rule.AbstractRuleMatch;
-import org.apache.uima.ruta.rule.RuleApply;
-import org.apache.uima.ruta.rule.RuleMatch;
-import org.apache.uima.ruta.rule.RutaRule;
-import org.apache.uima.ruta.rule.RutaRuleElement;
-import org.apache.uima.ruta.visitor.InferenceCrowd;
-
-public class FSTBlock extends RutaBlock {
-
-  private Automaton auto;
-
-  public FSTBlock(String name, RutaRule rule, List<RutaStatement> elements, RutaBlock parent,
-          String defaultNamespace) {
-    super(name, rule, elements, parent, defaultNamespace, parent != null ? parent.getContext()
-            : null);
-  }
-
-  @Override
-  public ScriptApply apply(RutaStream stream, InferenceCrowd crowd) {
-    BlockApply result = new BlockApply(this);
-    crowd.beginVisit(this, result);
-    RuleApply apply = rule.apply(stream, crowd, true);
-    for (AbstractRuleMatch<? extends AbstractRule> eachMatch : apply.getList()) {
-      if (eachMatch.matched()) {
-        List<AnnotationFS> matchedAnnotations = ((RuleMatch) eachMatch).getMatchedAnnotations(null,
-                null);
-        if (matchedAnnotations == null || matchedAnnotations.isEmpty()) {
-          continue;
-        }
-        AnnotationFS each = matchedAnnotations.get(0);
-        if (each == null) {
-          continue;
-        }
-        List<Type> types = ((RutaRuleElement) rule.getRuleElements().get(0)).getMatcher().getTypes(
-                getParent() == null ? this : getParent(), stream);
-        for (Type eachType : types) {
-          RutaStream window = stream.getWindowStream(each, eachType);
-          auto.apply(window, crowd, this);
-        }
-      }
-    }
-    crowd.endVisit(this, result);
-    return result;
-  }
-
-  @Override
-  public void setElements(List<RutaStatement> elements) {
-    this.elements = elements;
-
-    auto = new Automaton(elements);
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlockExtension.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlockExtension.java
deleted file mode 100644
index 1e33030..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlockExtension.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import java.util.List;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaElement;
-import org.apache.uima.ruta.expression.RutaExpression;
-import org.apache.uima.ruta.extensions.IRutaBlockExtension;
-import org.apache.uima.ruta.extensions.RutaParseException;
-import org.apache.uima.ruta.verbalize.RutaVerbalizer;
-
-public class FSTBlockExtension implements IRutaBlockExtension {
-
-  private final String[] knownExtensions = new String[] { "FST" };
-
-  private final Class<?>[] extensions = new Class[] { FSTBlock.class };
-
-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {
-    if (element instanceof FSTBlock) {
-      FSTBlock b = (FSTBlock) element;
-      String verbalize = verbalizer.verbalize(b, true);
-      verbalize.replaceFirst("FST", verbalizeName(element));
-      return verbalize;
-    } else {
-      return "UnknownAction";
-    }
-  }
-
-  @Override
-  public RutaBlock createBlock(String name, List<RutaExpression> args, RutaBlock env)
-          throws RutaParseException {
-    return new FSTBlock(name, null, null, env, name);
-  }
-
-  public String verbalizeName(RutaElement element) {
-    return knownExtensions[0];
-  }
-
-  public String[] getKnownExtensions() {
-    return knownExtensions;
-  }
-
-  public Class<?>[] extensions() {
-    return extensions;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/RootState.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/RootState.java
deleted file mode 100644
index fdb8973..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/RootState.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import org.apache.uima.ruta.rule.RuleElement;
-
-public class RootState extends AbstractState {
-
-  public RootState() {
-    super(0);
-  }
-
-  @Override
-  public String toString() {
-    return "RootState";
-  }
-  
-  @Override
-  public AbstractState getTransition(RuleElement elem) {
-    return this.transitions.get(elem);
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/TransitionState.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/TransitionState.java
deleted file mode 100644
index 48b8ee7..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/block/fst/TransitionState.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import java.util.LinkedList;
-
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.rule.RuleElement;
-
-public class TransitionState extends AbstractState {
-  
-  private LinkedList<RutaStatement> isPartOfRules;
-  
-  public TransitionState(int depth) {
-    super(depth);
-    this.isPartOfRules = new LinkedList<RutaStatement>();
-  }
-  
-  @Override
-  public AbstractState getTransition(RuleElement elem) {
-    return this.transitions.get(elem);
-  }
-  
-  public void addRule(RutaStatement statement) {
-    this.isPartOfRules.add(statement);
-  }
-  
-  public LinkedList<RutaStatement> getRules() {
-    return this.isPartOfRules;
-  }
-  
-  @Override
-  public String toString() {
-    return "TransitionState";
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/FirstCharToUpperCaseStringFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/FirstCharToUpperCaseStringFunction.java
deleted file mode 100644
index 351f4a3..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/FirstCharToUpperCaseStringFunction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.ruta.string;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.string.StringFunctionExpression;
-
-public class FirstCharToUpperCaseStringFunction extends StringFunctionExpression {
-
-  private final IStringExpression expr;
-
-  public FirstCharToUpperCaseStringFunction(IStringExpression expr) {
-    super();
-    this.expr = expr;
-  }
-
-  public IStringExpression getExpr() {
-    return expr;
-  }
-
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    StringBuilder sb = new StringBuilder(expr.getStringValue(parent, annotation, stream));
-    sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
-    
-    return sb.toString();
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ReplaceAllStringFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ReplaceAllStringFunction.java
deleted file mode 100644
index 0795269..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ReplaceAllStringFunction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.ruta.string;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.string.StringFunctionExpression;
-
-public class ReplaceAllStringFunction extends StringFunctionExpression {
-
-  private final IStringExpression text;
-  private final IStringExpression searchTerm;
-  private final IStringExpression replacement;
-
-  public ReplaceAllStringFunction(IStringExpression expr, IStringExpression searchTerm,
-          IStringExpression replacement) {
-    super();
-    this.text = expr;
-    this.searchTerm = searchTerm;
-    this.replacement = replacement;
-  }
-
-  public IStringExpression getExpr() {
-    return text;
-  }
-
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return text.getStringValue(parent, annotation, stream).replaceAll(
-            searchTerm.getStringValue(parent, annotation, stream),
-            replacement.getStringValue(parent, annotation, stream));
-  }
-}
\ No newline at end of file
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ReplaceFirstStringFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ReplaceFirstStringFunction.java
deleted file mode 100644
index add849d..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ReplaceFirstStringFunction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.ruta.string;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.string.StringFunctionExpression;
-
-public class ReplaceFirstStringFunction extends StringFunctionExpression {
-
-  private final IStringExpression expr;
-
-  private final IStringExpression searchTerm;
-
-  private final IStringExpression replacement;
-
-  public ReplaceFirstStringFunction(IStringExpression expr, IStringExpression searchTerm,
-          IStringExpression replacement) {
-    super();
-    this.expr = expr;
-    this.searchTerm = searchTerm;
-    this.replacement = replacement;
-  }
-
-  public IStringExpression getExpr() {
-    return expr;
-  }
-
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return expr.getStringValue(parent, annotation, stream).replaceFirst(
-            searchTerm.getStringValue(parent, annotation, stream),
-            replacement.getStringValue(parent, annotation, stream));
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/StringOperationsExtension.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/StringOperationsExtension.java
deleted file mode 100644
index edd4720..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/StringOperationsExtension.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * 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.ruta.string;
-
-import java.util.List;
-
-import org.apache.uima.ruta.RutaElement;
-import org.apache.uima.ruta.expression.RutaExpression;
-import org.apache.uima.ruta.expression.number.INumberExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.string.StringFunctionExpression;
-import org.apache.uima.ruta.extensions.IRutaStringFunctionExtension;
-import org.apache.uima.ruta.extensions.RutaParseException;
-import org.apache.uima.ruta.verbalize.RutaVerbalizer;
-
-public class StringOperationsExtension implements IRutaStringFunctionExtension {
-
-  private final String[] knownExtensions = new String[] { "toUpperCase", "toLowerCase",
-      "replaceFirst", "replaceAll", "substring", "firstCharToUpperCase" };
-
-  private final Class<?>[] extensions = new Class[] { ToUpperCaseStringFunction.class,
-      ToLowerCaseStringFunction.class, ReplaceFirstStringFunction.class,
-      ReplaceAllStringFunction.class, SubstringStringFunction.class,
-      FirstCharToUpperCaseStringFunction.class };
-
-  
-  
-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {
-    if (element instanceof ToLowerCaseStringFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((ToLowerCaseStringFunction) element).getExpr()) + ")";
-    } else if (element instanceof ToUpperCaseStringFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((ToUpperCaseStringFunction) element).getExpr()) + ")";
-    }
-    //
-    else if (element instanceof ReplaceFirstStringFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((ReplaceFirstStringFunction) element).getExpr()) + ")";
-    } else if (element instanceof ReplaceAllStringFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((ReplaceAllStringFunction) element).getExpr()) + ")";
-    } else if (element instanceof SubstringStringFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((SubstringStringFunction) element).getExpr()) + ")";
-    } else if (element instanceof FirstCharToUpperCaseStringFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((FirstCharToUpperCaseStringFunction) element).getExpr())
-              + ")";
-    }
-    //
-    else {
-      return "UnknownStringFunction";
-    }
-  }
-
-  public StringFunctionExpression createStringFunction(String name, List<RutaExpression> args)
-          throws RutaParseException {
-    if (args == null  || !(args.get(0) instanceof IStringExpression)) {
-      throw new RutaParseException("You have to specify StringExpressions to use these Functions !");
-    }
-
-    // ToUpperCase  [0] is the String to change
-    if (name.equals(knownExtensions[0])) {
-      return new ToUpperCaseStringFunction((IStringExpression) args.get(0));
-    }
-
-    // ToLowerCase Function
-    else if (name.equals(knownExtensions[1])) {
-      return new ToLowerCaseStringFunction((IStringExpression) args.get(0));
-    }
-
-    // FirstCharToUppercase
-    else if (name.equals(knownExtensions[5])) {
-      return new FirstCharToUpperCaseStringFunction((IStringExpression) args.get(0));
-    }
-    
-    if(args.size()!=3){
-      throw new RutaParseException("You need 3 Arguments to use ReplaceFirst, ReplaceAll, Substring");
-    }
-    // ReplaceFirst [0] is the String where stuff is to be replaced, [1] is the search term [2] is the replacement
-     if (name.equals(knownExtensions[2])) {
-      return new ReplaceFirstStringFunction((IStringExpression) args.get(0),(IStringExpression) args.get(1),(IStringExpression) args.get(2));
-    }
-    // ReplaceAll [0] is the String where stuff is to be replaced, [1] is the search term [2] is the replacement
-    else if (name.equals(knownExtensions[3])) {
-      return new ReplaceAllStringFunction((IStringExpression) args.get(0),(IStringExpression) args.get(1),(IStringExpression) args.get(2));
-    }
-    // Substring [0] is the String where stuff is to be replaced, [1] is the begin index [2] is the endIndex
-    else if (name.equals(knownExtensions[4])) {
-      return new SubstringStringFunction((IStringExpression) args.get(0),(INumberExpression) args.get(1),(INumberExpression)args.get(2));
-    }
-    
-    return null;
-  }
-
-  public String verbalizeName(RutaElement element) {
-    
-     if (element instanceof ToUpperCaseStringFunction) {
-      return knownExtensions[0];
-    }
-     
-     else if (element instanceof ToLowerCaseStringFunction) {
-      return knownExtensions[1];
-    }
-
-    
-    else if (element instanceof ReplaceFirstStringFunction) {
-      return knownExtensions[2];
-    }
-    
-    else if (element instanceof ReplaceAllStringFunction) {
-      return knownExtensions[3];
-    }
-    
-    else if (element instanceof SubstringStringFunction) {
-      return knownExtensions[4];
-    }
-    
-    else if (element instanceof FirstCharToUpperCaseStringFunction) {
-      return knownExtensions[5];
-    }
-    
-
-    
-    
-    else {
-      return "UnknownStringFunction";
-    }
-  }
-
-  public String[] getKnownExtensions() {
-    return knownExtensions;
-  }
-
-  public Class<?>[] extensions() {
-    return extensions;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/SubstringStringFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/SubstringStringFunction.java
deleted file mode 100644
index 94f25e2..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/SubstringStringFunction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.ruta.string;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.number.INumberExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.string.StringFunctionExpression;
-
-public class SubstringStringFunction extends StringFunctionExpression {
-
-  private final IStringExpression expr;
-
-  private final INumberExpression from;
-
-  private final INumberExpression to; // excluded
-
-  public SubstringStringFunction(IStringExpression expr, INumberExpression from,
-          INumberExpression to) {
-    super();
-    this.expr = expr;
-    this.from = from;
-    this.to = to;
-  }
-
-  public IStringExpression getExpr() {
-    return expr;
-  }
-
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    String text = expr.getStringValue(parent, annotation, stream);
-    if (text.length() >= this.to.getIntegerValue(parent, annotation, stream)){
-      return text.substring(from.getIntegerValue(parent, annotation, stream),
-              to.getIntegerValue(parent, annotation, stream));
-    }
-
-    else
-      return null;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ToLowerCaseStringFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ToLowerCaseStringFunction.java
deleted file mode 100644
index 2e15dc3..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ToLowerCaseStringFunction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.ruta.string;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.string.StringFunctionExpression;
-
-public class ToLowerCaseStringFunction extends StringFunctionExpression {
-
-  private final IStringExpression expr;
-
-  public ToLowerCaseStringFunction(IStringExpression expr) {
-    super();
-    this.expr = expr;
-  }
-
-  public IStringExpression getExpr() {
-    return expr;
-  }
-
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return expr.getStringValue(parent, annotation, stream).toLowerCase();
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ToUpperCaseStringFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ToUpperCaseStringFunction.java
deleted file mode 100644
index 78af4da..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/ToUpperCaseStringFunction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.ruta.string;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.string.StringFunctionExpression;
-
-public class ToUpperCaseStringFunction extends StringFunctionExpression {
-
-  private final IStringExpression expr;
-
-  public ToUpperCaseStringFunction(IStringExpression expr) {
-    super();
-    this.expr = expr;
-  }
-
-  public IStringExpression getExpr() {
-    return expr;
-  }
-
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return expr.getStringValue(parent, annotation, stream).toUpperCase();
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/BooleanOperationsExtension.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/BooleanOperationsExtension.java
deleted file mode 100644
index 33a0d5f..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/BooleanOperationsExtension.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * 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.ruta.string.bool;
-
-import java.util.List;
-
-import org.apache.uima.ruta.RutaElement;
-import org.apache.uima.ruta.expression.RutaExpression;
-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.extensions.IRutaBooleanFunctionExtension;
-import org.apache.uima.ruta.extensions.RutaParseException;
-import org.apache.uima.ruta.verbalize.RutaVerbalizer;
-
-public class BooleanOperationsExtension implements IRutaBooleanFunctionExtension {
-
-  private final String[] knownExtensions = new String[] { "contains", "endsWith",
-      "startsWith", "equals", "equalsIgnoreCase", "isEmpty" };
-
-  private final Class<?>[] extensions = new Class[] { ContainsBooleanFunction.class,
-      EndsWithBooleanFunction.class, StartsWithBooleanFunction.class,
-      EqualsBooleanFunction.class, EqualsIgnoreCaseBooleanFunction.class,
-      IsEmptyBooleanFunction.class };
-
-  
-  
-  public String verbalize(RutaElement element, RutaVerbalizer verbalizer) {
-    if (element instanceof ContainsBooleanFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((ContainsBooleanFunction) element).getExpr()) + ")";
-    } else if (element instanceof EndsWithBooleanFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((EndsWithBooleanFunction) element).getExpr()) + ")";
-    }
-    //
-    else if (element instanceof StartsWithBooleanFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((StartsWithBooleanFunction) element).getExpr()) + ")";
-    } else if (element instanceof EqualsBooleanFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((EqualsBooleanFunction) element).getExpr()) + ")";
-    } else if (element instanceof EqualsIgnoreCaseBooleanFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((EqualsIgnoreCaseBooleanFunction) element).getExpr()) + ")";
-    } else if (element instanceof IsEmptyBooleanFunction) {
-      return verbalizeName(element) + "("
-              + verbalizer.verbalize(((IsEmptyBooleanFunction) element).getExpr())
-              + ")";
-    }
-    //
-    else {
-      return "UnknownStringFunction";
-    }
-  }
-
-
-  public String verbalizeName(RutaElement element) {
-    
-     if (element instanceof ContainsBooleanFunction) {
-      return knownExtensions[0];
-    }
-     
-     else if (element instanceof EndsWithBooleanFunction) {
-      return knownExtensions[1];
-    }
-
-    
-    else if (element instanceof StartsWithBooleanFunction) {
-      return knownExtensions[2];
-    }
-    
-    else if (element instanceof EqualsBooleanFunction) {
-      return knownExtensions[3];
-    }
-    
-    else if (element instanceof EqualsIgnoreCaseBooleanFunction) {
-      return knownExtensions[4];
-    }
-    
-    else if (element instanceof IsEmptyBooleanFunction) {
-      return knownExtensions[5];
-    }
-    
-
-    
-    
-    else {
-      return "UnknownStringFunction";
-    }
-  }
-
-  public String[] getKnownExtensions() {
-    return knownExtensions;
-  }
-
-  public Class<?>[] extensions() {
-    return extensions;
-  }
-
-  @Override
-  public BooleanFunctionExpression createBooleanFunction(String name, List<RutaExpression> args)
-          throws RutaParseException {
-    if(args ==null ){
-      throw new RutaParseException("You have to specify at least 1 Argument to use these Functions !");
-    }
-    
-    if (name.equals(knownExtensions[5])) {
-      return new IsEmptyBooleanFunction((IStringExpression) args.get(0));
-    }
-    
-    if (args == null || args.size()<2) {
-      throw new RutaParseException("You have to specify at least 2 Arguments to use these Functions !");
-    }
-
-    if (name.equals(knownExtensions[0])) {
-      return new ContainsBooleanFunction((IStringExpression) args.get(0), (IStringExpression) args.get(1));
-    }
-
-    else if (name.equals(knownExtensions[1])) {
-      return new EndsWithBooleanFunction((IStringExpression) args.get(0),(IStringExpression) args.get(1));
-    }
-
-    else if (name.equals(knownExtensions[2])) {
-      return new StartsWithBooleanFunction((IStringExpression) args.get(0),(IStringExpression) args.get(1));
-    }
-    
-     if (name.equals(knownExtensions[3])) {
-      return new EqualsBooleanFunction((IStringExpression) args.get(0),(IStringExpression) args.get(1));
-    }
-    else if (name.equals(knownExtensions[4])) {
-      return new EqualsIgnoreCaseBooleanFunction((IStringExpression) args.get(0),(IStringExpression) args.get(1));
-    }
-     
-    
-    return null;
-  }
-
-
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/ContainsBooleanFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/ContainsBooleanFunction.java
deleted file mode 100644
index a7d6acd..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/ContainsBooleanFunction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.ruta.string.bool;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-
-public class ContainsBooleanFunction extends BooleanFunctionExpression {
-  
-  private IStringExpression text;
-  private IStringExpression contains;
-  
-  public ContainsBooleanFunction(IStringExpression text,
-          IStringExpression contains) {
-    this.text = text;
-    this.contains =contains;
-  }
-
-  public IStringExpression getExpr() {
-    return text;
-  }
-
-  @Override
-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    
-return text.getStringValue(parent, annotation, stream).contains(contains.getStringValue(parent, annotation, stream));
-  }
-
-  @Override
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    Boolean isContained = text.getStringValue(parent, annotation, stream).contains(contains.getStringValue(parent, annotation, stream)); 
-    return isContained.toString();
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EndsWithBooleanFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EndsWithBooleanFunction.java
deleted file mode 100644
index d0135f9..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EndsWithBooleanFunction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.ruta.string.bool;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-
-public class EndsWithBooleanFunction extends BooleanFunctionExpression {
-  private IStringExpression text;
-  private IStringExpression end;
-  
-  public EndsWithBooleanFunction(IStringExpression text,
-          IStringExpression end) {
-    this.text = text;
-    this.end = end;
-    
-  }
-
-  public IStringExpression getExpr() {
-    return text;
-  }
-
-  @Override
-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return text.getStringValue(parent, annotation, stream).endsWith(end.getStringValue(parent, annotation, stream));
-  }
-
-  @Override
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    Boolean endsWith = text.getStringValue(parent, annotation, stream).endsWith(end.getStringValue(parent, annotation, stream)); 
-    return endsWith.toString();
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EqualsBooleanFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EqualsBooleanFunction.java
deleted file mode 100644
index 76377f0..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EqualsBooleanFunction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.ruta.string.bool;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-
-public class EqualsBooleanFunction extends BooleanFunctionExpression {
-  
-  private IStringExpression text;
-  private IStringExpression compare;
-  
-  
-  public EqualsBooleanFunction(IStringExpression text,
-          IStringExpression compare) {
-    this.text = text;
-    this.compare = compare;
-  }
-
-  public IStringExpression getExpr() {
-    return text;
-  }
-
-  @Override
-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return text.getStringValue(parent, annotation, stream).equals(compare.getStringValue(parent, annotation, stream));
-  }
-
-  @Override
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    Boolean equals = text.getStringValue(parent, annotation, stream).equals(compare.getStringValue(parent, annotation, stream)); 
-    return equals.toString();
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EqualsIgnoreCaseBooleanFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EqualsIgnoreCaseBooleanFunction.java
deleted file mode 100644
index 0369cf1..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/EqualsIgnoreCaseBooleanFunction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.ruta.string.bool;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-
-public class EqualsIgnoreCaseBooleanFunction extends BooleanFunctionExpression {
-  
-  private IStringExpression text;
-  private IStringExpression compare;
-  
-  
-  public EqualsIgnoreCaseBooleanFunction(IStringExpression text,
-          IStringExpression compare) {
-    this.text = text;
-    this.compare = compare;
-  }
-
-  public IStringExpression getExpr() {
-    return text;
-  }
-
-  @Override
-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return text.getStringValue(parent, annotation, stream).equalsIgnoreCase(compare.getStringValue(parent, annotation, stream));
-  }
-
-  @Override
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    Boolean equals = text.getStringValue(parent, annotation, stream).equalsIgnoreCase(compare.getStringValue(parent, annotation, stream)); 
-    return equals.toString();
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/IsEmptyBooleanFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/IsEmptyBooleanFunction.java
deleted file mode 100644
index f3fc46f..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/IsEmptyBooleanFunction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.ruta.string.bool;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-
-public class IsEmptyBooleanFunction extends BooleanFunctionExpression {
-
-  private IStringExpression text;
-
-  public IsEmptyBooleanFunction(IStringExpression text) {
-    this.text = text;
-  }
-
-  public IStringExpression getExpr() {
-    return text;
-  }
-
-  @Override
-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return text.getStringValue(parent, annotation, stream).isEmpty();
-  }
-
-  @Override
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    Boolean isEmpty = text.getStringValue(parent, annotation, stream).isEmpty();
-    return isEmpty.toString();
-  }
-}
diff --git a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/StartsWithBooleanFunction.java b/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/StartsWithBooleanFunction.java
deleted file mode 100644
index b73b8fe..0000000
--- a/trunk/ruta-core-ext/src/main/java/org/apache/uima/ruta/string/bool/StartsWithBooleanFunction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.ruta.string.bool;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-
-public class StartsWithBooleanFunction extends BooleanFunctionExpression {
-
-  private IStringExpression text;
-
-  private IStringExpression start;
-
-  public StartsWithBooleanFunction(IStringExpression text, IStringExpression start) {
-    this.text = text;
-    this.start = start;
-
-  }
-
-  public IStringExpression getExpr() {
-    return text;
-  }
-
-  @Override
-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return text.getStringValue(parent, annotation, stream).startsWith(
-            start.getStringValue(parent, annotation, stream));
-  }
-
-  @Override
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    Boolean endsWith = text.getStringValue(parent, annotation, stream).startsWith(
-            start.getStringValue(parent, annotation, stream));
-    return endsWith.toString();
-  }
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/OnlyFirstBlockTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/OnlyFirstBlockTest.java
deleted file mode 100644
index 72bd240..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/OnlyFirstBlockTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.ruta.block;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class OnlyFirstBlockTest {
-
-  @Test
-  public void test() {
-    String document = "some text";
-    String script = "ONLYFIRST Document{}{\n";
-    script += "Document{-> T1};\n";
-    script += "Document{-> T2};\n";
-    script += "}";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { OnlyFirstBlockExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("some text", iterator.next().getCoveredText());
-
-    t = RutaTestUtils.getTestType(cas, 2);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(0, ai.size());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/OnlyOnceBlockTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/OnlyOnceBlockTest.java
deleted file mode 100644
index b44dfc5..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/OnlyOnceBlockTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.ruta.block;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class OnlyOnceBlockTest {
-
-  @Test
-  public void test() {
-    String document = "some text with numbers: 1 2 3 4";
-    String script = "ONLYONCE Document{}{\n";
-    script += "SW{-> T1};\n";
-    script += "NUM{-> T2};\n";
-    script += "SW+{-> T3};\n";
-    script += "NUM+{-> T4};\n";
-    script += "(SW | CW | NUM)+{-> T5};\n";
-    script += "(ALL & ANY)+{-> T6};\n";
-    script += "}";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { OnlyOnceBlockExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("some", iterator.next().getCoveredText());
-
-    t = RutaTestUtils.getTestType(cas, 2);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("1", iterator.next().getCoveredText());
-    
-    t = RutaTestUtils.getTestType(cas, 3);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("some text with numbers", iterator.next().getCoveredText());
-
-    t = RutaTestUtils.getTestType(cas, 4);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("1 2 3 4", iterator.next().getCoveredText());
-    
-    t = RutaTestUtils.getTestType(cas, 5);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("some text with numbers", iterator.next().getCoveredText());
-    
-    t = RutaTestUtils.getTestType(cas, 6);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("some text with numbers: 1 2 3 4", iterator.next().getCoveredText());
-    
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/fst/SimpleTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/fst/SimpleTest.java
deleted file mode 100644
index c2c947b..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/fst/SimpleTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class SimpleTest {
-
-  @Test
-  public void test() {
-    String document = "Informatik ist die Wissenschaft der systematischen Verarbeitung von Informationen,"
-            + " insbesondere der automatischen Verarbeitung mit Hilfe von Digitalrechnern.";
-    String script = "";
-    script += "FST Document{}{\n";
-    script += "CW CW{-> T1};\n";
-    script += "CW SW{-> T2};\n";
-    script += "CW PERIOD{-> T3};\n";
-    script += "CW COMMA{-> T4};\n";
-    script += "}\n";
-    CAS cas = null;
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { FSTBlockExtension.class.getName() });
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(0, ai.size());
-
-    t = RutaTestUtils.getTestType(cas, 2);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(5, ai.size());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/fst/TimeTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/fst/TimeTest.java
deleted file mode 100644
index 08eb1e7..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/block/fst/TimeTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.apache.uima.util.FileUtils;
-import org.junit.Test;
-
-public class TimeTest {
-
-  private static final int numOfTests = 1;
-
-  private static final String rulesPositive = "CW CW CW CW{-> T1};\n" + "CW CW CW SW{-> T2};\n"
-          + "CW CW CW CW CW{-> T3};\n" + "CW CW CW CW SW{-> T4};\n";
-
-  private static final String rulesAverage = "COLON CW {-> T1};\n"
-          + "W COLON {-> MARK(T2, 1, 1)};\n" + "T1 T2 {-> MARK(T3, 1, 2)};\n"
-          + "T1 W T2 {-> MARK(T3, 1, 3)};\n" + "T1 W W T2 {-> MARK(T3, 1, 4)};\n"
-          + "T1 W W W T2 {-> MARK(T3, 1, 5)};\n";
-
-  private static final String rulesNegative = "SW CW CW CW{-> T1};\n" + "W CW CW CW{-> T2};\n"
-          + "COLON CW CW CW{-> T3};\n" + "PERIOD CW CW CW{-> T4};\n";
-
-  @Test
-  public void test() throws URISyntaxException, IOException {
-    URL resource = TimeTest.class.getResource("text.txt");
-    File file = new File(resource.toURI());
-    String text = FileUtils.file2String(file, "UTF-8");
-
-    testTime(text, rulesPositive, "optimal");
-    testTime(text, rulesAverage, "normal");
-    testTime(text, rulesNegative, "worst-case");
-  }
-
-  public void testTime(String text, String rules, String test) {
-    String scriptNormal = rules;
-    long timeNormal = 0;
-    applyScript(text, scriptNormal);
-    for (int i = 0; i < numOfTests; i++) {
-      timeNormal += applyScript(text, scriptNormal);
-    }
-
-    String scriptDynamic = "Document{-> DYNAMICANCHORING(true)}" + rules;
-    long timeDynamic = 0;
-    applyScript(text, scriptDynamic);
-    for (int i = 0; i < numOfTests; i++) {
-      timeDynamic += applyScript(text, scriptDynamic);
-    }
-
-    String scriptFST = "FST Document{}{\n" + rules + "}\n";
-    long timeFST = 0;
-    applyScript(text, scriptFST);
-    for (int i = 0; i < numOfTests; i++) {
-      timeFST += applyScript(text, scriptFST);
-    }
-
-    System.out.println("Test " + test + ": " + "\n\tFST: \t\t" + (timeFST / (numOfTests * 1000.))
-            + "\n\tNormal w/o DA:\t" + (timeNormal / (numOfTests * 1000.)) + "\n\tNormal w/  DA:\t"
-            + (timeDynamic / (numOfTests * 1000.)));
-    // assertTrue("FST not faster than normal execution", timeFST < timeNormal);
-  }
-
-  private long applyScript(String text, String script) {
-    CAS cas;
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { FSTBlockExtension.class.getName() });
-    try {
-      long startTime = System.currentTimeMillis();
-      cas = RutaTestUtils.getCAS(text);
-      Ruta.apply(cas, script, parameters);
-      long endTime = System.currentTimeMillis();
-      return endTime - startTime;
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-    return 0;
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/FirstCharToUpperCaseStringFunctionTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/FirstCharToUpperCaseStringFunctionTest.java
deleted file mode 100644
index 09cc4b2..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/FirstCharToUpperCaseStringFunctionTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.ruta.string;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class FirstCharToUpperCaseStringFunctionTest {
-  @Test
-  public void test() {
-    String document = "peter markus test Peter Markus Test";
-    String script = "STRING s;\n";
-    script += "STRINGLIST sl;\n";
-    script += "SW{-> MATCHEDTEXT(s), ADD(sl, firstCharToUpperCase(s))};\n";
-    script += "CW{INLIST(sl) -> T1};";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { StringOperationsExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(3, ai.size());
-    iterator = ai.iterator();
-    assertEquals("Peter", iterator.next().getCoveredText());
-    assertEquals("Markus", iterator.next().getCoveredText());
-    assertEquals("Test", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ReplaceAllStringFunctionTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ReplaceAllStringFunctionTest.java
deleted file mode 100644
index 8fdbab8..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ReplaceAllStringFunctionTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.ruta.string;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ReplaceAllStringFunctionTest {
-  @Test
-  public void test() {
-    String document = "Meter  test peter Kenny Motor";
-    String script = "STRING s;\n";
-    script += "STRINGLIST sl;\n";
-    script += "CW{-> MATCHEDTEXT(s), ADD(sl, replaceAll(s,\"e\",\"o\"))};\n";
-    script += "CW{INLIST(sl) -> T1};";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { StringOperationsExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("Motor", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ReplaceFirstStringFunctionTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ReplaceFirstStringFunctionTest.java
deleted file mode 100644
index f8d5c8c..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ReplaceFirstStringFunctionTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.ruta.string;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ReplaceFirstStringFunctionTest {
-  @Test
-  public void test() {
-    String document = "Berserker Barserker Barsarkar Barserkar";
-    String script = "STRING s;\n";
-    script += "STRINGLIST sl;\n";
-    script += "CW{-> MATCHEDTEXT(s), ADD(sl, replaceFirst(s,\"er\",\"ar\"))};\n";
-    script += "CW{INLIST(sl) -> T1};";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { StringOperationsExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(2, ai.size());
-    iterator = ai.iterator();
-    assertEquals("Barserker", iterator.next().getCoveredText());
-    assertEquals("Barsarkar", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-
-
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/SubstringStringFunctionTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/SubstringStringFunctionTest.java
deleted file mode 100644
index c2a1fc5..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/SubstringStringFunctionTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.ruta.string;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class SubstringStringFunctionTest {
-  @Test
-  public void test() {
-    String document = "Millimeter meter  test peter Kenny Motor";
-    String script = "STRING s;\n";
-    script += "STRINGLIST sl;\n";
-    script += "CW{-> MATCHEDTEXT(s), ADD(sl, substring(s,5,10))};\n";
-    script += "SW{INLIST(sl) -> T1};";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { StringOperationsExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("meter", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-
-
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ToLowerCaseStringFunctionTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ToLowerCaseStringFunctionTest.java
deleted file mode 100644
index c570218..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ToLowerCaseStringFunctionTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.ruta.string;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ToLowerCaseStringFunctionTest {
-
-  @Test
-  public void test() {
-    String document = "Peter Markus test peter markus test";
-    String script = "STRING s;\n";
-    script += "STRINGLIST sl;\n";
-    script += "CW{-> MATCHEDTEXT(s), ADD(sl, toLowerCase(s))};\n";
-    script += "SW{INLIST(sl) -> T1};";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { StringOperationsExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(2, ai.size());
-    iterator = ai.iterator();
-    assertEquals("peter", iterator.next().getCoveredText());
-    assertEquals("markus", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ToUpperCaseStringFunctionTest.java b/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ToUpperCaseStringFunctionTest.java
deleted file mode 100644
index 5ccb105..0000000
--- a/trunk/ruta-core-ext/src/test/java/org/apache/uima/ruta/string/ToUpperCaseStringFunctionTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.ruta.string;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ToUpperCaseStringFunctionTest {
-  @Test
-  public void test() {
-    String document = "Peter Markus test PETER MARKUS test";
-    String script = "STRING s;\n";
-    script += "STRINGLIST sl;\n";
-    script += "CW{-> MATCHEDTEXT(s), ADD(sl, toUpperCase(s))};\n";
-    script += "CAP{INLIST(sl) -> T1};";
-
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
-            new String[] { StringOperationsExtension.class.getName() });
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, parameters);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(2, ai.size());
-    iterator = ai.iterator();
-    assertEquals("PETER", iterator.next().getCoveredText());
-    assertEquals("MARKUS", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core-ext/src/test/resources/org/apache/uima/ruta/block/fst/text.txt b/trunk/ruta-core-ext/src/test/resources/org/apache/uima/ruta/block/fst/text.txt
deleted file mode 100644
index 5d88e8f..0000000
--- a/trunk/ruta-core-ext/src/test/resources/org/apache/uima/ruta/block/fst/text.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-Constraint-driven Evaluation in UIMA Ruta 
-Andreas Wittek1, Martin Toepfer1, Georg Fette12 , 
-Peter Kluegl12, and Frank Puppe1 
-
-1 Department of Computer Science VI, University of Wuerzburg, 
-Am Hubland, Wuerzburg, Germany 
-2 Comprehensive Heart Failure Center, University of Wuerzburg, 
-Straubmuehlweg 2a, Wuerzburg, Germany 
-
-{a.wittek,toepfer,fette,pkluegl,puppe}@informatik.uni-wuerzburg.de 
-Abstract. This paper presents an extension of the UIMA Ruta Work­bench for estimating the quality of arbitrary information extraction mod­els on unseen documents. The user can specify expectations on the do­main in the form of constraints, which are applied in order to predict the F1 score or the ranking. The applicability of the tool is illustrated in a case study for the segmentation of references, which also examines the robustness for di.erent models and documents. 
-1 Introduction 
-Apache UIMA [5] and the surrounding ecosystem provide a powerful framework for engineering state-of-the-art Information Extraction (IE) systems, e.g., in the medical domain [13]. Two main approaches for building IE models can be dis­tinguished. One approach is based on manually de.ning a set of rules, e.g., with UIMA Ruta3 (Rule-based Text Annotation) [7]4 , that is able to identify the interesting information or annotations of speci.c types. A knowledge engineer writes, extends, re.nes and tests the rules on a set of representative documents. The other approach relies on machine learning algorithms, such as probabilis­tic graphical models like Conditional Random Fields (CRF) [10]. Here, a set of annotated gold documents is used as a training set in order to estimate the parameters of the model. The resulting IE system of both approaches, the sta­tistical model and the set of rules, is evaluated on an additional set of annotated documents in order to estimate its accuracy or F1 score, which is then assumed to hold for the application in general. However, while the system performed well in the evaluation setting, its accuracy decreases when applied on unseen docu­ments, maybe because the set of documents applied for developing the IE system was not large or not representative enough. In order to estimate the actual per­formance, either more data is labeled or the results are manually checked by a human, who is able to validate the correctness of the annotations. 
-Annotated documents are essential for developing IE systems, but there is a natural lack of labeled data in most application domains and its creation is 
-3 http://uima.apache.org/ruta.html 
-4 previously published as TextMarker 
-
-Andreas Wittek et al. 
-error-prone, cumbersome and time-consuming as is the manual validation. An automatic estimation of the IE system’s quality on unseen documents would therefore provide many advantages. A human is able to validate the created annotations using background knowledge and expectations on the domain. This kind of knowledge is already used by current research in order to improve the IE models (c.f. [1, 6, 11]), but barely to estimate IE system’s quality. 
-This paper introduces an extension of the UIMA Ruta Workbench for exactly this use case: Estimating the quality and performance of arbitrary IE models on unseen documents. The user can specify expectations on the domain in the form of constraints thus the name Constraint-driven Evaluation (CDE). The constraints rate speci.c aspects of the labeled documents and are aggregated to a single cde score, which provides a simple approximation of the evalua­tion measure, e.g., the token-based F1 score. The framework currently supports two di.erent kinds of constraints: Simple UIMA Ruta rules, which express spe­ci.c expectations concerning the relationship of annotations, and annotation-distribution constraints, which rate the coverage of features. We distinguish two tasks: predicting the actual F1 score of a document and estimating the ranking of the documents speci.ed by the actual F1 score. The former task can give answers on how good the model performs. The latter task points to documents where the IE model can be improved. We evaluate the proposed tool in a case study for the segmentation of scienti.c references, which tries to estimate the F1 score of a rule-based system. The expectations are additionally applied on documents of a di.erent distribution and on documents labeled by a di.erent IE model. The results emphasize the advantages and usability of the approach, which works already with minimal e.orts due to a simple fact: It is much easier to estimate how good a document is annotated than to actually identify the positions of defective or missing annotations. 
-The rest of the paper is structured as follows. In the upcoming section, we describe how our work relates to other .elds of Information Extraction research. We explain the proposed CDE approach in Section 3. Section 4 covers the case study and the corresponding results. We conclude with pointers to future work in Section 5. 
-2 Related Work 
-Besides standard classi.cation methods, which .t all model parameters against the labeled data of the supervised setting, there have been several e.orts to incorporate background knowledge from either user expectations or external data analysis. Bellare et al. [1], Gra¸ca et al. [6] and Mann and McCallum [11], for example, showed how moments of auxiliary expectation functions on unlabeled data can be used for such a purpose with special objective functions and an alternating optimization procedure. Our work on constraint-driven evaluation is partly inspired by this idea, however, we address a di.erent problem. We suggest to use auxiliary expectations to estimate the quality of classi.ers on unseen data. 
-Constraint-driven Evaluation in UIMA Ruta 
-A classi.er’s con.dence describes the degree to which it believes that its own decisions are correct. Several classi.ers provide intrinsic measures of con­.dence, for example, naive Bayes classi.ers. Culotta and McCallum [4], for in­stance, studied con.dence estimation for information extraction. They focus on predictions about .eld and record correctness of single instances. Their main motivation is to .lter high precision results for database population. Similar to CDE, they use background knowledge features like record length, single .eld la­bel assignments and .eld con.dence values to estimate record con.dence. CDE generalizes common con.dence estimation because the goal of CDE is the esti­mation of the quality of arbitrary models. 
-Active learning algorithms are able to choose the order in which training examples are presented in order to improve learning, typically by selective sam­pling [2]. While the general CDE setting does not necessarily contain aspects of selective sampling, consider for example the batch F1 score prediction task, the ranking task can be used as a selective sampling strategy in applications to .nd instances that support system refactoring. The focus of the F1 ranking task, however, still di.ers from active learning goals which is essential for the design of such systems. Both approaches are supposed to favor di.erent tech­niques to .t their di.erent objectives. Popular active learning approaches such as density-weighting (e.g., [12]) focus on dense regions of the input distribution. CDE, however, tries to estimate the quality of the model on the whole data set and hence demands for di.erently designed methods. Despite their di.erences, the combination of active learning and CDE would be an interesting subject for future work. CDE may be used to .nd weak learners of ensembles and informa­tive instances for these learners. 
-3 Constraint-driven Evaluation 
-The Constraint-driven Evaluation (CDE) framework presented in this work al­lows the user to specify expectations about the domain in form of constraints. These constraints are applied on documents with annotations, which have been created by an information extraction model. The results of the constraints are aggregated to a single cde score, which re.ects how well the annotations ful.ll the user’s expectations and thus provide a predicted measurement of the model’s quality for these documents. The framework is implemented as an extension of the UIMA Ruta Workbench. Figure 1 provides a screenshot of the CDE per­spective, which includes di.erent views to formalize the set of constraints and to present the predicted quality of the model for the speci.ed documents. 
-We de.ne a constraint in this work as a function C : CAS . [0, 1], which returns a con.dence value for an annotated document (CAS) where high values indicates that the expectations are ful.lled. Two di.erent types of constraints are currently supported: Rule constraints are simple UIMA Ruta rules without actions and allow to specify sequential patterns or other relationships between annotations that need to be ful.lled. The result is basically the ratio of how often the rule has tried to match compared to how often the rule has actually 
-Andreas Wittek et al. 
-
-Fig. 1. CDE perspective in the UIMA Ruta Workbench. Bottom left: Expectations on the domain formalized as constraints. Top right: Set of documents and their cde scores. Bottom right: Results of the constraints for the selected document. 
-matched. An example for such a constraint is Document{CONTAINS(Author)};, which speci.es that each document must contain an annotation of the type Author. The second type of supported constraints are Annotation Distribution (AD) constraints (c.f. Generalized Expectations [11]). Here, the expected distri­bution of an annotation or word is given for the evaluated types. The result of the constraint is the cosine similarity of the expected and the observed presence of the annotation or word within annotations of the given types. A constraint like "Peter": Author 0.9, Title 0.1, for example, indicates that the word “Peter” should rather be covered by an Author annotation than by a Title an­notation. The set of constraints and their weights can be de.ned using the CDE Constraint view (c.f. Figure 1, bottom left). 
-For a given set of constraints C = {C1,C2...Cn} and corresponding weights w = {w1,w2, ..., wn}, the cde score for each document is de.ned by the weighted average: 
-n
-n
-1 
-cde = wi · Ci (1) 
-n 
-i 
-The cde scores for a set of documents may already be very useful as a report how well the annotations comply with the expectations on the domain. However, one can further distinguish two tasks for CDE: the prediction of the actual evaluation score of the model, e.g., the token-based F1 score, and the 
-Constraint-driven Evaluation in UIMA Ruta 
-prediction of the quality ranking of the documents. While the former task can give answers how good the model performs or whether the model is already good enough for the application, the latter task provides a useful tool for introspection: Which documents are poorly labeled by the model? Where should the model be improved? Are the expectations on the domain realistic? Due to the limited expressiveness of the aggregation function, we concentrate on the latter task. The cde scores for the annotated documents are depicted in the CDE Documents view (c.f. Figure 1, top right). The result of each constraint for the currently selected document is given in the CDE Results view (c.f. Figure 1, bottom right). 
-The development of the constraints needs to be supported by tooling in order to achieve an improved prediction in the intended task. If the user extends or re.nes the expectations on the domain, then a feedback whether the prediction has improved or deteriorated is very valuable. For this purpose, the framework provides functionality to evaluate the prediction quality of the constraints itself. Given a set of documents with gold annotations, the cde score of each document can be compared to the actual F1 score. Four measures are applied to evaluate the prediction quality of the constraints: the mean squared error, the Spearman’s rank correlation coe.cient, the Pearson correlation coe.cient and the cosine similarity. For optimizing the constraints to approximate the actual F1 score, the Pearson’s r is maximized, and for improving the predicted ranking, the Spearman’s . is maximized. If documents with gold annotations are available, then the F1 scores and the values of the four evaluation measures are given in the CDE Documents view (c.f. Figure 1, top right). 
-4 Case Study 
-The usability and advantages of the presented work are illustrated with a simple case study concerning the segmentation of scienti.c references, a popular domain for evaluating novel information extraction models. In this task, the information extraction model normally identi.es about 12 di.erent entities of the reference string, but in this case study we limited the relevant entities to Author, Title and Date, which are commonly applied in order to identify the cited publication. 
-In the main scenario of the case study, we try to estimate the extraction quality of a set of UIMA Ruta rules that shall identify the Author, Title and Date of a reference string. For this purpose, we de.ne constraints representing the background knowledge about the domain for this speci.c set of rules. Addi­tionally to this main setting of the case study, we also measure the prediction of the constraints in two di.erent scenarios: In the .rst one, the documents have been labeled not by UIMA Ruta rules, but by a CRF model [10]. The CRF model was trained with a limited amount of iterations in a 5-fold manner. In a second scenario, we apply the UIMA Ruta rules on a set of documents of a di.erent distribution including unknown style guides. 
-Table 1 provides an overview of the applied datasets. We make use of the references dataset of [9]. This data set is homogeneously divided in three sub-datasets with respect to their style guides and amount of references, which are 
-Andreas Wittek et al. Table 1. Overview of utilized datasets. Druta 219 references in 8 documents used to develop the set of UIMA Ruta rules. 
-Ddev 192 references in 8 documents labeled by the UIMA Ruta rules and applied for developing the constraints. 
-Dtest 155 references in 7 documents labeled by the UIMA Ruta rules and applied to evaluate the constraints. 
-Dcrf Druta, Ddev and Dtest (566 references in 23 documents) labeled by a (5-fold) CRF model. 
-Dgen  452 references in 28 documents from a di.erent source with unknown style guides labeled by the UIMA Ruta rules. 
-applied to develop the UIMA Ruta rules, de.ne the set of constraints, and to eval­uate the prediction of the constraints compared to the actual F1 score. The CRF model is trained on the partitions given in [9]. The last dataset Dgen consists of a mixture of the datasets Cora, CiteSeerX and FLUX-CiM described in [3] generated by the rearrangement of [8]. 
-Table 2. Overview of evaluated sets of constraints. 
-Cruta   15 Rule constraints describing general expectations for the entities 
-Author, Title and Date. The weight of each constraint is set to 1. 
-
-Cruta+bib   Cruta extended with one additional AD constraint covering the entity-distribution of words extracted from Bibsonomy. The weight of each constraint is set to 1. 
-Cruta+5xbib   Same set of constraints as in Cruta+bib, but the weight of the additional 
-AD constraint is set to 5. 
-
-Table 2 provides an overview of the di.erent sets of constraints, whose pre­dictions are compared to the actual F1 score. First, we extended and re.ned a set of UIMA Ruta rules until they achieved an F1 score of 1.0 on the dataset Druta. Then, 15 Rule constraints Cruta 5 have been speci.ed using the dataset Ddev. The de.nition of the UIMA Ruta rules took about two hours and the def­inition of the constraints about one hour. Additionally to the Rule constraints, we created an AD constraint, which consists of the entity distribution of words that occurred at least 1000 times in the latest Bibtex database dump of Bibson­
-6
-omy. The set of constraints Cruta+bib and Cruta+5xbib combine both types of constraints with di.erent weighting. 
-Table 3 contains the evaluation, which compares the predicted cde score to the actual token-based F1 score for each document. We apply two di.erent 
-5   The actual implementation of the constraints as UIMA Ruta rules is depicted in Figure 1 (lower left part). 
-6 http://www.kde.cs.uni-kassel.de/bibsonomy/dumps 
-Constraint-driven Evaluation in UIMA Ruta 
-Table 3. Spearman’s . and Pearson’s r given for the predicted cde score (for each document) compared to the actual F1 score. 
-Cruta  Cruta+bib  Cruta+5xbib  
-Dataset  .  r  .  r  .  r  
-Ddev  0.8708  0.9306  0.9271  0.9405  0.8051  0.6646  
-Dtest  0.9615  0.9478  0.9266  0.8754  0.8154  0.6758  
-Dcrf  0.6793  0.7881  0.7429  0.8011  0.7117  0.7617  
-Dgen  0.7089  0.8002  0.7724  0.8811  0.8150  0.9504  
-
-correlation coe.cients for measuring the quality of the prediction: Spearman’s . gives an indication about the ranking of the documents and Pearson’s r provides a general measure of linear dependency. 
-Although the expectations de.ned by the sets of constraints are limited and quite minimalistic covering mostly only common expectations, the results indi­cate that they can be useful in any scenario. The results for dataset Ddev are only given for completeness since this dataset was applied to de.ne the set of constraints. The results for the dataset Dtest, however, re.ect the prediction on unseen documents of the same distribution. The ranking of the documents was almost perfectly estimated with a Spearman’s . of 0.96157. The coe.cients for the other scenarios Dcrf and Dgen are considerably decreased, but the cde scores are nevertheless very useful for an assessment of the extraction model’s quality. The .ve worst documents in Dgen (including new style guides), for ex­ample, have been reliably detected. The results show that the AD constraints can improve the prediction, but do not exploit their full potential in the current implementation. The impact measured for the dataset Dcrf is not as distinctive since the CRF model already includes such features and thus is able to avoid errors that are detected by these constraints. However, the prediction in the dataset Dgen is considerably improved. The UIMA Ruta rules produce severe errors in documents with new style guides, which are easily detected by the word distribution. 
-5 Conclusions 
-This paper presented a tool for the UIMA community implemented in UIMA Ruta, which enables to estimate the extraction quality of arbitrary models on unseen documents. Its introspective report is able to improve the development of information extraction models already with minimal e.orts. This is achieved by formalizing the background knowledge about the domain with di.erent types of constraints. We have shown the usability and advantages of the approach in a case study about segmentation of references. Concerning future work, many prospects for improvements remain, for example a logistic regression model for 
-7 The actual cde and F1 scores of Dtest are depicted in Figure 1 (right part) Andreas Wittek et al. 
-approximating the scores of arbitrary evaluation measures, new types of con­straints, or approaches to automatically acquire the expectations on a domain. 
-Acknowledgments This work was supported by the Competence Network Heart Failure, funded by the German Federal Ministry of Education and Re­search (BMBF01 EO1004). 
-References 
-1.  
-Bellare, K., Druck, G., McCallum, A.: Alternating Projections for Learning with Expectation Constraints. In: Proceedings of the Twenty-Fifth Conference on Un­certainty in AI. pp. 43–50. AUAI Press (2009) 
-
-2.  
-Cohn, D., Atlas, L., Ladner, R.: Improving generalization with active learning. Machine Learning 15, 201–221 (1994) 
-
-3.  
-Councill, I., Giles, C.L., Kan, M.Y.: ParsCit: an Open-source CRF Reference String Parsing Package. In: Proceedings of the Sixth International Language Resources and Evaluation (LREC’08). ELRA, Marrakech, Morocco (2008) 
-
-4.  
-Culotta, A., McCallum, A.: Con.dence Estimation for Information Extraction. In: Proceedings of HLT-NAACL 2004: Short Papers. pp. 109–112. HLT-NAACL-Short ’04, Association for Computational Linguistics, Stroudsburg, PA, USA (2004) 
-
-5.  
-Ferrucci, D., Lally, A.: UIMA: An Architectural Approach to Unstructured In­formation Processing in the Corporate Research Environment. Natural Language Engineering 10(3/4), 327–348 (2004) 
-
-6.  
-Graca, J., Ganchev, K., Taskar, B.: Expectation Maximization and Posterior Con­straints. In: Platt, J., Koller, D., Singer, Y., Roweis, S. (eds.) NIPS 20, pp. 569–576. MIT Press, Cambridge, MA (2008) 
-
-7.  
-Kluegl, P., Atzmueller, M., Puppe, F.: TextMarker: A Tool for Rule-Based Informa­tion Extraction. In: Chiarcos, C., de Castilho, R.E., Stede, M. (eds.) Proceedings of the 2nd UIMA@GSCL Workshop. pp. 233–240. Gunter Narr Verlag (2009) 
-
-8.  
-Kluegl, P., Hotho, A., Puppe, F.: Local Adaptive Extraction of References. In: 33rd Annual German Conference on Arti.cial Intelligence (KI 2010). Springer (2010) 
-
-9.  
-Kluegl, P., Toepfer, M., Lemmerich, F., Hotho, A., Puppe, F.: Collective Infor­mation Extraction with Context-Speci.c Consistencies. In: Flach, P.A., Bie, T.D., Cristianini, N. (eds.) ECML/PKDD (1). Lecture Notes in Computer Science, vol. 7523, pp. 728–743. Springer (2012) 
-
-10.   
-La.erty, J., McCallum, A., Pereira, F.: Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data. Proc. 18th International Conf. on Machine Learning pp. 282–289 (2001) 
-
-11.   
-Mann, G.S., McCallum, A.: Generalized Expectation Criteria for Semi-Supervised Learning with Weakly Labeled Data. J. Mach. Learn. Res. 11, 955–984 (2010) 
-
-12.   
-McCallum, A., Nigam, K.: Employing EM and Pool-Based Active Learning for Text Classi.cation. In: Shavlik, J.W. (ed.) ICML. pp. 350–358. Morgan Kaufmann (1998) 
-
-13.   
-Savova, G.K., Masanz, J.J., Ogren, P.V., Zheng, J., Sohn, S., Kipper-Schuler, K.C., Chute, C.G.: Mayo clinical Text Analysis and Knowledge Extraction System (cTAKES): architecture, component evaluation and applications. Journal of the American Medical Informatics Association : JAMIA 17(5), 507–513 (Sep 2010) 
-
-
-
diff --git a/trunk/ruta-core/pom.xml b/trunk/ruta-core/pom.xml
deleted file mode 100644
index a7ec6c4..0000000
--- a/trunk/ruta-core/pom.xml
+++ /dev/null
@@ -1,212 +0,0 @@
-<?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. -->

-

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-core</artifactId>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-    <postNoticeText>${uniWueNoticeText}</postNoticeText>

-  </properties>

-  <url>${uimaWebsiteUrl}</url>

-  <description>The core implementation of the UIMA Ruta rule engine.</description>

-  <name>Apache UIMA Ruta: ${project.artifactId}</name>

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimaj-core</artifactId>

-      <version>${uimaVersion}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>4.5</version>

-      <scope>test</scope>

-    </dependency>

-   <dependency>

-      <groupId>org.antlr</groupId>

-      <artifactId>antlr-runtime</artifactId>

-      <version>3.5.2</version>

-      <exclusions>

-        <exclusion>

-          <groupId>org.antlr</groupId> 

-          <artifactId>stringtemplate</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

-    <dependency>

-      <groupId>org.htmlparser</groupId>

-      <artifactId>htmlparser</artifactId>

-      <version>1.6</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-collections</groupId>

-      <artifactId>commons-collections</artifactId>

-      <version>3.2.1</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimaj-tools</artifactId>

-      <version>${uimaVersion}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimaj-test-util</artifactId>

-      <version>${uimaVersion}</version>

-      <scope>test</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimafit-core</artifactId>

-      <version>2.1.0</version>

-      <!-- Exclude aop stuff, which is not need by uimafit 

-      and only introduces a non-asl license -->

-      <exclusions>

-        <exclusion>

-          <groupId>org.springframework</groupId> 

-          <artifactId>spring-aop</artifactId>

-        </exclusion>

-        <exclusion>

-          <groupId>aopalliance</groupId> 

-          <artifactId>aopalliance</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

-    <!-- needed for ruta-ep-ide - TODO this should be moved to engine? -->

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>2.4</version>

-    </dependency>

-    <!-- needed for ruta-ep-textruler/ruta-ep-addons - TODO this should be moved to engine? -->

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-math3</artifactId>

-      <version>3.0</version>

-    </dependency>

-

-  </dependencies>

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-core</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-core</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-core</developerConnection>

-  </scm>

-  <build>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>src/main/java/org/apache/uima/ruta/type/*.java</exclude> <!-- jcasgen files -->

-                  <exclude>src/main/antlr3/org/apache/uima/ruta/parser/RutaLexer.tokens</exclude> <!-- grammar tokens -->

-                  <exclude>src/main/antlr3/org/apache/uima/ruta/parser/RutaParser.tokens</exclude> <!-- grammar tokens -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/*.txt</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/*.ruta</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/action/*.*</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/table2.csv</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/condition/*.txt</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/condition/*.ruta</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/seed/*.txt</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/seed/*.ruta</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/engine/*.html</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/engine/*.ruta</exclude> <!-- test data -->

-                  <exclude>src/test/resources/org/apache/uima/ruta/engine/*.txt</exclude> <!-- test data -->

-                  <exclude>src/test/resources/META-INF/org.apache.uima.fit/types.txt</exclude> <!-- test data -->

-                  <exclude>src/main/resources/META-INF/org.apache.uima.fit/*.txt</exclude>

-                  <exclude>issuesFixed/**</exclude> <!-- generated -->

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-    <resources>

-      <resource>

-        <directory>src/main/resources</directory>

-      </resource>

-    </resources>

-    <plugins>

-      <!-- generate java code for antlr grammars -->

-      <plugin>

-        <groupId>org.antlr</groupId>

-        <artifactId>antlr3-maven-plugin</artifactId>

-        <version>3.5.2</version>

-        <executions>

-          <execution>

-            <id>run antlr</id>

-            <phase>generate-sources</phase>

-            <goals>

-              <goal>antlr</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-      <plugin>

-        <groupId>org.codehaus.mojo</groupId>

-        <artifactId>build-helper-maven-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>add-source</id>

-            <phase>generate-sources</phase>

-            <goals>

-              <goal>add-source</goal>

-            </goals>

-            <configuration>

-              <sources>

-                <source>${basedir}/target/generated-sources/antlr3

-                </source>

-              </sources>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-surefire-plugin</artifactId>

-        <configuration>

-          <argLine>-Xmx650M</argLine>

-        </configuration>

-      </plugin>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-javadoc-plugin</artifactId>

-        <configuration>

-          <!-- Exclude generated jcas classes -->

-          <sourceFileExcludes>

-            <sourceFileExclude>**/org/apache/uima/ruta/type/*.java</sourceFileExclude>

-          </sourceFileExcludes>

-        </configuration>

-      </plugin>

-    </plugins>

-  </build>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaLexer.g b/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaLexer.g
deleted file mode 100644
index 19ac9d4..0000000
--- a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaLexer.g
+++ /dev/null
@@ -1,555 +0,0 @@
-lexer grammar RutaLexer;

-options {

-	language = Java;

-}

-

-

-tokens {

-	DocComment;

-	Annotation;

-	ListIdentifier;

-}

-

-@lexer::header {

-/*

- * 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.ruta.parser;

-}

-

-@lexer::members {

-	public int implicitLineJoiningLevel = 0;

-	public int startPos=-1;

-	public void emitErrorMessage(String msg) {

-	}

-}

-

-

-TRIE

-	:	'TRIE'

-	;

-

-CONTAINS

-	:	'CONTAINS'

-	;

-

-DECLARE

-	:	'DECLARE'

-	;

-

-WORDLIST

-	:	'WORDLIST'

-	;

-

-WORDTABLE

-	:	'WORDTABLE'

-	;

-

-RESOURCE

-  : 'RESOURCE'

-  ;

-

-AND

-	:	'AND'

-	;

-

-CONTEXTCOUNT

-	:	'CONTEXTCOUNT'

-	;

-

-COUNT

-	:	'COUNT'

-	;

-

-TOTALCOUNT

-	:	'TOTALCOUNT'

-	;

-

-CURRENTCOUNT

-	:	'CURRENTCOUNT'

-	;

-

-INLIST

-	:	'INLIST'

-	;

-

-

-LAST

-	:	'LAST'

-	;

-

-MOFN

-	:	'MOFN'

-	;

-

-NEAR

-	:	'NEAR'

-	;

-

-OR

-	:	'OR'

-	;

-

-PARTOF

-	:	'PARTOF'

-	;

-	

-PARTOFNEQ

-	:	'PARTOFNEQ'

-	;

-

-POSITION

-	:	'POSITION'

-	;

-

-REGEXP

-	:	'REGEXP'

-	;

-

-SCORE

-	:	'SCORE'

-	;

-

-VOTE

-	:	'VOTE'

-	;

-

-IF

-	:	'IF'

-	;

-

-FEATURE

-	:	'FEATURE'

-	;

-

-PARSE

-	:	'PARSE'

-	;

-

-CREATE

-	:	'CREATE'

-	;

-

-GATHER

-	:	'GATHER'

-	;

-

-FILL

-	:	'FILL'

-	;

-

-ATTRIBUTE

-	:	'ATTRIBUTE'

-	;

-

-COLOR

-	:	'COLOR'

-	;

-

-DEL

-	:	'DEL'

-	;

-

-LOG

-	:	'LOG'

-	;

-

-MARK

-	:	'MARK'

-	;

-

-MARKSCORE

-	:	'MARKSCORE'

-	;

-

-MARKONCE

-	:	'MARKONCE'

-	;

-

-MARKFAST

-	:	'MARKFAST'

-	;

-	

-MARKTABLE

-	:	'MARKTABLE'

-	;

-	

-MARKLAST

-	:	'MARKLAST'

-	;

-	

-MARKFIRST

-	:	'MARKFIRST'

-	;

-

-REPLACE

-	:	'REPLACE'

-	;

-

-RETAINTYPE

-	:	'RETAINTYPE'

-	;

-

-FILTERTYPE

-	:	'FILTERTYPE'

-	;

-

-CALL

-	:	'CALL'

-	;

-

-

-EXEC

-	:	'EXEC'

-	;

-

-CONFIGURE

-	:	'CONFIGURE'

-	;

-

-ASSIGN

-	:	'ASSIGN'

-	;

-

-SETFEATURE

-	:	'SETFEATURE'

-	;

-

-GETFEATURE

-	:	'GETFEATURE'

-	;

-

-UNMARK

-	:	'UNMARK'

-	;

-

-UNMARKALL

-	:	'UNMARKALL'

-	;

-

-TRANSFER

-	:	'TRANSFER'

-	;

-

-

-SHIFT 	

-	:	'SHIFT'	 

-	;

-

-DYNAMICANCHORING 	

-	:	'DYNAMICANCHORING'	 

-	;

-

-GREEDYANCHORING 	

-	:	'GREEDYANCHORING'	 

-	;

-

-TRIM

-  : 'TRIM'

-  ;

-

-BEFORE

-	:	'BEFORE'

-	;

-

-AFTER

-	:	'AFTER'

-	;

-

-IS 	

-	:	'IS'	 

-	;

-

-

-STARTSWITH 	

-	:	'STARTSWITH'	 

-	;

-

-ENDSWITH 	

-	:	'ENDSWITH'	 

-	;

-

-ADDRETAINTYPE

-  : 'ADDRETAINTYPE'

-  ;

-

-REMOVERETAINTYPE

-  : 'REMOVERETAINTYPE'

-  ;

-

-ADDFILTERTYPE

-  : 'ADDFILTERTYPE'

-  ;

-

-REMOVEFILTERTYPE

-  : 'REMOVEFILTERTYPE'

-  ;

-

-NOT

-	:	'NOT'

-	;

-

-ADD	:	'ADD';

-REMOVE	:	'REMOVE';

-REMOVEDUPLICATE	:	'REMOVEDUPLICATE';

-MERGE 	:	'MERGE';

-GET	:	'GET';

-GETLIST	:	'GETLIST';

-SIZE	:	'SIZE';

-MATCHEDTEXT	:	'MATCHEDTEXT';

-REMOVESTRING	:	'REMOVESTRING';

-CLEAR 	:	 'CLEAR';

-

-THEN 

-	: 	'->'

-	;

-THEN2 

-	: 	'<-'

-	;

-	

-LogLevel:

-	'finest' | 'finer' | 'fine' | 'config' | 'info' | 'warning' | 'severe'

-	;	

-

-OldColor 

-	: 'black' | 'maroon' | 'green' | 'olive' | 'navy' | 'purple' | 'teal' | 'gray' | 'silver' | 'red' | 'lime' | 'yellow' | 'blue' | 'fuchsia' | 'aqua'

-	;

-

-PackageString   :	'PACKAGE';

-ScriptString	:	'SCRIPT';

-EngineString	:	'ENGINE';

-UimafitString	:	'UIMAFIT';

-BlockString 	:	'BLOCK';

-TypeString 	:	'TYPE';

-IntString	:	'INT';

-DoubleString	:	'DOUBLE';

-FloatString	:	'FLOAT';

-StringString	:	'STRING';

-BooleanString	:	'BOOLEAN';

-TypeSystemString:	'TYPESYSTEM';

-ImportString    :   'IMPORT';

-FromString      :   'FROM';

-AsString        :   'AS';

-SymbolString	:	'SYMBOL';

-CONDITION	:	'CONDITION';	

-ACTION		:	'ACTION';

-BOOLEANLIST 

-	:	 'BOOLEANLIST';

-INTLIST :	'INTLIST';

-DOUBLELIST

-	:	 'DOUBLELIST';

-FLOATLIST

-	:	 'FLOATLIST';

-STRINGLIST

-	:	'STRINGLIST';	

-TYPELIST:	'TYPELIST';

-

-

-

-EXP 	:	'EXP';

-LOGN	:	'LOGN';

-SIN	:	'SIN';

-COS	:	'COS';

-TAN	:	'TAN';

-XOR	: 	'XOR';

-TRUE 	:	'true';

-FALSE 	:	'false';

-NULL : 'null';

-

-STARTANCHOR 

-	:	 '@';

-

-HexLiteral : '0' ('x'|'X') HexDigit+ IntegerTypeSuffix? ;

-

-DecimalLiteral : ('0' | '1'..'9' '0'..'9'*) IntegerTypeSuffix? ;

-

-OctalLiteral : '0' ('0'..'7')+ IntegerTypeSuffix? ;

-

-fragment

-HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;

-

-fragment

-IntegerTypeSuffix : ('l'|'L') ;

-

-FloatingPointLiteral

-    :   ('0'..'9')+ '.' ('0'..'9')* Exponent? FloatTypeSuffix?

-    |   '.' ('0'..'9')+ Exponent? FloatTypeSuffix?

-    //|   ('0'..'9')+ Exponent FloatTypeSuffix?

-    //|   ('0'..'9')+ Exponent? FloatTypeSuffix

-	;

-	

-fragment

-Exponent : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;

-

-fragment

-FloatTypeSuffix : ('f'|'F'|'d'|'D') ;

-

-CharacterLiteral

-    :   '\'' ( EscapeSequence | ~('\''|'\\') ) '\''

-    ;

-

-StringLiteral

-    :  '"' ( EscapeSequence | ~('\\'|'"') )* '"'

-    ;

-

-RessourceLiteral

-    :  '\'' ( EscapeSequence | ~('\\'|'\'') )* '\''

-    ;

-

-fragment

-EscapeSequence

-    :   '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')

-    |   UnicodeEscape

-    |   OctalEscape

-    ;

-

-fragment

-OctalEscape

-    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')

-    |   '\\' ('0'..'7') ('0'..'7')

-    |   '\\' ('0'..'7')

-    ;

-

-fragment

-UnicodeEscape

-    :   '\\' 'u' HexDigit HexDigit HexDigit HexDigit

-    ;

-

-	

-Identifier 

-    :   Letter (Letter|JavaIDDigit)*

-    ;

-

-

-fragment

-Letter

-    :  '\u0024' |

-       '\u0041'..'\u005a' |

-       '\u005f' |

-       '\u0061'..'\u007a' |

-       '\u00c0'..'\u00d6' |

-       '\u00d8'..'\u00f6' |

-       '\u00f8'..'\u00ff' |

-       '\u0100'..'\u1fff' |

-       '\u3040'..'\u318f' |

-       '\u3300'..'\u337f' |

-       '\u3400'..'\u3d2d' |

-       '\u4e00'..'\u9fff' |

-       '\uf900'..'\ufaff'

-    ;

-

-fragment

-JavaIDDigit

-    :  '\u0030'..'\u0039' |

-       '\u0660'..'\u0669' |

-       '\u06f0'..'\u06f9' |

-       '\u0966'..'\u096f' |

-       '\u09e6'..'\u09ef' |

-       '\u0a66'..'\u0a6f' |

-       '\u0ae6'..'\u0aef' |

-       '\u0b66'..'\u0b6f' |

-       '\u0be7'..'\u0bef' |

-       '\u0c66'..'\u0c6f' |

-       '\u0ce6'..'\u0cef' |

-       '\u0d66'..'\u0d6f' |

-       '\u0e50'..'\u0e59' |

-       '\u0ed0'..'\u0ed9' |

-       '\u1040'..'\u1049'

-   ;

-

-

-

-LPAREN	: '(' {implicitLineJoiningLevel++;} ;

-

-RPAREN	: ')' {implicitLineJoiningLevel--;} ;

-

-LBRACK	: '[' {implicitLineJoiningLevel++;} ;

-

-RBRACK	: ']' {implicitLineJoiningLevel--;} ;

-

-LCURLY	: '{' {implicitLineJoiningLevel++;} ;

-

-RCURLY	: '}' {implicitLineJoiningLevel--;} ;

-

-CIRCUMFLEX	: '^' ;

-

-DOT : '.' ;

-

-COLON 	: ':' ;

-

-COMMA	: ',' ;

-

-SEMI	: ';' ;

-

-PLUS	: '+' ;

-

-MINUS	: '-' ;

-

-STAR	: '*' ;

-

-SLASH	: '/' ;

-

-VBAR	: '|' ;

-

-AMPER	: '&' ;

-

-LESS	: '<' ;

-

-GREATER	: '>' ;

-

-ASSIGN_EQUAL	: '=' ;

-

-PERCENT	: '%' ;

-

-QUESTION	: '?' ;

-

-EQUAL	: '==' ;

-

-NOTEQUAL	: '!=' ;

-

-ALT_NOTEQUAL: '<>' ;

-

-LESSEQUAL	: '<=' ;

-

-

-GREATEREQUAL	: '>=' ;

-

-

-WILDCARD	: '#' ;

-

-WS  :  (' '|'\r'|'\t'|'\u000C'|'\n') {$channel=HIDDEN;}

-    ;

-

-

-

-

-

-

-

-COMMENT

-    :   '/*'{if (input.LA(1)=='*') $type=DocComment; else $channel=HIDDEN;} ( options {greedy=false;} : . )* '*/' 

-    ;

-

-LINE_COMMENT

-    : '//' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;}

-    ;

-

-

-

-    

diff --git a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaLexer.tokens b/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaLexer.tokens
deleted file mode 100644
index f97367c..0000000
--- a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaLexer.tokens
+++ /dev/null
@@ -1,163 +0,0 @@
-STAR=149

-FloatTypeSuffix=125

-OctalLiteral=123

-LOG=37

-CONTAINS=8

-REMOVE=72

-GREATEREQUAL=162

-MARKFAST=41

-CONDITION=102

-MATCHEDTEXT=78

-COUNT=14

-LOGN=111

-DYNAMICANCHORING=58

-NOT=70

-Identifier=135

-ACTION=103

-NOTEQUAL=159

-CLEAR=80

-VBAR=151

-DOUBLELIST=106

-ENDSWITH=65

-RPAREN=137

-CREATE=31

-GREATER=154

-SIN=112

-EXP=110

-CURRENTCOUNT=16

-COS=113

-TAN=114

-TYPELIST=109

-FloatString=94

-LESS=153

-REGEXP=25

-GET=75

-PARTOF=22

-UNMARK=54

-LAST=18

-COMMENT=165

-REMOVEDUPLICATE=73

-UNMARKALL=55

-RBRACK=139

-NEAR=20

-GREEDYANCHORING=59

-LINE_COMMENT=166

-IntegerTypeSuffix=120

-MARKSCORE=39

-REMOVESTRING=79

-TRANSFER=56

-LCURLY=140

-TRIE=7

-FILTERTYPE=47

-MARKFIRST=44

-STRINGLIST=108

-MARKONCE=40

-ScriptString=86

-EngineString=87

-WS=164

-WORDTABLE=11

-WORDLIST=10

-AutomataBlockString=90

-FromString=99

-FloatingPointLiteral=126

-STARTANCHOR=118

-INTLIST=105

-OR=21

-TRIM=60

-JavaIDDigit=134

-FLOATLIST=107

-CALL=48

-Annotation=5

-FALSE=117

-LESSEQUAL=161

-RessourceLiteral=130

-VOTE=27

-Letter=133

-EscapeSequence=127

-SIZE=77

-REMOVEFILTERTYPE=69

-LBRACK=138

-CharacterLiteral=128

-DEL=36

-ATTRIBUTE=34

-TypeString=91

-SHIFT=57

-Exponent=124

-THEN2=82

-ASSIGN_EQUAL=155

-RETAINTYPE=46

-TypeSystemString=97

-AND=12

-IntString=92

-ADDFILTERTYPE=68

-BlockString=89

-HexDigit=119

-COLOR=35

-LPAREN=136

-POSITION=24

-IF=28

-LogLevel=83

-CONFIGURE=50

-SLASH=150

-THEN=81

-FILL=33

-COMMA=145

-IS=63

-AMPER=152

-REPLACE=45

-GETLIST=76

-WILDCARD=163

-AsString=100

-EQUAL=158

-GATHER=32

-INLIST=17

-PLUS=147

-BooleanString=96

-GETFEATURE=53

-DOT=143

-ListIdentifier=6

-PARTOFNEQ=23

-BOOLEANLIST=104

-ADD=71

-MARKTABLE=42

-HexLiteral=121

-XOR=115

-PERCENT=156

-MARK=38

-PARSE=30

-PackageString=85

-OldColor=84

-MARKLAST=43

-MERGE=74

-CONTEXTCOUNT=13

-BEFORE=61

-EXEC=49

-ImportString=98

-MINUS=148

-AFTER=62

-DecimalLiteral=122

-SEMI=146

-TRUE=116

-FEATURE=29

-SymbolString=101

-COLON=144

-StringLiteral=129

-StringString=95

-SCORE=26

-QUESTION=157

-ADDRETAINTYPE=66

-UnicodeEscape=131

-RCURLY=141

-STARTSWITH=64

-ASSIGN=51

-REMOVERETAINTYPE=67

-TOTALCOUNT=15

-DECLARE=9

-UimafitString=88

-DocComment=4

-MOFN=19

-OctalEscape=132

-SETFEATURE=52

-DoubleString=93

-CIRCUMFLEX=142

-ALT_NOTEQUAL=160

diff --git a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaParser.g b/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaParser.g
deleted file mode 100644
index b5c956e..0000000
--- a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaParser.g
+++ /dev/null
@@ -1,2407 +0,0 @@
-parser grammar RutaParser;

-

-options {

-	language = Java;

-	tokenVocab = RutaLexer;

-}

-

-

-@parser::header {

-/*

- * 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.ruta.parser;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Stack;

-import java.util.TreeSet;

-

-import org.antlr.runtime.BaseRecognizer;

-import org.antlr.runtime.BitSet;

-import org.antlr.runtime.CommonToken;

-import org.antlr.runtime.DFA;

-import org.antlr.runtime.EarlyExitException;

-import org.antlr.runtime.FailedPredicateException;

-import org.antlr.runtime.IntStream;

-import org.antlr.runtime.MismatchedSetException;

-import org.antlr.runtime.NoViableAltException;

-import org.antlr.runtime.Parser;

-import org.antlr.runtime.RecognitionException;

-import org.antlr.runtime.RecognizerSharedState;

-import org.antlr.runtime.Token;

-import org.antlr.runtime.TokenStream;

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.UimaContext;

-

-import org.apache.uima.ruta.descriptor.*;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.action.ActionFactory;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.condition.ConditionFactory;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaModule;

-import org.apache.uima.ruta.RutaScriptBlock;

-import org.apache.uima.ruta.RutaScriptFactory;

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.expression.ExpressionFactory;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.BooleanListExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.NumberListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.string.StringFunctionFactory;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.extensions.RutaExternalFactory;

-import org.apache.uima.ruta.rule.AbstractRuleElement;

-import org.apache.uima.ruta.rule.ComposedRuleElement;

-import org.apache.uima.ruta.rule.RegExpRule;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementContainer;

-import org.apache.uima.ruta.rule.RuleElementIsolator;

-import org.apache.uima.ruta.rule.RutaRule;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-import org.apache.uima.ruta.rule.quantifier.RuleElementQuantifier;

-}

-

-@parser::members {

-private List vars = new ArrayList();	

-private int level = 0;

-private RutaScriptFactory factory = new RutaScriptFactory();

-private RutaExternalFactory external;

-private String namespace;

-private String moduleName;

-private ResourceManager resourceManager;

-private UimaContext context;

-

-private RutaDescriptorInformation descInfo;

-

-

-public void setDescriptorInformation(RutaDescriptorInformation descInfo) {

-  this.descInfo = descInfo;  

-}

-

-public RutaDescriptorInformation getDescriptorInformation() {

-  return descInfo;

-}

-

-public void setResourceManager(ResourceManager resourceManager) {

-  this.resourceManager = resourceManager;  

-}

-

-public void setExternalFactory(RutaExternalFactory factory) {

-	external = factory;

-}

-	public void setContext(UimaContext context){

-	    this.context = context;

-	    factory.setContext(context);

-	}

-

-	public void emitErrorMessage(String msg) {

-		System.out.println(msg);

-	}

-	 public void emitErrorMessage(RecognitionException e) {

-	    int foundInt = e.c;

-	    String stringFound = "<unknown token>";

-	    if(foundInt >= 0 && foundInt < getTokenNames().length) {

-	    	stringFound = getTokenNames()[foundInt];

-	    }

-	    int line = e.line;

-	    String text = e.token.getText();

-	

-   	    if (e instanceof NoViableAltException) {

-	      NoViableAltException nvae = (NoViableAltException) e;

-	      String msg = "Error in "+moduleName+",  line " + nvae.line + ", \"" + text + "\": found no viable alternative";

-	      emitErrorMessage(msg);

-	    } else if (e instanceof MismatchedTokenException) {

-	      MismatchedTokenException mte = (MismatchedTokenException) e;

-	      int expectedInt = mte.expecting;

-	      String stringExpected = getTokenNames()[expectedInt];

-	      String msg = "Error in "+moduleName+", line " + line + ", \"" + text + "\": expected " + stringExpected

-	              + ", but found " + stringFound;

-	      emitErrorMessage(msg);

-	    } else if (e instanceof MissingTokenException) {

-	      MissingTokenException mte = (MissingTokenException) e;

-    	      int missingType = mte.getMissingType();

-    	      String stringMissing = getTokenNames()[missingType];

-    	      String msg = "Error in "+moduleName+",  line " + line + ", \"" + text + "\": missing " + stringMissing

-                    + ", but found " + stringFound;

-    	      emitErrorMessage(msg);

-	    } else {

-	      emitErrorMessage(e.getMessage());

-	    }

-	  }

-	    

-	public void emitErrorMessage(Throwable e) {

-	      e.printStackTrace();

-	    }

-	

-	public void reportError(RecognitionException e) {

-		emitErrorMessage(e);

-	}

-

-	//public void addVariable(String var, IntStream input) throws NoViableAltException {

-	//	if(!vars.contains(var)) {

-	//		vars.add(var);

-	//	} else {

-	//		throw new NoViableAltException("already declared \"" + var + "\"", 3, 0, input);

-	//	}

-	//}

-	public void addVariable(RutaBlock parent, String name, String type) {

-		parent.getEnvironment().addVariable(name, type);

-	}

-	

-	public boolean ownsVariable(RutaBlock parent, String name) {

-		return parent.getEnvironment().ownsVariable(name);

-	}

-	public boolean isVariable(RutaBlock parent, String name) {

-		return parent.getEnvironment().isVariable(name);

-	}

-	

-	public void setValue(RutaBlock parent, List<String> names, Object obj) {

-		for(String name : names) {

-			setValue(parent,name,obj);

-		}

-	}

-	

-	public void setValue(RutaBlock parent, String name, Object obj) {

-		if(obj != null) {

-			Object value = parent.getEnvironment().getLiteralValue(name, obj);

-			parent.getEnvironment().setVariableValue(name, value);

-			parent.getEnvironment().setInitialVariableValue(name, value);

-		}

-	}

-	

-	public boolean ownsVariableOfType(RutaBlock parent, String name, String type) {

-		return parent.getEnvironment().ownsVariableOfType(name,type);

-	}

-	

-	public boolean isVariableOfType(RutaBlock parent, String name, String type) {

-		return parent.getEnvironment().isVariableOfType(name,type);

-	}

-	

-	/*

-	public void addType(RutaBlock parent, String type) {

-	    assert !moduleName.contains(".");

-	    assert !type.contains(".");

-

-	    String resolvedType = type;

-	    if (!type.contains(".")) {

-	        resolvedType = namespace + "." + moduleName + "." + type;

-	    }

-            parent.getEnvironment().declareType(resolvedType);

-            

-            if(descInfo!= null) {

-	            String descriptionString = null;

-		    if(StringUtils.isBlank(namespace)) {

-		       descriptionString = "Type defined in " + moduleName;

-		    } else {

-		       descriptionString = "Type defined in " + parent.getNamespace() + "." + moduleName;

-		    }

-		    String parentType = "uima.tcas.Annotation";

-		    

-		    descInfo.addType(parent.getNamespace()+"."+type.trim(), descriptionString, parentType);

-		}

-	}

-	*/

-	public void addType(RutaBlock parent, Token nameToken, Token parentTypeToken, List featureTypes,

-          List featureNames) {

-          String name = nameToken.getText();

-          String parentType = "uima.tcas.Annotation";

-          if(parentTypeToken != null) {

-          	parentType = parentTypeToken.getText();

-	  }

-	  String resolvedType = name;

-	  if (!name.contains(".")) {

-	    resolvedType = namespace + "." + moduleName + "." + name;

-	  }

-          parent.getEnvironment().declareType(resolvedType);

-	  if(descInfo != null) {

-		  name = parent.getNamespace() + "." + name.trim();

-		  String descriptionString = null;

-		  if(StringUtils.isBlank(namespace)) {

-			  descriptionString = "Type defined in " + moduleName;

-			  } else {

-			  descriptionString = "Type defined in " + parent.getNamespace();

-		  }

-		  descInfo.addType(name, descriptionString, parentType);

-		  if(featureTypes != null && featureNames != null) {

-			  for (int i = 0; i < featureTypes.size(); i++) {

-				  Object object = featureTypes.get(i);

-				  String ftype = (String) featureTypes.get(i);

-				  String fname = (String) featureNames.get(i);

-				  descInfo.addFeature(name, fname, fname, ftype);

-			  }

-		  }

-	  }

- 	 }

-	

-	public boolean isType(RutaBlock parent, String type) {

-		return parent.getEnvironment().getType(type) != null || type.equals("Document");

-	}

-	

-	public void checkVariable(String var, IntStream input) throws NoViableAltException {

-		if(!vars.contains(var)) {

-			throw new NoViableAltException("not declared \"" + var + "\"", 3, 0, input);

-		}

-	}

-	

-	public void addImportTypeSystem(RutaBlock parent, String descriptor) {

-		parent.getEnvironment().addTypeSystem(descriptor);

-		if(descInfo != null) {

-		  descInfo.addTypeSystem(descriptor);

-		}

-	}

-	public void addImportScript(RutaBlock parent, String namespace) {

-		parent.getScript().addScript(namespace, null);

-		if(descInfo != null) {

-		  descInfo.addScript(namespace);

-		}

-	}

-	public void addImportEngine(RutaBlock parent, String namespace) {

-		parent.getScript().addEngine(namespace, null);

-		if(descInfo != null) {

-		  descInfo.addEngine(namespace);

-		}

-	}

-	public void addImportUimafitEngine(RutaBlock parent, String namespace) {

-		parent.getScript().addUimafitEngine(namespace, null);

-		if(descInfo != null) {

-		  descInfo.addUimafitEngine(namespace);

-		}

-	}

-

-	/**

-	 * Import a type from a type system.

-	 *

-	 * @param parent - Block where the type should be imported.

-	 * @param typesystem - Typesystem from which to import the type.

-	 * @param qualifiedType - Type to import from the typesystem.

-	 */

-    public void importTypeFromTypeSystem(RutaBlock parent, String typesystem, String qualifiedType, Token alias) {

-        if (alias == null) {

-            parent.getEnvironment().importTypeFromTypeSystem(typesystem, qualifiedType);

-        } else {

-            parent.getEnvironment().importTypeFromTypeSystem(typesystem, qualifiedType, alias.getText());

-        }

-        if(descInfo != null) {

-          descInfo.addTypeSystem(typesystem);

-        }

-    }

-

-    /**

-     * Import a package from a type system.

-     *

-     * @param parent - Block where the type should be imported.

-     * @param typesystem - Typesystem from which to import the package or null to import it from the CAS typesystem.

-     * @param qualifiedPackage - Package to import from the typesystem.

-     * @param alias - Package alias.

-     */

-    public void importPackage(RutaBlock parent, String typesystem, String qualifiedPackage, Token alias) {

-        RutaEnvironment env = parent.getEnvironment();

-        String aliasText = alias != null? alias.getText() : null;

-        if (typesystem != null) {

-            env.importPackageFromTypeSystem(typesystem, qualifiedPackage, aliasText);

-        } else {

-            env.importPackage(qualifiedPackage, aliasText);

-        }

-        if(descInfo != null) {

-          descInfo.addTypeSystem(typesystem);

-        }

-    }

-

-    /**

-     * Import all packages from a type system.

-     *

-     * @param parent - Block where the type should be imported.

-     * @param typesystem - Typesystem from which to import the package or null to import it from the CAS typesystem.

-     * @param alias - Package alias.

-     */

-    public void importAllPackages(RutaBlock parent, String typesystem, Token alias) {

-        RutaEnvironment env = parent.getEnvironment();

-        String aliasText = alias != null? alias.getText() : null;

-

-        env.importAllPackagesFromTypeSystem(typesystem, aliasText);

-        if(descInfo != null) {

-          descInfo.addTypeSystem(typesystem);

-        }

-    }

-

-	protected static final int[] getBounds(Token t) {

-    		if (t instanceof CommonToken) {

-    			CommonToken ct = (CommonToken) t;

-    			int[] bounds = {ct.getStartIndex(), ct.getStopIndex()}; 

-    			return bounds;

-    		}

-    		return null;

-    	}

-	

-	private String[] resourcePaths;

-	

-

-	public void setResourcePaths(String[] resourcePaths) {

-		this.resourcePaths = resourcePaths;

-	}

-

-	private boolean isBooleanFunctionExtension(String name) {

-      	  return external.getBooleanFunctionExtensions().keySet().contains(name);

-      	}

-      	private boolean isActionExtension(String name) {

-      	  return external.getActionExtensions().keySet().contains(name);

-      	}

-      	private boolean isConditionExtension(String name) {

-      	  return external.getConditionExtensions().keySet().contains(name);

-      	}

-      	private boolean isNumberFunctionExtension(String name) {

-      	  return external.getNumberFunctionExtensions().keySet().contains(name);

-      	}

-      	private boolean isStringFunctionExtension(String name) {

-      	  return external.getStringFunctionExtensions().keySet().contains(name);

-      	}

-      	private boolean isTypeFunctionExtension(String name) {

-      	  return external.getTypeFunctionExtensions().keySet().contains(name);

-      	}

-      	private boolean isBlockExtension(String name) {

-      	  return external.getBlockExtensions().keySet().contains(name);

-      	}

-      	

-

-

-}

-

-@rulecatch {

-	catch (RecognitionException exception1) {

-	state.failed = true;

-		emitErrorMessage(exception1);

-	}

-	catch (Throwable exception2) {

-		emitErrorMessage(exception2);

-	}

-}

-

-

-file_input [String moduleName] returns [RutaModule module]

-@init{

-RutaScriptBlock rootBlock = null;

-List<RutaStatement> stmts = new ArrayList<RutaStatement>();

-}

-	:

-	p = packageDeclaration?

-	{

-	namespace = p;

-	if(descInfo != null) {

-		descInfo.setPackageString(p);

-	}

-	this.moduleName = moduleName;

-	rootBlock = factory.createRootScriptBlock(moduleName, p);

-        rootBlock.getEnvironment().setResourcePaths(resourcePaths);

-        rootBlock.getEnvironment().setResourceManager(resourceManager);

-	rootBlock.setElements(stmts);

-	module = new RutaModule(rootBlock);

-	rootBlock.setScript(module);

-	}

-	{$blockDeclaration.push(new blockDeclaration_scope());$blockDeclaration::env = rootBlock;}

-	

-	gs = globalStatements	{stmts.addAll(gs);}

-	s = statements		{stmts.addAll(s);}

-	

-	EOF

-	;

-

-packageDeclaration returns [String pack = ""]

-	:	PackageString p = dottedIdentifier SEMI {pack = p;}

-	;

-

-statements returns [List<RutaStatement> stmts = new ArrayList<RutaStatement>()]

-	:

-	(stmt = statement {{if(stmt != null) {stmts.add(stmt);}}})*

-	;

-

-globalStatements returns [List<RutaStatement> stmts = new ArrayList<RutaStatement>()]

-	:

-	(morestmts = globalStatement {if(morestmts != null) {stmts.addAll(morestmts);}})*

-	;

-

-globalStatement returns [List<RutaStatement> stmts = new ArrayList<RutaStatement>()]

-	:

-	stmtImport = importStatement {stmts.add(stmtImport);}

-	;

-	

-statement returns [RutaStatement stmt = null]

-	:	

-	( stmtDecl = declaration {stmt = stmtDecl;}

-	| stmtVariable = variableDeclaration {stmt = stmtVariable;}

-	| stmtRule = simpleStatement {stmt = stmtRule;}

-	| stmtBlock = blockDeclaration {stmt = stmtBlock;}

-	| stmtExternal = externalBlock {stmt = stmtExternal;}

-	)

-	;

-

-variableDeclaration returns [RutaStatement stmt = null]

-@init {

-List<String> vars = new ArrayList<String>();

-}

-	:

-	type = IntString

-	{!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		(COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		 )*(ASSIGN_EQUAL value1 = numberExpression)? {setValue($blockDeclaration::env, vars, value1);}  SEMI

-	|

-	type = DoubleString

-	{!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		(COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		 )* (ASSIGN_EQUAL value2 = numberExpression)? {setValue($blockDeclaration::env, vars, value2);} SEMI

-	|

-	type = FloatString

-	{!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		(COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		 )* (ASSIGN_EQUAL value2 = numberExpression)? {setValue($blockDeclaration::env, vars, value2);} SEMI

-	|

-	type = StringString

-	{!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		(COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		 )* (ASSIGN_EQUAL value3 = stringExpression)? {setValue($blockDeclaration::env, vars, value3);} SEMI

-	|

-	type = BooleanString

-	{!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		(COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		 )* (ASSIGN_EQUAL value4 = booleanExpression)? {setValue($blockDeclaration::env, vars, value4);} SEMI

-	|

-	type = TypeString

-	{!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		(COMMA {!ownsVariable($blockDeclaration::env, input.LT(1).getText())}? id = Identifier {vars.add(id.getText());addVariable($blockDeclaration::env, id.getText(), type.getText());}

-		 )* (ASSIGN_EQUAL value5 = typeExpression)? {setValue($blockDeclaration::env, vars, value5);} SEMI

-	|

-	type = WORDLIST 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL list = wordListExpression)? 

-	{addVariable($blockDeclaration::env, name.getText(), type.getText());if(list != null){setValue($blockDeclaration::env, name.getText(), list);}} 

-	SEMI 

-	| 

-	type = WORDTABLE 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL table = wordTableExpression)? 

-	{addVariable($blockDeclaration::env, name.getText(), type.getText());if(table != null){setValue($blockDeclaration::env, name.getText(), table);}}

-	SEMI 

-	|

-	type = BOOLEANLIST 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL bl = booleanListExpression)? SEMI {addVariable($blockDeclaration::env, name.getText(), type.getText());if(bl != null){setValue($blockDeclaration::env, name.getText(), bl);}} 

-	|

-	type = STRINGLIST 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL sl = stringListExpression)? SEMI {addVariable($blockDeclaration::env, name.getText(), type.getText());if(sl != null){setValue($blockDeclaration::env, name.getText(), sl);}} 

-	|

-	type = INTLIST 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL il = numberListExpression)? SEMI {addVariable($blockDeclaration::env, name.getText(), type.getText());if(il != null){setValue($blockDeclaration::env, name.getText(), il);}} 

-	|

-	type = DOUBLELIST 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL dl = numberListExpression)? SEMI {addVariable($blockDeclaration::env, name.getText(), type.getText());if(dl != null){setValue($blockDeclaration::env, name.getText(), dl);}} 

-	|

-	type = FLOATLIST 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL dl = numberListExpression)? SEMI {addVariable($blockDeclaration::env, name.getText(), type.getText());if(dl != null){setValue($blockDeclaration::env, name.getText(), dl);}} 

-	|

-	type = TYPELIST 

-	{!isVariableOfType($blockDeclaration::env, input.LT(1).getText(), type.getText())}? 

-	name = Identifier (ASSIGN_EQUAL tl = typeListExpression)? SEMI {addVariable($blockDeclaration::env, name.getText(), type.getText());if(tl != null){setValue($blockDeclaration::env, name.getText(), tl);}} 

-	//|

-	//stmt1 = conditionDeclaration {stmt = stmt1;}

-	//|

-	//stmt2 = actionDeclaration {stmt = stmt2;}

-	;

-

-//TODO added rule

-//conditionDeclaration returns [RutaStatement stmt = null]

-  //  :

-//    type = CONDITION id = Identifier ASSIGN_EQUAL LPAREN cons = conditions RPAREN SEMI

-//    {addVariable($blockDeclaration::env, id.getText(), type.getText());

-//    AbstractRutaCondition condition = ConditionFactory.createConditionAnd(cons,$blockDeclaration::env);

-//    setValue($blockDeclaration::env, id.getText(), condition);}

-//    ;

-

-//TODO added rule

-//actionDeclaration returns [RutaStatement stmt = null]

-//    :

-//    type = ACTION id = Identifier ASSIGN_EQUAL LPAREN a = actions RPAREN SEMI

-//    {addVariable($blockDeclaration::env, id.getText(), type.getText());

-//    AbstractRutaAction action = ActionFactory.createComposedAction(a,$blockDeclaration::env);

-//    setValue($blockDeclaration::env, id.getText(), action);}

-//    ;

-

-importStatement returns [RutaStatement stmt = null]

-	:

-	TypeSystemString ts = dottedIdentifier2{addImportTypeSystem($blockDeclaration::env, ts);} SEMI

-	| ScriptString ns = dottedIdentifier2{addImportScript($blockDeclaration::env, ns);} SEMI

-	| EngineString ns = dottedIdentifier2{addImportEngine($blockDeclaration::env, ns);} SEMI

-	| UimafitString ns = dottedIdentifier2{addImportUimafitEngine($blockDeclaration::env, ns);} SEMI

-	| ImportString type = dottedIdentifier (FromString ts = dottedIdentifier2)? (AsString alias = Identifier)? SEMI{importTypeFromTypeSystem($blockDeclaration::env, ts, type, alias);}

-	| ImportString STAR FromString ts = dottedIdentifier2 SEMI{addImportTypeSystem($blockDeclaration::env, ts);}

-	| ImportString PackageString pkg = dottedIdentifier (FromString ts = dottedIdentifier2)? (AsString alias = Identifier)? SEMI{importPackage($blockDeclaration::env, ts, pkg, alias);}

-	| ImportString PackageString STAR FromString ts = dottedIdentifier2 (AsString alias = Identifier)? SEMI{importAllPackages($blockDeclaration::env, ts, alias);}

-	;

-

-declaration returns [RutaStatement stmt = null]

-@init {

-List featureTypes = new ArrayList();

-List featureNames = new ArrayList();

-}

-	:

-	DECLARE 

-	//{!isType($blockDeclaration::env, input.LT(1).getText())}? 

-	lazyParent = annotationType?

-	id = Identifier 

-	

-	(

-	{addType($blockDeclaration::env, id, lazyParent, null, null);}

-			(

-			

-			COMMA 

-			//{!isType($blockDeclaration::env, input.LT(1).getText())}? 

-			id = Identifier {addType($blockDeclaration::env, id, lazyParent, null, null);}

-		 )* SEMI

-	| 

-		(LPAREN 

-			(

-			obj1 = annotationType{featureTypes.add(obj1.getText());} 

-			| obj2 = StringString{featureTypes.add(obj2.getText());} 

-			| obj3 = DoubleString{featureTypes.add(obj3.getText());}

-			| obj6 = FloatString{featureTypes.add(obj6.getText());}

-			| obj4 = IntString{featureTypes.add(obj4.getText());}

-			| obj5 = BooleanString{featureTypes.add(obj5.getText());}

-			) 

-			fname = Identifier{featureNames.add(fname.getText());} 

-			(

-			COMMA 

-			(

-			obj1 = annotationType{featureTypes.add(obj1.getText());} 

-			| obj2 = StringString{featureTypes.add(obj2.getText());} 

-			| obj3 = DoubleString{featureTypes.add(obj3.getText());}

-			| obj6 = FloatString{featureTypes.add(obj6.getText());}

-			| obj4 = IntString{featureTypes.add(obj4.getText());}

-			| obj5 = BooleanString{featureTypes.add(obj5.getText());}

-			) 

-			fname = Identifier{featureNames.add(fname.getText());})* 

-		RPAREN) SEMI 

-		{

-		addType($blockDeclaration::env, id, lazyParent, featureTypes, featureNames);

-		}

-	)

-	;

-	

-	

-blockDeclaration returns [RutaBlock block = null]

-options {

-	backtrack = true;

-}

-

-scope {

-	RutaBlock env;

-}

-@init{

-RutaRuleElement re = null;

-RuleElementIsolator container = null;

-level++;

-}

-@after {

-level--;

-}

-

-	:

-	type = BlockString 

-	LPAREN

-	id = Identifier 

-	RPAREN

-	{block = factory.createScriptBlock(id, re, body, $blockDeclaration[level - 1]::env);}

-	{$blockDeclaration::env = block;

-	container = new RuleElementIsolator();}

-	re1 = ruleElementWithCA[container]

-	 {re = re1;	 }

-	{RutaRule rule = factory.createRule(re, block);

-	if(block instanceof RutaScriptBlock) {

-	((RutaScriptBlock)block).setRule(rule);

-	}

-	container.setContainer(rule);

-	}

-	LCURLY body = statements RCURLY

-	{block.setElements(body);

-	$blockDeclaration::env.getScript().addBlock(id.getText(),block);

-	}	

-	;

-

-

-externalBlock returns [RutaBlock block = null]

-options {

-	backtrack = true;

-}

-

-scope {

-	RutaBlock env;

-}

-@init{

-RutaRuleElement re = null;

-RuleElementIsolator container = null;

-level++;

-}

-@after {

-level--;

-}

-	:

-	{isBlockExtension(input.LT(1).getText())}? 

-	type = Identifier 

-	(LPAREN

-	args = varArgumentList

-	RPAREN)?

-	{block = external.createExternalBlock(type, args, $blockDeclaration[level - 1]::env);}

-	{$blockDeclaration::env = block;

-	container = new RuleElementIsolator();}

-	

-	re1 = ruleElementWithCA[container] {re = re1;}

-	

-	{RutaRule rule = factory.createRule(re, block);

-	block.setRule(rule);

-	container.setContainer(rule);}

-	

-	LCURLY body = statements RCURLY

-	{block.setElements(body);

-	

-	{$blockDeclaration::env = block.getParent();}

-	

-	}	

-	;

-

-

-	

-ruleElementWithCA[RuleElementContainer container] returns [RutaRuleElement re = null] 

-    :

-    

-    idRef=typeMatchExpression 

-    {re = factory.createRuleElement(idRef,null,null,null, container, $blockDeclaration::env);}

-    q = quantifierPart? 

-        LCURLY c = conditions? (THEN a = actions)? RCURLY

-         {

-	if(q != null) {

-		re.setQuantifier(q);

-	}

-	if(c!= null) {

-		re.setConditions(c);

-	}

-	if(a != null) {

-		re.setActions(a);

-	}

-	}

-    ;

-

-

-	

-simpleStatement returns [RutaStatement stmt = null]

-options {

-	backtrack = true;

-}

-@init{

-	//RegExpRule rer = null;

-	Map<TypeExpression, IRutaExpression> map = new HashMap<TypeExpression, IRutaExpression>();

-}

-	: 

-

-	(regexpRule)=> rer = regexpRule {stmt = rer;}

-	{stmt = rer;}

-	

-	|

-	as = rawActions 

-	{stmt = factory.createImplicitRule(as, $blockDeclaration::env);} 

-	SEMI

-	|

-	{stmt = factory.createRule(elements, $blockDeclaration::env);}

-	elements = ruleElementsRoot[stmt == null? null:((RutaRule)stmt).getRoot()] SEMI 

-	{if(elements != null){((RutaRule)stmt).setRuleElements(elements);} else {}}

-	

-	

-	;

-

-

-

-

-regexpRule returns [RegExpRule stmt = null]

-@init{

-	Map<TypeExpression, INumberExpression> map = new HashMap<TypeExpression, INumberExpression>();

-	Map<TypeExpression, Map<IStringExpression, IRutaExpression>> fa = new HashMap<TypeExpression, Map<IStringExpression, IRutaExpression>>();

-	Map<IStringExpression, IRutaExpression> fmap = null;

-}

-	:

-	{

-	stmt = factory.createRegExpRule($blockDeclaration::env);}

-	

-	regexp = stringExpression THEN

-	(

-	(numberExpression ASSIGN_EQUAL)=> indexCG = numberExpression ASSIGN_EQUAL indexTE = typeExpression {map.put(indexTE, indexCG);}

-	(LPAREN {fmap = new HashMap<IStringExpression, IRutaExpression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(indexTE, fmap);})?

-	|

-	te = typeExpression {map.put(te, null);}

-	(LPAREN {fmap = new HashMap<IStringExpression, IRutaExpression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(te, fmap);})?

-	)

-	

-	(

-	COMMA

-	(

-	(numberExpression ASSIGN_EQUAL)=> indexCG = numberExpression ASSIGN_EQUAL indexTE = typeExpression {map.put(indexTE, indexCG);}

-	(LPAREN {fmap = new HashMap<IStringExpression, IRutaExpression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(indexTE, fmap);})?

-	|

-	te = typeExpression {map.put(te, null);}

-	(LPAREN {fmap = new HashMap<IStringExpression, IRutaExpression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(te, fmap);})?

-	)

-	

-	)*

-

-	SEMI

-	{stmt.setRegExp(regexp);

-	stmt.setTypeMap(map);

-	stmt.setFeatureAssignments(fa);

-	}

-	

-	;

-

-

-	

-ruleElementsRoot[RuleElementContainer container] returns [List<RuleElement> elements = new ArrayList<RuleElement>()]

-@init{

-	List<RuleElement> reList = new ArrayList<RuleElement>();

-	List<Token> conList = new ArrayList<Token>();

-}

-	:

-	re = ruleElement[container] {if(re!=null){ reList.add(re); conList.add(null);} else {}} 

-	(

-	(con = PERCENT {conList.add(con);})? 

-	re = ruleElement[container] {if(re!=null){ reList.add(re); conList.add(null);} else {}}

-	)*

-	{elements = factory.processConjunctRules(reList, conList, container, $blockDeclaration::env);}

-	;

-

-ruleElements[RuleElementContainer container] returns [List<RuleElement> elements = new ArrayList<RuleElement>()]

-@init{

-	List<RuleElement> reList = new ArrayList<RuleElement>();

-}

-	:

-	re = ruleElement[container] {if(re!=null){ elements.add(re);}else {}} 

-	(re = ruleElement[container] {if(re!=null){ elements.add(re);}else {}})*

-	;

-		

-

-ruleElement[RuleElementContainer container] returns [RuleElement re = null]

-@init{

-List<RutaStatement> innerRules = new ArrayList<RutaStatement>();

-}

-	:

-	start = STARTANCHOR? (

-	re1 = ruleElementType[container] {re = re1;}

-	| re2 = ruleElementLiteral[container] {re = re2;}

-	| (ruleElementComposed[null])=>re3 = ruleElementComposed[container] {re = re3;}

-	| (ruleElementWildCard[null])=> re5 = ruleElementWildCard[container] {re = re5;}

-	)

-	{re.setStartAnchor(start != null);}

-	(t = (THEN2) 

-	LCURLY 

-	(rule = simpleStatement {innerRules.add(rule);})+ 

-	RCURLY 

-	{re.setInlinedRules(innerRules);

-	boolean block = t != null && t.getText().equals("->"); 

-	re.setInlineMode(block);})?

-	(t = (THEN) 

-	LCURLY 

-	(rule = simpleStatement {innerRules.add(rule);})+ 

-	RCURLY 

-	{re.setInlinedRules(innerRules);

-	boolean block = t != null && t.getText().equals("->"); 

-	re.setInlineMode(block);})?

-	;	

-

-ruleElementWildCard [RuleElementContainer container] returns [AbstractRuleElement re = null]

-    :

-    

-    w = WILDCARD 

-     {re = factory.createWildCardRuleElement(null, null, container, $blockDeclaration::env);} 

-        (LCURLY c = conditions? (THEN a = actions)? RCURLY)?

-   {

-	if(c!= null) {

-		re.setConditions(c);

-	}

-	if(a != null) {

-		re.setActions(a);

-	}

-	}

-    ;

-

-

-

-ruleElementComposed [RuleElementContainer container] returns [ComposedRuleElement re = null]

-scope {

-	RuleElementContainer con;

-}

-@init{

-	Boolean conjunct = null;

-	List<RuleElement> res = new ArrayList<RuleElement>();

-}	

-	:

-	{re = factory.createComposedRuleElement(container, $blockDeclaration::env);

-	$ruleElementComposed::con = re;}

-	

-	LPAREN 

-	(

-	(ruleElement[$ruleElementComposed::con] VBAR)=> re1 = ruleElement[$ruleElementComposed::con] {res.add(re1);} (VBAR re1 = ruleElement[$ruleElementComposed::con] {conjunct = false; res.add(re1);})+

-	|

-	(ruleElement[$ruleElementComposed::con] AMPER)=> re2 = ruleElement[$ruleElementComposed::con] {res.add(re2);} (AMPER re2 = ruleElement[$ruleElementComposed::con] {conjunct = true; res.add(re2);})+

-	|

-	res2 = ruleElements[$ruleElementComposed::con] {res = res2;}

-	)

-

-	RPAREN q = quantifierPart? (LCURLY c = conditions? (THEN a = actions)? RCURLY)?

-	{

-	re.setRuleElements(res);

-	re.setConjunct(conjunct);

-	if(q != null) {

-		re.setQuantifier(q);

-	}

-	if(c!= null) {

-		re.setConditions(c);

-	}

-	if(a != null) {

-		re.setActions(a);

-	}

-	}

-	;

-

-

-ruleElementType [RuleElementContainer container] returns [RutaRuleElement re = null]

-    :

-    

-    (typeMatchExpression)=>typeExpr = typeMatchExpression 

-     {re = factory.createRuleElement(typeExpr, null, null, null, container, $blockDeclaration::env);} 

-    q = quantifierPart? 

-        (LCURLY c = conditions? (THEN a = actions)? RCURLY)?

-   {

-	if(q != null) {

-		re.setQuantifier(q);

-	}

-	if(c!= null) {

-		re.setConditions(c);

-	}

-	if(a != null) {

-		re.setActions(a);

-	}

-	}

-    ;

-

-ruleElementLiteral [RuleElementContainer container] returns [RutaRuleElement re = null]

-    :

-    

-    (simpleStringExpression)=>stringExpr = simpleStringExpression 

-     {re = factory.createRuleElement(stringExpr, null, null, null, container, $blockDeclaration::env);} 

-    

-    q = quantifierPart? 

-        (LCURLY c = conditions? (THEN a = actions)? RCURLY)?

-    {

-	if(q != null) {

-		re.setQuantifier(q);

-	}

-	if(c!= null) {

-		re.setConditions(c);

-	}

-	if(a != null) {

-		re.setActions(a);

-	}

-	}

-    ;

-	

-conditions returns [List<AbstractRutaCondition> conds = new ArrayList<AbstractRutaCondition>()]

-    :

-    c = condition {conds.add(c);} (COMMA c = condition {conds.add(c);} )*

-    ;

-    

-actions returns [List<AbstractRutaAction> actions = new ArrayList<AbstractRutaAction>()]

-    :

-    a = action {actions.add(a);} (COMMA a = action {actions.add(a);} )*

-    ; 	

-rawActions returns [List<AbstractRutaAction> actions = new ArrayList<AbstractRutaAction>()]

-    :

-    a = rawAction {actions.add(a);} (COMMA a = rawAction {actions.add(a);} )*

-    ; 	

-

-listExpression returns [ListExpression expr = null]

-	:

-	(booleanListExpression)=> bl = booleanListExpression {expr = bl;}

-	| (intListExpression)=> il = intListExpression {expr = il;}

-	| (doubleListExpression)=> dl = doubleListExpression {expr = dl;}

-	| (floatListExpression)=> dl = floatListExpression {expr = dl;}

-	| (stringListExpression)=> sl = stringListExpression {expr = sl;}

-	| (typeListExpression)=> tl = typeListExpression {expr = tl;}

-	| (untypedListExpression)=> utl = untypedListExpression {expr = utl;}

-	;

-

-untypedListExpression returns [ListExpression expr = null]

-@init{

-	List<IRutaExpression> list = new ArrayList<IRutaExpression>();

-}	:

-	LCURLY (e = argument {list.add(e);} (COMMA e = argument {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createUntypedListExpression(list);}

-	;

-

-booleanListExpression returns [BooleanListExpression expr = null]

-	:

-	e = simpleBooleanListExpression {expr = e;}

-	;

-

-simpleBooleanListExpression returns [BooleanListExpression expr = null]

-@init{

-	List<IBooleanExpression> list = new ArrayList<IBooleanExpression>();

-}	:

-	LCURLY (e = simpleBooleanExpression {list.add(e);} (COMMA e = simpleBooleanExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createBooleanListExpression(list);}

-	|

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "BOOLEANLIST")}? var = Identifier 

-	{expr = ExpressionFactory.createReferenceBooleanListExpression(var);}

-	;

-

-

-intListExpression returns [NumberListExpression expr = null]

-	:

-	e = simpleIntListExpression {expr = e;}

-	;

-

-simpleIntListExpression returns [NumberListExpression expr = null]

-@init{

-	List<INumberExpression> list = new ArrayList<INumberExpression>();

-}	:

-	LCURLY (e = simpleNumberExpression {list.add(e);} (COMMA e = simpleNumberExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createNumberListExpression(list);}

-	|

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "INTLIST")}? var = Identifier 

-	{expr = ExpressionFactory.createReferenceIntListExpression(var);}

-	;

-

-

-numberListExpression returns [NumberListExpression expr = null]

-	:

-	(e1 = doubleListExpression)=> e1 = doubleListExpression {expr = e1;}

-	|

-	(e1 = floatListExpression)=> e1 = floatListExpression {expr = e1;}

-	|

-	e2 = intListExpression {expr = e2;}

-	;

-	

-doubleListExpression returns [NumberListExpression expr = null]

-	:

-	e = simpleDoubleListExpression {expr = e;}

-	;

-

-simpleDoubleListExpression returns [NumberListExpression expr = null]

-@init{

-	List<INumberExpression> list = new ArrayList<INumberExpression>();

-}	:

-	LCURLY (e = simpleNumberExpression {list.add(e);} (COMMA e = simpleNumberExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createNumberListExpression(list);}

-	|

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "DOUBLELIST")}? var = Identifier 

-	{expr = ExpressionFactory.createReferenceDoubleListExpression(var);}

-	;

-

-	

-floatListExpression returns [NumberListExpression expr = null]

-	:

-	e = simpleFloatListExpression {expr = e;}

-	;

-

-simpleFloatListExpression returns [NumberListExpression expr = null]

-@init{

-	List<INumberExpression> list = new ArrayList<INumberExpression>();

-}	:

-	LCURLY (e = simpleNumberExpression {list.add(e);} (COMMA e = simpleNumberExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createNumberListExpression(list);}

-	|

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "FLOATLIST")}? var = Identifier 

-	{expr = ExpressionFactory.createReferenceFloatListExpression(var);}

-	;

-

-stringListExpression returns [StringListExpression expr = null]

-	:

-	e = simpleStringListExpression {expr = e;}

-	;

-

-simpleStringListExpression returns [StringListExpression expr = null]

-@init{

-	List<IStringExpression> list = new ArrayList<IStringExpression>();

-}	:

-	LCURLY (e = simpleStringExpression {list.add(e);} (COMMA e = simpleStringExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createStringListExpression(list);}	

-	|

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "STRINGLIST")}? var = Identifier 

-	{expr = ExpressionFactory.createReferenceStringListExpression(var);}

-	;

-

-

-typeListExpression returns [TypeListExpression expr = null]

-	:

-	e = simpleTypeListExpression {expr = e;}

-	;

-

-simpleTypeListExpression returns [TypeListExpression expr = null]

-@init{

-	List<TypeExpression> list = new ArrayList<TypeExpression>();

-}	:

-	LCURLY (e = simpleTypeExpression {list.add(e);} (COMMA e = simpleTypeExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createTypeListExpression(list);}

-	|

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "TYPELIST")}? var = Identifier 

-	{expr = ExpressionFactory.createReferenceTypeListExpression(var);}

-	;

-

-typeMatchExpression returns [IRutaExpression expr = null]

-options {

-	backtrack = true;

-}

-	:

-	(typeFunction)=> tf = typeFunction {expr = tf;}

-	|

-	(matchReference)=> mr = matchReference {expr = mr;}

-	;

-

-matchReference returns [MatchReference mr = null]

-	:

-	ref = dottedId ((comp = LESS | comp = GREATER | comp = GREATEREQUAL | comp = LESSEQUAL |comp =  EQUAL | comp = NOTEQUAL) arg = argument)?

-	{mr = ExpressionFactory.createMatchReference(ref, comp, arg);}

-	;

-

-typeExpression returns [TypeExpression type = null]

-options {

-	backtrack = true;

-}

-	:

-	tf = typeFunction {type = tf;}

-	| st = simpleTypeExpression {type = st;}

-	;

-	

-

-// not checked

-typeFunction returns [TypeExpression expr = null]

-	:

-	(e = externalTypeFunction)=> e = externalTypeFunction {expr = e;}

-	;

-

-// not checked

-externalTypeFunction returns [TypeExpression expr = null]

-	:

-	{isTypeFunctionExtension(input.LT(1).getText())}? 

-	id = Identifier LPAREN

-	args = varArgumentList?	RPAREN

-	{

-		expr = external.createExternalTypeFunction(id, args);

-	}

-	;

-

-simpleTypeExpression returns [TypeExpression type = null]

-	:

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "TYPE")}? var = Identifier 

-	{type = ExpressionFactory.createReferenceTypeExpression(var);}

-	|

-	at = annotationType

-	{type = ExpressionFactory.createSimpleTypeExpression(at, $blockDeclaration::env);}

-	;

-

-featureExpression returns [FeatureExpression feat = null]

-@init{

-List<Token> fs = new ArrayList<Token>();

-TypeExpression te = null;

-}

-	:

-	match = dottedId2 

-	{

-	MatchReference mr = ExpressionFactory.createMatchReference(match, null, null);

-	feat = ExpressionFactory.createFeatureExpression(mr, $blockDeclaration::env);

-	}

-	;

-

-featureMatchExpression returns [FeatureMatchExpression fme = null]

-	:

-	match = dottedId2 ((comp = LESS | comp = GREATER | comp = GREATEREQUAL | comp = LESSEQUAL |comp =  EQUAL | comp = NOTEQUAL) arg = argument)?

-	{

-	MatchReference mr = ExpressionFactory.createMatchReference(match, comp, arg);

-	fme = ExpressionFactory.createFeatureMatchExpression(mr, $blockDeclaration::env);}

-	;

-

-featureMatchExpression2 returns [FeatureMatchExpression fme = null]

-	:

-	match = dottedId2 (comp = LESS | comp = GREATER | comp = GREATEREQUAL | comp = LESSEQUAL |comp =  EQUAL | comp = NOTEQUAL) arg = argument

-	{

-	MatchReference mr = ExpressionFactory.createMatchReference(match, comp, arg);

-	fme = ExpressionFactory.createFeatureMatchExpression(mr, $blockDeclaration::env);}

-	;

-

-

-featureAssignmentExpression returns [FeatureMatchExpression fme = null]

-	:

-	match = dottedId2 op = ASSIGN_EQUAL arg = argument

-	{

-	MatchReference mr = ExpressionFactory.createMatchReference(match, op, arg);

-	fme = ExpressionFactory.createFeatureMatchExpression(mr, $blockDeclaration::env);

-	}

-	;

-	

-	

-variable returns [Token var = null]

-	:

-	{isVariable($blockDeclaration::env, input.LT(1).getText())}? v = Identifier {var = v;}

-	;

-

-listVariable returns [Token var = null]

-	:

-	{isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "BOOLEANLIST")

-	||isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "INTLIST")

-	||isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "DOUBLELIST")

-	||isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "FLOATLIST")

-	||isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "STRINGLIST")

-	||isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "TYPELIST")

-	}? v = Identifier {var = v;}

-	;

-

-

-//typeExpressionOr returns [TypeExpression type = null]

-//@init {List<TypeExpression> exprs = new ArrayList<TypeExpression>();}

-//	:

-//	LBRACK e = typeExpressionAnd{exprs.add(e);} ( COMMA e = typeExpressionAnd{exprs.add(e);} )* RBRACK

-//	{type = ExpressionFactory.createOrTypeExpression(exprs);}

-//	;

-

-//typeExpressionAnd returns [TypeExpression type = null]

-//@init {List<TypeExpression> exprs = new ArrayList<TypeExpression>();}

-//	:

-//	LBRACK e = simpleTypeExpression{exprs.add(e);} ( SEMI e = simpleTypeExpression{exprs.add(e);} )* RBRACK

-//	{type = ExpressionFactory.createAndTypeExpression(exprs);}

-//	;

-

-quantifierPart returns [RuleElementQuantifier quantifier = null]

-	:

-	 STAR q = QUESTION? 

-	 {if(q != null) {quantifier = RutaScriptFactory.createStarReluctantQuantifier();} 

-	 	else{quantifier = RutaScriptFactory.createStarGreedyQuantifier();}}

-	| PLUS q = QUESTION?

-	 {if(q != null) {quantifier = RutaScriptFactory.createPlusReluctantQuantifier();}

-	 else {quantifier = RutaScriptFactory.createPlusGreedyQuantifier();}}

-	| QUESTION q = QUESTION? 

-	 {if(q != null) {quantifier = RutaScriptFactory.createQuestionReluctantQuantifier();} 

-	 else {quantifier = RutaScriptFactory.createQuestionGreedyQuantifier();}}

-	| LBRACK min = numberExpression (comma = COMMA (max = numberExpression)?)? RBRACK q = QUESTION?

-	 {if(q != null) {quantifier = RutaScriptFactory.createMinMaxReluctantQuantifier(min,max,comma);} 

-	 else {quantifier = RutaScriptFactory.createMinMaxGreedyQuantifier(min,max,comma);}}	

-	;

-

-

-condition  returns [AbstractRutaCondition result = null]

-	:

-	(

-	c = conditionAnd

-	| c = conditionContains

-	| c = conditionContextCount

-	| c = conditionCount

-	| c = conditionCurrentCount

-	| c = conditionInList

-	| c = conditionLast

-	| c = conditionMofN

-	| c = conditionNear

-	| c = conditionNot

-	| c = conditionOr

-	| c = conditionPartOf

-	| c = conditionPosition

-	| c = conditionRegExp

-	| c = conditionScore

-	| c = conditionTotalCount

-	| c = conditionVote

-	| c = conditionIf

-	| c = conditionFeature

-	| c = conditionParse

-	| c = conditionIs

-	| c = conditionBefore

-	| c = conditionAfter 

-	| c = conditionStartsWith

-	| c = conditionEndsWith

-	| c = conditionPartOfNeq

-	| c = conditionSize	

-	

-	| (featureMatchExpression2)=> f = featureMatchExpression2 {c = ConditionFactory.createImplicitCondition(f);}

-	| (booleanExpression)=> b = booleanExpression {c = ConditionFactory.createImplicitCondition(b);}

-	| (c = externalCondition)=> c = externalCondition

-	

-//	| c = variableCondition

-	) {result = c;}

-	;

-

-

-//variableCondition returns [AbstractRutaCondition condition = null]

-//	:		

-//	

-//	id = Identifier

-//	{

-//		condition = ConditionFactory.createConditionVariable(id);

-//	}

-//	;

-

-externalCondition returns [AbstractRutaCondition condition = null]

-	:		

-	{isConditionExtension(input.LT(1).getText())}? 

-	id = Identifier LPAREN args = varArgumentList?	RPAREN

-	{

-		condition = external.createExternalCondition(id, args);

-	}

-	;

-	

-conditionAnd returns [AbstractRutaCondition cond = null]

-    :   

-    AND LPAREN conds = conditions RPAREN 

-    {cond = ConditionFactory.createConditionAnd(conds, $blockDeclaration::env);}

-    ;

-    

-conditionContains returns [AbstractRutaCondition cond = null]

- options {

-	backtrack = true;

-}

-    :   

-    CONTAINS LPAREN (type = typeExpression | list = listExpression COMMA a = argument) 

-    (COMMA min = numberExpression COMMA max = numberExpression (COMMA percent = booleanExpression)?)? RPAREN

-    {if(type != null) {cond = ConditionFactory.createConditionContains(type, min, max, percent,$blockDeclaration::env);}

-    else {cond = ConditionFactory.createConditionContains(list,a, min, max, percent, $blockDeclaration::env);};}

-    ;

-conditionContextCount returns [AbstractRutaCondition cond = null]

-    :   

-    CONTEXTCOUNT LPAREN type = typeExpression (COMMA min = numberExpression COMMA max = numberExpression)? 

-    (COMMA var = numberVariable)? RPAREN

-    {cond = ConditionFactory.createConditionContextCount(type, min, max, var, $blockDeclaration::env);}

-    ;

-conditionCount returns [AbstractRutaCondition cond = null]

- options {

-	backtrack = true;

-}

-    :   

-    COUNT LPAREN type = listExpression COMMA a = argument (COMMA min = numberExpression COMMA max = numberExpression)? 

-    (COMMA var = numberVariable)? RPAREN

-    {cond = ConditionFactory.createConditionCount(type, a, min, max, var,$blockDeclaration::env);}

-    |

-    COUNT LPAREN list = typeExpression (COMMA min = numberExpression COMMA max = numberExpression)? 

-    (COMMA var = numberVariable)? RPAREN

-    {cond = ConditionFactory.createConditionCount(list, min, max, var,$blockDeclaration::env);}   

-    ;

-conditionTotalCount returns [AbstractRutaCondition cond = null]

-    :   

-    TOTALCOUNT LPAREN type = typeExpression (COMMA min = numberExpression COMMA max = numberExpression)?

-    (COMMA var = numberVariable)? RPAREN

-    {cond = ConditionFactory.createConditionTotalCount(type, min, max, var, $blockDeclaration::env);}

-    ;

-conditionCurrentCount returns [AbstractRutaCondition cond = null]

-    :   

-    CURRENTCOUNT LPAREN type = typeExpression (COMMA min = numberExpression COMMA max = numberExpression)? 

-    (COMMA var = numberVariable)? RPAREN

-    {cond = ConditionFactory.createConditionCurrentCount(type, min, max, var,$blockDeclaration::env);}

-    ;

-    

-conditionInList returns [AbstractRutaCondition cond = null]

- options {

-	backtrack = true;

-}

-    :

-    INLIST LPAREN ((list2 = stringListExpression)=>list2 = stringListExpression | list1 = wordListExpression) 

-    (COMMA arg = stringExpression)?

-    //(COMMA dist = numberExpression (COMMA rel = booleanExpression)?)? 

-    RPAREN

-    {if(list1 != null) {cond = ConditionFactory.createConditionInList(list1, arg,$blockDeclaration::env);}

-    else {cond = ConditionFactory.createConditionInList(list2, arg,$blockDeclaration::env);};}

-    ;

-

-    

-conditionLast returns [AbstractRutaCondition cond = null]

-    :   

-    LAST LPAREN type = typeExpression RPAREN

-    {cond = ConditionFactory.createConditionLast(type, $blockDeclaration::env);}    

-    ;

-    

-    

-conditionMofN returns [AbstractRutaCondition cond = null]

-    :   

-    MOFN LPAREN min = numberExpression COMMA max = numberExpression COMMA conds = conditions RPAREN

-    {cond = ConditionFactory.createConditionMOfN(conds, min, max, $blockDeclaration::env);} 

-    ;

-

-conditionNear returns [AbstractRutaCondition cond = null]

-    :   

-    NEAR LPAREN type = typeExpression COMMA min = numberExpression COMMA max = numberExpression (COMMA direction = booleanExpression (COMMA filtered = booleanExpression)?)? RPAREN

-    {cond = ConditionFactory.createConditionNear(type, min, max, direction, filtered, $blockDeclaration::env);} 

-    ;

-conditionNot returns [AbstractRutaCondition cond = null]

-    :   

-    ((MINUS c = condition) |  (NOT LPAREN c = condition RPAREN))

-    {cond = ConditionFactory.createConditionNot(c, $blockDeclaration::env);}    

-    ;

-conditionOr returns [AbstractRutaCondition cond = null]

-    :   

-    OR LPAREN conds = conditions RPAREN

-    {cond = ConditionFactory.createConditionOr(conds, $blockDeclaration::env);}

-    ;

-conditionPartOf returns [AbstractRutaCondition cond = null]

-    :

-    PARTOF LPAREN (type1 = typeExpression|type2 = typeListExpression) RPAREN

-    {cond = ConditionFactory.createConditionPartOf(type1, type2, $blockDeclaration::env);}

-    ;

-conditionPartOfNeq returns [AbstractRutaCondition cond = null]

-    :

-    PARTOFNEQ LPAREN (type1 = typeExpression|type2 = typeListExpression) RPAREN

-    {cond = ConditionFactory.createConditionPartOfNeq(type1, type2, $blockDeclaration::env);}

-    ;

-

-conditionPosition returns [AbstractRutaCondition cond = null]

-    :   

-    POSITION LPAREN type = typeExpression COMMA pos = numberExpression (COMMA rel = booleanExpression)? RPAREN

-    {cond = ConditionFactory.createConditionPosition(type, pos, rel, $blockDeclaration::env);}

-    ;

-conditionRegExp returns [AbstractRutaCondition cond = null]

-    :

-    REGEXP LPAREN 

-    ((stringExpression COMMA stringExpression)=> v = stringExpression COMMA pattern = stringExpression

-    | pattern = stringExpression

-    )

-    (COMMA caseSensitive = booleanExpression)? RPAREN

-    {cond = ConditionFactory.createConditionRegExp(v, pattern, caseSensitive, $blockDeclaration::env);}    

-    ;

-

-conditionScore returns [AbstractRutaCondition cond = null]

-    :

-    SCORE LPAREN min = numberExpression (COMMA max = numberExpression

-    (COMMA var = numberVariable)?)?  RPAREN

-    {cond = ConditionFactory.createConditionScore(min, max, var, $blockDeclaration::env);}

-    ;

-

-

-conditionVote returns [AbstractRutaCondition cond = null]

-    :   

-    VOTE LPAREN type1 = typeExpression COMMA type2 = typeExpression RPAREN

-    {cond = ConditionFactory.createConditionVote(type1, type2, $blockDeclaration::env);}

-    ;

-    

-conditionIf returns [AbstractRutaCondition cond = null]

-    :   

-    IF LPAREN e = booleanExpression RPAREN

-    {cond = ConditionFactory.createConditionIf(e, $blockDeclaration::env);}

-    ;

-

-conditionFeature returns [AbstractRutaCondition cond = null]

-    :   

-    FEATURE LPAREN se = stringExpression COMMA v = argument RPAREN

-    {cond = ConditionFactory.createConditionFeature(se, v, $blockDeclaration::env);}

-    ;   

-

-conditionParse returns [AbstractRutaCondition cond = null]

-    :

-    PARSE LPAREN {isVariable($blockDeclaration::env,input.LT(1).getText())}? id = Identifier RPAREN

-    {cond = ConditionFactory.createConditionParse(id, $blockDeclaration::env);}

-    ;

-

-conditionIs returns [AbstractRutaCondition cond = null]

-    :

-    IS LPAREN (type1 = typeExpression|type2 = typeListExpression) RPAREN

-    {cond = ConditionFactory.createConditionIs(type1, type2, $blockDeclaration::env);}

-    ;

-

-conditionBefore returns [AbstractRutaCondition cond = null]

-    :

-    BEFORE LPAREN (type1 = typeExpression|type2 = typeListExpression) RPAREN

-    {cond = ConditionFactory.createConditionBefore(type1,type2, $blockDeclaration::env);}

-    ;

-

-conditionAfter returns [AbstractRutaCondition cond = null]

-    :

-    AFTER LPAREN (type1 = typeExpression|type2 = typeListExpression) RPAREN

-    {cond = ConditionFactory.createConditionAfter(type1,type2,$blockDeclaration::env);}

-    ;

-

-conditionStartsWith returns [AbstractRutaCondition cond = null]

-    :

-    STARTSWITH LPAREN (type1 = typeExpression|type2 = typeListExpression) RPAREN

-    {cond = ConditionFactory.createConditionStartsWith(type1,type2, $blockDeclaration::env);}

-    ;

-

-conditionEndsWith returns [AbstractRutaCondition cond = null]

-    :

-    ENDSWITH LPAREN (type1 = typeExpression|type2 = typeListExpression) RPAREN

-    {cond = ConditionFactory.createConditionEndsWith(type1,type2,$blockDeclaration::env);}

-    ;

-

-conditionSize returns [AbstractRutaCondition cond = null]

-    :

-    SIZE LPAREN list = listExpression (COMMA min = numberExpression COMMA max = numberExpression)? (COMMA var = numberVariable)? RPAREN

-    {cond = ConditionFactory.createConditionSize(list, min, max, var,$blockDeclaration::env);}

-    ;

-

-action  returns [AbstractRutaAction result = null]

-	:

-	(

-	a = actionColor

-	| a = actionDel

-	| a = actionLog

-	| a = actionMark

-	| a = actionMarkScore

-	| a = actionMarkFast

-	| a = actionMarkLast

-	| a = actionMarkFirst

-	| a = actionReplace

-	| a = actionFilterType

-	| a = actionRetainType

-	| a = actionCreate

-	| a = actionFill

-	| a = actionCall

-	| a = actionAssign

-	| a = actionSetFeature

-	| a = actionGetFeature

-	| a = actionUnmark

-	| a = actionUnmarkAll

-	| a = actionTransfer

-	| a = actionMarkOnce

-	| a = actionTrie

-	| a = actionGather

-	| a = actionExec

-	| a = actionMarkTable

-	| a = actionAdd

-	| a = actionRemove

-	| a = actionRemoveDuplicate

-	| a = actionMerge

-	| a = actionGet

-	| a = actionGetList

-	| a = actionMatchedText

-	| a = actionClear

-	| a = actionShift

-	| a = actionConfigure

-	| a = actionDynamicAnchoring

-	| a = actionGreedyAnchoring

-	| a = actionTrim 

-	| a = actionAddRetainType

-	| a = actionRemoveRetainType

-	| a = actionAddFilterType

-	| a = actionRemoveFilterType

-	| (externalAction)=> a = externalAction

-	| (featureAssignmentExpression)=> fae = featureAssignmentExpression {a = ActionFactory.createAction(fae);}

-	| (typeExpression)=> te = typeExpression {a = ActionFactory.createAction(te);}

-	

-//	| a = variableAction

-	) {result = a;}

-	;

-rawAction  returns [AbstractRutaAction result = null]

-	:

-	(

-	a = actionColor

-	| a = actionDel

-	| a = actionLog

-	| a = actionMark

-	| a = actionMarkScore

-	| a = actionMarkFast

-	| a = actionMarkLast

-	| a = actionMarkFirst

-	| a = actionReplace

-	| a = actionFilterType

-	| a = actionRetainType

-	| a = actionCreate

-	| a = actionFill

-	| a = actionCall

-	| a = actionAssign

-	| a = actionSetFeature

-	| a = actionGetFeature

-	| a = actionUnmark

-	| a = actionUnmarkAll

-	| a = actionTransfer

-	| a = actionMarkOnce

-	| a = actionTrie

-	| a = actionGather

-	| a = actionExec

-	| a = actionMarkTable

-	| a = actionAdd

-	| a = actionRemove

-	| a = actionRemoveDuplicate

-	| a = actionMerge

-	| a = actionGet

-	| a = actionGetList

-	| a = actionMatchedText

-	| a = actionClear

-	| a = actionShift

-	| a = actionConfigure

-	| a = actionDynamicAnchoring

-	| a = actionGreedyAnchoring

-	| a = actionTrim 

-	| a = actionAddRetainType

-	| a = actionRemoveRetainType

-	| a = actionAddFilterType

-	| a = actionRemoveFilterType

-	| (externalAction)=> a = externalAction

-	

-//	| a = variableAction

-	) {result = a;}

-	;	

-

-//variableAction returns [AbstractRutaAction action = null]

-//	:		

-//	

-//	id = Identifier

-//	{

-//		action = ActionFactory.createActionVariable(id);

-//	}

-//	;

-

-

-externalAction returns [AbstractRutaAction action = null]

-	:		

-	{isActionExtension(input.LT(1).getText())}? 

-	id = Identifier LPAREN args = varArgumentList?	RPAREN

-	{

-		action = external.createExternalAction(id, args);

-	}

-	;

-

-

-

-actionCreate returns [AbstractRutaAction action = null]

-@init {

-	Map<IStringExpression, IRutaExpression> map = new HashMap<IStringExpression, IRutaExpression>();

-    	List<INumberExpression> indexes = new ArrayList<INumberExpression>();

-}

-    :

-    name = CREATE LPAREN structure = typeExpression 

-   (COMMA 

-    (

-    (index = numberExpression)=>index = numberExpression {indexes.add(index);} ((COMMA index = numberExpression)=> (COMMA index = numberExpression) {indexes.add(index);})* COMMA)?

-    (fname = stringExpression ASSIGN_EQUAL obj1 = argument {map.put(fname,obj1);} 

-    (COMMA fname = stringExpression ASSIGN_EQUAL obj1 = argument {map.put(fname,obj1);})*)?

-    )? RPAREN

-    {action = ActionFactory.createCreateAction(structure, map, indexes, $blockDeclaration::env);}

-    ;

-

-

-actionMarkTable returns [AbstractRutaAction action = null]

-@init {

-	Map<IStringExpression, INumberExpression> map = new HashMap<IStringExpression, INumberExpression>();

-}

-    :

-    name = MARKTABLE LPAREN 

-    structure = typeExpression COMMA 

-    index = numberExpression COMMA

-    table = wordTableExpression 

-    COMMA  ( (ignoreCase =booleanExpression)=>ignoreCase = booleanExpression 

-    COMMA ignoreLength = numberExpression 

-    COMMA ignoreChar = stringExpression

-    COMMA maxIgnoreChar = numberExpression COMMA)?

-     key = stringExpression ASSIGN_EQUAL value = numberExpression{map.put(key,value);} 

-    ( COMMA key = stringExpression ASSIGN_EQUAL value = numberExpression{map.put(key,value);} )*

-

-    RPAREN

-

-

-    {action = ActionFactory.createMarkTableAction(structure, index, table, map, ignoreCase, ignoreLength, ignoreChar, maxIgnoreChar,$blockDeclaration::env);}

-    ;

- 

-actionGather returns [AbstractRutaAction action = null]

-@init {

-	Map<IStringExpression, IRutaExpression> map = new HashMap<IStringExpression, IRutaExpression>();

-    	List<INumberExpression> indexes = new ArrayList<INumberExpression>();

-}

-    :

-    name = GATHER LPAREN structure = typeExpression 

-   (COMMA 

-    ((index = numberExpression)=>index = numberExpression {indexes.add(index);} ((COMMA index = numberExpression)=>(COMMA index = numberExpression) {indexes.add(index);})* COMMA)?

-    (fname = stringExpression ASSIGN_EQUAL (obj1 = numberExpression | obj2 = numberListExpression) {map.put(fname,obj1 != null? obj1 : obj2);} 

-    (COMMA fname = stringExpression ASSIGN_EQUAL (obj1 = numberExpression | obj2 = numberListExpression) {map.put(fname,obj1 != null? obj1 : obj2);})*)?

-    )? RPAREN

-    {action = ActionFactory.createGatherAction(structure, map, indexes, $blockDeclaration::env);}

-    ;  

-

-  

-

-actionFill returns [AbstractRutaAction action = null]

-@init {

-Map<IStringExpression, IRutaExpression> map = new HashMap<IStringExpression, IRutaExpression>();

-}

-    :

-    FILL LPAREN type = typeExpression (COMMA fname = stringExpression ASSIGN_EQUAL 

-    (

-    obj1 = argument{map.put(fname,obj1);} 

-    )

-    )+ RPAREN

-    {action = ActionFactory.createFillAction(type, map, $blockDeclaration::env);}

-    ;

-    

-actionColor returns [AbstractRutaAction action = null]

-    :   

-    COLOR LPAREN type = typeExpression 

-    

-    COMMA 

-    bgcolor = stringExpression 

-    (COMMA

-    fgcolor = stringExpression 

-    (COMMA

-    selected = booleanExpression)?)?

-    RPAREN

-    {action = ActionFactory.createColorAction(type, bgcolor, fgcolor, selected, $blockDeclaration::env);}

-    ;

-

-actionDel returns [AbstractRutaAction action = null]

-    :   

-    DEL

-    {action = ActionFactory.createDelAction($blockDeclaration::env);}

-    ;

-        

-actionLog returns [AbstractRutaAction action = null]

-    :   

-    LOG LPAREN lit = stringExpression (COMMA log = LogLevel)? RPAREN

-    {action = ActionFactory.createLogAction(lit, log, $blockDeclaration::env);}

-    ;

-

-actionMark returns [AbstractRutaAction action = null]

-@init {

-List<INumberExpression> list = new ArrayList<INumberExpression>();

-}

-    :   

-    MARK LPAREN 

-    type = typeExpression

-    (

-        COMMA (index = numberExpression) => index = numberExpression

-        {list.add(index);}

-    )*

-     RPAREN

-    

-    {action = ActionFactory.createMarkAction(null, type, list, $blockDeclaration::env);}

-    ;

-

-actionShift returns [AbstractRutaAction action = null]

-@init {

-List<INumberExpression> list = new ArrayList<INumberExpression>();

-}

-    :   

-    SHIFT LPAREN 

-    type = typeExpression

-    (

-        COMMA (index = numberExpression) => index = numberExpression

-        {list.add(index);}

-    )*

-     RPAREN

-    

-    {action = ActionFactory.createShiftAction(type, list,$blockDeclaration::env);}

-    ;

-

-

-actionMarkScore returns [AbstractRutaAction action = null]

-@init {

-List<INumberExpression> list = new ArrayList<INumberExpression>();

-}

-    :   

-    MARKSCORE LPAREN 

-    score = numberExpression COMMA

-    type = typeExpression

-    (

-        COMMA (index = numberExpression) => index = numberExpression

-        {list.add(index);}

-    )*

-     RPAREN

-    

-    {action = ActionFactory.createMarkAction(score, type, list, $blockDeclaration::env);}

-    ;

-

-actionMarkOnce returns [AbstractRutaAction action = null]

-@init {

-List<INumberExpression> list = new ArrayList<INumberExpression>();

-}

-    :   

-    MARKONCE LPAREN ((score = numberExpression) => score = numberExpression COMMA)? (type = typeExpression) => type = typeExpression

-    (

-        COMMA (index = numberExpression) => index = numberExpression

-        {list.add(index);}

-    )* RPAREN

-    

-    {action = ActionFactory.createMarkOnceAction(score, type, list,$blockDeclaration::env);}

-    ;

-

-actionMarkFast returns [AbstractRutaAction action = null]

-    :   

-    MARKFAST LPAREN type = typeExpression COMMA (list1 = wordListExpression | list2 = stringListExpression) 

-    (COMMA ignore = booleanExpression (COMMA ignoreLength = numberExpression (COMMA ignoreWS = booleanExpression)?)?)? RPAREN

-    {if(list1 != null) {

-     action = ActionFactory.createMarkFastAction(type, list1, ignore, ignoreLength, ignoreWS, $blockDeclaration::env);

-    } else {

-     action = ActionFactory.createMarkFastAction(type, list2, ignore, ignoreLength, ignoreWS, $blockDeclaration::env);

-    }

-    }

-    ;

-

-actionMarkLast returns [AbstractRutaAction action = null]

-    :   

-    MARKLAST LPAREN type = typeExpression RPAREN

-    {action = ActionFactory.createMarkLastAction(type, $blockDeclaration::env);}

-    ;

-    

-actionMarkFirst returns [AbstractRutaAction action = null]

-    :   

-    MARKFIRST LPAREN type = typeExpression RPAREN

-    {action = ActionFactory.createMarkFirstAction(type, $blockDeclaration::env);}

-    ;

-

-actionReplace returns [AbstractRutaAction action = null]

-    :   

-    REPLACE LPAREN lit = stringExpression RPAREN

-    {action = ActionFactory.createReplaceAction(lit, $blockDeclaration::env);}

-    ;

-    

-  

-

-actionRetainType returns [AbstractRutaAction action = null]

-@init {

-List<TypeExpression> list = new ArrayList<TypeExpression>();

-}

-    :   

-    RETAINTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)?

-    {action = ActionFactory.createRetainTypeAction(list, $blockDeclaration::env);}

-    ;   

-    

- 

-

-actionFilterType returns [AbstractRutaAction action = null]

-@init {

-List<TypeExpression> list = new ArrayList<TypeExpression>();

-}

-    :   

-    FILTERTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)?

-    {action = ActionFactory.createFilterTypeAction(list,$blockDeclaration::env);}

-    ;       

-

-actionCall returns [AbstractRutaAction action = null]

-    :

-    CALL LPAREN ns = dottedIdentifier RPAREN

-    {action = ActionFactory.createCallAction(ns, $blockDeclaration::env);}

-    ;

-

-

-actionConfigure returns [AbstractRutaAction action = null]

-@init {

-	Map<IStringExpression, IRutaExpression> map = new HashMap<IStringExpression, IRutaExpression>();

-}

-

-    :

-    CONFIGURE LPAREN ns = dottedIdentifier  

-   COMMA 

-   fname = stringExpression ASSIGN_EQUAL obj1 = argument {map.put(fname,obj1);} 

-    (COMMA fname = stringExpression ASSIGN_EQUAL obj1 = argument {map.put(fname,obj1);})*

-    RPAREN

-    {action = ActionFactory.createConfigureAction(ns, map, $blockDeclaration::env);}

-    ;

-

-

-actionExec returns [AbstractRutaAction action = null]

-    :

-    EXEC LPAREN ((stringExpression)=> view = stringExpression COMMA)? ns = dottedIdentifier (COMMA tl = typeListExpression)? RPAREN

-    {action = ActionFactory.createExecAction(ns, tl, view, $blockDeclaration::env);}

-    ;    

-    

-actionAssign returns [AbstractRutaAction action = null]

-    :

-    name = ASSIGN LPAREN

-    (

-    {isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "TYPE")}? 

-        nv = Identifier COMMA e1 = typeExpression 

-        {action = ActionFactory.createAssignAction(nv, e1,$blockDeclaration::env);}

-    |

-    {isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "BOOLEAN")}? 

-        nv = Identifier COMMA e2 = booleanExpression 

-        {action = ActionFactory.createAssignAction(nv, e2,$blockDeclaration::env);}

-    |

-    {isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "STRING")}? 

-        nv = Identifier COMMA e3 = stringExpression 

-        {action = ActionFactory.createAssignAction(nv, e3,$blockDeclaration::env);}

-    |

-    {isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "INT")}? 

-        nv = Identifier COMMA e4 = numberExpression 

-        {action = ActionFactory.createAssignAction(nv, e4,$blockDeclaration::env);}

-    |

-     {isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "FLOAT")}? 

-        nv = Identifier COMMA e6 = numberExpression 

-        {action = ActionFactory.createAssignAction(nv, e6,$blockDeclaration::env);}

-    |

-    {isVariableOfType($blockDeclaration::env, input.LT(1).getText(), "DOUBLE")}? 

-        nv = Identifier COMMA e5 = numberExpression 

-        {action = ActionFactory.createAssignAction(nv, e5,$blockDeclaration::env);}

-    ) RPAREN

-    ;

-

-actionSetFeature returns [AbstractRutaAction action = null]

-    :   

-    name = SETFEATURE LPAREN f = stringExpression COMMA v = argument RPAREN

-    {action = ActionFactory.createSetFeatureAction(f, v, $blockDeclaration::env);}

-    ;

-

-

-actionGetFeature returns [AbstractRutaAction action = null]

-    :   

-    name = GETFEATURE LPAREN f = stringExpression COMMA v = variable RPAREN

-    {action = ActionFactory.createGetFeatureAction(f, v, $blockDeclaration::env);}

-    ;

-

-//unknown

-actionDynamicAnchoring returns [AbstractRutaAction action = null]

-    :

-    name = DYNAMICANCHORING LPAREN active = booleanExpression 

-    (COMMA penalty = numberExpression 

-    (COMMA factor = numberExpression)?)? 

-    {action = ActionFactory.createDynamicAnchoringAction(active, penalty, factor, $blockDeclaration::env);}

-    RPAREN

-    ;

-

-actionGreedyAnchoring returns [AbstractRutaAction action = null]

-    :

-    name = GREEDYANCHORING LPAREN active = booleanExpression (COMMA active2 = booleanExpression )?

-    {action = ActionFactory.createGreedyAnchoringAction(active, active2, $blockDeclaration::env);}

-    RPAREN

-    ;

-

-actionTrim returns [AbstractRutaAction action = null]

-@init {

-  List<TypeExpression> types = new ArrayList<TypeExpression>();

-}

-    :

-    name = TRIM LPAREN 

-    (

-    typeList = typeListExpression

-    |

-    t1 = typeExpression {types.add(t1);} (COMMA t2 = typeExpression {types.add(t2);})*

-    )

-    

-    {action = ActionFactory.createTrimAction(types, typeList, $blockDeclaration::env);}

-    RPAREN

-    ;

-

-

-

-actionUnmark returns [AbstractRutaAction action = null]

-@init {

-List<INumberExpression> list = new ArrayList<INumberExpression>();

-}

-    :

-    name = UNMARK LPAREN 

-    

-    f = typeExpression 

-

-    (COMMA 

-    (

-  	(b = booleanExpression)=> b = booleanExpression

-  	|

-  	(

-  	index = numberExpression {list.add(index);} 

-  	(COMMA index = numberExpression {list.add(index);})*

-  	)

-    )

-      

-    )?

-

-     RPAREN

-    {action = ActionFactory.createUnmarkAction(f, list, b,$blockDeclaration::env);}

-    ;

-

-

-actionUnmarkAll returns [AbstractRutaAction action = null]

-    :

-    name = UNMARKALL LPAREN f = typeExpression 

-    (COMMA list = typeListExpression)? RPAREN

-    {action = ActionFactory.createUnmarkAllAction(f, list, $blockDeclaration::env);}

-    ;

-

-actionTransfer returns [AbstractRutaAction action = null]

-    :

-    name = TRANSFER LPAREN f = typeExpression RPAREN

-    {action = ActionFactory.createTransferAction(f, $blockDeclaration::env);}

-    ;

-

-actionTrie returns [AbstractRutaAction action = null]

-@init {

-Map<IStringExpression, IRutaExpression> map = new HashMap<IStringExpression, IRutaExpression>();

-}

-    :

-    name = TRIE LPAREN

-    key = stringExpression ASSIGN_EQUAL 

-    (value = typeExpression{map.put(key,value);} | listValue = untypedListExpression {map.put(key,listValue);}) 

-    (COMMA key = stringExpression ASSIGN_EQUAL 

-    (value = typeExpression{map.put(key,value);} | listValue = untypedListExpression {map.put(key,listValue);}) )*

-    COMMA list = wordListExpression 

-    COMMA ignoreCase = booleanExpression 

-    COMMA ignoreLength = numberExpression 

-    COMMA edit = booleanExpression 

-    COMMA distance = numberExpression 

-    COMMA ignoreChar = stringExpression

-    RPAREN

-    //TODO cost parameter

-    {action = ActionFactory.createTrieAction(list, map, ignoreCase, ignoreLength, edit, distance, ignoreChar,$blockDeclaration::env);}

-    ;

-

-actionAdd returns [AbstractRutaAction action = null]

-@init{

-	List<IRutaExpression> list = new ArrayList<IRutaExpression>();

-} 

-    :

-    name = ADD LPAREN f = listVariable (COMMA a = argument {list.add(a);})+ RPAREN

-    {action = ActionFactory.createAddAction(f, list, $blockDeclaration::env);}

-    ;

-

-actionRemove returns [AbstractRutaAction action = null]

-@init{

-	List<IRutaExpression> list = new ArrayList<IRutaExpression>();

-} 

-    :

-    name = REMOVE LPAREN f = listVariable (COMMA a = argument {list.add(a);})+ RPAREN

-    {action = ActionFactory.createRemoveAction(f, list, $blockDeclaration::env);}

-    ;

- 

-actionRemoveDuplicate returns [AbstractRutaAction action = null]

-    :

-    name = REMOVEDUPLICATE LPAREN f = listVariable RPAREN

-    {action = ActionFactory.createRemoveDuplicateAction(f,$blockDeclaration::env);}

-    ; 

-    

-actionMerge returns [AbstractRutaAction action = null]

-@init{

-	List<ListExpression> list = new ArrayList<ListExpression>();

-} 

-    :

-    name = MERGE LPAREN join = booleanExpression COMMA t = listVariable COMMA f = listExpression {list.add(f);} (COMMA f = listExpression {list.add(f);})+ RPAREN

-    {action = ActionFactory.createMergeAction(join, t, list,$blockDeclaration::env);}

-    ;

-

-actionGet returns [AbstractRutaAction action = null]

-    :

-    name = GET LPAREN f = listExpression COMMA var = variable COMMA op = stringExpression RPAREN

-    {action = ActionFactory.createGetAction(f, var, op,$blockDeclaration::env);}

-    ;

-

-actionGetList returns [AbstractRutaAction action = null]

-    :

-    name = GETLIST LPAREN var = listVariable COMMA op = stringExpression RPAREN

-    {action = ActionFactory.createGetListAction(var, op,$blockDeclaration::env);}

-    ;

-

-actionMatchedText returns [AbstractRutaAction action = null]

-@init {

-List<INumberExpression> list = new ArrayList<INumberExpression>();

-}

-    :   

-    MATCHEDTEXT LPAREN 

-    var = variable

-    (

-        COMMA index = numberExpression

-        {list.add(index);}

-    )*

-     RPAREN

-    

-    {action = ActionFactory.createMatchedTextAction(var, list, $blockDeclaration::env);}

-    ;

-

-actionClear returns [AbstractRutaAction action = null]

-    :

-    name = CLEAR LPAREN var = listVariable RPAREN

-    {action = ActionFactory.createClearAction(var, $blockDeclaration::env);}

-    ;

-

-actionAddRetainType returns [AbstractRutaAction action = null]

-@init {

-List<TypeExpression> list = new ArrayList<TypeExpression>();

-}

-    :

-    ADDRETAINTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)

-    {action = ActionFactory.createAddRetainTypeAction(list,$blockDeclaration::env);}

-    ;     

-

-actionRemoveRetainType returns [AbstractRutaAction action = null]

-@init {

-List<TypeExpression> list = new ArrayList<TypeExpression>();

-}

-    :

-    REMOVERETAINTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)

-    {action = ActionFactory.createRemoveRetainTypeAction(list,$blockDeclaration::env);}

-    ;   

-

-actionAddFilterType returns [AbstractRutaAction action = null]

-@init {

-List<TypeExpression> list = new ArrayList<TypeExpression>();

-}

-    :

-    ADDFILTERTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)

-    {action = ActionFactory.createAddFilterTypeAction(list,$blockDeclaration::env);}

-    ;   

-

-actionRemoveFilterType returns [AbstractRutaAction action = null]

-@init {

-List<TypeExpression> list = new ArrayList<TypeExpression>();

-}

-    :

-    REMOVEFILTERTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)

-    {action = ActionFactory.createRemoveFilterTypeAction(list,$blockDeclaration::env);}

-    ;     

-

-varArgumentList returns [List args = new ArrayList()]

-	:

-	arg = argument {args.add(arg);}(COMMA arg = argument {args.add(arg);})*

-	;

-

-argument returns [IRutaExpression expr = null]

-options {

-	backtrack = true;

-}

-	:

-	(featureExpression)=> fe = featureExpression {expr = ExpressionFactory.createGenericFeatureExpression(fe);}

-	| a2 = booleanExpression {expr = a2;}

-	| a3 = numberExpression {expr = a3;}

-	| a4 = stringExpression {expr = a4;}

-	| (listExpression)=> l = listExpression {expr = l;}

-	| a5 = nullExpression {expr = a5;}

-	| a1 = typeExpression {expr = a1;}

-	

-	//(a2 = booleanExpression)=> a2 = booleanExpression {expr = a2;}

-	//| (a3 = numberExpression)=> a3 = numberExpression {expr = a3;}

-	//| (a4 = stringExpression)=> a4 = stringExpression {expr = a4;}

-	//| (a1 = typeExpression)=> a1 = typeExpression {expr = a1;}

-	;

-

-nullExpression returns [IRutaExpression expr = null]

-	:

-	NULL {expr = ExpressionFactory.createNullExpression();}

-	;

-

-

-primitiveArgument returns [IRutaExpression expr = null]

-options {

-	backtrack = true;

-}

-	:

-	 a4 = simpleStringExpression {expr = a4;}

-	| a2 = simpleBooleanExpression {expr = a2;}

-	| a3 = simpleNumberExpression {expr = a3;}

-	| a1 = simpleTypeExpression {expr = a1;}

-	//token = (

-	//(booleanExpression[par]) => booleanExpression[par]

-	//| (numberExpression[par]) => numberExpression[par]

-	//| (stringExpression[par]) => stringExpression[par]

-	//| (typeExpression[par]) => typeExpression[par]

-	//)

-	//{arg = token;}

-	;	

-

-dottedIdentifier returns [String idString = ""]

-	:

-	id = Identifier {idString += id.getText();}

-	(

-		dot = DOT {idString += dot.getText();}

-		idn = Identifier {idString += idn.getText();}

-	)*

-	;

-

-dottedIdentifier2 returns [String idString = ""]

-	:

-	id = Identifier {idString += id.getText();}

-	(

-		dot = (DOT|MINUS) {idString += dot.getText();}

-		idn = Identifier {idString += idn.getText();}

-	)*

-	;

-

-//snooze	

-dottedId returns [Token token = null ]

-@init {CommonToken ct = null;}

-	:

-	id = Identifier {

-		ct = new CommonToken(id);

-		}

-	(

-		dot = DOT {ct.setText(ct.getText() + dot.getText());}

-		id = Identifier {ct.setStopIndex(getBounds(id)[1]);

-		                 ct.setText(ct.getText() + id.getText());}

-	)*

-	{token = ct;

-	 return token;}

-	;

-dottedId2 returns [Token token = null ]

-@init {CommonToken ct = null;}

-	:

-	id = Identifier {

-		ct = new CommonToken(id);

-		}

-	(

-		dot = DOT {ct.setText(ct.getText() + dot.getText());}

-		id = Identifier {ct.setStopIndex(getBounds(id)[1]);

-		                 ct.setText(ct.getText() + id.getText());}

-	)+

-	{token = ct;

-	 return token;}

-	;

-

-annotationType returns [Token ref = null]

-	: 

-	(

-	did = dottedId {ref = did;}

-	)

-	;

-

-wordListExpression returns [WordListExpression expr = null]

-@init  {

-List<IStringExpression> args = new ArrayList<IStringExpression>();

-}

-	:

-	RESOURCE LPAREN name = dottedId (COMMA arg = stringExpression {args.add(arg);} )* RPAREN

-	{expr = ExpressionFactory.createExternalWordListExpression(name, args);}

-	|

-	id = Identifier

-	{expr = ExpressionFactory.createReferenceWordListExpression(id);}

-	|

-	path = RessourceLiteral

-	{expr = ExpressionFactory.createLiteralWordListExpression(path);}

-	;

-

-

-wordTableExpression returns [WordTableExpression expr = null]

-@init  {

-List<IStringExpression> args = new ArrayList<IStringExpression>();

-}

-	:

-	RESOURCE LPAREN name = dottedId (COMMA arg = stringExpression {args.add(arg);} )* RPAREN

-	{expr = ExpressionFactory.createExternalWordTableExpression(name, args);}

-	|

-	id = Identifier

-	{expr = ExpressionFactory.createReferenceWordTableExpression(id);}

-	|

-	path = RessourceLiteral

-	{expr = ExpressionFactory.createLiteralWordTableExpression(path);}

-	;

-

-// not checked

-numberFunction returns [INumberExpression expr = null]

-	:

-	(op=(EXP | LOGN | SIN | COS | TAN) numExprP=numberExpressionInPar)

-	{expr = ExpressionFactory.createComposedNumberExpression(numExprP,op);}

-	//| {root = ExpressionFactory.createNumberFunction(numExprP,op)}

-	| (e = externalNumberFunction)=> e = externalNumberFunction {expr = e;}

-	;

-

-

-// not checked

-externalNumberFunction returns [INumberExpression expr = null]

-	:

-	{isNumberFunctionExtension(input.LT(1).getText())}? 

-	id = Identifier LPAREN

-	args = varArgumentList? RPAREN

-	{

-		expr = external.createExternalNumberFunction(id, args);

-	}

-	;

-

-numberVariable returns [Token ref = null]

-	:

-	{isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "INT")}? token1 = Identifier {ref = token1;}

-	| {isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "DOUBLE")}? token2 = Identifier {ref = token2;}

-	| {isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "FLOAT")}? token2 = Identifier {ref = token2;}

-	;

-

-

-additiveExpression returns [INumberExpression expr = null]

-@init{List<INumberExpression> exprs = new ArrayList<INumberExpression>();

-	List<Token> ops = new ArrayList<Token>();}

-	:   

-	e = multiplicativeExpression{exprs.add(e);} ((PLUS | MINUS)=> op = (PLUS | MINUS){ops.add(op);} e = multiplicativeExpression{exprs.add(e);} )*

-	{expr = ExpressionFactory.createComposedNumberExpression(exprs,ops);}

-	;

-

-multiplicativeExpression returns [INumberExpression expr = null]

-@init{List<INumberExpression> exprs = new ArrayList<INumberExpression>();

-	List<Token> ops = new ArrayList<Token>();}

-	:	

-	(e = simpleNumberExpression{exprs.add(e);} (( STAR | SLASH | PERCENT )=> op = ( STAR | SLASH | PERCENT ){ops.add(op);} e = simpleNumberExpression{exprs.add(e);} )*

-	{expr = ExpressionFactory.createComposedNumberExpression(exprs,ops);}

-	|   e1 = numberFunction {expr = e1;})

-	;

-

-numberExpression returns [INumberExpression expr = null]

-	:

-	e = additiveExpression {expr = e;}

-	;

-

-numberExpressionInPar returns [INumberExpression expr = null]

-	:

-	LPAREN  e = additiveExpression RPAREN {expr = e;}

-	;

-

-simpleNumberExpression returns [INumberExpression expr = null]

-	:

-	(featureExpression)=> fe = featureExpression {expr = ExpressionFactory.createNumberFeatureExpression(fe);}	

-	| m = MINUS? lit = DecimalLiteral {expr = ExpressionFactory.createIntegerExpression(lit,m);} 

-	// TODO what about float numbers?

-	| m = MINUS? lit = FloatingPointLiteral {expr = ExpressionFactory.createDoubleExpression(lit,m);}

-	| m = MINUS? var = numberVariable {expr = ExpressionFactory.createReferenceNumberExpression(var,m);}

-	| e = numberExpressionInPar {expr = e;}

-	;

-	

-stringExpression returns [IStringExpression expr = null]

-options {

-	backtrack = true;

-}

-@init {

-List<IStringExpression> exprs = new ArrayList<IStringExpression>();

-}

-	:

-	(featureExpression)=> fe = featureExpression {expr = ExpressionFactory.createStringFeatureExpression(fe);}

-	| e = simpleStringExpression {exprs.add(e);} 

-	((PLUS)=>PLUS (e1 = simpleStringExpression {exprs.add(e1);} 

-		| e2 = numberExpressionInPar {exprs.add(e2);}

-		| be = simpleBooleanExpression {exprs.add(be);}

-		| te = typeExpression {exprs.add(te);}

-		| le = listExpression {exprs.add(le);}

-		))*

-	{expr = ExpressionFactory.createComposedStringExpression(exprs);}

-	|(e = stringFunction)=> e = stringFunction{expr = e;} 

-	;

-

-// not checked

-stringFunction returns [IStringExpression expr = null]

-@init {List<IStringExpression> list = new ArrayList<IStringExpression>();}

-:

-	name = REMOVESTRING LPAREN var = variable (COMMA t = stringExpression {list.add(t);})+ RPAREN

-	{expr = StringFunctionFactory.createRemoveFunction(var,list);}

-	|

-	(e = externalStringFunction)=> e = externalStringFunction {expr = e;}

-	;

-

-// not checked

-externalStringFunction returns [IStringExpression expr = null]

-	:

-	{isStringFunctionExtension(input.LT(1).getText())}? 

-	id = Identifier LPAREN

-	args = varArgumentList?	RPAREN

-	{

-		expr = external.createExternalStringFunction(id, args);

-	}

-	;

-

-simpleStringExpression returns [IStringExpression expr = null]

-	: 

-	lit = StringLiteral {expr = ExpressionFactory.createSimpleStringExpression(lit);} 

-	| {isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "STRING")}? id = Identifier {expr = ExpressionFactory.createReferenceStringExpression(id);} 

-	;

-

-

-booleanExpression returns [IBooleanExpression expr = null]

-	:

-	(featureExpression)=> fe = featureExpression {expr = ExpressionFactory.createBooleanFeatureExpression(fe);}

-	| (e = composedBooleanExpression)=> e = composedBooleanExpression {expr = e;}

-	|sbE =  simpleBooleanExpression {expr = sbE;}

-	

-	;

-

-simpleBooleanExpression returns [IBooleanExpression expr = null]

-	:

-	 e = literalBooleanExpression {expr = e;}

-	| {isVariableOfType($blockDeclaration::env,input.LT(1).getText(), "BOOLEAN")}? 

-	id = Identifier {expr = ExpressionFactory.createReferenceBooleanExpression(id);} 

-	;

-

-// not checked

-composedBooleanExpression returns [IBooleanExpression expr = null]

-

-	:

-	(e2 = booleanCompare)=> e2 = booleanCompare {expr = e2;}

-	| (bte = booleanTypeExpression)=> bte = booleanTypeExpression{expr = bte;}

-	| (bne = booleanNumberExpression)=> bne = booleanNumberExpression{expr = bne;}

-	| e1 = booleanFunction {expr = e1;}

-	| LPAREN ep = booleanExpression RPAREN {expr = ep;}

-	;

-

-// not checked

-booleanFunction returns [IBooleanExpression expr = null]

-

-	:

-	(op = XOR LPAREN e1 = booleanExpression COMMA e2 = booleanExpression RPAREN)

-	{expr = ExpressionFactory.createBooleanFunction(op,e1,e2);}

-	| (e = externalBooleanFunction)=> e = externalBooleanFunction {expr = e;}

-	;

-

-// not checked

-externalBooleanFunction returns [IBooleanExpression expr = null]

-	:

-	{isBooleanFunctionExtension(input.LT(1).getText())}? 

-	id = Identifier LPAREN

-	args = varArgumentList? RPAREN

-	{

-		expr = external.createExternalBooleanFunction(id, args);

-	}

-	;

-

-// not checked

-booleanCompare returns [IBooleanExpression expr = null]

-	:

-	(e1 = simpleBooleanExpression op = (EQUAL | NOTEQUAL) e2 = booleanExpression)

-	{expr = ExpressionFactory.createBooleanFunction(op,e1,e2);}

-	;

-

-

-literalBooleanExpression returns  [IBooleanExpression expr = null]

-	:

-	v = TRUE {expr = ExpressionFactory.createSimpleBooleanExpression(v);} 

-	| v = FALSE {expr = ExpressionFactory.createSimpleBooleanExpression(v);}

-	;

-

-

-

-booleanTypeExpression  returns  [IBooleanExpression expr = null]

-	:

-	e1 = typeExpression

-	op = (EQUAL | NOTEQUAL)

-	e2 = typeExpression

-	{expr = ExpressionFactory.createBooleanTypeExpression(e1,op,e2);}

-	;

-	

-booleanNumberExpression  returns  [IBooleanExpression expr = null]

-	:

-	//LPAREN

-	e1 = numberExpression//{exprs.add(e);} 

-	op = (LESS | GREATER | GREATEREQUAL | LESSEQUAL | EQUAL | NOTEQUAL)//{ops.add(op);} 

-	e2 = numberExpression//{exprs.add(e);}

-	//RPAREN

-	{expr = ExpressionFactory.createBooleanNumberExpression(e1,op,e2);}

-	;

-	
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaParser.tokens b/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaParser.tokens
deleted file mode 100644
index 00b7752..0000000
--- a/trunk/ruta-core/src/main/antlr3/org/apache/uima/ruta/parser/RutaParser.tokens
+++ /dev/null
@@ -1,163 +0,0 @@
-STAR=149

-FloatTypeSuffix=125

-OctalLiteral=123

-LOG=37

-CONTAINS=8

-REMOVE=72

-GREATEREQUAL=162

-MARKFAST=41

-CONDITION=102

-MATCHEDTEXT=78

-COUNT=14

-LOGN=111

-DYNAMICANCHORING=58

-NOT=70

-Identifier=135

-ACTION=103

-CLEAR=80

-NOTEQUAL=159

-ENDSWITH=65

-DOUBLELIST=106

-VBAR=151

-RPAREN=137

-CREATE=31

-GREATER=154

-SIN=112

-EXP=110

-CURRENTCOUNT=16

-COS=113

-TAN=114

-TYPELIST=109

-FloatString=94

-LESS=153

-REGEXP=25

-GET=75

-UNMARK=54

-PARTOF=22

-LAST=18

-COMMENT=165

-REMOVEDUPLICATE=73

-UNMARKALL=55

-RBRACK=139

-NEAR=20

-GREEDYANCHORING=59

-LINE_COMMENT=166

-IntegerTypeSuffix=120

-MARKSCORE=39

-REMOVESTRING=79

-TRANSFER=56

-LCURLY=140

-TRIE=7

-FILTERTYPE=47

-MARKFIRST=44

-STRINGLIST=108

-MARKONCE=40

-ScriptString=86

-EngineString=87

-WS=164

-WORDTABLE=11

-WORDLIST=10

-AutomataBlockString=90

-FromString=99

-FloatingPointLiteral=126

-STARTANCHOR=118

-INTLIST=105

-OR=21

-TRIM=60

-JavaIDDigit=134

-FLOATLIST=107

-CALL=48

-Annotation=5

-FALSE=117

-LESSEQUAL=161

-RessourceLiteral=130

-VOTE=27

-Letter=133

-EscapeSequence=127

-SIZE=77

-REMOVEFILTERTYPE=69

-LBRACK=138

-CharacterLiteral=128

-DEL=36

-ATTRIBUTE=34

-TypeString=91

-SHIFT=57

-Exponent=124

-THEN2=82

-ASSIGN_EQUAL=155

-RETAINTYPE=46

-AND=12

-TypeSystemString=97

-BlockString=89

-ADDFILTERTYPE=68

-IntString=92

-HexDigit=119

-COLOR=35

-POSITION=24

-LPAREN=136

-IF=28

-LogLevel=83

-CONFIGURE=50

-SLASH=150

-THEN=81

-FILL=33

-COMMA=145

-IS=63

-GETLIST=76

-REPLACE=45

-AMPER=152

-AsString=100

-WILDCARD=163

-EQUAL=158

-GATHER=32

-INLIST=17

-PLUS=147

-BooleanString=96

-GETFEATURE=53

-DOT=143

-ListIdentifier=6

-PARTOFNEQ=23

-ADD=71

-BOOLEANLIST=104

-MARKTABLE=42

-HexLiteral=121

-XOR=115

-MARK=38

-PERCENT=156

-PackageString=85

-PARSE=30

-OldColor=84

-MERGE=74

-MARKLAST=43

-CONTEXTCOUNT=13

-BEFORE=61

-EXEC=49

-ImportString=98

-AFTER=62

-MINUS=148

-DecimalLiteral=122

-TRUE=116

-SEMI=146

-FEATURE=29

-SymbolString=101

-StringString=95

-StringLiteral=129

-COLON=144

-SCORE=26

-QUESTION=157

-ADDRETAINTYPE=66

-UnicodeEscape=131

-STARTSWITH=64

-RCURLY=141

-ASSIGN=51

-REMOVERETAINTYPE=67

-TOTALCOUNT=15

-UimafitString=88

-DECLARE=9

-DocComment=4

-MOFN=19

-SETFEATURE=52

-OctalEscape=132

-DoubleString=93

-CIRCUMFLEX=142

-ALT_NOTEQUAL=160

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/BlockApply.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/BlockApply.java
deleted file mode 100644
index 9d79116..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/BlockApply.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.rule.RuleApply;

-

-public class BlockApply extends ScriptApply {

-

-  public BlockApply(RutaElement element) {

-    super(element);

-  }

-

-  private List<ScriptApply> innerApplies = new ArrayList<ScriptApply>();

-

-  private RuleApply ruleApply;

-

-  public void add(ScriptApply apply) {

-    innerApplies.add(apply);

-  }

-

-  public List<ScriptApply> getInnerApplies() {

-    return innerApplies;

-  }

-

-  @Override

-  public String toString() {

-    StringBuilder result = new StringBuilder();

-    for (ScriptApply each : getInnerApplies()) {

-      result.append(each.toString());

-      result.append("\n");

-    }

-    return result.toString() + " : " + hashCode();

-  }

-

-  public RuleApply getRuleApply() {

-    return ruleApply;

-  }

-

-  public void setRuleApply(RuleApply ruleApply) {

-    this.ruleApply = ruleApply;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
deleted file mode 100644
index 46fc7f6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Set;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.ConstraintFactory;

-import org.apache.uima.cas.FSIntConstraint;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.FSMatchConstraint;

-import org.apache.uima.cas.FeaturePath;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.constraint.BasicTypeConstraint;

-import org.apache.uima.ruta.constraint.NotConstraint;

-

-public class FilterManager {

-

-  private final Collection<Type> defaultFilterTypes;

-

-  private final FSMatchConstraint additionalWindow;

-

-  private final AnnotationFS windowAnnotation;

-

-  private final Type windowType;

-

-  private Collection<Type> currentFilterTypes;

-

-  private Collection<Type> currentRetainTypes;

-

-  private ConstraintFactory cf;

-

-  private final CAS cas;

-

-  private Set<Type> currentHiddenTypes;

-

-  public FilterManager(Collection<Type> filterTypes, CAS cas) {

-    super();

-    this.defaultFilterTypes = filterTypes;

-

-    currentFilterTypes = new ArrayList<Type>();

-    currentRetainTypes = new ArrayList<Type>();

-

-    cf = cas.getConstraintFactory();

-

-    this.windowAnnotation = null;

-    this.windowType = null;

-    this.additionalWindow = null;

-

-    this.cas = cas;

-  }

-

-  public FilterManager(Collection<Type> defaultFilterTypes, Collection<Type> filterTypes,

-          Collection<Type> retainTypes, AnnotationFS windowAnnotation, Type windowType, CAS cas) {

-    super();

-    this.defaultFilterTypes = defaultFilterTypes;

-

-    currentFilterTypes = new ArrayList<Type>(filterTypes);

-    currentRetainTypes = new ArrayList<Type>(retainTypes);

-

-    cf = cas.getConstraintFactory();

-

-    this.windowAnnotation = windowAnnotation;

-    this.windowType = windowType;

-    this.additionalWindow = createWindowConstraint(windowAnnotation, cas);

-

-    this.cas = cas;

-  }

-

-  private FSMatchConstraint createWindowConstraint(AnnotationFS windowAnnotation, CAS cas) {

-    if (windowAnnotation == null)

-      return null;

-    FeaturePath beginFP = cas.createFeaturePath();

-    Type type = windowAnnotation.getType();

-    beginFP.addFeature(type.getFeatureByBaseName("begin"));

-    FSIntConstraint intConstraint = cf.createIntConstraint();

-    intConstraint.geq(windowAnnotation.getBegin());

-    FSMatchConstraint beginConstraint = cf.embedConstraint(beginFP, intConstraint);

-

-    FeaturePath endFP = cas.createFeaturePath();

-    endFP.addFeature(type.getFeatureByBaseName("end"));

-    intConstraint = cf.createIntConstraint();

-    intConstraint.leq(windowAnnotation.getEnd());

-    FSMatchConstraint endConstraint = cf.embedConstraint(endFP, intConstraint);

-

-    FSMatchConstraint windowConstraint = cf.and(beginConstraint, endConstraint);

-    return windowConstraint;

-  }

-

-  public FSMatchConstraint getDefaultConstraint() {

-    return createCurrentConstraint(true);

-  }

-

-  private FSMatchConstraint createCurrentConstraint(boolean windowConstraint) {

-    Set<Type> filterTypes = new HashSet<Type>();

-    filterTypes.addAll(defaultFilterTypes);

-    filterTypes.addAll(currentFilterTypes);

-    filterTypes.removeAll(currentRetainTypes);

-    for (Type type : currentRetainTypes) {

-      if (type != null) {

-        List<Type> subsumedTypes = cas.getTypeSystem().getProperlySubsumedTypes(type);

-        filterTypes.removeAll(subsumedTypes);

-      }

-    }

-    currentHiddenTypes = filterTypes;

-    FSMatchConstraint typeConstraint = createTypeConstraint(filterTypes);

-

-    FSMatchConstraint constraint = new NotConstraint(typeConstraint);

-    if (additionalWindow != null && windowConstraint) {

-      constraint = cf.and(additionalWindow, constraint);

-    }

-    return constraint;

-  }

-

-  private FSMatchConstraint createTypeConstraint(Collection<Type> types) {

-    BasicTypeConstraint result = new BasicTypeConstraint(types);

-    return result;

-  }

-

-  public void retainTypes(List<Type> list) {

-    currentRetainTypes = list;

-  }

-

-  public void filterTypes(List<Type> list) {

-    currentFilterTypes = list;

-  }

-

-  public void addFilterTypes(List<Type> types) {

-    currentFilterTypes.addAll(types);

-  }

-

-  public void addRetainTypes(List<Type> types) {

-    currentRetainTypes.addAll(types);

-  }

-

-  public void removeFilterTypes(List<Type> types) {

-    currentFilterTypes.removeAll(types);

-  }

-

-  public void removeRetainTypes(List<Type> types) {

-    currentRetainTypes.removeAll(types);

-  }

-

-  public Collection<Type> getDefaultFilterTypes() {

-    return defaultFilterTypes;

-  }

-

-  public FSMatchConstraint getAdditionalWindow() {

-    return additionalWindow;

-  }

-

-  public Collection<Type> getCurrentFilterTypes() {

-    return currentFilterTypes;

-  }

-

-  public Collection<Type> getCurrentRetainTypes() {

-    return currentRetainTypes;

-  }

-

-  public AnnotationFS getWindowAnnotation() {

-    return windowAnnotation;

-  }

-

-  public Type getWindowType() {

-    return windowType;

-  }

-

-  public FSIterator<AnnotationFS> createFilteredIterator(CAS cas, Type basicType) {

-    if (windowAnnotation != null) {

-      FSIterator<AnnotationFS> windowIt = cas.getAnnotationIndex(basicType).subiterator(

-              windowAnnotation);

-      FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(windowIt,

-              createCurrentConstraint(false));

-      return iterator;

-    } else {

-      FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(

-              cas.getAnnotationIndex(basicType).iterator(), createCurrentConstraint(false));

-      return iterator;

-    }

-  }

-

-  public Set<Type> getCurrentHiddenTypes() {

-    return currentHiddenTypes;

-  }

-

-  

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaBlock.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaBlock.java
deleted file mode 100644
index 622fa17..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaBlock.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.List;

-

-import org.apache.uima.UimaContext;

-import org.apache.uima.ruta.rule.RutaRule;

-

-public abstract class RutaBlock extends RutaStatement {

-

-  protected final String name;

-

-  protected RutaEnvironment environment;

-

-  protected RutaRule rule;

-

-  protected List<RutaStatement> elements;

-

-  private String namespace;

-

-  private RutaModule script;

-

-  protected UimaContext context;

-

-  public RutaBlock(RutaBlock parent, String defaultNamespace, UimaContext context) {

-    this(null, null, null, parent, defaultNamespace, context);

-  }

-

-  public RutaBlock(String name, RutaRule rule, List<RutaStatement> elements, RutaBlock parent,

-          String defaultNamespace, UimaContext context) {

-    super(parent);

-    this.name = name;

-    this.rule = rule;

-    this.elements = elements;

-    this.environment = new RutaEnvironment(this);

-    this.namespace = defaultNamespace;

-    this.context = context;

-  }

-

-  public RutaRule getRule() {

-    return rule;

-  }

-

-  public void setRule(RutaRule rule) {

-    this.rule = rule;

-  }

-

-  @Override

-  public RutaEnvironment getEnvironment() {

-    return environment;

-  }

-

-  public List<RutaStatement> getElements() {

-    return elements;

-  }

-

-  public void setElements(List<RutaStatement> elements) {

-    this.elements = elements;

-  }

-

-  public RutaModule getScript() {

-    if (script != null) {

-      return script;

-    } else if (getParent() != null) {

-      return getParent().getScript();

-    } else {

-      // may not happen!

-      assert (false);

-      return null;

-

-    }

-  }

-

-  public void setScript(RutaModule script) {

-    this.script = script;

-  }

-

-  public String getNamespace() {

-    return namespace;

-  }

-

-  public String getName() {

-    return name;

-  }

-

-  public UimaContext getContext() {

-    return context;

-  }

-

-  public void setContext(UimaContext context) {

-    this.context = context;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaElement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaElement.java
deleted file mode 100644
index 986c26d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaElement.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta;

-

-public class RutaElement {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
deleted file mode 100644
index fec87cc..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
+++ /dev/null
@@ -1,897 +0,0 @@
-/*

- * 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.ruta;

-

-import static org.apache.uima.util.Level.SEVERE;

-

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-import java.util.logging.Level;

-import java.util.logging.Logger;

-

-import org.antlr.runtime.CommonToken;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.UimaContext;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;

-import org.apache.uima.resource.ResourceAccessException;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.SimpleBooleanListExpression;

-import org.apache.uima.ruta.expression.list.SimpleNumberListExpression;

-import org.apache.uima.ruta.expression.list.SimpleStringListExpression;

-import org.apache.uima.ruta.expression.list.SimpleTypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.resource.LiteralWordListExpression;

-import org.apache.uima.ruta.expression.resource.LiteralWordTableExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.resource.CSVTable;

-import org.apache.uima.ruta.resource.MultiTreeWordList;

-import org.apache.uima.ruta.resource.RutaResourceLoader;

-import org.apache.uima.ruta.resource.RutaTable;

-import org.apache.uima.ruta.resource.RutaWordList;

-import org.apache.uima.ruta.resource.TreeWordList;

-import org.apache.uima.util.InvalidXMLException;

-import org.springframework.core.io.Resource;

-import org.springframework.core.io.ResourceLoader;

-

-public class RutaEnvironment {

-

-  private final Object annotationTypeDummy = new Object();

-

-  private Map<String, Type> types;

-

-  private Map<String, RutaWordList> wordLists;

-

-  private Map<String, RutaTable> tables;

-

-  private RutaBlock owner;

-

-  /**

-   * Mapping from short type name (e.g. {@code W}) to their disambiguated long type names (e.g.

-   * {@code org.apache.uima.ruta.type.W}).

-   */

-  private Map<String, String> namespaces;

-

-  /**

-   * Mapping from ambiguous short type names to all their possible long type names.

-   */

-  private Map<String, Set<String>> ambiguousTypeAlias;

-

-  /**

-   * Set of imported typesystems.

-   */

-  private Set<String> typesystems;

-

-  /**

-   * An alias from a long to a short name.

-   */

-  private static class Alias {

-    final String longName;

-

-    final String shortName;

-

-    Alias(String longName, String shortName) {

-      this.longName = longName;

-      this.shortName = shortName;

-    }

-  }

-

-  /**

-   * Types that are imported in the environment. Keys are type system descriptors and values are

-   * aliased types.

-   */

-  private Map<String, List<Alias>> typeImports;

-

-  /**

-   * Packages that are imported in the environment without a typesystem specification.

-   *

-   * Keys are package names and values are aliases. An empty string as alias means that all types

-   * from the package should be imported in the default namespace.

-   */

-  private Map<String, List<String>> packageImports;

-

-  /**

-   * Set of types that are declared in the script.

-   */

-  private Set<String> declaredAnnotationTypes;

-

-  private Map<String, Object> variableValues;

-

-  private Map<String, Class<?>> variableTypes;

-

-  private Map<String, Class<?>> availableTypes;

-

-  private Map<String, Class<?>> variableGenericTypes;

-

-  private Map<String, Class<?>> availableListTypes;

-

-  private String[] resourcePaths = null;

-

-  private CAS cas;

-

-  private Map<String, Object> initializedVariables;

-

-  private ResourceManager resourceManager;

-

-  public RutaEnvironment(RutaBlock owner) {

-    super();

-    this.owner = owner;

-

-    types = new HashMap<String, Type>();

-    namespaces = new HashMap<String, String>();

-    ambiguousTypeAlias = new HashMap<String, Set<String>>();

-    typesystems = new HashSet<String>();

-    typeImports = new HashMap<String, List<Alias>>();

-    packageImports = new HashMap<String, List<String>>();

-    declaredAnnotationTypes = new HashSet<String>();

-    wordLists = new HashMap<String, RutaWordList>();

-    tables = new HashMap<String, RutaTable>();

-    variableValues = new HashMap<String, Object>();

-    variableTypes = new HashMap<String, Class<?>>();

-    variableGenericTypes = new HashMap<String, Class<?>>();

-    availableTypes = new HashMap<String, Class<?>>();

-    availableTypes.put("INT", Integer.class);

-    availableTypes.put("STRING", String.class);

-    availableTypes.put("DOUBLE", Double.class);

-    availableTypes.put("FLOAT", Float.class);

-    availableTypes.put("BOOLEAN", Boolean.class);

-    availableTypes.put("TYPE", Type.class);

-    availableTypes.put("CONDITION", AbstractRutaCondition.class);

-    availableTypes.put("ACTION", AbstractRutaAction.class);

-    availableTypes.put("WORDLIST", RutaWordList.class);

-    availableTypes.put("WORDTABLE", RutaTable.class);

-    availableTypes.put("BOOLEANLIST", List.class);

-    availableTypes.put("INTLIST", List.class);

-    availableTypes.put("DOUBLELIST", List.class);

-    availableTypes.put("FLOATLIST", List.class);

-    availableTypes.put("STRINGLIST", List.class);

-    availableTypes.put("TYPELIST", List.class);

-    availableListTypes = new HashMap<String, Class<?>>();

-    availableListTypes.put("BOOLEANLIST", Boolean.class);

-    availableListTypes.put("INTLIST", Integer.class);

-    availableListTypes.put("DOUBLELIST", Double.class);

-    availableListTypes.put("FLOATLIST", Float.class);

-    availableListTypes.put("STRINGLIST", String.class);

-    availableListTypes.put("TYPELIST", Type.class);

-    resourcePaths = getResourcePaths();

-    initializedVariables = new HashMap<String, Object>();

-

-    // Always import BasicTypeSystem

-    addTypeSystem("org.apache.uima.ruta.engine.BasicTypeSystem");

-  }

-

-  /**

-   * Import short type names.

-   *

-   * @param cas

-   *          Cas to initialize the types for.

-   * @param strictImport

-   *          Specify whether all types should be imported (false) or only types

-   */

-  public void initializeTypes(CAS cas, boolean strictImport) {

-    this.cas = cas;

-    try {

-      if (strictImport) {

-        importDeclaredTypes(cas.getTypeSystem());

-        importDeclaredTypesystems(cas.getTypeSystem());

-        importTypeAliases(cas.getTypeSystem());

-        importPackageAliases(cas.getTypeSystem());

-      } else {

-        // import all types known to the cas

-        importAllTypes(cas.getTypeSystem());

-        importTypeAliases(cas.getTypeSystem());

-        importPackageAliases(cas.getTypeSystem());

-      }

-

-      // "Document" can be resolved to "uima.tcas.DocumentAnnotation" or

-      // "org.apache.uima.ruta.type.Document",

-      // we force it to the former

-      ambiguousTypeAlias.remove("Document");

-      namespaces.remove("Document");

-      Type documentType = cas.getTypeSystem().getType(UIMAConstants.TYPE_DOCUMENT);

-      addType("Document", documentType);

-

-      Type annotationType = cas.getJCas().getCasType(org.apache.uima.jcas.tcas.Annotation.type);

-      addType("Annotation", annotationType);

-    } catch (CASException e) {

-      UIMAFramework.getLogger(getClass()).log(SEVERE, "Cannot initialize types.", e);

-    } catch (InvalidXMLException e) {

-      UIMAFramework.getLogger(getClass()).log(SEVERE, "Cannot initialize types.", e);

-    }

-

-  }

-

-  /**

-   * Imports all types that are known to a type system.

-   *

-   * @param ts

-   *          Type system to import.

-   * @throws CASException

-   */

-  private void importAllTypes(TypeSystem ts) throws CASException {

-    Type topType = ts.getTopType();

-    if (topType != null) {

-      List<Type> list = ts.getProperlySubsumedTypes(topType);

-      for (Type type : list) {

-        addType(type);

-      }

-    }

-  }

-

-  /**

-   * Import all types that are declared by the script.

-   *

-   * @param casTS

-   *          Type system containing all known types.

-   * @throws InvalidXMLException

-   *           When import cannot be resolved.

-   */

-  private void importDeclaredTypes(TypeSystem casTS) throws InvalidXMLException {

-    for (String name : declaredAnnotationTypes) {

-      Type type = casTS.getType(name);

-      if (type != null) {

-        addType(type);

-      } else {

-        throw new RuntimeException("Type '" + name + "' not found");

-      }

-    }

-  }

-

-  /**

-   * Import all typesystems that are imported in the script.

-   *

-   * @param casTS

-   *          Type system containing all known types.

-   * @throws InvalidXMLException

-   *           When import cannot be resolved.

-   */

-  private void importDeclaredTypesystems(TypeSystem casTS) throws InvalidXMLException {

-    String[] descriptors = typesystems.toArray(new String[typesystems.size()]);

-    TypeSystemDescription ts = TypeSystemDescriptionFactory

-            .createTypeSystemDescription(descriptors);

-    ts.resolveImports();

-    for (TypeDescription td : ts.getTypes()) {

-      Type type = casTS.getType(td.getName());

-      if (type != null) {

-        addType(type);

-      } else {

-        throw new RuntimeException("Type '" + td.getName() + "' not found");

-      }

-    }

-  }

-

-  /**

-   * Imports all type aliases.

-   *

-   * @param casTS

-   *          Cas type system.

-   */

-  private void importTypeAliases(TypeSystem casTS) {

-    for (List<Alias> aliases : typeImports.values()) {

-      for (Alias alias : aliases) {

-        Type type = casTS.getType(alias.longName);

-        if (type == null) {

-          throw new RuntimeException("Type '" + alias.longName + "' not found");

-        }

-        addType(alias.shortName, casTS.getType(alias.longName));

-      }

-    }

-  }

-

-  /**

-   * Import all packages that are imported by the script.

-   *

-   * @param casTS

-   *          Type system containing all known types.

-   */

-  private void importPackageAliases(TypeSystem casTS) {

-    Iterator<Type> iter = casTS.getTypeIterator();

-    while (iter.hasNext()) {

-      Type type = iter.next();

-      String name = type.getName();

-      String pkg = name.substring(0, Math.max(name.lastIndexOf('.'), 0));

-      List<String> aliases = packageImports.get(pkg);

-      if (aliases != null) {

-        for (String alias : aliases) {

-          if (alias.isEmpty()) {

-            addType(type);

-          } else {

-            addType(alias + "." + type.getShortName(), type);

-          }

-        }

-      }

-    }

-  }

-

-  public String[] getResourcePaths() {

-    if (resourcePaths == null) {

-      RutaBlock parent = owner.getParent();

-      if (parent != null) {

-        return parent.getEnvironment().getResourcePaths();

-      }

-    }

-    return resourcePaths;

-  }

-

-  public void setResourcePaths(String[] resourcePaths) {

-    this.resourcePaths = resourcePaths;

-  }

-

-  public boolean ownsType(String match) {

-    match = expand(match);

-    return types.keySet().contains(match);

-  }

-

-  private String expand(String string) {

-    String complete = namespaces.get(string);

-    if (complete == null) {

-      if (!string.contains(".")) {

-        complete = namespaces.get(string);

-        if (complete == null) {

-          complete = string;

-        }

-      } else {

-        complete = string;

-        String[] split = complete.split("\\p{Punct}");

-        String name = split[split.length - 1];

-        importType(complete, name);

-      }

-    }

-    return complete;

-  }

-

-  /**

-   * Resolves an annotation type.

-   *

-   * @param match

-   *          Annotation type to resolve.

-   * @return Resolved annotation type or null if match is unknown.

-   * @throws IllegalArgumentException

-   *           When {@code match} is ambiguous.

-   */

-  public Type getType(String match) {

-    // make sure that match is not ambiguous

-    Set<String> ambiguousTargets = ambiguousTypeAlias.get(match);

-    if (ambiguousTargets != null) {

-      StringBuilder message = new StringBuilder(match);

-      message.append(" is ambiguous, use one of the following instead : ");

-      for (String target : ambiguousTargets) {

-        message.append(target).append(' ');

-      }

-      throw new IllegalArgumentException(message.toString());

-    }

-

-    // try to resolve match

-    String expanded = expand(match);

-    Type type = types.get(expanded);

-    if (type == null) {

-      RutaBlock parent = owner.getParent();

-      if (parent != null) {

-        type = parent.getEnvironment().getType(match);

-      }

-    }

-    return type;

-  }

-

-  public void addType(String string, Type type) {

-    importType(type.getName(), string);

-    types.put(type.getName(), type);

-  }

-

-  public void addType(Type type) {

-    addType(type.getShortName(), type);

-  }

-

-  public void declareType(String name) {

-    declaredAnnotationTypes.add(name);

-  }

-

-  /**

-   * Add a typesystem to the script.

-   *

-   * @param descriptor

-   *          Type system's descriptor path.

-   */

-  public void addTypeSystem(String descriptor) {

-    typesystems.add(descriptor);

-  }

-

-  /**

-   * Import a type in the current namespace.

-   *

-   * @param longName

-   *          Complete type name.

-   * @param shortName

-   *          Short type name (without namespace).

-   */

-  private void importType(String longName, String shortName) {

-    Set<String> targets = ambiguousTypeAlias.get(shortName);

-    if (targets != null) {

-      // shortName is already ambiguous, add longName to its list of possible targets

-      targets.add(longName);

-    } else {

-      String existing = namespaces.put(shortName, longName);

-

-      if (existing != null && !existing.equals(longName)) {

-        // shortName can now be resolved to "existing" or "longName"

-        targets = new HashSet<String>(2);

-        targets.add(existing);

-        targets.add(longName);

-

-        // add existing mapping and longName to its list of possible targets

-        ambiguousTypeAlias.put(shortName, targets);

-

-        // remove shortName from the namespace because it is ambiguous

-        namespaces.remove(shortName);

-      }

-    }

-  }

-

-  /**

-   * Import a type from a type system.

-   *

-   * @param typesystem

-   *          Typesystem from which to import the type or null.

-   * @param longName

-   *          Type to import.

-   * @param shortName

-   *          Short name to use for this type.

-   */

-  public void importTypeFromTypeSystem(String typesystem, String longName, String shortName) {

-    String key = typesystem != null ? typesystem : "";

-    List<Alias> aliases = typeImports.get(key);

-

-    if (aliases == null) {

-      aliases = new ArrayList<Alias>();

-      typeImports.put(key, aliases);

-    }

-

-    aliases.add(new Alias(longName, shortName));

-  }

-

-  /**

-   * Import a type from a type system.

-   *

-   * The type is aliased by its unqualified name.

-   *

-   * @param typesystem

-   *          Typesystem from which to import the type or null.

-   * @param longName

-   *          Type to import.

-   */

-  public void importTypeFromTypeSystem(String typesystem, String longName) {

-    importTypeFromTypeSystem(typesystem, longName,

-            longName.substring(longName.lastIndexOf('.') + 1));

-  }

-

-  /**

-   * Import all the types from a package.

-   *

-   * @param typesystem

-   *          Type system describing the package to load.

-   * @param packageName

-   *          Package to load or null to load all packages.

-   * @param alias

-   *          Alias of the package. Null or empty string to use no alias.

-   */

-  public void importPackageFromTypeSystem(String typesystem, String packageName, String alias) {

-    TypeSystemDescription tsd = TypeSystemDescriptionFactory

-            .createTypeSystemDescription(typesystem);

-    try {

-      tsd.resolveImports(getResourceManager());

-    } catch (InvalidXMLException e) {

-      throw new RuntimeException("Cannot resolve imports in " + typesystem, e);

-    }

-

-    for (TypeDescription td : tsd.getTypes()) {

-      String qname = td.getName();

-      if (packageName == null

-              || (qname.startsWith(packageName) && qname.indexOf('.', packageName.length() + 1) == -1)) {

-        // td is in packageName

-        if (alias != null) {

-          String shortName = alias + "." + qname.substring(qname.lastIndexOf('.') + 1);

-          importTypeFromTypeSystem(typesystem, qname, shortName);

-        } else {

-          importTypeFromTypeSystem(typesystem, qname);

-        }

-      }

-    }

-  }

-

-  /**

-   * Imports all the packages from the specified type system.

-   *

-   * @param typesystem

-   *          Typesystem to load.

-   * @param alias

-   *          Alias for all the packages.

-   */

-  public void importAllPackagesFromTypeSystem(String typesystem, String alias) {

-    importPackageFromTypeSystem(typesystem, null, alias);

-  }

-

-  /**

-   * Import all the types from a package that are available at runtime.

-   *

-   * @param packageName

-   *          Package to load.

-   * @param alias

-   *          Alias of the package. Null or empty string to use no alias.

-   */

-  public void importPackage(String packageName, String alias) {

-    List<String> aliases = packageImports.get(packageName);

-    if (aliases == null) {

-      aliases = new ArrayList<String>(1);

-      packageImports.put(packageName, aliases);

-    }

-

-    aliases.add(alias == null ? "" : alias);

-  }

-

-  public RutaWordList getWordList(String list) {

-    RutaWordList result = wordLists.get(list);

-    UimaContext context = owner.getContext();

-    Boolean dictRemoveWS = false;

-    if (context != null) {

-      dictRemoveWS = (Boolean) context

-              .getConfigParameterValue(RutaEngine.PARAM_DICT_REMOVE_WS);

-      if (dictRemoveWS == null) {

-        dictRemoveWS = false;

-      }

-    }

-    if (result == null) {

-      if (list.endsWith("txt") || list.endsWith("twl") || list.endsWith("mtwl")) {

-        ResourceLoader resourceLoader = new RutaResourceLoader(getResourcePaths());

-        Resource resource = resourceLoader.getResource(list);

-        if (resource.exists()) {

-          try {

-            if (list.endsWith("mtwl")) {

-              wordLists.put(list, new MultiTreeWordList(resource));

-            } else {

-              wordLists.put(list, new TreeWordList(resource, dictRemoveWS));

-            }

-          } catch (IOException e) {

-            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,

-                    "Error reading word list" + list, e);

-          }

-        } else {

-          Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Can't find " + list + "!");

-        }

-      } else {

-        try {

-          RutaWordList rutaTable = (RutaWordList) context.getResourceObject(list);

-          wordLists.put(list, rutaTable);

-        } catch (ResourceAccessException e) {

-          Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,

-                  "Can't find external resource table" + list, e);

-        }

-      }

-    }

-

-    return wordLists.get(list);

-  }

-

-  public RutaTable getWordTable(String table) {

-    RutaTable result = tables.get(table);

-    if (result == null) {

-      if (table.endsWith("csv")) {

-        ResourceLoader resourceLoader = new RutaResourceLoader(getResourcePaths());

-        Resource resource = resourceLoader.getResource(table);

-        if (resource.exists()) {

-          try {

-            tables.put(table, new CSVTable(resource));

-          } catch (IOException e) {

-            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,

-                    "Error reading csv table " + table, e);

-          }

-        } else {

-          Logger.getLogger(this.getClass().getName())

-                  .log(Level.SEVERE, "Can't find " + table + "!");

-        }

-      } else {

-        try {

-          RutaTable rutaTable = (RutaTable) owner.getContext().getResourceObject(table);

-          tables.put(table, rutaTable);

-        } catch (ResourceAccessException e) {

-          Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,

-                  "Can't find external resource table" + table, e);

-        }

-      }

-    }

-

-    return tables.get(table);

-  }

-

-  public void addVariable(String name, Class<?> type, Class<?> generic) {

-    variableTypes.put(name, type);

-    if (generic != null) {

-      variableGenericTypes.put(name, generic);

-    }

-    variableValues.put(name, getInitialValue(name, type));

-  }

-

-  @SuppressWarnings("unchecked")

-  private Object getInitialValue(String name, Class<?> type) {

-    Object init = initializedVariables.get(name);

-    if (init != null) {

-      if (init instanceof List) {

-        ArrayList<Object> list = new ArrayList<Object>();

-        list.addAll((Collection<? extends Object>) init);

-        return list;

-      }

-      return init;

-    }

-    if (Integer.class.equals(type)) {

-      return 0;

-    } else if (Double.class.equals(type)) {

-      return 0d;

-    } else if (Float.class.equals(type)) {

-      return 0f;

-    } else if (String.class.equals(type)) {

-      return "";

-    } else if (Boolean.class.equals(type)) {

-      return false;

-    } else if (Type.class.equals(type)) {

-      if (cas == null) {

-        return annotationTypeDummy;

-      } else {

-        return cas.getAnnotationType();

-      }

-    } else if (List.class.equals(type)) {

-      return new ArrayList<Object>();

-    }

-    return null;

-  }

-

-  public void addVariable(String name, String type) {

-    addVariable(name, availableTypes.get(type), availableListTypes.get(type));

-  }

-

-  public boolean ownsVariable(String name) {

-    return variableTypes.containsKey(name);

-  }

-

-  public boolean ownsVariableOfType(String name, String type) {

-    Class<?> varclass = variableTypes.get(name);

-    Class<?> aclass = availableTypes.get(type);

-    boolean list = true;

-    if (aclass.equals(List.class)) {

-      Class<?> vt = variableGenericTypes.get(name);

-      Class<?> at = availableListTypes.get(type);

-      list = vt != null && vt.equals(at);

-    }

-    return list && varclass != null && varclass.equals(aclass);

-  }

-

-  public boolean isVariable(String name) {

-    return ownsVariable(name) || owner.getParent().getEnvironment().isVariable(name);

-  }

-

-  public boolean isVariableOfType(String name, String type) {

-    return ownsVariableOfType(name, type)

-            || (owner.getParent() != null && owner.getParent().getEnvironment()

-                    .isVariableOfType(name, type));

-  }

-

-  public Class<?> getVariableType(String name) {

-    Class<?> result = variableTypes.get(name);

-    if (result != null) {

-      return result;

-    } else if (owner.getParent() != null) {

-      return owner.getParent().getEnvironment().getVariableType(name);

-    }

-    return null;

-  }

-

-  public Class<?> getVariableGenericType(String name) {

-    Class<?> result = variableGenericTypes.get(name);

-    if (result != null) {

-      return result;

-    } else if (owner.getParent() != null) {

-      return owner.getParent().getEnvironment().getVariableGenericType(name);

-    }

-    return null;

-  }

-

-  public <T> T getVariableValue(String name, Class<T> type) {

-    boolean containsKey = variableValues.containsKey(name);

-    Object result = variableValues.get(name);

-

-    if (result instanceof String && type.equals(Type.class)) {

-      // "cast" string to type, because initial values were set when there was no cas/type system

-      // yet

-      result = types.get(result);

-    }

-

-    if (containsKey && result == null) {

-      // TODO find the problem with the null values!

-      // this might now work for word lists in another env.

-      return type.cast(getInitialValue(name, type));

-    }

-    if (result == annotationTypeDummy) {

-      return type.cast(cas.getAnnotationType());

-    }

-    if (result != null) {

-      if(RutaWordList.class.isAssignableFrom(type) && result instanceof WordListExpression) {

-        WordListExpression wle = (WordListExpression) result;

-        RutaWordList list = wle.getList(owner);

-        return type.cast(list);

-      } else if(RutaTable.class.isAssignableFrom(type) && result instanceof WordTableExpression) {

-        WordTableExpression wte = (WordTableExpression) result;

-        RutaTable table = wte.getTable(owner);

-        return type.cast(table);

-      } else {

-        return type.cast(result);

-      }

-    } else if (owner.getParent() != null) {

-      return owner.getParent().getEnvironment().getVariableValue(name, type);

-    }

-    return null;

-  }

-

-  public Object getVariableValue(String name) {

-    return getVariableValue(name, Object.class);

-  }

-

-  @SuppressWarnings("rawtypes")

-  public Object getLiteralValue(String var, Object value) {

-    if (ownsVariable(var)) {

-      Class<?> clazz = variableTypes.get(var);

-      if (value instanceof INumberExpression) {

-        INumberExpression ne = (INumberExpression) value;

-        if (clazz.equals(Integer.class)) {

-          return ne.getIntegerValue(owner, null, null);

-        } else if (clazz.equals(Double.class)) {

-          return ne.getDoubleValue(owner, null, null);

-        } else if (clazz.equals(Float.class)) {

-          return ne.getFloatValue(owner, null, null);

-        } else if (clazz.equals(String.class)) {

-          return ne.getStringValue(owner, null, null);

-        }

-      } else if (clazz.equals(String.class) && value instanceof IStringExpression) {

-        IStringExpression se = (IStringExpression) value;

-        return se.getStringValue(owner, null, null);

-      } else if (clazz.equals(Boolean.class) && value instanceof IBooleanExpression) {

-        IBooleanExpression be = (IBooleanExpression) value;

-        return be.getBooleanValue(owner, null, null);

-      }

-      if (clazz.equals(RutaWordList.class) && value instanceof LiteralWordListExpression) {

-        return value;

-      } else if (clazz.equals(RutaWordList.class) && value instanceof String) {

-        return value;

-      } else if (clazz.equals(RutaTable.class) && value instanceof LiteralWordTableExpression) {

-        return value;

-      } else if (clazz.equals(RutaTable.class) && value instanceof String) {

-        return value;

-      } else if (clazz.equals(List.class) && value instanceof ListExpression) {

-        List list = getList((ListExpression) value);

-        return list;

-      } else if (clazz.equals(Type.class) && value instanceof CommonToken) {

-        String typeName = ((CommonToken) value).getText();

-        return typeName;

-      } else if (clazz.equals(Type.class) && value instanceof SimpleTypeExpression) {

-        String typeName = ((SimpleTypeExpression) value).getTypeString();

-        return typeName;

-      }

-

-      return null;

-    } else {

-      return owner.getParent().getEnvironment().getLiteralValue(var, value);

-    }

-  }

-

-  @SuppressWarnings("unchecked")

-  public void setInitialVariableValue(String var, Object value) {

-    if (ownsVariable(var)) {

-      if (value instanceof List) {

-        List<Object> initValue = new ArrayList<Object>();

-        initValue.addAll((Collection<? extends Object>) value);

-        initializedVariables.put(var, initValue);

-      } else {

-        initializedVariables.put(var, value);

-      }

-      setVariableValue(var, value);

-    } else if (owner.getParent() != null) {

-      owner.getParent().getEnvironment().setInitialVariableValue(var, value);

-    }

-  }

-

-  public void setVariableValue(String var, Object value) {

-    if (ownsVariable(var)) {

-      Class<?> clazz = variableTypes.get(var);

-      if (value == null) {

-        value = getInitialValue(var, clazz);

-      }

-      variableValues.put(var, value);

-    } else if (owner.getParent() != null) {

-      owner.getParent().getEnvironment().setVariableValue(var, value);

-    }

-  }

-

-  @SuppressWarnings("rawtypes")

-  private List getList(ListExpression value) {

-    if (value instanceof SimpleBooleanListExpression) {

-      SimpleBooleanListExpression e = (SimpleBooleanListExpression) value;

-      return e.getList();

-    } else if (value instanceof SimpleNumberListExpression) {

-      SimpleNumberListExpression e = (SimpleNumberListExpression) value;

-      return e.getList();

-    } else if (value instanceof SimpleStringListExpression) {

-      SimpleStringListExpression e = (SimpleStringListExpression) value;

-      return e.getList();

-    } else if (value instanceof SimpleTypeListExpression) {

-      SimpleTypeListExpression e = (SimpleTypeListExpression) value;

-      return e.getList();

-    }

-    return null;

-  }

-

-  public void reset(CAS cas) {

-    this.cas = cas;

-    Set<Entry<String, Object>> entrySet = variableValues.entrySet();

-    for (Entry<String, Object> entry : entrySet) {

-      String key = entry.getKey();

-      Object initialValue = getInitialValue(key, variableTypes.get(key));

-      if (initialValue != null) {

-        // not for word lists

-        entry.setValue(initialValue);

-      }

-    }

-  }

-

-  public ResourceManager getResourceManager() {

-    if (resourceManager != null) {

-      return resourceManager;

-    } else {

-      RutaBlock parent = owner.getParent();

-      if (parent != null) {

-        return parent.getEnvironment().getResourceManager();

-      }

-    }

-    // at least return default resource manager

-    return UIMAFramework.newDefaultResourceManager();

-  }

-

-  public void setResourceManager(ResourceManager resourceManager) {

-    this.resourceManager = resourceManager;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaModule.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaModule.java
deleted file mode 100644
index ba1a827..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaModule.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RutaModule extends RutaElement {

-

-  private final RutaBlock rootBlock;

-

-  private Map<String, RutaModule> scripts;

-

-  private Map<String, AnalysisEngine> engines;

-

-  private Map<String, RutaBlock> blocks;

-

-  public RutaModule(RutaBlock rootBlock) {

-    super();

-    this.rootBlock = rootBlock;

-    scripts = new HashMap<String, RutaModule>();

-    engines = new HashMap<String, AnalysisEngine>();

-    blocks = new HashMap<String, RutaBlock>();

-  }

-

-  public ScriptApply apply(RutaStream stream, InferenceCrowd crowd) {

-    crowd.beginVisit(this, null);

-    ScriptApply result = rootBlock.apply(stream, crowd);

-    crowd.endVisit(this, result);

-    return result;

-  }

-

-  public RutaBlock getBlock(String id) {

-    if (id == null || id.equals(rootBlock.getName())) {

-      return rootBlock;

-    }

-    RutaBlock ownBlock = blocks.get(id);

-    if(ownBlock != null) {

-      return ownBlock;

-    }

-    int indexOf = id.indexOf('.');

-    if(indexOf != -1) {

-      String otherScriptName = id.substring(0, indexOf);

-      String tail = id.substring(indexOf + 1, id.length());

-      RutaModule otherScript = getScript(otherScriptName);

-      if(otherScript != null) {

-        return otherScript.getBlock(tail);

-      }

-    } else {

-      RutaModule otherScript = getScript(id);

-      if(otherScript != null) {

-        return otherScript.getBlock(null);

-      }

-    }

-    return null;

-  }

-

-  public RutaModule getScript(String name) {

-    if (name.equals(rootBlock.getName())) {

-      return this;

-    }

-    RutaModule result = scripts.get(name);

-    if (result == null) {

-      for (String each : scripts.keySet()) {

-        String[] split = each.split("\\.");

-        String last = split[split.length - 1];

-        if (last.equals(name)) {

-          return scripts.get(each);

-        }

-      }

-    }

-    return result;

-  }

-

-  public void addScript(String name, RutaModule script) {

-    scripts.put(name, script);

-  }

-

-  public void addBlock(String id, RutaBlock block) {

-    blocks.put(id, block);

-  }

-

-  public void setScriptDependencies(Map<String, RutaModule> additionalScripts) {

-    for (String eachTarget : scripts.keySet()) {

-      RutaModule module = additionalScripts.get(eachTarget);

-      addScript(eachTarget, module);

-    }

-  }

-

-  public AnalysisEngine getEngine(String name) {

-    AnalysisEngine result = engines.get(name);

-    if (result == null) {

-      for (String each : engines.keySet()) {

-        String[] split = each.split("\\.");

-        String last = split[split.length - 1];

-        if (last.equals(name)) {

-          return engines.get(each);

-        }

-      }

-    }

-    return result;

-  }

-

-  public void addEngine(String name, AnalysisEngine engine) {

-    engines.put(name, engine);

-  }

-

-  public void addUimafitEngine(String name, AnalysisEngine engine) {

-    engines.put(name, engine);

-  }

-

-  public void setEngineDependencies(Map<String, AnalysisEngine> additionalEngines) {

-    for (String eachTarget : engines.keySet()) {

-      AnalysisEngine engine = additionalEngines.get(eachTarget);

-      addEngine(eachTarget, engine);

-    }

-  }

-

-  public Map<String, RutaModule> getScripts() {

-    return scripts;

-  }

-

-  public Map<String, RutaBlock> getBlocks() {

-    return blocks;

-  }

-

-  public Map<String, AnalysisEngine> getEngines() {

-    return engines;

-  }

-

-  public RutaBlock getRootBlock() {

-    return rootBlock;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaScriptBlock.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaScriptBlock.java
deleted file mode 100644
index 3856115..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaScriptBlock.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-import org.apache.uima.ruta.rule.RuleApply;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.rule.RutaRule;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RutaScriptBlock extends RutaBlock {

-

-  public RutaScriptBlock(String id, RutaRule rule, List<RutaStatement> elements, RutaBlock parent,

-          String defaultNamespace) {

-    super(id, rule, elements, parent, defaultNamespace, parent != null ? parent.getContext() : null);

-  }

-

-  @Override

-  public ScriptApply apply(RutaStream stream, InferenceCrowd crowd) {

-    BlockApply result = new BlockApply(this);

-    crowd.beginVisit(this, result);

-    RuleApply apply = rule.apply(stream, crowd, true);

-    for (AbstractRuleMatch<? extends AbstractRule> eachMatch : apply.getList()) {

-      if (eachMatch.matched()) {

-        List<AnnotationFS> matchedAnnotations = ((RuleMatch) eachMatch).getMatchedAnnotations(null,

-                null);

-        if (matchedAnnotations == null || matchedAnnotations.isEmpty()) {

-          continue;

-        }

-        AnnotationFS each = matchedAnnotations.get(0);

-        if (each == null) {

-          continue;

-        }

-        List<Type> types = ((RutaRuleElement) rule.getRuleElements().get(0)).getMatcher().getTypes(

-                getParent() == null ? this : getParent(), stream);

-        for (Type eachType : types) {

-          RutaStream window = stream.getWindowStream(each, eachType);

-          for (RutaStatement element : getElements()) {

-            if (element != null) {

-              element.apply(window, crowd);

-            }

-          }

-        }

-      }

-    }

-    crowd.endVisit(this, result);

-    return result;

-  }

-

-  @Override

-  public String toString() {

-    String ruleString = rule == null ? "Document" : rule.toString();

-    int elementSize = elements == null ? 0 : elements.size();

-    return "BLOCK(" + name + ") " + ruleString + " containing " + elementSize + " Elements";

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaScriptFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaScriptFactory.java
deleted file mode 100644
index e06083d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaScriptFactory.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.antlr.runtime.Token;

-import org.apache.uima.UimaContext;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.AbstractRuleElement;

-import org.apache.uima.ruta.rule.ComposedRuleElement;

-import org.apache.uima.ruta.rule.ConjunctRulesRuleElement;

-import org.apache.uima.ruta.rule.RegExpRule;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementContainer;

-import org.apache.uima.ruta.rule.RuleElementIsolator;

-import org.apache.uima.ruta.rule.RutaLiteralMatcher;

-import org.apache.uima.ruta.rule.RutaMatcher;

-import org.apache.uima.ruta.rule.RutaRule;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-import org.apache.uima.ruta.rule.RutaTypeMatcher;

-import org.apache.uima.ruta.rule.WildCardRuleElement;

-import org.apache.uima.ruta.rule.quantifier.MinMaxGreedy;

-import org.apache.uima.ruta.rule.quantifier.MinMaxReluctant;

-import org.apache.uima.ruta.rule.quantifier.PlusGreedy;

-import org.apache.uima.ruta.rule.quantifier.PlusReluctant;

-import org.apache.uima.ruta.rule.quantifier.QuestionGreedy;

-import org.apache.uima.ruta.rule.quantifier.QuestionReluctant;

-import org.apache.uima.ruta.rule.quantifier.RuleElementQuantifier;

-import org.apache.uima.ruta.rule.quantifier.StarGreedy;

-import org.apache.uima.ruta.rule.quantifier.StarReluctant;

-

-public class RutaScriptFactory {

-

-  private int idCounter = 0;

-

-  private UimaContext context;

-

-  public RutaScriptFactory() {

-    super();

-  }

-

-  public RutaScriptBlock createScriptBlock(Token id, RutaRuleElement ruleElement,

-          List<RutaStatement> body, RutaBlock parent) {

-    String text = id == null ? "root" : id.getText();

-    String defaultNamespace = parent.getNamespace();

-    if (id != null) {

-      defaultNamespace = defaultNamespace + "." + text;

-    }

-    return createScriptBlock(text, ruleElement, body, parent, defaultNamespace);

-  }

-

-  public RutaScriptBlock createScriptBlock(String text, RutaRuleElement ruleElement,

-          List<RutaStatement> body, RutaBlock parent, String defaultNamespace) {

-    RutaRule rule = null;

-    if (ruleElement != null) {

-      rule = createRule(ruleElement, parent);

-    }

-    List<RutaStatement> elements = new ArrayList<RutaStatement>();

-    if (body != null) {

-      for (RutaStatement each : body) {

-        if (each != null) {

-          elements.add(each);

-        }

-      }

-    }

-    return new RutaScriptBlock(text, rule, elements, parent, defaultNamespace);

-  }

-

-  public RutaScriptBlock createRootScriptBlock(String module, String pack) {

-    String defaultNamespace = module;

-    if (pack != null) {

-      defaultNamespace = pack + "." + module;

-    }

-    RutaScriptBlock result = createScriptBlock(module, null, null, null, defaultNamespace);

-    List<RuleElement> ruleElements = new ArrayList<RuleElement>();

-    RuleElementIsolator container = new RuleElementIsolator();

-    ruleElements.add(createRuleElement(new MatchReference("uima.tcas.DocumentAnnotation", null,

-            null), null, null, null, container, result));

-    RutaRule createRule = createRule(ruleElements, result);

-    container.setContainer(createRule);

-

-    result.setRule(createRule);

-    result.setContext(context);

-    return result;

-  }

-

-  public RutaRule createRule(RuleElement element, RutaBlock parent) {

-    List<RuleElement> elements = new ArrayList<RuleElement>();

-    elements.add(element);

-    return createRule(elements, parent);

-  }

-

-  public RutaStatement createImplicitRule(List<AbstractRutaAction> actions, RutaBlock parent) {

-    List<RuleElement> elements = new ArrayList<RuleElement>();

-    IRutaExpression documentExpression = new SimpleTypeExpression("Document");

-    RutaRuleElement element = createRuleElement(documentExpression, null, null, actions, null, parent);

-    elements.add(element);

-    RutaRule rule = createRule(elements, parent);

-    element.setContainer(rule.getRoot());

-    return rule;

-  }

-  

-  public RutaRule createRule(List<RuleElement> elements, RutaBlock parent) {

-    return new RutaRule(elements, parent, idCounter++);

-  }

-

-  public RutaRuleElement createRuleElement(IRutaExpression expression,

-          RuleElementQuantifier quantifier, List<AbstractRutaCondition> conditions,

-          List<AbstractRutaAction> actions, RuleElementContainer container, RutaBlock parent) {

-    RutaMatcher matcher = null;

-    if (expression instanceof MatchReference) {

-      matcher = new RutaTypeMatcher((MatchReference) expression);

-    } else if (expression instanceof TypeExpression) {

-      // e.g., for functions

-      MatchReference matchReference = new MatchReference((TypeExpression) expression);

-      matcher = new RutaTypeMatcher(matchReference);

-    } else if (expression instanceof IStringExpression) {

-      matcher = new RutaLiteralMatcher((IStringExpression) expression);

-    }

-    return new RutaRuleElement(matcher, quantifier, conditions, actions, container, parent);

-  }

-

-  public AbstractRuleElement createWildCardRuleElement(List<AbstractRutaCondition> conditions,

-          List<AbstractRutaAction> actions, RuleElementContainer container, RutaBlock parent) {

-    return new WildCardRuleElement(conditions, actions, container, parent);

-  }

-

-  public ComposedRuleElement createComposedRuleElement(List<RuleElement> res,

-          RuleElementQuantifier quantifier, List<AbstractRutaCondition> conditions,

-          List<AbstractRutaAction> actions, RuleElementContainer container, RutaBlock parent) {

-    return new ComposedRuleElement(res, quantifier, conditions, actions, container, parent);

-  }

-

-  public ComposedRuleElement createComposedRuleElement(RuleElementContainer container,

-          RutaBlock parent) {

-    return new ComposedRuleElement(null, null, null, null, container, parent);

-  }

-

-  public static RuleElementQuantifier createStarGreedyQuantifier() {

-    return new StarGreedy();

-  }

-

-  public static RuleElementQuantifier createPlusReluctantQuantifier() {

-    return new PlusReluctant();

-  }

-

-  public static RuleElementQuantifier createStarReluctantQuantifier() {

-    return new StarReluctant();

-  }

-

-  public static RuleElementQuantifier createMinMaxGreedyQuantifier(INumberExpression min,

-          INumberExpression max, Token comma) {

-    return new MinMaxGreedy(min, max, comma != null);

-  }

-

-  public static RuleElementQuantifier createMinMaxReluctantQuantifier(INumberExpression min,

-          INumberExpression max, Token comma) {

-    return new MinMaxReluctant(min, max, comma != null);

-  }

-

-  public static RuleElementQuantifier createPlusGreedyQuantifier() {

-    return new PlusGreedy();

-  }

-

-  public static RuleElementQuantifier createQuestionReluctantQuantifier() {

-    return new QuestionReluctant();

-  }

-

-  public static RuleElementQuantifier createQuestionGreedyQuantifier() {

-    return new QuestionGreedy();

-  }

-

-  public RutaBlock createAutomataBlock(Token id, RutaRuleElement re, List<RutaStatement> body,

-          RutaBlock env) {

-    return createScriptBlock(id, re, body, env);

-  }

-

-  public RegExpRule createRegExpRule(RutaBlock env) {

-    return new RegExpRule(null, null, idCounter++, env);

-  }

-

-  public List<RuleElement> processConjunctRules(List<RuleElement> reList, List<Token> conList,

-          RuleElementContainer container, RutaBlock env) {

-    boolean isConjunct = false;

-    for (Token token : conList) {

-      if (token != null) {

-        isConjunct = true;

-        break;

-      }

-    }

-    if (!isConjunct) {

-      return reList;

-    }

-    Map<Integer, List<RuleElement>> map = new TreeMap<Integer, List<RuleElement>>();

-    List<String> connectors = new ArrayList<String>();

-    int reCounter = 0;

-    int conCounter = 0;

-    for (Token token : conList) {

-      if (token == null) {

-        List<RuleElement> list = map.get(conCounter);

-        if (list == null) {

-          list = new ArrayList<RuleElement>();

-          map.put(conCounter, list);

-        }

-        RuleElement e = reList.get(reCounter);

-        list.add(e);

-        reCounter++;

-      } else {

-        connectors.add(token.getText());

-        conCounter++;

-      }

-    }

-    List<RuleElement> elements = new ArrayList<RuleElement>();

-

-    ConjunctRulesRuleElement cr = new ConjunctRulesRuleElement(null, container, env);

-    for (List<RuleElement> each : map.values()) {

-      ComposedRuleElement cre = createComposedRuleElement(each, null, null, null, cr, env);

-      for (RuleElement ruleElement : each) {

-        ruleElement.setContainer(cre);

-      }

-      elements.add(cre);

-    }

-    cr.setElements(elements);

-    cr.setContainer(null);

-    List<RuleElement> result = new ArrayList<RuleElement>();

-    result.add(cr);

-    return result;

-  }

-

-  public UimaContext getContext() {

-    return context;

-  }

-

-  public void setContext(UimaContext context) {

-    this.context = context;

-  }

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaStatement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaStatement.java
deleted file mode 100644
index b71971d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaStatement.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public abstract class RutaStatement extends RutaElement {

-

-  private RutaBlock parent;

-

-  public RutaStatement(RutaBlock parent) {

-    super();

-    this.parent = parent;

-  }

-

-  public abstract ScriptApply apply(RutaStream stream, InferenceCrowd crowd);

-

-  public abstract RutaEnvironment getEnvironment();

-

-  public RutaBlock getParent() {

-    return parent;

-  }

-

-  public void setParent(RutaBlock parent) {

-    this.parent = parent;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
deleted file mode 100644
index cd569df..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
+++ /dev/null
@@ -1,880 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.LinkedList;

-import java.util.List;

-import java.util.Map.Entry;

-import java.util.NavigableMap;

-import java.util.NoSuchElementException;

-import java.util.Set;

-import java.util.TreeMap;

-import java.util.TreeSet;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.ConstraintFactory;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.FSMatchConstraint;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.impl.FSIteratorImplBase;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-import org.apache.uima.ruta.type.RutaAnnotation;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RutaStream extends FSIteratorImplBase<AnnotationFS> {

-

-  private final CAS cas;

-

-  private FSIterator<AnnotationFS> basicIt;

-

-  private FSIterator<AnnotationFS> currentIt;

-

-  private AnnotationFS documentAnnotation;

-

-  private Type documentAnnotationType;

-

-  private Type basicType;

-

-  private NavigableMap<Integer, RutaBasic> beginAnchors = new TreeMap<Integer, RutaBasic>();

-

-  private NavigableMap<Integer, RutaBasic> endAnchors = new TreeMap<Integer, RutaBasic>();

-

-  private FilterManager filter;

-

-  private boolean dynamicAnchoring;

-

-  private double indexPenalty = 0;

-

-  private double anchoringFactor;

-

-  private boolean lowMemoryProfile;

-

-  private boolean simpleGreedyForComposed;

-

-  private InferenceCrowd crowd;

-

-  private Boolean greedyRuleElement;

-

-  private Boolean greedyRule;

-

-  private boolean onlyOnce = false;

-

-  public RutaStream(CAS cas, Type basicType, FilterManager filter, boolean lowMemoryProfile,

-          boolean simpleGreedyForComposed, InferenceCrowd crowd) {

-    super();

-    this.cas = cas;

-    this.filter = filter;

-    this.basicType = basicType;

-    this.lowMemoryProfile = lowMemoryProfile;

-    this.simpleGreedyForComposed = simpleGreedyForComposed;

-    this.crowd = crowd;

-    AnnotationFS additionalWindow = filter.getWindowAnnotation();

-    updateIterators(cas, basicType, filter, additionalWindow);

-    // really an if? sub it of basic should fix this

-    if (additionalWindow == null) {

-      documentAnnotation = cas.getDocumentAnnotation();

-      documentAnnotationType = getCas().getDocumentAnnotation().getType();

-      basicIt.moveToFirst();

-    } else {

-      documentAnnotation = additionalWindow;

-      documentAnnotationType = filter.getWindowType();

-    }

-  }

-

-  protected RutaStream(CAS cas, Type basicType, NavigableMap<Integer, RutaBasic> beginAnchors,

-          NavigableMap<Integer, RutaBasic> endAnchors, FilterManager filter,

-          boolean lowMemoryProfile, boolean simpleGreedyForComposed, InferenceCrowd crowd) {

-    super();

-    this.cas = cas;

-    this.beginAnchors = beginAnchors;

-    this.endAnchors = endAnchors;

-    this.filter = filter;

-    this.basicType = basicType;

-    this.lowMemoryProfile = lowMemoryProfile;

-    this.simpleGreedyForComposed = simpleGreedyForComposed;

-    this.crowd = crowd;

-    AnnotationFS additionalWindow = filter.getWindowAnnotation();

-    updateIterators(cas, basicType, filter, additionalWindow);

-    // really an if? sub it of basic should fix this

-    if (additionalWindow == null) {

-      documentAnnotation = cas.getDocumentAnnotation();

-      documentAnnotationType = getCas().getDocumentAnnotation().getType();

-      basicIt.moveToFirst();

-    } else {

-      documentAnnotation = additionalWindow;

-      documentAnnotationType = filter.getWindowType();

-    }

-  }

-

-  private void updateIterators(AnnotationFS additionalWindow) {

-    updateIterators(cas, basicType, filter, additionalWindow);

-  }

-

-  private void updateIterators(CAS cas, Type basicType, FilterManager filter,

-          AnnotationFS additionalWindow) {

-    if (additionalWindow != null) {

-      this.basicIt = cas.getAnnotationIndex(basicType).subiterator(additionalWindow);

-    } else {

-      this.basicIt = cas.getAnnotationIndex(basicType).iterator();

-    }

-    currentIt = filter.createFilteredIterator(cas, basicType);

-  }

-

-  public void initalizeBasics() {

-    AnnotationIndex<AnnotationFS> basicIndex = cas.getAnnotationIndex(basicType);

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex();

-    final List<AnnotationFS> allAnnotations = new LinkedList<AnnotationFS>();

-    for (AnnotationFS a : annotationIndex) {

-      if(a.getBegin() != a.getEnd()) {

-        allAnnotations.add(a);

-      }

-    }

-    if (basicIndex.size() == 0) {

-      TreeSet<Integer> anchors = new TreeSet<Integer>();

-      for (AnnotationFS a : allAnnotations) {

-        anchors.add(a.getBegin());

-        anchors.add(a.getEnd());

-      }

-      if (anchors.size() == 1) {

-        Integer first = anchors.pollFirst();

-        RutaBasic newTMB = new RutaBasic(getJCas(), first, first);

-        newTMB.setLowMemoryProfile(lowMemoryProfile);

-        beginAnchors.put(first, newTMB);

-        endAnchors.put(first, newTMB);

-        cas.addFsToIndexes(newTMB);

-      } else {

-        while (true) {

-          Integer first = anchors.pollFirst();

-          if (first == null || anchors.isEmpty()) {

-            break;

-          }

-          Integer second = anchors.first();

-          RutaBasic newTMB = new RutaBasic(getJCas(), first, second);

-          newTMB.setLowMemoryProfile(lowMemoryProfile);

-          beginAnchors.put(first, newTMB);

-          endAnchors.put(second, newTMB);

-          cas.addFsToIndexes(newTMB);

-        }

-      }

-      for (AnnotationFS a : allAnnotations) {

-        addAnnotation(a, false, false, null);

-      }

-      updateIterators(documentAnnotation);

-    } else {

-      for (AnnotationFS e : basicIndex) {

-        beginAnchors.put(e.getBegin(), (RutaBasic) e);

-        endAnchors.put(e.getEnd(), (RutaBasic) e);

-      }

-

-      RutaBasic firstBasic = (RutaBasic) basicIndex.iterator().get();

-      if (firstBasic.isLowMemoryProfile() != lowMemoryProfile) {

-        for (AnnotationFS each : basicIndex) {

-          RutaBasic eachBasic = (RutaBasic) each;

-          eachBasic.setLowMemoryProfile(lowMemoryProfile);

-        }

-      }

-      // TODO: find a better solution for this:

-      for (AnnotationFS a : allAnnotations) {

-        Type type = a.getType();

-        if (!type.equals(basicType)) {

-          RutaBasic beginAnchor = getBeginAnchor(a.getBegin());

-          RutaBasic endAnchor = getEndAnchor(a.getEnd());

-          boolean shouldBeAdded = false;

-          if (beginAnchor == null || endAnchor == null) {

-            shouldBeAdded = true;

-          } else {

-            Collection<AnnotationFS> set = beginAnchor.getBeginAnchors(type);

-            if (!set.contains(a)) {

-              shouldBeAdded = true;

-            }

-          }

-          if (shouldBeAdded) {

-            addAnnotation(a, false, false, null);

-          }

-        }

-      }

-    }

-  }

-

-  public void addAnnotation(AnnotationFS annotation, boolean addToIndex,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-    addAnnotation(annotation, true, true, creator);

-  }

-

-  public void addAnnotation(AnnotationFS annotation,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-    addAnnotation(annotation, false, true, creator);

-  }

-

-  public void addAnnotation(AnnotationFS annotation, boolean addToIndex, boolean updateInternal,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-    Type type = annotation.getType();

-    if (type.equals(basicType)) {

-      return;

-    }

-    boolean modified = checkSpan(annotation);

-    if (modified && updateInternal) {

-      updateIterators(filter.getWindowAnnotation());

-    }

-    RutaBasic beginAnchor = getBeginAnchor(annotation.getBegin());

-    RutaBasic endAnchor = getEndAnchor(annotation.getEnd());

-    if (beginAnchor != null) {

-      beginAnchor.addBegin(annotation, type);

-    }

-    if (endAnchor != null) {

-      endAnchor.addEnd(annotation, type);

-    }

-    Collection<RutaBasic> basicAnnotationsInWindow = getAllBasicsInWindow(annotation);

-    for (RutaBasic basic : basicAnnotationsInWindow) {

-      basic.addPartOf(type);

-    }

-    if (addToIndex) {

-      cas.addFsToIndexes(annotation);

-    }

-    crowd.annotationAdded(annotation, creator);

-  }

-

-  private boolean checkSpan(AnnotationFS annotation) {

-    boolean result = false;

-    int begin = annotation.getBegin();

-    int end = annotation.getEnd();

-    RutaBasic beginAnchor = getBeginAnchor(begin);

-    RutaBasic endAnchor = getEndAnchor(end);

-    if (beginAnchor != null && endAnchor != null) {

-      result = false;

-    } else {

-      if (beginAnchor == null) {

-        result |= checkAnchor(begin);

-      }

-      if (endAnchor == null) {

-        result |= checkAnchor(end);

-      }

-    }

-    return result;

-  }

-

-  private boolean checkAnchor(int anchor) {

-    Entry<Integer, RutaBasic> floorEntry = endAnchors.floorEntry(anchor);

-    if (floorEntry == null) {

-      floorEntry = beginAnchors.floorEntry(anchor);

-    }

-    Entry<Integer, RutaBasic> ceilingEntry = endAnchors.ceilingEntry(anchor);

-    if (floorEntry != null && ceilingEntry != null) {

-      RutaBasic floor = floorEntry.getValue();

-      RutaBasic ceiling = ceilingEntry.getValue();

-      RutaBasic toSplit = null;

-      if (floor.getEnd() > anchor) {

-        toSplit = floor;

-      } else {

-        toSplit = ceiling;

-      }

-      int newEnd = toSplit.getEnd();

-      cas.removeFsFromIndexes(toSplit);

-      toSplit.setEnd(anchor);

-      RutaBasic newRB = new RutaBasic(getJCas(), anchor, newEnd);

-      newRB.setLowMemoryProfile(lowMemoryProfile);

-      newRB.setEndMap(toSplit.getEndMap());

-      toSplit.clearEndMap();

-      cas.addFsToIndexes(toSplit);

-      cas.addFsToIndexes(newRB);

-      beginAnchors.put(floor.getBegin(), floor);

-      beginAnchors.put(newRB.getBegin(), newRB);

-      beginAnchors.put(ceiling.getBegin(), ceiling);

-      endAnchors.put(floor.getEnd(), floor);

-      endAnchors.put(newRB.getEnd(), newRB);

-      endAnchors.put(ceiling.getEnd(), ceiling);

-      return true;

-    } else {

-      // TODO this should never happen! test it!

-    }

-    return false;

-  }

-

-  public void removeAnnotation(AnnotationFS annotationFS) {

-    removeAnnotation(annotationFS, annotationFS.getType());

-  }

-

-  public void removeAnnotation(AnnotationFS annotation, Type type) {

-    if(type.getName().equals(UIMAConstants.TYPE_DOCUMENT)) {

-      // do not remove DocumentAnnotation

-      return;

-    }

-    Collection<RutaBasic> basicAnnotationsInWindow = getAllBasicsInWindow(annotation);

-    for (RutaBasic basic : basicAnnotationsInWindow) {

-      basic.removePartOf(type);

-    }

-    Type parent = type;

-    RutaBasic beginAnchor = getBeginAnchor(annotation.getBegin());

-    RutaBasic endAnchor = getEndAnchor(annotation.getEnd());

-    beginAnchor.removeBegin(annotation, parent);

-    endAnchor.removeEnd(annotation, parent);

-    if (!(annotation instanceof RutaBasic)) {

-      cas.removeFsFromIndexes(annotation);

-    }

-

-  }

-

-  public FSIterator<AnnotationFS> getFilteredBasicIterator(FSMatchConstraint constraint) {

-    ConstraintFactory cf = cas.getConstraintFactory();

-    FSMatchConstraint matchConstraint = cf.and(constraint, filter.getDefaultConstraint());

-    return cas.createFilteredIterator(basicIt, matchConstraint);

-  }

-

-  public RutaStream getWindowStream(AnnotationFS windowAnnotation, Type windowType) {

-    if (windowAnnotation.getBegin() == documentAnnotation.getBegin()

-            && windowAnnotation.getEnd() == documentAnnotation.getEnd()) {

-      return this;

-    }

-

-    FilterManager filterManager = new FilterManager(filter.getDefaultFilterTypes(),

-            filter.getCurrentFilterTypes(), filter.getCurrentRetainTypes(), windowAnnotation,

-            windowType, cas);

-

-    NavigableMap<Integer, RutaBasic> newBeginAnchors = beginAnchors.subMap(

-            windowAnnotation.getBegin(), true, windowAnnotation.getEnd(), false);

-    NavigableMap<Integer, RutaBasic> newEndAnchors = endAnchors.subMap(windowAnnotation.getBegin(),

-            false, windowAnnotation.getEnd(), true);

-

-    RutaStream stream = new RutaStream(cas, basicType, newBeginAnchors, newEndAnchors,

-            filterManager, lowMemoryProfile, simpleGreedyForComposed, crowd);

-    stream.setDynamicAnchoring(dynamicAnchoring);

-    stream.setGreedyRuleElement(greedyRuleElement);

-    stream.setGreedyRule(greedyRule);

-    stream.setGreedyRule(greedyRule);

-    return stream;

-  }

-

-  public FSIterator<AnnotationFS> copy() {

-    RutaStream stream = new RutaStream(cas, basicType, beginAnchors, endAnchors, filter,

-            lowMemoryProfile, simpleGreedyForComposed, crowd);

-    stream.setDynamicAnchoring(dynamicAnchoring);

-    stream.setGreedyRuleElement(greedyRuleElement);

-    stream.setGreedyRule(greedyRule);

-    return stream;

-  }

-

-  public AnnotationFS get() throws NoSuchElementException {

-    return currentIt.get();

-  }

-

-  public boolean isValid() {

-    return currentIt.isValid();

-  }

-

-  public void moveTo(FeatureStructure fs) {

-    try {

-      currentIt.moveTo(fs);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-  }

-

-  public void moveToFirst() {

-    currentIt.moveToFirst();

-  }

-

-  public void moveToLast() {

-    currentIt.moveToLast();

-  }

-

-  public void moveToNext() {

-    currentIt.moveToNext();

-  }

-

-  public void moveToPrevious() {

-    currentIt.moveToPrevious();

-  }

-

-  public List<AnnotationFS> getOverappingAnnotations(AnnotationFS window, Type type) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    AnnotationFS newWindow = cas.createAnnotation(type, window.getBegin(), window.getEnd() - 1);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(type).iterator(newWindow);

-    if (!iterator.isValid()) {

-      iterator.moveToLast();

-    }

-    while (iterator.isValid()) {

-      FeatureStructure fs = iterator.get();

-      if (fs instanceof AnnotationFS) {

-        AnnotationFS a = (AnnotationFS) fs;

-        if (a.getEnd() >= window.getEnd() && a.getBegin() <= window.getBegin()) {

-          result.add(a);

-        }

-      }

-      iterator.moveToPrevious();

-    }

-    return result;

-  }

-

-  public List<Annotation> getAnnotationsFollowing(Annotation annotation) {

-    List<Annotation> result = new ArrayList<Annotation>();

-    moveTo(annotation);

-    while (currentIt.isValid()) {

-      currentIt.moveToNext();

-      if (currentIt.isValid()) {

-        Annotation nextAnnotation = (Annotation) currentIt.get();

-        if (nextAnnotation.getBegin() == annotation.getEnd()) {

-          result.add(nextAnnotation);

-        } else if (nextAnnotation.getBegin() >= annotation.getEnd()) {

-          break;

-        }

-      }

-    }

-    return result;

-  }

-

-  public CAS getCas() {

-    return cas;

-  }

-

-  public JCas getJCas() {

-    try {

-      return cas.getJCas();

-    } catch (CASException e) {

-      e.printStackTrace();

-    }

-    return null;

-  }

-

-  public List<AnnotationFS> getAllofType(Type type) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(type).iterator();

-    while (iterator.isValid()) {

-      FeatureStructure featureStructure = iterator.get();

-      result.add((AnnotationFS) featureStructure);

-      iterator.moveToNext();

-    }

-    return result;

-  }

-

-  public List<AnnotationFS> getAnnotationsInWindow2(AnnotationFS windowAnnotation, Type type) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    windowAnnotation = cas.createAnnotation(type, windowAnnotation.getBegin(),

-            windowAnnotation.getEnd() + 1);

-    FSIterator<AnnotationFS> completeIt = getCas().getAnnotationIndex(type).iterator();

-    if (getDocumentAnnotation().getEnd() < windowAnnotation.getEnd()) {

-      completeIt.moveToLast();

-    } else {

-      completeIt.moveTo(windowAnnotation);

-    }

-    while (completeIt.isValid()

-            && ((Annotation) completeIt.get()).getBegin() >= windowAnnotation.getBegin()) {

-      completeIt.moveToPrevious();

-    }

-

-    if (completeIt.isValid()) {

-      completeIt.moveToNext();

-    } else {

-      completeIt.moveToFirst();

-    }

-

-    while (completeIt.isValid()

-            && ((Annotation) completeIt.get()).getBegin() < windowAnnotation.getBegin()) {

-      completeIt.moveToNext();

-    }

-

-    while (completeIt.isValid()

-            && ((Annotation) completeIt.get()).getBegin() >= windowAnnotation.getBegin()) {

-      Annotation annotation = (Annotation) completeIt.get();

-      if (getCas().getTypeSystem().subsumes(type, annotation.getType())

-              && annotation.getEnd() <= windowAnnotation.getEnd()) {

-        result.add(annotation);

-      }

-      completeIt.moveToNext();

-    }

-    return result;

-  }

-

-  public List<AnnotationFS> getAnnotationsInWindow(AnnotationFS windowAnnotation, Type type) {

-    if(type == null) return null;

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    List<AnnotationFS> inWindow = getAnnotationsInWindow2(windowAnnotation, type);

-    result = inWindow;

-    return result;

-  }

-

-  public Collection<RutaBasic> getAllBasicsInWindow(AnnotationFS windowAnnotation) {

-    if (windowAnnotation.getBegin() >= windowAnnotation.getEnd()) {

-      return Collections.emptySet();

-    }

-    RutaBasic beginAnchor = getBeginAnchor(windowAnnotation.getBegin());

-    if (beginAnchor.getEnd() == windowAnnotation.getEnd()) {

-      Collection<RutaBasic> result = new ArrayList<RutaBasic>(1);

-      result.add(beginAnchor);

-      return result;

-    }

-    Collection<RutaBasic> subSet = null;

-    if (windowAnnotation.getEnd() == cas.getDocumentAnnotation().getEnd()

-            && windowAnnotation.getBegin() == 0) {

-      subSet = beginAnchors.values();

-    } else {

-      subSet = beginAnchors.subMap(windowAnnotation.getBegin(), true, windowAnnotation.getEnd(),

-              false).values();

-    }

-    return subSet;

-  }

-

-  public RutaBasic getBasicNextTo(boolean before, AnnotationFS annotation) {

-    if (annotation == null) {

-      return beginAnchors.get(0);

-    }

-    if (before) {

-      RutaBasic pointer = beginAnchors.get(annotation.getBegin());

-      moveTo(pointer);

-      if (isVisible(pointer) || !isValid()) {

-        moveToPrevious();

-      }

-      if (isValid()) {

-        RutaBasic nextBasic = (RutaBasic) get();

-        // TODO HOTFIX for annotation of length 0

-        while (isValid() && nextBasic.getEnd() > annotation.getBegin()) {

-          moveToPrevious();

-          if (isValid()) {

-            nextBasic = (RutaBasic) get();

-          }

-        }

-        return nextBasic;

-      }

-    } else {

-      RutaBasic pointer = endAnchors.get(annotation.getEnd());

-      moveTo(pointer);

-      if (isVisible(pointer)) {

-        moveToNext();

-      }

-      if (isValid()) {

-        RutaBasic nextBasic = (RutaBasic) get();

-        // TODO HOTFIX for annotation of length 0

-        while (isValid() && nextBasic.getBegin() < annotation.getEnd()) {

-          moveToNext();

-          if (isValid()) {

-            nextBasic = (RutaBasic) get();

-          }

-        }

-        return nextBasic;

-      }

-    }

-    return null;

-  }

-

-  public List<RutaBasic> getBasicsInWindow(AnnotationFS windowAnnotation) {

-    List<RutaBasic> result = new ArrayList<RutaBasic>();

-    if (windowAnnotation instanceof RutaBasic) {

-      result.add((RutaBasic) windowAnnotation);

-      return result;

-    }

-    FSMatchConstraint defaultConstraint = filter.getDefaultConstraint();

-    FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(cas

-            .getAnnotationIndex(basicType).subiterator(windowAnnotation), defaultConstraint);

-

-    while (iterator.isValid()) {

-      result.add((RutaBasic) iterator.get());

-      iterator.moveToNext();

-    }

-    return result;

-  }

-

-  public RutaBasic getFirstBasicInWindow(AnnotationFS windowAnnotation) {

-    return getFirstBasicInWindow(windowAnnotation, currentIt);

-  }

-

-  public RutaBasic getFirstBasicInWindow(AnnotationFS windowAnnotation, FSIterator<AnnotationFS> it) {

-    if (windowAnnotation instanceof RutaBasic) {

-      return (RutaBasic) windowAnnotation;

-    }

-    it.moveTo(windowAnnotation);

-    if (it.isValid()) {

-      return (RutaBasic) it.get();

-    }

-    return null;

-  }

-

-  public List<RutaBasic> getAnnotationsOverlappingWindow(AnnotationFS annotation) {

-    if (annotation != null) {

-      return getBasicsInWindow(annotation);

-    } else {

-      return new ArrayList<RutaBasic>();

-    }

-  }

-

-  public FSIterator<AnnotationFS> getUnfilteredBasicIterator() {

-    return basicIt;

-  }

-

-  public AnnotationFS getDocumentAnnotation() {

-    return documentAnnotation;

-  }

-

-  public RutaAnnotation getCorrectTMA(List<AnnotationFS> annotationsInWindow,

-          RutaAnnotation heuristicAnnotation) {

-    for (AnnotationFS annotation : annotationsInWindow) {

-      if (annotation instanceof RutaAnnotation) {

-        RutaAnnotation tma = (RutaAnnotation) annotation;

-        if (tma.getBegin() == heuristicAnnotation.getBegin()

-                && tma.getEnd() == heuristicAnnotation.getEnd()

-                && tma.getAnnotation().getType()

-                        .equals(heuristicAnnotation.getAnnotation().getType())) {

-          return tma;

-        }

-      }

-    }

-    return null;

-  }

-

-  public void retainTypes(List<Type> list) {

-    filter.retainTypes(list);

-    currentIt = filter.createFilteredIterator(cas, basicType);

-  }

-

-  public void filterTypes(List<Type> list) {

-    filter.filterTypes(list);

-    currentIt = filter.createFilteredIterator(cas, basicType);

-  }

-

-  public void addFilterTypes(List<Type> types) {

-    filter.addFilterTypes(types);

-    currentIt = filter.createFilteredIterator(cas, basicType);

-  }

-

-  public void addRetainTypes(List<Type> types) {

-    filter.addRetainTypes(types);

-    currentIt = filter.createFilteredIterator(cas, basicType);

-  }

-

-  public void removeFilterTypes(List<Type> types) {

-    filter.removeFilterTypes(types);

-    currentIt = filter.createFilteredIterator(cas, basicType);

-  }

-

-  public void removeRetainTypes(List<Type> types) {

-    filter.removeRetainTypes(types);

-    currentIt = filter.createFilteredIterator(cas, basicType);

-  }

-

-  public FilterManager getFilter() {

-    return filter;

-  }

-

-  public RutaBasic getFirstBasicOfAll() {

-    if (beginAnchors.isEmpty()) {

-      return null;

-    }

-    return beginAnchors.firstEntry().getValue();

-  }

-

-  public RutaBasic getLastBasicOfAll() {

-    if (endAnchors.isEmpty()) {

-      return null;

-    }

-    return endAnchors.lastEntry().getValue();

-  }

-

-  public Type getDocumentAnnotationType() {

-    return documentAnnotationType;

-  }

-

-  public RutaBasic getNextBasic2(AnnotationFS previous) {

-    AnnotationFS pointer = cas

-            .createAnnotation(basicType, previous.getEnd() - 1, previous.getEnd());

-    currentIt.moveTo(pointer);

-    if (currentIt.isValid()) {

-      RutaBasic basic = (RutaBasic) currentIt.get();

-      return basic;

-    }

-    return null;

-  }

-

-  public long getHistogram(Type type) {

-    return cas.getAnnotationIndex(type).size();

-  }

-

-  public double getIndexPenalty() {

-    return indexPenalty;

-  }

-

-  public RutaBasic getEndAnchor(int end) {

-    return endAnchors.get(end);

-  }

-

-  public RutaBasic getBeginAnchor(int begin) {

-    return beginAnchors.get(begin);

-  }

-

-  public boolean isDynamicAnchoring() {

-    return dynamicAnchoring;

-  }

-

-  public void setDynamicAnchoring(boolean dynamicAnchoring) {

-    this.dynamicAnchoring = dynamicAnchoring;

-  }

-

-  public boolean isGreedyRuleElement() {

-    return greedyRuleElement;

-  }

-

-  public void setGreedyRuleElement(Boolean greedyAnchoring) {

-    this.greedyRuleElement = greedyAnchoring;

-  }

-

-  public boolean isGreedyRule() {

-    return greedyRule;

-  }

-

-  public void setGreedyRule(Boolean greedyAnchoring) {

-    this.greedyRule = greedyAnchoring;

-  }

-

-  public void setIndexPenalty(double indexPenalty) {

-    this.indexPenalty = indexPenalty;

-  }

-

-  public double getAnchoringFactor() {

-    return anchoringFactor;

-  }

-

-  public void setAnchoringFactor(double anchoringFactor) {

-    this.anchoringFactor = anchoringFactor;

-  }

-

-  public boolean isSimpleGreedyForComposed() {

-    return simpleGreedyForComposed;

-  }

-

-  public void setSimpleGreedyForComposed(boolean simpleGreedyForComposed) {

-    this.simpleGreedyForComposed = simpleGreedyForComposed;

-  }

-

-  public boolean isGreedyAnchoring() {

-    return greedyRule || greedyRuleElement;

-  }

-

-  public boolean isOnlyOnce() {

-    return onlyOnce;

-  }

-  

-  public void setOnlyOnce(Boolean onlyOnce) {

-    this.onlyOnce = onlyOnce;

-  }

-  

-  

-  public boolean isVisible(AnnotationFS annotationFS) {

-    return isVisible(annotationFS, false);

-  }

-  

-  public boolean isVisible(AnnotationFS annotationFS, boolean ignoreWindow) {

-    if (annotationFS == null) {

-      return false;

-    }

-    AnnotationFS windowAnnotation = filter.getWindowAnnotation();

-    if (!ignoreWindow && windowAnnotation != null

-            && (annotationFS.getBegin() < windowAnnotation.getBegin() || annotationFS.getEnd() > windowAnnotation

-                    .getEnd())) {

-      return false;

-    }

-    int begin = annotationFS.getBegin();

-    int end = annotationFS.getEnd();

-    Set<Type> currentHiddenTypes = filter.getCurrentHiddenTypes();

-    RutaBasic beginAnchor = getBeginAnchor(begin);

-    if (beginAnchor != null) {

-      for (Type type : currentHiddenTypes) {

-        boolean partOf = beginAnchor.isPartOf(type);

-        if (partOf) {

-          return false;

-        }

-      }

-    }

-    RutaBasic endAnchor = getEndAnchor(end);

-    if (endAnchor != null) {

-      for (Type type : currentHiddenTypes) {

-        boolean partOf = endAnchor.isPartOf(type);

-        if (partOf) {

-          return false;

-        }

-      }

-    }

-    return true;

-  }

-

-  public RutaBasic getAnchor(boolean direction, int pointer) {

-    if (direction) {

-      return getBeginAnchor(pointer);

-    } else {

-      return getEndAnchor(pointer);

-    }

-  }

-

-  public RutaBasic getAnchor(boolean direction, AnnotationFS annotation) {

-    if (direction) {

-      return getEndAnchor(annotation.getEnd());

-    } else {

-      return getBeginAnchor(annotation.getBegin());

-    }

-  }

-

-  public Collection<AnnotationFS> getAnnotations(Type type) {

-    Collection<AnnotationFS> result = new LinkedList<AnnotationFS>();

-    AnnotationFS windowAnnotation = filter.getWindowAnnotation();

-    if (windowAnnotation != null

-            && (windowAnnotation.getBegin() != cas.getDocumentAnnotation().getBegin() || windowAnnotation

-                    .getEnd() != cas.getDocumentAnnotation().getEnd())) {

-      AnnotationFS frame = cas.createAnnotation(cas.getTypeSystem().getType(RutaEngine.FRAME_TYPE),

-              windowAnnotation.getBegin(), windowAnnotation.getEnd());

-      FSIterator<AnnotationFS> subiterator = cas.getAnnotationIndex(type).subiterator(frame);

-      while (subiterator.hasNext()) {

-        AnnotationFS each = (AnnotationFS) subiterator.next();

-        if (isVisible(each)) {

-          result.add(each);

-        }

-      }

-    } else {

-      AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(type);

-      for (AnnotationFS each : annotationIndex) {

-        if (isVisible(each)) {

-          result.add(each);

-        }

-      }

-    }

-    return result;

-  }

-

-  public String getVisibleCoveredText(AnnotationFS annotationFS) {

-    StringBuilder result = new StringBuilder();

-    List<RutaBasic> basicsInWindow = getBasicsInWindow(annotationFS);

-    for (RutaBasic each : basicsInWindow) {

-      if(isVisible(each)) {

-        result.append(each.getCoveredText());

-      }

-    }

-    return result.toString();

-  }

-

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/ScriptApply.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/ScriptApply.java
deleted file mode 100644
index 73ae8ba..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/ScriptApply.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta;

-

-public abstract class ScriptApply {

-

-  public static int count = 0;

-

-  private final RutaElement element;

-

-  public ScriptApply(RutaElement element) {

-    super();

-    this.element = element;

-  }

-

-  public RutaElement getElement() {

-    return element;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/UIMAConstants.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/UIMAConstants.java
deleted file mode 100644
index 33a8f72..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/UIMAConstants.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta;

-

-public class UIMAConstants {

-

-  public static final String TYPE_INTEGER = "uima.cas.Integer";

-

-  public static final String TYPE_FLOAT = "uima.cas.Float";

-

-  public static final String TYPE_BOOLEAN = "uima.cas.Boolean";

-

-  public static final String TYPE_BYTE = "uima.cas.Byte";

-

-  public static final String TYPE_SHORT = "uima.cas.Short";

-

-  public static final String TYPE_LONG = "uima.cas.Long";

-

-  public static final String TYPE_DOUBLE = "uima.cas.Double";

-

-  public static final String TYPE_STRING = "uima.cas.String";

-  

-  public static final String TYPE_DOCUMENT = "uima.tcas.DocumentAnnotation";

-  

-  public static final String FEATURE_COVERED_TEXT = "coveredText";

-  

-  public static final String FEATURE_COVERED_TEXT_SHORT = "ct";

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractMarkAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractMarkAction.java
deleted file mode 100644
index 3e76554..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractMarkAction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-

-public abstract class AbstractMarkAction extends TypeSensitiveAction {

-

-  public AbstractMarkAction(TypeExpression type) {

-    super(type);

-  }

-

-  protected Annotation createAnnotation(AnnotationFS matchedAnnotation, RuleElement element,

-          RutaStream stream, RuleMatch match) {

-    Type t = type.getType(element.getParent());

-    AnnotationFS newAnnotationFS = stream.getCas().createAnnotation(t,

-            matchedAnnotation.getBegin(), matchedAnnotation.getEnd());

-    Annotation newAnnotation = null;

-    if (newAnnotationFS instanceof Annotation) {

-      newAnnotation = (Annotation) newAnnotationFS;

-      newAnnotation.addToIndexes();

-    } else {

-      return null;

-    }

-    stream.addAnnotation(newAnnotation, match);

-    return newAnnotation;

-  }

-

-  @Override

-  public String toString() {

-    return super.toString() + "," + type.getClass().getSimpleName();

-  }

-

-  protected List<Integer> getIndexList(RuleElement element, List<INumberExpression> list,

-          RutaStream stream) {

-    List<Integer> indexList = new ArrayList<Integer>();

-    if (list == null || list.isEmpty()) {

-      int self = element.getContainer().getRuleElements().indexOf(element) + 1;

-      indexList.add(self);

-      return indexList;

-    }

-    int last = Integer.MAX_VALUE - 1;

-    for (INumberExpression each : list) {

-      int value = each.getIntegerValue(element.getParent(), null, stream);

-      for (int i = Math.min(value, last + 1); i < value; i++) {

-        indexList.add(i);

-      }

-      indexList.add(value);

-    }

-    return indexList;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractRutaAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractRutaAction.java
deleted file mode 100644
index 409b19f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractRutaAction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public abstract class AbstractRutaAction extends RutaElement {

-

-  public AbstractRutaAction() {

-    super();

-  }

-

-  public abstract void execute(RuleMatch match, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd);

-

-  @Override

-  public String toString() {

-    return getClass().getSimpleName();

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractStructureAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractStructureAction.java
deleted file mode 100644
index 5698542..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AbstractStructureAction.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.jcas.cas.TOP;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.GenericFeatureExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.utils.UIMAUtils;

-

-public abstract class AbstractStructureAction extends AbstractRutaAction {

-

-  public AbstractStructureAction() {

-    super();

-  }

-

-  protected void fillFeatures(TOP structure, Map<IStringExpression, IRutaExpression> features,

-          AnnotationFS matchedAnnotation, RuleElement element, RutaStream stream) {

-    Map<String, IRutaExpression> map = new HashMap<String, IRutaExpression>();

-    RutaBlock parent = element.getParent();

-    for (Entry<IStringExpression, IRutaExpression> each : features.entrySet()) {

-      String value = each.getKey().getStringValue(parent, matchedAnnotation, stream);

-      map.put(value, each.getValue());

-    }

-

-    TypeSystem typeSystem = stream.getCas().getTypeSystem();

-    JCas jcas = stream.getJCas();

-    List<?> featuresList = structure.getType().getFeatures();

-    for (int i = 0; i < featuresList.size(); i++) {

-      Feature targetFeature = (Feature) featuresList.get(i);

-      String name = targetFeature.getName();

-      String shortFName = name.substring(name.indexOf(":") + 1, name.length());

-      Object valueObject = map.get(shortFName);

-      Type range = targetFeature.getRange();

-      if (valueObject != null) {

-        if (valueObject instanceof TypeExpression

-                && range.getName().equals(UIMAConstants.TYPE_STRING)) {

-          TypeExpression type = (TypeExpression) valueObject;

-          List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(matchedAnnotation,

-                  type.getType(parent));

-          if (annotationsInWindow != null && !annotationsInWindow.isEmpty()) {

-            AnnotationFS annotation = annotationsInWindow.get(0);

-            structure.setStringValue(targetFeature, annotation.getCoveredText());

-          }

-        } else if (valueObject instanceof GenericFeatureExpression && !range.isPrimitive()) {

-          GenericFeatureExpression gfe = (GenericFeatureExpression) valueObject;

-          FeatureExpression fe = gfe.getFeatureExpression();

-          TypeExpression type = fe.getTypeExpr(parent);

-          List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(matchedAnnotation,

-                  type.getType(parent));

-          List<AnnotationFS> featureAnnotations = annotationsInWindow;

-          if (fe.getFeatures(parent) != null) {

-            featureAnnotations = new ArrayList<AnnotationFS>(fe.getFeatureAnnotations(

-                    annotationsInWindow, stream, parent, false));

-          }

-          if (typeSystem.subsumes(jcas.getCasType(FSArray.type), range)) {

-            structure.setFeatureValue(targetFeature, UIMAUtils.toFSArray(jcas, featureAnnotations));

-          } else if (typeSystem.subsumes(range, type.getType(parent))

-                  && !featureAnnotations.isEmpty()) {

-            AnnotationFS annotation = featureAnnotations.get(0);

-            structure.setFeatureValue(targetFeature, annotation);

-          }

-        } else if (valueObject instanceof IStringExpression

-                && range.getName().equals(UIMAConstants.TYPE_STRING)) {

-          structure.setStringValue(targetFeature, ((IStringExpression) valueObject).getStringValue(

-                  parent, matchedAnnotation, stream));

-

-        } else if (valueObject instanceof INumberExpression) {

-          if (range.getName().equals(UIMAConstants.TYPE_INTEGER)) {

-            structure.setIntValue(targetFeature, ((INumberExpression) valueObject).getIntegerValue(

-                    parent, matchedAnnotation, stream));

-          } else if (range.getName().equals(UIMAConstants.TYPE_DOUBLE)) {

-            structure.setDoubleValue(targetFeature, ((INumberExpression) valueObject)

-                    .getDoubleValue(parent, matchedAnnotation, stream));

-          } else if (range.getName().equals(UIMAConstants.TYPE_FLOAT)) {

-            structure.setFloatValue(targetFeature, ((INumberExpression) valueObject).getFloatValue(

-                    parent, matchedAnnotation, stream));

-          } else if (range.getName().equals(UIMAConstants.TYPE_BYTE)) {

-            structure.setByteValue(targetFeature, (byte) ((INumberExpression) valueObject)

-                    .getIntegerValue(parent, matchedAnnotation, stream));

-          } else if (range.getName().equals(UIMAConstants.TYPE_SHORT)) {

-            structure.setShortValue(targetFeature, (short) ((INumberExpression) valueObject)

-                    .getIntegerValue(parent, matchedAnnotation, stream));

-          } else if (range.getName().equals(UIMAConstants.TYPE_LONG)) {

-            structure.setLongValue(targetFeature, (long) ((INumberExpression) valueObject)

-                    .getIntegerValue(parent, matchedAnnotation, stream));

-          }

-        } else if (valueObject instanceof IBooleanExpression

-                && range.getName().equals(UIMAConstants.TYPE_BOOLEAN)) {

-          structure.setBooleanValue(targetFeature, ((IBooleanExpression) valueObject)

-                  .getBooleanValue(parent, matchedAnnotation, stream));

-        } else if (valueObject instanceof TypeExpression) {

-          TypeExpression type = (TypeExpression) valueObject;

-          List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(matchedAnnotation,

-                  type.getType(parent));

-          if (typeSystem.subsumes(jcas.getCasType(FSArray.type), range)) {

-            structure

-                    .setFeatureValue(targetFeature, UIMAUtils.toFSArray(jcas, annotationsInWindow));

-          } else if (typeSystem.subsumes(range, type.getType(parent))

-                  && !annotationsInWindow.isEmpty()) {

-            AnnotationFS annotation = annotationsInWindow.get(0);

-            structure.setFeatureValue(targetFeature, annotation);

-          }

-        }

-      }

-

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ActionFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ActionFactory.java
deleted file mode 100644
index 67a9de4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ActionFactory.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-import java.util.Map;

-import java.util.logging.Level;

-

-import org.antlr.runtime.Token;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ActionFactory {

-

-  private ActionFactory() {

-  }

-

-  public static AbstractRutaAction createColorAction(TypeExpression typeExpr,

-          IStringExpression bgcolor, IStringExpression fgcolor, IBooleanExpression selected,

-          RutaBlock parent) {

-    return new ColorAction(typeExpr, bgcolor, fgcolor, selected);

-  }

-

-  public static AbstractRutaAction createDelAction(RutaBlock parent) {

-    return new DelAction();

-  }

-

-  public static AbstractRutaAction createMarkFastAction(TypeExpression type,

-          WordListExpression list, IBooleanExpression ignore, INumberExpression ignoreLength,

-          IBooleanExpression ignoreWS, RutaBlock parent) {

-    return new MarkFastAction(type, list, ignore, ignoreLength, ignoreWS);

-  }

-

-  public static AbstractRutaAction createMarkFastAction(TypeExpression type,

-          StringListExpression list, IBooleanExpression ignore, INumberExpression ignoreLength,

-          IBooleanExpression ignoreWS, RutaBlock env) {

-    return new MarkFastAction(type, list, ignore, ignoreLength, ignoreWS);

-  }

-

-  public static AbstractRutaAction createMarkLastAction(TypeExpression type, RutaBlock parent) {

-    return new MarkLastAction(type);

-  }

-

-  public static AbstractRutaAction createRetainTypeAction(List<TypeExpression> types,

-          RutaBlock parent) {

-    return new RetainTypeAction(types);

-  }

-

-  public static AbstractRutaAction createLogAction(IStringExpression expr, Token log,

-          RutaBlock parent) {

-    String logString = log == null ? "INFO" : log.getText();

-    Level level = Level.parse(logString.toUpperCase());

-    return new LogAction(expr, level);

-  }

-

-  public static AbstractRutaAction createMarkAction(INumberExpression score, TypeExpression type,

-          List<INumberExpression> list, RutaBlock parent) {

-    return new MarkAction(type, score, list);

-  }

-

-  public static AbstractRutaAction createMarkOnceAction(INumberExpression score,

-          TypeExpression type, List<INumberExpression> list, RutaBlock env) {

-    return new MarkOnceAction(type, score, list);

-  }

-

-  public static AbstractRutaAction createReplaceAction(IStringExpression lit, RutaBlock parent) {

-    return new ReplaceAction(lit);

-  }

-

-  public static AbstractRutaAction createCreateAction(TypeExpression typeExpr,

-          Map<IStringExpression, IRutaExpression> map, List<INumberExpression> indexes,

-          RutaBlock parent) {

-    return new CreateAction(typeExpr, map, indexes);

-  }

-

-  public static AbstractRutaAction createGatherAction(TypeExpression typeExpr,

-          Map<IStringExpression, IRutaExpression> map, List<INumberExpression> indexes,

-          RutaBlock parent) {

-    return new GatherAction(typeExpr, map, indexes);

-  }

-

-  public static AbstractRutaAction createFillAction(TypeExpression type,

-          Map<IStringExpression, IRutaExpression> map, RutaBlock parent) {

-    return new FillAction(type, map);

-  }

-

-  public static AbstractRutaAction createCallAction(String ns, RutaBlock parent) {

-    return new CallAction(ns);

-  }

-

-  public static AbstractRutaAction createConfigureAction(String ns,

-          Map<IStringExpression, IRutaExpression> map, RutaBlock env) {

-    return new ConfigureAction(ns, map);

-  }

-

-  public static AbstractRutaAction createAssignAction(Token nv, IRutaExpression e, RutaBlock parent) {

-    return new AssignAction(nv.getText(), e);

-  }

-

-  public static AbstractRutaAction createFilterTypeAction(List<TypeExpression> types,

-          RutaBlock parent) {

-    return new FilterTypeAction(types);

-  }

-

-  public static AbstractRutaAction createAddRetainTypeAction(List<TypeExpression> types,

-          RutaBlock env) {

-    return new AddRetainTypeAction(types);

-  }

-

-  public static AbstractRutaAction createRemoveRetainTypeAction(List<TypeExpression> types,

-          RutaBlock env) {

-    return new RemoveRetainTypeAction(types);

-  }

-

-  public static AbstractRutaAction createAddFilterTypeAction(List<TypeExpression> types,

-          RutaBlock env) {

-    return new AddFilterTypeAction(types);

-  }

-

-  public static AbstractRutaAction createRemoveFilterTypeAction(List<TypeExpression> types,

-          RutaBlock env) {

-    return new RemoveFilterTypeAction(types);

-  }

-

-  public static AbstractRutaAction createSetFeatureAction(IStringExpression f, IRutaExpression v,

-          RutaBlock parent) {

-    return new SetFeatureAction(f, v);

-  }

-

-  public static AbstractRutaAction createUnmarkAction(TypeExpression f,

-          List<INumberExpression> list, IBooleanExpression b, RutaBlock env) {

-    return new UnmarkAction(f, list, b);

-  }

-

-  public static AbstractRutaAction createUnmarkAllAction(TypeExpression f, TypeListExpression list,

-          RutaBlock env) {

-    return new UnmarkAllAction(f, list);

-  }

-

-  public static AbstractRutaAction createComposedAction(List<AbstractRutaAction> actions,

-          RutaBlock env) {

-    return new ComposedAction(actions);

-  }

-

-  public static AbstractRutaAction createActionVariable(Token id) {

-    return new VariableAction(id.getText());

-  }

-

-  public static AbstractRutaAction createTransferAction(TypeExpression f, RutaBlock env) {

-    return new TransferAction(f);

-  }

-

-  public static AbstractRutaAction createTrieAction(WordListExpression list,

-          Map<IStringExpression, IRutaExpression> map, IBooleanExpression ignoreCase,

-          INumberExpression ignoreLength, IBooleanExpression edit, INumberExpression distance,

-          IStringExpression ignoreChar, RutaBlock parent) {

-    return new TrieAction(list, map, ignoreCase, ignoreLength, edit, distance, ignoreChar);

-  }

-

-  public static AbstractRutaAction createExecAction(String ns, TypeListExpression tl,

-          IStringExpression view, RutaBlock env) {

-    return new ExecAction(ns, tl, view);

-  }

-

-  public static AbstractRutaAction createMarkTableAction(TypeExpression structure,

-          INumberExpression index, WordTableExpression table,

-          Map<IStringExpression, INumberExpression> map, IBooleanExpression ignoreCase,

-          INumberExpression ignoreLength, IStringExpression ignoreChar,

-          INumberExpression maxIgnoreChar, RutaBlock env) {

-    return new MarkTableAction(structure, index, table, map, ignoreCase, ignoreLength, ignoreChar,

-            maxIgnoreChar);

-  }

-

-  public static AbstractRutaAction createMergeAction(IBooleanExpression union, Token target,

-          List<ListExpression> list, RutaBlock env) {

-    return new MergeAction(union, target == null ? null : target.getText(), list);

-  }

-

-  public static AbstractRutaAction createGetAction(ListExpression<IRutaExpression> f, Token var,

-          IStringExpression op, RutaBlock env) {

-    return new GetAction(f, var == null ? null : var.getText(), op);

-  }

-

-  public static AbstractRutaAction createRemoveAction(Token var, List<IRutaExpression> list,

-          RutaBlock env) {

-    return new RemoveAction(var == null ? null : var.getText(), list);

-  }

-

-  public static AbstractRutaAction createAddAction(Token var, List<IRutaExpression> list,

-          RutaBlock env) {

-    return new AddAction(var == null ? null : var.getText(), list);

-  }

-

-  public static AbstractRutaAction createGetListAction(Token var, IStringExpression op,

-          RutaBlock env) {

-    return new GetListAction(var == null ? null : var.getText(), op);

-  }

-

-  public static AbstractRutaAction createRemoveDuplicateAction(Token var, RutaBlock env) {

-    return new RemoveDuplicateAction(var == null ? null : var.getText());

-  }

-

-  public static AbstractRutaAction createGetFeatureAction(IStringExpression f, Token var,

-          RutaBlock env) {

-    return new GetFeatureAction(f, var == null ? null : var.getText());

-  }

-

-  public static AbstractRutaAction createMatchedTextAction(Token var, List<INumberExpression> list,

-          RutaBlock env) {

-    return new MatchedTextAction(var == null ? null : var.getText(), list);

-  }

-

-  public static AbstractRutaAction createClearAction(Token var, RutaBlock env) {

-    return new ClearAction(var == null ? null : var.getText());

-  }

-

-  public static AbstractRutaAction createShiftAction(TypeExpression type,

-          List<INumberExpression> list, RutaBlock env) {

-    return new ShiftAction(type, list);

-  }

-

-  public static AbstractRutaAction createDynamicAnchoringAction(IBooleanExpression active,

-          INumberExpression penalty, INumberExpression factor, RutaBlock env) {

-    return new DynamicAnchoringAction(active, penalty, factor);

-  }

-

-  public static AbstractRutaAction createTrimAction(List<TypeExpression> types,

-          TypeListExpression typeList, RutaBlock env) {

-    return new TrimAction(types, typeList);

-  }

-

-  public static AbstractRutaAction createAction(FeatureMatchExpression fae) {

-    return new ImplicitFeatureAction(fae);

-  }

-

-  public static AbstractRutaAction createAction(TypeExpression te) {

-    return new ImplicitMarkAction(te);

-  }

-

-  public static AbstractRutaAction createMarkFirstAction(TypeExpression type, RutaBlock env) {

-    return new MarkFirstAction(type);

-  }

-

-  public static AbstractRutaAction createGreedyAnchoringAction(IBooleanExpression active,

-          IBooleanExpression active2, RutaBlock env) {

-    return new GreedyAnchoringAction(active, active2);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddAction.java
deleted file mode 100644
index d6abce7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class AddAction extends AbstractRutaAction {

-

-  private String var;

-

-  private List<IRutaExpression> elements;

-

-  public AddAction(String var, List<IRutaExpression> list) {

-    super();

-    this.var = var;

-    this.elements = list;

-  }

-

-  public String getListExpr() {

-    return var;

-  }

-

-  public List<IRutaExpression> getElements() {

-    return elements;

-  }

-

-  @SuppressWarnings({ "unchecked", "rawtypes" })

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    RutaEnvironment environment = parent.getEnvironment();

-    List list = environment.getVariableValue(var, List.class);

-    // Class<?> vtype = environment.getVariableType(var);

-    Class<?> vgtype = environment.getVariableGenericType(var);

-    for (IRutaExpression each : elements) {

-      if (each instanceof ListExpression) {

-        ListExpression l = (ListExpression) each;

-        list.addAll(l.getList(parent, stream));

-      } else if (vgtype.equals(Boolean.class) && each instanceof IBooleanExpression) {

-        list.add(((IBooleanExpression) each).getBooleanValue(parent, match, element, stream));

-      } else if (vgtype.equals(Integer.class) && each instanceof INumberExpression) {

-        list.add(((INumberExpression) each).getIntegerValue(parent, match, element, stream));

-      } else if (vgtype.equals(Double.class) && each instanceof INumberExpression) {

-        list.add(((INumberExpression) each).getDoubleValue(parent, match, element, stream));

-      } else if (vgtype.equals(Type.class) && each instanceof TypeExpression) {

-        list.add(((TypeExpression) each).getType(parent));

-      } else if (vgtype.equals(String.class) && each instanceof IStringExpression) {

-        list.add(((IStringExpression) each).getStringValue(parent, match, element, stream));

-      }

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddFilterTypeAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddFilterTypeAction.java
deleted file mode 100644
index cfbaea3..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddFilterTypeAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class AddFilterTypeAction extends AbstractRutaAction {

-

-  public List<TypeExpression> getList() {

-    return list;

-  }

-

-  private List<TypeExpression> list;

-

-  public AddFilterTypeAction(List<TypeExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> types = new ArrayList<Type>();

-    for (TypeExpression each : list) {

-      types.add(each.getType(element.getParent()));

-    }

-    stream.addFilterTypes(types);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddRetainTypeAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddRetainTypeAction.java
deleted file mode 100644
index 3bfaa4e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AddRetainTypeAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class AddRetainTypeAction extends AbstractRutaAction {

-

-  public List<TypeExpression> getList() {

-    return list;

-  }

-

-  private List<TypeExpression> list;

-

-  public AddRetainTypeAction(List<TypeExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> types = new ArrayList<Type>();

-    for (TypeExpression each : list) {

-      types.add(each.getType(element.getParent()));

-    }

-    stream.addRetainTypes(types);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AssignAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AssignAction.java
deleted file mode 100644
index 5cf0651..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/AssignAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class AssignAction extends AbstractRutaAction {

-

-  private String var;

-

-  private IRutaExpression expression;

-

-  public AssignAction(String var, IRutaExpression e) {

-    super();

-    this.var = var;

-    this.expression = e;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    RutaEnvironment environment = parent.getEnvironment();

-    Class<?> clazz = environment.getVariableType(var);

-    if (clazz.equals(Integer.class) && expression instanceof INumberExpression) {

-      int v = ((INumberExpression) expression).getIntegerValue(parent, match, element, stream);

-      environment.setVariableValue(var, v);

-    } else if (clazz.equals(Double.class) && expression instanceof INumberExpression) {

-      double v = ((INumberExpression) expression).getDoubleValue(parent, match, element, stream);

-      environment.setVariableValue(var, v);

-    } else if (clazz.equals(Type.class) && expression instanceof TypeExpression) {

-      Type v = ((TypeExpression) expression).getType(parent);

-      environment.setVariableValue(var, v);

-    } else if (clazz.equals(Boolean.class) && expression instanceof IBooleanExpression) {

-      boolean v = ((IBooleanExpression) expression).getBooleanValue(parent, match, element, stream);

-      environment.setVariableValue(var, v);

-    } else if (clazz.equals(String.class) && expression instanceof IStringExpression) {

-      String v = ((IStringExpression) expression).getStringValue(parent, match, element, stream);

-      environment.setVariableValue(var, v);

-    }

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-  public IRutaExpression getExpression() {

-    return expression;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/CallAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/CallAction.java
deleted file mode 100644
index d520f3f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/CallAction.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaModule;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class CallAction extends AbstractRutaAction {

-

-  protected String namespace;

-

-  public CallAction(String namespace) {

-    super();

-    this.namespace = namespace;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaModule thisScript = element.getParent().getScript();

-    AnalysisEngine targetEngine = thisScript.getEngine(namespace);

-    if (targetEngine != null) {

-      try {

-        callEngine(match, crowd, targetEngine, element, stream);

-      } catch (AnalysisEngineProcessException e) {

-        e.printStackTrace();

-      } catch (ResourceInitializationException e) {

-        e.printStackTrace();

-      }

-    } else {

-      RutaBlock block = thisScript.getBlock(namespace);

-      if (block != null) {

-        callScript(block, match, element, stream, crowd);

-      } else {

-        System.out.println("Found no script/block: " + namespace);

-      }

-    }

-

-  }

-

-  protected void callScript(RutaBlock block, RuleMatch match, RuleElement element,

-          RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    for (AnnotationFS annotationFS : matchedAnnotationsOf) {

-      RutaStream windowStream = stream.getWindowStream(annotationFS,

-              stream.getDocumentAnnotationType());

-      ScriptApply apply = block.apply(windowStream, crowd);

-      match.addDelegateApply(this, apply);

-    }

-

-  }

-

-  protected void callEngine(RuleMatch match, InferenceCrowd crowd, AnalysisEngine targetEngine,

-          RuleElement element, RutaStream stream) throws ResourceInitializationException,

-          AnalysisEngineProcessException {

-

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(null,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-

-      StringBuilder newDocument = new StringBuilder();

-      RutaStream windowStream = stream.getWindowStream(matchedAnnotation,

-              stream.getDocumentAnnotationType());

-      windowStream.moveToFirst();

-

-      CAS newCAS = targetEngine.newCAS();

-      List<Type> types = newCAS.getTypeSystem()

-              .getProperlySubsumedTypes(newCAS.getAnnotationType());

-

-      Collection<AnnotationFS> fsToAdd = new HashSet<AnnotationFS>();

-

-      Map<Integer, Integer> new2oldBegin = new TreeMap<Integer, Integer>();

-      Map<Integer, Integer> new2oldEnd = new TreeMap<Integer, Integer>();

-      Map<Integer, Integer> old2newBegin = new TreeMap<Integer, Integer>();

-      Map<Integer, Integer> old2newEnd = new TreeMap<Integer, Integer>();

-

-      int localBegin = 0;

-      int localEnd = 0;

-      while (windowStream.isValid()) {

-        FeatureStructure fs = windowStream.get();

-        if (fs instanceof RutaBasic) {

-          RutaBasic basic = (RutaBasic) fs;

-          for (Type type : types) {

-            Collection<AnnotationFS> beginAnchors = basic.getBeginAnchors(type);

-            for (AnnotationFS a : beginAnchors) {

-              if (a != null && !a.getType().getName().equals("uima.tcas.DocumentAnnotation")

-                      && !(a instanceof RutaBasic)) {

-                fsToAdd.add(a);

-              }

-            }

-          }

-          int length = basic.getEnd() - basic.getBegin();

-          localEnd = localBegin + length;

-

-          new2oldBegin.put(localBegin, basic.getBegin());

-          old2newBegin.put(basic.getBegin(), localBegin);

-          new2oldEnd.put(localEnd, basic.getEnd());

-          old2newEnd.put(basic.getEnd(), localEnd);

-

-          newDocument.append(basic.getCoveredText());

-

-          localBegin += length;

-        }

-        windowStream.moveToNext();

-      }

-

-      String string = newDocument.toString();

-      newCAS.setDocumentText(string);

-      for (AnnotationFS each : fsToAdd) {

-        int beginOld = each.getBegin();

-        int endOld = each.getEnd();

-

-        Integer beginNew = old2newBegin.get(beginOld);

-        Integer endNew = old2newEnd.get(endOld);

-        if (endNew == null && beginNew != null) {

-          int delta = endOld - beginOld;

-          endNew = beginNew + delta;

-        } else if (endNew != null && beginNew == null) {

-          int delta = endOld - beginOld;

-          beginNew = endNew - delta;

-        } else if (endNew == null && beginNew == null) {

-          int index;

-          int deltaBefore = 0;

-          int deltaAfter = 0;

-          Integer valueBegin = null;

-          index = beginOld;

-          while (valueBegin == null) {

-            valueBegin = new2oldBegin.get(++index);

-            deltaBefore++;

-          }

-          Integer valueEnd = null;

-          index = endOld;

-          while (valueEnd == null) {

-            valueEnd = new2oldEnd.get(--index);

-            deltaAfter++;

-          }

-          beginNew = valueBegin - deltaBefore;

-          endNew = valueEnd + deltaAfter;

-        }

-

-        String typeName = each.getType().getName();

-        Type type = newCAS.getTypeSystem().getType(typeName);

-        FeatureStructure newAnnotation = newCAS.createAnnotation(type, beginNew, endNew);

-        newCAS.addFsToIndexes(newAnnotation);

-      }

-

-      targetEngine.process(newCAS);

-

-      for (Type type : types) {

-        FSIterator<AnnotationFS> iterator = newCAS.getAnnotationIndex(type).iterator();

-        while (iterator.isValid()) {

-          AnnotationFS each = iterator.get();

-          transform(each, new2oldBegin, new2oldEnd, fsToAdd, stream, match);

-          iterator.moveToNext();

-        }

-      }

-    }

-  }

-

-  private void transform(FeatureStructure each, Map<Integer, Integer> new2oldBegin,

-          Map<Integer, Integer> new2oldEnd, Collection<AnnotationFS> fsToAdd, RutaStream stream,

-          RuleMatch match) {

-    CAS cas = stream.getCas();

-    Type newType = cas.getTypeSystem().getType(each.getType().getName());

-    if (newType != null && !fsToAdd.contains(each)

-            && !newType.getName().equals("uima.tcas.DocumentAnnotation")

-            && !(each instanceof RutaBasic)) {

-

-      FeatureStructure newFS = null;

-      if (each instanceof AnnotationFS) {

-        newFS = transformAnnotation((AnnotationFS) each, newType, new2oldBegin, new2oldEnd, stream,

-                match);

-      } else {

-        newFS = cas.createFS(newType);

-        fillFeatures(each, newFS, newFS.getType(), new2oldBegin, new2oldEnd, stream, match);

-      }

-      cas.addFsToIndexes(newFS);

-    }

-  }

-

-  private FeatureStructure transformAnnotation(AnnotationFS annotation, Type newType,

-          Map<Integer, Integer> new2oldBegin, Map<Integer, Integer> new2oldEnd, RutaStream stream,

-          RuleMatch match) {

-    CAS cas = stream.getCas();

-    Integer beginOld = annotation.getBegin();

-    Integer endOld = annotation.getEnd();

-    FeatureStructure newFS = cas.createFS(newType);

-    fillFeatures(annotation, newFS, newType, new2oldBegin, new2oldEnd, stream, match);

-

-    Integer beginNew = new2oldBegin.get(beginOld);

-    Integer endNew = new2oldEnd.get(endOld);

-    if (endNew == null && beginNew != null) {

-      int delta = endOld - beginOld;

-      endNew = beginNew + delta;

-    } else if (endNew != null && beginNew == null) {

-      int delta = endOld - beginOld;

-      beginNew = endNew - delta;

-    } else if (endNew == null && beginNew == null) {

-      int index;

-      int deltaBefore = 0;

-      int deltaAfter = 0;

-      Integer valueBegin = null;

-      index = beginOld;

-      while (valueBegin == null) {

-        valueBegin = new2oldBegin.get(++index);

-        deltaBefore++;

-      }

-      Integer valueEnd = null;

-      index = endOld;

-      while (valueEnd == null) {

-        valueEnd = new2oldEnd.get(--index);

-        deltaAfter++;

-      }

-      beginNew = valueBegin - deltaBefore;

-      endNew = valueEnd + deltaAfter;

-    }

-

-    if (newFS instanceof Annotation) {

-      Annotation newA = (Annotation) newFS;

-      newA.setBegin(beginNew);

-      newA.setEnd(endNew);

-      stream.addAnnotation(newA, match);

-    }

-    return newFS;

-  }

-

-  private void fillFeatures(FeatureStructure oldFS, FeatureStructure newFS, Type newType,

-          Map<Integer, Integer> new2oldBegin, Map<Integer, Integer> new2oldEnd, RutaStream stream,

-          RuleMatch match) {

-    for (Object obj : newType.getFeatures()) {

-      Feature feature = (Feature) obj;

-      String sn = feature.getShortName();

-      if (!"sofa".equals(sn) && !"begin".equals(sn) && !"end".equals(sn)) {

-        Feature oldFeature = oldFS.getType().getFeatureByBaseName(sn);

-        fillFeature(oldFS, oldFeature, newFS, feature, new2oldBegin, new2oldEnd, stream, match);

-      }

-    }

-  }

-

-  private void fillFeature(FeatureStructure oldFS, Feature oldFeature, FeatureStructure newFS,

-          Feature feature, Map<Integer, Integer> new2oldBegin, Map<Integer, Integer> new2oldEnd,

-          RutaStream stream, RuleMatch match) {

-    CAS cas = stream.getCas();

-    Type oldRange = oldFeature.getRange();

-    if (oldRange.isPrimitive()) {

-      if (oldRange.getShortName().equals("String")) {

-        String stringValue = oldFS.getStringValue(oldFeature);

-        newFS.setStringValue(feature, stringValue);

-      } else if (oldRange.getShortName().equals("Integer")) {

-        Integer intValue = oldFS.getIntValue(oldFeature);

-        newFS.setIntValue(feature, intValue);

-      } else if (oldRange.getShortName().equals("Float")) {

-        Float floatValue = oldFS.getFloatValue(oldFeature);

-        newFS.setFloatValue(feature, floatValue);

-      } else if (oldRange.getShortName().equals("Boolean")) {

-        Boolean booleanValue = oldFS.getBooleanValue(oldFeature);

-        newFS.setBooleanValue(feature, booleanValue);

-      }

-    } else {

-      FeatureStructure oldFeatureFS = oldFS.getFeatureValue(oldFeature);

-      FeatureStructure newFeatureFS = null;

-      if (oldRange.isArray()) {

-        newFeatureFS = cas.createArrayFS(0);

-      } else {

-        newFeatureFS = cas.createFS(feature.getRange());

-      }

-      if (newFeatureFS instanceof AnnotationFS) {

-        transformAnnotation((AnnotationFS) newFeatureFS, newFeatureFS.getType(), new2oldBegin,

-                new2oldEnd, stream, match);

-      } else {

-        fillFeatures(oldFeatureFS, newFeatureFS, newFeatureFS.getType(), new2oldBegin, new2oldEnd,

-                stream, match);

-      }

-    }

-  }

-

-  public String getNamespace() {

-    return namespace;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ClearAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ClearAction.java
deleted file mode 100644
index 7903cf5..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ClearAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ClearAction extends AbstractRutaAction {

-

-  private final String list;

-

-  public ClearAction(String list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    element.getParent().getEnvironment().setVariableValue(list, null);

-  }

-

-  public String getList() {

-    return list;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ColorAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ColorAction.java
deleted file mode 100644
index c6c3380..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ColorAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.string.SimpleStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaColoring;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ColorAction extends AbstractRutaAction {

-

-  private IStringExpression bgcolor;

-

-  private IStringExpression fgcolor;

-

-  private IBooleanExpression selected;

-

-  private TypeExpression type;

-

-  public ColorAction(TypeExpression type, IStringExpression bgcolor, IStringExpression fgcolor,

-          IBooleanExpression selected) {

-    super();

-    this.type = type;

-    this.bgcolor = bgcolor == null ? new SimpleStringExpression("red") : bgcolor;

-    this.fgcolor = fgcolor == null ? new SimpleStringExpression("red") : fgcolor;

-    this.selected = selected == null ? new SimpleBooleanExpression(false) : selected;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    Type casType = stream.getJCas().getCasType(RutaColoring.type);

-    FeatureStructure newAnnotationFS = stream.getCas().createFS(casType);

-    RutaColoring coloring = null;

-    if (newAnnotationFS instanceof RutaColoring) {

-      coloring = (RutaColoring) newAnnotationFS;

-      RutaBlock parent = element.getParent();

-      coloring.setBgColor(bgcolor.getStringValue(parent, match, element, stream));

-      coloring.setFgColor(fgcolor.getStringValue(parent, match, element, stream));

-      coloring.setSelected(selected.getBooleanValue(parent, match, element, stream));

-      coloring.setTargetType(type.getType(parent).getName());

-      coloring.addToIndexes();

-    }

-  }

-

-  public IStringExpression getFgColor() {

-    return fgcolor;

-  }

-

-  public IStringExpression getBgColor() {

-    return bgcolor;

-  }

-

-  public IBooleanExpression getSelected() {

-    return selected;

-  }

-

-  public TypeExpression getType() {

-    return type;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ComposedAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ComposedAction.java
deleted file mode 100644
index 581275d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ComposedAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ComposedAction extends AbstractRutaAction {

-

-  private final List<AbstractRutaAction> actions;

-

-  public ComposedAction(List<AbstractRutaAction> actions) {

-    super();

-    this.actions = actions;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    for (AbstractRutaAction each : actions) {

-      crowd.beginVisit(each, null);

-      each.execute(match, element, stream, crowd);

-      crowd.endVisit(each, null);

-    }

-  }

-

-  public List<AbstractRutaAction> getActions() {

-    return actions;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ConfigureAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ConfigureAction.java
deleted file mode 100644
index c134e41..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ConfigureAction.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.Type;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.metadata.ConfigurationParameter;

-import org.apache.uima.resource.metadata.ConfigurationParameterDeclarations;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaModule;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.BooleanListExpression;

-import org.apache.uima.ruta.expression.list.NumberListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ConfigureAction extends AbstractRutaAction {

-

-  private final String namespace;

-

-  private final Map<IStringExpression, IRutaExpression> parameterMap;

-

-  public ConfigureAction(String ns, Map<IStringExpression, IRutaExpression> map) {

-    super();

-    this.namespace = ns;

-    this.parameterMap = map;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    RutaModule thisScript = parent.getScript();

-    AnalysisEngine targetEngine = thisScript.getEngine(namespace);

-    ConfigurationParameterDeclarations configurationParameterDeclarations = targetEngine

-            .getAnalysisEngineMetaData().getConfigurationParameterDeclarations();

-

-    Set<Entry<IStringExpression, IRutaExpression>> entrySet = parameterMap.entrySet();

-    for (Entry<IStringExpression, IRutaExpression> entry : entrySet) {

-      IStringExpression key = entry.getKey();

-      String stringValue = key.getStringValue(parent, match, element, stream);

-      ConfigurationParameter configurationParameter = configurationParameterDeclarations

-              .getConfigurationParameter(null, stringValue);

-      if (configurationParameter != null) {

-        IRutaExpression value = entry.getValue();

-        String type = configurationParameter.getType();

-        if (type.equals("String")) {

-          if (configurationParameter.isMultiValued()) {

-            if (value instanceof StringListExpression) {

-              StringListExpression sle = (StringListExpression) value;

-              List<String> list = sle.getList(parent, stream);

-              targetEngine.setConfigParameterValue(stringValue, list.toArray(new String[0]));

-            } else if (value instanceof TypeListExpression) {

-              TypeListExpression tle = (TypeListExpression) value;

-              List<Type> list = tle.getList(parent, stream);

-              List<String> stringList = new ArrayList<String>();

-              for (Type each : list) {

-                stringList.add(each.getName());

-              }

-              targetEngine.setConfigParameterValue(stringValue, stringList.toArray(new String[0]));

-            }

-          } else {

-            if (value instanceof IStringExpression) {

-              IStringExpression se = (IStringExpression) value;

-              String string = se.getStringValue(parent, match, element, stream);

-              targetEngine.setConfigParameterValue(stringValue, string);

-            } else if (value instanceof TypeExpression) {

-              TypeExpression te = (TypeExpression) value;

-              Type t = te.getType(parent);

-              targetEngine.setConfigParameterValue(stringValue, t.getName());

-            }

-          }

-        } else if (type.equals("Float")) {

-          if (value instanceof NumberListExpression) {

-            NumberListExpression nle = (NumberListExpression) value;

-            List<Number> list = nle.getList(parent, stream);

-            List<Float> numbers = new ArrayList<Float>();

-            for (Number number : list) {

-              numbers.add(number.floatValue());

-            }

-            targetEngine.setConfigParameterValue(stringValue, numbers.toArray());

-          } else {

-            if (value instanceof INumberExpression) {

-              INumberExpression ne = (INumberExpression) value;

-              Double d = ne.getDoubleValue(parent, match, element, stream);

-              targetEngine.setConfigParameterValue(stringValue, d.floatValue());

-            }

-          }

-        } else if (type.equals("Integer")) {

-          if (value instanceof NumberListExpression) {

-            NumberListExpression nle = (NumberListExpression) value;

-            List<Number> list = nle.getList(parent, stream);

-            List<Integer> numbers = new ArrayList<Integer>();

-            for (Number number : list) {

-              numbers.add(number.intValue());

-            }

-            targetEngine.setConfigParameterValue(stringValue, numbers.toArray());

-          } else {

-            if (value instanceof INumberExpression) {

-              INumberExpression ne = (INumberExpression) value;

-              Integer i = ne.getIntegerValue(parent, match, element, stream);

-              targetEngine.setConfigParameterValue(stringValue, i);

-            }

-          }

-        } else if (type.equals("Boolean")) {

-          if (value instanceof BooleanListExpression) {

-            BooleanListExpression ble = (BooleanListExpression) value;

-            List<Boolean> list = ble.getList(parent, stream);

-            targetEngine.setConfigParameterValue(stringValue, list.toArray());

-          } else {

-            if (value instanceof IBooleanExpression) {

-              IBooleanExpression be = (IBooleanExpression) value;

-              Boolean b = be.getBooleanValue(parent, match, element, stream);

-              targetEngine.setConfigParameterValue(stringValue, b);

-            }

-          }

-        }

-      }

-    }

-

-    try {

-      targetEngine.reconfigure();

-    } catch (ResourceConfigurationException e) {

-      e.printStackTrace();

-    }

-  }

-

-  public String getNamespace() {

-    return namespace;

-  }

-

-  public Map<IStringExpression, IRutaExpression> getParameterMap() {

-    return parameterMap;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/CreateAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/CreateAction.java
deleted file mode 100644
index 8021b97..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/CreateAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.cas.TOP;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class CreateAction extends AbstractStructureAction {

-

-  private TypeExpression structureType;

-

-  private Map<IStringExpression, IRutaExpression> features;

-

-  private List<INumberExpression> indexes;

-

-  public CreateAction(TypeExpression structureType, Map<IStringExpression, IRutaExpression> features,

-          List<INumberExpression> indexes) {

-    super();

-    this.structureType = structureType;

-    this.features = features == null ? new HashMap<IStringExpression, IRutaExpression>() : features;

-    this.indexes = (indexes == null || indexes.isEmpty()) ? null : indexes;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Integer> indexList = getIndexList(match, element, stream);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexList,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-

-      if (matchedAnnotation == null) {

-        return;

-      }

-      Type type = structureType.getType(element.getParent());

-      FeatureStructure newFS = stream.getCas().createFS(type);

-      if (newFS instanceof Annotation) {

-        Annotation a = (Annotation) newFS;

-        a.setBegin(matchedAnnotation.getBegin());

-        a.setEnd(matchedAnnotation.getEnd());

-        stream.addAnnotation(a, match);

-      }

-      TOP newStructure = null;

-      if (newFS instanceof TOP) {

-        newStructure = (TOP) newFS;

-        fillFeatures(newStructure, features, matchedAnnotation, element, stream);

-        newStructure.addToIndexes();

-      }

-    }

-  }

-

-  // TODO refactor duplicate methods -> MarkAction

-  protected List<Integer> getIndexList(RuleMatch match, RuleElement element, RutaStream stream) {

-    List<Integer> indexList = new ArrayList<Integer>();

-    if (indexes == null || indexes.isEmpty()) {

-      int self = element.getContainer().getRuleElements().indexOf(element) + 1;

-      indexList.add(self);

-      return indexList;

-    }

-    int last = Integer.MAX_VALUE - 1;

-    for (INumberExpression each : indexes) {

-      int value = each.getIntegerValue(element.getParent(), null, stream);

-      for (int i = Math.min(value, last + 1); i < value; i++) {

-        indexList.add(i);

-      }

-      indexList.add(value);

-    }

-    return indexList;

-  }

-

-  public TypeExpression getStructureType() {

-    return structureType;

-  }

-

-  public Map<IStringExpression, IRutaExpression> getFeatures() {

-    return features;

-  }

-

-  public List<INumberExpression> getIndexes() {

-    return indexes;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/DelAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/DelAction.java
deleted file mode 100644
index c535203..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/DelAction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class DelAction extends AbstractRutaAction {

-

-  public DelAction() {

-    super();

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    for (AnnotationFS annotationFS : matchedAnnotationsOf) {

-      List<RutaBasic> basicsInWindow = stream.getBasicsInWindow(annotationFS);

-      for (RutaBasic basic : basicsInWindow) {

-        basic.setReplacement("");

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/DynamicAnchoringAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/DynamicAnchoringAction.java
deleted file mode 100644
index 741f000..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/DynamicAnchoringAction.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class DynamicAnchoringAction extends AbstractRutaAction {

-

-  private final IBooleanExpression active;

-

-  private final INumberExpression panelty;

-

-  private final INumberExpression factor;

-

-  public DynamicAnchoringAction(IBooleanExpression active, INumberExpression panelty,

-          INumberExpression factor) {

-    super();

-    this.active = active;

-    this.panelty = panelty;

-    this.factor = factor;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    boolean activated = active.getBooleanValue(parent, null, stream);

-    stream.setDynamicAnchoring(activated);

-    if (panelty != null) {

-      double p = panelty.getDoubleValue(parent, null, stream);

-      stream.setIndexPenalty(p);

-    }

-    if (factor != null) {

-      double f = factor.getDoubleValue(parent, null, stream);

-      stream.setAnchoringFactor(f);

-    }

-  }

-

-  public IBooleanExpression getActive() {

-    return active;

-  }

-

-  public INumberExpression getPanelty() {

-    return panelty;

-  }

-

-  public INumberExpression getFactor() {

-    return factor;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ExecAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ExecAction.java
deleted file mode 100644
index 0c719e7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ExecAction.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.Collection;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.fit.factory.AnalysisEngineFactory;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-import org.apache.uima.util.XMLInputSource;

-

-public class ExecAction extends CallAction {

-

-  private TypeListExpression typeList;

-

-  private IStringExpression view;

-

-  public ExecAction(String namespace) {

-    super(namespace);

-  }

-

-  public ExecAction(String ns, TypeListExpression tl, IStringExpression view) {

-    this(ns);

-    this.typeList = tl;

-    this.view = view;

-  }

-

-  @Override

-  protected void callScript(RutaBlock block, RuleMatch match, RuleElement element,

-          RutaStream stream, InferenceCrowd crowd) {

-    ScriptApply apply = block.apply(stream, crowd);

-    match.addDelegateApply(this, apply);

-  }

-

-  @Override

-  protected void callEngine(RuleMatch match, InferenceCrowd crowd, AnalysisEngine targetEngine,

-          RuleElement element, RutaStream stream) throws ResourceInitializationException,

-          AnalysisEngineProcessException {

-    CAS cas = stream.getCas();

-    if (view != null) {

-      String viewName = view.getStringValue(element.getParent(), match, element, stream);

-      if (!viewName.equals(CAS.NAME_DEFAULT_SOFA)) {

-        cas = cas.getView(viewName);

-        AnalysisEngineMetaData metaData = targetEngine.getAnalysisEngineMetaData();

-        try {

-          String sourceUrlString = metaData.getSourceUrlString();

-          if (sourceUrlString != null) {

-            AnalysisEngineDescription aed = (AnalysisEngineDescription) UIMAFramework

-                    .getXMLParser().parseResourceSpecifier(new XMLInputSource(sourceUrlString));

-            AnalysisEngine createEngine = AnalysisEngineFactory.createEngine(aed, viewName);

-            targetEngine = createEngine;

-          }

-        } catch (Exception e) {

-          e.printStackTrace();

-        }

-      }

-    }

-    targetEngine.process(cas);

-

-    if (typeList != null && view == null) {

-      List<Type> list = typeList.getList(element.getParent(), stream);

-      for (Type type : list) {

-        AnnotationIndex<AnnotationFS> ai = cas.getAnnotationIndex(type);

-        Collection<AnnotationFS> toUpdate = new LinkedList<AnnotationFS>();

-        for (AnnotationFS annotationFS : ai) {

-          toUpdate.add(annotationFS);

-        }

-        for (AnnotationFS each : toUpdate) {

-          stream.removeAnnotation(each);

-        }

-        for (AnnotationFS each : toUpdate) {

-          stream.addAnnotation(each, true, match);

-        }

-      }

-    }

-    

-    

-  }

-

-  public TypeListExpression getTypeList() {

-    return typeList;

-  }

-

-  public IStringExpression getView() {

-    return view;

-  }

-

-  public void setView(IStringExpression view) {

-    this.view = view;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/FillAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/FillAction.java
deleted file mode 100644
index 562cd0b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/FillAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class FillAction extends AbstractStructureAction {

-

-  private Map<IStringExpression, IRutaExpression> features;

-

-  private TypeExpression structureType;

-

-  public FillAction(TypeExpression structureType, Map<IStringExpression, IRutaExpression> features) {

-    super();

-    this.structureType = structureType;

-    this.features = features;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotationsOf(element);

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      if (matchedAnnotation == null) {

-        return;

-      }

-      Type type = getStructureType().getType(element.getParent());

-      List<AnnotationFS> list = stream.getAnnotationsInWindow(matchedAnnotation, type);

-      if (list.isEmpty()) {

-        list = stream.getOverappingAnnotations(matchedAnnotation, type);

-      }

-      if (list.isEmpty()) {

-        // look at the complete match of the rule

-        List<AnnotationFS> matchedAnnotations2 = match.getMatchedAnnotations(null,

-                element.getContainer());

-        if (!matchedAnnotations2.isEmpty()) {

-          AnnotationFS m = matchedAnnotations2.get(0);

-          list = stream.getAnnotationsInWindow(m, type);

-          if (list.isEmpty()) {

-            list = stream.getOverappingAnnotations(m, type);

-          }

-        }

-      }

-      if (!list.isEmpty()) {

-        AnnotationFS annotationFS = list.get(0);

-        stream.getCas().removeFsFromIndexes(annotationFS);

-        fillFeatures((Annotation) annotationFS, features, matchedAnnotation, element, stream);

-        stream.getCas().addFsToIndexes(annotationFS);

-      }

-    }

-

-  }

-

-  public Map<IStringExpression, IRutaExpression> getFeatures() {

-    return features;

-  }

-

-  public TypeExpression getStructureType() {

-    return structureType;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/FilterTypeAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/FilterTypeAction.java
deleted file mode 100644
index 1f39326..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/FilterTypeAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class FilterTypeAction extends AbstractRutaAction {

-

-  public List<TypeExpression> getList() {

-    return list;

-  }

-

-  private List<TypeExpression> list;

-

-  public FilterTypeAction(List<TypeExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> types = new ArrayList<Type>();

-    for (TypeExpression each : list) {

-      types.add(each.getType(element.getParent()));

-    }

-    stream.filterTypes(types);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GatherAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GatherAction.java
deleted file mode 100644
index 5f55a31..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GatherAction.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-

-import org.apache.commons.collections.CollectionUtils;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.jcas.cas.TOP;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.list.NumberListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaFrame;

-import org.apache.uima.ruta.utils.UIMAUtils;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class GatherAction extends AbstractStructureAction {

-

-  private TypeExpression structureType;

-

-  private Map<IStringExpression, IRutaExpression> features;

-

-  private List<INumberExpression> indexes;

-

-  public GatherAction(TypeExpression structureType,

-          Map<IStringExpression, IRutaExpression> features, List<INumberExpression> indexes) {

-    super();

-    this.structureType = structureType;

-    this.features = features == null ? new HashMap<IStringExpression, IRutaExpression>() : features;

-    this.indexes = (indexes == null || indexes.isEmpty()) ? null : indexes;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Integer> indexList = getIndexList(match, element, stream);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexList,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      if (matchedAnnotation == null) {

-        return;

-      }

-      Type type = structureType.getType(element.getParent());

-      FeatureStructure newFS = stream.getCas().createFS(type);

-      if (newFS instanceof Annotation) {

-        Annotation a = (Annotation) newFS;

-        a.setBegin(matchedAnnotation.getBegin());

-        a.setEnd(matchedAnnotation.getEnd());

-        stream.addAnnotation(a, match);

-      }

-      TOP newStructure = null;

-      if (newFS instanceof TOP) {

-        newStructure = (TOP) newFS;

-        gatherFeatures(newStructure, features, matchedAnnotation, element, match, stream);

-        newStructure.addToIndexes();

-      }

-    }

-

-  }

-

-  private void gatherFeatures(TOP structure, Map<IStringExpression, IRutaExpression> features,

-          AnnotationFS matchedAnnotation, RuleElement element, RuleMatch match, RutaStream stream) {

-    Map<String, List<Number>> map = new HashMap<String, List<Number>>();

-    for (Entry<IStringExpression, IRutaExpression> each : features.entrySet()) {

-      RutaBlock parent = element.getParent();

-      String value = each.getKey().getStringValue(parent, match, element, stream);

-      IRutaExpression expr = each.getValue();

-      List<Number> ints = new ArrayList<Number>();

-      if (expr instanceof INumberExpression) {

-        INumberExpression ne = (INumberExpression) expr;

-        ints.add(ne.getIntegerValue(parent, match, element, stream));

-        map.put(value, ints);

-      } else if (expr instanceof NumberListExpression) {

-        NumberListExpression ne = (NumberListExpression) expr;

-        map.put(value, ne.getList(parent, stream));

-      }

-    }

-

-    TypeSystem typeSystem = stream.getCas().getTypeSystem();

-    JCas jcas = stream.getJCas();

-    List<?> featuresList = structure.getType().getFeatures();

-    for (int i = 0; i < featuresList.size(); i++) {

-      Feature targetFeature = (Feature) featuresList.get(i);

-      String name = targetFeature.getName();

-      String shortFName = name.substring(name.indexOf(":") + 1, name.length());

-      List<Number> reIndexes = map.get(shortFName);

-      if (reIndexes != null && !reIndexes.isEmpty()) {

-        Type range = targetFeature.getRange();

-

-        List<RuleElementMatch> tms = getMatchInfo(match, element, reIndexes);

-        if (tms.size() == 0) {// do nothing

-

-        } else if (tms.size() == 1) {

-          RuleElementMatch tm = tms.get(0);

-          List<AnnotationFS> textsMatched = tm.getTextsMatched();

-          if (textsMatched.size() == 1) {

-            AnnotationFS fs = textsMatched.get(0);

-            if (typeSystem.subsumes(jcas.getCasType(FSArray.type), range)) {

-              List<AnnotationFS> list = new ArrayList<AnnotationFS>();

-              list.add(fs);

-              structure.setFeatureValue(targetFeature, UIMAUtils.toFSArray(jcas, list));

-            } else if (typeSystem.subsumes(range, fs.getType())) {

-              structure.setFeatureValue(targetFeature, fs);

-            } else {

-              // search for

-              Collection<AnnotationFS> beginAnchors = stream.getBeginAnchor(fs.getBegin())

-                      .getBeginAnchors(range);

-              Collection<AnnotationFS> endAnchors = stream.getEndAnchor(fs.getEnd()).getEndAnchors(

-                      range);

-              @SuppressWarnings("unchecked")

-              Collection<AnnotationFS> intersection = CollectionUtils.intersection(beginAnchors,

-                      endAnchors);

-              if (intersection.size() >= 1) {

-                structure.setFeatureValue(targetFeature, intersection.iterator().next());

-              }

-            }

-          }

-        } else {

-          List<AnnotationFS> textsMatched = getMatchedText(tms);

-          if (typeSystem.subsumes(jcas.getCasType(FSArray.type), range)) {

-            structure.setFeatureValue(targetFeature, UIMAUtils.toFSArray(jcas, textsMatched));

-          } else {

-            int begin = textsMatched.get(0).getBegin();

-            int end = textsMatched.get(textsMatched.size() - 1).getEnd();

-            RutaFrame frame = new RutaFrame(jcas, begin, end);

-            FSIterator<Annotation> iterator = jcas.getAnnotationIndex(range).iterator(frame);

-            AnnotationFS newA = null;

-            while (iterator.isValid()) {

-              Annotation a = iterator.get();

-              if (a.getBegin() == begin && a.getEnd() == end

-                      && jcas.getTypeSystem().subsumes(range, a.getType())) {

-                newA = a;

-              } else if (a.getBegin() > begin || a.getEnd() < end) {

-                break;

-              }

-              iterator.moveToNext();

-            }

-            if (newA == null) {

-              newA = jcas.getCas().createAnnotation(range, begin, end);

-            }

-            structure.setFeatureValue(targetFeature, newA);

-          }

-        }

-      }

-    }

-  }

-

-  private List<AnnotationFS> getMatchedText(List<RuleElementMatch> tms) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    for (RuleElementMatch each : tms) {

-      result.addAll(each.getTextsMatched());

-    }

-    return result;

-  }

-

-  private List<RuleElementMatch> getMatchInfo(RuleMatch match, RuleElement element,

-          List<Number> reIndexes) {

-    List<RuleElementMatch> result = new ArrayList<RuleElementMatch>();

-    List<RuleElement> elements = element.getContainer().getRuleElements();

-    for (Number eachNumber : reIndexes) {

-      int eachInt = eachNumber.intValue();

-      RuleElement ruleElement = elements.get(eachInt - 1);

-      List<List<RuleElementMatch>> matchInfo = match.getMatchInfo(ruleElement);

-      for (List<RuleElementMatch> list : matchInfo) {

-        if (list != null) {

-          result.addAll(list);

-        }

-      }

-    }

-    return result;

-  }

-

-  // TODO refactor duplicate methods -> MarkAction

-  protected List<Integer> getIndexList(RuleMatch match, RuleElement element, RutaStream stream) {

-    List<Integer> indexList = new ArrayList<Integer>();

-    if (indexes == null || indexes.isEmpty()) {

-      int self = element.getContainer().getRuleElements().indexOf(element) + 1;

-      indexList.add(self);

-      return indexList;

-    }

-    int last = Integer.MAX_VALUE - 1;

-    for (INumberExpression each : indexes) {

-      int value = each.getIntegerValue(element.getParent(), null, stream);

-      for (int i = Math.min(value, last + 1); i < value; i++) {

-        indexList.add(i);

-      }

-      indexList.add(value);

-    }

-    return indexList;

-  }

-

-  public TypeExpression getStructureType() {

-    return structureType;

-  }

-

-  public Map<IStringExpression, IRutaExpression> getFeatures() {

-    return features;

-  }

-

-  public List<INumberExpression> getIndexes() {

-    return indexes;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetAction.java
deleted file mode 100644
index 6430021..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetAction.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class GetAction extends AbstractRutaAction {

-

-  private ListExpression<IRutaExpression> listExpr;

-

-  private String var;

-

-  private IStringExpression opExpr;

-

-  public GetAction(ListExpression<IRutaExpression> f, String string, IStringExpression op) {

-    super();

-    this.listExpr = f;

-    this.var = string;

-    this.opExpr = op;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    String op = opExpr.getStringValue(parent, match, element, stream);

-    List<?> list = listExpr.getList(parent, stream);

-    if ("dominant".equals(op)) {

-      parent.getEnvironment().setVariableValue(var, getDominant(list, parent));

-    }

-  }

-

-  private Object getDominant(List<?> list, RutaBlock parent) {

-    List<Object> objs = new ArrayList<Object>();

-    List<Integer> counts = new ArrayList<Integer>();

-    for (Object each : list) {

-      Object value = each;// getValue(each, parent);

-      if (objs.contains(value)) {

-        int indexOf = objs.indexOf(value);

-        Integer i = counts.get(indexOf);

-        counts.set(indexOf, ++i);

-      } else {

-        counts.add(1);

-        objs.add(each);

-      }

-    }

-    Object dominant = null;

-    int dominantCount = -1;

-    int i = 0;

-    for (Object each : objs) {

-      int count = counts.get(i++);

-      if (count > dominantCount) {

-        dominantCount = count;

-        dominant = each;

-      }

-    }

-    return dominant;

-  }

-

-  public ListExpression<IRutaExpression> getListExpr() {

-    return listExpr;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-  public IStringExpression getOpExpr() {

-    return opExpr;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetFeatureAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetFeatureAction.java
deleted file mode 100644
index ba07eb2..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetFeatureAction.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class GetFeatureAction extends AbstractRutaAction {

-

-  private IStringExpression featureStringExpression;

-

-  private String variable;

-

-  public GetFeatureAction(IStringExpression f, String variable) {

-    super();

-    this.featureStringExpression = f;

-    this.variable = variable;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> types = new ArrayList<Type>();

-    RutaBlock parent = element.getParent();

-    if (element instanceof RutaRuleElement) {

-      types = ((RutaRuleElement) element).getMatcher().getTypes(parent, stream);

-    }

-    if (types == null)

-      return;

-

-    for (Type type : types) {

-      String stringValue = featureStringExpression.getStringValue(parent, match, element, stream);

-      Feature featureByBaseName = type.getFeatureByBaseName(stringValue);

-      RutaEnvironment environment = parent.getEnvironment();

-      List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotationsOf(element);

-      for (AnnotationFS annotationFS : matchedAnnotations) {

-        if (annotationFS.getType().getFeatureByBaseName(stringValue) == null) {

-          System.out.println("Can't access feature " + stringValue

-                  + ", because it's not defined in the matched type: " + annotationFS.getType());

-          return;

-        }

-

-        String featName = featureByBaseName.getRange().getName();

-        if (environment.getVariableType(variable).equals(String.class)

-                && featName.equals(UIMAConstants.TYPE_STRING)) {

-          Object value = annotationFS.getStringValue(featureByBaseName);

-          environment.setVariableValue(variable, value);

-        } else if (Number.class.isAssignableFrom(environment.getVariableType(variable))) {

-          Number value = 0;

-          if (featName.equals(UIMAConstants.TYPE_INTEGER)) {

-            value = annotationFS.getIntValue(featureByBaseName);

-          } else if (featName.equals(UIMAConstants.TYPE_DOUBLE)) {

-            value = annotationFS.getDoubleValue(featureByBaseName);

-          } else if (featName.equals(UIMAConstants.TYPE_FLOAT)) {

-            value = annotationFS.getFloatValue(featureByBaseName);

-          } else if (featName.equals(UIMAConstants.TYPE_BYTE)) {

-            value = annotationFS.getByteValue(featureByBaseName);

-          } else if (featName.equals(UIMAConstants.TYPE_SHORT)) {

-            value = annotationFS.getShortValue(featureByBaseName);

-          } else if (featName.equals(UIMAConstants.TYPE_LONG)) {

-            value = annotationFS.getLongValue(featureByBaseName);

-          }

-          environment.setVariableValue(variable, value);

-        } else if (environment.getVariableType(variable).equals(Boolean.class)

-                && featName.equals(UIMAConstants.TYPE_BOOLEAN)) {

-          Object value = annotationFS.getBooleanValue(featureByBaseName);

-          environment.setVariableValue(variable, value);

-        } else if (environment.getVariableType(variable).equals(Type.class)

-                && featName.equals(UIMAConstants.TYPE_STRING)) {

-          Object value = annotationFS.getStringValue(featureByBaseName);

-          Type t = stream.getCas().getTypeSystem().getType((String) value);

-          if (t != null) {

-            environment.setVariableValue(variable, t);

-          }

-        }

-      }

-    }

-

-  }

-

-  public IStringExpression getFeatureStringExpression() {

-    return featureStringExpression;

-  }

-

-  public String getVariable() {

-    return variable;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetListAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetListAction.java
deleted file mode 100644
index 2a76ab9..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GetListAction.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Set;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class GetListAction extends AbstractRutaAction {

-

-  private static final String TYPES = "Types";

-

-  private static final String TYPES_AT_END = "Types:End";

-

-  private static final String TYPES_AT_BEGIN = "Types:Begin";

-

-  private String var;

-

-  private IStringExpression opExpr;

-

-  public GetListAction(String var, IStringExpression op) {

-    super();

-    this.var = var;

-    this.opExpr = op;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    String op = opExpr.getStringValue(parent, match, element, stream);

-    List<Type> list = new ArrayList<Type>();

-

-    int indexOf = element.getContainer().getRuleElements().indexOf(element);

-    List<Integer> indexes = new ArrayList<Integer>();

-    indexes.add(indexOf + 1);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexes,

-            element.getContainer());

-    for (AnnotationFS matched : matchedAnnotations) {

-

-      if (TYPES_AT_BEGIN.equals(op)) {

-        RutaBasic beginAnchor = stream.getBeginAnchor(matched.getBegin());

-        Collection<?>[] beginMap = beginAnchor.getBeginMap();

-        Set<AnnotationFS> aset = new HashSet<AnnotationFS>();

-        for (Collection<?> set : beginMap) {

-          if(set != null) {

-            aset.addAll((Collection<? extends AnnotationFS>) set);

-          }

-        }

-        for (AnnotationFS annotationFS : aset) {

-          list.add(annotationFS.getType());

-        }

-      } else if (TYPES_AT_END.equals(op)) {

-        RutaBasic endAnchor = stream.getEndAnchor(matched.getEnd());

-//        Collection<Set<AnnotationFS>> values = endAnchor.getEndMap().values();

-        Collection<?>[] endMap = endAnchor.getEndMap();

-        Set<AnnotationFS> aset = new HashSet<AnnotationFS>();

-        for (Collection<?> set : endMap) {

-          if(set != null) {

-            aset.addAll((Collection<? extends AnnotationFS>) set);

-          }

-        }

-        for (AnnotationFS annotationFS : aset) {

-          list.add(annotationFS.getType());

-        }

-      } else if (TYPES.equals(op)) {

-        Type annotationType = stream.getCas().getAnnotationType();

-        List<AnnotationFS> inWindow = stream.getAnnotationsInWindow(matched, annotationType);

-        for (AnnotationFS each : inWindow) {

-          if (each.getBegin() == matched.getBegin() && each.getEnd() == matched.getEnd()) {

-            list.add(each.getType());

-          }

-          if (each.getBegin() > matched.getBegin() || each.getEnd() < matched.getEnd()) {

-            break;

-          }

-        }

-      }

-    }

-    parent.getEnvironment().setVariableValue(var, list);

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-  public IStringExpression getOpExpr() {

-    return opExpr;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GreedyAnchoringAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GreedyAnchoringAction.java
deleted file mode 100644
index 26ba33c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/GreedyAnchoringAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.ruta.action;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.bool.IBooleanExpression;
-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;
-import org.apache.uima.ruta.rule.RuleElement;
-import org.apache.uima.ruta.rule.RuleMatch;
-import org.apache.uima.ruta.visitor.InferenceCrowd;
-
-public class GreedyAnchoringAction extends AbstractRutaAction {
-
-  private final IBooleanExpression greedyRuleElement;
-
-  private final IBooleanExpression greedyRule;
-  
-  public GreedyAnchoringAction(IBooleanExpression active, IBooleanExpression active2) {
-    super();
-    this.greedyRuleElement = active;
-    this.greedyRule = active2 == null ? new SimpleBooleanExpression(false) : active2;
-  }
-
-  @Override
-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {
-    RutaBlock parent = element.getParent();
-    boolean greedy1 = greedyRuleElement.getBooleanValue(parent, match, element, stream);
-    boolean greedy2 = greedyRule.getBooleanValue(parent, match, element, stream);
-    stream.setGreedyRuleElement(greedy1);
-    stream.setGreedyRule(greedy2);
-  }
-
-  public IBooleanExpression getGreedyRuleElement() {
-    return greedyRuleElement;
-  }
-
-  public IBooleanExpression getGreedyRule() {
-    return greedyRule;
-  }
-
-  
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitFeatureAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitFeatureAction.java
deleted file mode 100644
index d656218..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitFeatureAction.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Comparator;

-import java.util.List;

-import java.util.TreeSet;

-

-import org.apache.commons.collections.CollectionUtils;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.feature.GenericFeatureExpression;

-import org.apache.uima.ruta.expression.feature.SimpleFeatureExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.ITypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.AnnotationComparator;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.utils.UIMAUtils;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ImplicitFeatureAction extends AbstractRutaAction {

-

-  private FeatureMatchExpression expr;

-

-  private Comparator<? super AnnotationFS> comp = new AnnotationComparator();

-

-  public ImplicitFeatureAction(FeatureMatchExpression expr) {

-    super();

-    this.expr = expr;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    TypeExpression typeExpr = expr.getTypeExpr(element.getParent());

-    Type type = typeExpr.getType(element.getParent());

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotationsOf(element);

-    Collection<AnnotationFS> annotations = new TreeSet<AnnotationFS>(comp);

-    for (AnnotationFS annotation : matchedAnnotations) {

-      annotations.addAll(getAnnotations(annotation, type, expr, stream));

-    }

-    for (AnnotationFS each : annotations) {

-      stream.getCas().removeFsFromIndexes(each);

-    }

-    Collection<AnnotationFS> featureAnnotations = expr.getFeatureAnnotations(annotations, stream,

-            element.getParent(), false);

-    if (featureAnnotations.isEmpty()) {

-      // null value in feature, but we require the host

-      featureAnnotations = annotations;

-    }

-    Feature feature = expr.getFeature(element.getParent());

-    IRutaExpression arg = expr.getArg();

-    for (AnnotationFS each : featureAnnotations) {

-      setFeatureValue(each, feature, arg, element, stream);

-    }

-    for (AnnotationFS each : annotations) {

-      stream.getCas().addFsToIndexes(each);

-    }

-  }

-

-  private void setFeatureValue(AnnotationFS a, Feature feature, IRutaExpression argExpr,

-          RuleElement element, RutaStream stream) {

-    if (feature == null) {

-      throw new IllegalArgumentException("Not able to assign feature value (e.g., coveredText).");

-    }

-    String range = feature.getRange().getName();

-    if (range.equals(UIMAConstants.TYPE_STRING)) {

-      if (argExpr instanceof IStringExpression) {

-        IStringExpression stringExpr = (IStringExpression) argExpr;

-        String string = stringExpr.getStringValue(element.getParent(), a, stream);

-        a.setStringValue(feature, string);

-      }

-    } else if (argExpr instanceof INumberExpression

-            && (range.equals(UIMAConstants.TYPE_INTEGER) || range.equals(UIMAConstants.TYPE_LONG)

-                    || range.equals(UIMAConstants.TYPE_SHORT) || range

-                      .equals(UIMAConstants.TYPE_BYTE))) {

-      INumberExpression numberExpr = (INumberExpression) argExpr;

-      int v = numberExpr.getIntegerValue(element.getParent(), a, stream);

-      a.setIntValue(feature, v);

-    } else if (argExpr instanceof INumberExpression && (range.equals(UIMAConstants.TYPE_DOUBLE))) {

-      INumberExpression numberExpr = (INumberExpression) argExpr;

-      double v = numberExpr.getDoubleValue(element.getParent(), a, stream);

-      a.setDoubleValue(feature, v);

-    } else if (argExpr instanceof INumberExpression && (range.equals(UIMAConstants.TYPE_FLOAT))) {

-      INumberExpression numberExpr = (INumberExpression) argExpr;

-      float v = numberExpr.getFloatValue(element.getParent(), a, stream);

-      a.setFloatValue(feature, v);

-    } else if (argExpr instanceof IBooleanExpression && (range.equals(UIMAConstants.TYPE_BOOLEAN))) {

-      IBooleanExpression booleanExpr = (IBooleanExpression) argExpr;

-      boolean v = booleanExpr.getBooleanValue(element.getParent(), a, stream);

-      a.setBooleanValue(feature, v);

-    } else if (argExpr instanceof IBooleanExpression && (range.equals(UIMAConstants.TYPE_BOOLEAN))) {

-      IBooleanExpression booleanExpr = (IBooleanExpression) argExpr;

-      boolean v = booleanExpr.getBooleanValue(element.getParent(), a, stream);

-      a.setBooleanValue(feature, v);

-    } else if (argExpr instanceof ITypeExpression && !feature.getRange().isPrimitive()) {

-      ITypeExpression typeExpr = (ITypeExpression) argExpr;

-      Type t = typeExpr.getType(element.getParent());

-      List<AnnotationFS> inWindow = stream.getAnnotationsInWindow(a, t);

-      if (feature.getRange().isArray()) {

-        a.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), inWindow));

-      } else {

-        if (inWindow != null) {

-          AnnotationFS annotation = inWindow.get(0);

-          a.setFeatureValue(feature, annotation);

-        } else {

-          a.setFeatureValue(feature, null);

-        }

-      }

-    } else if (argExpr instanceof GenericFeatureExpression && !feature.getRange().isPrimitive()) {

-      FeatureExpression fe = ((GenericFeatureExpression) argExpr).getFeatureExpression();

-      TypeExpression typeExpr = fe.getTypeExpr(element.getParent());

-      Type t = typeExpr.getType(element.getParent());

-      List<AnnotationFS> inWindow = stream.getAnnotationsInWindow(a, t);

-      if (fe instanceof SimpleFeatureExpression) {

-        SimpleFeatureExpression sfe = (SimpleFeatureExpression) fe;

-        List<AnnotationFS> featureAnnotations = new ArrayList<>(sfe.getFeatureAnnotations(inWindow,

-                stream, element.getParent(), false));

-        if (feature.getRange().isArray()) {

-          a.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), featureAnnotations));

-        } else if (!featureAnnotations.isEmpty()) {

-          AnnotationFS annotation = featureAnnotations.get(0);

-          a.setFeatureValue(feature, annotation);

-        }

-      } else {

-        if (feature.getRange().isArray()) {

-          a.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), inWindow));

-        } else {

-          AnnotationFS annotation = inWindow.get(0);

-          a.setFeatureValue(feature, annotation);

-        }

-      }

-    }

-  }

-

-  private List<AnnotationFS> getAnnotations(AnnotationFS annotation, Type type,

-          FeatureMatchExpression fme, RutaStream stream) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    TypeSystem typeSystem = stream.getCas().getTypeSystem();

-    if (typeSystem.subsumes(type, annotation.getType())) {

-      result.add(annotation);

-    } else {

-      Collection<AnnotationFS> beginAnchors = stream.getBeginAnchor(annotation.getBegin())

-              .getBeginAnchors(type);

-      Collection<AnnotationFS> endAnchors = stream.getEndAnchor(annotation.getEnd()).getEndAnchors(

-              type);

-      @SuppressWarnings("unchecked")

-      Collection<AnnotationFS> intersection = CollectionUtils

-              .intersection(beginAnchors, endAnchors);

-      result.addAll(intersection);

-    }

-    return result;

-  }

-

-  public FeatureMatchExpression getExpr() {

-    return expr;

-  }

-

-  public void setExpr(FeatureMatchExpression expr) {

-    this.expr = expr;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitMarkAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitMarkAction.java
deleted file mode 100644
index d8694a9..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ImplicitMarkAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ImplicitMarkAction extends AbstractMarkAction {

-

-  public ImplicitMarkAction(TypeExpression te) {

-    super(te);

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotationsOf(element);

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      if (matchedAnnotation == null) {

-        return;

-      }

-      createAnnotation(matchedAnnotation, element, stream, match);

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/LogAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/LogAction.java
deleted file mode 100644
index 89aad45..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/LogAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.logging.Level;

-import java.util.logging.Logger;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class LogAction extends AbstractRutaAction {

-

-  public static final String LOGGER_NAME = Logger.global.getName();

-

-  private final IStringExpression text;

-

-  private final Level level;

-

-  public LogAction(IStringExpression text, Level level) {

-    super();

-    this.text = text;

-    this.level = level == null ? Level.INFO : level;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    String msg = text.getStringValue(parent, match, element, stream);

-    Logger.getLogger(LOGGER_NAME).log(level, msg);

-  }

-

-  public IStringExpression getText() {

-    return text;

-  }

-

-  public Level getLevel() {

-    return level;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkAction.java
deleted file mode 100644
index 060007a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaAnnotation;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MarkAction extends AbstractMarkAction {

-

-  protected final INumberExpression score;

-

-  protected final List<INumberExpression> list;

-

-  public MarkAction(TypeExpression type, INumberExpression scoreValue, List<INumberExpression> list) {

-    super(type);

-    this.score = scoreValue;

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Integer> indexList = getIndexList(element, list, stream);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexList,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      if (matchedAnnotation == null) {

-        return;

-      }

-      if (score == null) {

-        createAnnotation(matchedAnnotation, element, stream, match);

-      } else {

-        double deltaScore = score.getDoubleValue(element.getParent(), null, stream);

-        updateHeuristicAnnotation(match, element, stream, matchedAnnotation, deltaScore);

-      }

-    }

-

-  }

-

-  protected void updateHeuristicAnnotation(RuleMatch match, RuleElement element, RutaStream stream,

-          AnnotationFS matchedAnnotation, double deltaScore) {

-    Type heuristicType = stream.getJCas().getCasType(RutaAnnotation.type);

-    RutaAnnotation heuristicAnnotation = (RutaAnnotation) stream.getCas().createAnnotation(

-            heuristicType, matchedAnnotation.getBegin(), matchedAnnotation.getEnd());

-    Annotation newAnnotation = (Annotation) stream.getCas().createAnnotation(

-            type.getType(element.getParent()), heuristicAnnotation.getBegin(),

-            heuristicAnnotation.getEnd());

-    heuristicAnnotation.setScore(deltaScore);

-    heuristicAnnotation.setAnnotation(newAnnotation);

-    List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(heuristicAnnotation,

-            heuristicType);

-

-    if (annotationsInWindow.isEmpty()) {

-      heuristicAnnotation.addToIndexes();

-      newAnnotation.addToIndexes();

-      stream.addAnnotation(newAnnotation, match);

-    } else {

-      RutaAnnotation tma = stream.getCorrectTMA(annotationsInWindow, heuristicAnnotation);

-      if (tma != null) {

-        tma.removeFromIndexes();

-        double newScore = tma.getScore() + deltaScore;

-        tma.setScore(newScore);

-        tma.addToIndexes();

-      } else {

-        heuristicAnnotation.addToIndexes();

-        newAnnotation.addToIndexes();

-        stream.addAnnotation(newAnnotation, match);

-      }

-    }

-

-  }

-

-  public INumberExpression getScore() {

-    return score;

-  }

-

-  public List<INumberExpression> getList() {

-    return list;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkFastAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkFastAction.java
deleted file mode 100644
index 90abfa4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkFastAction.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.resource.RutaWordList;

-import org.apache.uima.ruta.resource.TreeWordList;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MarkFastAction extends AbstractMarkAction {

-

-  private WordListExpression list;

-

-  private StringListExpression stringList;

-

-  private IBooleanExpression ignore;

-

-  private INumberExpression ignoreLength;

-

-  private IBooleanExpression ignoreWS;

-

-  public MarkFastAction(TypeExpression type, WordListExpression list, IBooleanExpression ignore,

-          INumberExpression ignoreLength, IBooleanExpression ignoreWS) {

-    super(type);

-    this.list = list;

-    this.ignore = ignore == null ? new SimpleBooleanExpression(false) : ignore;

-    this.ignoreLength = ignoreLength == null ? new SimpleNumberExpression(Integer.valueOf(0))

-            : ignoreLength;

-    this.ignoreWS = ignoreWS == null ? new SimpleBooleanExpression(true) : ignoreWS;

-  }

-

-  public MarkFastAction(TypeExpression type, StringListExpression list, IBooleanExpression ignore,

-          INumberExpression ignoreLength, IBooleanExpression ignoreWS) {

-    super(type);

-    this.stringList = list;

-    this.ignore = ignore == null ? new SimpleBooleanExpression(false) : ignore;

-    this.ignoreLength = ignoreLength == null ? new SimpleNumberExpression(Integer.valueOf(0))

-            : ignoreLength;

-    this.ignoreWS = ignoreWS == null ? new SimpleBooleanExpression(true) : ignoreWS;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    for (AnnotationFS annotationFS : matchedAnnotationsOf) {

-      RutaStream windowStream = stream.getWindowStream(annotationFS, annotationFS.getType());

-      RutaWordList wl = null;

-      RutaBlock parent = element.getParent();

-      if (list != null) {

-        wl = list.getList(parent);

-      } else if (stringList != null) {

-        wl = new TreeWordList(stringList.getList(parent, stream), false);

-      }

-      if (wl instanceof TreeWordList) {

-        Collection<AnnotationFS> found = wl.find(windowStream,

-                ignore.getBooleanValue(parent, match, element, stream),

-                ignoreLength.getIntegerValue(parent, match, element, stream), null, 0,

-                ignoreWS.getBooleanValue(parent, match, element, stream));

-        for (AnnotationFS annotation : found) {

-          createAnnotation(annotation, element, windowStream, match);

-        }

-      }

-    }

-  }

-

-  public WordListExpression getList() {

-    return list;

-  }

-

-  public StringListExpression getStringList() {

-    return stringList;

-  }

-

-  public IBooleanExpression getIgnore() {

-    return ignore;

-  }

-

-  public INumberExpression getIgnoreLength() {

-    return ignoreLength;

-  }

-

-  public IBooleanExpression getIgnoreWS() {

-    return ignoreWS;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkFirstAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkFirstAction.java
deleted file mode 100644
index 8539549..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkFirstAction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MarkFirstAction extends AbstractMarkAction {

-

-  public MarkFirstAction(TypeExpression type) {

-    super(type);

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(null,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      RutaBasic beginAnchor = stream.getBeginAnchor(matchedAnnotation.getBegin());

-      createAnnotation(beginAnchor, element, stream, match);

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkLastAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkLastAction.java
deleted file mode 100644
index 8fde034..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkLastAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MarkLastAction extends AbstractMarkAction {

-

-  public MarkLastAction(TypeExpression type) {

-    super(type);

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(null,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      List<RutaBasic> list = stream.getBasicsInWindow(matchedAnnotation);

-      if (!list.isEmpty()) {

-        RutaBasic last = list.get(list.size() - 1);

-        createAnnotation(last, element, stream, match);

-      }

-

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkOnceAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkOnceAction.java
deleted file mode 100644
index 68a303a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkOnceAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MarkOnceAction extends MarkAction {

-

-  public MarkOnceAction(TypeExpression type, INumberExpression scoreValue,

-          List<INumberExpression> list) {

-    super(type, scoreValue, list);

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Integer> indexList = getIndexList(element, list, stream);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexList,

-            element.getContainer());

-    Type targetType = type.getType(element.getParent());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      boolean partof = false;

-      List<RutaBasic> basicsInWindow = stream.getBasicsInWindow(matchedAnnotation);

-      for (RutaBasic rutaBasic : basicsInWindow) {

-        if (rutaBasic.isPartOf(targetType)) {

-          partof = true;

-          break;

-        }

-      }

-      if (!partof) {

-        createAnnotation(matchedAnnotation, element, stream, match);

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkTableAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkTableAction.java
deleted file mode 100644
index 7d80027..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MarkTableAction.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.cas.TOP;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.resource.RutaTable;

-import org.apache.uima.ruta.resource.RutaWordList;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MarkTableAction extends AbstractRutaAction {

-

-  private final TypeExpression typeExpr;

-

-  private final WordTableExpression tableExpr;

-

-  private final Map<IStringExpression, INumberExpression> featureMap;

-

-  private final INumberExpression indexExpr;

-

-  private final IBooleanExpression ignoreCase;

-

-  private final INumberExpression ignoreLength;

-

-  private final IStringExpression ignoreChar;

-

-  private final INumberExpression maxIgnoreChar;

-

-  public MarkTableAction(TypeExpression typeExpr, INumberExpression indexExpr,

-          WordTableExpression tableExpr, Map<IStringExpression, INumberExpression> featureMap,

-          IBooleanExpression ignoreCase, INumberExpression ignoreLength,

-          IStringExpression ignoreChar, INumberExpression maxIgnoreChar) {

-    super();

-    this.typeExpr = typeExpr;

-    this.indexExpr = indexExpr;

-    this.tableExpr = tableExpr;

-    this.featureMap = featureMap;

-    this.ignoreCase = ignoreCase;

-    this.ignoreLength = ignoreLength;

-    this.ignoreChar = ignoreChar;

-    this.maxIgnoreChar = maxIgnoreChar;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock block = element.getParent();

-    RutaTable table = tableExpr.getTable(block);

-    int index = indexExpr.getIntegerValue(block, match, element, stream);

-    Type type = typeExpr.getType(block);

-    Map<String, Integer> map = new HashMap<String, Integer>();

-    for (IStringExpression each : featureMap.keySet()) {

-      map.put(each.getStringValue(block, match, element, stream), featureMap.get(each)

-              .getIntegerValue(block, match, element, stream));

-    }

-

-    boolean ignoreCaseValue = ignoreCase != null ? ignoreCase.getBooleanValue(element.getParent(),

-            null, stream) : false;

-    int ignoreLengthValue = ignoreLength != null ? ignoreLength.getIntegerValue(

-            element.getParent(), null, stream) : 0;

-    String ignoreCharValue = ignoreChar != null ? ignoreChar.getStringValue(element.getParent(),

-            null, stream) : "";

-    int maxIgnoreCharValue = maxIgnoreChar != null ? maxIgnoreChar.getIntegerValue(

-            element.getParent(), null, stream) : 0;

-

-    RutaWordList wordList = table.getWordList(index, element.getParent());

-    Collection<AnnotationFS> found = wordList.find(stream, ignoreCaseValue, ignoreLengthValue,

-            ignoreCharValue.toCharArray(), maxIgnoreCharValue, true);

-    for (AnnotationFS annotationFS : found) {

-      // HOTFIX: for feature assignment

-      String candidate = stream.getVisibleCoveredText(annotationFS);

-      for (int i = 0; i < maxIgnoreCharValue; i++) {

-        candidate = candidate.replaceFirst("[" + ignoreCharValue + "]", "");

-      }

-      List<String> rowWhere = table.getRowWhere(index - 1, candidate);

-      if (rowWhere.isEmpty() && ignoreCaseValue && candidate.length() > ignoreLengthValue) {

-        // TODO: does not cover all variants

-        rowWhere = table.getRowWhere(index - 1, candidate.toLowerCase());

-      }

-      FeatureStructure newFS = stream.getCas().createFS(type);

-      if (newFS instanceof Annotation) {

-        Annotation a = (Annotation) newFS;

-        a.setBegin(annotationFS.getBegin());

-        a.setEnd(annotationFS.getEnd());

-        stream.addAnnotation(a, match);

-      }

-      TOP newStructure = null;

-      if (newFS instanceof TOP) {

-        newStructure = (TOP) newFS;

-        fillFeatures(newStructure, map, annotationFS, element, rowWhere, stream);

-        newStructure.addToIndexes();

-      }

-    }

-  }

-

-  private void fillFeatures(TOP structure, Map<String, Integer> map, AnnotationFS annotationFS,

-          RuleElement element, List<String> row, RutaStream stream) {

-    List<?> featuresList = structure.getType().getFeatures();

-    for (int i = 0; i < featuresList.size(); i++) {

-      Feature targetFeature = (Feature) featuresList.get(i);

-      String name = targetFeature.getName();

-      String shortFName = name.substring(name.indexOf(":") + 1, name.length());

-      Integer entryIndex = map.get(shortFName);

-      Type range = targetFeature.getRange();

-      if (entryIndex != null && row.size() >= entryIndex) {

-        String value = row.get(entryIndex - 1);

-        if (range.getName().equals(UIMAConstants.TYPE_STRING)) {

-          structure.setStringValue(targetFeature, value);

-        } else if (range.getName().equals(UIMAConstants.TYPE_INTEGER)) {

-          Integer integer = Integer.parseInt(value);

-          structure.setIntValue(targetFeature, integer);

-        } else if (range.getName().equals(UIMAConstants.TYPE_DOUBLE)) {

-          Double d = Double.parseDouble(value);

-          structure.setDoubleValue(targetFeature, d);

-        } else if (range.getName().equals(UIMAConstants.TYPE_FLOAT)) {

-          Float d = Float.parseFloat(value);

-          structure.setFloatValue(targetFeature, d);

-        } else if (range.getName().equals(UIMAConstants.TYPE_BYTE)) {

-          Byte d = Byte.parseByte(value);

-          structure.setByteValue(targetFeature, d);

-        } else if (range.getName().equals(UIMAConstants.TYPE_SHORT)) {

-          Short d = Short.parseShort(value);

-          structure.setShortValue(targetFeature, d);

-        } else if (range.getName().equals(UIMAConstants.TYPE_LONG)) {

-          Long d = Long.parseLong(value);

-          structure.setLongValue(targetFeature, d);

-        } else if (range.getName().equals(UIMAConstants.TYPE_BOOLEAN)) {

-          Boolean b = Boolean.parseBoolean(value);

-          structure.setBooleanValue(targetFeature, b);

-        } else {

-        }

-      }

-

-    }

-  }

-

-  public TypeExpression getTypeExpr() {

-    return typeExpr;

-  }

-

-  public WordTableExpression getTableExpr() {

-    return tableExpr;

-  }

-

-  public Map<IStringExpression, INumberExpression> getFeatureMap() {

-    return featureMap;

-  }

-

-  public INumberExpression getIndexExpr() {

-    return indexExpr;

-  }

-

-  public IBooleanExpression getIgnoreCase() {

-    return ignoreCase;

-  }

-

-  public INumberExpression getIgnoreLength() {

-    return ignoreLength;

-  }

-

-  public IStringExpression getIgnoreChar() {

-    return ignoreChar;

-  }

-

-  public INumberExpression getMaxIgnoreChar() {

-    return maxIgnoreChar;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MatchedTextAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MatchedTextAction.java
deleted file mode 100644
index 7729e28..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MatchedTextAction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MatchedTextAction extends AbstractRutaAction {

-

-  private final String var;

-

-  private final List<INumberExpression> list;

-

-  public MatchedTextAction(String var, List<INumberExpression> list) {

-    super();

-    this.var = var;

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Integer> indexList = getIndexList(match, element, stream);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexList,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      element.getParent().getEnvironment()

-              .setVariableValue(var, matchedAnnotation.getCoveredText());

-    }

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-  public List<INumberExpression> getList() {

-    return list;

-  }

-

-  protected List<Integer> getIndexList(RuleMatch match, RuleElement element, RutaStream stream) {

-    List<Integer> indexList = new ArrayList<Integer>();

-    if (list == null || list.isEmpty()) {

-      int self = element.getContainer().getRuleElements().indexOf(element) + 1;

-      indexList.add(self);

-      return indexList;

-    }

-    int last = Integer.MAX_VALUE - 1;

-    for (INumberExpression each : list) {

-      int value = each.getIntegerValue(element.getParent(), null, stream);

-      for (int i = Math.min(value, last + 1); i < value; i++) {

-        indexList.add(i);

-      }

-      indexList.add(value);

-    }

-    return indexList;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MergeAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MergeAction.java
deleted file mode 100644
index 5bb9bc0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/MergeAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.commons.collections.ListUtils;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MergeAction extends AbstractRutaAction {

-

-  @SuppressWarnings("rawtypes")

-  private List<ListExpression> lists;

-

-  private IBooleanExpression unionExpr;

-

-  private String target;

-

-  @SuppressWarnings("rawtypes")

-  public MergeAction(IBooleanExpression union, String target, List<ListExpression> list) {

-    super();

-    this.unionExpr = union;

-    this.target = target;

-    this.lists = list;

-  }

-

-  @SuppressWarnings({ "unchecked", "rawtypes" })

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    boolean union = unionExpr.getBooleanValue(element.getParent(), null, stream);

-    List<Object> list = new ArrayList<Object>();

-    if (union) {

-      for (ListExpression<Object> each : lists) {

-        list.addAll(each.getList(element.getParent(), stream));

-      }

-    } else {

-      List<Object> lastList = null;

-      for (int i = 1; i < lists.size(); i++) {

-        List l2 = lists.get(i).getList(element.getParent(), stream);

-        if (lastList != null) {

-          lastList = ListUtils.intersection(lastList, l2);

-        } else {

-          List l1 = lists.get(i - 1).getList(element.getParent(), stream);

-          lastList = ListUtils.intersection(l1, l2);

-        }

-      }

-      list = lastList;

-    }

-    if (list != null) {

-      element.getParent().getEnvironment().setVariableValue(target, list);

-    }

-  }

-

-  public IBooleanExpression getUnion() {

-    return unionExpr;

-  }

-

-  @SuppressWarnings("rawtypes")

-  public List<ListExpression> getLists() {

-    return lists;

-  }

-

-  public String getTarget() {

-    return target;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveAction.java
deleted file mode 100644
index 924be7a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveAction.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RemoveAction extends AbstractRutaAction {

-

-  private String var;

-

-  private List<IRutaExpression> elements;

-

-  public RemoveAction(String var, List<IRutaExpression> list) {

-    super();

-    this.var = var;

-    this.elements = list;

-  }

-

-  public String getListExpr() {

-    return var;

-  }

-

-  public List<IRutaExpression> getElements() {

-    return elements;

-  }

-

-  @SuppressWarnings({ "rawtypes" })

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    List list = parent.getEnvironment().getVariableValue(var, List.class);

-    List<Object> toRemove = new ArrayList<Object>();

-    for (Object entry : list) {

-      Object value1 = getValue(entry, parent, stream);

-      for (IRutaExpression arg : elements) {

-        if (arg instanceof ListExpression) {

-          ListExpression l = (ListExpression) arg;

-          List list2 = l.getList(parent, stream);

-          for (Object object : list2) {

-            Object value2 = getValue(object, parent, stream);

-            if (value1.equals(value2)) {

-              toRemove.add(entry);

-            }

-          }

-        } else {

-          Object value2 = getValue(arg, parent, stream);

-          if (value1.equals(value2)) {

-            toRemove.add(entry);

-          }

-        }

-      }

-    }

-    for (Object object : toRemove) {

-      list.remove(object);

-    }

-    parent.getEnvironment().setVariableValue(var, list);

-  }

-

-  private Object getValue(Object obj, RutaBlock parent, RutaStream stream) {

-    if (obj instanceof INumberExpression) {

-      return ((INumberExpression) obj).getDoubleValue(parent, null, stream);

-    } else if (obj instanceof IBooleanExpression) {

-      return ((IBooleanExpression) obj).getBooleanValue(parent, null, stream);

-    } else if (obj instanceof TypeExpression) {

-      return ((TypeExpression) obj).getType(parent);

-    } else if (obj instanceof IStringExpression) {

-      return ((IStringExpression) obj).getStringValue(parent, null, stream);

-    }

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveDuplicateAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveDuplicateAction.java
deleted file mode 100644
index 7a3e700..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveDuplicateAction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RemoveDuplicateAction extends AbstractRutaAction {

-

-  private String var;

-

-  public RemoveDuplicateAction(String var) {

-    super();

-    this.var = var;

-  }

-

-  public String getListExpr() {

-    return var;

-  }

-

-  @SuppressWarnings({ "rawtypes" })

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List list = element.getParent().getEnvironment().getVariableValue(var, List.class);

-    Collection<Object> values = new HashSet<Object>();

-    List<Object> result = new ArrayList<Object>();

-    for (Object each : list) {

-      Object obj = getValue(each, element.getParent(), stream);

-      if (!values.contains(obj)) {

-        result.add(each);

-        values.add(obj);

-      }

-    }

-

-    element.getParent().getEnvironment().setVariableValue(var, result);

-

-  }

-

-  private Object getValue(Object obj, RutaBlock parent, RutaStream stream) {

-    if (obj instanceof INumberExpression) {

-      return ((INumberExpression) obj).getDoubleValue(parent, null, stream);

-    } else if (obj instanceof IBooleanExpression) {

-      return ((IBooleanExpression) obj).getBooleanValue(parent, null, stream);

-    } else if (obj instanceof TypeExpression) {

-      return ((TypeExpression) obj).getType(parent);

-    } else if (obj instanceof IStringExpression) {

-      return ((IStringExpression) obj).getStringValue(parent, null, stream);

-    }

-    return null;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveFilterTypeAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveFilterTypeAction.java
deleted file mode 100644
index f87f2b0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveFilterTypeAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RemoveFilterTypeAction extends AbstractRutaAction {

-

-  public List<TypeExpression> getList() {

-    return list;

-  }

-

-  private List<TypeExpression> list;

-

-  public RemoveFilterTypeAction(List<TypeExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> types = new ArrayList<Type>();

-    for (TypeExpression each : list) {

-      types.add(each.getType(element.getParent()));

-    }

-    stream.removeFilterTypes(types);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveRetainTypeAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveRetainTypeAction.java
deleted file mode 100644
index 99822dd..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RemoveRetainTypeAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RemoveRetainTypeAction extends AbstractRutaAction {

-

-  public List<TypeExpression> getList() {

-    return list;

-  }

-

-  private List<TypeExpression> list;

-

-  public RemoveRetainTypeAction(List<TypeExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> types = new ArrayList<Type>();

-    for (TypeExpression each : list) {

-      types.add(each.getType(element.getParent()));

-    }

-    stream.removeRetainTypes(types);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ReplaceAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ReplaceAction.java
deleted file mode 100644
index 435e0ae..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ReplaceAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ReplaceAction extends AbstractRutaAction {

-

-  public IStringExpression getReplacement() {

-    return replacement;

-  }

-

-  private final IStringExpression replacement;

-

-  public ReplaceAction(IStringExpression replacement) {

-    super();

-    this.replacement = replacement;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(null,

-            element.getContainer());

-    for (AnnotationFS matchedAnnotation : matchedAnnotations) {

-      List<RutaBasic> annotationsInWindow = stream.getBasicsInWindow(matchedAnnotation);

-      boolean replaced = false;

-      for (RutaBasic basic : annotationsInWindow) {

-        RutaBlock parent = element.getParent();

-        basic.setReplacement(replaced ? "" : replacement.getStringValue(parent, match, element,

-                stream));

-        replaced = true;

-      }

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RetainTypeAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RetainTypeAction.java
deleted file mode 100644
index 1ad7815..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/RetainTypeAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RetainTypeAction extends AbstractRutaAction {

-

-  public List<TypeExpression> getList() {

-    return list;

-  }

-

-  private List<TypeExpression> list;

-

-  public RetainTypeAction(List<TypeExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> types = new ArrayList<Type>();

-    for (TypeExpression each : list) {

-      types.add(each.getType(element.getParent()));

-    }

-    stream.retainTypes(types);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/SetFeatureAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/SetFeatureAction.java
deleted file mode 100644
index e5ad7d1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/SetFeatureAction.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.feature.GenericFeatureExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.ITypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.utils.UIMAUtils;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class SetFeatureAction extends AbstractRutaAction {

-

-  private final IStringExpression featureStringExpression;

-

-  private final IRutaExpression expr;

-

-  public SetFeatureAction(IStringExpression feature, IRutaExpression expr) {

-    super();

-    this.featureStringExpression = feature;

-    this.expr = expr;

-  }

-

-  public IStringExpression getFeatureStringExpression() {

-    return featureStringExpression;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    String featureString = featureStringExpression.getStringValue(parent, match, element, stream);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotationsOf(element);

-    for (AnnotationFS annotationFS : matchedAnnotations) {

-      Feature feature = annotationFS.getType().getFeatureByBaseName(featureString);

-

-      if (feature != null) {

-        Type range = feature.getRange();

-        String rangeName = range.getName();

-        stream.getCas().removeFsFromIndexes(annotationFS);

-        if (rangeName.equals(UIMAConstants.TYPE_STRING) && expr instanceof IStringExpression) {

-          IStringExpression stringExpr = (IStringExpression) expr;

-          String string = stringExpr.getStringValue(parent, match, element, stream);

-          annotationFS.setStringValue(feature, string);

-        } else if (rangeName.equals(UIMAConstants.TYPE_INTEGER)

-                && expr instanceof INumberExpression) {

-          INumberExpression numberExpr = (INumberExpression) expr;

-          int v = numberExpr.getIntegerValue(parent, match, element, stream);

-          annotationFS.setIntValue(feature, v);

-        } else if (rangeName.equals(UIMAConstants.TYPE_DOUBLE) && expr instanceof INumberExpression) {

-          INumberExpression numberExpr = (INumberExpression) expr;

-          double v = numberExpr.getDoubleValue(parent, match, element, stream);

-          annotationFS.setDoubleValue(feature, v);

-        } else if (rangeName.equals(UIMAConstants.TYPE_FLOAT) && expr instanceof INumberExpression) {

-          INumberExpression numberExpr = (INumberExpression) expr;

-          float v = (float) numberExpr.getFloatValue(parent, match, element, stream);

-          annotationFS.setFloatValue(feature, v);

-        } else if (rangeName.equals(UIMAConstants.TYPE_BYTE) && expr instanceof INumberExpression) {

-          INumberExpression numberExpr = (INumberExpression) expr;

-          byte v = (byte) numberExpr.getIntegerValue(parent, match, element, stream);

-          annotationFS.setByteValue(feature, v);

-        } else if (rangeName.equals(UIMAConstants.TYPE_SHORT) && expr instanceof INumberExpression) {

-          INumberExpression numberExpr = (INumberExpression) expr;

-          short v = (short) numberExpr.getIntegerValue(parent, match, element, stream);

-          annotationFS.setShortValue(feature, v);

-        } else if (rangeName.equals(UIMAConstants.TYPE_LONG) && expr instanceof INumberExpression) {

-          INumberExpression numberExpr = (INumberExpression) expr;

-          long v = numberExpr.getIntegerValue(parent, match, element, stream);

-          annotationFS.setLongValue(feature, v);

-        } else if (rangeName.equals(UIMAConstants.TYPE_BOOLEAN)

-                && expr instanceof IBooleanExpression) {

-          IBooleanExpression booleanExpr = (IBooleanExpression) expr;

-          boolean v = booleanExpr.getBooleanValue(parent, match, element, stream);

-          annotationFS.setBooleanValue(feature, v);

-        } else if (expr instanceof ITypeExpression) {

-          ITypeExpression typeExpr = (ITypeExpression) expr;

-          Type t = typeExpr.getType(parent);

-          List<AnnotationFS> inWindow = stream.getAnnotationsInWindow(annotationFS, t);

-          if (feature.getRange().isArray()) {

-            annotationFS.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), inWindow));

-          } else {

-            if (inWindow != null) {

-              AnnotationFS annotation = inWindow.get(0);

-              annotationFS.setFeatureValue(feature, annotation);

-            } else {

-              annotationFS.setFeatureValue(feature, null);

-            }

-          }

-        } else if(expr instanceof GenericFeatureExpression) {

-          TypeExpression typeExpr = ((GenericFeatureExpression) expr).getFeatureExpression()

-                  .getTypeExpr(parent);

-          Type t = typeExpr.getType(parent);

-          List<AnnotationFS> inWindow = stream.getAnnotationsInWindow(annotationFS, t);

-          if (feature.getRange().isArray()) {

-            annotationFS.setFeatureValue(feature, UIMAUtils.toFSArray(stream.getJCas(), inWindow));

-          } else {

-            AnnotationFS annotation = inWindow.get(0);

-            annotationFS.setFeatureValue(feature, annotation);

-          }

-        }

-        stream.getCas().addFsToIndexes(annotationFS);

-      } else {

-        throw new IllegalArgumentException("Not able to assign feature value (e.g., coveredText).");

-      }

-    }

-  }

-

-  public IRutaExpression getExpr() {

-    return expr;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ShiftAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ShiftAction.java
deleted file mode 100644
index 6ccb414..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/ShiftAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.Collection;

-import java.util.List;

-import java.util.Set;

-import java.util.TreeSet;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.AnnotationComparator;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ShiftAction extends MarkAction {

-

-  public ShiftAction(TypeExpression type, List<INumberExpression> list) {

-    super(type, null, list);

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    Type targetType = type.getType(element.getParent());

-    List<Integer> indexList = getIndexList(element, list, stream);

-    List<AnnotationFS> destinationAnnotationSpans = match.getMatchedAnnotations(indexList,

-            element.getContainer());

-    List<AnnotationFS> annotationsMatchedByRuleElementofAction = match

-            .getMatchedAnnotationsOf(element);

-    int size = Math.min(annotationsMatchedByRuleElementofAction.size(),

-            destinationAnnotationSpans.size());

-

-    RutaBasic firstBasicOfAll = stream.getFirstBasicOfAll();

-    RutaBasic lastBasicOfAll = stream.getLastBasicOfAll();

-    int windowBegin = firstBasicOfAll == null ? 0 : firstBasicOfAll.getBegin();

-    int windowEnd = lastBasicOfAll == null ? 0 : lastBasicOfAll.getEnd();

-    for (int i = 0; i < size; i++) {

-      AnnotationFS eachMatched = annotationsMatchedByRuleElementofAction.get(i);

-      AnnotationFS eachDestination = destinationAnnotationSpans.get(i);

-      Set<AnnotationFS> allAnchoredAnnotations = new TreeSet<AnnotationFS>(

-              new AnnotationComparator());

-      Collection<AnnotationFS> beginAnchors = stream.getBeginAnchor(eachMatched.getBegin())

-              .getBeginAnchors(targetType);

-      Collection<AnnotationFS> endAnchors = stream.getEndAnchor(eachMatched.getEnd())

-              .getEndAnchors(targetType);

-      allAnchoredAnnotations.addAll(beginAnchors);

-      allAnchoredAnnotations.addAll(endAnchors);

-

-      for (AnnotationFS eachAnchored : allAnchoredAnnotations) {

-        if (eachAnchored.getBegin() >= windowBegin && eachAnchored.getEnd() <= windowEnd) {

-          Annotation a = (Annotation) eachAnchored;

-          stream.removeAnnotation(a);

-          a.setBegin(eachDestination.getBegin());

-          a.setEnd(eachDestination.getEnd());

-          stream.addAnnotation(a, true, match);

-        }

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TransferAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TransferAction.java
deleted file mode 100644
index d56ec37..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TransferAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class TransferAction extends TypeSensitiveAction {

-

-  public TransferAction(TypeExpression type) {

-    super(type);

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<List<RuleElementMatch>> list = match.getMatchInfo(element);

-    CAS cas = stream.getCas();

-    Type t = type.getType(element.getParent());

-    for (List<RuleElementMatch> eachList : list) {

-      for (RuleElementMatch each : eachList) {

-        List<AnnotationFS> matched = each.getTextsMatched();

-        for (AnnotationFS annotationFS : matched) {

-          FeatureStructure createFS = cas.createFS(t);

-          copyFeatures(annotationFS, createFS, cas);

-          if (createFS instanceof AnnotationFS) {

-            stream.addAnnotation((AnnotationFS) createFS, match);

-          }

-          cas.addFsToIndexes(createFS);

-        }

-      }

-    }

-

-  }

-

-  private void copyFeatures(AnnotationFS oldFS, FeatureStructure newFS, CAS cas) {

-    List<?> features = oldFS.getType().getFeatures();

-    Type newType = newFS.getType();

-    for (Object object : features) {

-      Feature feature = (Feature) object;

-      String shortName = feature.getShortName();

-      Feature newFeature = newType.getFeatureByBaseName(shortName);

-      if (newFeature != null) {

-        if (feature.getRange().isPrimitive()) {

-          String value = oldFS.getFeatureValueAsString(feature);

-          newFS.setFeatureValueFromString(newFeature, value);

-        } else {

-          FeatureStructure value = oldFS.getFeatureValue(feature);

-          newFS.setFeatureValue(newFeature, value);

-        }

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java
deleted file mode 100644
index be2e40a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.UntypedListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.resource.RutaWordList;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class TrieAction extends AbstractRutaAction {

-

-  private final WordListExpression list;

-

-  private final Map<IStringExpression, IRutaExpression> map;

-

-  private final IBooleanExpression ignoreCase;

-

-  private final INumberExpression ignoreLength;

-

-  private final IBooleanExpression edit;

-

-  private final INumberExpression distance;

-

-  private final IStringExpression ignoreChar;

-

-  public TrieAction(WordListExpression list, Map<IStringExpression, IRutaExpression> map,

-          IBooleanExpression ignoreCase, INumberExpression ignoreLength, IBooleanExpression edit,

-          INumberExpression distance, IStringExpression ignoreChar) {

-    super();

-    this.list = list;

-    this.map = map;

-    this.ignoreCase = ignoreCase;

-    this.ignoreLength = ignoreLength;

-    this.edit = edit;

-    this.distance = distance;

-    this.ignoreChar = ignoreChar;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-

-    Map<String, Object> typeMap = new HashMap<String, Object>();

-    RutaBlock parent = element.getParent();

-    for (IStringExpression eachKey : map.keySet()) {

-      String stringValue = eachKey.getStringValue(parent, match, element, stream);

-      IRutaExpression expression = map.get(eachKey);

-      if (expression instanceof TypeExpression) {

-        Type typeValue = ((TypeExpression) expression).getType(parent);

-        typeMap.put(stringValue, typeValue);

-      } else if (expression instanceof UntypedListExpression) {

-        List<Object> innerList = ((UntypedListExpression) expression).getList(parent, stream);

-        typeMap.put(stringValue, innerList);

-      }

-    }

-    boolean ignoreCaseValue = ignoreCase.getBooleanValue(parent, match, element, stream);

-    int ignoreLengthValue = ignoreLength.getIntegerValue(parent, match, element, stream);

-    boolean editValue = edit.getBooleanValue(parent, match, element, stream);

-    double distanceValue = distance.getDoubleValue(parent, match, element, stream);

-    String ignoreCharValue = ignoreChar.getStringValue(parent, match, element, stream);

-

-    RutaWordList wl = list.getList(parent);

-    Collection<AnnotationFS> found = wl.find(stream, typeMap, ignoreCaseValue, ignoreLengthValue,

-            editValue, distanceValue, ignoreCharValue);

-

-    if (found != null) {

-      for (AnnotationFS annotation : found) {

-        stream.addAnnotation(annotation, match);

-        stream.getCas().addFsToIndexes(annotation);

-      }

-    }

-

-  }

-

-  public WordListExpression getList() {

-    return list;

-  }

-

-  public Map<IStringExpression, IRutaExpression> getMap() {

-    return map;

-  }

-

-  public IBooleanExpression getIgnoreCase() {

-    return ignoreCase;

-  }

-

-  public INumberExpression getIgnoreLength() {

-    return ignoreLength;

-  }

-

-  public IBooleanExpression getEdit() {

-    return edit;

-  }

-

-  public INumberExpression getDistance() {

-    return distance;

-  }

-

-  public IStringExpression getIgnoreChar() {

-    return ignoreChar;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrimAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrimAction.java
deleted file mode 100644
index 0d76789..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrimAction.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class TrimAction extends AbstractRutaAction {

-

-  private TypeListExpression typeList;

-

-  private List<TypeExpression> types;

-

-  public TrimAction(List<TypeExpression> types, TypeListExpression typeList) {

-    super();

-    this.types = types;

-    this.typeList = typeList;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    List<Type> typesToTrim = getTypes(element.getParent(), stream);

-    for (AnnotationFS annotationFS : matchedAnnotationsOf) {

-      trimAnnotation(annotationFS, typesToTrim, match, stream);

-    }

-  }

-

-  private void trimAnnotation(AnnotationFS annotation, List<Type> typesToTrim, RuleMatch match,

-          RutaStream stream) {

-    int oldBegin = annotation.getBegin();

-    int oldEnd = annotation.getEnd();

-    int newBegin = oldBegin;

-    int newEnd = oldEnd;

-

-    RutaBasic beginBasic = stream.getBeginAnchor(oldBegin);

-    while (beginBasic != null && isPartof(beginBasic, typesToTrim)

-            && beginBasic.getBegin() < oldEnd) {

-      beginBasic = stream.getBasicNextTo(false, beginBasic);

-    }

-    if (beginBasic != null) {

-      newBegin = beginBasic.getBegin();

-    } else {

-      stream.removeAnnotation(annotation);

-      return;

-    }

-

-    RutaBasic endBasic = stream.getEndAnchor(oldEnd);

-    while (endBasic != null && isPartof(endBasic, typesToTrim) && endBasic.getEnd() > newBegin) {

-      endBasic = stream.getBasicNextTo(true, endBasic);

-    }

-    if (endBasic != null) {

-      newEnd = endBasic.getEnd();

-    } else {

-      stream.removeAnnotation(annotation);

-      return;

-    }

-

-    if (oldBegin != newBegin || newEnd != oldEnd) {

-      stream.removeAnnotation(annotation);

-      if (annotation instanceof Annotation) {

-        Annotation a = (Annotation) annotation;

-        a.setBegin(newBegin);

-        a.setEnd(newEnd);

-      }

-      if (newBegin < newEnd) {

-        stream.addAnnotation(annotation, true, match);

-      }

-    }

-  }

-

-  private boolean isPartof(RutaBasic basic, List<Type> typesToTrim) {

-    for (Type type : typesToTrim) {

-      boolean partOf = basic.isPartOf(type);

-      if (partOf) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  private List<Type> getTypes(RutaBlock parent, RutaStream stream) {

-    List<Type> result = new ArrayList<Type>();

-    if (types != null) {

-      for (TypeExpression each : types) {

-        result.add(each.getType(parent));

-      }

-    } else if (typeList != null) {

-      result = typeList.getList(parent, stream);

-    }

-    return result;

-  }

-

-  public TypeListExpression getTypeList() {

-    return typeList;

-  }

-

-  public List<TypeExpression> getTypes() {

-    return types;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TypeSensitiveAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TypeSensitiveAction.java
deleted file mode 100644
index 22937bb..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TypeSensitiveAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public abstract class TypeSensitiveAction extends AbstractRutaAction {

-

-  public TypeSensitiveAction(TypeExpression type) {

-    super();

-    this.type = type;

-  }

-

-  protected TypeExpression type;

-

-  public TypeExpression getType() {

-    return type;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/UnmarkAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/UnmarkAction.java
deleted file mode 100644
index 2b6f522..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/UnmarkAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class UnmarkAction extends TypeSensitiveAction {

-

-  private List<INumberExpression> list;

-

-  private IBooleanExpression allAnchor;

-

-  public UnmarkAction(TypeExpression type, List<INumberExpression> list, IBooleanExpression b) {

-    super(type);

-    this.list = list;

-    this.allAnchor = b;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    Type t = type.getType(element.getParent());

-    boolean allAtAnchor = false;

-    if (allAnchor != null) {

-      allAtAnchor = allAnchor.getBooleanValue(element.getParent(), null, stream);

-    }

-    List<Integer> indexList = getIndexList(element, list, stream);

-    List<AnnotationFS> matchedAnnotations = match.getMatchedAnnotations(indexList,

-            element.getContainer());

-    for (AnnotationFS annotationFS : matchedAnnotations) {

-      Type matchedType = annotationFS.getType();

-      boolean subsumes = stream.getCas().getTypeSystem().subsumes(t, matchedType);

-      if(subsumes && !allAtAnchor) {

-        stream.removeAnnotation(annotationFS, t);

-      } else {

-        RutaBasic beginAnchor = stream.getBeginAnchor(annotationFS.getBegin());

-        Collection<AnnotationFS> beginAnchors = beginAnchor.getBeginAnchors(t);

-        if (beginAnchors != null) {

-          for (AnnotationFS each : new ArrayList<AnnotationFS>(beginAnchors)) {

-            if (allAtAnchor || each.getEnd() == annotationFS.getEnd()) {

-              stream.removeAnnotation(each, t);

-            }

-          }

-        }

-      }

-      

-    }

-

-  }

-

-  public List<INumberExpression> getList() {

-    return list;

-  }

-

-  public IBooleanExpression getAllAnchor() {

-    return allAnchor;

-  }

-

-  protected List<Integer> getIndexList(RuleElement element, List<INumberExpression> list,

-          RutaStream stream) {

-    List<Integer> indexList = new ArrayList<Integer>();

-    if (list == null || list.isEmpty()) {

-      int self = element.getContainer().getRuleElements().indexOf(element) + 1;

-      indexList.add(self);

-      return indexList;

-    }

-    int last = Integer.MAX_VALUE - 1;

-    for (INumberExpression each : list) {

-      int value = each.getIntegerValue(element.getParent(), null, stream);

-      for (int i = Math.min(value, last + 1); i < value; i++) {

-        indexList.add(i);

-      }

-      indexList.add(value);

-    }

-    return indexList;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/UnmarkAllAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/UnmarkAllAction.java
deleted file mode 100644
index 062d447..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/UnmarkAllAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class UnmarkAllAction extends TypeSensitiveAction {

-

-  private final TypeListExpression list;

-

-  public UnmarkAllAction(TypeExpression type, TypeListExpression list) {

-    super(type);

-    this.list = list;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    List<Type> retainList = new ArrayList<Type>();

-    if (list != null) {

-      retainList = list.getList(element.getParent(), stream);

-    }

-    Type t = type.getType(element.getParent());

-    TypeSystem typeSystem = stream.getCas().getTypeSystem();

-    List<AnnotationFS> toRemove = new LinkedList<AnnotationFS>();

-    List<List<RuleElementMatch>> matchInfo = match.getMatchInfo(element);

-    for (List<RuleElementMatch> l : matchInfo) {

-      RuleElementMatch ruleElementMatch = l.get(0);

-      List<AnnotationFS> textsMatched = ruleElementMatch.getTextsMatched();

-      for (AnnotationFS each : textsMatched) {

-        RutaBasic beginAnchor = stream.getBeginAnchor(each.getBegin());

-        Collection<AnnotationFS> beginAnchors = beginAnchor.getBeginAnchors(t);

-        for (AnnotationFS annotationFS : beginAnchors) {

-          if (annotationFS.getEnd() == each.getEnd()

-                  && !retainType(annotationFS.getType(), retainList, typeSystem)) {

-            toRemove.add(annotationFS);

-          }

-        }

-      }

-    }

-    for (AnnotationFS annotationFS : toRemove) {

-      stream.removeAnnotation(annotationFS);

-    }

-  }

-

-  private boolean retainType(Type type, List<Type> retainList, TypeSystem typeSystem) {

-    for (Type each : retainList) {

-      if (typeSystem.subsumes(each, type)) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  public TypeListExpression getList() {

-    return list;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/VariableAction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/VariableAction.java
deleted file mode 100644
index 27da0d3..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/VariableAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class VariableAction extends AbstractRutaAction {

-

-  private final String var;

-

-  public VariableAction(String var) {

-    super();

-    this.var = var;

-  }

-

-  @Override

-  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {

-    // TODO

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AbstractRutaCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AbstractRutaCondition.java
deleted file mode 100644
index 8bfba48..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AbstractRutaCondition.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public abstract class AbstractRutaCondition extends RutaElement {

-

-  public AbstractRutaCondition() {

-    super();

-  }

-

-  public abstract EvaluatedCondition eval(AnnotationFS annotation, RuleElement element,

-          RutaStream stream, InferenceCrowd crowd);

-

-  @Override

-  public String toString() {

-    return getClass().getSimpleName();

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AfterCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AfterCondition.java
deleted file mode 100644
index 6d4e9b7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AfterCondition.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class AfterCondition extends TypeSentiveCondition {

-

-  public AfterCondition(TypeExpression type) {

-    super(type);

-  }

-

-  public AfterCondition(TypeListExpression list) {

-    super(list);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (!isWorkingOnList()) {

-      Type t = type.getType(element.getParent());

-      boolean result = check(annotation, stream, t);

-      return new EvaluatedCondition(this, result);

-    } else {

-      boolean result = false;

-      List<Type> types = getList().getList(element.getParent(), stream);

-      for (Type t : types) {

-        result |= check(annotation, stream, t);

-        if (result == true) {

-          break;

-        }

-      }

-      return new EvaluatedCondition(this, result);

-    }

-  }

-

-  private boolean check(AnnotationFS annotation, RutaStream stream, Type t) {

-    boolean result = false;

-    FSIterator<AnnotationFS> it = stream.getCas().getAnnotationIndex(t).iterator(annotation);

-    if (!it.isValid()) {

-      it.moveToLast();

-    }

-    while (it.isValid()) {

-      AnnotationFS a = (AnnotationFS) it.get();

-      if (a.getBegin() <= annotation.getBegin()) {

-        result = true;

-        break;

-      }

-      it.moveToPrevious();

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AndCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AndCondition.java
deleted file mode 100644
index 09f2596..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/AndCondition.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class AndCondition extends ComposedRutaCondition {

-

-  public AndCondition(List<AbstractRutaCondition> conditions) {

-    super(conditions);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS currentSymbol, RuleElement element,

-          RutaStream symbolStream, InferenceCrowd crowd) {

-    boolean result = true;

-    List<EvaluatedCondition> evals = new ArrayList<EvaluatedCondition>();

-    for (AbstractRutaCondition each : conditions) {

-      crowd.beginVisit(each, null);

-      EvaluatedCondition eval = each.eval(currentSymbol, element, symbolStream, crowd);

-      crowd.endVisit(each, null);

-      result &= eval.isValue();

-      evals.add(eval);

-    }

-    return new EvaluatedCondition(this, result, evals);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/BeforeCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/BeforeCondition.java
deleted file mode 100644
index 84384c4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/BeforeCondition.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class BeforeCondition extends TypeSentiveCondition {

-

-  public BeforeCondition(TypeExpression type) {

-    super(type);

-  }

-

-  public BeforeCondition(TypeListExpression list) {

-    super(list);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (!isWorkingOnList()) {

-      Type t = type.getType(element.getParent());

-      boolean result = check(annotation, stream, t);

-      return new EvaluatedCondition(this, result);

-    } else {

-      boolean result = false;

-      List<Type> types = getList().getList(element.getParent(), stream);

-      for (Type t : types) {

-        result |= check(annotation, stream, t);

-        if (result == true) {

-          break;

-        }

-      }

-      return new EvaluatedCondition(this, result);

-    }

-  }

-

-  private boolean check(AnnotationFS annotation, RutaStream stream, Type t) {

-    boolean result = false;

-    FSIterator<AnnotationFS> it = stream.getCas().getAnnotationIndex(t).iterator(annotation);

-    while (it.isValid()) {

-      AnnotationFS a = (AnnotationFS) it.get();

-      if (a.getEnd() >= annotation.getBegin()) {

-        result = true;

-        break;

-      }

-      it.moveToNext();

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ComposedRutaCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ComposedRutaCondition.java
deleted file mode 100644
index 922c736..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ComposedRutaCondition.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-

-public abstract class ComposedRutaCondition extends AbstractRutaCondition {

-

-  protected List<AbstractRutaCondition> conditions;

-

-  public ComposedRutaCondition(List<AbstractRutaCondition> conditions) {

-    super();

-    this.conditions = conditions;

-  }

-

-  public ComposedRutaCondition(AbstractRutaCondition condition) {

-    super();

-    this.conditions = new ArrayList<AbstractRutaCondition>();

-    this.conditions.add(condition);

-  }

-

-  public List<AbstractRutaCondition> getConditions() {

-    return conditions;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ConditionFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ConditionFactory.java
deleted file mode 100644
index 209f544..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ConditionFactory.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.antlr.runtime.Token;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ConditionFactory {

-

-  private ConditionFactory() {

-  }

-

-  public static AbstractRutaCondition createConditionAnd(List<AbstractRutaCondition> conds,

-          RutaBlock parent) {

-    return new AndCondition(conds);

-  }

-

-  public static AbstractRutaCondition createConditionOr(List<AbstractRutaCondition> conds,

-          RutaBlock parent) {

-    return new OrCondition(conds);

-  }

-

-  public static AbstractRutaCondition createConditionNot(AbstractRutaCondition cond,

-          RutaBlock parent) {

-    return new NotCondition(cond);

-  }

-

-  public static AbstractRutaCondition createConditionContains(TypeExpression typeExpr,

-          INumberExpression min, INumberExpression max, IBooleanExpression percent, RutaBlock parent) {

-    return new ContainsCondition(typeExpr, min, max, percent);

-  }

-

-  public static AbstractRutaCondition createConditionContextCount(TypeExpression typeExpr,

-          INumberExpression min, INumberExpression max, Token var, RutaBlock parent) {

-    String varString = null;

-    if (var != null) {

-      varString = var.getText();

-    }

-    return new ContextCountCondition(typeExpr, min, max, varString);

-  }

-

-  public static AbstractRutaCondition createConditionCurrentCount(TypeExpression typeExpr,

-          INumberExpression min, INumberExpression max, Token var, RutaBlock parent) {

-    String varString = null;

-    if (var != null) {

-      varString = var.getText();

-    }

-    return new CurrentCountCondition(typeExpr, min, max, varString);

-  }

-

-  public static AbstractRutaCondition createConditionCount(TypeExpression typeExpr,

-          INumberExpression min, INumberExpression max, Token var, RutaBlock parent) {

-    String varString = null;

-    if (var != null) {

-      varString = var.getText();

-    }

-    return new CountCondition(typeExpr, min, max, varString);

-  }

-

-  public static AbstractRutaCondition createConditionTotalCount(TypeExpression typeExpr,

-          INumberExpression min, INumberExpression max, Token var, RutaBlock parent) {

-    String varString = null;

-    if (var != null) {

-      varString = var.getText();

-    }

-    return new TotalCountCondition(typeExpr, min, max, varString);

-  }

-

-  public static AbstractRutaCondition createConditionInList(WordListExpression listExpr,

-          IStringExpression arg, RutaBlock parent) {

-    return new InListCondition(listExpr, arg);

-  }

-

-  public static AbstractRutaCondition createConditionMOfN(List<AbstractRutaCondition> conds,

-          INumberExpression min, INumberExpression max, RutaBlock parent) {

-    return new MOfNCondition(conds, min, max);

-  }

-

-  public static AbstractRutaCondition createConditionNear(TypeExpression typeExpr,

-          INumberExpression min, INumberExpression max, IBooleanExpression direction,

-          IBooleanExpression filtered, RutaBlock parent) {

-    return new NearCondition(typeExpr, min, max, direction, filtered);

-  }

-

-  public static AbstractRutaCondition createConditionPartOf(TypeExpression type,

-          TypeListExpression list, RutaBlock parent) {

-    if (type != null) {

-      return new PartOfCondition(type);

-    } else {

-      return new PartOfCondition(list);

-    }

-  }

-

-  public static AbstractRutaCondition createConditionPosition(TypeExpression typeExpr,

-          INumberExpression pos, IBooleanExpression rel, RutaBlock parent) {

-    return new PositionCondition(typeExpr, pos, rel);

-  }

-

-  public static AbstractRutaCondition createConditionRegExp(IStringExpression patternExpr,

-          IBooleanExpression ignoreCase, RutaBlock parent) {

-    return new RegExpCondition(patternExpr, ignoreCase);

-  }

-

-  public static AbstractRutaCondition createConditionRegExp(IStringExpression v,

-          IStringExpression patternExpr, IBooleanExpression ignoreCase, RutaBlock parent) {

-    return new RegExpCondition(v, patternExpr, ignoreCase);

-  }

-

-  public static AbstractRutaCondition createConditionScore(INumberExpression min,

-          INumberExpression max, Token var, RutaBlock parent) {

-    String varString = null;

-    if (var != null) {

-      varString = var.getText();

-    }

-    return new ScoreCondition(min, max, varString);

-  }

-

-  public static AbstractRutaCondition createConditionVote(TypeExpression type1Expr,

-          TypeExpression type2Expr, RutaBlock parent) {

-    return new VoteCondition(type1Expr, type2Expr);

-  }

-

-  public static AbstractRutaCondition createConditionLast(TypeExpression typeExpr, RutaBlock parent) {

-    return new LastCondition(typeExpr);

-  }

-

-  public static AbstractRutaCondition createConditionIf(IBooleanExpression e, RutaBlock parent) {

-    return new IfCondition(e);

-  }

-

-  public static AbstractRutaCondition createConditionFeature(IStringExpression se, Object v,

-          RutaBlock parent) {

-    if (v instanceof INumberExpression) {

-      return new FeatureCondition(se, (INumberExpression) v);

-    } else if (v instanceof IBooleanExpression) {

-      return new FeatureCondition(se, (IBooleanExpression) v);

-    } else if (v instanceof IStringExpression) {

-      return new FeatureCondition(se, (IStringExpression) v);

-    }

-    return null;

-  }

-

-  public static AbstractRutaCondition createConditionParse(Token id, RutaBlock env) {

-    String var = id == null ? "" : id.getText();

-    return new ParseCondition(var);

-  }

-

-  public static AbstractRutaCondition createConditionVariable(Token id) {

-    return new VariableCondition(id.getText());

-  }

-

-  public static AbstractRutaCondition createConditionIs(TypeExpression type,

-          TypeListExpression list, RutaBlock env) {

-    if (type != null) {

-      return new IsCondition(type);

-    } else {

-      return new IsCondition(list);

-    }

-  }

-

-  public static AbstractRutaCondition createConditionAfter(TypeExpression type,

-          TypeListExpression list, RutaBlock env) {

-    if (type != null) {

-      return new AfterCondition(type);

-    } else {

-      return new AfterCondition(list);

-    }

-  }

-

-  public static AbstractRutaCondition createConditionBefore(TypeExpression type,

-          TypeListExpression list, RutaBlock env) {

-    if (type != null) {

-      return new BeforeCondition(type);

-    } else {

-      return new BeforeCondition(list);

-    }

-  }

-

-  public static AbstractRutaCondition createConditionEndsWith(TypeExpression type,

-          TypeListExpression list, RutaBlock env) {

-    if (type != null) {

-      return new EndsWithCondition(type);

-    } else {

-      return new EndsWithCondition(list);

-    }

-  }

-

-  public static AbstractRutaCondition createConditionStartsWith(TypeExpression type,

-          TypeListExpression list, RutaBlock env) {

-    if (type != null) {

-      return new StartsWithCondition(type);

-    } else {

-      return new StartsWithCondition(list);

-    }

-  }

-

-  public static AbstractRutaCondition createConditionPartOfNeq(TypeExpression type,

-          TypeListExpression list, RutaBlock env) {

-    if (type != null) {

-      return new PartOfNeqCondition(type);

-    } else {

-      return new PartOfNeqCondition(list);

-    }

-  }

-

-  public static AbstractRutaCondition createConditionSize(ListExpression<?> list,

-          INumberExpression min, INumberExpression max, Token var, RutaBlock env) {

-    return new SizeCondition(list, min, max, var == null ? null : var.getText());

-  }

-

-  public static AbstractRutaCondition createConditionInList(StringListExpression list,

-          IStringExpression arg, RutaBlock env) {

-    return new InListCondition(list, arg);

-  }

-

-  public static AbstractRutaCondition createConditionCount(ListExpression<Object> type,

-          IRutaExpression a, INumberExpression min, INumberExpression max, Token var, RutaBlock env) {

-    return new CountCondition(type, a, min, max, var == null ? null : var.getText());

-  }

-

-  public static AbstractRutaCondition createConditionContains(ListExpression list,

-          IRutaExpression a, INumberExpression min, INumberExpression max, IBooleanExpression percent,

-          RutaBlock env) {

-    return new ContainsCondition(list, a, min, max, percent);

-  }

-

-  public static AbstractRutaCondition createImplicitCondition(IRutaExpression expr) {

-    return new ImplicitCondition(expr);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ContainsCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ContainsCondition.java
deleted file mode 100644
index 21d67a1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ContainsCondition.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.list.BooleanListExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.NumberListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ContainsCondition extends TypeSentiveCondition {

-

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  private final IBooleanExpression percent;

-

-  private IRutaExpression arg;

-

-  private ListExpression argList;

-

-  public ContainsCondition(TypeExpression type, INumberExpression min, INumberExpression max,

-          IBooleanExpression percent) {

-    super(type);

-    this.min = min == null ? new SimpleNumberExpression(Integer.valueOf(1)) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.percent = percent == null ? new SimpleBooleanExpression(false) : percent;

-  }

-

-  public ContainsCondition(ListExpression list, IRutaExpression a, INumberExpression min,

-          INumberExpression max, IBooleanExpression percent) {

-    super((TypeExpression) null);

-    this.min = min == null ? new SimpleNumberExpression(Integer.valueOf(1)) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.percent = percent == null ? new SimpleBooleanExpression(false) : percent;

-    this.argList = list;

-    this.arg = a;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    int basicCount = 0;

-    int anchorCount = 0;

-    int totalCount = 0;

-

-    if (type != null) {

-      if (annotation != null) {

-        List<RutaBasic> annotations = stream.getBasicsInWindow(annotation);

-        for (RutaBasic each : annotations) {

-          totalCount++;

-          Type t = type.getType(element.getParent());

-          if (each.beginsWith(t) || stream.getCas().getTypeSystem().subsumes(t, each.getType())) {

-            anchorCount += each.getBeginAnchors(t).size();

-            basicCount++;

-          } else if (each.isPartOf(t)) {

-            basicCount++;

-          }

-        }

-      }

-    } else {

-      totalCount = argList.getList(element.getParent(), stream).size();

-      if (arg instanceof IBooleanExpression && argList instanceof BooleanListExpression) {

-        IBooleanExpression e = (IBooleanExpression) arg;

-        BooleanListExpression le = (BooleanListExpression) argList;

-        boolean v = e.getBooleanValue(element.getParent(), annotation, stream);

-        List<Boolean> l = new ArrayList<Boolean>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          basicCount++;

-        }

-      } else if (arg instanceof INumberExpression && argList instanceof NumberListExpression) {

-        INumberExpression e = (INumberExpression) arg;

-        NumberListExpression le = (NumberListExpression) argList;

-        Number v = e.getDoubleValue(element.getParent(), annotation, stream);

-        List<Number> l = new ArrayList<Number>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          basicCount++;

-        }

-      } else if (arg instanceof IStringExpression && argList instanceof StringListExpression) {

-        IStringExpression e = (IStringExpression) arg;

-        StringListExpression le = (StringListExpression) argList;

-        String v = e.getStringValue(element.getParent(), annotation, stream);

-        List<String> l = new ArrayList<String>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          basicCount++;

-        }

-      } else if (arg instanceof TypeExpression && argList instanceof TypeListExpression) {

-        TypeExpression e = (TypeExpression) arg;

-        TypeListExpression le = (TypeListExpression) argList;

-        Type v = e.getType(element.getParent());

-        List<Type> l = new ArrayList<Type>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          basicCount++;

-        }

-      }

-      anchorCount = basicCount;

-    }

-    if (percent.getBooleanValue(element.getParent(), null, stream)) {

-      double percentValue = 0;

-      if (totalCount != 0) {

-        percentValue = (((double) basicCount) / ((double) totalCount)) * 100;

-      }

-      boolean value = percentValue >= min.getDoubleValue(element.getParent(), annotation, stream)

-              && percentValue <= max.getDoubleValue(element.getParent(), annotation, stream);

-      return new EvaluatedCondition(this, value);

-    } else {

-      boolean value = anchorCount >= min.getIntegerValue(element.getParent(), annotation, stream)

-              && anchorCount <= max.getIntegerValue(element.getParent(), annotation, stream);

-      return new EvaluatedCondition(this, value);

-    }

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public IBooleanExpression getPercent() {

-    return percent;

-  }

-

-  public IRutaExpression getArg() {

-    return arg;

-  }

-

-  public ListExpression getArgList() {

-    return argList;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ContextCountCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ContextCountCondition.java
deleted file mode 100644
index 34fbaf1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ContextCountCondition.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ContextCountCondition extends TypeSentiveCondition {

-

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  private final String var;

-

-  public ContextCountCondition(TypeExpression type, INumberExpression min, INumberExpression max,

-          String var) {

-    super(type);

-    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.var = var;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    Type contextType = type.getType(element.getParent());

-    stream.moveToFirst();

-    List<AnnotationFS> visibleContexts = new ArrayList<AnnotationFS>();

-    while (stream.isValid()) {

-      RutaBasic each = (RutaBasic) stream.get();

-      if (each.beginsWith(contextType)) {

-        visibleContexts.addAll(each.getBeginAnchors(contextType));

-      }

-      stream.moveToNext();

-    }

-    List<AnnotationFS> overlappingContexts = new ArrayList<AnnotationFS>();

-    for (AnnotationFS eachContext : visibleContexts) {

-      if (eachContext.getBegin() <= annotation.getBegin()

-              && eachContext.getEnd() >= annotation.getEnd()) {

-        overlappingContexts.add(eachContext);

-      }

-    }

-

-    boolean result = false;

-    for (AnnotationFS eachContext : overlappingContexts) {

-      int index = 0;

-      int counter = 0;

-      List<RutaBasic> basicsInWindow = stream.getBasicsInWindow(eachContext);

-      for (RutaBasic eachBasic : basicsInWindow) {

-        Collection<AnnotationFS> beginAnchors = eachBasic.getBeginAnchors(annotation.getType());

-        if (beginAnchors != null) {

-          for (AnnotationFS each : beginAnchors) {

-            counter++;

-            if (each.getBegin() == annotation.getBegin()

-                    && each.getEnd() == annotation.getEnd()

-                    && (each.getType().equals(annotation.getType()) || stream.getCas()

-                            .getTypeSystem().subsumes(annotation.getType(), each.getType()))) {

-              index = counter;

-            }

-          }

-        }

-      }

-

-      if (var != null) {

-        element.getParent().getEnvironment().setVariableValue(var, index);

-      }

-      boolean value = index >= min.getIntegerValue(element.getParent(), annotation, stream)

-              && index <= max.getIntegerValue(element.getParent(), annotation, stream);

-      result |= value;

-      if (result) {

-        break;

-      }

-    }

-

-    return new EvaluatedCondition(this, result);

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/CountCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/CountCondition.java
deleted file mode 100644
index 9eb71b7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/CountCondition.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.BooleanListExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.NumberListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class CountCondition extends TypeSentiveCondition {

-

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  private final String var;

-

-  private ListExpression list;

-

-  private IRutaExpression arg;

-

-  public CountCondition(TypeExpression type, INumberExpression min, INumberExpression max, String var) {

-    super(type);

-    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.var = var;

-  }

-

-  public CountCondition(ListExpression list, IRutaExpression a, INumberExpression min,

-          INumberExpression max, String var) {

-    super((TypeExpression) null);

-    this.list = list;

-    this.arg = a;

-    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.var = var;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (arg == null) {

-      List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(annotation,

-              type.getType(element.getParent()));

-      int count = annotationsInWindow.size();

-      if (var != null) {

-        element.getParent().getEnvironment().setVariableValue(var, count);

-      }

-      boolean value = count >= min.getIntegerValue(element.getParent(), annotation, stream)

-              && count <= max.getIntegerValue(element.getParent(), annotation, stream);

-      return new EvaluatedCondition(this, value);

-    } else {

-      int count = 0;

-      if (arg instanceof IBooleanExpression && list instanceof BooleanListExpression) {

-        IBooleanExpression e = (IBooleanExpression) arg;

-        BooleanListExpression le = (BooleanListExpression) list;

-        boolean v = e.getBooleanValue(element.getParent(), annotation, stream);

-        List<Boolean> l = new ArrayList<Boolean>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          count++;

-        }

-      } else if (arg instanceof INumberExpression && list instanceof NumberListExpression) {

-        INumberExpression e = (INumberExpression) arg;

-        NumberListExpression le = (NumberListExpression) list;

-        Number v = e.getDoubleValue(element.getParent(), annotation, stream);

-        List<Number> l = new ArrayList<Number>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          count++;

-        }

-      } else if (arg instanceof IStringExpression && list instanceof StringListExpression) {

-        IStringExpression e = (IStringExpression) arg;

-        StringListExpression le = (StringListExpression) list;

-        String v = e.getStringValue(element.getParent(), annotation, stream);

-        List<String> l = new ArrayList<String>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          count++;

-        }

-      } else if (arg instanceof TypeExpression && list instanceof TypeListExpression) {

-        TypeExpression e = (TypeExpression) arg;

-        TypeListExpression le = (TypeListExpression) list;

-        Type v = e.getType(element.getParent());

-        List<Type> l = new ArrayList<Type>(le.getList(element.getParent(), stream));

-        while (l.remove(v)) {

-          count++;

-        }

-      }

-      if (var != null) {

-        element.getParent().getEnvironment().setVariableValue(var, count);

-      }

-      boolean value = count >= min.getIntegerValue(element.getParent(), annotation, stream)

-              && count <= max.getIntegerValue(element.getParent(), annotation, stream);

-      return new EvaluatedCondition(this, value);

-    }

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-  public ListExpression getArgList() {

-    return list;

-  }

-

-  public IRutaExpression getArg() {

-    return arg;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/CurrentCountCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/CurrentCountCondition.java
deleted file mode 100644
index e314c52..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/CurrentCountCondition.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.Iterator;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class CurrentCountCondition extends TypeSentiveCondition {

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  private final String var;

-

-  public CurrentCountCondition(TypeExpression type, INumberExpression min, INumberExpression max,

-          String var) {

-    super(type);

-    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.var = var;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    int count = 0;

-    Iterator<AnnotationFS> it = stream.getCas()

-            .getAnnotationIndex(type.getType(element.getParent())).iterator();

-    while (it.hasNext()) {

-      AnnotationFS next = it.next();

-      if (next.getBegin() < annotation.getBegin()) {

-        count++;

-      } else {

-        break;

-      }

-    }

-    if (var != null) {

-      element.getParent().getEnvironment().setVariableValue(var, count);

-    }

-    boolean value = count >= min.getIntegerValue(element.getParent(), annotation, stream)

-            && count <= max.getIntegerValue(element.getParent(), annotation, stream);

-    return new EvaluatedCondition(this, value);

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public String getVar() {

-    return var;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/EndsWithCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/EndsWithCondition.java
deleted file mode 100644
index c992bdf..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/EndsWithCondition.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class EndsWithCondition extends TypeSentiveCondition {

-

-  public EndsWithCondition(TypeExpression type) {

-    super(type);

-  }

-

-  public EndsWithCondition(TypeListExpression list) {

-    super(list);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (!isWorkingOnList()) {

-      Type givenType = type.getType(element.getParent());

-      boolean result = check(stream, annotation, givenType);

-      return new EvaluatedCondition(this, result);

-    } else {

-      boolean result = false;

-      List<Type> types = getList().getList(element.getParent(), stream);

-      for (Type t : types) {

-        result |= check(stream, annotation, t);

-        if (result) {

-          break;

-        }

-      }

-      return new EvaluatedCondition(this, result);

-    }

-  }

-

-  private boolean check(RutaStream stream, AnnotationFS matched, Type givenType) {

-    RutaBasic endAnchor = stream.getEndAnchor(matched.getEnd());

-    if(endAnchor != null) {

-      return endAnchor.endsWith(givenType);

-    } else {

-      return false;

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/FeatureCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/FeatureCondition.java
deleted file mode 100644
index 144a770..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/FeatureCondition.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class FeatureCondition extends AbstractRutaCondition {

-

-  private final IStringExpression featureStringExpression;

-

-  private IRutaExpression argExpr;

-

-  public FeatureCondition(IStringExpression feature, IRutaExpression argExpr) {

-    super();

-    this.featureStringExpression = feature;

-    this.argExpr = argExpr;

-  }

-

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    RutaBlock parent = element.getParent();

-    String typeWithFeature = annotation.getType().getName()+"."+featureStringExpression.getStringValue(parent, annotation, stream);

-    MatchReference mf = new MatchReference(typeWithFeature, "==", argExpr);

-    FeatureExpression featureExpression = mf.getFeatureExpression(parent);

-    if(featureExpression instanceof FeatureMatchExpression) {

-      FeatureMatchExpression fme = (FeatureMatchExpression) featureExpression;

-      boolean checkFeatureValue = fme.checkFeatureValue(annotation, stream, parent);

-      return new EvaluatedCondition(this, checkFeatureValue);

-    }

-    return new EvaluatedCondition(this, false);

-  }

-

-  public IStringExpression getFeatureStringExpression() {

-    return featureStringExpression;

-  }

-

-  public IRutaExpression getArgExpr() {

-    return argExpr;

-  }

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/IfCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/IfCondition.java
deleted file mode 100644
index 16978c2..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/IfCondition.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class IfCondition extends AbstractRutaCondition {

-

-  private final IBooleanExpression expression;

-

-  public IfCondition(IBooleanExpression e) {

-    super();

-    this.expression = e;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    return new EvaluatedCondition(this, expression.getBooleanValue(element.getParent(), null,

-            stream));

-  }

-

-  public IBooleanExpression getExpression() {

-    return expression;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ImplicitCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ImplicitCondition.java
deleted file mode 100644
index d443d80..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ImplicitCondition.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.commons.collections.CollectionUtils;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ImplicitCondition extends AbstractRutaCondition {

-

-  private IRutaExpression expr;

-

-  public ImplicitCondition(IRutaExpression expr) {

-    super();

-    this.expr = expr;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (expr instanceof IBooleanExpression) {

-      IBooleanExpression be = (IBooleanExpression) expr;

-      return new EvaluatedCondition(this, be.getBooleanValue(element.getParent(), null, stream));

-    } else if (expr instanceof FeatureMatchExpression) {

-      FeatureMatchExpression fme = (FeatureMatchExpression) expr;

-      TypeExpression typeExpr = fme.getTypeExpr(element.getParent());

-      Type type = typeExpr.getType(element.getParent());

-      List<AnnotationFS> annotations = getAnnotationsToCheck(annotation, type, fme, stream);

-      Collection<AnnotationFS> featureAnnotations = fme.getFeatureAnnotations(annotations, stream,

-              element.getParent(), true);

-      return new EvaluatedCondition(this, !featureAnnotations.isEmpty());

-    }

-    return new EvaluatedCondition(this, false);

-  }

-

-  private List<AnnotationFS> getAnnotationsToCheck(AnnotationFS annotation, Type type,

-          FeatureMatchExpression fme, RutaStream stream) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    TypeSystem typeSystem = stream.getCas().getTypeSystem();

-    if (typeSystem.subsumes(type, annotation.getType())) {

-      result.add(annotation);

-    } else {

-      Collection<AnnotationFS> beginAnchors = stream.getBeginAnchor(annotation.getBegin())

-              .getBeginAnchors(type);

-      Collection<AnnotationFS> endAnchors = stream.getEndAnchor(annotation.getEnd()).getEndAnchors(type);

-      @SuppressWarnings("unchecked")

-      Collection<AnnotationFS> intersection = CollectionUtils

-              .intersection(beginAnchors, endAnchors);

-      result.addAll(intersection);

-    }

-    return result;

-  }

-

-  public IRutaExpression getExpr() {

-    return expr;

-  }

-

-  public void setExpr(IRutaExpression expr) {

-    this.expr = expr;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/InListCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/InListCondition.java
deleted file mode 100644
index bb95333..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/InListCondition.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.resource.RutaWordList;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class InListCondition extends TerminalRutaCondition {

-

-  private WordListExpression listExpr;

-

-  private StringListExpression stringList;

-

-  private IStringExpression arg;

-

-  public InListCondition(WordListExpression listExpr, IStringExpression arg) {

-    super();

-    this.listExpr = listExpr;

-    this.arg = arg;

-  }

-

-  public InListCondition(StringListExpression list, IStringExpression arg) {

-    super();

-    this.stringList = list;

-    this.arg = arg;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    String text = annotation.getCoveredText();

-    if(arg != null) {

-      text = arg.getStringValue(element.getParent(), annotation, stream);

-    }

-    if(text == null) {

-      return new EvaluatedCondition(this, false);

-    }

-    if (stringList == null) {

-      RutaWordList wordList = listExpr.getList(element.getParent());

-      return new EvaluatedCondition(this, wordList.contains(text, false, 0, null, 0, true));

-    }

-    List<String> sList = stringList.getList(element.getParent(), stream);

-    boolean contains = sList.contains(text);

-    return new EvaluatedCondition(this, contains);

-  }

-

-  public WordListExpression getListExpression() {

-    return listExpr;

-  }

-

-  public StringListExpression getStringList() {

-    return stringList;

-  }

-

-  public IStringExpression getArg() {

-    return arg;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/IsCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/IsCondition.java
deleted file mode 100644
index e5c94ae..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/IsCondition.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class IsCondition extends TypeSentiveCondition {

-

-  public IsCondition(TypeExpression type) {

-    super(type);

-  }

-

-  public IsCondition(TypeListExpression list) {

-    super(list);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    RutaBasic beginAnchor = stream.getBeginAnchor(annotation.getBegin());

-    if (!isWorkingOnList()) {

-      Collection<AnnotationFS> beginAnchors = beginAnchor

-              .getBeginAnchors(type.getType(element.getParent()));

-      boolean result = false;

-      if (beginAnchors != null) {

-        for (AnnotationFS annotationFS : beginAnchors) {

-          result |= check(annotation, annotationFS);

-          if (result == true) {

-            break;

-          }

-        }

-      }

-      return new EvaluatedCondition(this, result);

-    } else {

-      boolean result = false;

-      List<Type> types = getList().getList(element.getParent(), stream);

-      for (Type type : types) {

-        Collection<AnnotationFS> beginAnchors = beginAnchor.getBeginAnchors(type);

-        if (beginAnchors != null) {

-          for (AnnotationFS annotationFS : beginAnchors) {

-            result |= check(annotation, annotationFS);

-            if (result == true) {

-              break;

-            }

-          }

-        }

-      }

-      return new EvaluatedCondition(this, result);

-    }

-  }

-

-  private boolean check(AnnotationFS a1, AnnotationFS a2) {

-    boolean result = false;

-    if (a1 != null && a2 != null && a1.getBegin() == a2.getBegin() && a1.getEnd() == a2.getEnd()) {

-      result = true;

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/LastCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/LastCondition.java
deleted file mode 100644
index fb4cd21..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/LastCondition.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class LastCondition extends TypeSentiveCondition {

-

-  public LastCondition(TypeExpression type) {

-    super(type);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    RutaBasic endAnchor = stream.getEndAnchor(annotation.getEnd());

-    Type t = type.getType(element.getParent());

-    boolean result = endAnchor.beginsWith(t) && endAnchor.endsWith(t);

-    return new EvaluatedCondition(this, result);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/MOfNCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/MOfNCondition.java
deleted file mode 100644
index 2f44540..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/MOfNCondition.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MOfNCondition extends ComposedRutaCondition {

-

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  public MOfNCondition(List<AbstractRutaCondition> conditions, INumberExpression min,

-          INumberExpression max) {

-    super(conditions);

-    this.min = min;

-    this.max = max;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    int result = 0;

-    List<EvaluatedCondition> evals = new ArrayList<EvaluatedCondition>();

-    for (AbstractRutaCondition each : conditions) {

-      crowd.beginVisit(each, null);

-      EvaluatedCondition eval = each.eval(annotation, element, stream, crowd);

-      crowd.endVisit(each, null);

-      evals.add(eval);

-      if (eval.isValue()) {

-        result++;

-      }

-    }

-    boolean value = result >= min.getIntegerValue(element.getParent(), annotation, stream)

-            && result <= max.getIntegerValue(element.getParent(), annotation, stream);

-    return new EvaluatedCondition(this, value, evals);

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
deleted file mode 100644
index 596cf17..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class NearCondition extends TypeSentiveCondition {

-

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  private final IBooleanExpression forward;

-

-  private final IBooleanExpression filtered;

-

-  public NearCondition(TypeExpression type, INumberExpression min, INumberExpression max,

-          IBooleanExpression forward, IBooleanExpression filtered) {

-    super(type);

-    this.min = min == null ? new SimpleNumberExpression(1) : min;

-    this.max = max == null ? new SimpleNumberExpression(1) : max;

-    this.forward = forward == null ? new SimpleBooleanExpression(true) : forward;

-    this.filtered = filtered == null ? new SimpleBooleanExpression(false) : filtered;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    int maxValue = max.getIntegerValue(element.getParent(), annotation, stream);

-    int minValue = min.getIntegerValue(element.getParent(), annotation, stream);

-    boolean forwardValue = forward.getBooleanValue(element.getParent(), annotation, stream);

-

-    FSIterator<AnnotationFS> it = filtered.getBooleanValue(element.getParent(), annotation, stream) ? stream

-            : stream.getUnfilteredBasicIterator();

-    AnnotationFS pointer = null;

-    if (forwardValue) {

-      pointer = stream.getEndAnchor(annotation.getEnd());

-    } else {

-      pointer = stream.getBeginAnchor(annotation.getBegin());

-    }

-    it.moveTo(pointer);

-    int count = 0;

-    while (count <= maxValue) {

-      if (count >= minValue && it.isValid()) {

-        FeatureStructure featureStructure = it.get();

-        if (featureStructure instanceof RutaBasic) {

-          RutaBasic each = (RutaBasic) featureStructure;

-          if (each.isPartOf(type.getType(element.getParent()))) {

-            return new EvaluatedCondition(this, true);

-          }

-        }

-      }

-      if (forwardValue) {

-        it.moveToNext();

-      } else {

-        it.moveToPrevious();

-      }

-      count++;

-    }

-    return new EvaluatedCondition(this, false);

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public IBooleanExpression getForward() {

-    return forward;

-  }

-

-  public IBooleanExpression getFiltered() {

-    return filtered;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/NotCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/NotCondition.java
deleted file mode 100644
index 8a26de8..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/NotCondition.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class NotCondition extends ComposedRutaCondition {

-

-  public NotCondition(AbstractRutaCondition condition) {

-    super(condition);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    AbstractRutaCondition cond = conditions.get(0);

-    crowd.beginVisit(cond, null);

-    EvaluatedCondition eval = cond.eval(annotation, element, stream, crowd);

-    crowd.endVisit(cond, null);

-    return new EvaluatedCondition(this, !eval.isValue(), eval);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/OrCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/OrCondition.java
deleted file mode 100644
index 2ae06e0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/OrCondition.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class OrCondition extends ComposedRutaCondition {

-  public OrCondition(List<AbstractRutaCondition> conditions) {

-    super(conditions);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS currentSymbol, RuleElement element,

-          RutaStream symbolStream, InferenceCrowd crowd) {

-    boolean result = false;

-    List<EvaluatedCondition> evals = new ArrayList<EvaluatedCondition>();

-    for (AbstractRutaCondition each : conditions) {

-      crowd.beginVisit(each, null);

-      EvaluatedCondition eval = each.eval(currentSymbol, element, symbolStream, crowd);

-      crowd.endVisit(each, null);

-      result |= eval.isValue();

-      evals.add(eval);

-    }

-    return new EvaluatedCondition(this, result, evals);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ParseCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ParseCondition.java
deleted file mode 100644
index 8ce368c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ParseCondition.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ParseCondition extends AbstractRutaCondition {

-

-  private final String var;

-

-  public ParseCondition(String var) {

-    super();

-    this.var = var;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    String text = annotation.getCoveredText();

-    RutaEnvironment env = element.getParent().getEnvironment();

-    Class<?> type = env.getVariableType(var);

-    try {

-      if (Integer.class.equals(type)) {

-        text = normalizeNumber(text);

-        int value = Integer.valueOf(text);

-        env.setVariableValue(var, value);

-        return new EvaluatedCondition(this, true);

-      } else if (Double.class.equals(type)) {

-        text = normalizeNumber(text);

-        double value = Double.valueOf(text);

-        env.setVariableValue(var, value);

-        return new EvaluatedCondition(this, true);

-      } else if (String.class.equals(type)) {

-        env.setVariableValue(var, text);

-        return new EvaluatedCondition(this, true);

-      } else if (Boolean.class.equals(type)) {

-        env.setVariableValue(var, Boolean.valueOf(text));

-        return new EvaluatedCondition(this, true);

-      } else if (Type.class.equals(type)) {

-        Type value = stream.getCas().getTypeSystem().getType(text);

-        env.setVariableValue(var, value);

-        return new EvaluatedCondition(this, true);

-      } else {

-        return new EvaluatedCondition(this, false);

-      }

-    } catch (Exception e) {

-      return new EvaluatedCondition(this, false);

-    }

-  }

-

-  private String normalizeNumber(String text) {

-    String[] split = text.split("[,]");

-    if (split.length == 2) {

-      return text.replaceAll(",", ".");

-    }

-    return text;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PartOfCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PartOfCondition.java
deleted file mode 100644
index e1388bd..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PartOfCondition.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class PartOfCondition extends TypeSentiveCondition {

-

-  public PartOfCondition(TypeExpression type) {

-    super(type);

-  }

-

-  public PartOfCondition(TypeListExpression list) {

-    super(list);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (!isWorkingOnList()) {

-      Type t = type.getType(element.getParent());

-      boolean result = check(t, annotation, element, stream);

-      return new EvaluatedCondition(this, result);

-    } else {

-      boolean result = false;

-      List<Type> types = getList().getList(element.getParent(), stream);

-      for (Type t : types) {

-        result |= check(t, annotation, element, stream);

-        if (result == true) {

-          break;

-        }

-      }

-      return new EvaluatedCondition(this, result);

-    }

-  }

-

-  private boolean check(Type t, AnnotationFS annotation, RuleElement element, RutaStream stream) {

-    RutaBasic beginAnchor = stream.getBeginAnchor(annotation.getBegin());

-    Collection<AnnotationFS> beginAnchors = beginAnchor.getBeginAnchors(t);

-    return beginAnchor.isPartOf(t) || (beginAnchors != null && !beginAnchors.isEmpty());

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PartOfNeqCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PartOfNeqCondition.java
deleted file mode 100644
index 4e35ae1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PartOfNeqCondition.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class PartOfNeqCondition extends TypeSentiveCondition {

-

-  public PartOfNeqCondition(TypeExpression type) {

-    super(type);

-  }

-

-  public PartOfNeqCondition(TypeListExpression list) {

-    super(list);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (!isWorkingOnList()) {

-      Type t = type.getType(element.getParent());

-      boolean result = check(annotation, stream, t);

-      return new EvaluatedCondition(this, result);

-    } else {

-      boolean result = false;

-      List<Type> types = getList().getList(element.getParent(), stream);

-      for (Type t : types) {

-        result |= check(annotation, stream, t);

-        if (result == true) {

-          break;

-        }

-      }

-      return new EvaluatedCondition(this, result);

-    }

-  }

-

-  private boolean check(AnnotationFS annotation, RutaStream stream, Type t) {

-    RutaBasic beginAnchor = stream.getBeginAnchor(annotation.getBegin());

-    RutaBasic endAnchor = stream.getEndAnchor(annotation.getEnd());

-    boolean partOf = beginAnchor.isPartOf(t) || endAnchor.isPartOf(t);

-    if (!partOf) {

-      return false;

-    }

-

-    try {

-      stream.moveTo(annotation);

-    } catch (Exception e) {

-    }

-    while (stream.isValid()) {

-      RutaBasic each = (RutaBasic) stream.get();

-      Collection<AnnotationFS> set = each.getBeginAnchors(t);

-      // TODO: maybe faster to move in the other direction?

-      if (set == null) {

-        stream.moveToPrevious();

-        continue;

-      }

-      for (AnnotationFS afs : set) {

-        if (afs != null

-                && (afs.getType().equals(t) || stream.getCas().getTypeSystem()

-                        .subsumes(t, afs.getType()))

-                && ((afs.getBegin() < annotation.getBegin() && afs.getEnd() > annotation.getEnd())

-                        || (afs.getBegin() == annotation.getBegin() && afs.getEnd() > annotation

-                                .getEnd()) || (afs.getBegin() < annotation.getBegin() && afs

-                        .getEnd() == annotation.getEnd()))) {

-          return true;

-        }

-

-      }

-      stream.moveToPrevious();

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PositionCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PositionCondition.java
deleted file mode 100644
index ec021cc..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/PositionCondition.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class PositionCondition extends TypeSentiveCondition {

-

-  private final INumberExpression position;

-

-  private final IBooleanExpression relative;

-

-  public PositionCondition(TypeExpression type, INumberExpression position,

-          IBooleanExpression relative) {

-    super(type);

-    this.position = position;

-    this.relative = relative;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    Type t = type.getType(element.getParent());

-

-    RutaBasic beginAnchor = stream.getBeginAnchor(annotation.getBegin());

-    RutaBasic endAnchor = stream.getEndAnchor(annotation.getEnd());

-    if (beginAnchor == null || endAnchor == null || !beginAnchor.isPartOf(t)

-            || !endAnchor.isPartOf(t)) {

-      return new EvaluatedCondition(this, false);

-    }

-

-    boolean relatively = relative == null ? true : relative.getBooleanValue(element.getParent(),

-            annotation, stream);

-

-    FSIterator<AnnotationFS> iterator = stream.getCas().getAnnotationIndex(t).iterator(beginAnchor);

-    if (!iterator.isValid()) {

-      iterator.moveToNext();

-    }

-    if (!iterator.isValid()) {

-      iterator.moveToLast();

-    }

-    AnnotationFS window = null;

-    while (iterator.isValid()) {

-      AnnotationFS annotationFS = iterator.get();

-      if (annotationFS.getBegin() <= annotation.getBegin()

-              && annotationFS.getEnd() >= annotation.getEnd()) {

-        window = annotationFS;

-        break;

-      }

-      iterator.moveToPrevious();

-    }

-

-    List<Type> targetTypes = new ArrayList<Type>();

-    if (element instanceof RutaRuleElement) {

-      RutaRuleElement re = (RutaRuleElement) element;

-      targetTypes.addAll(re.getMatcher().getTypes(element.getParent(), stream));

-    } else {

-      targetTypes.add(annotation.getType());

-    }

-

-    if (window == null) {

-      return new EvaluatedCondition(this, false);

-    }

-    int integerValue = position.getIntegerValue(element.getParent(), annotation, stream);

-    if (relatively) {

-      int counter = 0;

-      List<RutaBasic> inWindow = stream.getBasicsInWindow(window);

-      for (RutaBasic each : inWindow) {

-        if (beginsWith(each, targetTypes)) {

-          counter++;

-          if (counter == integerValue) {

-            if (each.getBegin() == beginAnchor.getBegin()) {

-              return new EvaluatedCondition(this, true);

-            } else {

-              return new EvaluatedCondition(this, false);

-            }

-          } else if (counter > integerValue) {

-            return new EvaluatedCondition(this, false);

-          }

-        }

-      }

-      return new EvaluatedCondition(this, false);

-    } else {

-      int counter = 0;

-      List<RutaBasic> inWindow = stream.getBasicsInWindow(window);

-      for (RutaBasic each : inWindow) {

-        counter++;

-        boolean beginsWith = beginsWith(each, targetTypes);

-        if (each.getBegin() == beginAnchor.getBegin() && beginsWith && counter == integerValue) {

-          return new EvaluatedCondition(this, true);

-        } else if (counter > integerValue) {

-          return new EvaluatedCondition(this, false);

-        }

-      }

-      return new EvaluatedCondition(this, false);

-    }

-  }

-

-  private boolean beginsWith(RutaBasic each, List<Type> targetTypes) {

-    for (Type type : targetTypes) {

-      if (each.beginsWith(type)) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  public INumberExpression getPosition() {

-    return position;

-  }

-

-  public IBooleanExpression getRelative() {

-    return relative;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/RegExpCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/RegExpCondition.java
deleted file mode 100644
index 51f9525..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/RegExpCondition.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RegExpCondition extends TerminalRutaCondition {

-  private final IStringExpression pattern;

-

-  private final IBooleanExpression ignoreCase;

-

-  private IStringExpression variable;

-

-  public RegExpCondition(IStringExpression pattern, IBooleanExpression ignoreCase) {

-    super();

-    this.pattern = pattern;

-    this.ignoreCase = ignoreCase == null ? new SimpleBooleanExpression(false) : ignoreCase;

-  }

-

-  public RegExpCondition(IStringExpression v, IStringExpression pattern, IBooleanExpression ignoreCase) {

-    this(pattern, ignoreCase);

-    this.variable = v;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    Matcher matcher = null;

-    boolean ignore = ignoreCase == null ? false : ignoreCase.getBooleanValue(element.getParent(),

-            annotation, stream);

-    String stringValue = pattern.getStringValue(element.getParent(), annotation, stream);

-    if (variable == null) {

-      String coveredText = annotation.getCoveredText();

-      Pattern regularExpPattern = null;

-      if (ignore) {

-        regularExpPattern = Pattern.compile(stringValue, Pattern.MULTILINE + Pattern.DOTALL + Pattern.CASE_INSENSITIVE + Pattern.UNICODE_CASE);

-      } else {

-        regularExpPattern = Pattern.compile(stringValue, Pattern.MULTILINE + Pattern.DOTALL);

-      }

-      matcher = regularExpPattern.matcher(coveredText);

-    } else {

-      String variableValue = variable.getStringValue(element.getParent(), annotation, stream);

-      Pattern regularExpPattern = null;

-      if (ignore) {

-        regularExpPattern = Pattern.compile(stringValue, Pattern.MULTILINE + Pattern.DOTALL + Pattern.CASE_INSENSITIVE + Pattern.UNICODE_CASE);

-      } else {

-        regularExpPattern = Pattern.compile(stringValue, Pattern.MULTILINE + Pattern.DOTALL);

-      }

-      matcher = regularExpPattern.matcher(variableValue);

-    }

-    boolean matches = matcher.matches();

-    return new EvaluatedCondition(this, matches);

-  }

-

-  public IStringExpression getPattern() {

-    return pattern;

-  }

-

-  public IStringExpression getVariable() {

-    return variable;

-  }

-

-  public IBooleanExpression getIgnoreCase() {

-    return ignoreCase;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ScoreCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ScoreCondition.java
deleted file mode 100644
index 74d94bd..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/ScoreCondition.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaAnnotation;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ScoreCondition extends TerminalRutaCondition {

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  private final String var;

-

-  public ScoreCondition(INumberExpression min, INumberExpression max, String var) {

-    super();

-    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.var = var;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    Type heuristicType = stream.getJCas().getCasType(RutaAnnotation.type);

-    List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(annotation,

-            heuristicType);

-    double score = 0;

-    if (!annotationsInWindow.isEmpty()) {

-      RutaAnnotation heuristicAnnotation = (RutaAnnotation) stream.getCas().createAnnotation(

-              heuristicType, annotation.getBegin(), annotation.getEnd());

-      heuristicAnnotation.setAnnotation((Annotation) annotation);

-      RutaAnnotation tma = stream.getCorrectTMA(annotationsInWindow, heuristicAnnotation);

-      score = tma.getScore();

-    }

-    if (var != null) {

-      element.getParent().getEnvironment().setVariableValue(var, score);

-    }

-    boolean value = score >= min.getDoubleValue(element.getParent(), null, stream)

-            && score <= max.getDoubleValue(element.getParent(), null, stream);

-    return new EvaluatedCondition(this, value);

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/SizeCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/SizeCondition.java
deleted file mode 100644
index 8eb6b3f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/SizeCondition.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class SizeCondition extends AbstractRutaCondition {

-

-  private ListExpression<?> listExpr;

-

-  private INumberExpression minExpr;

-

-  private INumberExpression maxExpr;

-

-  private String varExpr;

-

-  public SizeCondition(ListExpression<?> list, INumberExpression min, INumberExpression max,

-          String string) {

-    super();

-    this.listExpr = list;

-    this.minExpr = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;

-    this.maxExpr = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.varExpr = string;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    int count = listExpr.getList(element.getParent(), stream).size();

-    boolean value = count >= minExpr.getIntegerValue(element.getParent(), annotation, stream)

-            && count <= maxExpr.getIntegerValue(element.getParent(), annotation, stream);

-    if (varExpr != null) {

-      element.getParent().getEnvironment().setVariableValue(varExpr, count);

-    }

-    return new EvaluatedCondition(this, value);

-  }

-

-  public ListExpression<?> getListExpr() {

-    return listExpr;

-  }

-

-  public INumberExpression getMinExpr() {

-    return minExpr;

-  }

-

-  public INumberExpression getMaxExpr() {

-    return maxExpr;

-  }

-

-  public String getVarExpr() {

-    return varExpr;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/StartsWithCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/StartsWithCondition.java
deleted file mode 100644
index 919f040..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/StartsWithCondition.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class StartsWithCondition extends TypeSentiveCondition {

-

-  public StartsWithCondition(TypeExpression type) {

-    super(type);

-  }

-

-  public StartsWithCondition(TypeListExpression list) {

-    super(list);

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-

-    // TODO rewrite

-    if (!isWorkingOnList()) {

-      Type t = type.getType(element.getParent());

-      boolean result = check(annotation, t, stream);

-      return new EvaluatedCondition(this, result);

-    } else {

-      boolean result = false;

-      List<Type> types = getList().getList(element.getParent(), stream);

-      for (Type t : types) {

-        result |= check(annotation, t, stream);

-        if (result == true) {

-          return new EvaluatedCondition(this, result);

-        }

-      }

-    }

-    boolean result = false;

-    return new EvaluatedCondition(this, result);

-  }

-

-  private boolean check(AnnotationFS annotation, Type t, RutaStream stream) {

-    if (annotation == null) {

-      return false;

-    }

-    RutaBasic beginAnchor = stream.getBeginAnchor(annotation.getBegin());

-    if(beginAnchor != null) {

-      return beginAnchor.beginsWith(t);

-    } else {

-      return false;

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TerminalRutaCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TerminalRutaCondition.java
deleted file mode 100644
index e7a37ed..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TerminalRutaCondition.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.condition;

-

-public abstract class TerminalRutaCondition extends AbstractRutaCondition {

-

-  public TerminalRutaCondition() {

-    super();

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TotalCountCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TotalCountCondition.java
deleted file mode 100644
index 54e7ca9..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TotalCountCondition.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.Iterator;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class TotalCountCondition extends TypeSentiveCondition {

-  private final INumberExpression min;

-

-  private final INumberExpression max;

-

-  private final String var;

-

-  public TotalCountCondition(TypeExpression type, INumberExpression min, INumberExpression max,

-          String var) {

-    super(type);

-    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;

-    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;

-    this.var = var;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    int count = 0;

-    Iterator<?> it = stream.getJCas().getAnnotationIndex(type.getType(element.getParent()))

-            .iterator();

-    while (it.hasNext()) {

-      it.next();

-      count++;

-    }

-    if (var != null) {

-      element.getParent().getEnvironment().setVariableValue(var, count);

-    }

-    boolean value = count >= min.getIntegerValue(element.getParent(), annotation, stream)

-            && count <= max.getIntegerValue(element.getParent(), annotation, stream);

-    return new EvaluatedCondition(this, value);

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TypeSentiveCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TypeSentiveCondition.java
deleted file mode 100644
index 0c6dc43..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/TypeSentiveCondition.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public abstract class TypeSentiveCondition extends TerminalRutaCondition {

-

-  protected final TypeExpression type;

-

-  private final TypeListExpression list;

-

-  public TypeExpression getType() {

-    return type;

-  }

-

-  public TypeSentiveCondition(TypeExpression type) {

-    super();

-    this.type = type;

-    this.list = null;

-  }

-

-  public TypeSentiveCondition(TypeListExpression list) {

-    super();

-    this.type = null;

-    this.list = list;

-  }

-

-  public boolean isWorkingOnList() {

-    return getList() != null;

-  }

-

-  public TypeListExpression getList() {

-    return list;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/VariableCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/VariableCondition.java
deleted file mode 100644
index d7c8233..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/VariableCondition.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class VariableCondition extends AbstractRutaCondition {

-

-  private final String var;

-

-  public VariableCondition(String var) {

-    super();

-    this.var = var;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    return null;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/VoteCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/VoteCondition.java
deleted file mode 100644
index 8b0d4ac..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/condition/VoteCondition.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class VoteCondition extends TerminalRutaCondition {

-

-  private final TypeExpression type1;

-

-  private final TypeExpression type2;

-

-  public VoteCondition(TypeExpression type1, TypeExpression type2) {

-    super();

-    this.type1 = type1;

-    this.type2 = type2;

-  }

-

-  @Override

-  public EvaluatedCondition eval(AnnotationFS annotation, RuleElement element, RutaStream stream,

-          InferenceCrowd crowd) {

-    int count1 = 0;

-    int count2 = 0;

-    int totalCount = 0;

-    if (annotation != null) {

-      List<RutaBasic> annotations = stream.getBasicsInWindow(annotation);

-      Type t1 = type1.getType(element.getParent());

-      Type t2 = type2.getType(element.getParent());

-      for (RutaBasic each : annotations) {

-        totalCount++;

-        if (each.beginsWith(t1)) {

-          count1++;

-        }

-        if (each.beginsWith(t2)) {

-          count2++;

-        }

-      }

-    }

-    return new EvaluatedCondition(this, count1 > count2);

-  }

-

-  public TypeExpression getType1() {

-    return type1;

-  }

-

-  public TypeExpression getType2() {

-    return type2;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/BasicTypeConstraint.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/BasicTypeConstraint.java
deleted file mode 100644
index 12862db..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/BasicTypeConstraint.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.constraint;

-

-import java.util.ArrayList;

-import java.util.Collection;

-

-import org.apache.commons.lang.NotImplementedException;

-import org.apache.uima.cas.FSTypeConstraint;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.type.RutaBasic;

-

-public class BasicTypeConstraint implements FSTypeConstraint {

-  private static final long serialVersionUID = 1115953538613617791L;

-

-

-  private final Collection<Type> types;

-

-  public BasicTypeConstraint(Collection<Type> types) {

-    super();

-    this.types = types;

-  }

-

-  public BasicTypeConstraint(Type type) {

-    super();

-    if (type != null) {

-      this.types = new ArrayList<Type>();

-      this.types.add(type);

-    } else {

-      this.types = null;

-    }

-  }

-

-  public void add(Type type) {

-    types.add(type);

-  }

-

-  public void add(String typeString) {

-    throw new NotImplementedException();

-  }

-  

-

-  public boolean match(FeatureStructure fs) {

-    boolean result = false;

-    if (fs instanceof RutaBasic) {

-      RutaBasic tmb = (RutaBasic) fs;

-      if(tmb.isEmpty()) {

-        return true;

-      }

-      if (types != null) {

-        for (Type each : types) {

-          result |= tmb.isPartOf(each);

-          if (result) {

-            return true;

-          }

-        }

-      }

-    } 

-    return result;

-  }

-

-  @Override

-  public String toString() {

-    return "(BASIC " +  " with " + types + ")";

-  }

-

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/NotConstraint.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/NotConstraint.java
deleted file mode 100644
index d9443d5..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/NotConstraint.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.constraint;

-

-import org.apache.uima.cas.FSMatchConstraint;

-import org.apache.uima.cas.FeatureStructure;

-

-public class NotConstraint implements FSMatchConstraint {

-  private static final long serialVersionUID = 1115953538613617791L;

-

-  private final FSMatchConstraint constraint;

-

-  public NotConstraint(FSMatchConstraint constraint) {

-    super();

-    this.constraint = constraint;

-  }

-

-  public boolean match(FeatureStructure fs) {

-    return !constraint.match(fs);

-  }

-

-  @Override

-  public String toString() {

-    return "NOT " + constraint.toString();

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/NotMatchConstraint.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/NotMatchConstraint.java
deleted file mode 100644
index d651a6f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/constraint/NotMatchConstraint.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.constraint;

-

-import org.apache.uima.cas.FSMatchConstraint;

-import org.apache.uima.cas.FeatureStructure;

-

-public class NotMatchConstraint implements FSMatchConstraint {

-  private static final long serialVersionUID = 1115953538613617791L;

-

-  private final FSMatchConstraint constraint;

-

-  public NotMatchConstraint(FSMatchConstraint constraint) {

-    super();

-    this.constraint = constraint;

-  }

-

-  public boolean match(FeatureStructure fs) {

-    return !constraint.match(fs);

-  }

-

-  @Override

-  public String toString() {

-    return "NOT " + constraint.toString();

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaBuildOptions.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaBuildOptions.java
deleted file mode 100644
index e5a3c7e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaBuildOptions.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*

- * 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.ruta.descriptor;

-

-import java.util.Collections;

-import java.util.List;

-

-public class RutaBuildOptions {

-

-  private List<String> languageExtensions = Collections.emptyList();

-

-  private List<String> engineLoaders = Collections.emptyList();

-

-  private boolean importByName = false;

-

-  private boolean resolveImports = false;

-

-  private boolean errorOnDuplicateShortNames;

-

-  private String encoding;

-

-  private String typeSystemSuffix = "TypeSystem";

-

-  private String analysisEngineSuffix = "Engine";

-

-  private ClassLoader classLoader;

-

-  public RutaBuildOptions() {

-    super();

-  }

-

-  public void setImportByName(boolean importByName) {

-    this.importByName = importByName;

-  }

-

-  public boolean isImportByName() {

-    return importByName;

-  }

-

-  public void setResolveImports(boolean resolveImports) {

-    this.resolveImports = resolveImports;

-  }

-

-  public boolean isResolveImports() {

-    return resolveImports;

-  }

-

-  public void setErrorOnDuplicateShortNames(boolean error) {

-    this.errorOnDuplicateShortNames = error;

-  }

-

-  public boolean isErrorOnDuplicateShortNames() {

-    return errorOnDuplicateShortNames;

-  }

-

-  public String getEncoding() {

-    return encoding;

-  }

-

-  public void setEncoding(String encoding) {

-    this.encoding = encoding;

-  }

-

-  public String getTypeSystemSuffix() {

-    return typeSystemSuffix;

-  }

-

-  public void setTypeSystemSuffix(String typeSystemSuffix) {

-    this.typeSystemSuffix = typeSystemSuffix;

-  }

-

-  public String getAnalysisEngineSuffix() {

-    return analysisEngineSuffix;

-  }

-

-  public void setAnalysisEngineSuffix(String analysisEngineSuffix) {

-    this.analysisEngineSuffix = analysisEngineSuffix;

-  }

-

-  public List<String> getLanguageExtensions() {

-    return languageExtensions;

-  }

-

-  public void setLanguageExtensions(List<String> languageExtensions) {

-    this.languageExtensions = languageExtensions;

-  }

-

-  public List<String> getEngineLoaders() {

-    return engineLoaders;

-  }

-

-  public void setEngineLoaders(List<String> engineLoaders) {

-    this.engineLoaders = engineLoaders;

-  }

-

-  public void setClassLoader(ClassLoader classLoader) {

-    this.classLoader = classLoader;

-

-  }

-

-  public ClassLoader getClassLoader() {

-    return classLoader;

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorBuilder.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorBuilder.java
deleted file mode 100644
index 4a1859a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorBuilder.java
+++ /dev/null
@@ -1,576 +0,0 @@
-/*

- * 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.ruta.descriptor;

-

-import java.io.File;

-import java.io.FileNotFoundException;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.OutputStream;

-import java.net.URI;

-import java.net.URISyntaxException;

-import java.net.URL;

-import java.nio.file.Path;

-import java.nio.file.Paths;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.ResourceSpecifierFactory;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.impl.ResourceManager_impl;

-import org.apache.uima.resource.metadata.Capability;

-import org.apache.uima.resource.metadata.ConfigurationParameterSettings;

-import org.apache.uima.resource.metadata.FsIndexDescription;

-import org.apache.uima.resource.metadata.Import;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.resource.metadata.impl.Import_impl;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.apache.uima.util.XMLSerializer;

-import org.apache.uima.util.XMLizable;

-import org.springframework.core.io.Resource;

-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

-import org.xml.sax.ContentHandler;

-import org.xml.sax.SAXException;

-

-public class RutaDescriptorBuilder {

-

-  private static ResourceSpecifierFactory uimaFactory = UIMAFramework.getResourceSpecifierFactory();

-

-  private final URL defaultTypeSystem;

-

-  private final URL defaultAnalysisEngine;

-

-  public RutaDescriptorBuilder(URL defaultTypeSystem, URL defaultAnalysisEngine)

-          throws InvalidXMLException, IOException {

-    super();

-    this.defaultTypeSystem = defaultTypeSystem;

-    this.defaultAnalysisEngine = defaultAnalysisEngine;

-  }

-

-  public TypeSystemDescription createTypeSystemDescription(RutaDescriptorInformation desc,

-          String typeSystemOutput, RutaBuildOptions options, String[] enginePaths)

-          throws InvalidXMLException, ResourceInitializationException, IOException,

-          URISyntaxException {

-

-    TypeSystemDescription typeSystemDescription = uimaFactory.createTypeSystemDescription();

-

-    ResourceManager rm = UIMAFramework.newDefaultResourceManager();

-    if (options.getClassLoader() != null) {

-      new ResourceManager_impl(options.getClassLoader());

-    }

-    if (enginePaths != null) {

-      String dataPath = "";

-      for (String string : enginePaths) {

-        dataPath += string + File.pathSeparator;

-      }

-      rm.setDataPath(dataPath);

-    }

-    Map<String, String> typeNameMap = new HashMap<String, String>();

-    TypeSystemDescription initialTypeSystem = UIMAFramework.getXMLParser()

-            .parseTypeSystemDescription(new XMLInputSource(defaultTypeSystem));

-    CAS cas = CasCreationUtils.createCas(initialTypeSystem, null, new FsIndexDescription[0]);

-    fillTypeNameMap(typeNameMap, cas.getTypeSystem());

-    cas.release();

-    List<TypeSystemDescription> toInclude = new ArrayList<TypeSystemDescription>();

-    List<Import> importList = new ArrayList<Import>();

-    Import_impl import_impl = new Import_impl();

-    if (options.isImportByName()) {

-      String name = initialTypeSystem.getName();

-      import_impl.setName(name);

-    } else if (options.isResolveImports()) {

-      String absoluteLocation = initialTypeSystem.getSourceUrlString();

-      import_impl.setLocation(absoluteLocation);

-    } else {

-      URI uri = null;

-      try {

-        uri = defaultTypeSystem.toURI();

-      } catch (URISyntaxException e) {

-        // do nothing

-      }

-      if (uri != null) {

-        String relativeLocation = getRelativeLocation(uri, typeSystemOutput);

-        if (relativeLocation != null) {

-          import_impl.setLocation(relativeLocation);

-        } else {

-          toInclude.add(initialTypeSystem);

-        }

-      } else {

-        toInclude.add(initialTypeSystem);

-      }

-    }

-    if (import_impl.getLocation() != null || import_impl.getName() != null) {

-      importList.add(import_impl);

-    }

-    for (String eachName : desc.getImportedTypeSystems()) {

-      String locate = RutaEngine.locate(eachName, enginePaths, ".xml");

-      URL url = null;

-      boolean include = false;

-      if (locate != null) {

-        File file = new File(locate);

-        url = file.toURI().toURL();

-      }

-      if (url == null) {

-        url = checkImportExistence(eachName, ".xml", options.getClassLoader());

-        include = true;

-        if (url == null) {

-          throw new FileNotFoundException("Build process can't find " + eachName + " in "

-                  + desc.getScriptName());

-        }

-      }

-      TypeSystemDescription each = getTypeSystemDescriptor(url, options, rm);

-      if (each != null) {

-        fillTypeNameMap(typeNameMap, each);

-        if (include) {

-          // need to include the complete type system because an import is not possible

-          each.resolveImports(rm);

-          toInclude.add(each);

-        } else {

-          import_impl = new Import_impl();

-          if (options.isImportByName()) {

-            import_impl.setName(eachName);

-          } else if (options.isResolveImports()) {

-            String absoluteLocation = each.getSourceUrlString();

-            import_impl.setLocation(absoluteLocation);

-          } else {

-            String relativeLocation = getRelativeLocation(url.toURI(), typeSystemOutput);

-            File parentFile = new File(typeSystemOutput).getParentFile();

-            File targetFile = new File(parentFile, relativeLocation);

-            boolean ableToFindFile = targetFile.exists();

-            if (!ableToFindFile) {

-              // hotfix for different partitions making trouble for the relative path

-              import_impl.setName(eachName);

-            } else {

-              import_impl.setLocation(relativeLocation);

-            }

-          }

-          importList.add(import_impl);

-        }

-      } else {

-        throw new FileNotFoundException("Build process can't find " + eachName + " in "

-                + desc.getScriptName());

-      }

-    }

-    for (String eachName : desc.getImportedScripts()) {

-      String locate = RutaEngine.locate(eachName, enginePaths, options.getTypeSystemSuffix()

-              + ".xml");

-      URL url = null;

-      if (locate != null) {

-        File file = new File(locate);

-        url = file.toURI().toURL();

-      }

-      if (url == null) {

-        url = checkImportExistence(eachName, options.getTypeSystemSuffix() + ".xml",

-                options.getClassLoader());

-        if (url == null) {

-          throw new FileNotFoundException("Build process can't find " + eachName

-                  + options.getTypeSystemSuffix() + ".xml" + " in " + desc.getScriptName());

-        }

-      }

-      TypeSystemDescription each = getTypeSystemDescriptor(url, options, rm);

-      if (each != null) {

-        fillTypeNameMap(typeNameMap, each);

-        import_impl = new Import_impl();

-        if (options.isImportByName()) {

-          import_impl.setName(eachName + options.getTypeSystemSuffix());

-        } else if (options.isResolveImports()) {

-          String absoluteLocation = each.getSourceUrlString();

-          import_impl.setLocation(absoluteLocation);

-        } else {

-          String relativeLocation = getRelativeLocation(url.toURI(), typeSystemOutput);

-          import_impl.setLocation(relativeLocation);

-        }

-        importList.add(import_impl);

-      } else {

-        throw new FileNotFoundException("Build process can't find " + eachName + " in "

-                + desc.getScriptName());

-      }

-    }

-    typeSystemDescription = CasCreationUtils.mergeTypeSystems(toInclude, rm);

-    if (!importList.isEmpty()) {

-      Import[] newImports = importList.toArray(new Import[0]);

-      typeSystemDescription.setImports(newImports);

-    }

-    if (options.isResolveImports()) {

-      typeSystemDescription.resolveImports(rm);

-    }

-

-    // TODO hotfixes: where do I get the final types??

-    Set<String> finalTypes = new HashSet<String>();

-    finalTypes.addAll(Arrays.asList(new String[] { "uima.cas.Boolean", "uima.cas.Byte",

-        "uima.cas.Short", "uima.cas.Integer", "uima.cas.Long", "uima.cas.Float", "uima.cas.Double",

-        "uima.cas.BooleanArray", "uima.cas.ByteArray", "uima.cas.ShortArray",

-        "uima.cas.IntegerArray", "uima.cas.LongArray", "uima.cas.FloatArray",

-        "uima.cas.DoubleArray", "uima.cas.StringArray", "uima.cas.FSArray" }));

-

-    int typeIndex = 0;

-    for (String eachType : desc.getTypeShortNames()) {

-      StringTriple typeTriple = desc.getTypeTriples().get(typeIndex);

-      typeTriple = resolveType(typeTriple, typeNameMap, desc.getScriptName());

-      if (typeSystemDescription.getType(typeTriple.getName()) != null) {

-        continue;

-      }

-      if (!finalTypes.contains(typeTriple.getParent())) {

-        TypeDescription newType = typeSystemDescription.addType(typeTriple.getName(),

-                typeTriple.getDescription(), typeTriple.getParent());

-

-        Collection<StringTriple> collection = desc.getFeatures().get(eachType);

-        if (collection != null) {

-          for (StringTriple eachFeature : collection) {

-            eachFeature = resolveFeature(eachFeature, typeNameMap);

-            newType.addFeature(eachFeature.getName(), eachFeature.getDescription(),

-                    eachFeature.getParent());

-            // capability.addInputFeature(eachFeature.getName());

-            // capability.addOutputFeature(eachFeature.getName());

-          }

-        }

-      }

-      typeIndex++;

-    }

-

-    Set<String> names = new HashSet<String>();

-    Collection<TypeDescription> types = new HashSet<TypeDescription>();

-    for (TypeDescription each : typeSystemDescription.getTypes()) {

-      String name = each.getName();

-      if (!names.contains(name)) {

-        names.add(name);

-        types.add(each);

-      }

-    }

-

-    File typeSystemFile = getFile(typeSystemOutput);

-    TypeDescription[] presentTypes = typeSystemDescription.getTypes();

-

-    types.addAll(Arrays.asList(presentTypes));

-    typeSystemDescription.setTypes(types.toArray(new TypeDescription[0]));

-    typeSystemDescription.setName(desc.getScriptName() + options.getTypeSystemSuffix());

-    typeSystemDescription.setSourceUrl(typeSystemFile.toURI().toURL());

-

-    return typeSystemDescription;

-  }

-

-  public AnalysisEngineDescription createAnalysisEngineDescription(RutaDescriptorInformation desc,

-          TypeSystemDescription typeSystemDescription, String typeSystemOutput,

-          String engineOutput, RutaBuildOptions options, String[] scriptPaths,

-          String[] enginePaths, String[] resourcePaths) throws InvalidXMLException, IOException {

-    TypeSystemDescription aets = uimaFactory.createTypeSystemDescription();

-    Import_impl import_impl = new Import_impl();

-    if (options.isImportByName()) {

-      if (typeSystemDescription != null) {

-        import_impl.setName(typeSystemDescription.getName());

-      }

-    } else {

-      if (typeSystemOutput != null) {

-        String relativeLocation = getRelativeLocation(new File(typeSystemOutput).toURI(),

-                engineOutput);

-        import_impl.setLocation(relativeLocation);

-      }

-    }

-

-    return configureEngine(desc, engineOutput, options, scriptPaths, enginePaths, resourcePaths,

-            import_impl, aets);

-  }

-

-  public void build(RutaDescriptorInformation desc, String typeSystemOutput, String engineOutput,

-          RutaBuildOptions options, String[] scriptPaths, String[] enginePaths)

-          throws SAXException, InvalidXMLException, IOException, ResourceInitializationException,

-          URISyntaxException {

-

-    TypeSystemDescription typeSystemDescription = createTypeSystemDescription(desc,

-            typeSystemOutput, options, enginePaths);

-

-    AnalysisEngineDescription analysisEngineDescription = createAnalysisEngineDescription(desc,

-            typeSystemDescription, typeSystemOutput, engineOutput, options, scriptPaths,

-            enginePaths, null);

-

-    File analysisEngineFile = getFile(engineOutput);

-    File typeSystemFile = getFile(typeSystemOutput);

-    toFile(typeSystemDescription, typeSystemFile);

-    toFile(analysisEngineDescription, analysisEngineFile);

-  }

-

-  private void fillTypeNameMap(Map<String, String> typeNameMap, TypeSystem typeSystem) {

-    Iterator<Type> typeIterator = typeSystem.getTypeIterator();

-    while (typeIterator.hasNext()) {

-      Type type = (Type) typeIterator.next();

-      String shortName = type.getShortName();

-      String name = type.getName();

-      typeNameMap.put(shortName, name);

-    }

-  }

-

-  private boolean fillTypeNameMap(Map<String, String> typeNameMap, TypeSystemDescription desc) {

-    boolean contained = false;

-    for (TypeDescription each : desc.getTypes()) {

-      String name = each.getName();

-      int lastIndexOf = name.lastIndexOf(".");

-      String shortName = name.substring(lastIndexOf + 1, name.length());

-      typeNameMap.put(shortName, name);

-    }

-    return contained;

-  }

-

-  private StringTriple resolveFeature(StringTriple eachFeature, Map<String, String> types) {

-    String parent = eachFeature.getParent();

-    String name = eachFeature.getName();

-    parent = translate(parent);

-    if (parent.indexOf(".") == -1 && types.containsKey(parent)) {

-      parent = types.get(parent);

-    }

-    return new StringTriple(name, eachFeature.getDescription(), parent);

-  }

-

-  private StringTriple resolveType(StringTriple typeTriple, Map<String, String> types,

-          String packageName) {

-    String parent = typeTriple.getParent();

-    String name = typeTriple.getName();

-    if (parent == null) {

-      parent = "uima.tcas.Annotation";

-    }

-    parent = translate(parent);

-    name = translate(name);

-    if (parent.indexOf(".") == -1 && types.containsKey(parent)) {

-      parent = types.get(parent);

-    }

-    if (name.indexOf(".") == -1) {

-      if (types.containsKey(name)) {

-        name = types.get(name);

-      } else {

-        name = packageName + "." + name;

-      }

-    }

-    int lastIndexOf = name.lastIndexOf(".");

-    String shortName = name.substring(lastIndexOf + 1, name.length());

-    types.put(shortName, name);

-    return new StringTriple(name, typeTriple.getDescription(), parent);

-  }

-

-  private String translate(String name) {

-    if (name == null) {

-      return null;

-    }

-    if (name.equals("Annotation")) {

-      return "uima.tcas.Annotation";

-    } else if (name.equals("STRING")) {

-      return UIMAConstants.TYPE_STRING;

-    } else if (name.equals("INT")) {

-      return UIMAConstants.TYPE_INTEGER;

-    } else if (name.equals("DOUBLE")) {

-      return UIMAConstants.TYPE_DOUBLE;

-    } else if (name.equals("FLOAT")) {

-      return UIMAConstants.TYPE_FLOAT;

-    } else if (name.equals("BOOLEAN")) {

-      return UIMAConstants.TYPE_BOOLEAN;

-    } else if (name.equals("TYPE")) {

-      return UIMAConstants.TYPE_STRING;

-    }

-    return name;

-  }

-

-  private AnalysisEngineDescription configureEngine(RutaDescriptorInformation desc,

-          String engineOutput, RutaBuildOptions option, String[] scriptPaths,

-          String[] descriptorPaths, String[] resourcePaths, Import_impl import_impl,

-          TypeSystemDescription aets) throws InvalidXMLException, IOException {

-

-    AnalysisEngineDescription analysisEngineDescription = UIMAFramework.getXMLParser()

-            .parseAnalysisEngineDescription(new XMLInputSource(defaultAnalysisEngine));

-    aets.setImports(new Import[] { import_impl });

-    analysisEngineDescription.getAnalysisEngineMetaData().setTypeSystem(aets);

-

-    File file = getFile(engineOutput);

-    analysisEngineDescription.setSourceUrl(file.toURI().toURL());

-

-    if (!desc.getTypeShortNames().isEmpty()) {

-      Capability capability = uimaFactory.createCapability();

-      for (StringTriple typeTriple : desc.getTypeTriples()) {

-        capability.addInputType(typeTriple.getName(), false);

-        capability.addOutputType(typeTriple.getName(), false);

-      }

-      Capability[] capabilities = analysisEngineDescription.getAnalysisEngineMetaData()

-              .getCapabilities();

-      Capability[] newArray = new Capability[capabilities.length + 1];

-      System.arraycopy(capabilities, 0, newArray, 0, capabilities.length);

-      newArray[capabilities.length] = capability;

-      analysisEngineDescription.getAnalysisEngineMetaData().setCapabilities(newArray);

-    }

-

-    String mainScript = desc.getScriptName();

-    if (!StringUtils.isBlank(desc.getPackageString())) {

-      mainScript = desc.getPackageString().concat(".").concat(mainScript);

-    }

-    analysisEngineDescription.getAnalysisEngineMetaData().getConfigurationParameterSettings()

-            .setParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, mainScript);

-    if (scriptPaths != null) {

-      analysisEngineDescription.getAnalysisEngineMetaData().getConfigurationParameterSettings()

-              .setParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, scriptPaths);

-    }

-    if (descriptorPaths != null) {

-      analysisEngineDescription.getAnalysisEngineMetaData().getConfigurationParameterSettings()

-              .setParameterValue(RutaEngine.PARAM_DESCRIPTOR_PATHS, descriptorPaths);

-    }

-    String[] parameterValue = (String[]) analysisEngineDescription.getAnalysisEngineMetaData()

-            .getConfigurationParameterSettings().getParameterValue(RutaEngine.PARAM_RESOURCE_PATHS);

-    Set<String> resourceLocations = new HashSet<String>();

-

-    if (parameterValue != null && parameterValue.length != 0) {

-      resourceLocations.addAll(Arrays.asList(parameterValue));

-    }

-    if (resourcePaths != null) {

-      resourceLocations.addAll(Arrays.asList(resourcePaths));

-    }

-    if (descriptorPaths != null) {

-      for (String string : descriptorPaths) {

-        File descDir = new File(string);

-        File defaultResourceDir = new File(descDir.getParent(), "resources");

-        resourceLocations.add(defaultResourceDir.getAbsolutePath());

-      }

-    }

-    analysisEngineDescription

-            .getAnalysisEngineMetaData()

-            .getConfigurationParameterSettings()

-            .setParameterValue(RutaEngine.PARAM_RESOURCE_PATHS,

-                    resourceLocations.toArray(new String[0]));

-

-    String[] additionalScriptsArray = desc.getImportedScripts().toArray(new String[] {});

-    analysisEngineDescription.getAnalysisEngineMetaData().getConfigurationParameterSettings()

-            .setParameterValue(RutaEngine.PARAM_ADDITIONAL_SCRIPTS, additionalScriptsArray);

-

-    String[] additionalEnginesArray = desc.getImportedEngines().toArray(new String[] {});

-    analysisEngineDescription.getAnalysisEngineMetaData().getConfigurationParameterSettings()

-            .setParameterValue(RutaEngine.PARAM_ADDITIONAL_ENGINES, additionalEnginesArray);

-

-    String[] additionalUimafitEnginesArray = desc.getImportedUimafitEngines().toArray(

-            new String[] {});

-    analysisEngineDescription

-            .getAnalysisEngineMetaData()

-            .getConfigurationParameterSettings()

-            .setParameterValue(RutaEngine.PARAM_ADDITIONAL_UIMAFIT_ENGINES,

-                    additionalUimafitEnginesArray);

-

-    analysisEngineDescription.getAnalysisEngineMetaData().setTypeSystem(aets);

-

-    configureExtensions(analysisEngineDescription, option);

-    return analysisEngineDescription;

-  }

-

-  private String getRelativeLocation(URI target, String base) {

-    Path basePath = Paths.get(base);

-    if (!basePath.toFile().isDirectory()) {

-      basePath = basePath.getParent();

-    }

-    Path targetPath = null;

-    try {

-      targetPath = Paths.get(target);

-    } catch (Exception e) {

-      return null;

-    }

-    Path relativePath = basePath.relativize(targetPath);

-    return relativePath.toString();

-  }

-

-  private void configureExtensions(AnalysisEngineDescription analysisEngineDescription,

-          RutaBuildOptions options) {

-    ConfigurationParameterSettings configurationParameterSettings = analysisEngineDescription

-            .getAnalysisEngineMetaData().getConfigurationParameterSettings();

-

-    List<String> languageExtensions = options.getLanguageExtensions();

-

-    String[] extensions = (String[]) configurationParameterSettings

-            .getParameterValue(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS);

-    String[] loaders = (String[]) configurationParameterSettings

-            .getParameterValue(RutaEngine.PARAM_ADDITIONAL_ENGINE_LOADERS);

-

-    List<String> es = new ArrayList<String>();

-    List<String> ls = new ArrayList<String>();

-    if (extensions != null) {

-      es.addAll(Arrays.asList(extensions));

-    }

-    es.addAll(languageExtensions);

-    if (loaders != null) {

-      ls.addAll(Arrays.asList(loaders));

-    }

-    ls.addAll(options.getEngineLoaders());

-

-    configurationParameterSettings.setParameterValue(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,

-            es.toArray(new String[0]));

-    configurationParameterSettings.setParameterValue(RutaEngine.PARAM_ADDITIONAL_ENGINE_LOADERS,

-            ls.toArray(new String[0]));

-  }

-

-  private TypeSystemDescription getTypeSystemDescriptor(URL url, RutaBuildOptions option,

-          ResourceManager rm) throws InvalidXMLException, IOException {

-    TypeSystemDescription tsdesc = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-            new XMLInputSource(url));

-    if (option.isResolveImports()) {

-      tsdesc.resolveImports(rm);

-    }

-    return tsdesc;

-  }

-

-  private File getFile(String location) {

-    return new File(location);

-  }

-

-  private void toFile(XMLizable desc, File destination) throws SAXException, FileNotFoundException {

-    destination.getParentFile().mkdirs();

-    OutputStream out = new FileOutputStream(destination);

-    XMLSerializer sax = new XMLSerializer(out);

-    ContentHandler ch = sax.getContentHandler();

-    ch.startDocument();

-    desc.toXML(ch);

-    ch.endDocument();

-  }

-

-  public static URL checkImportExistence(String candidate, String extension, ClassLoader classloader)

-          throws IOException {

-    String p = candidate.replaceAll("[.]", "/");

-    p += extension;

-    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(

-            classloader);

-    String prefix = "classpath*:";

-    String pattern = prefix + p;

-    Resource[] resources = resolver.getResources(pattern);

-    if (resources == null || resources.length == 0) {

-      return null;

-    } else {

-      Resource resource = resources[0];

-      URL url = resource.getURL();

-      return url;

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorFactory.java
deleted file mode 100644
index 51a8aad..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorFactory.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*

- * 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.ruta.descriptor;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.MalformedURLException;

-import java.net.URISyntaxException;

-import java.net.URL;

-import java.util.List;

-

-import org.antlr.runtime.ANTLRFileStream;

-import org.antlr.runtime.ANTLRStringStream;

-import org.antlr.runtime.CharStream;

-import org.antlr.runtime.CommonTokenStream;

-import org.antlr.runtime.RecognitionException;

-import org.apache.commons.lang3.tuple.ImmutablePair;

-import org.apache.commons.lang3.tuple.Pair;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.impl.ResourceManager_impl;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.engine.HtmlAnnotator;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.extensions.IRutaExtension;

-import org.apache.uima.ruta.extensions.RutaExternalFactory;

-import org.apache.uima.ruta.parser.RutaLexer;

-import org.apache.uima.ruta.parser.RutaParser;

-import org.apache.uima.util.InvalidXMLException;

-

-public class RutaDescriptorFactory {

-

-  private URL defaultTypeSystem;

-

-  private URL defaultEngine;

-

-  public RutaDescriptorFactory() {

-    super();

-    this.defaultEngine = HtmlAnnotator.class.getClassLoader().getResource(

-            "org/apache/uima/ruta/engine/BasicEngine.xml");

-    this.defaultTypeSystem = HtmlAnnotator.class.getClassLoader().getResource(

-            "org/apache/uima/ruta/engine/BasicTypeSystem.xml");

-  }

-

-  public RutaDescriptorFactory(String defaultTypeSystem, String defaultEngine)

-          throws MalformedURLException {

-    super();

-    this.defaultTypeSystem = new File(defaultTypeSystem).toURI().toURL();

-    this.defaultEngine = new File(defaultEngine).toURI().toURL();

-  }

-

-  public RutaDescriptorFactory(URL defaultTypeSystem, URL defaultEngine) {

-    super();

-    this.defaultTypeSystem = defaultTypeSystem;

-    this.defaultEngine = defaultEngine;

-  }

-

-  public TypeSystemDescription createTypeSystemDescription(String typeSystemOutput,

-          RutaDescriptorInformation descriptorInformation, RutaBuildOptions options,

-          ClassLoader classloader) throws RecognitionException, IOException, InvalidXMLException,

-          ResourceInitializationException, URISyntaxException {

-

-    RutaDescriptorBuilder builder = new RutaDescriptorBuilder(defaultTypeSystem, defaultEngine);

-

-    TypeSystemDescription typeSystemDescription = builder.createTypeSystemDescription(

-            descriptorInformation, typeSystemOutput, options, null);

-

-    return typeSystemDescription;

-  }

-

-  public AnalysisEngineDescription createAnalysisEngineDescription(String engineOutput,

-          RutaDescriptorInformation descriptorInformation, RutaBuildOptions options,

-          String[] scriptPaths, String[] descriptorPaths, String[] resourcePaths,

-          ClassLoader classloader) throws IOException, RecognitionException, InvalidXMLException {

-

-    RutaDescriptorBuilder builder = new RutaDescriptorBuilder(defaultTypeSystem, defaultEngine);

-

-    AnalysisEngineDescription analysisEngineDescription = builder.createAnalysisEngineDescription(

-            descriptorInformation, null, null, engineOutput, options, scriptPaths, descriptorPaths,

-            resourcePaths);

-

-    return analysisEngineDescription;

-  }

-

-  public Pair<AnalysisEngineDescription, TypeSystemDescription> createDescriptions(

-          String engineOutput, String typeSystemOutput,

-          RutaDescriptorInformation descriptorInformation, RutaBuildOptions options,

-          String[] scriptPaths, String[] descriptorPaths, String[] resourcePaths)

-          throws IOException, RecognitionException, InvalidXMLException,

-          ResourceInitializationException, URISyntaxException {

-

-    RutaDescriptorBuilder builder = new RutaDescriptorBuilder(defaultTypeSystem, defaultEngine);

-

-    TypeSystemDescription typeSystemDescription = builder.createTypeSystemDescription(

-            descriptorInformation, typeSystemOutput, options, descriptorPaths);

-

-    AnalysisEngineDescription analysisEngineDescription = builder.createAnalysisEngineDescription(

-            descriptorInformation, typeSystemDescription, typeSystemOutput, engineOutput, options,

-            scriptPaths, descriptorPaths, resourcePaths);

-

-    return new ImmutablePair<AnalysisEngineDescription, TypeSystemDescription>(

-            analysisEngineDescription, typeSystemDescription);

-  }

-

-  public RutaDescriptorInformation parseDescriptorInformation(File scriptFile,

-          RutaBuildOptions options) throws IOException, RecognitionException {

-    CharStream st = new ANTLRFileStream(scriptFile.getAbsolutePath(), options.getEncoding());

-    RutaLexer lexer = new RutaLexer(st);

-    CommonTokenStream tokens = new CommonTokenStream(lexer);

-    RutaParser parser = new RutaParser(tokens);

-    RutaDescriptorInformation descInfo = new RutaDescriptorInformation();

-    parser.setDescriptorInformation(descInfo);

-    // TODO no context?

-    parser.setContext(null);

-    parser.setExternalFactory(initializeExternalFactory(options));

-    // TODO no resource, avoid fail on missing resources while parsing

-    parser.setResourcePaths(new String[0]);

-    ResourceManager rm = getResourceManager(options);

-    parser.setResourceManager(rm);

-    String name = scriptFile.getName();

-    int lastIndexOf = name.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);

-    if (lastIndexOf != -1) {

-      name = name.substring(0, lastIndexOf);

-    }

-    descInfo.setScriptName(name);

-    parser.file_input(name);

-    return descInfo;

-  }

-

-  public RutaDescriptorInformation parseDescriptorInformation(String script) throws IOException,

-          RecognitionException {

-    return parseDescriptorInformation(script, new RutaBuildOptions());

-  }

-

-  public RutaDescriptorInformation parseDescriptorInformation(String script,

-          RutaBuildOptions options) throws IOException, RecognitionException {

-    CharStream st = new ANTLRStringStream(script);

-    RutaLexer lexer = new RutaLexer(st);

-    CommonTokenStream tokens = new CommonTokenStream(lexer);

-    RutaParser parser = new RutaParser(tokens);

-    RutaDescriptorInformation descInfo = new RutaDescriptorInformation();

-    parser.setDescriptorInformation(descInfo);

-    // TODO no context?

-    parser.setContext(null);

-    parser.setExternalFactory(initializeExternalFactory(options));

-    // TODO no resource, avoid fail on missing resources while parsing

-    parser.setResourcePaths(new String[0]);

-    ResourceManager rm = getResourceManager(options);

-    parser.setResourceManager(rm);

-    String name = "Anonymous";

-    descInfo.setScriptName(name);

-    parser.file_input(name);

-    return descInfo;

-  }

-

-  private ResourceManager getResourceManager(RutaBuildOptions options) {

-    ResourceManager rm = null;

-    if(options.getClassLoader() != null) {

-      rm = new ResourceManager_impl(options.getClassLoader());

-    } else {

-      rm = UIMAFramework.newDefaultResourceManager();

-    }

-    return rm;

-  }

-

-  private RutaExternalFactory initializeExternalFactory(RutaBuildOptions options) {

-    RutaExternalFactory factory = new RutaExternalFactory();

-    List<String> languageExtensions = options.getLanguageExtensions();

-    for (String each : languageExtensions) {

-      try {

-        Class<?> forName = null;

-        if (options.getClassLoader() != null) {

-        	forName = options.getClassLoader().loadClass(each);

-        } else {

-          forName = Class.forName(each);

-        }

-        if (forName != null && IRutaExtension.class.isAssignableFrom(forName)) {

-          IRutaExtension extension = (IRutaExtension) forName.newInstance();

-          for (String name : extension.getKnownExtensions()) {

-            factory.addExtension(name, extension);

-          }

-        }

-      } catch (Exception e) {

-        // System.out.println("EXTENSION ERROR: " + each);

-      }

-    }

-    return factory;

-  }

-

-  public URL getDefaultTypeSystem() {

-    return defaultTypeSystem;

-  }

-

-  public void setDefaultTypeSystem(URL defaultTypeSystem) {

-    this.defaultTypeSystem = defaultTypeSystem;

-  }

-

-  public URL getDefaultEngine() {

-    return defaultEngine;

-  }

-

-  public void setDefaultEngine(URL defaultEngine) {

-    this.defaultEngine = defaultEngine;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorInformation.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorInformation.java
deleted file mode 100644
index ecb7d7b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/RutaDescriptorInformation.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*

- * 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.ruta.descriptor;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Map;

-

-public class RutaDescriptorInformation {

-

-  private static final boolean CONVERT = false;

-

-  private List<String> typeShortNames;

-

-  private List<StringTriple> typeTriples;

-

-  private Collection<String> importedTypeSystems;

-

-  private Map<String, Collection<StringTriple>> features;

-

-  private Collection<String> importedScripts;

-

-  private Collection<String> importedEngines;

-

-  private Collection<String> importedUimafitEngines;

-

-  private String scriptName;

-

-  private String packageString;

-

-  public RutaDescriptorInformation() {

-    super();

-    typeShortNames = new ArrayList<String>();

-    typeTriples = new ArrayList<StringTriple>();

-    importedTypeSystems = new HashSet<String>();

-    importedScripts = new HashSet<String>();

-    importedEngines = new HashSet<String>();

-    importedUimafitEngines = new HashSet<String>();

-    features = new HashMap<String, Collection<StringTriple>>();

-  }

-

-  public void addType(String name, String description, String parent) {

-    if (parent == null) {

-      parent = "uima.tcas.Annotation";

-    }

-    typeShortNames.add(name);

-    typeTriples.add(new StringTriple(name, description, parent));

-  }

-

-  public void addFeature(String type, String name, String description, String parent) {

-    Collection<StringTriple> list = features.get(type);

-    if (list == null) {

-      list = new ArrayList<StringTriple>();

-      features.put(type, list);

-    }

-    list.add(new StringTriple(name, description, parent));

-  }

-

-  public void addScript(String name, boolean convert) {

-    if (convert) {

-      name = name.replaceAll("[.]", "/");

-    }

-    importedScripts.add(name);

-  }

-

-  public void addEngine(String name, boolean convert) {

-    if (convert) {

-      name = name.replaceAll("[.]", "/");

-    }

-    importedEngines.add(name);

-  }

-

-  public void addUimafitEngine(String name) {

-    importedUimafitEngines.add(name);

-  }

-

-  public void addTypeSystem(String name, boolean convert) {

-    if (convert) {

-      name = name.replaceAll("[.]", "/");

-    }

-    importedTypeSystems.add(name);

-  }

-

-  public void addScript(String name) {

-    addScript(name, CONVERT);

-  }

-

-  public void addEngine(String name) {

-    addEngine(name, CONVERT);

-  }

-

-  public void addTypeSystem(String name) {

-    addTypeSystem(name, CONVERT);

-  }

-

-  public List<String> getTypeShortNames() {

-    return typeShortNames;

-  }

-

-  public List<StringTriple> getTypeTriples() {

-    return typeTriples;

-  }

-

-  public Map<String, Collection<StringTriple>> getFeatures() {

-    return features;

-  }

-

-  public Collection<String> getImportedTypeSystems() {

-    return importedTypeSystems;

-  }

-

-  public Collection<String> getImportedScripts() {

-    return importedScripts;

-  }

-

-  public Collection<String> getImportedEngines() {

-    return importedEngines;

-  }

-

-  public Collection<String> getImportedUimafitEngines() {

-    return importedUimafitEngines;

-  }

-

-  public void setScriptName(String scriptName) {

-    this.scriptName = scriptName;

-  }

-

-  public String getScriptName() {

-    return scriptName;

-  }

-

-  public String getPackageString() {

-    return packageString;

-  }

-

-  public void setPackageString(String packageString) {

-    this.packageString = packageString;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/StringTriple.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/StringTriple.java
deleted file mode 100644
index 8e7505c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/descriptor/StringTriple.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * 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.ruta.descriptor;

-

-public class StringTriple {

-

-  private final String name;

-

-  private final String description;

-

-  private final String parent;

-

-  public StringTriple(String name, String description, String parent) {

-    super();

-    this.name = name;

-    this.description = description;

-    this.parent = parent;

-  }

-

-  public String getName() {

-    return name;

-  }

-

-  public String getDescription() {

-    return description;

-  }

-

-  public String getParent() {

-    return parent;

-  }

-

-  @Override

-  public boolean equals(Object obj) {

-    if (obj == this)

-      return true;

-    if (!(obj instanceof StringTriple)) {

-      return false;

-    }

-    StringTriple t = (StringTriple) obj;

-    return name.equals(t.getName()) && parent.equals(t.getParent());

-  }

-

-  @Override

-  public int hashCode() {

-    return name.hashCode() + parent.hashCode() * 37;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/AnnotationWriter.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/AnnotationWriter.java
deleted file mode 100644
index a813dc1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/AnnotationWriter.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.File;

-import java.io.IOException;

-

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.util.FileUtils;

-

-/**

- * This Analysis Engine can be utilized to write the covered text of annotations in a text file,

- * whereas each covered text is put into a new line. If the analysis engine, for example, is

- * configured for the type <code>uima.example.Person</code>, then all covered texts of all Person

- * annotations are stored in a text file, one person in each line. A descriptor file for this

- * Analysis Engine is located in the folder <code>descriptor/utils</code> of a UIMA Ruta project.

- * 

- */

-public class AnnotationWriter extends JCasAnnotator_ImplBase {

-

-  /**

-   * This string parameter specifies the absolute path of the resulting file named

-   * <code>output.txt</code>. However, if an annotation of the type

-   * <code>org.apache.uima.examples.SourceDocumentInformation</code> is given, then the value of

-   * this parameter is interpreted to be relative to the URI stored in the annotation and the name

-   * of the file will be adapted to the name of the source file. The default value of this parameter

-   * is <code>/../output/</code>.

-   */

-  public static final String PARAM_OUTPUT = "Output";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT, mandatory = false, defaultValue = "/../output/")

-  private String output;

-

-  /**

-   * This string parameter specifies the encoding of the resulting file. The default value of this

-   * parameter is <code>UTF-8</code>.

-   */

-  public static final String PARAM_ENCODING = "Encoding";

-

-  @ConfigurationParameter(name = PARAM_ENCODING, mandatory = false, defaultValue = "UTF-8")

-  private String encoding;

-

-  /**

-   * Only the covered texts of annotations of the type specified with this parameter are stored in

-   * the resulting file. The default value of this parameter is

-   * <code>uima.tcas.DocumentAnnotation</code>, which will store the complete document in a new

-   * file.

-   */

-  public static final String PARAM_TYPE = "Type";

-

-  @ConfigurationParameter(name = PARAM_TYPE, mandatory = false, defaultValue = ">uima.tcas.DocumentAnnotation")

-  private String type;

-

-  private UimaContext context;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    if (aContext == null && context != null) {

-      aContext = context;

-    }

-    if (aContext != null) {

-      output = (String) aContext.getConfigParameterValue(PARAM_OUTPUT);

-      type = (String) aContext.getConfigParameterValue(PARAM_TYPE);

-      encoding = (String) aContext.getConfigParameterValue(PARAM_ENCODING);

-      this.context = aContext;

-    }

-  }

-

-  @Override

-  public void process(JCas jcas) throws AnalysisEngineProcessException {

-    CAS cas = jcas.getCas();

-    Type targetType = cas.getTypeSystem().getType(type);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(targetType).iterator();

-

-    StringBuilder newDocument = new StringBuilder();

-    while (iterator.isValid()) {

-      AnnotationFS fs = iterator.get();

-      newDocument.append(fs.getCoveredText());

-      newDocument.append("\n");

-      iterator.moveToNext();

-    }

-

-    Type sdiType = cas.getTypeSystem().getType(RutaEngine.SOURCE_DOCUMENT_INFORMATION);

-

-    String filename = "output.txt";

-    File file = new File(output, filename);

-    if (sdiType != null) {

-      FSIterator<AnnotationFS> sdiit = cas.getAnnotationIndex(sdiType).iterator();

-      if (sdiit.isValid()) {

-        AnnotationFS annotationFS = sdiit.get();

-        Feature uriFeature = sdiType.getFeatureByBaseName("uri");

-        String stringValue = annotationFS.getStringValue(uriFeature);

-        File f = new File(stringValue);

-        String name = f.getName();

-        if (!name.endsWith(".txt")) {

-          name = name + ".txt";

-        }

-        file = new File(f.getParent() + output, name);

-      }

-

-    }

-    try {

-      FileUtils.saveString2File(newDocument.toString(), file, encoding);

-    } catch (IOException e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlAnnotator.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlAnnotator.java
deleted file mode 100644
index 374df78..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlAnnotator.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.htmlparser.Parser;

-import org.htmlparser.util.NodeList;

-import org.htmlparser.util.ParserException;

-

-/**

- * This Analysis Engine provides support for HTML files by adding annotations for the HTML elements.

- * Using the default values, the HTML Annotator creates annotations for each HTML element spanning

- * the content of the element, whereas the most common elements are represented by own types. The

- * document <code>This text is <b>bold</b>.</code>, for example, would be annotated

- * with an annotation of the type <code>org.apache.uima.ruta.type.html.B</code> for the word

- * <code>bold</code>. The HTML annotator can be configured in order to include the start and end

- * elements in the created annotations. A descriptor file for this Analysis Engine is located in the

- * folder <code>descriptor/utils</code> of a UIMA Ruta project.

- * 

- */

-public class HtmlAnnotator extends JCasAnnotator_ImplBase {

-  public static final String NAMESPACE = "org.apache.uima.ruta.type.html.";

-

-  /**

-   * This parameter specifies whether created annotations should cover only the content of the HTML

-   * elements or also their start and end elements. The default value is <code>true</code>.

-   */

-  public static final String PARAM_ONLY_CONTENT = "onlyContent";

-

-  @ConfigurationParameter(name = PARAM_ONLY_CONTENT, mandatory = false, defaultValue = "true")

-  private Boolean onlyContent;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    onlyContent = (Boolean) aContext.getConfigParameterValue(PARAM_ONLY_CONTENT);

-    onlyContent = onlyContent == null ? true : onlyContent;

-  }

-

-  @Override

-  public void process(JCas jcas) throws AnalysisEngineProcessException {

-    String documentText = jcas.getDocumentText();

-    List<AnnotationFS> annotations = new ArrayList<AnnotationFS>();

-    List<AnnotationFS> annotationStack = new ArrayList<AnnotationFS>();

-    try {

-      Parser parser = new Parser(documentText);

-      NodeList list = parser.parse(null);

-      HtmlVisitor visitor = new HtmlVisitor(jcas, onlyContent);

-      list.visitAllNodesWith(visitor);

-      annotations = visitor.getAnnotations();

-      annotationStack = visitor.getAnnotationStack();

-    } catch (ParserException e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-    for (AnnotationFS each : annotations) {

-      if (each.getBegin() < each.getEnd()) {

-        jcas.addFsToIndexes(each);

-      }

-    }

-    for (AnnotationFS each : annotationStack) {

-      if (each.getBegin() < each.getEnd()) {

-        jcas.addFsToIndexes(each);

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java
deleted file mode 100644
index e1f9319..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.Set;

-import java.util.SortedSet;

-import java.util.TreeSet;

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import org.apache.commons.lang3.StringEscapeUtils;

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.util.CasCopier;

-import org.apache.uima.util.Level;

-import org.htmlparser.Parser;

-import org.htmlparser.util.NodeList;

-import org.htmlparser.util.ParserException;

-

-/**

- * This Analysis Engine is able to convert html content from a source view into a plain string

- * representation stored in an output view. Especially, the Analysis Engine transfers annotations

- * under consideration of the changed document text and annotation offsets in the new view. The copy

- * process also sets features, however, features of type annotation are currently not supported.

- * Note that if an annotation would have the same start and end positions in the new view, i.e., if

- * it would be mapped to an annotation of length 0, it is not moved to the new view.

- * 

- * The HTML Converter also supports heuristic and explicit conversion patterns which default to

- * html4 decoding, e.g., "{@literal&nbsp;}", "{@literal &lt;}", etc. Concepts like tables or

- * lists are not supported.

- * 

- * Note that in general it is suggested to run an html cleaner before any further processing to

- * avoid problems with malformed html.

- * 

- * A descriptor file for this Analysis Engine is located in the folder <code>descriptor/utils</code>

- * of a UIMA Ruta project.

- * 

- */

-public class HtmlConverter extends JCasAnnotator_ImplBase {

-

-  public static final String NAMESPACE = "org.apache.uima.ruta.type.html.";

-

-  public static final String DEFAULT_MODIFIED_VIEW = "plaintext";

-

-  public static final String LINEBREAK = "\n";

-

-  /**

-   * This string parameter specifies the name of the new view. The default value is

-   * <code>plaintext</code>.

-   */

-  public static final String PARAM_OUTPUT_VIEW = "outputView";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT_VIEW, mandatory = false, defaultValue = DEFAULT_MODIFIED_VIEW)

-  private String modifiedViewName;

-

-  /**

-   * This string parameter can optionally be set to specify the name of the input view.

-   */

-  public static final String PARAM_INPUT_VIEW = "inputView";

-

-  @ConfigurationParameter(name = PARAM_INPUT_VIEW, mandatory = false)

-  private String inputViewName;

-

-  /**

-   * This boolean parameter determines if linebreaks inside the text nodes are kept or removed. The

-   * default behavior is <code>true</code>.

-   */

-  public static final String PARAM_REPLACE_LINEBREAKS = "replaceLinebreaks";

-

-  @ConfigurationParameter(name = PARAM_REPLACE_LINEBREAKS, mandatory = false, defaultValue = "true")

-  private Boolean replaceLinebreaks;

-

-  /**

-   * This boolean parameter determines if the converter should skip whitespaces. Html documents

-   * often contains whitespaces for indentation and formatting, which should not be reproduced in

-   * the converted plain text document. If the parameter is set to false, then the whitespces are

-   * not removed. This behavior is useful, if not Html documents are converted, but XMl files. The

-   * default value is true.

-   */

-  public static final String PARAM_SKIP_WHITESPACES = "skipWhitespaces";

-

-  @ConfigurationParameter(name = PARAM_SKIP_WHITESPACES, mandatory = false, defaultValue = "true")

-  private Boolean skipWhitespaces;

-

-  /**

-   * If this boolean parameter is set to true, then the tags of the complete document is processed

-   * and not only those within the body tag.

-   */

-  public static final String PARAM_PROCESS_ALL = "processAll";

-

-  @ConfigurationParameter(name = PARAM_PROCESS_ALL, mandatory = false, defaultValue = "false")

-  private Boolean processAll;

-

-  /**

-   * If this boolean parameter is set to true, then zero-length annotation will not be dropped, but

-   * they will be assigned to the offset of the "nearest" annotation. In that case, a boolean

-   * feature names offsetsExpanded will be set to true if available.

-   */

-  public static final String PARAM_EXPAND_OFFSETS = "expandOffsets";

-

-  @ConfigurationParameter(name = PARAM_EXPAND_OFFSETS, mandatory = false, defaultValue = "false")

-  private Boolean expandOffsets;

-

-  /**

-   * This string parameter determines the character sequence that replaces a linebreak. The default

-   * behavior is the empty string.

-   */

-  public static final String PARAM_LINEBREAK_REPLACEMENT = "linebreakReplacement";

-

-  @ConfigurationParameter(name = PARAM_LINEBREAK_REPLACEMENT, mandatory = false, defaultValue = "")

-  private String linebreakReplacement;

-

-  /**

-   * This string array parameter sets the names of the html tags that create linebreaks in the

-   * output view. The default is <code>br, p, div, ul, ol, dl, li, h1, ..., h6, blockquote</code>.

-   */

-  public static final String PARAM_NEWLINE_INDUCING_TAGS = "newlineInducingTags";

-

-  @ConfigurationParameter(name = PARAM_NEWLINE_INDUCING_TAGS, mandatory = false, defaultValue = {

-      "br", "p", "div", "ul", "ol", "dl", "li", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote" })

-  private String[] newlineInducingTags;

-

-  /**

-   * This string parameter contains a regular expression for HTML/XML elements. If the pattern

-   * matches, then the element will introduce a new line break similar to the element of the

-   * parameter <code>newlineInducingTags</code>.

-   */

-  public static final String PARAM_NEWLINE_INDUCING_TAG_REGEXP = "newlineInducingTagRegExp";

-

-  @ConfigurationParameter(name = PARAM_NEWLINE_INDUCING_TAG_REGEXP, mandatory = false)

-  private String newlineInducingTagRegExp;

-

-  /**

-   * This string array parameter sets the names of the html tags that create additional text in the

-   * output view. The acutal string of the gap is defined by the parameter <code>gapText</code>.

-   */

-  public static final String PARAM_GAP_INDUCING_TAGS = "gapInducingTags";

-

-  @ConfigurationParameter(name = PARAM_GAP_INDUCING_TAGS, mandatory = false)

-  private String[] gapInducingTags;

-

-  /**

-   * This string parameter determines the character sequence that is introduced by the html tags

-   * specified in the <code>gapInducingTags</code>.

-   */

-  public static final String PARAM_GAP_TEXT = "gapText";

-

-  @ConfigurationParameter(name = PARAM_GAP_TEXT, mandatory = false, defaultValue = "")

-  private String gapText;

-  

-  /**

-   * This boolean parameter sets the value of the parameter <code>gapText</code> to a single space.

-   */

-  public static final String PARAM_USE_SPACE_GAP = "useSpaceGap";

-

-  @ConfigurationParameter(name = PARAM_USE_SPACE_GAP, mandatory = false, defaultValue = "")

-  private Boolean useSpaceGap;

-

-  /**

-   * This string array parameter can be used to apply custom conversions. It defaults to a list of

-   * commonly used codes, e.g., {@literal&nbsp;}, which are converted using html 4 entity

-   * unescaping. However, explicit conversion strings can also be passed via the parameter

-   * <code>conversionReplacements</code>. Remember to enable explicit conversion via

-   * <code>conversionPolicy</code> first.

-   */

-  public static final String PARAM_CONVERSION_PATTERNS = "conversionPatterns";

-

-  @ConfigurationParameter(name = PARAM_CONVERSION_PATTERNS, mandatory = false, defaultValue = {

-      "&nbsp;", "&laquo;", "&raquo;", "&quot;", "&amp;", "&lt;", "&gt;", "&apos;", "&sect;",

-      "&uml;", "&copy;", "&trade;", "&reg;", "&ouml;", "&auml;", "&uuml;", "&#160;" })

-  private String[] conversionPatterns;

-

-  /**

-   * This string parameter determines the conversion policy used, either "heuristic", "explicit", or

-   * "none". When the value is "explicit", the parameters <code>conversionPatterns</code> and

-   * optionally <code>conversionReplacements</code> are considered. The "heuristic" conversion

-   * policy uses simple regular expressions to decode html4 entities such as "{@literal&nbsp;}".

-   * The default behavior is "heuristic".

-   */

-  public static final String PARAM_CONVERSION_POLICY = "conversionPolicy";

-

-  @ConfigurationParameter(name = PARAM_CONVERSION_POLICY, mandatory = false, defaultValue = "heuristic")

-  private String conversionPolicy;

-

-  /**

-   * This string array parameter corresponds to <code>conversionPatterns</code> such that

-   * <code>conversionPatterns[i]</code> will be replaced by <code>conversionReplacements[i]</code>;

-   * replacements should be shorter than the source pattern. Per default, the replacement strings

-   * are computed using Html4 decoding. Remember to enable explicit conversion via

-   * <code>conversionPolicy</code> first.

-   */

-  public static final String PARAM_CONVERSION_REPLACEMENTS = "conversionReplacements";

-

-  @ConfigurationParameter(name = PARAM_CONVERSION_REPLACEMENTS, mandatory = false)

-  private String[] conversionReplacements;

-

-  private int[] map;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    inputViewName = (String) aContext.getConfigParameterValue(PARAM_INPUT_VIEW);

-    inputViewName = StringUtils.isBlank(inputViewName) ? null : inputViewName;

-    modifiedViewName = (String) aContext.getConfigParameterValue(PARAM_OUTPUT_VIEW);

-    modifiedViewName = StringUtils.isBlank(modifiedViewName) ? DEFAULT_MODIFIED_VIEW

-            : modifiedViewName;

-    replaceLinebreaks = (Boolean) aContext.getConfigParameterValue(PARAM_REPLACE_LINEBREAKS);

-    replaceLinebreaks = replaceLinebreaks == null ? true : replaceLinebreaks;

-    skipWhitespaces = (Boolean) aContext.getConfigParameterValue(PARAM_SKIP_WHITESPACES);

-    skipWhitespaces = skipWhitespaces == null ? true : skipWhitespaces;

-    processAll = (Boolean) aContext.getConfigParameterValue(PARAM_PROCESS_ALL);

-    processAll = processAll == null ? true : processAll;

-    linebreakReplacement = (String) aContext.getConfigParameterValue(PARAM_LINEBREAK_REPLACEMENT);

-    linebreakReplacement = linebreakReplacement == null ? "" : linebreakReplacement;

-    String conversionPolicy = (String) aContext.getConfigParameterValue(PARAM_CONVERSION_POLICY);

-    if (StringUtils.isBlank(conversionPolicy) || conversionPolicy.equals("heuristic")) {

-      conversionPolicy = "heuristic";

-    } else if (conversionPolicy.equals("explicit")) {

-    } else if (conversionPolicy.equals("none")) {

-    } else {

-      throw new ResourceInitializationException("illegal conversionPolicy parameter value",

-              new Object[0]);

-    }

-    String[] nlTags = (String[]) aContext.getConfigParameterValue(PARAM_NEWLINE_INDUCING_TAGS);

-    if (nlTags == null) {

-      newlineInducingTags = new String[] { "br", "p", "div", "ul", "ol", "dl", "li", "h1", "h2",

-          "h3", "h4", "h5", "h6", "blockquote" };

-

-    }

-    // check assertions

-    if (modifiedViewName.equals(inputViewName)) {

-      throw new ResourceInitializationException("input and output view names must differ!",

-              new Object[0]);

-    }

-    conversionPatterns = (String[]) aContext.getConfigParameterValue(PARAM_CONVERSION_PATTERNS);

-    if (conversionPatterns == null) {

-      conversionPatterns = new String[] { "&nbsp;", "&laquo;", "&raquo;", "&quot;", "&amp;",

-          "&lt;", "&gt;", "&apos;", "&sect;", "&uml;", "&copy;", "&trade;", "&reg;", "&ouml;",

-          "&auml;", "&uuml;", "&#160;" };

-    }

-    conversionReplacements = (String[]) aContext

-            .getConfigParameterValue(PARAM_CONVERSION_REPLACEMENTS);

-    if (conversionReplacements == null) {

-      conversionReplacements = new String[conversionPatterns.length];

-      for (int i = 0; i < conversionPatterns.length; i++) {

-        String c = conversionPatterns[i];

-        String rep = StringEscapeUtils.unescapeHtml4(c);

-        conversionReplacements[i] = rep;

-      }

-    }

-    

-    gapText = (String) aContext.getConfigParameterValue(PARAM_GAP_TEXT);

-    gapText = gapText == null ? "" : gapText;

-    

-    useSpaceGap = (Boolean) aContext.getConfigParameterValue(PARAM_USE_SPACE_GAP);

-    useSpaceGap = useSpaceGap == null ? false : useSpaceGap;

-    

-    if(useSpaceGap) {

-      gapText = " ";

-    }

-    

-    gapInducingTags = (String[]) aContext.getConfigParameterValue(PARAM_GAP_INDUCING_TAGS);

-    gapInducingTags = gapInducingTags == null ? new String[0] : gapInducingTags;

-    

-    expandOffsets = (Boolean) aContext.getConfigParameterValue(PARAM_EXPAND_OFFSETS);

-    expandOffsets = expandOffsets == null ? false : expandOffsets;

-    

-    newlineInducingTagRegExp = (String) aContext.getConfigParameterValue(PARAM_NEWLINE_INDUCING_TAG_REGEXP);

-  }

-

-  @Override

-  public void process(JCas jcaz) throws AnalysisEngineProcessException {

-    JCas jcas;

-    try {

-      if (inputViewName != null) {

-        jcas = jcaz.getView(inputViewName);

-      } else {

-        jcas = jcaz;

-      }

-    } catch (CASException e1) {

-      throw new AnalysisEngineProcessException(e1.getCause());

-    }

-    // init:

-    String documentText = jcas.getDocumentText();

-    String splitSeq = documentText.contains("\r\n") ? "\r\n" : "\n";

-    map = new int[documentText.length() + 1];

-    JCas modview = null;

-    try {

-      // check if view already exists:

-      Iterator<JCas> viewIterator = jcas.getViewIterator();

-      while (viewIterator.hasNext()) {

-        JCas jCas2 = (JCas) viewIterator.next();

-        if (jCas2.getViewName().equals(modifiedViewName)) {

-          modview = jCas2;

-          getContext().getLogger().log(Level.WARNING,

-                  "view with name \"" + modifiedViewName + "\" already exists.");

-        }

-      }

-      if (modview == null) {

-        modview = jcas.createView(modifiedViewName);

-      }

-    } catch (CASException e) {

-      e.printStackTrace();

-      return;

-    }

-    SortedSet<HtmlConverterPSpan> visibleSpansSoFar = new TreeSet<HtmlConverterPSpan>();

-    SortedSet<HtmlConverterPSpan> linebreaksFromHtmlTags = new TreeSet<HtmlConverterPSpan>();

-    SortedSet<HtmlConverterPSpan> gapsFromHtmlTags = new TreeSet<HtmlConverterPSpan>();

-

-    // process

-    try {

-      Parser parser = new Parser(documentText);

-      NodeList list = parser.parse(null);

-      HtmlConverterVisitor visitor = new HtmlConverterVisitor(newlineInducingTags, newlineInducingTagRegExp, gapInducingTags,

-              gapText, skipWhitespaces, processAll);

-      list.visitAllNodesWith(visitor);

-      visibleSpansSoFar = visitor.getTextSpans();

-      linebreaksFromHtmlTags = visitor.getLinebreaksFromHtmlTags();

-      gapsFromHtmlTags = visitor.getGapsFromHtmlTags();

-    } catch (ParserException e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-    if (replaceLinebreaks) {

-      visibleSpansSoFar = this.handleLinebreaksInDocumentText(visibleSpansSoFar, splitSeq);

-    }

-    if (conversionPolicy.equals("heuristic")) {

-      visibleSpansSoFar = this.htmlDecoding(visibleSpansSoFar);

-    } else if (conversionPolicy.equals("explicit")) {

-      for (int i = 0; i < conversionPatterns.length; i++) {

-        String pat = conversionPatterns[i];

-        String rep = conversionReplacements[i];

-        visibleSpansSoFar = this.handleConversion(visibleSpansSoFar, pat, rep);

-      }

-    }

-    visibleSpansSoFar.addAll(linebreaksFromHtmlTags);

-    visibleSpansSoFar.addAll(gapsFromHtmlTags);

-

-    // create new doc-text and the map from deletions and visible-text-spans:

-    StringBuffer sbu = new StringBuffer(documentText.length());

-    int originalOffsetI = 0;

-    int outOffset = 0;

-    for (HtmlConverterPSpan vis : visibleSpansSoFar) {

-      final int begin = vis.getBegin();

-      final int end = vis.getEnd();

-

-      // map text before annotation:

-      while (originalOffsetI < begin) {

-        map[originalOffsetI++] = outOffset;

-      }

-

-      // get and map text/replacement:

-      String s = "";

-      if (vis instanceof HtmlConverterPSpanReplacement) {

-        // conversion/replacement:

-        s = vis.getTxt();

-        // asserts that s is shorter than the original source

-        while (originalOffsetI < begin + s.length()) {

-          map[originalOffsetI++] = outOffset++;

-        }

-        while (originalOffsetI < end) {

-          map[originalOffsetI++] = outOffset;

-        }

-      } else {

-        // simple annotation:

-        s = documentText.substring(begin, end);

-        while (originalOffsetI < end) {

-          map[originalOffsetI++] = outOffset++;

-        }

-      }

-      sbu.append(s);

-    }

-    while (originalOffsetI < documentText.length()) {

-      map[originalOffsetI++] = outOffset;

-    }

-    map[documentText.length()] = outOffset + 1; // handle doc end separately

-    String modTxt = sbu.toString();

-    modview.setDocumentText(modTxt);

-

-    // copy annotations using the 'map':

-    try {

-      mapAnnotations(jcas, map, modifiedViewName);

-    } catch (CASException e) {

-      e.printStackTrace();

-    }

-  }

-

-  private void mapAnnotations(JCas fromJcas, int[] map, String toView) throws CASException {

-    JCas modview = fromJcas.getView(toView);

-

-    Set<Annotation> indexedFs = new HashSet<Annotation>();

-    Set<Annotation> toExpand = new HashSet<Annotation>();

-    AnnotationIndex<Annotation> annotationIndex = fromJcas.getAnnotationIndex();

-    TypeSystem typeSystem = fromJcas.getTypeSystem();

-    Type docType = typeSystem.getType(UIMAConstants.TYPE_DOCUMENT);

-    CasCopier casCopier = new CasCopier(fromJcas.getCas(), modview.getCas());

-    for (Annotation annotation : annotationIndex) {

-      // TODO be careful here, because some people inherit from DocumentAnnotation

-      if (typeSystem.subsumes(docType, annotation.getType())) {

-        continue;

-      }

-      Annotation clone = (Annotation) casCopier.copyFs(annotation);

-      // change the view/sofa of the new annotation...

-      // see: http://osdir.com/ml/apache.uima.general/2007-09/msg00107.html

-      clone.setFeatureValue(modview.getTypeSystem()

-              .getFeatureByFullName(CAS.FEATURE_FULL_NAME_SOFA), modview.getSofa());

-      final int mappedBegin = map[clone.getBegin()];

-      final int mappedEnd = map[clone.getEnd()];

-      if (mappedBegin < mappedEnd) {

-        if (mappedEnd > fromJcas.getCas().getDocumentAnnotation().getEnd()) {

-          getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");

-        } else {

-          int max = modview.getCas().getDocumentAnnotation().getEnd();

-          if (mappedBegin < max && mappedEnd <= max && mappedBegin >= 0 && mappedEnd > 0) {

-            clone.setBegin(mappedBegin);

-            clone.setEnd(mappedEnd);

-            // TODO handle nested annotation features

-            modview.addFsToIndexes(clone);

-            indexedFs.add(clone);

-          } else {

-            getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");

-          }

-        }

-      } else if (expandOffsets) {

-        clone.setBegin(mappedBegin);

-        clone.setEnd(mappedEnd);

-        toExpand.add(clone);

-      }

-    }

-

-    for (Annotation each : toExpand) {

-      Annotation nextBestAnnotation = getNextBestAnnotation(each, modview);

-      if (nextBestAnnotation != null) {

-        each.setBegin(nextBestAnnotation.getBegin());

-        each.setEnd(nextBestAnnotation.getEnd());

-        Feature expandedOffsetsFeature = each.getType().getFeatureByBaseName("expandedOffsets");

-        if (expandedOffsetsFeature != null) {

-          each.setBooleanValue(expandedOffsetsFeature, true);

-        }

-        modview.addFsToIndexes(each);

-      }

-    }

-  }

-

-  private Annotation getNextBestAnnotation(Annotation source, JCas jcas) {

-

-    FSIterator<Annotation> iterator = jcas.getAnnotationIndex().iterator(source);

-    Annotation best = null;

-    if (iterator.isValid()) {

-      Annotation annotation = iterator.get();

-      best = annotation;

-    } else {

-      Annotation dummy = new Annotation(jcas, source.getBegin(), source.getBegin() + 1);

-      iterator = jcas.getAnnotationIndex().iterator(dummy);

-      if (!iterator.isValid()) {

-        if ((jcas.getDocumentText().length() / 2) > source.getBegin()) {

-          iterator.moveToFirst();

-          if (iterator.isValid()) {

-            Annotation annotation = iterator.get();

-            best = annotation;

-          }

-        } else {

-          iterator.moveToLast();

-          if (iterator.isValid()) {

-            Annotation annotation = iterator.get();

-            best = annotation;

-          }

-        }

-      }

-    }

-

-    return best;

-  }

-

-  private SortedSet<HtmlConverterPSpan> handleLinebreaksInDocumentText(

-          SortedSet<HtmlConverterPSpan> visibleSpansSoFar, String splitSeq) {

-    return this.handleConversion(visibleSpansSoFar, splitSeq, linebreakReplacement);

-  }

-

-  private SortedSet<HtmlConverterPSpan> htmlDecoding(SortedSet<HtmlConverterPSpan> visibleSpansSoFar) {

-    TreeSet<HtmlConverterPSpan> copy = new TreeSet<HtmlConverterPSpan>(visibleSpansSoFar);

-

-    Pattern patt = Pattern.compile("(&[a-zA-Z0-9]{2,6};)|(&#\\d{2,5};)");

-

-    for (HtmlConverterPSpan pSpan : visibleSpansSoFar) {

-      String spanTxt = pSpan.getTxt();

-      Matcher matcher = patt.matcher(spanTxt);

-

-      if (matcher.find()) {

-        copy.remove(pSpan);

-        int pSpanBegin = pSpan.getBegin();

-        int ioff = pSpan.getBegin();

-        do {

-          String sourceString = matcher.group();

-          String replacement = StringEscapeUtils.unescapeHtml4(sourceString);

-          HtmlConverterPSpanReplacement replacementSpan = new HtmlConverterPSpanReplacement(

-                  pSpanBegin + matcher.start(), pSpanBegin + matcher.end(), replacement);

-          copy.add(replacementSpan);

-

-          int replacementLength = sourceString.length();

-          if (pSpanBegin + matcher.end() > ioff + replacementLength) {

-            int ib = ioff;

-            int ie = pSpanBegin + matcher.start();

-            String newTxt = spanTxt.substring(ib - pSpanBegin, ie - pSpanBegin);

-            copy.add(new HtmlConverterPSpan(ib, ie, newTxt));

-            ioff = ie;

-          }

-          ioff += replacementLength; //

-        } while (matcher.find());

-        if (ioff < pSpan.getEnd()) {

-          int ib = ioff;

-          int ie = pSpan.getEnd();

-          String newTxt = spanTxt.substring(ib - pSpanBegin, ie - pSpanBegin);

-          copy.add(new HtmlConverterPSpan(ioff, pSpan.getEnd(), newTxt));

-        }

-      }

-    }

-    return copy;

-  }

-

-  private SortedSet<HtmlConverterPSpan> handleConversion(

-          SortedSet<HtmlConverterPSpan> visibleSpansSoFar, String patternString, String replacement) {

-    TreeSet<HtmlConverterPSpan> copy = new TreeSet<HtmlConverterPSpan>(visibleSpansSoFar);

-

-    Pattern patt = Pattern.compile(patternString);

-    int replacementLength = patternString.length();

-

-    for (HtmlConverterPSpan pSpan : visibleSpansSoFar) {

-      String spanTxt = pSpan.getTxt();

-      Matcher matcher = patt.matcher(spanTxt);

-

-      if (matcher.find()) {

-        copy.remove(pSpan);

-        int pSpanBegin = pSpan.getBegin();

-        int ioff = pSpan.getBegin();

-        do {

-          if (!StringUtils.isEmpty(replacement)) {

-            HtmlConverterPSpanReplacement replacementSpan = new HtmlConverterPSpanReplacement(

-                    pSpanBegin + matcher.start(), pSpanBegin + matcher.end(), replacement);

-            copy.add(replacementSpan);

-          }

-          if (pSpanBegin + matcher.end() > ioff + replacementLength) {

-            int ib = ioff;

-            int ie = pSpanBegin + matcher.start();

-            String newTxt = spanTxt.substring(ib - pSpanBegin, ie - pSpanBegin);

-            copy.add(new HtmlConverterPSpan(ib, ie, newTxt));

-            ioff = ie;

-          }

-          ioff += replacementLength; //

-        } while (matcher.find());

-        if (ioff < pSpan.getEnd()) {

-          int ib = ioff;

-          int ie = pSpan.getEnd();

-          String newTxt = spanTxt.substring(ib - pSpanBegin, ie - pSpanBegin);

-          copy.add(new HtmlConverterPSpan(ioff, pSpan.getEnd(), newTxt));

-        }

-      }

-    }

-    return copy;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterPSpan.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterPSpan.java
deleted file mode 100644
index d22c048..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterPSpan.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*

- * 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.ruta.engine;

-

-public class HtmlConverterPSpan implements Comparable<HtmlConverterPSpan> {

-  private int begin;

-

-  private int end;

-

-  private String txt;

-

-  public HtmlConverterPSpan(int begin, int end, String txt) {

-    super();

-    this.begin = begin;

-    this.end = end;

-    this.txt = txt;

-  }

-

-  public String getTxt() {

-    return txt;

-  }

-

-  public int getLength() {

-    return this.end - this.begin;

-  }

-

-  public int getBegin() {

-    return begin;

-  }

-

-  public int getEnd() {

-    return end;

-  }

-

-  public int compareTo(HtmlConverterPSpan o) {

-    if (this.begin == o.begin) {

-      if (this.end == o.end) {

-        return 0;

-      }

-      return this.end < o.end ? -1 : +1;

-    }

-    return this.begin < o.end ? -1 : +1;

-  }

-

-  @Override

-  public int hashCode() {

-    final int prime = 31;

-    int result = 1;

-    result = prime * result + begin;

-    result = prime * result + end;

-    return result;

-  }

-

-  @Override

-  public boolean equals(Object obj) {

-    if (this == obj)

-      return true;

-    if (obj == null)

-      return false;

-    if (getClass() != obj.getClass())

-      return false;

-    HtmlConverterPSpan other = (HtmlConverterPSpan) obj;

-    if (begin != other.begin)

-      return false;

-    if (end != other.end)

-      return false;

-    return true;

-  }

-

-  @Override

-  public String toString() {

-    String shortTxt = this.txt.length() > 100 ? this.txt.substring(0, 100) + "..." : this.txt;

-    return String.format("[%d-%d : %s]", begin, end, shortTxt);

-  }

-}
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterPSpanReplacement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterPSpanReplacement.java
deleted file mode 100644
index 63ee1d8..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterPSpanReplacement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*

- * 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.ruta.engine;

-

-public class HtmlConverterPSpanReplacement extends HtmlConverterPSpan {

-

-  public HtmlConverterPSpanReplacement(int begin, int end, String txt) {

-    super(begin, end, txt);

-  }

-}
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterVisitor.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterVisitor.java
deleted file mode 100644
index 2620c24..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverterVisitor.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.util.Arrays;

-import java.util.Collection;

-import java.util.List;

-import java.util.SortedSet;

-import java.util.TreeSet;

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import org.apache.commons.lang3.StringUtils;

-import org.htmlparser.Tag;

-import org.htmlparser.Text;

-import org.htmlparser.tags.ScriptTag;

-import org.htmlparser.visitors.TextExtractingVisitor;

-

-public class HtmlConverterVisitor extends TextExtractingVisitor {

-

-  private boolean inBody = false;

-

-  private boolean inScript = false;

-

-  private boolean skipWhitespace = true;

-

-  private SortedSet<HtmlConverterPSpan> textSpans = new TreeSet<HtmlConverterPSpan>();

-

-  private SortedSet<HtmlConverterPSpan> linebreaksFromHtmlTags = new TreeSet<HtmlConverterPSpan>();

-

-  private SortedSet<HtmlConverterPSpan> gapsFromHtmlTags = new TreeSet<HtmlConverterPSpan>();

-

-  private Collection<String> newlineInducingTags;

-

-  private boolean processAll = true;

-

-  private List<String> gapInducingTags;

-

-  private String gapText;

-

-  private Pattern newlineInducingTagPattern;

-

-  public HtmlConverterVisitor(String[] newlineInducingTags, String newlineInducingTagRegExp,

-          String[] gapInducingTags, String gapText, boolean skipWhitespace, boolean processAll) {

-    if (newlineInducingTags != null) {

-      this.newlineInducingTags = Arrays.asList(newlineInducingTags);

-    }

-    if (gapInducingTags != null) {

-      this.gapInducingTags = Arrays.asList(gapInducingTags);

-    }

-    this.gapText = gapText;

-    this.skipWhitespace = skipWhitespace;

-    this.processAll = processAll;

-    if (newlineInducingTagRegExp != null) {

-      newlineInducingTagPattern = Pattern.compile(newlineInducingTagRegExp);

-    }

-  }

-

-  @Override

-  public void visitStringNode(Text node) {

-    super.visitStringNode(node);

-    if ((processAll || this.inBody) && !this.inScript

-            && (!skipWhitespace || !StringUtils.isBlank(node.getText()))) {

-      int from = node.getStartPosition();

-      int to = node.getEndPosition();

-      textSpans.add(new HtmlConverterPSpan(from, to, node.getText()));

-    }

-  }

-

-  @Override

-  public void visitTag(Tag tag) {

-    super.visitTag(tag);

-    String trimmedTagnameLowercase = tag.getTagName().toLowerCase().trim();

-    if (trimmedTagnameLowercase.equals("body")) {

-      inBody = true;

-    } else if (trimmedTagnameLowercase.equals("script")) {

-      inScript = true;

-    }

-    boolean matchedByPattern = false;

-    if (newlineInducingTagPattern != null) {

-      Matcher matcher = newlineInducingTagPattern.matcher(trimmedTagnameLowercase);

-      if (matcher.matches()) {

-        matchedByPattern = true;

-      }

-    }

-    if (matchedByPattern

-            || (newlineInducingTags != null && newlineInducingTags

-                    .contains(trimmedTagnameLowercase))) {

-      int begin = tag.getStartPosition();

-      linebreaksFromHtmlTags.add(new HtmlConverterPSpanReplacement(begin, begin + 1,

-              HtmlConverter.LINEBREAK));

-    }

-    if (gapInducingTags != null && gapInducingTags.contains(trimmedTagnameLowercase)) {

-      int begin = tag.getStartPosition();

-      gapsFromHtmlTags.add(new HtmlConverterPSpanReplacement(begin, begin + gapText.length(),

-              gapText));

-    }

-  }

-

-  @Override

-  public void visitEndTag(Tag tag) {

-    String tagname = tag.getTagName().toLowerCase().trim();

-    if (tagname.equals("body")) {

-      this.inBody = false;

-    } else if (tagname.equals("script") || tag instanceof ScriptTag) {

-      this.inScript = false;

-    }

-  }

-

-  public SortedSet<HtmlConverterPSpan> getTextSpans() {

-    return textSpans;

-  }

-

-  public SortedSet<HtmlConverterPSpan> getLinebreaksFromHtmlTags() {

-    return linebreaksFromHtmlTags;

-  }

-

-  public SortedSet<HtmlConverterPSpan> getGapsFromHtmlTags() {

-    return gapsFromHtmlTags;

-  }

-}
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlVisitor.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlVisitor.java
deleted file mode 100644
index dca17d4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlVisitor.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.util.ArrayList;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.cas.StringArray;

-import org.htmlparser.Attribute;

-import org.htmlparser.Node;

-import org.htmlparser.Remark;

-import org.htmlparser.Tag;

-import org.htmlparser.visitors.NodeVisitor;

-

-public class HtmlVisitor extends NodeVisitor {

-

-  private CAS cas;

-

-  private List<AnnotationFS> annotations = new ArrayList<AnnotationFS>();

-

-  private LinkedList<AnnotationFS> annotationStack = new LinkedList<AnnotationFS>();

-

-  private JCas jcas;

-

-  private boolean onlyContent;

-

-  public HtmlVisitor(JCas jcas, boolean onlyContent) {

-    super();

-    this.jcas = jcas;

-    this.cas = jcas.getCas();

-    this.onlyContent = onlyContent;

-  }

-

-  public void visitTag(Tag tag) {

-    String name = getName(tag);

-    Type type = getType(name, cas);

-    boolean tagClosed = isTagClosed(tag);

-    boolean tagStillOpen = false;

-    int begin = getBeginOffset(tag);

-    int end = begin;

-    if (tagClosed) {

-      end = getEndOffset(tag);

-    } else {

-      Tag endTag = tag.getEndTag();

-      if (endTag != null) {

-        end = getEndOffset(endTag);

-      } else {

-        end = getEndOffset(tag);

-        tagStillOpen = true;

-      }

-    }

-    AnnotationFS annotation = cas.createAnnotation(type, begin, end);

-    processAttributes(annotation, tag);

-    Feature nameFeature = annotation.getType().getFeatureByBaseName("name");

-    annotation.setStringValue(nameFeature, name);

-    if (tagStillOpen) {

-      annotationStack.add(annotation);

-    } else {

-      annotations.add(annotation);

-    }

-  }

-

-  public void visitRemarkNode(Remark node) {

-    Type type = getType("REMARK", cas);

-    int begin = getBeginOffset(node);

-    int end = getEndOffset(node);

-    AnnotationFS annotation = cas.createAnnotation(type, begin, end);

-    Feature feature = type.getFeatureByBaseName("comment");

-    annotation.setStringValue(feature, node.getText());

-    annotations.add(annotation);

-  }

-

-  public void visitEndTag(Tag tag) {

-    String name = getName(tag);

-    AnnotationFS found = null;

-    for (int i = annotationStack.size() - 1; i >= 0; i--) {

-      AnnotationFS each = (AnnotationFS) annotationStack.get(i);

-      Feature nameFeature = each.getType().getFeatureByBaseName("name");

-      String eachName = each.getStringValue(nameFeature);

-      if (name.equals(eachName)) {

-        int endOffset = getEndOffset(tag);

-        Feature endFeature = each.getType().getFeatureByBaseName("end");

-        each.setIntValue(endFeature, endOffset);

-        found = each;

-        break;

-      }

-    }

-    if (found != null) {

-      annotationStack.remove(found);

-      annotations.add(found);

-    }

-

-  }

-

-  private boolean isTagClosed(Tag tag) {

-    return tag.getRawTagName().endsWith("/");

-  }

-

-  private String getName(Tag tag) {

-    String result = tag.getRawTagName().toUpperCase();

-    if (result.endsWith("/")) {

-      result = result.substring(0, result.length() - 1);

-    }

-    if (result.startsWith("/")) {

-      result = result.substring(1);

-    }

-    return result;

-  }

-

-  private Type getType(String name, CAS cas) {

-    String typeName = HtmlAnnotator.NAMESPACE + name;

-    Type type = cas.getTypeSystem().getType(typeName);

-    if (type == null) {

-      type = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "TAG");

-    }

-    return type;

-  }

-

-  private int getBeginOffset(Node tag) {

-    if (onlyContent) {

-      return tag.getEndPosition();

-    } else {

-      return tag.getStartPosition();

-    }

-

-  }

-

-  private int getEndOffset(Node tag) {

-    if (onlyContent) {

-      return tag.getStartPosition();

-    } else {

-      return tag.getEndPosition();

-    }

-  }

-

-  private void processAttributes(AnnotationFS annotation, Tag tag) {

-    int size = tag.getAttributesEx().size() - 1;

-    StringArray attributeName = new StringArray(jcas, size);

-    StringArray attributeValue = new StringArray(jcas, size);

-    for (int i = 0; i < size; i++) {

-      Attribute attribute = (Attribute) tag.getAttributesEx().elementAt(i + 1);

-      attributeName.set(i, attribute.getName());

-      attributeValue.set(i, attribute.getValue());

-    }

-    Feature feature1 = annotation.getType().getFeatureByBaseName("attributeName");

-    annotation.setFeatureValue(feature1, attributeName);

-    Feature feature2 = annotation.getType().getFeatureByBaseName("attributeValue");

-    annotation.setFeatureValue(feature2, attributeValue);

-  }

-

-  public List<AnnotationFS> getAnnotations() {

-    return annotations;

-  }

-

-  public LinkedList<AnnotationFS> getAnnotationStack() {

-    return annotationStack;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/PlainTextAnnotator.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/PlainTextAnnotator.java
deleted file mode 100644
index 610acbb..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/PlainTextAnnotator.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.BufferedReader;

-import java.io.IOException;

-import java.io.StringReader;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.analysis_component.JCasAnnotator_ImplBase;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-

-public class PlainTextAnnotator extends JCasAnnotator_ImplBase {

-

-  public static final String TYPE_LINE = "org.apache.uima.ruta.type.Line";

-

-  public static final String TYPE_WSLINE = "org.apache.uima.ruta.type.WSLine";

-  

-  public static final String TYPE_EMPTYLINE = "org.apache.uima.ruta.type.EmptyLine";

-

-  public static final String TYPE_PARAGRAPH = "org.apache.uima.ruta.type.Paragraph";

-

-  @Override

-  public void process(JCas jcas) throws AnalysisEngineProcessException {

-    CAS cas = jcas.getCas();

-    String documentText = cas.getDocumentText();

-    BufferedReader br = new BufferedReader(new StringReader(documentText));

-    Type lineType = cas.getTypeSystem().getType(TYPE_LINE);

-    Type wsLineType = cas.getTypeSystem().getType(TYPE_WSLINE);

-    Type emptyLineType = cas.getTypeSystem().getType(TYPE_EMPTYLINE);

-    Type paragraphType = cas.getTypeSystem().getType(TYPE_PARAGRAPH);

-

-    int offsetTillNow = 0;

-    int paragraphBegin = -1;

-    int lastLineEnd = 0;

-

-    boolean lastWasEmpty = true;

-    String eachLine = null;

-    try {

-      while ((eachLine = br.readLine()) != null) {

-        boolean wsLine = StringUtils.isBlank(eachLine);

-        if(!wsLine && StringUtils.isBlank(eachLine.trim().replaceAll("\u00A0|\u202F|\uFEFF|\u2007|\u180E", ""))) {

-          // HOTFIX for NBSPs

-          wsLine = true;

-        }

-        boolean emptyLine = StringUtils.isEmpty(eachLine);

-        int offsetAfterLine = offsetTillNow + eachLine.length();

-        int nlLength = 1;

-        if (documentText.length() >= offsetAfterLine + 2) {

-          String substring = documentText.substring(offsetAfterLine, offsetAfterLine + 2);

-          if (substring.equals("\r\n")) {

-            nlLength = 2;

-          }

-        }

-        if (lastWasEmpty && !wsLine) {

-          paragraphBegin = offsetTillNow;

-        }

-

-        if (wsLine && emptyLine) {

-          // do not create annotation with length 0

-          // instead append the line break to the annotation

-          AnnotationFS newEmptyLineFS = cas.createAnnotation(emptyLineType, offsetTillNow, offsetTillNow

-                  + nlLength);

-          cas.addFsToIndexes(newEmptyLineFS);

-        } else if (wsLine && !emptyLine) {

-          AnnotationFS newWSLineFS = cas.createAnnotation(wsLineType, offsetTillNow, offsetTillNow

-                  + eachLine.length());

-          cas.addFsToIndexes(newWSLineFS);

-        } else if (!emptyLine) {

-          AnnotationFS newLineFS = cas.createAnnotation(lineType, offsetTillNow, offsetTillNow

-                  + eachLine.length());

-          cas.addFsToIndexes(newLineFS);

-

-          lastWasEmpty = false;

-          lastLineEnd = offsetTillNow + eachLine.length();

-        }

-        if (wsLine && !lastWasEmpty && lastLineEnd != 0) {

-          AnnotationFS newParaFS = cas.createAnnotation(paragraphType, paragraphBegin, lastLineEnd);

-          cas.addFsToIndexes(newParaFS);

-        } else if (offsetAfterLine + nlLength == documentText.length()) {

-          AnnotationFS newParaFS = cas.createAnnotation(paragraphType, paragraphBegin,

-                  offsetAfterLine);

-          cas.addFsToIndexes(newParaFS);

-        } else if (offsetAfterLine == documentText.length()) {

-          AnnotationFS newParaFS = cas.createAnnotation(paragraphType, paragraphBegin,

-                  offsetAfterLine);

-          cas.addFsToIndexes(newParaFS);

-        }

-        if (wsLine) {

-          lastWasEmpty = true;

-        }

-        offsetTillNow = offsetTillNow + eachLine.length() + nlLength;

-      }

-    } catch (IOException e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/Ruta.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/Ruta.java
deleted file mode 100644
index caf3135..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/Ruta.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.File;

-import java.io.IOException;

-import java.io.InputStream;

-import java.net.URISyntaxException;

-import java.net.URL;

-import java.nio.charset.Charset;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.commons.io.IOUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.ConfigurationParameterSettings;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-

-public class Ruta {

-

-  public static void apply(CAS cas, String script, Map<String, Object> parameters)

-          throws IOException, InvalidXMLException, ResourceInitializationException,

-          ResourceConfigurationException, AnalysisEngineProcessException, URISyntaxException {

-    String viewName = cas.getViewName();

-    URL aedesc = RutaEngine.class.getResource("BasicEngine.xml");

-    AnalysisEngine ae = wrapAnalysisEngine(aedesc, viewName);

-

-    File scriptFile = File.createTempFile("Ruta", RutaEngine.SCRIPT_FILE_EXTENSION);

-    scriptFile.deleteOnExit();

-    FileUtils.saveString2File(script, scriptFile);

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { scriptFile.getParentFile()

-            .getAbsolutePath() });

-    String name = scriptFile.getName().substring(0, scriptFile.getName().length() - 5);

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-    if (parameters != null) {

-      for (Map.Entry<String, Object> parameter : parameters.entrySet()) {

-        ae.setConfigParameterValue(parameter.getKey(), parameter.getValue());

-      }

-    }

-    ae.reconfigure();

-    ae.process(cas);

-    scriptFile.delete();

-    ae.destroy();

-  }

-

-  public static void apply(CAS cas, String script) throws IOException, InvalidXMLException,

-          ResourceInitializationException, ResourceConfigurationException,

-          AnalysisEngineProcessException, URISyntaxException {

-    apply(cas, script, null);

-  }

-

-  public static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName)

-          throws ResourceInitializationException, ResourceConfigurationException,

-          InvalidXMLException, IOException, URISyntaxException {

-    return wrapAnalysisEngine(descriptorUrl, viewName, false, Charset.defaultCharset().name());

-  }

-

-  public static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName,

-          boolean rutaEngine, String encoding) throws ResourceInitializationException,

-          ResourceConfigurationException, InvalidXMLException, IOException, URISyntaxException {

-    if (viewName.equals(CAS.NAME_DEFAULT_SOFA)) {

-      XMLInputSource in = new XMLInputSource(descriptorUrl);

-      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-      AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-      return ae;

-    } else {

-      InputStream inputStream = null;

-      if (rutaEngine) {

-        inputStream = Ruta.class.getResourceAsStream("AAEDBasicEngine.xml");

-      } else {

-        inputStream = Ruta.class.getResourceAsStream("AAED.xml");

-      }

-      String aaedString = IOUtils.toString(inputStream, encoding);

-      String absolutePath = descriptorUrl.toExternalForm();

-      aaedString = aaedString.replaceAll("\\$\\{sofaName\\}", viewName);

-      aaedString = aaedString.replaceAll("\\$\\{descriptorLocation\\}", absolutePath);

-      File tempFile = File.createTempFile("RutaAAED", ".xml");

-      FileUtils.saveString2File(aaedString, tempFile);

-      XMLInputSource in = new XMLInputSource(tempFile);

-      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-      AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-      tempFile.delete();

-      return ae;

-    }

-  }

-

-  public static AnalysisEngineDescription createAnalysisEngineDescription(String script)

-          throws IOException, InvalidXMLException, ResourceInitializationException {

-    return createAnalysisEngineDescription(script, (TypeSystemDescription[]) null);

-  }

-

-  public static AnalysisEngineDescription createAnalysisEngineDescription(String script,

-          TypeSystemDescription... tsds) throws IOException, InvalidXMLException,

-          ResourceInitializationException {

-    File scriptFile = File.createTempFile("Ruta", RutaEngine.SCRIPT_FILE_EXTENSION);

-    scriptFile.deleteOnExit();

-    if (!script.startsWith("PACKAGE")) {

-      script = "PACKAGE org.apache.uima.ruta;\n" + script;

-    }

-    FileUtils.saveString2File(script, scriptFile);

-    URL url = RutaEngine.class.getResource("BasicEngine.xml");

-    XMLInputSource in = new XMLInputSource(url);

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) UIMAFramework.getXMLParser()

-            .parseResourceSpecifier(in);

-    AnalysisEngineMetaData metaData = aed.getAnalysisEngineMetaData();

-    ConfigurationParameterSettings settings = metaData.getConfigurationParameterSettings();

-    settings.setParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { scriptFile.getParentFile()

-            .getAbsolutePath() });

-    String name = scriptFile.getName().substring(0, scriptFile.getName().length() - 5);

-    settings.setParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-    if (tsds != null) {

-      List<TypeSystemDescription> tsdList = new ArrayList<TypeSystemDescription>();

-      tsdList.add(metaData.getTypeSystem());

-      tsdList.addAll(Arrays.asList(tsds));

-      TypeSystemDescription typeSystemDescription = CasCreationUtils.mergeTypeSystems(tsdList);

-      metaData.setTypeSystem(typeSystemDescription);

-    }

-    return aed;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaCutter.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaCutter.java
deleted file mode 100644
index 0ad1154..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaCutter.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.Set;

-import java.util.SortedSet;

-import java.util.TreeSet;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.util.CasCopier;

-import org.apache.uima.util.Level;

-

-/**

- * This Analysis Engine is able to cut the document of the CAS. Only the text covered by annotations

- * of the specified type will be retained and all other parts of the documents will be removed. The

- * offsets of annotations in the index will be updated, but not feature structures nested as feature

- * values.

- * 

- */

-public class RutaCutter extends JCasAnnotator_ImplBase {

-

-  /**

-   * The name of the view, which will contain the modified CAS. The default value is

-   * <code>cutted</code>.

-   */

-  public static final String PARAM_OUTPUT_VIEW = "outputView";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT_VIEW, mandatory = false, defaultValue = "cutted")

-  private String outputViewName;

-

-  /**

-   * The name of the view that should be processed. The default value is <code>_InitialView</code>.

-   */

-  public static final String PARAM_INPUT_VIEW = "inputView";

-

-  @ConfigurationParameter(name = PARAM_INPUT_VIEW, mandatory = false, defaultValue = "_InitialView")

-  private String inputViewName;

-

-  /**

-   * This string parameter specifies the complete name of a type. Only the text covered by

-   * annotations of this type will be retained and all other parts of the documents will be removed.

-   */

-  public static final String PARAM_KEEP = "keep";

-

-  @ConfigurationParameter(name = PARAM_KEEP, mandatory = false, defaultValue = "_InitialView")

-  private String keep;

-

-  private static final String DEFAULT_OUTPUT_VIEW = "cutted";

-

-  private static final String DEFAULT_INPUT_VIEW = "_InitialView";

-

-  private int[] map;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    inputViewName = (String) aContext.getConfigParameterValue(PARAM_INPUT_VIEW);

-    inputViewName = StringUtils.isBlank(inputViewName) ? DEFAULT_INPUT_VIEW : inputViewName;

-    outputViewName = (String) aContext.getConfigParameterValue(PARAM_OUTPUT_VIEW);

-    outputViewName = StringUtils.isBlank(outputViewName) ? DEFAULT_OUTPUT_VIEW : outputViewName;

-    keep = (String) aContext.getConfigParameterValue(PARAM_KEEP);

-  }

-

-  @Override

-  public void process(JCas jcaz) throws AnalysisEngineProcessException {

-    JCas jcas;

-    try {

-      if (inputViewName != null) {

-        jcas = jcaz.getView(inputViewName);

-      } else {

-        jcas = jcaz;

-      }

-    } catch (CASException e1) {

-      throw new AnalysisEngineProcessException(e1.getCause());

-    }

-    // init:

-    String documentText = jcas.getDocumentText();

-    map = new int[documentText.length() + 1];

-    JCas modview = null;

-    try {

-      // check if view already exists:

-      Iterator<JCas> viewIterator = jcas.getViewIterator();

-      while (viewIterator.hasNext()) {

-        JCas jCas2 = (JCas) viewIterator.next();

-        if (jCas2.getViewName().equals(outputViewName)) {

-          modview = jCas2;

-          getContext().getLogger().log(Level.WARNING,

-                  "view with name \"" + outputViewName + "\" already exists.");

-        }

-      }

-      if (modview == null) {

-        modview = jcas.createView(outputViewName);

-      }

-    } catch (CASException e) {

-      e.printStackTrace();

-      return;

-    }

-    SortedSet<HtmlConverterPSpan> visibleSpansSoFar = new TreeSet<HtmlConverterPSpan>();

-

-    // process

-

-    TypeSystem typeSystem = jcas.getTypeSystem();

-    Type keepType = typeSystem.getType(keep);

-    if (keepType == null) {

-      Iterator<Type> typeIterator = typeSystem.getTypeIterator();

-      while (typeIterator.hasNext()) {

-        Type type = (Type) typeIterator.next();

-        String shortName = type.getShortName();

-        if (shortName.equals(keep)) {

-          keepType = type;

-          break;

-        }

-      }

-      if (keepType == null) {

-        getContext().getLogger().log(Level.WARNING, "Type \"" + keep + "\" not defined.");

-        return;

-      }

-    }

-    AnnotationIndex<AnnotationFS> annotationIndex = jcas.getCas().getAnnotationIndex(keepType);

-    for (AnnotationFS each : annotationIndex) {

-      visibleSpansSoFar.add(new HtmlConverterPSpan(each.getBegin(), each.getEnd(), each

-              .getCoveredText()));

-    }

-

-    // create new doc-text and the map from deletions and visible-text-spans:

-    StringBuffer sbu = new StringBuffer(documentText.length());

-    int originalOffsetI = 0;

-    int outOffset = 0;

-    for (HtmlConverterPSpan vis : visibleSpansSoFar) {

-      final int begin = vis.getBegin();

-      final int end = vis.getEnd();

-

-      // map text before annotation:

-      while (originalOffsetI < begin) {

-        map[originalOffsetI++] = outOffset;

-      }

-

-      // get and map text/replacement:

-      String s = "";

-      if (vis instanceof HtmlConverterPSpanReplacement) {

-        // conversion/replacement:

-        s = vis.getTxt();

-        // asserts that s is shorter than the original source

-        while (originalOffsetI < begin + s.length()) {

-          map[originalOffsetI++] = outOffset++;

-        }

-        while (originalOffsetI < end) {

-          map[originalOffsetI++] = outOffset;

-        }

-      } else {

-        // simple annotation:

-        s = documentText.substring(begin, end);

-        while (originalOffsetI < end) {

-          map[originalOffsetI++] = outOffset++;

-        }

-      }

-      sbu.append(s);

-    }

-    while (originalOffsetI < documentText.length()) {

-      map[originalOffsetI++] = outOffset;

-    }

-    map[documentText.length()] = outOffset + 1; // handle doc end separately

-    String modTxt = sbu.toString();

-    modview.setDocumentText(modTxt);

-

-    // copy annotations using the 'map':

-    try {

-      mapAnnotations(jcas, map, outputViewName);

-    } catch (CASException e) {

-      e.printStackTrace();

-    }

-  }

-

-  private void mapAnnotations(JCas fromJcas, int[] map, String toView) throws CASException {

-    JCas modview = fromJcas.getView(toView);

-

-    Set<Annotation> indexedFs = new HashSet<Annotation>();

-    AnnotationIndex<Annotation> annotationIndex = fromJcas.getAnnotationIndex();

-

-    TypeSystem typeSystem = fromJcas.getTypeSystem();

-    Type docType = typeSystem.getType(UIMAConstants.TYPE_DOCUMENT);

-    CasCopier casCopier = new CasCopier(fromJcas.getCas(), modview.getCas());

-    for (Annotation annotation : annotationIndex) {

-      if (typeSystem.subsumes(docType, annotation.getType())) {

-        continue;

-      }

-      Annotation clone = (Annotation) casCopier.copyFs(annotation);

-      // change the view/sofa of the new annotation...

-      // see: http://osdir.com/ml/apache.uima.general/2007-09/msg00107.html

-      clone.setFeatureValue(modview.getTypeSystem()

-              .getFeatureByFullName(CAS.FEATURE_FULL_NAME_SOFA), modview.getSofa());

-      final int mappedBegin = map[clone.getBegin()];

-      final int mappedEnd = map[clone.getEnd()];

-      if (mappedBegin < mappedEnd) {

-        if (mappedEnd > fromJcas.getCas().getDocumentAnnotation().getEnd()) {

-          getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");

-        } else {

-          int max = modview.getCas().getDocumentAnnotation().getEnd();

-          if (mappedBegin < max && mappedEnd <= max && mappedBegin >= 0 && mappedEnd > 0) {

-            clone.setBegin(mappedBegin);

-            clone.setEnd(mappedEnd);

-            // TODO handle nested annotation features

-            modview.addFsToIndexes(clone);

-            indexedFs.add(clone);

-          } else {

-            getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");

-          }

-        }

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
deleted file mode 100644
index 2ee901d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
+++ /dev/null
@@ -1,1131 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.File;

-import java.io.FileNotFoundException;

-import java.io.IOException;

-import java.io.InputStream;

-import java.net.MalformedURLException;

-import java.net.URISyntaxException;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import org.antlr.runtime.ANTLRFileStream;

-import org.antlr.runtime.ANTLRInputStream;

-import org.antlr.runtime.ANTLRStringStream;

-import org.antlr.runtime.CharStream;

-import org.antlr.runtime.CommonTokenStream;

-import org.antlr.runtime.RecognitionException;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_component.AnalysisComponent;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.fit.factory.AnalysisEngineFactory;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.ruta.FilterManager;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaModule;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.extensions.IEngineLoader;

-import org.apache.uima.ruta.extensions.IRutaExtension;

-import org.apache.uima.ruta.extensions.RutaEngineLoader;

-import org.apache.uima.ruta.extensions.RutaExternalFactory;

-import org.apache.uima.ruta.parser.RutaLexer;

-import org.apache.uima.ruta.parser.RutaParser;

-import org.apache.uima.ruta.seed.RutaAnnotationSeeder;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-import org.apache.uima.ruta.visitor.CreatedByVisitor;

-import org.apache.uima.ruta.visitor.DebugInfoCollectorVisitor;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-import org.apache.uima.ruta.visitor.RutaInferenceVisitor;

-import org.apache.uima.ruta.visitor.StatisticsVisitor;

-import org.apache.uima.ruta.visitor.TimeProfilerVisitor;

-import org.apache.uima.util.InvalidXMLException;

-

-public class RutaEngine extends JCasAnnotator_ImplBase {

-

-  public static final String SCRIPT_FILE_EXTENSION = ".ruta";

-

-  public static final String SOURCE_DOCUMENT_INFORMATION = "org.apache.uima.examples.SourceDocumentInformation";

-

-  public static final String BASIC_TYPE = "org.apache.uima.ruta.type.RutaBasic";

-

-  public static final String OPTIONAL_TYPE = "org.apache.uima.ruta.type.RutaOptional";

-

-  public static final String FRAME_TYPE = "org.apache.uima.ruta.type.RutaFrame";

-

-  

-  /**

-   * A String parameter representing the rule that should be applied by the analysis engine.

-   * If set, it replaces the content of file specified by the {@code mainScript} parameter.

-   */

-  public static final String PARAM_RULES = "rules";

-

-  @ConfigurationParameter(name = PARAM_RULES, mandatory = false)

-  private String rules;

-  

-  /**

-   * Load script in Java notation, with "{@code .}" as package separator and no extension. File

-   * needs to be located in the path specified below with ending {@code .ruta}.

-   */

-  public static final String PARAM_MAIN_SCRIPT = "mainScript";

-

-  @ConfigurationParameter(name = PARAM_MAIN_SCRIPT, mandatory = false)

-  private String mainScipt;

-

-  /**

-   * This parameter specifies the encoding of the rule files. Its default value is "UTF-8".

-   */

-  public static final String PARAM_SCRIPT_ENCODING = "scriptEncoding";

-

-  @ConfigurationParameter(name = PARAM_SCRIPT_ENCODING, mandatory = false, defaultValue = "UTF-8")

-  private String scriptEncoding;

-

-  /**

-   * The parameter scriptPaths refers to a list of String values, which specify the possible

-   * locations of script files. The given locations are absolute paths. A typical value for this

-   * parameter is, for example, "C:/Ruta/MyProject/script/". If the parameter mainScript is set to

-   * org.apache.uima.Main, then the absolute path of the script file has to be

-   * "C:/Ruta/MyProject/script/org/apache/uima/Main.ruta". This parameter can contain multiple

-   * values, as the main script can refer to multiple projects similar to a class path in Java.

-   */

-  public static final String PARAM_SCRIPT_PATHS = "scriptPaths";

-

-  @ConfigurationParameter(name = PARAM_SCRIPT_PATHS, mandatory = false)

-  private String[] scriptPaths;

-

-  /**

-   * This parameter specifies the possible locations for descriptors like analysis engines or type

-   * systems, similar to the parameter scriptPaths for the script files. A typical value for this

-   * parameter is for example "C:/Ruta/MyProject/descriptor/". The relative values of the parameter

-   * additionalEngines are resolved to these absolute locations. This parameter can contain multiple

-   * values, as the main script can refer to multiple projects similar to a class path in Java.

-   */

-  public static final String PARAM_DESCRIPTOR_PATHS = "descriptorPaths";

-

-  @ConfigurationParameter(name = PARAM_DESCRIPTOR_PATHS, mandatory = false, defaultValue = {})

-  private String[] descriptorPaths;

-

-  /**

-   * This parameter specifies the possible locations of additional resources like word lists or CSV

-   * tables. The string values have to contain absolute locations, for example,

-   * "C:/Ruta/MyProject/resources/".

-   */

-  public static final String PARAM_RESOURCE_PATHS = "resourcePaths";

-

-  @ConfigurationParameter(name = PARAM_RESOURCE_PATHS, mandatory = false, defaultValue = {})

-  private String[] resourcePaths;

-

-  /**

-   * The parameter additionalScripts is defined as a list of string values and contains script

-   * files, which are additionally loaded by the analysis engine. These script files are specified

-   * by their complete namespace, exactly like the value of the parameter mainScript and can be

-   * refered to by language elements, e.g., by executing the containing rules. An exemplary value of

-   * this parameter is "org.apache.uima.SecondaryScript". In this example, the main script could

-   * import this script file by the declaration "SCRIPT org.apache.uima.SecondaryScript;" and then

-   * could execute it with the rule "CALL(SecondaryScript);".

-   */

-  public static final String PARAM_ADDITIONAL_SCRIPTS = "additionalScripts";

-

-  @ConfigurationParameter(name = PARAM_ADDITIONAL_SCRIPTS, mandatory = false, defaultValue = {})

-  private String[] additionalScripts;

-

-  /**

-   * This parameter contains a list of additional analysis engines, which can be executed by the

-   * UIMA Ruta rules. The single values are given by the name of the analysis engine with their

-   * complete namespace and have to be located relative to one value of the parameter

-   * descriptorPaths, the location where the analysis engine searches for the descriptor file. An

-   * example for one value of the parameter is "utils.HtmlAnnotator", which points to the descriptor

-   * "HtmlAnnotator.xml" in the folder "utils".

-   */

-  public static final String PARAM_ADDITIONAL_ENGINES = "additionalEngines";

-

-  @ConfigurationParameter(name = PARAM_ADDITIONAL_ENGINES, mandatory = false, defaultValue = {})

-  private String[] additionalEngines;

-

-  /**

-   * List of additional uimaFIT analysis engines, which are loaded without descriptor.

-   */

-  public static final String PARAM_ADDITIONAL_UIMAFIT_ENGINES = "additionalUimafitEngines";

-

-  @ConfigurationParameter(name = PARAM_ADDITIONAL_UIMAFIT_ENGINES, mandatory = false, defaultValue = {})

-  private String[] additionalUimafitEngines;

-

-  /**

-   * The parameter "additionalEngineLoaders" specifies a list of optional implementations of the

-   * interface "org.apache.uima.ruta.extensions.IEngineLoader", which can be used to

-   * application-specific configurations of additional analysis engines.

-   */

-  public static final String PARAM_ADDITIONAL_ENGINE_LOADERS = "additionalEngineLoaders";

-

-  @ConfigurationParameter(name = PARAM_ADDITIONAL_ENGINE_LOADERS, mandatory = false, defaultValue = {})

-  private String[] additionalEngineLoaders;

-

-  /**

-   * This parameter specifies optional extensions of the UIMA Ruta language. The elements of the

-   * string list have to implement the interface "org.apache.uima.ruta.extensions.IRutaExtension".

-   * With these extensions, application-specific conditions and actions can be added to the set of

-   * provided ones.

-   */

-  public static final String PARAM_ADDITIONAL_EXTENSIONS = "additionalExtensions";

-

-  @ConfigurationParameter(name = PARAM_ADDITIONAL_EXTENSIONS, mandatory = false, defaultValue = {})

-  private String[] additionalExtensions;

-

-  /**

-   * This boolean parameter indicates whether the script or resource files should be reloaded when

-   * processing a CAS. The default value is set to false. In this case, the script files are loaded

-   * when the analysis engine is initialized. If script files or resource files are extended, e.g.,

-   * a dictionary is filled yet when a collection of documents are processed, then the parameter is

-   * needed to be set to true in order to include the changes.

-   */

-  public static final String PARAM_RELOAD_SCRIPT = "reloadScript";

-

-  @ConfigurationParameter(name = PARAM_RELOAD_SCRIPT, mandatory = false, defaultValue = "false")

-  private Boolean reloadScript;

-

-  /**

-   * This list of string values refers to implementations of the interface

-   * "org.apache.uima.ruta.seed.RutaAnnotationSeeder", which can be used to automatically add

-   * annotations to the CAS. The default value of the parameter is a single seeder, namely

-   * "org.apache.uima.ruta.seed.DefaultSeeder" that adds annotations for token classes like CW,

-   * MARKUP or SEMICOLON. Remember that additional annotations can also be added with an additional

-   * engine that is executed by a UIMA Ruta rule.

-   */

-  public static final String PARAM_SEEDERS = "seeders";

-

-  @ConfigurationParameter(name = PARAM_SEEDERS, mandatory = false, defaultValue = { "org.apache.uima.ruta.seed.DefaultSeeder" })

-  private String[] seeders;

-

-  /**

-   * This parameter specifies a list of types, which are filtered by default when executing a script

-   * file. Using the default values of this parameter, whitespaces, line breaks and markup elements

-   * are not visible to Ruta rules. The visibility of annotations and, therefore, the covered text

-   * can be changed using the actions FILTERTYPE and RETAINTYPE.

-   */

-  public static final String PARAM_DEFAULT_FILTERED_TYPES = "defaultFilteredTypes";

-

-  @ConfigurationParameter(name = PARAM_DEFAULT_FILTERED_TYPES, mandatory = false, defaultValue = {

-      "org.apache.uima.ruta.type.SPACE", "org.apache.uima.ruta.type.BREAK",

-      "org.apache.uima.ruta.type.MARKUP" })

-  private String[] defaultFilteredTypes;

-

-  /**

-   * This parameter specifies whether the inference annotations created by the analysis engine

-   * should be removed after processing the CAS. The default value is set to true.

-   */

-  public static final String PARAM_REMOVE_BASICS = "removeBasics";

-

-  @ConfigurationParameter(name = PARAM_REMOVE_BASICS, mandatory = false, defaultValue = "true")

-  private Boolean removeBasics;

-

-  /**

-   * If this parameter is set to true, then the Ruta rules are not forced to start to match with the

-   * first rule element. Rather, the rule element referring to the most rare type is chosen. This

-   * option can be utilized to optimize the performance. Please mind that the matching result can

-   * vary in some cases when greedy rule elements are applied. The default value is set to false.

-   */

-  public static final String PARAM_DYNAMIC_ANCHORING = "dynamicAnchoring";

-

-  @ConfigurationParameter(name = PARAM_DYNAMIC_ANCHORING, mandatory = false, defaultValue = "false")

-  private Boolean dynamicAnchoring;

-

-  /**

-   * This parameter specifies whether the memory consumption should be reduced. This parameter

-   * should be set to true for very large CAS documents (e.g., &gt; 500k tokens), but it also reduces

-   * the performance. The default value is set to false.

-   */

-  public static final String PARAM_LOW_MEMORY_PROFILE = "lowMemoryProfile";

-

-  @ConfigurationParameter(name = PARAM_LOW_MEMORY_PROFILE, mandatory = false, defaultValue = "false")

-  private Boolean lowMemoryProfile;

-

-  /**

-   * This parameter specifies whether a different inference strategy for composed rule elements

-   * should be applied. This option is only necessary when the composed rule element is expected to

-   * match very often, e.g., a rule element like (ANY ANY)+. The default value of this parameter is

-   * set to false.

-   */

-  public static final String PARAM_SIMPLE_GREEDY_FOR_COMPOSED = "simpleGreedyForComposed";

-

-  @ConfigurationParameter(name = PARAM_SIMPLE_GREEDY_FOR_COMPOSED, mandatory = false, defaultValue = "false")

-  private Boolean simpleGreedyForComposed;

-

-  /**

-   * If this parameter is set to true, then start positions already matched by the same rule element

-   * will be ignored. This situation occurs mostly for rules that start with a quantifier. The

-   * following rule, for example, matches only once, if this parameter is set to true: {@code ANY+;}

-   */

-  public static final String PARAM_GREEDY_RULE_ELEMENT = "greedyRuleElement";

-

-  @ConfigurationParameter(name = PARAM_GREEDY_RULE_ELEMENT, mandatory = false, defaultValue = "false")

-  private Boolean greedyRuleElement = false;

-

-  /**

-   * If this parameter is set to true, then start positions already matched by the rule will be

-   * ignored and only positions not part of an match will be considered.

-   */

-  public static final String PARAM_GREEDY_RULE = "greedyRule";

-

-  @ConfigurationParameter(name = PARAM_GREEDY_RULE, mandatory = false, defaultValue = "false")

-  private Boolean greedyRule = false;

-

-  /**

-   * If this parameter is set to true, then additional information about the execution of a rule

-   * script is added to the CAS. The actual information is specified by the following parameters.

-   * The default value of this parameter is set to false.

-   */

-  public static final String PARAM_DEBUG = "debug";

-

-  @ConfigurationParameter(name = PARAM_DEBUG, mandatory = false, defaultValue = "false")

-  private Boolean debug;

-

-  /**

-   * This parameter specifies whether the match information (covered text) of the rules should be

-   * stored in the CAS. The default value of this parameter is set to false.

-   */

-  public static final String PARAM_DEBUG_WITH_MATCHES = "debugWithMatches";

-

-  @ConfigurationParameter(name = PARAM_DEBUG_WITH_MATCHES, mandatory = false, defaultValue = "false")

-  private Boolean debugWithMatches;

-

-  /**

-   * This parameter specifies a list of rule-ids that enumerate the rule for which debug information

-   * should be created. No specific ids are given by default.

-   */

-  public static final String PARAM_DEBUG_ONLY_FOR = "debugOnlyFor";

-

-  @ConfigurationParameter(name = PARAM_DEBUG_ONLY_FOR, mandatory = false, defaultValue = {})

-  private String[] debugOnlyFor;

-

-  /**

-   * If this parameter is set to true, then additional information about the runtime of applied

-   * rules is added to the CAS. The default value of this parameter is set to false.

-   */

-  public static final String PARAM_PROFILE = "profile";

-

-  @ConfigurationParameter(name = PARAM_PROFILE, mandatory = false, defaultValue = "false")

-  private Boolean profile;

-

-  /**

-   * If this parameter is set to true, then additional information about the runtime of UIMA Ruta

-   * language elements like conditions and actions is added to the CAS. The default value of this

-   * parameter is set to false.

-   */

-  public static final String PARAM_STATISTICS = "statistics";

-

-  @ConfigurationParameter(name = PARAM_STATISTICS, mandatory = false, defaultValue = "false")

-  private Boolean statistics;

-

-  /**

-   * If this parameter is set to true, then additional information about what annotation was created

-   * by which rule is added to the CAS. The default value of this parameter is set to false.

-   */

-  public static final String PARAM_CREATED_BY = "createdBy";

-

-  @ConfigurationParameter(name = PARAM_CREATED_BY, mandatory = false, defaultValue = "false")

-  private Boolean createdBy;

-

-  /**

-   * If this parameter is set to true, then only types in declared type systems are available by

-   * their short name.

-   */

-  public static final String PARAM_STRICT_IMPORTS = "strictImports";

-

-  @ConfigurationParameter(name = PARAM_STRICT_IMPORTS, mandatory = false, defaultValue = "false")

-  private Boolean strictImports = false;

-

-  /**

-   * If this parameter is set to true, then whitespaces are removed when dictionaries are loaded

-   */

-  public static final String PARAM_DICT_REMOVE_WS = "dictRemoveWS";

-

-  @ConfigurationParameter(name = PARAM_DICT_REMOVE_WS, mandatory = false, defaultValue = "false")

-  private Boolean dictRemoveWS = false;

-

-  /**

-   * This parameter specifies the names of variables and is used in combination with the parameter

-   * varValues, which contains the values of the corresponding variables. The n-th entry of this

-   * string array specifies the variable of the n-th entry of the string array of the parameter

-   * varValues. If the variables is defined in the root of a script, then the name of the variable

-   * suffices. If the variable is defined in a BLOCK or imported script, then the the name must

-   * contain the namespaces of the blocks as a prefix, e.g., InnerBlock.varName or OtherScript.SomeBlock.varName

-   */

-  public static final String PARAM_VAR_NAMES = "varNames";

-

-  @ConfigurationParameter(name = PARAM_VAR_NAMES, mandatory = false, defaultValue = {})

-  private String[] varNames;

-

-  /**

-   * This parameter specifies the values of variables as string values in an string array. It is

-   * used in combination with the parameter varNames, which contains the names of the corresponding

-   * variables. The n-th entry of this string array specifies the value of the n-th entry of the

-   * string array of the parameter varNames. Only value of the kinds string, boolean, int, double

-   * and float are allowed.

-   */

-  public static final String PARAM_VAR_VALUES = "varValues";

-

-  @ConfigurationParameter(name = PARAM_VAR_VALUES, mandatory = false, defaultValue = {})

-  private String[] varValues;

-

-  private UimaContext context;

-

-  private RutaModule script;

-

-  private RutaExternalFactory factory;

-

-  private RutaEngineLoader engineLoader;

-

-  private String mainScript;

-

-  private RutaVerbalizer verbalizer;

-

-  private boolean initialized = false;

-

-  private List<Type> seedTypes;

-

-  private TypeSystem lastTypeSystem;

-

-  private ResourceManager resourceManager = null;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    if (aContext == null && context != null) {

-      aContext = context;

-    }

-    if (aContext != null) {

-      seeders = (String[]) aContext.getConfigParameterValue(PARAM_SEEDERS);

-      removeBasics = (Boolean) aContext.getConfigParameterValue(PARAM_REMOVE_BASICS);

-      scriptPaths = (String[]) aContext.getConfigParameterValue(PARAM_SCRIPT_PATHS);

-      descriptorPaths = (String[]) aContext.getConfigParameterValue(PARAM_DESCRIPTOR_PATHS);

-      rules = (String) aContext.getConfigParameterValue(PARAM_RULES);

-      mainScript = (String) aContext.getConfigParameterValue(PARAM_MAIN_SCRIPT);

-      additionalScripts = (String[]) aContext.getConfigParameterValue(PARAM_ADDITIONAL_SCRIPTS);

-      additionalEngines = (String[]) aContext.getConfigParameterValue(PARAM_ADDITIONAL_ENGINES);

-      additionalUimafitEngines = (String[]) aContext

-              .getConfigParameterValue(PARAM_ADDITIONAL_UIMAFIT_ENGINES);

-      additionalExtensions = (String[]) aContext

-              .getConfigParameterValue(PARAM_ADDITIONAL_EXTENSIONS);

-      additionalEngineLoaders = (String[]) aContext

-              .getConfigParameterValue(PARAM_ADDITIONAL_ENGINE_LOADERS);

-

-      debug = (Boolean) aContext.getConfigParameterValue(PARAM_DEBUG);

-      debugOnlyFor = (String[]) aContext.getConfigParameterValue(PARAM_DEBUG_ONLY_FOR);

-      profile = (Boolean) aContext.getConfigParameterValue(PARAM_PROFILE);

-      statistics = (Boolean) aContext.getConfigParameterValue(PARAM_STATISTICS);

-      createdBy = (Boolean) aContext.getConfigParameterValue(PARAM_CREATED_BY);

-      debugWithMatches = (Boolean) aContext.getConfigParameterValue(PARAM_DEBUG_WITH_MATCHES);

-

-      resourcePaths = (String[]) aContext.getConfigParameterValue(PARAM_RESOURCE_PATHS);

-      scriptEncoding = (String) aContext.getConfigParameterValue(PARAM_SCRIPT_ENCODING);

-      defaultFilteredTypes = (String[]) aContext

-              .getConfigParameterValue(PARAM_DEFAULT_FILTERED_TYPES);

-      dynamicAnchoring = (Boolean) aContext.getConfigParameterValue(PARAM_DYNAMIC_ANCHORING);

-      reloadScript = (Boolean) aContext.getConfigParameterValue(PARAM_RELOAD_SCRIPT);

-      lowMemoryProfile = (Boolean) aContext.getConfigParameterValue(PARAM_LOW_MEMORY_PROFILE);

-      simpleGreedyForComposed = (Boolean) aContext

-              .getConfigParameterValue(PARAM_SIMPLE_GREEDY_FOR_COMPOSED);

-      greedyRuleElement = (Boolean) aContext.getConfigParameterValue(PARAM_GREEDY_RULE_ELEMENT);

-      greedyRule = (Boolean) aContext.getConfigParameterValue(PARAM_GREEDY_RULE);

-

-      resourcePaths = resourcePaths == null ? new String[0] : resourcePaths;

-      removeBasics = removeBasics == null ? false : removeBasics;

-      debug = debug == null ? false : debug;

-      debugOnlyFor = debugOnlyFor == null ? new String[0] : debugOnlyFor;

-      profile = profile == null ? false : profile;

-      statistics = statistics == null ? false : statistics;

-      createdBy = createdBy == null ? false : createdBy;

-      debugWithMatches = debugWithMatches == null ? true : debugWithMatches;

-

-      scriptEncoding = scriptEncoding == null ? "UTF-8" : scriptEncoding;

-      defaultFilteredTypes = defaultFilteredTypes == null ? new String[0] : defaultFilteredTypes;

-      dynamicAnchoring = dynamicAnchoring == null ? false : dynamicAnchoring;

-      reloadScript = reloadScript == null ? false : reloadScript;

-      lowMemoryProfile = lowMemoryProfile == null ? false : lowMemoryProfile;

-      simpleGreedyForComposed = simpleGreedyForComposed == null ? false : simpleGreedyForComposed;

-      greedyRuleElement = greedyRuleElement == null ? false : greedyRuleElement;

-      greedyRule = greedyRule == null ? false : greedyRule;

-

-      varNames = (String[]) aContext.getConfigParameterValue(PARAM_VAR_NAMES);

-      varValues = (String[]) aContext.getConfigParameterValue(PARAM_VAR_VALUES);

-

-      this.context = aContext;

-

-      factory = new RutaExternalFactory();

-      factory.setContext(aContext);

-      engineLoader = new RutaEngineLoader();

-      verbalizer = new RutaVerbalizer();

-

-      resourceManager = UIMAFramework.newDefaultResourceManager();

-      String dataPath = "";

-      if (descriptorPaths != null) {

-        for (String path : descriptorPaths) {

-          dataPath += path + File.pathSeparator;

-        }

-        try {

-          resourceManager.setDataPath(dataPath);

-        } catch (MalformedURLException e) {

-          throw new ResourceInitializationException(e);

-        }

-      }

-      if (!factory.isInitialized()) {

-        initializeExtensionWithClassPath();

-      }

-      if (!engineLoader.isInitialized()) {

-        initializeEngineLoaderWithClassPath();

-      }

-      if (!reloadScript) {

-        try {

-          initializeScript(CAS.NAME_DEFAULT_SOFA);

-        } catch (AnalysisEngineProcessException e) {

-          throw new ResourceInitializationException(e);

-        }

-      }

-    }

-  }

-

-  @Override

-  public void process(JCas jcas) throws AnalysisEngineProcessException {

-    CAS cas = jcas.getCas();

-    if (reloadScript || (!initialized && !cas.getViewName().equals(CAS.NAME_DEFAULT_SOFA))) {

-      initializeScript(cas.getViewName());

-    } else {

-      resetEnvironments(cas);

-      initializeVariableValues();

-    }

-    boolean typeSystemChanged = lastTypeSystem != cas.getTypeSystem();

-    if (!initialized || reloadScript || typeSystemChanged) {

-      initializeTypes(script, cas);

-      initialized = true;

-      lastTypeSystem = cas.getTypeSystem();

-    }

-    InferenceCrowd crowd = initializeCrowd();

-    RutaStream stream = initializeStream(cas, crowd);

-    stream.setDynamicAnchoring(dynamicAnchoring);

-    stream.setGreedyRuleElement(greedyRuleElement);

-    stream.setGreedyRule(greedyRule);

-    try {

-      script.apply(stream, crowd);

-    } catch (Throwable e) {

-      throw new AnalysisEngineProcessException(AnalysisEngineProcessException.ANNOTATOR_EXCEPTION,

-              new Object[] {}, e);

-    }

-    crowd.finished(stream);

-

-    if (removeBasics) {

-      List<AnnotationFS> toRemove = new ArrayList<AnnotationFS>();

-      Type basicType = cas.getTypeSystem().getType(BASIC_TYPE);

-      AnnotationIndex<AnnotationFS> basicIndex = cas.getAnnotationIndex(basicType);

-      for (AnnotationFS fs : basicIndex) {

-        toRemove.add(fs);

-      }

-      for (Type seedType : seedTypes) {

-        AnnotationIndex<AnnotationFS> seedIndex = cas.getAnnotationIndex(seedType);

-        for (AnnotationFS fs : seedIndex) {

-          toRemove.add(fs);

-        }

-      }

-      for (AnnotationFS annotationFS : toRemove) {

-        cas.removeFsFromIndexes(annotationFS);

-      }

-    }

-  }

-

-  private void resetEnvironments(CAS cas) {

-    resetEnvironment(script, cas);

-    Collection<RutaModule> scripts = script.getScripts().values();

-    for (RutaModule module : scripts) {

-      resetEnvironment(module, cas);

-    }

-  }

-

-  private void resetEnvironment(RutaModule module, CAS cas) {

-    RutaBlock block = module.getBlock(null);

-    block.getEnvironment().reset(cas);

-    Collection<RutaBlock> blocks = module.getBlocks().values();

-    for (RutaBlock each : blocks) {

-      each.getEnvironment().reset(cas);

-    }

-  }

-

-  private void initializeTypes(RutaModule script, CAS cas) {

-    // TODO find a better solution for telling everyone about the types!

-    RutaBlock mainRootBlock = script.getBlock(null);

-    mainRootBlock.getEnvironment().initializeTypes(cas, strictImports);

-    Collection<RutaModule> values = script.getScripts().values();

-    for (RutaModule eachModule : values) {

-      relinkEnvironments(eachModule, mainRootBlock, new ArrayList<RutaModule>());

-      initializeTypes(eachModule, cas);

-    }

-  }

-

-  private void relinkEnvironments(RutaModule script, RutaBlock mainRootBlock,

-          Collection<RutaModule> processed) {

-    if (!processed.contains(script)) {

-      processed.add(script);

-      RutaBlock block = script.getBlock(null);

-      block.setParent(mainRootBlock);

-      Collection<RutaModule> innerScripts = script.getScripts().values();

-      for (RutaModule module : innerScripts) {

-        relinkEnvironments(module, mainRootBlock, processed);

-      }

-    }

-  }

-

-  private void initializeExtensionWithClassPath() {

-    if (additionalExtensions == null) {

-      return;

-    }

-    for (String each : additionalExtensions) {

-      try {

-        Class<?> forName = Class.forName(each);

-        if (IRutaExtension.class.isAssignableFrom(forName)) {

-          IRutaExtension extension = (IRutaExtension) forName.newInstance();

-          verbalizer.addExternalVerbalizers(extension);

-          for (String name : extension.getKnownExtensions()) {

-            factory.addExtension(name, extension);

-          }

-        }

-      } catch (Exception e) {

-        // System.out.println("EXTENSION ERROR: " + each);

-      }

-    }

-  }

-

-  private void initializeEngineLoaderWithClassPath() {

-    if (additionalEngineLoaders == null) {

-      return;

-    }

-    for (String each : additionalEngineLoaders) {

-      try {

-        Class<?> forName = Class.forName(each);

-        if (IEngineLoader.class.isAssignableFrom(forName)) {

-          IEngineLoader loader = (IEngineLoader) forName.newInstance();

-          for (String name : loader.getKnownEngines()) {

-            engineLoader.addLoader(name, loader);

-          }

-        }

-      } catch (Exception e) {

-        // System.out.println("LOADER ERROR: " + each);

-      }

-    }

-  }

-

-  private InferenceCrowd initializeCrowd() {

-    List<RutaInferenceVisitor> visitors = new ArrayList<RutaInferenceVisitor>();

-    if (debug) {

-      visitors.add(new DebugInfoCollectorVisitor(debug, debugWithMatches, Arrays

-              .asList(debugOnlyFor), verbalizer));

-    }

-    if (profile) {

-      visitors.add(new TimeProfilerVisitor());

-    }

-    if (statistics) {

-      visitors.add(new StatisticsVisitor(verbalizer));

-    }

-    if (createdBy) {

-      visitors.add(new CreatedByVisitor(verbalizer));

-    }

-    return new InferenceCrowd(visitors);

-  }

-

-  private RutaStream initializeStream(CAS cas, InferenceCrowd crowd)

-          throws AnalysisEngineProcessException {

-    Collection<Type> filterTypes = new ArrayList<Type>();

-    TypeSystem typeSystem = cas.getTypeSystem();

-    for (String each : defaultFilteredTypes) {

-      Type type = typeSystem.getType(each);

-      if (type != null) {

-        filterTypes.add(type);

-      }

-    }

-    FilterManager filter = new FilterManager(filterTypes, cas);

-    Type basicType = typeSystem.getType(BASIC_TYPE);

-    seedTypes = seedAnnotations(cas);

-    RutaStream stream = new RutaStream(cas, basicType, filter, lowMemoryProfile,

-            simpleGreedyForComposed, crowd);

-

-    stream.initalizeBasics();

-    return stream;

-  }

-

-  private List<Type> seedAnnotations(CAS cas) throws AnalysisEngineProcessException {

-    List<Type> result = new ArrayList<Type>();

-    if (seeders != null) {

-      for (String seederClass : seeders) {

-        Class<?> loadClass = null;

-        try {

-          loadClass = Class.forName(seederClass);

-        } catch (ClassNotFoundException e) {

-          throw new AnalysisEngineProcessException(e);

-        }

-        Object newInstance = null;

-        try {

-          newInstance = loadClass.newInstance();

-        } catch (Exception e) {

-          throw new AnalysisEngineProcessException(e);

-        }

-        try {

-          RutaAnnotationSeeder seeder = (RutaAnnotationSeeder) newInstance;

-          result.add(seeder.seed(cas.getDocumentText(), cas));

-        } catch (Exception e) {

-          throw new AnalysisEngineProcessException(e);

-        }

-      }

-    }

-    return result;

-  }

-

-  private void initializeScript(String viewName) throws AnalysisEngineProcessException {

-    if (mainScript == null) {

-      if(rules != null) {

-        try {

-          script = loadScriptByString(rules);

-        } catch (RecognitionException e) {

-          throw new AnalysisEngineProcessException(e);

-        }

-      }

-      return;

-    }

-    String scriptLocation = locate(mainScript, scriptPaths, SCRIPT_FILE_EXTENSION);

-    if (scriptLocation == null) {

-      try {

-        String mainScriptPath = mainScript.replaceAll("\\.", "/") + SCRIPT_FILE_EXTENSION;

-        script = loadScriptIS(mainScriptPath);

-      } catch (IOException e) {

-        throw new AnalysisEngineProcessException(new FileNotFoundException("Script [" + mainScript

-                + "] cannot be found at [" + collectionToString(scriptPaths)

-                + "] or classpath with extension .ruta"));

-      } catch (RecognitionException e) {

-        throw new AnalysisEngineProcessException(new FileNotFoundException("Script [" + mainScript

-                + "] cannot be found at [" + collectionToString(scriptPaths)

-                + "] or classpath  with extension .ruta"));

-      }

-    } else {

-      try {

-        script = loadScript(scriptLocation);

-      } catch (Exception e) {

-        throw new AnalysisEngineProcessException(e);

-      }

-    }

-

-    Map<String, RutaModule> additionalScriptsMap = new HashMap<String, RutaModule>();

-    Map<String, AnalysisEngine> additionalEnginesMap = new HashMap<String, AnalysisEngine>();

-

-    if (additionalUimafitEngines != null) {

-      for (String eachUimafitEngine : additionalUimafitEngines) {

-        AnalysisEngine eachEngine = null;

-        try {

-          @SuppressWarnings("unchecked")

-          // Class clazz = this.getClass().getClassLoader().loadClass(eachUimafitEngine) ;

-          Class<? extends AnalysisComponent> uimafitClass = (Class<? extends AnalysisComponent>) Class

-                  .forName(eachUimafitEngine);

-          eachEngine = AnalysisEngineFactory.createEngine(uimafitClass);

-        } catch (ClassNotFoundException e) {

-          throw new AnalysisEngineProcessException(e);

-        } catch (ResourceInitializationException e) {

-          throw new AnalysisEngineProcessException(e);

-        }

-        try {

-          additionalEnginesMap.put(eachUimafitEngine, eachEngine);

-          String[] eachEngineLocationPartArray = eachUimafitEngine.split("\\.");

-          if (eachEngineLocationPartArray.length > 1) {

-            String shortEachEngineLocation = eachEngineLocationPartArray[eachEngineLocationPartArray.length - 1];

-            additionalEnginesMap.put(shortEachEngineLocation, eachEngine);

-          }

-        } catch (Exception e) {

-          throw new AnalysisEngineProcessException(e);

-        }

-      }

-    }

-    if (additionalEngines != null) {

-      for (String eachEngineLocation : additionalEngines) {

-        AnalysisEngine eachEngine;

-        String location = locate(eachEngineLocation, descriptorPaths, ".xml");

-        if (location == null) {

-          String locationIS = locateIS(eachEngineLocation, descriptorPaths, ".xml");

-          try {

-            eachEngine = engineLoader.loadEngineIS(locationIS, viewName);

-          } catch (InvalidXMLException e) {

-            throw new AnalysisEngineProcessException(new FileNotFoundException("Engine at ["

-                    + eachEngineLocation + "] cannot be found in ["

-                    + collectionToString(descriptorPaths)

-                    + "] with extension .xml (from mainScript=" + mainScript + " in "

-                    + collectionToString(scriptPaths)));

-          } catch (ResourceInitializationException e) {

-            throw new AnalysisEngineProcessException(new FileNotFoundException("Engine at ["

-                    + eachEngineLocation + "] cannot be found in ["

-                    + collectionToString(descriptorPaths)

-                    + "] with extension .xml (from mainScript=" + mainScript + " in "

-                    + collectionToString(scriptPaths)));

-          } catch (IOException e) {

-            throw new AnalysisEngineProcessException(new FileNotFoundException("Engine at ["

-                    + eachEngineLocation + "] cannot be found in ["

-                    + collectionToString(descriptorPaths)

-                    + "] with extension .xml (from mainScript=" + mainScript + " in "

-                    + collectionToString(scriptPaths)));

-          } catch (ResourceConfigurationException e) {

-            throw new AnalysisEngineProcessException(e);

-          } catch (URISyntaxException e) {

-            throw new AnalysisEngineProcessException(e);

-          }

-        } else {

-          try {

-            eachEngine = engineLoader.loadEngine(location, viewName);

-          } catch (Exception e) {

-            throw new AnalysisEngineProcessException(e);

-          }

-        }

-        try {

-          additionalEnginesMap.put(eachEngineLocation, eachEngine);

-          String[] eachEngineLocationPartArray = eachEngineLocation.split("\\.");

-          if (eachEngineLocationPartArray.length > 1) {

-            String shortEachEngineLocation = eachEngineLocationPartArray[eachEngineLocationPartArray.length - 1];

-            additionalEnginesMap.put(shortEachEngineLocation, eachEngine);

-          }

-        } catch (Exception e) {

-          throw new AnalysisEngineProcessException(e);

-        }

-      }

-    }

-

-    if (additionalScripts != null) {

-      for (String add : additionalScripts) {

-        recursiveLoadScript(add, additionalScriptsMap, additionalEnginesMap, viewName);

-      }

-    }

-

-    for (RutaModule each : additionalScriptsMap.values()) {

-      each.setScriptDependencies(additionalScriptsMap);

-    }

-    script.setScriptDependencies(additionalScriptsMap);

-

-    for (RutaModule each : additionalScriptsMap.values()) {

-      each.setEngineDependencies(additionalEnginesMap);

-    }

-    script.setEngineDependencies(additionalEnginesMap);

-

-    initializeVariableValues();

-  }

-

-  private void initializeVariableValues() {

-    if(varNames == null || varValues == null) {

-      return;

-    }

-    if (varNames.length != varValues.length) {

-      throw new IllegalArgumentException(

-              "The parameters varNames and varValues must contain the same amount of entries.");

-    }

-

-    for (int i = 0; i < varNames.length; i++) {

-      String longName = varNames[i];

-      String value = varValues[i];

-      

-      int lastIndexOf = longName.lastIndexOf('.');

-      String shortName = longName;

-      String blockName = null;

-      if (lastIndexOf != -1) {

-        blockName = longName.substring(0, lastIndexOf);

-        shortName = longName.substring(lastIndexOf + 1, longName.length());

-      }

-      RutaBlock block = script.getBlock(blockName);

-      if(block == null) {

-        return;

-      }

-      

-      RutaEnvironment environment = block.getEnvironment();

-      if (!environment.ownsVariable(shortName)) {

-        return;

-      }

-      Object valueObj = null;

-      Class<?> variableType = environment.getVariableType(shortName);

-      if (Integer.class.equals(variableType)) {

-        valueObj = Integer.parseInt(value);

-      } else if (Double.class.equals(variableType)) {

-        valueObj = Double.parseDouble(value);

-      } else if (Float.class.equals(variableType)) {

-        valueObj = Float.parseFloat(value);

-      } else if (String.class.equals(variableType)) {

-        valueObj = value;

-      } else if (Boolean.class.equals(variableType)) {

-        valueObj = Boolean.parseBoolean(value);

-      } else {

-        throw new IllegalArgumentException(

-                "Only variables for primitives can be assigned by parameters: " + shortName

-                        + " defined in block: " + blockName);

-      }

-      environment.setVariableValue(shortName, valueObj);

-    }

-

-  }

-

-  public static void addSourceDocumentInformation(CAS cas, File each) {

-    Type sdiType = cas.getTypeSystem()

-            .getType("org.apache.uima.examples.SourceDocumentInformation");

-    if (sdiType != null) {

-      if (cas.getAnnotationIndex(sdiType).size() == 0) {

-        AnnotationFS sdi = cas.createAnnotation(sdiType, cas.getDocumentAnnotation().getBegin(),

-                cas.getDocumentAnnotation().getEnd());

-        Feature uriFeature = sdiType.getFeatureByBaseName("uri");

-        sdi.setStringValue(uriFeature, each.toURI().getPath());

-        cas.addFsToIndexes(sdi);

-      }

-    }

-  }

-

-  public static void removeSourceDocumentInformation(CAS cas) {

-    Type sdiType = cas.getTypeSystem()

-            .getType("org.apache.uima.examples.SourceDocumentInformation");

-    if (sdiType != null) {

-      AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(sdiType);

-      List<AnnotationFS> toRemove = new ArrayList<AnnotationFS>();

-      for (AnnotationFS annotationFS : annotationIndex) {

-        toRemove.add(annotationFS);

-      }

-      for (AnnotationFS annotationFS : toRemove) {

-        cas.removeFsFromIndexes(annotationFS);

-      }

-    }

-  }

-

-  public static String locate(String name, String[] paths, String suffix) {

-    return locate(name, paths, suffix, true);

-  }

-

-  public static String locateIS(String name, String[] paths, String suffix) {

-    return locateIS(name, paths, suffix, true);

-  }

-

-  public static String locate(String name, String[] paths, String suffix, boolean mustExist) {

-    if (name == null || paths == null) {

-      return null;

-    }

-    name = name.replaceAll("[.]", "/");

-    for (String each : paths) {

-      File file = new File(each, name + suffix);

-      if (!mustExist || file.exists()) {

-        return file.getAbsolutePath();

-      }

-    }

-    return null;

-  }

-

-  public static String locateIS(String name, String[] paths, String suffix, boolean mustExist) {

-    if (name == null) {

-      return null;

-    }

-    name = name.replaceAll("[.]", "/");

-    return name + suffix;

-  }

-

-  private void recursiveLoadScript(String toLoad, Map<String, RutaModule> additionalScripts,

-          Map<String, AnalysisEngine> additionalEngines, String viewName)

-          throws AnalysisEngineProcessException {

-    String location = locate(toLoad, scriptPaths, SCRIPT_FILE_EXTENSION);

-    RutaModule eachScript = null;

-    if (location == null) {

-      try {

-        String scriptPath = toLoad.replaceAll("\\.", "/") + SCRIPT_FILE_EXTENSION;

-        eachScript = loadScriptIS(scriptPath);

-      } catch (IOException e) {

-        throw new AnalysisEngineProcessException(new FileNotFoundException("Script [" + toLoad

-                + "] cannot be found at [" + collectionToString(scriptPaths)

-                + "] with extension .ruta"));

-      } catch (RecognitionException e) {

-        throw new AnalysisEngineProcessException(new FileNotFoundException("Script [" + toLoad

-                + "] cannot be found at [" + collectionToString(scriptPaths)

-                + "] with extension .ruta"));

-      }

-    } else {

-      try {

-        eachScript = loadScript(location);

-      } catch (IOException e) {

-        throw new AnalysisEngineProcessException(new FileNotFoundException("Script [" + toLoad

-                + "] cannot be found at [" + collectionToString(scriptPaths)

-                + "] with extension .ruta"));

-      } catch (RecognitionException e) {

-        throw new AnalysisEngineProcessException(new FileNotFoundException("Script [" + toLoad

-                + "] cannot be found at [" + collectionToString(scriptPaths)

-                + "] with extension .ruta"));

-      }

-    }

-    additionalScripts.put(toLoad, eachScript);

-

-    for (String add : eachScript.getScripts().keySet()) {

-      if (!additionalScripts.containsKey(add)) {

-        recursiveLoadScript(add, additionalScripts, additionalEngines, viewName);

-      }

-    }

-

-    Set<String> engineKeySet = eachScript.getEngines().keySet();

-    for (String eachEngineLocation : engineKeySet) {

-      if (!additionalEngines.containsKey(eachEngineLocation)) {

-        String engineLocation = locate(eachEngineLocation, descriptorPaths, ".xml");

-        if (engineLocation == null) {

-          String engineLocationIS = locateIS(eachEngineLocation, descriptorPaths, ".xml");

-          try {

-            AnalysisEngine eachEngine = engineLoader.loadEngineIS(engineLocationIS, viewName);

-            additionalEngines.put(eachEngineLocation, eachEngine);

-          } catch (Exception e) {

-            // uimaFit engine?

-            try {

-              @SuppressWarnings("unchecked")

-              Class<? extends AnalysisComponent> uimafitClass = (Class<? extends AnalysisComponent>) Class

-                      .forName(eachEngineLocation);

-              AnalysisEngine eachEngine = AnalysisEngineFactory.createEngine(uimafitClass);

-              additionalEngines.put(eachEngineLocation, eachEngine);

-            } catch (Exception e1) {

-              throw new AnalysisEngineProcessException(e1);

-            }

-          }

-        } else {

-          try {

-            AnalysisEngine eachEngine = engineLoader.loadEngine(engineLocation, viewName);

-            additionalEngines.put(eachEngineLocation, eachEngine);

-          } catch (Exception e) {

-            throw new AnalysisEngineProcessException(e);

-          }

-        }

-      }

-    }

-  }

-

-  private RutaModule loadScriptByString(String rules) throws RecognitionException {

-    CharStream st = new ANTLRStringStream(rules);

-    RutaLexer lexer = new RutaLexer(st);

-    CommonTokenStream tokens = new CommonTokenStream(lexer);

-    RutaParser parser = new RutaParser(tokens);

-    parser.setContext(context);

-    parser.setExternalFactory(factory);

-    parser.setResourcePaths(resourcePaths);

-    parser.setResourceManager(resourceManager);

-    RutaModule script = parser.file_input("Anonymous");

-    return script;

-  }

-  

-  private RutaModule loadScript(String scriptLocation) throws IOException, RecognitionException {

-    File scriptFile = new File(scriptLocation);

-    CharStream st = new ANTLRFileStream(scriptLocation, scriptEncoding);

-    RutaLexer lexer = new RutaLexer(st);

-    CommonTokenStream tokens = new CommonTokenStream(lexer);

-    RutaParser parser = new RutaParser(tokens);

-    parser.setContext(context);

-    parser.setExternalFactory(factory);

-    parser.setResourcePaths(resourcePaths);

-    parser.setResourceManager(resourceManager);

-    String name = scriptFile.getName();

-    int lastIndexOf = name.lastIndexOf(SCRIPT_FILE_EXTENSION);

-    if (lastIndexOf != -1) {

-      name = name.substring(0, lastIndexOf);

-    }

-    RutaModule script = parser.file_input(name);

-    return script;

-  }

-

-  private RutaModule loadScriptIS(String scriptLocation) throws IOException, RecognitionException {

-    InputStream scriptInputStream = getClass().getClassLoader().getResourceAsStream(scriptLocation);

-    if (scriptInputStream == null) {

-      throw new FileNotFoundException("No script found in location [" + scriptLocation + "]");

-    }

-    CharStream st = new ANTLRInputStream(scriptInputStream, scriptEncoding);

-    RutaLexer lexer = new RutaLexer(st);

-    CommonTokenStream tokens = new CommonTokenStream(lexer);

-    RutaParser parser = new RutaParser(tokens);

-    parser.setExternalFactory(factory);

-    parser.setContext(context);

-    parser.setResourcePaths(resourcePaths);

-    String name = scriptLocation;

-    if (scriptLocation.indexOf("/") != -1) {

-      String[] split = scriptLocation.split("[/]");

-      name = split[split.length - 1];

-    }

-    int lastIndexOf = name.lastIndexOf(SCRIPT_FILE_EXTENSION);

-    if (lastIndexOf != -1) {

-      name = name.substring(0, lastIndexOf);

-    }

-    RutaModule script = parser.file_input(name);

-    return script;

-  }

-

-  public RutaExternalFactory getFactory() {

-    return factory;

-  }

-

-  public RutaEngineLoader getEngineLoader() {

-    return engineLoader;

-  }

-

-  private String collectionToString(Collection<?> collection) {

-    StringBuilder collectionSB = new StringBuilder();

-    collectionSB.append("{");

-    for (Object element : collection) {

-      collectionSB.append("[").append(element.toString()).append("]");

-    }

-    collectionSB.append("}");

-    return collectionSB.toString();

-  }

-

-  private String collectionToString(Object[] collection) {

-    if (collection == null) {

-      return "";

-    } else {

-      return collectionToString(Arrays.asList(collection));

-    }

-  }

-

-  @Override

-  public void batchProcessComplete() throws AnalysisEngineProcessException {

-    super.batchProcessComplete();

-    Collection<AnalysisEngine> values = script.getEngines().values();

-    for (AnalysisEngine each : values) {

-      each.batchProcessComplete();

-    }

-  }

-

-  @Override

-  public void collectionProcessComplete() throws AnalysisEngineProcessException {

-    super.collectionProcessComplete();

-    Collection<AnalysisEngine> values = script.getEngines().values();

-    for (AnalysisEngine each : values) {

-      each.collectionProcessComplete();

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaModifier.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaModifier.java
deleted file mode 100644
index cccf1d2..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaModifier.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.Comparator;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.tools.stylemap.StyleMapEntry;

-import org.apache.uima.util.FileUtils;

-

-/**

- * The Modifier Analysis Engine can be used to create an additional view, which contains all textual

- * modifications and HTML highlightings that were specified by the executed rules. This Analysis

- * Engine can be applied, e.g., for anonymization where all annotations of persons are replaced by

- * the string <code>Person</code>. Furthermore, the content of the new view can optionally be stored

- * in a new HTML file. A descriptor file for this Analysis Engine is located in the folder

- * <code>descriptor/utils</code> of a UIMA Ruta project.

- * 

- */

-public class RutaModifier extends JCasAnnotator_ImplBase {

-

-  public static final String DEFAULT_MODIFIED_VIEW = "modified";

-

-  /**

-   * This optional string parameter specifies the absolute path of the resulting file named

-   * <code>output.modified.html</code>. However, if an annotation of the type

-   * <code>org.apache.uima.examples.SourceDocumentInformation</code> is given, then the value of

-   * this parameter is interpreted to be relative to the URI stored in the annotation and the name

-   * of the file will be adapted to the name of the source file. If this functionality is activated

-   * in the preferences, then the UIMA Ruta Workbench adds the SourceDocumentInformation annotation

-   * when the user launches a script file. The default value of this parameter is empty. In this

-   * case no additional html file will be created.

-   */

-  public static final String PARAM_OUTPUT_LOCATION = "outputLocation";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT_LOCATION, mandatory = false)

-  private String outputLocation;

-

-  /**

-   * This string parameter specifies the name of the style map file created by the Style Map Creator

-   * Analysis Engine, which stores the colors for additional highlightings in the modified view.

-   */

-  public static final String PARAM_STYLE_MAP = StyleMapCreator.PARAM_STYLE_MAP;

-

-  @ConfigurationParameter(name = PARAM_STYLE_MAP, mandatory = false)

-  private String styleMapLocation;

-

-  /**

-   * This string parameter specifies the name of the view, which will contain the modified document.

-   * A view of this name must not yet exist. The default value of this parameter is

-   * <code>modified</code>.

-   */

-  public static final String PARAM_OUTPUT_VIEW = "outputView";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT_VIEW, mandatory = false, defaultValue = DEFAULT_MODIFIED_VIEW)

-  private String modifiedViewName;

-

-  /**

-   * This parameter can contain multiple string values and specifies the absolute paths where the

-   * style map file can be found.

-   */

-  public static final String PARAM_DESCRIPTOR_PATHS = RutaEngine.PARAM_DESCRIPTOR_PATHS;

-

-  @ConfigurationParameter(name = PARAM_DESCRIPTOR_PATHS, mandatory = false)

-  private String[] descriptorPaths;

-

-  private StyleMapFactory styleMapFactory;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    styleMapLocation = (String) aContext.getConfigParameterValue(PARAM_STYLE_MAP);

-    descriptorPaths = (String[]) aContext

-            .getConfigParameterValue(RutaEngine.PARAM_DESCRIPTOR_PATHS);

-    outputLocation = (String) aContext.getConfigParameterValue(RutaModifier.PARAM_OUTPUT_LOCATION);

-    modifiedViewName = (String) aContext.getConfigParameterValue(RutaModifier.PARAM_OUTPUT_VIEW);

-    modifiedViewName = StringUtils.isBlank(modifiedViewName) ? DEFAULT_MODIFIED_VIEW

-            : modifiedViewName;

-    styleMapFactory = new StyleMapFactory();

-  }

-

-  @Override

-  public void process(JCas cas) throws AnalysisEngineProcessException {

-    try {

-      String viewName = cas.getViewName();

-      if (viewName == null) {

-        cas = cas.getView(CAS.NAME_DEFAULT_SOFA);

-      }

-      JCas modifiedView = null;

-      Iterator<?> viewIterator = cas.getViewIterator();

-      while (viewIterator.hasNext()) {

-        JCas each = (JCas) viewIterator.next();

-        if (each.getViewName().equals(modifiedViewName)) {

-          modifiedView = each;

-          break;

-        }

-      }

-

-      if (modifiedView == null) {

-        try {

-          modifiedView = cas.createView(modifiedViewName);

-        } catch (Exception e) {

-          modifiedView = cas.getView(modifiedViewName);

-        }

-      } else {

-        modifiedView = cas.getView(modifiedViewName);

-      }

-      String locate = RutaEngine.locate(styleMapLocation, descriptorPaths, ".xml", true);

-      try {

-        String modifiedDocument = getModifiedDocument(cas, locate);

-        modifiedView.setDocumentText(modifiedDocument);

-      } catch (Exception e) {

-        throw new AnalysisEngineProcessException(e);

-      }

-

-      String documentText = modifiedView.getDocumentText();

-      if (documentText != null) {

-        File outputFile = getOutputFile(cas.getCas());

-        if (outputFile != null) {

-          try {

-            FileUtils.saveString2File(documentText, outputFile);

-          } catch (IOException e) {

-            throw new AnalysisEngineProcessException(e);

-          }

-        }

-      }

-

-    } catch (CASException e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-

-  }

-

-  private File getOutputFile(CAS cas) {

-    if (StringUtils.isBlank(outputLocation)) {

-      return null;

-    }

-

-    Type sdiType = cas.getTypeSystem().getType(RutaEngine.SOURCE_DOCUMENT_INFORMATION);

-    String filename = "output.modified.html";

-    File file = new File(outputLocation, filename);

-    if (sdiType != null) {

-      FSIterator<AnnotationFS> sdiit = cas.getAnnotationIndex(sdiType).iterator();

-      if (sdiit.isValid()) {

-        AnnotationFS annotationFS = sdiit.get();

-        Feature uriFeature = sdiType.getFeatureByBaseName("uri");

-        String stringValue = annotationFS.getStringValue(uriFeature);

-        File f = new File(stringValue);

-        String name = f.getName();

-        if (!name.endsWith(".modified.html")) {

-          name = name + ".modified.html";

-        }

-        file = new File(outputLocation, name);

-      }

-

-    }

-    return file;

-  }

-

-  private String getModifiedDocument(JCas cas, String styleMapLocation) {

-    String startTag = "<span style='background:&bgcolor'>";

-    String endTag = "</span>";

-    Map<String, StyleMapEntry> styleMap = styleMapFactory.parseStyleMapDOM(styleMapLocation);

-    List<Type> coloredTypes = new ArrayList<Type>();

-    if (styleMap != null) {

-      coloredTypes = getColoredTypes(cas, styleMap);

-    }

-    List<String> tokens = new ArrayList<String>();

-    FSIterator<org.apache.uima.jcas.tcas.Annotation> iterator = cas.getAnnotationIndex(

-            RutaBasic.type).iterator();

-    while (iterator.isValid()) {

-      RutaBasic each = (RutaBasic) iterator.get();

-      String replace = each.getReplacement() == null ? each.getCoveredText() : each

-              .getReplacement();

-      Type type = getColorType(each, coloredTypes, cas);

-      if (type != null && !"".equals(replace)) {

-        StyleMapEntry entry = styleMap.get(type.getName());

-        String backgroundColor = "#"

-                + Integer.toHexString(entry.getBackground().getRGB()).substring(2);

-        String newStartTag = startTag.replaceAll("&bgcolor", backgroundColor);

-        tokens.add(newStartTag);

-        tokens.add(replace);

-        tokens.add(endTag);

-      } else {

-        tokens.add(replace);

-      }

-      iterator.moveToNext();

-    }

-    StringBuilder sb = new StringBuilder();

-    for (String string : tokens) {

-      sb.append(string);

-    }

-    return sb.toString();

-  }

-

-  private Type getColorType(RutaBasic basic, List<Type> coloredTypes, JCas cas) {

-    if (coloredTypes.isEmpty()) {

-      return null;

-    }

-    List<Type> colorTypes = new ArrayList<Type>();

-    for (Type each : coloredTypes) {

-      if (cas.getTypeSystem().subsumes(each, basic.getType()) || basic.isPartOf(each)) {

-        colorTypes.add(each);

-      }

-    }

-    Type best = null;

-    if (colorTypes.isEmpty()) {

-    } else if (colorTypes.size() == 1) {

-      best = colorTypes.get(0);

-    } else {

-      // best = colorTypes.get(0);

-    }

-    return best;

-  }

-

-  private List<Type> getColoredTypes(JCas cas, Map<String, StyleMapEntry> styleMap) {

-    List<Type> result = new ArrayList<Type>();

-    for (String string : styleMap.keySet()) {

-      if (string == null)

-        continue;

-      Type type = cas.getTypeSystem().getType(string);

-      if (type != null) {

-        result.add(type);

-      }

-    }

-    Collections.sort(result, new Comparator<Type>() {

-      public int compare(Type o1, Type o2) {

-        return o1.getShortName().compareTo(o2.getShortName());

-      }

-    });

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
deleted file mode 100644
index 34d183e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URISyntaxException;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-

-public class RutaTestUtils {

-

-  public static class TestFeature {

-    public String name;

-

-    public String description;

-

-    public String range;

-

-    public TestFeature(String name, String description, String range) {

-      super();

-      this.name = name;

-      this.description = description;

-      this.range = range;

-    }

-  }

-

-  public static final String TYPE = "org.apache.uima.T";

-

-  public static CAS process(String ruleFileName, String textFileName, int amount)

-          throws URISyntaxException, IOException, InvalidXMLException,

-          ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    return process(ruleFileName, textFileName, amount, false, false, null, null, null, null);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, Map<String, Object> parameters, int amount)

-          throws URISyntaxException, IOException, InvalidXMLException,

-          ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    return process(ruleFileName, textFileName, parameters, amount, null, null, null, null);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, int amount,

-          boolean dynamicAnchoring, boolean simpleGreedyForComposed,

-          Map<String, String> complexTypes, String resourceDirName) throws URISyntaxException,

-          IOException, InvalidXMLException, ResourceInitializationException,

-          AnalysisEngineProcessException, ResourceConfigurationException {

-    return process(ruleFileName, textFileName, amount, dynamicAnchoring, simpleGreedyForComposed,

-            complexTypes, null, resourceDirName, null);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, int amount,

-          boolean dynamicAnchoring, boolean simpleGreedyForComposed,

-          Map<String, String> complexTypes, Map<String, List<TestFeature>> features,

-          String resourceDirName) throws URISyntaxException, IOException, InvalidXMLException,

-          ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    return process(ruleFileName, textFileName, amount, dynamicAnchoring, simpleGreedyForComposed,

-            complexTypes, features, resourceDirName, null);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, int amount,

-          boolean dynamicAnchoring, boolean simpleGreedyForComposed,

-          Map<String, String> complexTypes, Map<String, List<TestFeature>> features,

-          String resourceDirName, CAS cas) throws URISyntaxException, IOException,

-          InvalidXMLException, ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    final Map<String, Object> parameters = new HashMap<String, Object>();

-    parameters.put(RutaEngine.PARAM_DYNAMIC_ANCHORING, dynamicAnchoring);

-    parameters.put(RutaEngine.PARAM_SIMPLE_GREEDY_FOR_COMPOSED, simpleGreedyForComposed);

-

-    return process(ruleFileName, textFileName, parameters, amount, complexTypes, features, resourceDirName, cas);

-  }

-

-  public static CAS process(String ruleFileName, String textFileName, Map<String, Object> parameters,

-                            int amount,

-                            Map<String, String> complexTypes, Map<String, List<TestFeature>> features,

-                            String resourceDirName, CAS cas) throws URISyntaxException, IOException,

-          InvalidXMLException, ResourceInitializationException, AnalysisEngineProcessException,

-          ResourceConfigurationException {

-    URL ruleURL = RutaTestUtils.class.getClassLoader().getResource(ruleFileName);

-    File ruleFile = new File(ruleURL.toURI());

-    URL textURL = RutaTestUtils.class.getClassLoader().getResource(textFileName);

-    File textFile = new File(textURL.toURI());

-    File resourceFile = null;

-    if (resourceDirName != null) {

-      URL resourceURL = RutaTestUtils.class.getClassLoader().getResource(resourceDirName);

-      resourceFile = new File(resourceURL.toURI());

-    }

-    URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource("org/apache/uima/ruta/TestEngine.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-

-    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-    for (int i = 1; i <= amount; i++) {

-      basicTypeSystem.addType(TYPE + i, "Type for Testing", "uima.tcas.Annotation");

-    }

-

-    if (complexTypes != null) {

-      Set<Entry<String, String>> entrySet = complexTypes.entrySet();

-      for (Entry<String, String> entry : entrySet) {

-        String name = entry.getKey();

-        TypeDescription addType = basicTypeSystem.addType(name, "Type for Testing",

-                entry.getValue());

-        if (features != null) {

-          List<TestFeature> list = features.get(name);

-          for (TestFeature f : list) {

-            addType.addFeature(f.name, f.description, f.range);

-          }

-        }

-      }

-    }

-

-    Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-    tsds.add(basicTypeSystem);

-    TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-    aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[]{ruleFile.getParentFile()

-            .getPath()});

-    String name = ruleFile.getName();

-    if (name.endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {

-      name = name.substring(0, name.length() - 5);

-    }

-

-    for (Map.Entry<String, Object> parameter : parameters.entrySet()) {

-      ae.setConfigParameterValue(parameter.getKey(), parameter.getValue());

-    }

-

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-

-    if (resourceFile != null) {

-      ae.setConfigParameterValue(RutaEngine.PARAM_RESOURCE_PATHS, new String[]{resourceFile.getPath()});

-    }

-

-    ae.reconfigure();

-    if (cas == null) {

-      cas = ae.newCAS();

-      cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));

-    }

-    ae.process(cas);

-

-    ae.destroy();

-    return cas;

-  }

-

-  /**

-   * Helper to get the test type, e.g. org.apache.uima.T1, org.apache.uima.T2, ...

-   * 

-   * @param cas 

-   *          The CAS object containing the type system

-   * @param i

-   *          typeId, converted to {@link #TYPE} + i

-   * @return the test type object with the given counter

-   */

-  public static Type getTestType(CAS cas, int i) {

-    if (cas == null)

-      return null;

-    return cas.getTypeSystem().getType(TYPE + i);

-  }

-

-  public static CAS getCAS(String document) throws ResourceInitializationException, IOException,

-          InvalidXMLException {

-    return getCAS(document, null, null);

-  }

-

-  public static CAS getCAS(String document, Map<String, String> complexTypes,

-          Map<String, List<TestFeature>> features) throws ResourceInitializationException,

-          IOException, InvalidXMLException {

-    URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource("org/apache/uima/ruta/BasicEngine.xml");

-    }

-    if (url == null) {

-      url = RutaTestUtils.class.getResource("BasicEngine.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-    for (int i = 1; i <= 50; i++) {

-      basicTypeSystem.addType("org.apache.uima.T" + i, "Type for Testing", "uima.tcas.Annotation");

-    }

-    if (complexTypes != null) {

-      Set<Entry<String, String>> entrySet = complexTypes.entrySet();

-      for (Entry<String, String> entry : entrySet) {

-        String name = entry.getKey();

-        TypeDescription addType = basicTypeSystem.addType(name, "Type for Testing",

-                entry.getValue());

-        if (features != null) {

-          List<TestFeature> list = features.get(name);

-          for (TestFeature f : list) {

-            addType.addFeature(f.name, f.description, f.range);

-          }

-        }

-      }

-    }

-    Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-    tsds.add(basicTypeSystem);

-    TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-

-    aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-    cas.setDocumentText(document);

-    return cas;

-  }

-

-   

-  /**

-   * Helper for common assertion in JUnit tests

-   * 

-   * @param cas

-   * @param typeId

-   * @param expectedCnt

-   * @param expecteds

-   */

-  public static void assertAnnotationsEquals(CAS cas, int typeId, int expectedCnt, String... expecteds) {

-    Type t = getTestType(cas, typeId);

-    AnnotationIndex<AnnotationFS> ai = cas.getAnnotationIndex(t);

-    if (ai.size() != expectedCnt) {

-      throw new AssertionError("size of expected annotations ("+expectedCnt+") does not match with actual size ("+ai.size()+").");

-    }

-    if (expecteds.length > 0) {

-      FSIterator<AnnotationFS> iterator = ai.iterator();

-      for (String expected : expecteds) {

-        String actual =iterator.next().getCoveredText(); 

-        if (!actual.equals(expected)) {

-          throw new AssertionError("expected text ("+expected+") does not match with actual ("+actual+").");

-        }

-      }

-    }

-  }

-

-  /**

-   * Helper to run Ruta on a tests script

-   * 

-   * @param testClass

-   * @return the annotated {@link CAS}

-   */

-  public static CAS processTestScript(Class<?> testClass) {

-    String name = testClass.getSimpleName();

-    String namespace = testClass.getPackage().getName().replaceAll("\\.", "/");

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      throw new RuntimeException(e);

-    }

-    return cas;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/StyleMapCreator.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/StyleMapCreator.java
deleted file mode 100644
index 20fb1d5..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/StyleMapCreator.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.IOException;

-

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceInitializationException;

-

-/**

- * This Analysis Engine can be utilized to create style map information, which is needed by the

- * Modifier Analysis Engine in order to create highlightings for some annotations. Style map

- * information can be created using the COLOR action. A descriptor file for this Analysis Engine is

- * located in the folder <code>descriptor/utils</code> of a UIMA Ruta project.

- * 

- */

-public class StyleMapCreator extends JCasAnnotator_ImplBase {

-

-  /**

-   * This parameter can contain multiple string values and specifies the absolute paths where the

-   * style map file can be found.

-   */

-  public static final String PARAM_DESCRIPTOR_PATHS = RutaEngine.PARAM_DESCRIPTOR_PATHS;

-

-  @ConfigurationParameter(name = PARAM_DESCRIPTOR_PATHS, mandatory = false)

-  private String[] descriptorPaths;

-

-  /**

-   * This string parameter specifies the name of the style map file created by the Style Map Creator

-   * Analysis Engine, which stores the colors for additional highlightings in the modified view.

-   */

-  public static final String PARAM_STYLE_MAP = "styleMap";

-

-  @ConfigurationParameter(name = PARAM_STYLE_MAP, mandatory = false)

-  private String styleMapLocation;

-

-  private UimaContext context;

-

-  private StyleMapFactory styleMapFactory;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    if (aContext == null && context != null) {

-      aContext = context;

-    }

-    if (aContext != null) {

-      styleMapLocation = (String) aContext.getConfigParameterValue(PARAM_STYLE_MAP);

-      descriptorPaths = (String[]) aContext

-              .getConfigParameterValue(RutaEngine.PARAM_DESCRIPTOR_PATHS);

-      styleMapFactory = new StyleMapFactory();

-      this.context = aContext;

-    }

-  }

-

-  @Override

-  public void process(JCas jcas) throws AnalysisEngineProcessException {

-    try {

-      String locate = RutaEngine.locate(styleMapLocation, descriptorPaths, ".xml", false);

-      if (locate != null) {

-        styleMapFactory.createStyleMap(locate, jcas);

-      }

-    } catch (IOException e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/StyleMapFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/StyleMapFactory.java
deleted file mode 100644
index 2172885..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/StyleMapFactory.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.awt.Color;

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileNotFoundException;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.StringTokenizer;

-

-import javax.xml.parsers.DocumentBuilder;

-import javax.xml.parsers.DocumentBuilderFactory;

-import javax.xml.parsers.FactoryConfigurationError;

-import javax.xml.parsers.ParserConfigurationException;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.ruta.type.RutaColoring;

-import org.apache.uima.tools.stylemap.ColorParser;

-import org.apache.uima.tools.stylemap.StyleMapEntry;

-import org.apache.uima.tools.stylemap.StyleMapXmlParser;

-import org.apache.uima.util.FileUtils;

-import org.w3c.dom.Document;

-import org.w3c.dom.Node;

-import org.w3c.dom.NodeList;

-import org.w3c.dom.Text;

-import org.xml.sax.SAXException;

-

-public class StyleMapFactory {

-

-  private Map<String, String> colorNameMap;

-

-  public StyleMapFactory() {

-    initializeColorNameMap();

-  }

-

-  private void initializeColorNameMap() {

-    colorNameMap = new HashMap<String, String>();

-    colorNameMap.put("#000000", "black");

-    colorNameMap.put("#c0c0c0", "silver");

-    colorNameMap.put("#808080", "gray");

-    colorNameMap.put("#ffffff", "white");

-    colorNameMap.put("#800000", "maroon");

-    colorNameMap.put("#ff0000", "red");

-    colorNameMap.put("#800080", "purple");

-    colorNameMap.put("#ff00ff", "fuchsia");

-    colorNameMap.put("#008000", "green");

-    colorNameMap.put("#00ff00", "lime");

-    colorNameMap.put("#808000", "olive");

-    colorNameMap.put("#ffff00", "yellow");

-    colorNameMap.put("#000080", "navy");

-    colorNameMap.put("#0000ff", "blue");

-    colorNameMap.put("#00ffff", "aqua");

-    colorNameMap.put("#000000", "black");

-    colorNameMap.put("#add8e6", "lightblue");

-    colorNameMap.put("#90ee90", "lightgreen");

-    colorNameMap.put("#ffa500", "orange");

-    colorNameMap.put("#ffc0cb", "pink");

-    colorNameMap.put("#fa8072", "salmon");

-    colorNameMap.put("#00ffff", "cyan");

-    colorNameMap.put("#ee82ee", "violet");

-    colorNameMap.put("#d2b48c", "tan");

-    colorNameMap.put("#a52a2a", "brown");

-    colorNameMap.put("#ffffff", "white");

-    colorNameMap.put("#9370db", "mediumpurple");

-    // in other order for lookup

-    colorNameMap.put("black", "#000000");

-    colorNameMap.put("silver", "#c0c0c0");

-    colorNameMap.put("gray", "#808080");

-    colorNameMap.put("white", "#ffffff");

-    colorNameMap.put("maroon", "#800000");

-    colorNameMap.put("red", "#ff0000");

-    colorNameMap.put("purple", "#800080");

-    colorNameMap.put("fuchsia", "#ff00ff");

-    colorNameMap.put("green", "#008000");

-    colorNameMap.put("lime", "#00ff00");

-    colorNameMap.put("olive", "#808000");

-    colorNameMap.put("yellow", "#ffff00");

-    colorNameMap.put("navy", "#000080");

-    colorNameMap.put("blue", "#0000ff");

-    colorNameMap.put("aqua", "#00ffff");

-    colorNameMap.put("black", "#000000");

-    colorNameMap.put("lightblue", "#add8e6");

-    colorNameMap.put("lightgreen", "#90ee90");

-    colorNameMap.put("orange", "#ffa500");

-    colorNameMap.put("pink", "#ffc0cb");

-    colorNameMap.put("salmon", "#fa8072");

-    colorNameMap.put("cyan", "#00ffff");

-    colorNameMap.put("violet", "#ee82ee");

-    colorNameMap.put("tan", "#d2b48c");

-    colorNameMap.put("brown", "#a52a2a");

-    colorNameMap.put("white", "#ffffff");

-    colorNameMap.put("mediumpurple", "#9370db");

-  }

-

-  public void createStyleMap(String styleMapLocation, JCas jcas) throws IOException {

-    List<StyleMapEntry> styleList = createStyleList(jcas);

-    String styleXml = createStyleXml(styleList);

-    writeStyleFile(styleXml, styleMapLocation);

-  }

-

-  private String createStyleXml(List<StyleMapEntry> styleList) {

-    StringBuffer result = new StringBuffer();

-    result.append("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");

-    result.append("<styleMap>\n");

-

-    for (StyleMapEntry e : styleList) {

-      result.append("<rule>\n");

-      result.append("<pattern>");

-      result.append(e.getPattern());

-      result.append("</pattern>\n");

-      result.append("<label>");

-      String label = e.getLabel();

-      if (label != null) {

-        if (!StringUtils.isEmpty(label))

-          result.append(label);

-        else

-          result.append(e.getAnnotationTypeName());

-      } else

-        result.append(e.getAnnotationTypeName());

-

-      result.append("</label>\n");

-      result.append("<style>");

-

-      String foregroundColor = "#" + Integer.toHexString(e.getForeground().getRGB()).substring(2);

-      String backgroundColor = "#" + Integer.toHexString(e.getBackground().getRGB()).substring(2);

-

-      if (colorNameMap.containsKey(foregroundColor)) {

-        result.append("color:" + colorNameMap.get(foregroundColor) + ";");

-      } else {

-        result.append("color:" + foregroundColor + ";");

-      }

-

-      if (colorNameMap.containsKey(backgroundColor)) {

-        result.append("background:" + colorNameMap.get(backgroundColor) + ";");

-      } else {

-        result.append("background:" + backgroundColor + ";");

-      }

-      Boolean ck = e.getChecked();

-      String ckString = ck.toString();

-

-      Boolean hid = (Boolean) Boolean.FALSE;

-      String hidString = hid.toString();

-      // this prevents hidden from being checked,

-      // becasue that is not a meaningful combination

-      if (hidString.equals("true")) {

-        ckString = "false";

-      }

-      result.append("checked:" + ckString + ";");

-      result.append("hidden:" + hidString + ";");

-

-      result.append("</style>\n");

-      result.append("</rule>\n");

-    }

-

-    result.append("</styleMap>\n");

-

-    return result.toString();

-  }

-

-  private void writeStyleFile(String output, String styleMapLocation) throws IOException {

-    File file = new File(styleMapLocation);

-    FileUtils.saveString2File(output, file);

-  }

-

-  private List<StyleMapEntry> createStyleList(JCas jcas) {

-    List<StyleMapEntry> result = new ArrayList<StyleMapEntry>();

-    Type type = jcas.getCasType(RutaColoring.type);

-    FSIterator<FeatureStructure> iterator = jcas.getFSIndexRepository().getAllIndexedFS(type);

-    while (iterator.hasNext()) {

-      RutaColoring each = (RutaColoring) iterator.next();

-      StyleMapEntry entry = new StyleMapEntry();

-      entry.setAnnotationTypeName(each.getTargetType());

-      String fgColor = each.getFgColor();

-      entry.setForeground(parseColorBackground(fgColor));

-      String bgColor = each.getBgColor();

-      entry.setBackground(parseColorBackground(bgColor));

-      entry.setChecked(each.getSelected());

-      result.add(entry);

-    }

-

-    return result;

-  }

-

-  private Color parseColorBackground(String color) {

-    if (color == null) {

-      return Color.BLACK;

-    }

-    if (color.startsWith("#")) {

-      return Color.decode(color);

-    } else {

-      String string = (String) colorNameMap.get(color);

-      if (string != null)

-        return Color.decode(string);

-      else

-        return Color.LIGHT_GRAY;

-    }

-  }

-

-  private Color parseColorForeground(String color) {

-    if (color.startsWith("#")) {

-      return Color.decode(color);

-    } else {

-      String string = (String) colorNameMap.get(color);

-      if (string != null)

-        return Color.decode(string);

-      else

-        return Color.BLACK;

-    }

-  }

-

-  public Map<String, StyleMapEntry> parseStyleMap(String styleFileString) {

-    Map<String, StyleMapEntry> result = new HashMap<String, StyleMapEntry>();

-    StyleMapXmlParser smxp = new StyleMapXmlParser(styleFileString);

-    ColorParser cp = new ColorParser();

-    for (int i = 0; i < smxp.annotType.size(); i++) {

-      String typeName = ((String) smxp.annotType.elementAt(i));

-      String labelString = ((String) smxp.styleLabel.elementAt(i));

-      String featureValue = ((String) smxp.featureValue.elementAt(i));

-      String styleColor = smxp.styleColor.elementAt(i).toString();

-      StyleMapEntry e = cp.parseAndAssignColors(typeName, featureValue, labelString, styleColor);

-      result.put(typeName, e);

-    }

-    return result;

-  }

-

-  public Map<String, StyleMapEntry> parseStyleMapDOM(String styleFileString) {

-    Map<String, StyleMapEntry> result = new HashMap<String, StyleMapEntry>();

-    if (styleFileString == null) {

-      return result;

-    }

-

-    File styleMapFile = new File(styleFileString);

-    Document parse = null;

-    try {

-      DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();

-      FileInputStream stream = new FileInputStream(styleMapFile);

-      parse = db.parse(stream);

-      stream.close();

-

-    } catch (FileNotFoundException e) {

-      e.printStackTrace();

-      return null;

-

-    } catch (ParserConfigurationException e) {

-      e.printStackTrace();

-      return null;

-

-    } catch (FactoryConfigurationError e) {

-      e.printStackTrace();

-      return null;

-

-    } catch (SAXException e) {

-      e.printStackTrace();

-      return null;

-

-    } catch (IOException e) {

-      e.printStackTrace();

-      return null;

-    }

-

-    final Node root = parse.getDocumentElement();

-    final NodeList nodeList = root.getChildNodes();

-

-    for (int i = 0; i < nodeList.getLength(); ++i) {

-      final Node node = nodeList.item(i);

-      final String nodeName = node.getNodeName();

-      // "rule" node ?

-      if (!nodeName.equals("rule")) { //$NON-NLS-1$

-        continue;

-      }

-

-      // Collect type or pattern, label, and color text style

-      NodeList childrenList = node.getChildNodes();

-      String type = ""; //$NON-NLS-1$ 

-      String label = ""; //$NON-NLS-1$ 

-      String colorText = ""; //$NON-NLS-1$ 

-      for (int j = 0; j < childrenList.getLength(); ++j) {

-        final Node child = childrenList.item(j);

-        final String childName = child.getNodeName();

-

-        if (childName.equals("pattern")) { //$NON-NLS-1$ 

-          type = getTextValue(child);

-        } else if (childName.equals("label")) { //$NON-NLS-1$ 

-          label = getTextValue(child);

-        } else if (childName.equals("style")) { //$NON-NLS-1$ 

-          colorText = getTextValue(child);

-        }

-      }

-

-      StyleMapEntry styleMapEntry = getStyleMapEntry(type, label, colorText);

-      result.put(styleMapEntry.getAnnotationTypeName(), styleMapEntry);

-    }

-    return result;

-  }

-

-  protected StyleMapEntry getStyleMapEntry(String type, String label, String styleColor) {

-    StyleMapEntry result = new StyleMapEntry();

-    result.setAnnotationTypeName(type);

-    result.setLabel(label);

-    StringTokenizer token = new StringTokenizer(styleColor, ":;");

-    if (!token.hasMoreTokens()) {

-      return null; // No token

-    }

-

-    token.nextToken();

-    String fgString = token.nextToken().toLowerCase().trim();

-    result.setForeground(parseColorForeground(fgString));

-

-    token.nextToken();

-    String bgString = token.nextToken().toLowerCase().trim();

-    result.setBackground(parseColorBackground(bgString));

-

-    boolean checked = false; // default to Checked

-    if (token.hasMoreTokens()) {

-      String ck = token.nextToken();

-      String tf = token.nextToken();

-      if (ck.equals("checked")) {

-        if (tf.equals("false")) {

-          checked = false;

-        } else if (tf.equals("true")) {

-          checked = true;

-        }

-      }

-    }

-    result.setChecked(checked);

-

-    boolean hidden = false;

-    if (token.hasMoreTokens()) {

-      String ck = token.nextToken();

-      String tf = token.nextToken();

-      if (ck.equals("hidden")) {

-        if (tf.equals("true")) {

-          hidden = true;

-        }

-      }

-    }

-    result.setHidden(hidden);

-    return result;

-  }

-

-  private String getTextValue(final Node node) {

-    final Node first = node.getFirstChild();

-

-    if (first != null) {

-      return ((Text) first).getNodeValue().trim();

-

-    } else {

-      return null;

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java
deleted file mode 100644
index dba8018..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/ViewWriter.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.File;

-import java.io.FileOutputStream;

-

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.AbstractCas;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.impl.XmiCasSerializer;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.fit.component.JCasMultiplier_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.util.CasCopier;

-import org.apache.uima.util.XMLSerializer;

-

-/**

- * This Analysis Engine is able to serialize the processed CAS to an XMI file whereas the the source

- * and destination view can be specified A descriptor file for this Analysis Engine is located in

- * the folder <code>descriptor/utils</code> of a UIMA Ruta project.

- * 

- */

-public class ViewWriter extends JCasMultiplier_ImplBase {

-

-  /**

-   * This string parameter specifies the absolute path of the resulting file named

-   * <code>output.xmi</code>. However, if an annotation of the type

-   * <code>org.apache.uima.examples.SourceDocumentInformation</code> is given, then the value of

-   * this parameter is interpreted to be relative to the URI stored in the annotation and the name

-   * of the file will be adapted to the name of the source file. If this functionality is activated

-   * in the preferences, then the UIMA Ruta Workbench adds the SourceDocumentInformation annotation

-   * when the user launches a script file.

-   */

-  public static final String PARAM_OUTPUT = "output";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT, mandatory = false, defaultValue = "")

-  private String output;

-

-  

-  /**

-   * The name of the view that should be stored in a file. The default value is "_InitialView".

-   */

-  public static final String PARAM_INPUT_VIEW = "inputView";

-

-  @ConfigurationParameter(name = PARAM_INPUT_VIEW, mandatory = false, defaultValue = "_InitialView")

-  private String inputView;

-  

-

-  /**

-   * The name, which should be used, to store the view in the file. The default value is "_InitialView".

-   */

-  public static final String PARAM_OUTPUT_VIEW = "outputView";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT_VIEW, mandatory = false, defaultValue = "_InitialView")

-  private String outputView;

-  

-

-

-

-

-  private CAS outView;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    output = (String) aContext.getConfigParameterValue(PARAM_OUTPUT);

-    inputView = (String) aContext.getConfigParameterValue(PARAM_INPUT_VIEW);

-    outputView = (String) aContext.getConfigParameterValue(PARAM_OUTPUT_VIEW);

-  }

-

-  private static void writeXmi(CAS aCas, File name) throws Exception {

-    FileOutputStream out = null;

-

-    try {

-      // write XMI

-      out = new FileOutputStream(name);

-      XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());

-      XMLSerializer xmlSer = new XMLSerializer(out, false);

-      ser.serialize(aCas, xmlSer.getContentHandler());

-    } catch (Exception e) {

-      throw e;

-    } finally {

-      if (out != null) {

-        out.close();

-      }

-    }

-  }

-

-  @Override

-  public void process(JCas jcas) throws AnalysisEngineProcessException {

-    CAS cas = jcas.getCas();

-    Type sdiType = cas.getTypeSystem().getType(RutaEngine.SOURCE_DOCUMENT_INFORMATION);

-

-    File file = new File(output);

-    if (file.isDirectory()) {

-      String filename = "output.xmi";

-      file = new File(output, filename);

-    }

-    if (sdiType != null) {

-      FSIterator<AnnotationFS> sdiit = cas.getAnnotationIndex(sdiType).iterator();

-      if (sdiit.isValid()) {

-        AnnotationFS annotationFS = sdiit.get();

-        Feature uriFeature = sdiType.getFeatureByBaseName("uri");

-        String stringValue = annotationFS.getStringValue(uriFeature);

-        File f = new File(stringValue);

-        String name = f.getName();

-        if (!name.endsWith(".xmi")) {

-          name = name + ".xmi";

-        }

-        String parent = f.getParent().endsWith("/") ? f.getParent() : f.getParent() + "/";

-        file = new File(parent + output, name);

-        file.getParentFile().mkdirs();

-      }

-

-    }

-    CAS inView = cas.getView(inputView);

-    if (outView == null) {

-      outView = getContext().getEmptyCas(CAS.class);

-    }

-    outView.reset();

-    CasCopier cc = new CasCopier(inView, outView, true);

-    cc.copyCasView(inView, outputView, true);

-    try {

-      writeXmi(outView, file);

-    } catch (Exception e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-  }

-

-  @Override

-  public void collectionProcessComplete() {

-    if (outView != null) {

-      outView.release();

-    }

-    outView = null;

-  }

-

-  public boolean hasNext() throws AnalysisEngineProcessException {

-    return false;

-  }

-

-  public AbstractCas next() throws AnalysisEngineProcessException {

-    return null;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/XMIWriter.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/XMIWriter.java
deleted file mode 100644
index 4ec446d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/XMIWriter.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.File;

-import java.io.FileOutputStream;

-

-import org.apache.uima.UimaContext;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.impl.XmiCasSerializer;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.fit.component.JCasAnnotator_ImplBase;

-import org.apache.uima.fit.descriptor.ConfigurationParameter;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.util.XMLSerializer;

-

-/**

- * This Analysis Engine is able to serialize the processed CAS to an XMI file. One use case for the

- * XMI Writer is, for example, a rule-based sort, which stores the processed XMI files in different

- * folder, dependent on the execution of the rules, e.g., whether a pattern of annotations occurs or

- * not. A descriptor file for this Analysis Engine is located in the folder

- * <code>descriptor/utils</code> of a UIMA Ruta project.

- * 

- */

-public class XMIWriter extends JCasAnnotator_ImplBase {

-

-  /**

-   * This string parameter specifies the absolute path of the resulting file named

-   * <code>output.xmi</code>. However, if an annotation of the type

-   * <code>org.apache.uima.examples.SourceDocumentInformation</code> is given, then the value of

-   * this parameter is interpreted to be relative to the URI stored in the annotation and the name

-   * of the file will be adapted to the name of the source file. If this functionality is activated

-   * in the preferences, then the UIMA Ruta Workbench adds the SourceDocumentInformation annotation

-   * when the user launches a script file. The default value is <code>/../output/</code>

-   */

-  public static final String PARAM_OUTPUT = "Output";

-

-  @ConfigurationParameter(name = PARAM_OUTPUT, mandatory = false, defaultValue = "_InitialView")

-  private String output;

-

-  private UimaContext context;

-

-  @Override

-  public void initialize(UimaContext aContext) throws ResourceInitializationException {

-    super.initialize(aContext);

-    if (aContext == null && context != null) {

-      aContext = context;

-    }

-    if (aContext != null) {

-      output = (String) aContext.getConfigParameterValue(PARAM_OUTPUT);

-      this.context = aContext;

-    }

-  }

-

-  private static void writeXmi(CAS aCas, File name) throws Exception {

-    FileOutputStream out = null;

-

-    try {

-      // write XMI

-      out = new FileOutputStream(name);

-      XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());

-      XMLSerializer xmlSer = new XMLSerializer(out, false);

-      ser.serialize(aCas, xmlSer.getContentHandler());

-    } catch (Exception e) {

-      throw e;

-    } finally {

-      if (out != null) {

-        out.close();

-      }

-    }

-  }

-

-  @Override

-  public void process(JCas jcas) throws AnalysisEngineProcessException {

-    CAS cas = jcas.getCas();

-

-    Type sdiType = cas.getTypeSystem().getType(RutaEngine.SOURCE_DOCUMENT_INFORMATION);

-

-    String filename = "output.txt";

-    File file = new File(output, filename);

-    if (sdiType != null) {

-      FSIterator<AnnotationFS> sdiit = cas.getAnnotationIndex(sdiType).iterator();

-      if (sdiit.isValid()) {

-        AnnotationFS annotationFS = sdiit.get();

-        Feature uriFeature = sdiType.getFeatureByBaseName("uri");

-        String stringValue = annotationFS.getStringValue(uriFeature);

-        File f = new File(stringValue);

-        String name = f.getName();

-        if (!name.endsWith(".xmi")) {

-          name = name + ".xmi";

-        }

-        String parent = f.getParent().endsWith("/") ? f.getParent() : f.getParent() + "/";

-        file = new File(parent + output, name);

-      }

-

-    }

-    try {

-      writeXmi(cas, file);

-    } catch (Exception e) {

-      throw new AnalysisEngineProcessException(e);

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/ExpressionFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/ExpressionFactory.java
deleted file mode 100644
index d2aeff4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/ExpressionFactory.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*

- * 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.ruta.expression;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.antlr.runtime.Token;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.expression.bool.BooleanFeatureExpression;

-import org.apache.uima.ruta.expression.bool.BooleanNumberExpression;

-import org.apache.uima.ruta.expression.bool.BooleanTypeExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.ReferenceBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanFunction;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.feature.GenericFeatureExpression;

-import org.apache.uima.ruta.expression.feature.SimpleFeatureExpression;

-import org.apache.uima.ruta.expression.list.BooleanListExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.NumberListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceBooleanListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceNumberListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceStringListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceTypeListExpression;

-import org.apache.uima.ruta.expression.list.SimpleBooleanListExpression;

-import org.apache.uima.ruta.expression.list.SimpleNumberListExpression;

-import org.apache.uima.ruta.expression.list.SimpleStringListExpression;

-import org.apache.uima.ruta.expression.list.SimpleTypeListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.list.UntypedListExpression;

-import org.apache.uima.ruta.expression.number.ComposedNumberExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.NegativeNumberExpression;

-import org.apache.uima.ruta.expression.number.NumberFeatureExpression;

-import org.apache.uima.ruta.expression.number.ReferenceNumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.resource.ExternalWordListExpression;

-import org.apache.uima.ruta.expression.resource.ExternalWordTableExpression;

-import org.apache.uima.ruta.expression.resource.LiteralWordListExpression;

-import org.apache.uima.ruta.expression.resource.LiteralWordTableExpression;

-import org.apache.uima.ruta.expression.resource.ReferenceWordListExpression;

-import org.apache.uima.ruta.expression.resource.ReferenceWordTableExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.expression.string.ComposedStringExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.string.ReferenceStringExpression;

-import org.apache.uima.ruta.expression.string.SimpleStringExpression;

-import org.apache.uima.ruta.expression.string.StringFeatureExpression;

-import org.apache.uima.ruta.expression.type.ReferenceTypeExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ExpressionFactory {

-

-  private ExpressionFactory() {

-  }

-

-  public static INumberExpression createIntegerExpression(Token number, Token minus) {

-    Integer valueOf = Integer.valueOf(number.getText());

-    SimpleNumberExpression simpleNumberExpression = new SimpleNumberExpression(valueOf);

-    if (minus != null) {

-      return new NegativeNumberExpression(simpleNumberExpression);

-    } else {

-      return simpleNumberExpression;

-    }

-  }

-

-  public static INumberExpression createDoubleExpression(Token number, Token minus) {

-    Double valueOf = Double.valueOf(number.getText());

-    SimpleNumberExpression simpleNumberExpression = new SimpleNumberExpression(valueOf);

-    if (minus != null) {

-      return new NegativeNumberExpression(simpleNumberExpression);

-    } else {

-      return simpleNumberExpression;

-    }

-  }

-

-  public static INumberExpression createReferenceNumberExpression(Token var, Token minus) {

-    ReferenceNumberExpression simpleNumberExpression = new ReferenceNumberExpression(var.getText());

-    if (minus != null) {

-      return new NegativeNumberExpression(simpleNumberExpression);

-    } else {

-      return simpleNumberExpression;

-    }

-  }

-

-  public static INumberExpression createComposedNumberExpression(List<INumberExpression> expressions,

-          List<Token> opTokens) {

-    List<String> ops = new ArrayList<String>();

-    for (Token token : opTokens) {

-      ops.add(token.getText());

-    }

-    return new ComposedNumberExpression(expressions, ops);

-  }

-

-  public static INumberExpression createComposedNumberExpression(INumberExpression expression,

-          Token opToken) {

-    List<String> ops = new ArrayList<String>();

-    List<INumberExpression> exprList = new ArrayList<INumberExpression>();

-    ops.add(opToken.getText());

-    exprList.add(expression);

-    return new ComposedNumberExpression(exprList, ops);

-  }

-

-  public static AbstractStringExpression createSimpleStringExpression(Token token) {

-    String text = token.getText();

-    String substring = text.substring(1, text.length() - 1);

-    return new SimpleStringExpression(substring);

-  }

-

-  public static IStringExpression createComposedStringExpression(List<IStringExpression> expressions) {

-    return new ComposedStringExpression(expressions);

-  }

-

-  public static AbstractStringExpression createReferenceStringExpression(Token var) {

-    return new ReferenceStringExpression(var.getText());

-  }

-

-  public static IBooleanExpression createBooleanNumberExpression(INumberExpression e1, Token op,

-          INumberExpression e2) {

-    return new BooleanNumberExpression(e1, op.getText(), e2);

-  }

-

-  public static IBooleanExpression createSimpleBooleanExpression(Token v) {

-    return new SimpleBooleanExpression(Boolean.valueOf(v.getText()));

-  }

-

-  public static IBooleanExpression createReferenceBooleanExpression(Token id) {

-    return new ReferenceBooleanExpression(id.getText());

-  }

-

-  public static TypeExpression createSimpleTypeExpression(Token typeToken, RutaBlock parent) {

-    String typeString = typeToken == null ? "uima.tcas.DocumentAnnotation" : typeToken.getText();

-    return new SimpleTypeExpression(typeString);

-  }

-

-  public static TypeExpression createReferenceTypeExpression(Token varToken) {

-    String varString = varToken == null ? "" : varToken.getText();

-    return new ReferenceTypeExpression(varString);

-  }

-

-  public static TypeExpression createSimpleTypeExpression(String typeString, RutaBlock parent) {

-    return new SimpleTypeExpression(typeString);

-  }

-

-  public static IBooleanExpression createBooleanFunction(Token op, IBooleanExpression e1,

-          IBooleanExpression e2) {

-    return new SimpleBooleanFunction(op.getText(), e1, e2);

-  }

-

-  public static WordTableExpression createReferenceWordTableExpression(Token id) {

-    return new ReferenceWordTableExpression(id.getText());

-  }

-

-  public static WordListExpression createReferenceWordListExpression(Token id) {

-    return new ReferenceWordListExpression(id.getText());

-  }

-

-  public static WordListExpression createLiteralWordListExpression(Token path) {

-    return new LiteralWordListExpression(path.getText());

-  }

-

-  public static WordTableExpression createLiteralWordTableExpression(Token path) {

-    return new LiteralWordTableExpression(path.getText());

-  }

-

-  public static IBooleanExpression createBooleanTypeExpression(TypeExpression e1, Token op,

-          TypeExpression e2) {

-    return new BooleanTypeExpression(e1, op.getText(), e2);

-  }

-

-  public static BooleanListExpression createReferenceBooleanListExpression(Token var) {

-    return new ReferenceBooleanListExpression(var.getText());

-  }

-

-  public static StringListExpression createReferenceStringListExpression(Token var) {

-    return new ReferenceStringListExpression(var.getText());

-  }

-

-  public static TypeListExpression createReferenceTypeListExpression(Token var) {

-    return new ReferenceTypeListExpression(var.getText());

-  }

-

-  public static NumberListExpression createReferenceDoubleListExpression(Token var) {

-    return new ReferenceNumberListExpression(var.getText());

-  }

-

-  public static NumberListExpression createReferenceIntListExpression(Token var) {

-    return new ReferenceNumberListExpression(var.getText());

-  }

-

-  public static NumberListExpression createReferenceFloatListExpression(Token var) {

-    return new ReferenceNumberListExpression(var.getText());

-  }

-

-  public static BooleanListExpression createBooleanListExpression(List<IBooleanExpression> list) {

-    return new SimpleBooleanListExpression(list);

-  }

-

-  public static NumberListExpression createNumberListExpression(List<INumberExpression> list) {

-    return new SimpleNumberListExpression(list);

-  }

-

-  public static TypeListExpression createTypeListExpression(List<TypeExpression> list) {

-    return new SimpleTypeListExpression(list);

-  }

-

-  public static StringListExpression createStringListExpression(List<IStringExpression> list) {

-    return new SimpleStringListExpression(list);

-  }

-

-  public static FeatureExpression createFeatureExpression(MatchReference mr, RutaBlock env) {

-    return new SimpleFeatureExpression(mr);

-  }

-  

-  public static FeatureMatchExpression createFeatureMatchExpression(MatchReference mr, RutaBlock env) {

-    return new FeatureMatchExpression(mr, env);

-  }

-

-  public static MatchReference createMatchReference(Token refToken, Token opToken,

-          IRutaExpression arg) {

-    String match = refToken.getText();

-    String op = null;

-    if (opToken != null) {

-      op = opToken.getText();

-    }

-    return new MatchReference(match, op, arg);

-  }

-

-  public static INumberExpression createNumberFeatureExpression(FeatureExpression fe) {

-    return new NumberFeatureExpression(fe);

-  }

-

-  public static AbstractStringExpression createStringFeatureExpression(FeatureExpression fe) {

-    return new StringFeatureExpression(fe);

-  }

-

-  public static IBooleanExpression createBooleanFeatureExpression(FeatureExpression fe) {

-    return new BooleanFeatureExpression(fe);

-  }

-

-  public static GenericFeatureExpression createGenericFeatureExpression(FeatureExpression fe) {

-    return new GenericFeatureExpression(fe);

-  }

-

-  public static ListExpression<Object> createUntypedListExpression(List<IRutaExpression> list) {

-    return new UntypedListExpression(list);

-  }

-

-  public static WordListExpression createExternalWordListExpression(Token name,

-          List<IStringExpression> args) {

-    return new ExternalWordListExpression(name.getText(), args);

-  }

-  

-  public static WordTableExpression createExternalWordTableExpression(Token name,

-          List<IStringExpression> args) {

-    return new ExternalWordTableExpression(name.getText(), args);

-  }

-

-  public static IRutaExpression createNullExpression() {

-    return new NullExpression();

-  }

-  

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/IRutaExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/IRutaExpression.java
deleted file mode 100644
index 1aaccc8..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/IRutaExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.ruta.expression;
-
-public interface IRutaExpression {
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/MatchReference.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/MatchReference.java
deleted file mode 100644
index 5e7435e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/MatchReference.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*

- * 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.ruta.expression;

-

-import java.util.Arrays;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.feature.SimpleFeatureExpression;

-import org.apache.uima.ruta.expression.type.ReferenceTypeExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class MatchReference extends RutaExpression {

-

-  private String match;

-

-  private String op;

-

-  private IRutaExpression arg;

-

-  private TypeExpression typeExpression;

-

-  private FeatureExpression featureExpression;

-

-  public MatchReference(String match, String op, IRutaExpression arg) {

-    super();

-    this.match = match;

-    this.op = op;

-    this.arg = arg;

-  }

-

-  public MatchReference(TypeExpression expression) {

-    super();

-    this.typeExpression = expression;

-  }

-

-  private void resolve(RutaBlock parent) {

-    if (typeExpression != null) {

-      return;

-    }

-    RutaEnvironment e = parent.getEnvironment();

-    typeExpression = buildTypeExpression(match, e);

-    if (typeExpression == null) {

-      String[] elements = match.split("[.]");

-      StringBuilder sb = new StringBuilder();

-      List<String> tail = null;

-      int counter = 0;

-      for (String eachPart : elements) {

-        if (sb.length() != 0) {

-          sb.append('.');

-        }

-        sb.append(eachPart);

-        String head = sb.toString();

-        typeExpression = buildTypeExpression(head, e);

-        if (typeExpression != null) {

-          tail = Arrays.asList(elements).subList(counter + 1, elements.length);

-          break;

-        }

-        counter++;

-      }

-      if (tail != null) {

-        if (op == null) {

-          featureExpression = new SimpleFeatureExpression(typeExpression, tail);

-        } else {

-          SimpleFeatureExpression expr = new SimpleFeatureExpression(typeExpression, tail);

-          featureExpression = new FeatureMatchExpression(expr, op, arg, parent);

-        }

-      }

-    }

-    if(typeExpression == null || typeExpression.getType(parent) == null) {

-      throw new IllegalArgumentException("Not able to resolve type of expression: "+ match);

-    }

-  }

-

-  private TypeExpression buildTypeExpression(String candidate, RutaEnvironment e) {

-    if (e.isVariableOfType(candidate, "TYPE")) {

-      return new ReferenceTypeExpression(candidate);

-    } else if (e.getType(candidate) != null) {

-      return new SimpleTypeExpression(candidate);

-    }

-    return null;

-  }

-

-  public TypeExpression getTypeExpression(RutaBlock parent) {

-    resolve(parent);

-    return typeExpression;

-  }

-

-  public FeatureExpression getFeatureExpression(RutaBlock parent) {

-    resolve(parent);

-    return featureExpression;

-  }

-

-  public String getOp() {

-    return op;

-  }

-

-  public IRutaExpression getArg() {

-    return arg;

-  }

-

-  public RutaExpression getRawTypeExpression() {

-    return typeExpression;

-  }

-

-  public RutaExpression getRawFeatureExpression() {

-    return featureExpression;

-  }

-

-  public String toString() {

-    String tail = "";

-    if (op != null) {

-      tail += op;

-    }

-    if (arg != null) {

-      tail += arg.toString();

-    }

-    return match + tail;

-  }

-

-  public String getMatch() {

-    return match;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/NullExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/NullExpression.java
deleted file mode 100644
index 7f59192..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/NullExpression.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.ruta.expression;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.feature.FeatureExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.expression.type.ITypeExpression;
-import org.apache.uima.ruta.expression.type.TypeExpression;
-import org.apache.uima.ruta.rule.RuleElement;
-import org.apache.uima.ruta.rule.RuleMatch;
-
-public class NullExpression extends FeatureExpression implements IStringExpression, ITypeExpression{
-
-  @Override
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    return null;
-  }
-
-  @Override
-  public String getStringValue(RutaBlock parent, RuleMatch match, RuleElement element,
-          RutaStream stream) {
-    return null;
-  }
-
-  @Override
-  public Feature getFeature(RutaBlock parent) {
-    return null;
-  }
-
-  @Override
-  public List<Feature> getFeatures(RutaBlock parent) {
-    return null;
-  }
-
-  @Override
-  public List<String> getFeatureStringList(RutaBlock parent) {
-    return null;
-  }
-
-  @Override
-  public TypeExpression getTypeExpr(RutaBlock parent) {
-    return null;
-  }
-
-  @Override
-  public Collection<AnnotationFS> getFeatureAnnotations(Collection<AnnotationFS> annotations,
-          RutaStream stream, RutaBlock parent, boolean checkOnFeatureValue) {
-    return null;
-  }
-
-  @Override
-  public Type getType(RutaBlock parent) {
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/RutaExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/RutaExpression.java
deleted file mode 100644
index 29cb887..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/RutaExpression.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.expression;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.List;

-

-import org.apache.commons.collections.CollectionUtils;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-

-public class RutaExpression extends RutaElement implements IRutaExpression {

-

-  protected List<AnnotationFS> getTargetAnnotation(AnnotationFS annotation, Type type,

-          RutaStream stream) {

-    if (annotation == null) {

-      return Collections.emptyList();

-    }

-    if (annotation.getType().equals(type)

-            || stream.getCas().getTypeSystem().subsumes(type, annotation.getType())) {

-      List<AnnotationFS> result = new ArrayList<AnnotationFS>(1);

-      result.add(annotation);

-      return result;

-    } else {

-      Collection<AnnotationFS> beginAnchors = stream.getBeginAnchor(annotation.getBegin())

-              .getBeginAnchors(type);

-      Collection<AnnotationFS> endAnchors = stream.getEndAnchor(annotation.getEnd()).getEndAnchors(type);

-      @SuppressWarnings("unchecked")

-      Collection<AnnotationFS> intersection = CollectionUtils

-              .intersection(beginAnchors, endAnchors);

-      return new ArrayList<AnnotationFS>(intersection);

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/AbstractBooleanExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/AbstractBooleanExpression.java
deleted file mode 100644
index b7bc4b3..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/AbstractBooleanExpression.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-

-public abstract class AbstractBooleanExpression extends AbstractStringExpression implements IBooleanExpression {

-

-  public boolean getBooleanValue(RutaBlock parent, RuleMatch match, RuleElement element,

-          RutaStream stream) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    // TODO: do we need to select the correct annotation?

-    AnnotationFS annotation = null;

-    if (!matchedAnnotationsOf.isEmpty()) {

-      annotation = matchedAnnotationsOf.get(0);

-    }

-    return getBooleanValue(parent, annotation, stream);

-  }

-

-  public abstract boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation,

-          RutaStream stream);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanFeatureExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanFeatureExpression.java
deleted file mode 100644
index 1167c11..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanFeatureExpression.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-

-public class BooleanFeatureExpression extends AbstractBooleanExpression {

-

-  private FeatureExpression fe;

-

-  public BooleanFeatureExpression(FeatureExpression fe) {

-    super();

-    this.fe = fe;

-  }

-

-  @Override

-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Type type = fe.getTypeExpr(parent).getType(parent);

-    Feature feature = fe.getFeature(parent);

-    List<AnnotationFS> list = getTargetAnnotation(annotation, type, stream);

-    Collection<AnnotationFS> featureAnnotations = fe.getFeatureAnnotations(list, stream, parent,

-            false);

-    if (!featureAnnotations.isEmpty()) {

-      AnnotationFS next = featureAnnotations.iterator().next();

-      return next.getBooleanValue(feature);

-    }

-    return false;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return "" + getBooleanValue(parent, annotation, stream);

-  }

-

-  public FeatureExpression getFe() {

-    return fe;

-  }

-

-  public void setFe(FeatureExpression fe) {

-    this.fe = fe;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanFunctionExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanFunctionExpression.java
deleted file mode 100644
index 33053be..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanFunctionExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-public abstract class BooleanFunctionExpression extends AbstractBooleanExpression {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanNumberExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanNumberExpression.java
deleted file mode 100644
index c68eb33..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanNumberExpression.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-

-public class BooleanNumberExpression extends AbstractBooleanExpression {

-

-  private final INumberExpression e1;

-

-  private final String op;

-

-  private final INumberExpression e2;

-

-  public BooleanNumberExpression(INumberExpression e1, String op, INumberExpression e2) {

-    super();

-    this.e1 = e1;

-    this.op = op;

-    this.e2 = e2;

-  }

-

-  @Override

-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    double doubleValue1 = getFristExpression().getDoubleValue(parent, null, stream);

-    double doubleValue2 = getSecondExpression().getDoubleValue(parent, null, stream);

-    return eval(doubleValue1, getOperator(), doubleValue2);

-  }

-

-  private boolean eval(double t1, String op, double t2) {

-    if ("==".equals(op)) {

-      return t1 == t2;

-    } else if ("!=".equals(op)) {

-      return t1 != t2;

-    } else if ("<".equals(op)) {

-      return t1 < t2;

-    } else if ("<=".equals(op)) {

-      return t1 <= t2;

-    } else if (">".equals(op)) {

-      return t1 > t2;

-    } else if (">=".equals(op)) {

-      return t1 >= t2;

-    }

-    return false;

-  }

-

-  public INumberExpression getFristExpression() {

-    return e1;

-  }

-

-  public String getOperator() {

-    return op;

-  }

-

-  public INumberExpression getSecondExpression() {

-    return e2;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return e1.getStringValue(parent, annotation, stream) + " " + op + " "

-            + e2.getStringValue(parent, annotation, stream);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanTypeExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanTypeExpression.java
deleted file mode 100644
index 755a793..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/BooleanTypeExpression.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class BooleanTypeExpression extends AbstractBooleanExpression {

-

-  private final TypeExpression e1;

-

-  private final String op;

-

-  private final TypeExpression e2;

-

-  public BooleanTypeExpression(TypeExpression e1, String op, TypeExpression e2) {

-    super();

-    this.e1 = e1;

-    this.op = op;

-    this.e2 = e2;

-  }

-

-  @Override

-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Type type1 = getFristExpression().getType(parent);

-    String first = type1.getName();

-    Type type2 = getSecondExpression().getType(parent);

-    String second = type2.getName();

-    return eval(first, getOperator(), second);

-  }

-

-  private boolean eval(String t1, String op, String t2) {

-    if ("==".equals(op)) {

-      return t1.equals(t2);

-    } else if ("!=".equals(op)) {

-      return !t1.equals(t2);

-    }

-    return false;

-  }

-

-  public TypeExpression getFristExpression() {

-    return e1;

-  }

-

-  public String getOperator() {

-    return op;

-  }

-

-  public TypeExpression getSecondExpression() {

-    return e2;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return e1.getStringValue(parent, annotation, stream) + " " + op + " "

-            + e2.getStringValue(parent, annotation, stream);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/IBooleanExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/IBooleanExpression.java
deleted file mode 100644
index 3f1bb7a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/IBooleanExpression.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.ruta.expression.bool;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.rule.RuleElement;
-import org.apache.uima.ruta.rule.RuleMatch;
-
-public interface IBooleanExpression extends IStringExpression {
-  
-  boolean getBooleanValue(RutaBlock parent, RuleMatch match, RuleElement element, RutaStream stream);
-
-  boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream);
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/ReferenceBooleanExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/ReferenceBooleanExpression.java
deleted file mode 100644
index 2defc99..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/ReferenceBooleanExpression.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class ReferenceBooleanExpression extends AbstractBooleanExpression {

-

-  private final String var;

-

-  public ReferenceBooleanExpression(String var) {

-    super();

-    this.var = var;

-  }

-

-  @Override

-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Boolean variableValue = parent.getEnvironment().getVariableValue(var, Boolean.class);

-    if (variableValue == null) {

-      return false;

-    }

-    return variableValue;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getBooleanValue(parent, null, stream) ? "true" : "false";

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/SimpleBooleanExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/SimpleBooleanExpression.java
deleted file mode 100644
index b157031..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/SimpleBooleanExpression.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class SimpleBooleanExpression extends AbstractBooleanExpression {

-

-  private final boolean value;

-

-  public SimpleBooleanExpression(boolean value) {

-    super();

-    this.value = value;

-  }

-

-  @Override

-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getPrimitiveValue();

-  }

-

-  public boolean getPrimitiveValue() {

-    return value;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getBooleanValue(parent, null, stream) ? "true" : "false";

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/SimpleBooleanFunction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/SimpleBooleanFunction.java
deleted file mode 100644
index 18d4b0d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/bool/SimpleBooleanFunction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.expression.bool;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class SimpleBooleanFunction extends AbstractBooleanExpression {

-

-  private String op;

-

-  private IBooleanExpression e1;

-

-  private IBooleanExpression e2;

-

-  public SimpleBooleanFunction(String text, IBooleanExpression e1, IBooleanExpression e2) {

-    super();

-    this.op = text;

-    this.e1 = e1;

-    this.e2 = e2;

-  }

-

-  @Override

-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    boolean b1 = e1.getBooleanValue(parent, null, stream);

-    boolean b2 = e2.getBooleanValue(parent, null, stream);

-    if ("XOR".equals(op)) {

-      return (b1 || b2) && !(b1 && b2);

-    } else if ("==".equals(op)) {

-      return b1 == b2;

-    } else if ("!=".equals(op)) {

-      return b1 != b2;

-    }

-    return false;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return e1.getStringValue(parent, annotation, stream) + " " + op + " "

-            + e2.getStringValue(parent, annotation, stream);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureExpression.java
deleted file mode 100644
index e484941..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureExpression.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.expression.feature;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public abstract class FeatureExpression extends RutaExpression {

-

-  public abstract Feature getFeature(RutaBlock parent);

-

-  public abstract List<Feature> getFeatures(RutaBlock parent);

-

-  public abstract List<String> getFeatureStringList(RutaBlock parent);

-

-  public abstract TypeExpression getTypeExpr(RutaBlock parent);

-

-  public abstract Collection<AnnotationFS> getFeatureAnnotations(

-          Collection<AnnotationFS> annotations, RutaStream stream, RutaBlock parent,

-          boolean checkOnFeatureValue);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureMatchExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureMatchExpression.java
deleted file mode 100644
index cb88db2..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureMatchExpression.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*

- * 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.ruta.expression.feature;

-

-import java.math.BigDecimal;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-

-public class FeatureMatchExpression extends SimpleFeatureExpression {

-

-  public static final String EQUAL = "==";

-

-  public static final String NOT_EQUAL = "!=";

-

-  private IRutaExpression arg;

-

-  private String op;

-

-  public FeatureMatchExpression(FeatureExpression f, String op, IRutaExpression arg,

-          RutaBlock parent) {

-    super(f.getTypeExpr(parent), f.getFeatureStringList(parent));

-    this.op = op;

-    this.arg = arg;

-  }

-

-  public FeatureMatchExpression(MatchReference mr, RutaBlock env) {

-    super(mr);

-  }

-

-  public IRutaExpression getArg() {

-    if (getMatchReference() != null && arg == null) {

-      arg = getMatchReference().getArg();

-    }

-    return arg;

-  }

-

-  public void setArg(RutaExpression arg) {

-    this.arg = arg;

-  }

-

-  public String getOp() {

-    if (getMatchReference() != null && op == null) {

-      op = getMatchReference().getOp();

-    }

-    return op;

-  }

-

-  public void setOp(String op) {

-    this.op = op;

-  }

-

-  public boolean checkFeatureValue(AnnotationFS afs, RutaStream stream, RutaBlock parent) {

-    Feature feature = getFeature(parent);

-    return checkFeatureValue(afs, feature, stream, parent);

-  }

-

-  public boolean checkFeatureValue(AnnotationFS afs, Feature feature, RutaStream stream,

-          RutaBlock parent) {

-    // null is possibly coveredText

-    String rn = feature == null ? UIMAConstants.TYPE_STRING : feature.getRange().getName();

-    if (rn.equals(UIMAConstants.TYPE_BOOLEAN)) {

-      Boolean v1 = afs.getBooleanValue(feature);

-      if (getArg() instanceof IBooleanExpression) {

-        IBooleanExpression expr = (IBooleanExpression) getArg();

-        Boolean v2 = expr.getBooleanValue(parent, afs, stream);

-        return compare(v1, v2);

-      }

-    } else if (rn.equals(UIMAConstants.TYPE_INTEGER) || rn.equals(UIMAConstants.TYPE_BYTE)

-            || rn.equals(UIMAConstants.TYPE_SHORT) || rn.equals(UIMAConstants.TYPE_LONG)) {

-      Integer v1 = afs.getIntValue(feature);

-      if (getArg() instanceof INumberExpression) {

-        INumberExpression expr = (INumberExpression) getArg();

-        Integer v2 = expr.getIntegerValue(parent, afs, stream);

-        return compare(v1, v2);

-      }

-    } else if (rn.equals(UIMAConstants.TYPE_DOUBLE)) {

-      Double v1 = afs.getDoubleValue(feature);

-      if (getArg() instanceof INumberExpression) {

-        INumberExpression expr = (INumberExpression) getArg();

-        Double v2 = expr.getDoubleValue(parent, afs, stream);

-        return compare(v1, v2);

-      }

-    } else if (rn.equals(UIMAConstants.TYPE_FLOAT)) {

-      Float v1 = afs.getFloatValue(feature);

-      if (getArg() instanceof INumberExpression) {

-        INumberExpression expr = (INumberExpression) getArg();

-        Float v2 = expr.getFloatValue(parent, afs, stream);

-        return compare(v1, v2);

-      }

-    } else if (rn.equals(UIMAConstants.TYPE_STRING)) {

-      String v1 = afs.getCoveredText();

-      // null is possibly coveredText

-      if (feature != null) {

-        v1 = afs.getStringValue(feature);

-      }

-      if (getArg() instanceof IStringExpression) {

-        IStringExpression expr = (IStringExpression) getArg();

-        String v2 = expr.getStringValue(parent, afs, stream);

-        return compare(v1, v2);

-      }

-    } else if(!feature.getRange().isPrimitive() && getArg() instanceof FeatureExpression) {

-      FeatureExpression fe = (FeatureExpression) getArg();

-      List<AnnotationFS> list = new ArrayList<AnnotationFS>(1);

-      list.add(afs);

-      Collection<AnnotationFS> featureAnnotations = fe.getFeatureAnnotations(list, stream, parent, false);

-      return compare(afs.getFeatureValue(feature), featureAnnotations);

-    }

-    return false;

-  }

-

-  private boolean compare(Object v1, Object v2) {

-    if (v1 == null || v2 == null) {

-      if(v1 == null && v2 == null) {

-        if(getOp().equals("==")) {

-          return true;

-        } else if (getOp().equals("!=")){

-          return false;

-        }

-      } else {

-        if(getOp().equals("==")) {

-          return false;

-        } else if (getOp().equals("!=")){

-          return true;

-        }

-      }

-    } else if (v1 instanceof Number && v2 instanceof Number) {

-      Number n1 = (Number) v1;

-      Number n2 = (Number) v2;

-      int compareTo = new BigDecimal(n1.toString()).compareTo(new BigDecimal(n2.toString()));

-      if (getOp().equals("==")) {

-        return compareTo == 0;

-      } else if (getOp().equals("!=")) {

-        return compareTo != 0;

-      } else if (getOp().equals(">=")) {

-        return compareTo >= 0;

-      } else if (getOp().equals(">")) {

-        return compareTo > 0;

-      } else if (getOp().equals("<=")) {

-        return compareTo <= 0;

-      } else if (getOp().equals("<")) {

-        return compareTo < 0;

-      }

-    } else if (v1 != null && v2 != null) {

-      if (getOp().equals("==")) {

-        return v1.equals(v2);

-      } else if (getOp().equals("!=")) {

-        return !v1.equals(v2);

-      }

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/GenericFeatureExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/GenericFeatureExpression.java
deleted file mode 100644
index bea9e52..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/GenericFeatureExpression.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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.ruta.expression.feature;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.ExpressionFactory;
-import org.apache.uima.ruta.expression.RutaExpression;
-import org.apache.uima.ruta.expression.bool.IBooleanExpression;
-import org.apache.uima.ruta.expression.number.INumberExpression;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.rule.RuleElement;
-import org.apache.uima.ruta.rule.RuleMatch;
-
-public class GenericFeatureExpression extends RutaExpression implements INumberExpression, IBooleanExpression, IStringExpression {
-
-  private FeatureExpression featureExpression;
-
-  private INumberExpression numberExpression;
-  
-  private IStringExpression stringExpression;
-  
-  private IBooleanExpression booleanExpression;
-  
-  public GenericFeatureExpression(FeatureExpression fe) {
-    super();
-    this.featureExpression = fe;
-  }
-  
-  
-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    if(stringExpression == null) {
-      stringExpression = ExpressionFactory.createStringFeatureExpression(featureExpression);
-    }
-    return stringExpression.getStringValue(parent, annotation, stream);
-  }
-
-  public String getStringValue(RutaBlock parent, RuleMatch match, RuleElement element,
-          RutaStream stream) {
-    if(stringExpression == null) {
-      stringExpression = ExpressionFactory.createStringFeatureExpression(featureExpression);
-    }
-    return stringExpression.getStringValue(parent, match, element, stream);
-  }
-
-  public boolean getBooleanValue(RutaBlock parent, RuleMatch match, RuleElement element,
-          RutaStream stream) {
-    if(booleanExpression == null) {
-      booleanExpression = ExpressionFactory.createBooleanFeatureExpression(featureExpression);
-    }
-    return booleanExpression.getBooleanValue(parent, match, element, stream);
-  }
-
-  public boolean getBooleanValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    if(booleanExpression == null) {
-      booleanExpression = ExpressionFactory.createBooleanFeatureExpression(featureExpression);
-    }
-    return booleanExpression.getBooleanValue(parent, annotation, stream);
-  }
-
-  public int getIntegerValue(RutaBlock parent, RuleMatch match, RuleElement element,
-          RutaStream stream) {
-    if(numberExpression == null) {
-      numberExpression = ExpressionFactory.createNumberFeatureExpression(featureExpression);
-    }
-    return numberExpression.getIntegerValue(parent, match, element, stream);
-  }
-
-  public double getDoubleValue(RutaBlock parent, RuleMatch match, RuleElement element,
-          RutaStream stream) {
-    if(numberExpression == null) {
-      numberExpression = ExpressionFactory.createNumberFeatureExpression(featureExpression);
-    }
-    return numberExpression.getDoubleValue(parent, match, element, stream);
-  }
-
-  public float getFloatValue(RutaBlock parent, RuleMatch match, RuleElement element,
-          RutaStream stream) {
-    if(numberExpression == null) {
-      numberExpression = ExpressionFactory.createNumberFeatureExpression(featureExpression);
-    }
-    return numberExpression.getFloatValue(parent, match, element, stream);
-  }
-
-  public int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    if(numberExpression == null) {
-      numberExpression = ExpressionFactory.createNumberFeatureExpression(featureExpression);
-    }
-    return numberExpression.getIntegerValue(parent, annotation, stream);
-  }
-
-  public double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    if(numberExpression == null) {
-      numberExpression = ExpressionFactory.createNumberFeatureExpression(featureExpression);
-    }
-    return numberExpression.getIntegerValue(parent, annotation, stream);
-  }
-
-  public float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {
-    if(numberExpression == null) {
-      numberExpression = ExpressionFactory.createNumberFeatureExpression(featureExpression);
-    }
-    return numberExpression.getIntegerValue(parent, annotation, stream);
-  }
-
-
-  public FeatureExpression getFeatureExpression() {
-    return featureExpression;
-  }
-
-
-  public void setFeatureExpression(FeatureExpression featureExpression) {
-    this.featureExpression = featureExpression;
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
deleted file mode 100644
index 8ba0367..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*

- * 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.ruta.expression.feature;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-import java.util.TreeSet;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.NullExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.AnnotationComparator;

-

-public class SimpleFeatureExpression extends FeatureExpression {

-

-  private MatchReference mr;

-

-  private TypeExpression typeExpr;

-

-  private List<String> features;

-

-  protected AnnotationComparator comparator = new AnnotationComparator();

-

-  public SimpleFeatureExpression(TypeExpression te, List<String> featureReferences) {

-    super();

-    this.typeExpr = te;

-    this.features = featureReferences;

-  }

-

-  public SimpleFeatureExpression(MatchReference mr) {

-    super();

-    this.mr = mr;

-  }

-

-  @Override

-  public Feature getFeature(RutaBlock parent) {

-    List<Feature> features = getFeatures(parent);

-    if (!features.isEmpty()) {

-      return features.get(features.size() - 1);

-    } else {

-      return null;

-    }

-  }

-

-  @Override

-  public List<Feature> getFeatures(RutaBlock parent) {

-    if (mr != null) {

-      typeExpr = mr.getTypeExpression(parent);

-      FeatureExpression featureExpression = mr.getFeatureExpression(parent);

-      if (featureExpression == null) {

-        return null;

-      }

-      features = featureExpression.getFeatureStringList(parent);

-    }

-    List<Feature> result = new ArrayList<Feature>();

-    Type type = typeExpr.getType(parent);

-    Feature feature = null;

-    for (String each : features) {

-      if (StringUtils.equals(each, UIMAConstants.FEATURE_COVERED_TEXT)) {

-        // there is no explicit feature for coveredText

-        feature = null;

-      } else {

-        feature = type.getFeatureByBaseName(each);

-        if (feature == null) {

-          if (!StringUtils.equals(each, UIMAConstants.FEATURE_COVERED_TEXT_SHORT))

-            throw new IllegalArgumentException("Not able to access feature " + each + " of type "

-                    + type.getName());

-        }

-      }

-      result.add(feature);

-      if (feature != null) {

-        type = feature.getRange();

-      }

-    }

-    return result;

-  }

-

-  public TypeExpression getTypeExpr(RutaBlock parent) {

-    if (mr != null) {

-      return mr.getTypeExpression(parent);

-    }

-    return typeExpr;

-  }

-

-  public void setTypeExpr(TypeExpression typeExpr) {

-    this.typeExpr = typeExpr;

-  }

-

-  public List<String> getFeatureStringList(RutaBlock parent) {

-    if (mr != null) {

-      features = mr.getFeatureExpression(parent).getFeatureStringList(parent);

-    }

-    return features;

-  }

-

-  public void setFeatures(List<String> features) {

-    this.features = features;

-  }

-

-  public Collection<AnnotationFS> getFeatureAnnotations(Collection<AnnotationFS> annotations,

-          RutaStream stream, RutaBlock parent, boolean checkOnFeatureValue) {

-    Collection<AnnotationFS> result = new TreeSet<AnnotationFS>(comparator);

-    List<Feature> features = getFeatures(parent);

-    for (AnnotationFS eachBase : annotations) {

-      AnnotationFS afs = eachBase;

-      for (Feature feature : features) {

-        if (feature == null || feature.getRange().isPrimitive()) {

-          // feature == null -> this is the coveredText "feature"

-          if (this instanceof FeatureMatchExpression) {

-            FeatureMatchExpression fme = (FeatureMatchExpression) this;

-            if (checkOnFeatureValue) {

-              if (fme.checkFeatureValue(afs, feature, stream, parent)) {

-                result.add(afs);

-              }

-            } else {

-              result.add(afs);

-            }

-            break;

-          } else {

-            result.add(afs);

-          }

-        } else {

-          FeatureStructure value = afs.getFeatureValue(feature);

-          afs = (AnnotationFS) value;

-        }

-      }

-      if (!(this instanceof FeatureMatchExpression)) {

-        if (stream.isVisible(afs, true)) {

-          result.add(afs);

-        }

-      } else {

-        // exploit expression for null assignments

-        IRutaExpression arg = ((FeatureMatchExpression) this).getArg();

-        if (arg instanceof NullExpression) {

-          result.addAll(annotations);

-        }

-      }

-    }

-    return result;

-  }

-

-  public MatchReference getMatchReference() {

-    return mr;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/BooleanListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/BooleanListExpression.java
deleted file mode 100644
index 539a732..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/BooleanListExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-public abstract class BooleanListExpression extends ListExpression<Boolean> {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ListExpression.java
deleted file mode 100644
index 26dbc21..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ListExpression.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-

-public abstract class ListExpression<T> extends AbstractStringExpression {

-

-  public abstract List<T> getList(RutaBlock parent, RutaStream stream);

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getList(parent, stream).toString();

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/NumberListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/NumberListExpression.java
deleted file mode 100644
index 6bead8d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/NumberListExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-public abstract class NumberListExpression extends ListExpression<Number> {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceBooleanListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceBooleanListExpression.java
deleted file mode 100644
index c936c75..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceBooleanListExpression.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-

-public class ReferenceBooleanListExpression extends BooleanListExpression {

-

-  private String var;

-

-  public ReferenceBooleanListExpression(String var) {

-    super();

-    this.var = var;

-  }

-

-  @SuppressWarnings("unchecked")

-  @Override

-  public List<Boolean> getList(RutaBlock parent, RutaStream stream) {

-    List<Object> list = parent.getEnvironment().getVariableValue(var, List.class);

-    List<Boolean> result = new ArrayList<Boolean>();

-    for (Object each : list) {

-      if (each instanceof IBooleanExpression) {

-        result.add(((IBooleanExpression) each).getBooleanValue(parent, null, stream));

-      } else if (each instanceof Boolean) {

-        result.add((Boolean) each);

-      }

-    }

-    return result;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceNumberListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceNumberListExpression.java
deleted file mode 100644
index 30c4e85..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceNumberListExpression.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-

-public class ReferenceNumberListExpression extends NumberListExpression {

-

-  private String var;

-

-  public ReferenceNumberListExpression(String var) {

-    super();

-    this.var = var;

-  }

-

-  @SuppressWarnings("unchecked")

-  @Override

-  public List<Number> getList(RutaBlock parent, RutaStream stream) {

-    List<Object> list = parent.getEnvironment().getVariableValue(var, List.class);

-    List<Number> result = new ArrayList<Number>();

-    for (Object each : list) {

-      if (each instanceof INumberExpression) {

-        result.add(((INumberExpression) each).getDoubleValue(parent, null, stream));

-      } else if (each instanceof Number) {

-        result.add((Number) each);

-      }

-    }

-    return result;

-  }

-

-  public String getVar() {

-    return var;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceStringListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceStringListExpression.java
deleted file mode 100644
index cf49fd9..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceStringListExpression.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-

-public class ReferenceStringListExpression extends StringListExpression {

-

-  private String var;

-

-  public ReferenceStringListExpression(String var) {

-    super();

-    this.var = var;

-  }

-

-  @SuppressWarnings("unchecked")

-  @Override

-  public List<String> getList(RutaBlock parent, RutaStream stream) {

-    List<Object> list = parent.getEnvironment().getVariableValue(var, List.class);

-    List<String> result = new ArrayList<String>();

-    for (Object each : list) {

-      if (each instanceof AbstractStringExpression) {

-        result.add(((AbstractStringExpression) each).getStringValue(parent, null, stream));

-      } else if (each instanceof String) {

-        result.add((String) each);

-      }

-    }

-    return result;

-  }

-

-  public String getVar() {

-    return var;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceTypeListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceTypeListExpression.java
deleted file mode 100644
index bf4e94b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/ReferenceTypeListExpression.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ReferenceTypeListExpression extends TypeListExpression {

-

-  private String var;

-

-  public ReferenceTypeListExpression(String var) {

-    super();

-    this.var = var;

-  }

-

-  @SuppressWarnings("unchecked")

-  @Override

-  public List<Type> getList(RutaBlock parent, RutaStream stream) {

-    List<Object> list = parent.getEnvironment().getVariableValue(var, List.class);

-    List<Type> result = new ArrayList<Type>();

-    for (Object each : list) {

-      if (each instanceof TypeExpression) {

-        result.add(((TypeExpression) each).getType(parent));

-      } else if (each instanceof Type) {

-        result.add((Type) each);

-      }

-    }

-    return result;

-  }

-

-  public String getVar() {

-    return var;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleBooleanListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleBooleanListExpression.java
deleted file mode 100644
index 0206f92..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleBooleanListExpression.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-

-public class SimpleBooleanListExpression extends BooleanListExpression {

-

-  private List<IBooleanExpression> list;

-

-  public SimpleBooleanListExpression(List<IBooleanExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public List<Boolean> getList(RutaBlock parent, RutaStream stream) {

-    List<Boolean> result = new ArrayList<Boolean>();

-    for (IBooleanExpression each : list) {

-      result.add(each.getBooleanValue(parent, null, stream));

-    }

-    return result;

-  }

-

-  public List<IBooleanExpression> getList() {

-    return list;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleNumberListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleNumberListExpression.java
deleted file mode 100644
index becd738..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleNumberListExpression.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-

-public class SimpleNumberListExpression extends NumberListExpression {

-

-  private List<INumberExpression> list;

-

-  public SimpleNumberListExpression(List<INumberExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public List<Number> getList(RutaBlock parent, RutaStream stream) {

-    List<Number> result = new ArrayList<Number>();

-    for (INumberExpression each : list) {

-      result.add(each.getDoubleValue(parent, null, stream));

-    }

-    return result;

-  }

-

-  public List<INumberExpression> getList() {

-    return list;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleStringListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleStringListExpression.java
deleted file mode 100644
index ac7e975..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleStringListExpression.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-

-public class SimpleStringListExpression extends StringListExpression {

-

-  private List<IStringExpression> list;

-

-  public SimpleStringListExpression(List<IStringExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public List<String> getList(RutaBlock parent, RutaStream stream) {

-    List<String> result = new ArrayList<String>();

-    for (IStringExpression each : list) {

-      result.add(each.getStringValue(parent, null, stream));

-    }

-    return result;

-  }

-

-  public List<IStringExpression> getList() {

-    return list;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleTypeListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleTypeListExpression.java
deleted file mode 100644
index a30d185..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/SimpleTypeListExpression.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class SimpleTypeListExpression extends TypeListExpression {

-

-  private List<TypeExpression> list;

-

-  public SimpleTypeListExpression(List<TypeExpression> list) {

-    super();

-    this.list = list;

-  }

-

-  @Override

-  public List<Type> getList(RutaBlock parent, RutaStream stream) {

-    List<Type> result = new ArrayList<Type>();

-    for (TypeExpression each : list) {

-      result.add(each.getType(parent));

-    }

-    return result;

-  }

-

-  public List<TypeExpression> getList() {

-    return list;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/StringListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/StringListExpression.java
deleted file mode 100644
index 8f5b3d9..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/StringListExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-public abstract class StringListExpression extends ListExpression<String> {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/TypeListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/TypeListExpression.java
deleted file mode 100644
index d3a6eae..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/TypeListExpression.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*

- * 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.ruta.expression.list;

-

-import org.apache.uima.cas.Type;

-

-public abstract class TypeListExpression extends ListExpression<Type> {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/UntypedListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/UntypedListExpression.java
deleted file mode 100644
index b17d8cf..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/list/UntypedListExpression.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.ruta.expression.list;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.IRutaExpression;
-import org.apache.uima.ruta.expression.bool.AbstractBooleanExpression;
-import org.apache.uima.ruta.expression.number.AbstractNumberExpression;
-import org.apache.uima.ruta.expression.string.AbstractStringExpression;
-import org.apache.uima.ruta.expression.type.TypeExpression;
-
-public class UntypedListExpression extends ListExpression<Object> {
-
-  private List<IRutaExpression> list;
-
-  public UntypedListExpression(List<IRutaExpression> list) {
-    super();
-    this.list = list;
-  }
-
-  @Override
-  public List<Object> getList(RutaBlock parent, RutaStream stream) {
-    List<Object> result = new ArrayList<Object>();
-    for (IRutaExpression each : list) {
-      if (each instanceof AbstractBooleanExpression) {
-        result.add(((AbstractBooleanExpression) each).getBooleanValue(parent, null, stream));
-      } else if (each instanceof AbstractNumberExpression) {
-        result.add(((AbstractNumberExpression) each).getDoubleValue(parent, null, stream));
-      } else if (each instanceof TypeExpression) {
-        result.add(((TypeExpression) each).getType(parent));
-      } else if (each instanceof ListExpression) {
-        result.add(((ListExpression<?>) each).getList(parent, stream));
-      } else if (each instanceof AbstractStringExpression) {
-        result.add(((AbstractStringExpression) each).getStringValue(parent, null, stream));
-      }
-    }
-    return result;
-  }
-
-  public List<IRutaExpression> getList() {
-    return list;
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/AbstractNumberExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/AbstractNumberExpression.java
deleted file mode 100644
index 18a6780..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/AbstractNumberExpression.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*

- * 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.ruta.expression.number;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-

-public abstract class AbstractNumberExpression extends AbstractStringExpression implements INumberExpression {

-

-  public int getIntegerValue(RutaBlock parent, RuleMatch match, RuleElement element,

-          RutaStream stream) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    // TODO: do we need to select the correct annotation?

-    AnnotationFS annotation = null;

-    if (!matchedAnnotationsOf.isEmpty()) {

-      annotation = matchedAnnotationsOf.get(0);

-    }

-    return getIntegerValue(parent, annotation, stream);

-  }

-

-  public double getDoubleValue(RutaBlock parent, RuleMatch match, RuleElement element,

-          RutaStream stream) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    // TODO: do we need to select the correct annotation?

-    AnnotationFS annotation = null;

-    if (!matchedAnnotationsOf.isEmpty()) {

-      annotation = matchedAnnotationsOf.get(0);

-    }

-    return getDoubleValue(parent, annotation, stream);

-  }

-

-  public float getFloatValue(RutaBlock parent, RuleMatch match, RuleElement element,

-          RutaStream stream) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    // TODO: do we need to select the correct annotation?

-    AnnotationFS annotation = null;

-    if (!matchedAnnotationsOf.isEmpty()) {

-      annotation = matchedAnnotationsOf.get(0);

-    }

-    return getFloatValue(parent, annotation, stream);

-  }

-  

-  protected double calculate(double t1, double t2, String op) {

-    if ("+".equals(op)) {

-      return t1 + t2;

-    } else if ("-".equals(op)) {

-      return t1 - t2;

-    } else if ("*".equals(op)) {

-      return t1 * t2;

-    } else if ("/".equals(op)) {

-      return t1 / t2;

-    } else if ("%".equals(op)) {

-      return t1 % t2;

-    } else if ("EXP".equals(op)) {

-      return Math.exp(t1);

-    } else if ("LOG".equals(op)) {

-      return Math.log(t1);

-    } else if ("SIN".equals(op)) {

-      return Math.sin(t1);

-    } else if ("COS".equals(op)) {

-      return Math.cos(t1);

-    } else if ("TAN".equals(op)) {

-      return Math.tan(t1);

-    }

-    return 0;

-  }

-

-  protected float calculate(float t1, float t2, String op) {

-    if ("+".equals(op)) {

-      return t1 + t2;

-    } else if ("-".equals(op)) {

-      return t1 - t2;

-    } else if ("*".equals(op)) {

-      return t1 * t2;

-    } else if ("/".equals(op)) {

-      return t1 / t2;

-    } else if ("%".equals(op)) {

-      return t1 % t2;

-    } else if ("EXP".equals(op)) {

-      return (float) Math.exp(t1);

-    } else if ("LOG".equals(op)) {

-      return (float) Math.log(t1);

-    } else if ("SIN".equals(op)) {

-      return (float) Math.sin(t1);

-    } else if ("COS".equals(op)) {

-      return (float) Math.cos(t1);

-    } else if ("TAN".equals(op)) {

-      return (float) Math.tan(t1);

-    }

-    return 0;

-  }

-

-  protected int calculate(int t1, int t2, String op) {

-    if ("+".equals(op)) {

-      return t1 + t2;

-    } else if ("-".equals(op)) {

-      return t1 - t2;

-    } else if ("*".equals(op)) {

-      return t1 * t2;

-    } else if ("/".equals(op)) {

-      return t1 / t2;

-    } else if ("%".equals(op)) {

-      return t1 % t2;

-    } else if ("EXP".equals(op)) {

-      return (int) Math.exp(t1);

-    } else if ("LOG".equals(op)) {

-      return (int) Math.log(t1);

-    } else if ("SIN".equals(op)) {

-      return (int) Math.sin(t1);

-    } else if ("COS".equals(op)) {

-      return (int) Math.cos(t1);

-    } else if ("TAN".equals(op)) {

-      return (int) Math.tan(t1);

-    }

-    return 0;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/ComposedNumberExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/ComposedNumberExpression.java
deleted file mode 100644
index 2bd59f7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/ComposedNumberExpression.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.expression.number;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class ComposedNumberExpression extends AbstractNumberExpression {

-

-  private final List<INumberExpression> expressions;

-

-  private final List<String> ops;

-

-  public ComposedNumberExpression(List<INumberExpression> expressions, List<String> ops) {

-    super();

-    this.expressions = expressions;

-    this.ops = ops;

-  }

-

-  public double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    INumberExpression numberExpression = getExpressions().get(0);

-    if (numberExpression == null) {

-      return 0;

-    }

-    double result = numberExpression.getDoubleValue(parent, null, stream);

-    for (int i = 0; i < getOperators().size(); i++) {

-      double second = 0;

-      if (getExpressions().size() > i + 1) {

-        second = getExpressions().get(i + 1).getDoubleValue(parent, null, stream);

-      }

-      result = calculate(result, second, getOperators().get(i));

-    }

-    return result;

-  }

-

-  public float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    INumberExpression numberExpression = getExpressions().get(0);

-    if (numberExpression == null) {

-      return 0;

-    }

-    float result = numberExpression.getFloatValue(parent, null, stream);

-    for (int i = 0; i < getOperators().size(); i++) {

-      float second = 0;

-      if (getExpressions().size() > i + 1) {

-        second = getExpressions().get(i + 1).getFloatValue(parent, null, stream);

-      }

-      result = calculate(result, second, getOperators().get(i));

-    }

-    return result;

-  }

-

-  public int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    int result = getExpressions().get(0).getIntegerValue(parent, annotation, stream);

-    for (int i = 0; i < getOperators().size(); i++) {

-      int second = 0;

-      if (getExpressions().size() > i + 1) {

-        second = getExpressions().get(i + 1).getIntegerValue(parent, annotation, stream);

-      }

-      result = calculate(result, second, getOperators().get(i));

-    }

-    return result;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return "" + getDoubleValue(parent, null, stream);

-  }

-

-  public List<INumberExpression> getExpressions() {

-    return expressions;

-  }

-

-  public List<String> getOperators() {

-    return ops;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/INumberExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/INumberExpression.java
deleted file mode 100644
index 057f445..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/INumberExpression.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.ruta.expression.number;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.rule.RuleElement;
-import org.apache.uima.ruta.rule.RuleMatch;
-
-public interface INumberExpression extends IStringExpression {
-
-  int getIntegerValue(RutaBlock parent, RuleMatch match, RuleElement element, RutaStream stream);
-
-  double getDoubleValue(RutaBlock parent, RuleMatch match, RuleElement element, RutaStream stream);
-
-  float getFloatValue(RutaBlock parent, RuleMatch match, RuleElement element, RutaStream stream);
-
-  int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream);
-
-  double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream);
-
-  float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream);
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NegativeNumberExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NegativeNumberExpression.java
deleted file mode 100644
index 55b3abc..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NegativeNumberExpression.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * 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.ruta.expression.number;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class NegativeNumberExpression extends AbstractNumberExpression {

-

-  private final INumberExpression ne;

-

-  public NegativeNumberExpression(INumberExpression simpleNumberExpression) {

-    super();

-    this.ne = simpleNumberExpression;

-  }

-

-  public double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return -ne.getDoubleValue(parent, annotation, stream);

-  }

-

-  public float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return -ne.getFloatValue(parent, annotation, stream);

-  }

-

-  public int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return -ne.getIntegerValue(parent, annotation, stream);

-  }

-

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return "-" + ne.getStringValue(parent, annotation, stream);

-  }

-

-  public INumberExpression getExpression() {

-    return ne;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NumberFeatureExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NumberFeatureExpression.java
deleted file mode 100644
index 806b3ca..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NumberFeatureExpression.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.expression.number;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-

-public class NumberFeatureExpression extends AbstractNumberExpression {

-

-  private FeatureExpression fe;

-

-  public NumberFeatureExpression(FeatureExpression fe) {

-    super();

-    this.fe = fe;

-  }

-

-  public int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Number v = getNumberValue(parent, annotation, stream);

-    return v == null ? 0 : v.intValue();

-  }

-

-  public double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Number v = getNumberValue(parent, annotation, stream);

-    return v == null ? 0 : v.doubleValue();

-  }

-

-  public float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Number v = getNumberValue(parent, annotation, stream);

-    return v == null ? 0 : v.floatValue();

-  }

-

-  private Number getNumberValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Number result = null;

-    Type type = fe.getTypeExpr(parent).getType(parent);

-    Feature feature = fe.getFeature(parent);

-    Type range = feature.getRange();

-    List<AnnotationFS> list = getTargetAnnotation(annotation, type, stream);

-    Collection<AnnotationFS> featureAnnotations = fe.getFeatureAnnotations(list, stream, parent,

-            false);

-    if (!featureAnnotations.isEmpty()) {

-      AnnotationFS next = featureAnnotations.iterator().next();

-      if (UIMAConstants.TYPE_BYTE.equals(range.getName())) {

-        result = next.getByteValue(feature);

-      } else if (UIMAConstants.TYPE_DOUBLE.equals(range.getName())) {

-        result = next.getDoubleValue(feature);

-      } else if (UIMAConstants.TYPE_FLOAT.equals(range.getName())) {

-        result = next.getFloatValue(feature);

-      } else if (UIMAConstants.TYPE_INTEGER.equals(range.getName())) {

-        result = next.getIntValue(feature);

-      } else if (UIMAConstants.TYPE_LONG.equals(range.getName())) {

-        result = next.getLongValue(feature);

-      } else if (UIMAConstants.TYPE_SHORT.equals(range.getName())) {

-        result = next.getShortValue(feature);

-      }

-    }

-    return result;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return "" + getNumberValue(parent, annotation, stream);

-  }

-

-  public FeatureExpression getFe() {

-    return fe;

-  }

-

-  public void setFe(FeatureExpression fe) {

-    this.fe = fe;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NumberFunctionExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NumberFunctionExpression.java
deleted file mode 100644
index 30196df..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/NumberFunctionExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.number;

-

-public abstract class NumberFunctionExpression extends AbstractNumberExpression {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/ReferenceNumberExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/ReferenceNumberExpression.java
deleted file mode 100644
index fdd2a95..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/ReferenceNumberExpression.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * 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.ruta.expression.number;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class ReferenceNumberExpression extends AbstractNumberExpression {

-

-  private final String var;

-

-  public ReferenceNumberExpression(String var) {

-    super();

-    this.var = var;

-  }

-

-  public double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Object value = parent.getEnvironment().getVariableValue(getVar());

-    double variableValue = 0;

-    if (value instanceof Number) {

-      variableValue = ((Number) value).doubleValue();

-    }

-    return variableValue;

-  }

-

-  public float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Object value = parent.getEnvironment().getVariableValue(getVar());

-    float variableValue = 0;

-    if (value instanceof Number) {

-      variableValue = ((Number) value).floatValue();

-    }

-    return variableValue;

-  }

-

-  public int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Object value = parent.getEnvironment().getVariableValue(getVar());

-    int variableValue = 0;

-    if (value instanceof Number) {

-      variableValue = ((Number) value).intValue();

-    }

-    return variableValue;

-  }

-

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Class<?> variableType = parent.getEnvironment().getVariableType(getVar());

-    if (variableType.equals(Integer.class)) {

-      return "" + getIntegerValue(parent, null, stream);

-    } else {

-      return "" + getDoubleValue(parent, null, stream);

-    }

-  }

-

-  public String getVar() {

-    return var;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/SimpleNumberExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/SimpleNumberExpression.java
deleted file mode 100644
index 1187383..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/number/SimpleNumberExpression.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*

- * 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.ruta.expression.number;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class SimpleNumberExpression extends AbstractNumberExpression {

-

-  private final Number number;

-

-  public SimpleNumberExpression(Number number) {

-    super();

-    this.number = number;

-  }

-

-  public double getDoubleValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return number.doubleValue();

-  }

-

-  public float getFloatValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return number.floatValue();

-  }

-

-  public int getIntegerValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return number.intValue();

-  }

-

-  public Number getNumber() {

-    return number;

-  }

-

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    boolean floating = number.intValue() != number.doubleValue();

-    if (floating) {

-      return "" + getDoubleValue(parent, null, stream);

-    } else {

-      return "" + getIntegerValue(parent, null, stream);

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ExternalWordListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ExternalWordListExpression.java
deleted file mode 100644
index 518e443..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ExternalWordListExpression.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.ruta.expression.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.resource.RutaWordList;
-
-public class ExternalWordListExpression extends WordListExpression {
-
-  private final List<IStringExpression> args;
-
-  private final String className;
-
-  public ExternalWordListExpression(String className, List<IStringExpression> args) {
-    super();
-    this.className = className;
-    this.args = args;
-  }
-
-  @Override
-  public RutaWordList getList(RutaStatement element) {
-    List<String> argList = new ArrayList<String>();
-    for (IStringExpression each : args) {
-      argList.add(each.getStringValue(element.getParent(), null, null));
-    }
-    
-    
-    return null;
-  }
-
-  public List<IStringExpression> getArgs() {
-    return args;
-  }
-
-  public String getClassName() {
-    return className;
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ExternalWordTableExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ExternalWordTableExpression.java
deleted file mode 100644
index ce8ccbd..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ExternalWordTableExpression.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.ruta.expression.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.ruta.RutaStatement;
-import org.apache.uima.ruta.expression.string.IStringExpression;
-import org.apache.uima.ruta.resource.RutaTable;
-
-public class ExternalWordTableExpression extends WordTableExpression {
-
-  private final List<IStringExpression> args;
-
-  private final String className;
-
-  public ExternalWordTableExpression(String className, List<IStringExpression> args) {
-    super();
-    this.className = className;
-    this.args = args;
-  }
-
-  @Override
-  public RutaTable getTable(RutaStatement element) {
-    List<String> argList = new ArrayList<String>();
-    for (IStringExpression each : args) {
-      argList.add(each.getStringValue(element.getParent(), null, null));
-    }
-    
-    return null;
-  }
-
-  public List<IStringExpression> getArgs() {
-    return args;
-  }
-
-  public String getClassName() {
-    return className;
-  }
-
-  
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/LiteralWordListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/LiteralWordListExpression.java
deleted file mode 100644
index 92c1dc0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/LiteralWordListExpression.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta.expression.resource;

-

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.resource.RutaWordList;

-

-public class LiteralWordListExpression extends WordListExpression {

-

-  private final String text;

-

-  public LiteralWordListExpression(String text) {

-    super();

-    if (text.startsWith("\'") && text.endsWith("\'")) {

-      text = text.substring(1, text.length() - 1);

-    }

-    this.text = stripEscapes(text); // hotfix for the escaping problem

-  }

-

-  public static String stripEscapes(String str) {

-    String result = str.replaceAll("\\\\\\\\", "\\\\");

-    return result.replaceAll("\\\\\\\"", "\\\"");

-  }

-

-  @Override

-  public RutaWordList getList(RutaStatement element) {

-    RutaWordList list = element.getEnvironment().getWordList(getText());

-    return list;

-  }

-

-  public String getText() {

-    return text;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/LiteralWordTableExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/LiteralWordTableExpression.java
deleted file mode 100644
index 35e57c6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/LiteralWordTableExpression.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta.expression.resource;

-

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.resource.RutaTable;

-

-public class LiteralWordTableExpression extends WordTableExpression {

-

-  private final String text;

-

-  public LiteralWordTableExpression(String text) {

-    super();

-    if (text.startsWith("\'") && text.endsWith("\'")) {

-      text = text.substring(1, text.length() - 1);

-    }

-    this.text = stripEscapes(text); // hotfix for the escaping problem

-  }

-

-  public static String stripEscapes(String str) {

-    String result = str.replaceAll("\\\\\\\\", "\\\\");

-    return result.replaceAll("\\\\\\\"", "\\\"");

-  }

-

-  @Override

-  public RutaTable getTable(RutaStatement element) {

-    RutaTable table = element.getEnvironment().getWordTable(getText());

-    return table;

-  }

-

-  public String getText() {

-    return text;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ReferenceWordListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ReferenceWordListExpression.java
deleted file mode 100644
index f63a793..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ReferenceWordListExpression.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.expression.resource;

-

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.resource.RutaWordList;

-

-public class ReferenceWordListExpression extends WordListExpression {

-

-  private String ref;

-

-  public ReferenceWordListExpression(String ref) {

-    super();

-    this.ref = ref;

-  }

-

-  @Override

-  public RutaWordList getList(RutaStatement element) {

-    return element.getEnvironment().getVariableValue(ref, RutaWordList.class);

-  }

-

-  public String getRef() {

-    return ref;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ReferenceWordTableExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ReferenceWordTableExpression.java
deleted file mode 100644
index 5c4aed0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/ReferenceWordTableExpression.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.expression.resource;

-

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.resource.RutaTable;

-

-public class ReferenceWordTableExpression extends WordTableExpression {

-

-  private String ref;

-

-  public ReferenceWordTableExpression(String ref) {

-    super();

-    this.ref = ref;

-  }

-

-  @Override

-  public RutaTable getTable(RutaStatement element) {

-    return element.getEnvironment().getVariableValue(ref, RutaTable.class);

-  }

-

-  public String getRef() {

-    return ref;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/WordListExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/WordListExpression.java
deleted file mode 100644
index ed82c01..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/WordListExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * 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.ruta.expression.resource;

-

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.resource.RutaWordList;

-

-public abstract class WordListExpression extends RutaExpression {

-

-  public abstract RutaWordList getList(RutaStatement element);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/WordTableExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/WordTableExpression.java
deleted file mode 100644
index b462b13..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/resource/WordTableExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * 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.ruta.expression.resource;

-

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.resource.RutaTable;

-

-public abstract class WordTableExpression extends RutaExpression {

-

-  public abstract RutaTable getTable(RutaStatement element);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/AbstractStringExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/AbstractStringExpression.java
deleted file mode 100644
index 3a169c7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/AbstractStringExpression.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleMatch;

-

-public abstract class AbstractStringExpression extends RutaExpression implements IStringExpression {

-

-  public String getStringValue(RutaBlock parent, RuleMatch match, RuleElement element,

-          RutaStream stream) {

-    List<AnnotationFS> matchedAnnotationsOf = match.getMatchedAnnotationsOf(element);

-    // TODO: do we need to select the correct annotation?

-    AnnotationFS annotation = null;

-    if (!matchedAnnotationsOf.isEmpty()) {

-      annotation = matchedAnnotationsOf.get(0);

-    }

-    return getStringValue(parent, annotation, stream);

-  }

-

-  public abstract String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/ComposedStringExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/ComposedStringExpression.java
deleted file mode 100644
index cecd714..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/ComposedStringExpression.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class ComposedStringExpression extends LiteralStringExpression {

-

-  private final List<IStringExpression> epxressions;

-

-  public ComposedStringExpression(List<IStringExpression> expressions) {

-    super();

-    this.epxressions = expressions;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    StringBuilder result = new StringBuilder();

-    for (IStringExpression each : getExpressions()) {

-      result.append(each.getStringValue(parent, annotation, stream));

-    }

-    return result.toString();

-  }

-

-  public List<IStringExpression> getExpressions() {

-    return epxressions;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/IStringExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/IStringExpression.java
deleted file mode 100644
index 8771bd4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/IStringExpression.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.ruta.expression.string;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.RutaStream;
-import org.apache.uima.ruta.expression.IRutaExpression;
-import org.apache.uima.ruta.rule.RuleElement;
-import org.apache.uima.ruta.rule.RuleMatch;
-
-public interface IStringExpression extends IRutaExpression {
-
-  String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream);
-
-  String getStringValue(RutaBlock parent, RuleMatch match, RuleElement element, RutaStream stream);
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/LiteralStringExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/LiteralStringExpression.java
deleted file mode 100644
index a6bae95..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/LiteralStringExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-public abstract class LiteralStringExpression extends AbstractStringExpression {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/ReferenceStringExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/ReferenceStringExpression.java
deleted file mode 100644
index fb7a8c8..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/ReferenceStringExpression.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class ReferenceStringExpression extends LiteralStringExpression {

-

-  private final String var;

-

-  public ReferenceStringExpression(String var) {

-    super();

-    this.var = var;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    String variableValue = parent.getEnvironment().getVariableValue(getVar(), String.class);

-    return variableValue;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/RemoveFunction.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/RemoveFunction.java
deleted file mode 100644
index 56756e1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/RemoveFunction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class RemoveFunction extends StringFunctionExpression {

-

-  private List<IStringExpression> list;

-

-  private String var;

-

-  public RemoveFunction(String v, List<IStringExpression> list) {

-    super();

-    this.var = v;

-    this.list = list;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    StringBuilder result = new StringBuilder();

-    String value = parent.getEnvironment().getVariableValue(var, String.class);

-    for (IStringExpression each : list) {

-      String string = each.getStringValue(parent, annotation, stream);

-      String[] split = value.split(string);

-      for (String r : split) {

-        result.append(r);

-      }

-    }

-    return result.toString();

-  }

-

-  public List<IStringExpression> getList() {

-    return list;

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/SimpleStringExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/SimpleStringExpression.java
deleted file mode 100644
index 1061bf6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/SimpleStringExpression.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class SimpleStringExpression extends LiteralStringExpression {

-

-  private final String value;

-

-  public static String stripEscapes(String str) {

-    String result = str.replaceAll("\\\\\\\\", "\\\\");

-    return result.replaceAll("\\\\\\\"", "\\\"");

-  }

-

-  public SimpleStringExpression(String value) {

-    super();

-    if (value.startsWith("\"") && value.endsWith("\"")) {

-      value = value.substring(1, value.length() - 1);

-    }

-    this.value = stripEscapes(value); // hotfix for the escaping problem

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return getValue();

-  }

-

-  public String getValue() {

-    return value;

-  }

-

-  public String toString() {

-    return value;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFeatureExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFeatureExpression.java
deleted file mode 100644
index 7d94be5..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFeatureExpression.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-

-public class StringFeatureExpression extends AbstractStringExpression {

-

-  private FeatureExpression fe;

-

-  public StringFeatureExpression(FeatureExpression fe) {

-    super();

-    this.fe = fe;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Type type = fe.getTypeExpr(parent).getType(parent);

-    Feature feature = fe.getFeature(parent);

-    List<AnnotationFS> list = getTargetAnnotation(annotation, type, stream);

-    Collection<AnnotationFS> featureAnnotations = fe.getFeatureAnnotations(list, stream, parent,

-            false);

-    if (!featureAnnotations.isEmpty()) {

-      AnnotationFS next = featureAnnotations.iterator().next();

-      if(feature == null) {

-        // feature == coveredText

-        return next.getCoveredText();

-      } else {

-        return next.getStringValue(feature);

-      }

-    }

-    return null;

-  }

-

-  public FeatureExpression getFe() {

-    return fe;

-  }

-

-  public void setFe(FeatureExpression fe) {

-    this.fe = fe;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFunctionExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFunctionExpression.java
deleted file mode 100644
index 0d4030e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFunctionExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-public abstract class StringFunctionExpression extends AbstractStringExpression {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFunctionFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFunctionFactory.java
deleted file mode 100644
index 343ff87..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/string/StringFunctionFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.expression.string;

-

-import java.util.List;

-

-import org.antlr.runtime.Token;

-

-public class StringFunctionFactory {

-

-  public static AbstractStringExpression createRemoveFunction(Token var, List<IStringExpression> list) {

-    String v = var == null ? "" : var.getText();

-    return new RemoveFunction(v, list);

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/ITypeExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/ITypeExpression.java
deleted file mode 100644
index 4bb0cd7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/ITypeExpression.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.ruta.expression.type;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.ruta.RutaBlock;
-
-public interface ITypeExpression {
-
-  /**
-   * Returns the actual type of the TypeExpression
-   * 
-   * @param parent - the block of the element 
-   * @return annotation type
-   * @throws IllegalArgumentException if the type cannot be resolved.
-   */
-  Type getType(RutaBlock parent);
-  
-  
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/ReferenceTypeExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/ReferenceTypeExpression.java
deleted file mode 100644
index b500b76..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/ReferenceTypeExpression.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.expression.type;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class ReferenceTypeExpression extends TypeExpression {

-

-  private final String var;

-

-  public ReferenceTypeExpression(String varString) {

-    super();

-    this.var = varString;

-  }

-

-  @Override

-  public String toString() {

-    return getVar();

-  }

-

-  public String getVar() {

-    return var;

-  }

-

-  /**

-   * Returns the actual type of the TypeExpression

-   * 

-   * @param parent - the block of the element 

-   * @return annotation type

-   * @throws IllegalArgumentException if the type cannot be resolved.

-   */

-  @Override

-  public Type getType(RutaBlock parent) {

-    Type type = parent.getEnvironment().getVariableValue(var, Type.class);

-    if(type == null) {

-      throw new IllegalArgumentException("Not able to resolve type variable: " + var);

-    }

-    return type;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    Type type = getType(parent);

-    return type != null ? type.getName() : "null";

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/SimpleTypeExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/SimpleTypeExpression.java
deleted file mode 100644
index c7c67d6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/SimpleTypeExpression.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.expression.type;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-

-public class SimpleTypeExpression extends TypeExpression {

-

-  private final String typeString;

-

-  public SimpleTypeExpression(String typeString) {

-    super();

-    this.typeString = typeString;

-  }

-

-  /**

-   * Returns the actual type of the TypeExpression

-   * 

-   * @param parent - the block of the element 

-   * @return annotation type

-   * @throws IllegalArgumentException if the type cannot be resolved.

-   */

-  @Override

-  public Type getType(RutaBlock parent) {

-    Type type = parent.getEnvironment().getType(typeString);

-    if(type == null) {

-      throw new IllegalArgumentException("Not able to resolve type: " + typeString);

-    }

-    return type;

-  }

-

-  @Override

-  public String toString() {

-    return typeString;

-  }

-

-  @Override

-  public String getStringValue(RutaBlock parent, AnnotationFS annotation, RutaStream stream) {

-    return typeString;

-  }

-

-  public String getTypeString() {

-    return typeString;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/TypeExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/TypeExpression.java
deleted file mode 100644
index 18da9b3..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/TypeExpression.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*

- * 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.ruta.expression.type;

-

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-

-public abstract class TypeExpression extends AbstractStringExpression implements ITypeExpression {

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/TypeFunctionExpression.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/TypeFunctionExpression.java
deleted file mode 100644
index 61cf90d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/expression/type/TypeFunctionExpression.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.expression.type;

-

-public abstract class TypeFunctionExpression extends TypeExpression {

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/DefaultEngineLoader.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/DefaultEngineLoader.java
deleted file mode 100644
index fe3992d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/DefaultEngineLoader.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URISyntaxException;

-import java.net.URL;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-

-public abstract class DefaultEngineLoader implements IEngineLoader {

-

-  public AnalysisEngine loadEngine(String location, String viewName) throws InvalidXMLException,

-          ResourceInitializationException, ResourceConfigurationException, IOException,

-          URISyntaxException {

-    return loadEngineMyself(location, viewName);

-  }

-

-  protected AnalysisEngine loadEngineMyself(String location, String viewName) throws IOException,

-          InvalidXMLException, ResourceInitializationException, ResourceConfigurationException,

-          URISyntaxException {

-    URL url = new File(location).toURL();

-    AnalysisEngine ae = Ruta.wrapAnalysisEngine(url, viewName);

-    return ae;

-  }

-

-  protected AnalysisEngine loadEngineMyselfIS(String location) throws IOException,

-          InvalidXMLException, ResourceInitializationException {

-    // TODO handle multi-view CASs

-    URL resource = getClass().getClassLoader().getResource(location);

-    XMLInputSource in = new XMLInputSource(resource);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    return ae;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IEngineLoader.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IEngineLoader.java
deleted file mode 100644
index a3c7016..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IEngineLoader.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.io.IOException;

-import java.net.URISyntaxException;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.util.InvalidXMLException;

-

-public interface IEngineLoader {

-

-  String[] getKnownEngines();

-

-  AnalysisEngine loadEngine(String location, String viewName) throws InvalidXMLException,

-          ResourceInitializationException, ResourceConfigurationException, IOException,

-          URISyntaxException;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaActionExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaActionExtension.java
deleted file mode 100644
index c642e64..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaActionExtension.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.expression.RutaExpression;

-

-public interface IRutaActionExtension extends IRutaExtension {

-

-  AbstractRutaAction createAction(String name, List<RutaExpression> args) throws RutaParseException;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaBlockExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaBlockExtension.java
deleted file mode 100644
index eb2ff83..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaBlockExtension.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.ruta.extensions;
-
-import java.util.List;
-
-import org.apache.uima.ruta.RutaBlock;
-import org.apache.uima.ruta.expression.RutaExpression;
-
-public interface IRutaBlockExtension extends IRutaExtension {
-
-  RutaBlock createBlock(String name, List<RutaExpression> args, RutaBlock env)
-          throws RutaParseException;
-  
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaBooleanFunctionExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaBooleanFunctionExtension.java
deleted file mode 100644
index 7cdae58..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaBooleanFunctionExtension.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.bool.BooleanFunctionExpression;

-

-public interface IRutaBooleanFunctionExtension extends IRutaExtension {

-

-  BooleanFunctionExpression createBooleanFunction(String name, List<RutaExpression> args)

-          throws RutaParseException;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaConditionExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaConditionExtension.java
deleted file mode 100644
index b24217e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaConditionExtension.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.RutaExpression;

-

-public interface IRutaConditionExtension extends IRutaExtension {

-

-  AbstractRutaCondition createCondition(String name, List<RutaExpression> args)

-          throws RutaParseException;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaExtension.java
deleted file mode 100644
index e15793e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaExtension.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public interface IRutaExtension {

-

-  String[] getKnownExtensions();

-

-  Class<?>[] extensions();

-

-  String verbalize(RutaElement element, RutaVerbalizer verbalizer);

-

-  String verbalizeName(RutaElement element);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaNumberFunctionExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaNumberFunctionExtension.java
deleted file mode 100644
index 23a85fb..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaNumberFunctionExtension.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.number.NumberFunctionExpression;

-

-public interface IRutaNumberFunctionExtension extends IRutaExtension {

-

-  NumberFunctionExpression createNumberFunction(String name, List<RutaExpression> args)

-          throws RutaParseException;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaStringFunctionExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaStringFunctionExtension.java
deleted file mode 100644
index 55db15e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaStringFunctionExtension.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.string.StringFunctionExpression;

-

-public interface IRutaStringFunctionExtension extends IRutaExtension {

-

-  StringFunctionExpression createStringFunction(String name, List<RutaExpression> args)

-          throws RutaParseException;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaTypeFunctionExtension.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaTypeFunctionExtension.java
deleted file mode 100644
index 5f2ed46..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/IRutaTypeFunctionExtension.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.util.List;

-

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.type.TypeFunctionExpression;

-

-public interface IRutaTypeFunctionExtension extends IRutaExtension {

-

-  TypeFunctionExpression createTypeFunction(String name, List<RutaExpression> args)

-          throws RutaParseException;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaEngineLoader.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaEngineLoader.java
deleted file mode 100644
index 6863abc..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaEngineLoader.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URISyntaxException;

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.util.InvalidXMLException;

-

-public class RutaEngineLoader extends DefaultEngineLoader {

-

-  private Map<String, IEngineLoader> loaders;

-

-  public RutaEngineLoader() {

-    super();

-    loaders = new HashMap<String, IEngineLoader>();

-  }

-

-  @Override

-  public AnalysisEngine loadEngine(String location, String viewName) throws InvalidXMLException,

-          ResourceInitializationException, ResourceConfigurationException, IOException,

-          URISyntaxException {

-    String name = getEngineName(location);

-    AnalysisEngine result = null;

-    IEngineLoader engineLoader = loaders.get(name);

-    if (engineLoader != null) {

-      result = engineLoader.loadEngine(location, viewName);

-    } else {

-      result = loadEngineMyself(location, viewName);

-    }

-    return result;

-  }

-

-  public AnalysisEngine loadEngineIS(String location, String viewName) throws InvalidXMLException,

-          ResourceInitializationException, IOException, ResourceConfigurationException,

-          URISyntaxException {

-    String name = getEngineNameIS(location);

-    AnalysisEngine result = null;

-    IEngineLoader engineLoader = loaders.get(name);

-    if (engineLoader != null) {

-      result = engineLoader.loadEngine(location, viewName);

-    } else {

-      result = loadEngineMyselfIS(location);

-    }

-    return result;

-  }

-

-  public void addLoader(String engine, IEngineLoader loader) {

-    loaders.put(engine, loader);

-  }

-

-  private String getEngineName(String location) {

-    File file;

-    try {

-      file = new File(location);

-    } catch (java.lang.NullPointerException e) {

-      throw new java.lang.NullPointerException("File[" + location + "] cannot be opened.");

-    }

-    location = file.getName();

-    String[] split = location.split("[.]");

-    return split[split.length - 2];

-  }

-

-  private String getEngineNameIS(String location) {

-    String[] split = location.split("[.]");

-    return split[split.length - 2];

-  }

-

-  public boolean isInitialized() {

-    return !loaders.isEmpty();

-  }

-

-  public String[] getKnownEngines() {

-    return loaders.keySet().toArray(new String[0]);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaExternalFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaExternalFactory.java
deleted file mode 100644
index f69e675..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaExternalFactory.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.antlr.runtime.Token;

-import org.apache.uima.UimaContext;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class RutaExternalFactory {

-

-  private Map<String, IRutaConditionExtension> conditionExtensions;

-

-  private Map<String, IRutaActionExtension> actionExtensions;

-

-  private Map<String, IRutaTypeFunctionExtension> typeFunctionExtensions;

-

-  private Map<String, IRutaBooleanFunctionExtension> booleanFunctionExtensions;

-

-  private Map<String, IRutaStringFunctionExtension> stringFunctionExtensions;

-

-  private Map<String, IRutaNumberFunctionExtension> numberFunctionExtensions;

-

-  private Map<String, IRutaBlockExtension> blockExtensions;

-

-  private UimaContext context;

-

-  public RutaExternalFactory() {

-    super();

-    conditionExtensions = new HashMap<String, IRutaConditionExtension>();

-    actionExtensions = new HashMap<String, IRutaActionExtension>();

-    booleanFunctionExtensions = new HashMap<String, IRutaBooleanFunctionExtension>();

-    stringFunctionExtensions = new HashMap<String, IRutaStringFunctionExtension>();

-    numberFunctionExtensions = new HashMap<String, IRutaNumberFunctionExtension>();

-    typeFunctionExtensions = new HashMap<String, IRutaTypeFunctionExtension>();

-    blockExtensions = new HashMap<String, IRutaBlockExtension>();

-  }

-

-  public AbstractRutaCondition createExternalCondition(Token id, List<RutaExpression> args)

-          throws RutaParseException {

-    String name = id.getText();

-    IRutaConditionExtension extension = conditionExtensions.get(name);

-    if (extension != null) {

-      return extension.createCondition(name, args);

-    }

-    // Throw exception

-    return null;

-  }

-

-  public AbstractRutaAction createExternalAction(Token id, List<RutaExpression> args)

-          throws RutaParseException {

-    String name = id.getText();

-    IRutaActionExtension extension = actionExtensions.get(name);

-    if (extension != null) {

-      return extension.createAction(name, args);

-    }

-    // TODO throw exception

-    return null;

-  }

-

-  public TypeExpression createExternalTypeFunction(Token id, List<RutaExpression> args)

-          throws RutaParseException {

-    String name = id.getText();

-    IRutaTypeFunctionExtension extension = typeFunctionExtensions.get(name);

-    if (extension != null) {

-      return extension.createTypeFunction(name, args);

-    }

-    // Throw exception

-    return null;

-  }

-

-  public IBooleanExpression createExternalBooleanFunction(Token id, List<RutaExpression> args)

-          throws RutaParseException {

-    String name = id.getText();

-    IRutaBooleanFunctionExtension extension = booleanFunctionExtensions.get(name);

-    if (extension != null) {

-      return extension.createBooleanFunction(name, args);

-    }

-    // Throw exception

-    return null;

-  }

-

-  public AbstractStringExpression createExternalStringFunction(Token id, List<RutaExpression> args)

-          throws RutaParseException {

-    String name = id.getText();

-    IRutaStringFunctionExtension extension = stringFunctionExtensions.get(name);

-    if (extension != null) {

-      return extension.createStringFunction(name, args);

-    }

-    // Throw exception

-    return null;

-  }

-

-  public INumberExpression createExternalNumberFunction(Token id, List<RutaExpression> args)

-          throws RutaParseException {

-    String name = id.getText();

-    IRutaNumberFunctionExtension extension = numberFunctionExtensions.get(name);

-    if (extension != null) {

-      return extension.createNumberFunction(name, args);

-    }

-    // Throw exception

-    return null;

-  }

-

-  public RutaBlock createExternalBlock(Token type, List<RutaExpression> args, RutaBlock env)

-          throws RutaParseException {

-    if (type == null) {

-      return null;

-    }

-    String t = type.getText();

-    IRutaBlockExtension extension = blockExtensions.get(t);

-    if (extension != null) {

-      RutaBlock rutaBlock = extension.createBlock(t, args, env);

-      rutaBlock.setContext(context);

-      return rutaBlock;

-    }

-    return null;

-  }

-

-  public void addExtension(String id, IRutaExtension extension) {

-    if (extension instanceof IRutaActionExtension) {

-      addActionExtension(id, (IRutaActionExtension) extension);

-    } else if (extension instanceof IRutaConditionExtension) {

-      addConditionExtension(id, (IRutaConditionExtension) extension);

-    } else if (extension instanceof IRutaBooleanFunctionExtension) {

-      addBooleanFunctionExtension(id, (IRutaBooleanFunctionExtension) extension);

-    } else if (extension instanceof IRutaStringFunctionExtension) {

-      addStringFunctionExtension(id, (IRutaStringFunctionExtension) extension);

-    } else if (extension instanceof IRutaNumberFunctionExtension) {

-      addNumberFunctionExtension(id, (IRutaNumberFunctionExtension) extension);

-    } else if (extension instanceof IRutaTypeFunctionExtension) {

-      addTypeFunctionExtension(id, (IRutaTypeFunctionExtension) extension);

-    } else if (extension instanceof IRutaBlockExtension) {

-      addBlockExtension(id, (IRutaBlockExtension) extension);

-    }

-  }

-

-  public void addConditionExtension(String id, IRutaConditionExtension extension) {

-    conditionExtensions.put(id, extension);

-  }

-

-  public void addActionExtension(String id, IRutaActionExtension extension) {

-    actionExtensions.put(id, extension);

-  }

-

-  public void addNumberFunctionExtension(String id, IRutaNumberFunctionExtension extension) {

-    numberFunctionExtensions.put(id, extension);

-  }

-

-  public void addBooleanFunctionExtension(String id, IRutaBooleanFunctionExtension extension) {

-    booleanFunctionExtensions.put(id, extension);

-  }

-

-  public void addStringFunctionExtension(String id, IRutaStringFunctionExtension extension) {

-    stringFunctionExtensions.put(id, extension);

-  }

-

-  public void addTypeFunctionExtension(String id, IRutaTypeFunctionExtension extension) {

-    typeFunctionExtensions.put(id, extension);

-  }

-

-  public void addBlockExtension(String id, IRutaBlockExtension extension) {

-    blockExtensions.put(id, extension);

-  }

-

-  public boolean isInitialized() {

-    return !actionExtensions.isEmpty() || !conditionExtensions.isEmpty()

-            || !booleanFunctionExtensions.isEmpty() || !numberFunctionExtensions.isEmpty()

-            || !stringFunctionExtensions.isEmpty() || !typeFunctionExtensions.isEmpty();

-  }

-

-  public Map<String, IRutaNumberFunctionExtension> getNumberFunctionExtensions() {

-    return numberFunctionExtensions;

-  }

-

-  public void setNumberFunctionExtensions(

-          Map<String, IRutaNumberFunctionExtension> numberFunctionExtensions) {

-    this.numberFunctionExtensions = numberFunctionExtensions;

-  }

-

-  public Map<String, IRutaStringFunctionExtension> getStringFunctionExtensions() {

-    return stringFunctionExtensions;

-  }

-

-  public void setStringFunctionExtensions(

-          Map<String, IRutaStringFunctionExtension> stringFunctionExtensions) {

-    this.stringFunctionExtensions = stringFunctionExtensions;

-  }

-

-  public Map<String, IRutaBooleanFunctionExtension> getBooleanFunctionExtensions() {

-    return booleanFunctionExtensions;

-  }

-

-  public void setBooleanFunctionExtensions(

-          Map<String, IRutaBooleanFunctionExtension> booleanFunctionExtensions) {

-    this.booleanFunctionExtensions = booleanFunctionExtensions;

-  }

-

-  public Map<String, IRutaTypeFunctionExtension> getTypeFunctionExtensions() {

-    return typeFunctionExtensions;

-  }

-

-  public void setTypeFunctionExtensions(

-          Map<String, IRutaTypeFunctionExtension> typeFunctionExtensions) {

-    this.typeFunctionExtensions = typeFunctionExtensions;

-  }

-

-  public Map<String, IRutaActionExtension> getActionExtensions() {

-    return actionExtensions;

-  }

-

-  public void setActionExtensions(Map<String, IRutaActionExtension> actionExtensions) {

-    this.actionExtensions = actionExtensions;

-  }

-

-  public Map<String, IRutaConditionExtension> getConditionExtensions() {

-    return conditionExtensions;

-  }

-

-  public void setConditionExtensions(Map<String, IRutaConditionExtension> conditionExtensions) {

-    this.conditionExtensions = conditionExtensions;

-  }

-

-  public Map<String, IRutaBlockExtension> getBlockExtensions() {

-    return blockExtensions;

-  }

-

-  public void setBlockExtensions(Map<String, IRutaBlockExtension> blockExtensions) {

-    this.blockExtensions = blockExtensions;

-  }

-

-  public UimaContext getContext() {

-    return context;

-  }

-

-  public void setContext(UimaContext context) {

-    this.context = context;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaParseException.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaParseException.java
deleted file mode 100644
index 8e672aa..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/extensions/RutaParseException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * 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.ruta.extensions;

-

-public class RutaParseException extends Exception {

-

-	public RutaParseException(String message) {

-		super(message);

-	}

-

-	private static final long serialVersionUID = -2728650696200821469L;

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/AnonymousWordList.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/AnonymousWordList.java
deleted file mode 100644
index 547e556..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/AnonymousWordList.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.type.RutaBasic;

-

-public class AnonymousWordList implements RutaWordList {

-

-  private final List<String> list;

-

-  public AnonymousWordList(List<String> strings) {

-    super();

-    this.list = strings;

-  }

-

-  public boolean contains(String s, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS) {

-    return list.contains(s);

-  }

-

-  public boolean containsFragment(String s, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS) {

-    return contains(s, ignoreCase, size, ignoreChars, maxIgnoreChars, ignoreWS);

-  }

-

-  public List<AnnotationFS> find(RutaStream stream, boolean ignoreCase, int size,

-          char[] ignoreToken, int maxIgnoredTokens, boolean ignoreWS) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    for (String each : list) {

-      stream.moveToFirst();

-      while (stream.hasNext()) {

-        RutaBasic next = (RutaBasic) stream.next();

-        if (each.equals(next.getCoveredText())) {

-          result.add(next);

-        }

-      }

-    }

-    return result;

-  }

-

-  public List<AnnotationFS> find(RutaStream stream, Map<String, Object> typeMap, boolean ignoreCase,

-          int ignoreLength, boolean edit, double distance, String ignoreToken) {

-    return new ArrayList<AnnotationFS>();

-  }

-

-  public List<String> contains(String string, boolean ignoreCase, int ignoreLength, boolean edit,

-          double distance, String ignoreToken) {

-    return null;

-  }

-

-  public List<String> containsFragment(String string, boolean ignoreCase, int ignoreLength,

-          boolean edit, double distance, String ignoreToken) {

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/CSVTable.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/CSVTable.java
deleted file mode 100644
index 936ee87..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/CSVTable.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.nio.charset.Charset;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.HashMap;

-import java.util.LinkedList;

-import java.util.List;

-import java.util.Map;

-import java.util.Scanner;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.springframework.core.io.FileSystemResource;

-import org.springframework.core.io.Resource;

-

-public class CSVTable implements RutaTable {

-

-  private List<List<String>> tableData;

-

-  private Map<Integer, RutaWordList> columnWordLists = new HashMap<Integer, RutaWordList>(2);

-

-  /**

-   * @param table

-   *          A CSV table.

-   * @throws IOException

-   *           When there is a problem opening, reading or closing the table.

-   */

-  public CSVTable(Resource table) throws IOException {

-    InputStream stream = null;

-    try {

-      stream = table.getInputStream();

-      buildTable(stream);

-    } finally {

-      if (stream != null) {

-        stream.close();

-      }

-    }

-  }

-

-  public CSVTable(String location) throws IOException {

-    this(new FileSystemResource(location));

-  }

-

-  public CSVTable(InputStream stream) throws IOException {

-    super();

-    buildTable(stream);

-  }

-

-  private void buildTable(InputStream stream) {

-    Scanner sc = new Scanner(stream, Charset.forName("UTF-8").name());

-    sc.useDelimiter("\\n");

-    tableData = new ArrayList<List<String>>();

-    while (sc.hasNext()) {

-      String line = sc.next().trim();

-      line = line.replaceAll(";;", "; ;");

-      String[] lineElements = line.split(";");

-      List<String> row = Arrays.asList(lineElements);

-      tableData.add(row);

-    }

-    sc.close();

-  }

-

-  public RutaWordList getWordList(int index, RutaBlock parent) {

-    RutaWordList list = columnWordLists.get(index);

-    if (list == null) {

-      if (index > 0 && index <= tableData.get(0).size()) {

-        Boolean dictRemoveWS = (Boolean) parent.getContext().getConfigParameterValue(

-                RutaEngine.PARAM_DICT_REMOVE_WS);

-        if (dictRemoveWS == null) {

-          dictRemoveWS = false;

-        }

-        list = new TreeWordList(getColumnData(index - 1), dictRemoveWS);

-        columnWordLists.put(index, list);

-      }

-    }

-    return list;

-  }

-

-  private List<String> getColumnData(int i) {

-    List<String> result = new LinkedList<String>();

-    for (List<String> each : tableData) {

-      if (each.size() > i) {

-        result.add(each.get(i));

-      } else {

-        result.add("");

-      }

-    }

-    return result;

-  }

-

-  public String getEntry(int row, int column) {

-    return tableData.get(row).get(column);

-  }

-

-  public List<String> getRowWhere(int column, String value) {

-    List<String> columnData = getColumnData(column);

-    int i = 0;

-    for (String string : columnData) {

-      if (string.toLowerCase().equals(value.toLowerCase())) {

-        return tableData.get(i);

-      }

-      i++;

-    }

-    i = 0;

-    for (String string : columnData) {

-      if (string.toLowerCase().replaceAll("\\s", "").equals(value.toLowerCase())) {

-        return tableData.get(i);

-      }

-      i++;

-    }

-    return new ArrayList<String>();

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/EditDistanceCostMap.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/EditDistanceCostMap.java
deleted file mode 100644
index e957d01..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/EditDistanceCostMap.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.io.BufferedReader;

-import java.io.BufferedWriter;

-import java.io.File;

-import java.io.FileNotFoundException;

-import java.io.FileReader;

-import java.io.FileWriter;

-import java.io.IOException;

-import java.util.HashMap;

-import java.util.Map;

-

-/**

- * Class EditDistanceMap.

- * 

- * Contains HashMaps with key-value-pairs representing the costs for edit distance operations.

- */

-public class EditDistanceCostMap {

-

-  /** Contains the insert costs for given characters. */

-  private Map<Character, Double> insertMap;

-

-  /** Contains the delete costs for given characters. */

-  private Map<Character, Double> deleteMap;

-

-  /** Contains hashmaps with replace costs for certain characters. */

-  private Map<Character, Map<Character, Double>> replaceMap;

-

-  private Double minimalCosts;

-

-  /**

-   * Represents the default costs if a character is not in a hashmap for an operation.

-   */

-  private double defaultCosts;

-

-  /**

-   * The default constructor initializes the hashmaps empty and sets the default costs to one.

-   */

-  public EditDistanceCostMap() {

-    this(1.0);

-  }

-

-  /**

-   * Initializes the default costs an the hashmaps.

-   * 

-   * @param defaultCosts

-   *          The default costs for any operation with any character (pair).

-   */

-  public EditDistanceCostMap(double defaultCosts) {

-    this(defaultCosts, new HashMap<Character, Double>(), new HashMap<Character, Double>(),

-            new HashMap<Character, Map<Character, Double>>());

-  }

-

-  /**

-   * Initializes all attributes of the class.

-   * 

-   * @param defaultCosts

-   *          The default costs for any operation with any character (pair).

-   * @param insertMap

-   *          The map with the insert costs.

-   * @param deleteMap

-   *          The map with the delete costs.

-   * @param replaceMap

-   *          The map with the replace costs.

-   */

-  public EditDistanceCostMap(double defaultCosts, Map<Character, Double> insertMap,

-          Map<Character, Double> deleteMap, Map<Character, Map<Character, Double>> replaceMap) {

-    this.defaultCosts = defaultCosts;

-    this.minimalCosts = defaultCosts;

-    this.deleteMap = deleteMap;

-    this.insertMap = insertMap;

-    this.replaceMap = replaceMap;

-  }

-

-  /**

-   * Exports the EditDistanceCostMap to a file with the specified Name in .csv-Format.

-   * 

-   * @param file

-   *          The name of the .csv-file.

-   * @return true, if the export worked, false otherwise.

-   */

-  public boolean export(String file) {

-

-    try {

-      BufferedWriter br = new BufferedWriter(new FileWriter(new File(file)));

-

-      br.write("\"defaultcosts\";\"" + defaultCosts + "\";\n");

-

-      for (Character c : insertMap.keySet()) {

-        br.write("\"insert\";\"" + c + "\";\"" + getInsertCosts(c) + "\";\n");

-      }

-

-      for (Character c : deleteMap.keySet()) {

-        br.write("\"delete\";\"" + c + "\";\"" + getDeleteCosts(c) + "\";\n");

-      }

-

-      for (Character c : replaceMap.keySet()) {

-

-        Map<Character, Double> replace = replaceMap.get(c);

-

-        for (Character d : replace.keySet()) {

-          br.write("\"replace\";\"" + c + "\";\"" + d + "\";\"" + getReplaceCosts(c, d) + "\";\n");

-        }

-      }

-

-      br.flush();

-      br.close();

-

-    } catch (IOException e) {

-      return false;

-    }

-

-    return true;

-  }

-

-  /**

-   * Reads an EditDistanceCostMap from a .csv-file with the specified name. The method tries zu

-   * catch any exceptions and continues the import.

-   * 

-   * @param file

-   *          The file which is to be imported / read.

-   * @return true, if not any one exception occured, false otherwise. If false is returned, the file

-   *         hasn't been read completely. The line with the exception was not imported.

-   */

-  public boolean read(String file) {

-

-    BufferedReader br = null;

-    String temp = null;

-    String[] line = null;

-    boolean retValue = true;

-

-    insertMap.clear();

-    deleteMap.clear();

-    replaceMap.clear();

-

-    try {

-      br = new BufferedReader(new FileReader(new File(file)));

-    } catch (FileNotFoundException e) {

-      System.err.println("File not found.");

-      return false;

-    }

-

-    try {

-

-      while ((temp = br.readLine()) != null) {

-

-        line = temp.split(";");

-

-        try {

-

-          // Kills the " at the beginning and at the end of the

-          // String.

-          for (int i = 0; i < line.length; i++) {

-

-            if (line[i].startsWith("\"")) {

-              line[i] = line[i].substring(1);

-            }

-

-            if (line[i].endsWith("\"")) {

-              line[i] = line[i].substring(0, line[i].length() - 1);

-            }

-          }

-

-          if (line[0].equals("insert") || line[0].equals("delete")) {

-

-            line[2] = line[2].replaceAll(",", ".");

-            double value = Double.parseDouble(line[2]);

-            char[] cArray = line[1].toCharArray();

-

-            // The "strings" should have just one character.

-            if (cArray.length != 1) {

-              System.err.println("Invalid format.");

-              retValue = false;

-              continue;

-            }

-

-            if (line[0].equals("delete")) {

-              setDeleteCosts(cArray[0], value);

-            } else {

-              setInsertCosts(cArray[0], value);

-            }

-

-          } else if (line[0].equals("replace")) {

-

-            line[3] = line[3].replaceAll(",", ".");

-            double value = Double.parseDouble(line[3]);

-            char[] cArray = line[1].toCharArray();

-            char[] dArray = line[2].toCharArray();

-

-            if (cArray.length != 1 || dArray.length != 1) {

-              System.err.println("Invalid format.");

-              retValue = false;

-              continue;

-            }

-

-            setReplaceCosts(cArray[0], dArray[0], value);

-

-          } else if (line[0].equals("defaultcosts")) {

-

-            line[1] = line[1].replaceAll(",", ".");

-            double value = Double.parseDouble(line[1]);

-            defaultCosts = value;

-

-          } else {

-            System.err.println("Invalid EditDistance" + "CostMap-Operation.");

-            retValue = false;

-          }

-

-        } catch (StringIndexOutOfBoundsException e) {

-          System.err.println("String Index out of bounds.");

-          retValue = false;

-        } catch (IndexOutOfBoundsException e) {

-          System.err.println("Index out of bounds.");

-          retValue = false;

-        } catch (NumberFormatException e) {

-          System.err.println("Number Format Error.");

-          retValue = false;

-        }

-      }

-

-      br.close();

-

-    } catch (IOException e) {

-      System.err.println("IO-Error.");

-      return false;

-    }

-

-    registerMinimalCosts();

-

-    return retValue;

-  }

-

-  /**

-   * Retrieves the insert costs for the specified character.

-   * 

-   * @param c

-   *          The character which insert costs should be retrieved.

-   * @return The insert costs of the character.

-   */

-  public double getInsertCosts(char c) {

-

-    if (insertMap.get(c) == null) {

-      return defaultCosts;

-    }

-

-    return insertMap.get(c);

-  }

-

-  /**

-   * Retrieves the delete costs for the specified character.

-   * 

-   * @param c

-   *          The character which delete costs should be retrieved.

-   * @return The delete costs of the character.

-   */

-  public double getDeleteCosts(char c) {

-

-    if (deleteMap.get(c) == null) {

-      return defaultCosts;

-    }

-

-    return deleteMap.get(c);

-  }

-

-  /**

-   * Retrieves the replace costs for the specified pair of characters.

-   * 

-   * @param c

-   *          The first specified character.

-   * @param d

-   *          The second specified character.

-   * @return The replace costs for the pair of characters.

-   */

-  public double getReplaceCosts(char c, char d) {

-

-    if (replaceMap.get(c) == null) {

-      return defaultCosts;

-    }

-

-    Map<Character, Double> cMap = replaceMap.get(c);

-

-    if (cMap.get(d) == null) {

-      return defaultCosts;

-    }

-

-    return cMap.get(d);

-  }

-

-  /**

-   * Sets the insert costs of the specified character to the specified value.

-   * 

-   * @param c

-   *          The specified character.

-   * @param value

-   *          The specified value.

-   */

-  public void setInsertCosts(char c, double value) {

-    insertMap.put(c, value);

-    registerMinimalCosts();

-  }

-

-  /**

-   * Sets the delete costs of the specified character to the specified value.

-   * 

-   * @param c

-   *          The specified character.

-   * @param value

-   *          The specified value.

-   */

-  public void setDeleteCosts(char c, double value) {

-    deleteMap.put(c, value);

-    registerMinimalCosts();

-  }

-

-  /**

-   * Sets the replace costs of the specified pair of characters to the specified value.

-   * 

-   * @param c

-   *          The first specified character.

-   * @param d

-   *          The second specified character.

-   * @param value

-   *          The specified value.

-   */

-  public void setReplaceCosts(char c, char d, double value) {

-

-    if (replaceMap.get(c) == null) {

-      replaceMap.put(c, new HashMap<Character, Double>());

-    }

-

-    replaceMap.get(c).put(d, value);

-    registerMinimalCosts();

-  }

-

-  private void registerMinimalCosts() {

-

-    for (Double d : deleteMap.values()) {

-      minimalCosts = Math.min(minimalCosts, d);

-    }

-

-    for (Double d : insertMap.values()) {

-      minimalCosts = Math.min(minimalCosts, d);

-    }

-

-    for (Map<Character, Double> tmp : replaceMap.values()) {

-      for (Double d : tmp.values()) {

-        minimalCosts = Math.min(minimalCosts, d);

-      }

-    }

-  }

-

-  public double getMinimalCosts() {

-    return minimalCosts;

-  }

-

-  public double getDefaultCosts() {

-    return defaultCosts;

-  }

-

-  @Override

-  public int hashCode() {

-    final int prime = 31;

-    int result = 1;

-    long temp;

-    temp = Double.doubleToLongBits(defaultCosts);

-    result = prime * result + (int) (temp ^ (temp >>> 32));

-    result = prime * result + ((deleteMap == null) ? 0 : deleteMap.hashCode());

-    result = prime * result + ((insertMap == null) ? 0 : insertMap.hashCode());

-    result = prime * result + ((replaceMap == null) ? 0 : replaceMap.hashCode());

-    return result;

-  }

-

-  @Override

-  public boolean equals(Object obj) {

-    if (this == obj)

-      return true;

-    if (obj == null)

-      return false;

-    if (getClass() != obj.getClass())

-      return false;

-    EditDistanceCostMap other = (EditDistanceCostMap) obj;

-    if (Double.doubleToLongBits(defaultCosts) != Double.doubleToLongBits(other.defaultCosts))

-      return false;

-    if (deleteMap == null) {

-      if (other.deleteMap != null)

-        return false;

-    } else if (!deleteMap.equals(other.deleteMap))

-      return false;

-    if (insertMap == null) {

-      if (other.insertMap != null)

-        return false;

-    } else if (!insertMap.equals(other.insertMap))

-      return false;

-    if (replaceMap == null) {

-      if (other.replaceMap != null)

-        return false;

-    } else if (!replaceMap.equals(other.replaceMap))

-      return false;

-    return true;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/EditDistanceResultMap.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/EditDistanceResultMap.java
deleted file mode 100644
index ccd9ef5..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/EditDistanceResultMap.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.LinkedList;

-import java.util.Map;

-import java.util.Set;

-

-/**

- * Class EditDistanceResultMap.

- * 

- * 

- * Contains the result of an edit distance query in the class MultiTreeWordList. The keys are the

- * strings in the trie, the values are the types of the query.

- * 

- */

-public class EditDistanceResultMap extends HashMap<String, Set<String>> {

-

-  private static final long serialVersionUID = 1L;

-

-  /**

-   * Adds the string file to the entry query without removing the current value.

-   * 

-   * @param query

-   *          the key to whose set we add.

-   * @param file

-   *          the value which is added to the key query.

-   * @return true if this set did not already contain the specified element, false otherwise.

-   */

-  public boolean put(String query, String file) {

-

-    if (!containsKey(query)) {

-      put(query, new HashSet<String>());

-    }

-

-    return get(query).add(file);

-  }

-

-  /**

-   * Adds all elements of the map m to this map, using the overloaded put function.

-   * 

-   * @param m

-   *          the map which is completely added.

-   */

-  @Override

-  public void putAll(Map<? extends String, ? extends Set<String>> m) {

-

-    for (String query : m.keySet()) {

-      for (String file : m.get(query)) {

-        put(query, file);

-      }

-    }

-  }

-

-  /**

-   * Returns whether a string is contained by the map or not, ignoring certain characters in the

-   * keys of the map.

-   * 

-   * @param query

-   *          The string which is contained or not as a key in the map.

-   * @param ignoreToken

-   *          The characters which are ignored when looking at the keys.

-   * @return true, if the query is contained (ignoring the characters of ignoreToken), false

-   *         otherwise.

-   */

-  public boolean containsKey(Object query, String ignoreToken) {

-

-    for (String s : keySet()) {

-

-      String temp = s;

-

-      for (char c : ignoreToken.toCharArray()) {

-        temp = temp.replaceAll("\\" + String.valueOf(c), "");

-      }

-

-      if (temp.equals(query)) {

-        return true;

-      }

-

-    }

-

-    return false;

-  }

-

-  /**

-   * Returns whether a key is contained by the map or not, ignoring the case of the keys (or not).

-   * 

-   * @param key

-   *          The key which is contained by the map or not.

-   * @param ignoreCase

-   *          Indicates whether the comparison is case sensitive or not.

-   * @return true, if the key is contained by the map (ignoring the case or not), false otherwise.

-   */

-  public boolean containsKey(Object key, boolean ignoreCase) {

-

-    if (ignoreCase) {

-

-      for (String s : keySet()) {

-        if (s.toLowerCase().equals(key)) {

-          return true;

-        }

-      }

-

-      return false;

-

-    } else {

-      return super.containsKey(key);

-    }

-  }

-

-  /**

-   * Returns a string representation of the map.

-   * 

-   * @return a string representation of the map.

-   */

-  @Override

-  public String toString() {

-    StringBuilder result = new StringBuilder();

-    LinkedList<String> keys = new LinkedList<String>();

-    keys.addAll(keySet());

-    Collections.sort(keys);

-

-    for (String s : keys) {

-      result.append(s + ", [" + get(s) + "] | ");

-    }

-

-    return result.toString();

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTextNode.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTextNode.java
deleted file mode 100644
index e6d2794..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTextNode.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.util.Collection;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.LinkedList;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-/**

- * Class MultipleTextNode.

- * 

- * 

- * Represents a node of the data structure MultiTreeWordList.

- */

-public class MultiTextNode {

-

-  /** The Character represented by the node. */

-  private char value;

-

-  // /** Indicates whether this is a word end. */

-  // private boolean isWordEnd;

-

-  /** The Map of child nodes. */

-  private Map<Character, MultiTextNode> children;

-

-  /** Documents/Types that contain the value specified by the super class. */

-  private Set<String> types;

-

-  private boolean isWordEnd = false;

-  

-  private static final int DEFAUL_INITIAL_CAPACITY = 5;

-

-  /** Default constructor uses a space as value. */

-  public MultiTextNode() {

-    this(' ', false);

-  }

-

-  /**

-   * Constructs a MultiTextNode with a character and the information, whether this is a word end or

-   * not.

-   * 

-   * @param value

-   *          The Character represented by the node.

-   * @param isWordEnd

-   *          Indicates whether this is a word end.

-   */

-  public MultiTextNode(char value, boolean isWordEnd) {

-    this(value, isWordEnd, DEFAUL_INITIAL_CAPACITY);

-  }

-

-  /**

-   * Constructs a MultiTextNode with a character and the information, whether this is a word end or

-   * not. Documents are the documents, where the word, represented by the path from the root to this

-   * node, occurs.

-   * 

-   * @param value

-   *          The Character represented by the node.

-   * @param isWordEnd

-   *          Indicates whether this is a word end.

-   * @param capacity

-   *          The initial capacity of the map of child nodes.

-   */

-  private MultiTextNode(char value, boolean isWordEnd, int capacity) {

-    this.value = value;

-    this.children = new HashMap<Character, MultiTextNode>(capacity);

-    setWordEnd(isWordEnd);

-  }

-

-  /**

-   * Adds the MultiTextNode n to the map of children.

-   * 

-   * @param n

-   *          The MultiTextNode, which should be added.

-   * @return The previous value associated with the value of n, if exists, null otherwise.

-   */

-  public MultiTextNode addChild(MultiTextNode n) {

-    if (children == null) {

-      children = new HashMap<Character, MultiTextNode>();

-    }

-    return children.put(n.getValue(), n);

-  }

-

-  

-  /**

-   * Returns the child, when you follow the c-edge, if exists. Returns null otherwise.

-   * 

-   * @param c

-   *          The edge which is chosen.

-   * @return The child of the c-edge, if exists, null otherwise.

-   */

-  public MultiTextNode getChildNode(char c) {

-

-    // Remember Lazy Initialization.

-    if (children == null) {

-      return null;

-    }

-

-    return children.get(c);

-  }

-

-  /**

-   * Returns the value of the MultiTextNode.

-   * 

-   * @return The value of the MultiTextNode.

-   */

-  public char getValue() {

-    return this.value;

-  }

-

-  public void setValue(char c) {

-    this.value = c;

-  }

-

-  /**

-   * Returns a value which specifies, whether the word is finished or not.

-   * 

-   * @return A value which specifies, whether the word is finished or not.

-   */

-  public boolean isWordEnd() {

-    return isWordEnd;

-  }

-

-  /**

-   * Returns the map of children as an unmodifiable map.

-   * 

-   * @return the map of children as an unmodifiable map.

-   */

-  public Map<Character, MultiTextNode> getChildren() {

-

-    // Remember Lazy Initialization.

-    if (children == null) {

-      return Collections.unmodifiableMap(new HashMap<Character, MultiTextNode>());

-    }

-

-    return Collections.unmodifiableMap(children);

-  }

-

-  /**

-   * Adds the string that specifies a document to the list of sources.

-   * 

-   * @param type

-   *          The string that specifies a document.

-   * @return True, if the sources did not already contain the string document, false otherwise.

-   */

-  public boolean addType(String type) {

-    if (types == null) {

-      types = new HashSet<String>();

-    }

-    return types.add(type);

-  }

-

-  /**

-   * Returns an unmodifiable Collection containing the types.

-   * 

-   * @return An unmodifiable Collection containing the types.

-   */

-  public Collection<String> getTypes() {

-

-    // Remember Lazy Initialization.

-    if (types == null) {

-      return Collections.emptyList();

-    }

-    return types;

-  }

-

-  /**

-   * Sets isWordEnd to the specified boolean.

-   * 

-   * @param b

-   *          The boolean, isWordEnd is set to.

-   */

-  public void setWordEnd(boolean b) {

-    isWordEnd = b;

-  }

-

-  /**

-   * Returns a String representation of the MultiTextNode.

-   * 

-   * @return A String representation of the MultiTextNode.

-   */

-  @Override

-  public String toString() {

-

-    StringBuilder s = new StringBuilder(Character.toString(getValue()) + "\n");

-

-    if (getChildren() != null) {

-

-      List<Character> sortedList = new LinkedList<Character>();

-      sortedList.addAll(getChildren().keySet());

-      Collections.sort(sortedList);

-

-      for (Character each : sortedList) {

-        s.append(each + ", ");

-      }

-    }

-

-    return s.toString();

-  }

-

-  @Override

-  public int hashCode() {

-    final int prime = 31;

-    int result = 1;

-    result = prime * result + ((children == null) ? 0 : children.hashCode());

-    // result = prime * result + (isWordEnd() ? 1231 : 1237);

-    result = prime * result + ((types == null) ? 0 : getTypes().hashCode());

-    result = prime * result + value;

-    return result;

-  }

-

-  @Override

-  public boolean equals(Object obj) {

-    if (this == obj)

-      return true;

-    if (obj == null)

-      return false;

-    if (getClass() != obj.getClass())

-      return false;

-    MultiTextNode other = (MultiTextNode) obj;

-    if (children == null) {

-      if (other.children != null)

-        return false;

-      // } else if (!childrenEquals(other))

-    } else if (!children.equals(other.getChildren()))

-      return false;

-    // if (isWordEnd != other.isWordEnd())

-    // return false;

-    if (types == null) {

-      if (other.types != null)

-        return false;

-    } else if (!typesEquals(other))

-      // } else if (!sources.equals(other.getSources()))

-      return false;

-    if (value != other.getValue())

-      return false;

-    return true;

-  }

-

-  /**

-   * Returns true, if the two MultiTextNodes have the same sources. That's true, when the sources

-   * contain the same strings.

-   * 

-   * @param other

-   *          The MultiTextNode, which is compared to this one.

-   * @return true, if if the two MultiTextNodes have the same sources, false otherwise.

-   */

-  private boolean typesEquals(MultiTextNode other) {

-

-    if (getTypes() == null) {

-      return other.getTypes() == null;

-    }

-

-    for (String s : getTypes()) {

-      if (!other.getTypes().contains(s)) {

-        return false;

-      }

-    }

-

-    for (String s : other.getTypes()) {

-      if (!getTypes().contains(s)) {

-        return false;

-      }

-    }

-

-    return true;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
deleted file mode 100644
index 65883e1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
+++ /dev/null
@@ -1,1324 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.io.BufferedReader;

-import java.io.File;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.InputStreamReader;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.LinkedList;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.springframework.core.io.FileSystemResource;

-import org.springframework.core.io.Resource;

-

-/**

- * Class MultiTreeWordList.

- * 

- * 

- */

-public class MultiTreeWordList implements RutaWordList {

-

-  private static final String ENCODING = "UTF-8";

-

-  private MultiTreeWordListPersistence persistence = new MultiTreeWordListPersistence();

-

-  /** The root of the TreeWordList. */

-  protected MultiTextNode root;

-

-  /** The cost model we are using. */

-  private EditDistanceCostMap costMap;

-

-  /**

-   * Default constructor.

-   */

-  public MultiTreeWordList() throws IOException {

-    this(new String[] {});

-  }

-

-  /**

-   * Default constructor uses just one file.

-   * 

-   * @param pathname

-   *          the pathname of the used file.

-   */

-  public MultiTreeWordList(String pathname) throws IOException {

-    this(new FileSystemResource(pathname));

-  }

-

-  /**

-   * @param lists

-   *          Resources to load.

-   * @throws IOException

-   *           When there is a problem reading a resource.

-   */

-  public MultiTreeWordList(Resource... lists) throws IOException {

-    this.root = new MultiTextNode();

-    this.costMap = new EditDistanceCostMap();

-

-    for (Resource list : lists) {

-      // check if the resource is a directory

-      File directory = null;

-      try {

-        directory = list.getFile();

-      } catch (IOException e) {

-        // resource is not on the file system

-        directory = null;

-      }

-

-      if (directory != null && directory.isDirectory()) {

-        // resource is a directory, load its content

-        for (File data : directory.listFiles()) {

-          load(new FileSystemResource(data));

-        }

-      } else {

-        // resource is not a directory, load it normally

-        load(list);

-      }

-    }

-  }

-

-  /**

-   * Constructor from an open stream. This method will close the stream.

-   * 

-   * @param stream

-   *          the stream to read the file from.

-   * @param name

-   *          associated name

-   */

-  public MultiTreeWordList(InputStream stream, String name) throws IOException {

-    this.root = new MultiTextNode();

-    this.costMap = new EditDistanceCostMap();

-

-    if (name.endsWith(".mtwl"))

-      persistence.readMTWL(root, stream, ENCODING);

-    if (name.endsWith(".txt"))

-      buildNewTree(stream, name);

-  }

-

-  /**

-   * Constructs a TreeWordList from a file with path = filename

-   * 

-   * @param pathnames

-   *          path of the file to create a TextWordList from

-   */

-  public MultiTreeWordList(String[] pathnames) throws IOException {

-    this.root = new MultiTextNode();

-    this.costMap = new EditDistanceCostMap();

-    for (String pathname : pathnames) {

-      load(new FileSystemResource(pathname));

-    }

-  }

-

-  public MultiTreeWordList(List<File> files) throws IOException {

-    this.root = new MultiTextNode();

-    this.costMap = new EditDistanceCostMap();

-    for (File file : files) {

-      load(new FileSystemResource(file));

-    }

-  }

-

-  /**

-   * Load a resource in this word list.

-   * 

-   * @param resource

-   *          Resource to load. The resource's name must end with .txt or .mtwl.

-   * @throws IOException

-   *           When there is a problem reading the resource.

-   */

-  private void load(Resource resource) throws IOException {

-    final String name = resource.getFilename();

-    InputStream stream = null;

-    try {

-      stream = resource.getInputStream();

-      if (name == null) {

-        throw new IllegalArgumentException("List does not have a name.");

-      } else if (name.endsWith(".txt")) {

-        buildNewTree(stream, name);

-      } else if (name.endsWith(".mtwl")) {

-        persistence.readMTWL(root, stream, "UTF-8");

-      } else {

-        throw new IllegalArgumentException("File name should end with .mtwl or .txt, found " + name);

-      }

-    } finally {

-      if (stream != null) {

-        stream.close();

-      }

-    }

-  }

-

-  /**

-   * Creates a new Tree in the existing treeWordList from a file with path pathname

-   * 

-   * @param stream

-   *          Input stream for the file containing the words for the treeWordList

-   * @param name

-   *          Associated name for the file

-   */

-  public void buildNewTree(InputStream stream, String name) throws IOException {

-    BufferedReader br = new BufferedReader(new InputStreamReader(stream, ENCODING));

-    String s = null;

-

-    while ((s = br.readLine()) != null) {

-      addWord(s.trim(), name);

-    }

-    stream.close();

-    br.close();

-  }

-

-  /**

-   * Add a new String into the MultiTreeWordList.

-   * 

-   * @param s

-   *          The String to add

-   * @param type

-   *          The type of the string.

-   */

-  public void addWord(String s, String type) {

-

-    // Create Nodes from all chars of the strings besides the last one

-    MultiTextNode pointer = root;

-

-    for (Character each : s.toCharArray()) {

-

-      MultiTextNode childNode = pointer.getChildNode(each);

-

-      if (childNode == null) {

-        childNode = new MultiTextNode(each, false);

-        pointer.addChild(childNode);

-      }

-

-      pointer = childNode;

-    }

-    pointer.setWordEnd(s.length() > 0);

-    pointer.addType(type);

-  }

-

-  /**

-   * Returns all Types contained by the MultiTreeWordList.

-   * 

-   * @return all Types contained by the MultiTreeWordList.

-   */

-  public Collection<String> getTypes() {

-    return getTypeCone(root);

-  }

-

-  /**

-   * Returns all types contained by the cone of the MultiTextNode node, including the types of node

-   * itself.

-   * 

-   * @param node

-   *          The node where we start, the root of the cone.

-   * @return all types contained by the cone of the MultiTextNode node, including the types of node

-   *         itself.

-   */

-  public Collection<String> getTypeCone(MultiTextNode node) {

-    // TODO improve this method!

-    List<String> returnList = new LinkedList<String>();

-

-    if (node.getTypes() != null) {

-      for (String s : node.getTypes()) {

-        if (!returnList.contains(s)) {

-          returnList.add(s);

-        }

-      }

-    }

-

-    for (Character c : node.getChildren().keySet()) {

-      for (String s : getTypeCone(node.getChildNode(c))) {

-        if (!returnList.contains(s)) {

-          returnList.add(s);

-        }

-      }

-    }

-

-    return returnList;

-  }

-

-  /**

-   * Returns all strings contained by the MultiTreeWordList.

-   * 

-   * @return All strings contained by the MultiTreeWordList.

-   */

-  public Collection<String> keySet() {

-    List<String> keySet = new LinkedList<String>(keySet(root, ""));

-    Collections.sort(keySet);

-    return keySet;

-  }

-

-  /**

-   * Returns all strings contained by the cone of the MultiTextNode node and uses prefix as the

-   * prefix of all the strings.

-   * 

-   * @param node

-   *          the node we are considering.

-   * @param prefix

-   *          the prefix until now.

-   * @return All strings contained by the cone of the MultiTextNode node.

-   */

-  private Collection<String> keySet(MultiTextNode node, String prefix) {

-

-    List<String> resultList = new LinkedList<String>();

-

-    // Recursion stop.

-    if (node.isWordEnd()) {

-      resultList.add(prefix);

-    }

-

-    // Recursion step.

-    for (Character c : node.getChildren().keySet()) {

-      String temp = prefix + String.valueOf(c);

-      resultList.addAll(keySet(node.getChildNode(c), temp));

-    }

-

-    return resultList;

-  }

-

-  /**

-   * Returns all types of the very string s.

-   * 

-   * @param s

-   *          The string with the types.

-   * @return All types from the very string s.

-   */

-  public Collection<String> getTypes(String s) {

-    return getTypes(s, false);

-  }

-

-  /**

-   * Returns the types of the string s.

-   * 

-   * @param s

-   *          The string with the types.

-   * @param ignoreCase

-   *          Indicates, whether we search case sensitive or not.

-   * @return The types of the string s.

-   */

-  public Collection<String> getTypes(String s, boolean ignoreCase) {

-

-    // Collection<Set<String>> types = editDistanceClever(root, s, "", 0.0,

-    // 0,

-    // ignoreCase, false, costMap, false, false).values();

-    // Map<String, Set<String>> types = editDistanceClever(root, s, "", 0.0,

-    // 0, ignoreCase, false, costMap, false, false);

-    Map<String, Set<String>> types = editDistance(s, 0, ignoreCase, "");

-    Set<String> returnSet = new HashSet<String>();

-

-    for (Entry<String, Set<String>> each : types.entrySet()) {

-      returnSet.addAll(each.getValue());

-    }

-

-    return returnSet;

-  }

-

-  /**

-   * Returns a list of types which belong to a string.

-   * 

-   * @param string

-   *          The string which types we want to have.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param ignoreLength

-   *          If the length of the string is less than of equal to this, we search case insensitive.

-   * @param edit

-   *          Indicates whether we use an edit distance or not.

-   * @param distance

-   *          The edit distance to a string contained by the MultiTreeWordList.

-   * @param ignoreToken

-   *          Characters which can be ignored.

-   * @return Returns a list of types which belong to a string.

-   */

-

-  public List<String> contains(String string, boolean ignoreCase, int ignoreLength, boolean edit,

-          double distance, String ignoreToken) {

-

-    List<String> resultList = new LinkedList<String>();

-    Map<String, Set<String>> editDistance;

-

-    if (string.length() >= ignoreLength && ignoreCase) {

-      editDistance = editDistance(string, (int) distance, true, ignoreToken, false);

-    } else {

-      editDistance = editDistance(string, (int) distance, false, ignoreToken, false);

-    }

-    for (Entry<String, Set<String>> each : editDistance.entrySet()) {

-      resultList.addAll(each.getValue());

-    }

-    return resultList;

-  }

-

-  /**

-   * Checks whether a string is contained by the MultiTreeWordList or not.

-   * 

-   * @param string

-   *          The string which is contained or not.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param ignoreLength

-   *          If the length of the string is less than of equal to this, we search case insensitive.

-   * @param edit

-   *          Indicates whether we use an edit distance or not.

-   * @param distance

-   *          The edit distance to a string contained by the MultiTreeWordList.

-   * @param ignoreToken

-   *          Characters which can be ignored.

-   * @return true, if the string is contained by the MultiTreeWordList, false otherwise.

-   */

-  public boolean containsBool(String string, boolean ignoreCase, int ignoreLength, boolean edit,

-          double distance, String ignoreToken) {

-    return editDistanceBool(root, string, "", distance, 0, ignoreCase, false, costMap);

-  }

-

-  /**

-   * Checks whether the tree contains exaclty the string s.

-   * 

-   * @param s

-   *          The string which is contained or not.

-   * @return True, if the TreeWordList contains exactly the string s, false otherwise.

-   */

-  public boolean contains(String s) {

-    return contains(s, false);

-  }

-

-  /**

-   * Checks whether the tree contains the string s.

-   * 

-   * @param s

-   *          The string which is contained or not.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @return True, if the TreeWordList contains the string s, false otherwise.

-   */

-  public boolean contains(String s, boolean ignoreCase) {

-    return contains(s, ignoreCase, 0, new char[] {}, 0, true);

-  }

-

-  /**

-   * Checks if the MultiTreeWordList contains the string s.

-   * 

-   * @param s

-   *          The string which is contained or not.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param size

-   *          The index of the string.

-   * @param ignoreChars

-   *          Characters which can be ignored.

-   * @param maxIgnoreChars

-   *          The maximum number of ignored characters.

-   * @return true, if TreeWordList contains the string, false otherwise.

-   */

-  public boolean contains(String s, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS) {

-

-    EditDistanceCostMap edm = new EditDistanceCostMap();

-

-    for (Character c : ignoreChars) {

-      edm.setDeleteCosts(c, 0.0);

-    }

-

-    return editDistanceBool(root, s, "", maxIgnoreChars, 0, ignoreCase, false, edm);

-  }

-

-  /**

-   * Checks if the MultiTreeWordList contains a prefix of the string s.

-   * 

-   * @param s

-   *          The string which is contained or not.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param size

-   *          The index of the string.

-   * @param ignoreChars

-   *          Characters which can be ignored.

-   * @param maxIgnoreChars

-   *          The maximum number of ignored characters.

-   * @return true, if TreeWordList contains a prefix of the string, false otherwise.

-   */

-  public boolean containsFragment(String s, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS) {

-    MultiTextNode pointer = root;

-    return recursiveContains(pointer, s, 0, ignoreCase && s.length() > size, true, ignoreChars,

-            maxIgnoreChars);

-  }

-

-  /**

-   * Checks whether prefix of a string is contained by the MultiTreeWordList or not.

-   * 

-   * @param string

-   *          The string whose prefix is contained or not.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param ignoreLength

-   *          If the length of the string is less than of equal to this, we search case insensitive.

-   * @param edit

-   *          Indicates whether we use an edit distance or not.

-   * @param distance

-   *          The edit distance to a string contained by the MultiTreeWordList.

-   * @param ignoreToken

-   *          Characters which can be ignored.

-   * @return true, if a prefix of the string is contained by the MultiTreeWordList, false otherwise.

-   */

-  public boolean containsFragmentBool(String string, boolean ignoreCase, int ignoreLength,

-          boolean edit, double distance, String ignoreToken) {

-

-    if (string.length() >= ignoreLength && ignoreCase) {

-      return editDistanceBool(root, string, "", distance, 0, true, true, costMap);

-    } else {

-      return editDistanceBool(root, string, "", distance, 0, false, true, costMap);

-    }

-  }

-

-  /**

-   * Returns a list of types which belong to a prefix of a string that is contained by the

-   * MultiTreeWordList.

-   * 

-   * @param string

-   *          The string whose prefix's types we are interested in.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param ignoreLength

-   *          If the length of the string is less than of equal to this, we search case insensitive.

-   * @param edit

-   *          Indicates whether we use an edit distance or not.

-   * @param distance

-   *          The edit distance to a string contained by the MultiTreeWordList.

-   * @param ignoreToken

-   *          Characters which can be ignored.

-   * @return A list of types which belong to a prefix of a string that is contained by the

-   *         MultiTreeWordList.

-   */

-  public List<String> containsFragment(String string, boolean ignoreCase, int ignoreLength,

-          boolean edit, double distance, String ignoreToken) {

-

-    List<String> resultList = new LinkedList<String>();

-    Map<String, Set<String>> resultMap = null;

-

-    if (!edit) {

-      return recursiveContains2(root, string, 0, ignoreCase && string.length() > ignoreLength,

-              true, ignoreToken.toCharArray(), ignoreLength);

-    } else {

-      if (string.length() >= ignoreLength && ignoreCase) {

-        resultMap = editDistance(string, (int) distance, true, ignoreToken, true);

-      } else {

-        resultMap = editDistance(string, (int) distance, false, ignoreToken, true);

-      }

-

-      for (Set<String> set : resultMap.values()) {

-        for (String s : set) {

-          if (!resultList.contains(s)) {

-            // resultList.addAll(resultMap.get(set));

-            resultList.add(s);

-          }

-        }

-      }

-    }

-

-    return resultList;

-  }

-

-  /**

-   * Returns true, if the MultiTreeWordList contains the string text, false otherwise.

-   * 

-   * @param pointer

-   *          The MultiTextNode we are looking at.

-   * @param text

-   *          The string which is contained or not.

-   * @param index

-   *          The index of the string text we checked until now.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param fragment

-   *          Indicates whether we are looking for a prefix of the string text.

-   * @param ignoreChars

-   *          Characters which can be ignored.

-   * @param maxIgnoreChars

-   *          Maximum number of characters which are allowed to be ignored.

-   * @return True, if the TreeWordList contains the string text, false otherwise.

-   */

-  private List<String> recursiveContains2(MultiTextNode pointer, String text, int index,

-          boolean ignoreCase, boolean fragment, char[] ignoreChars, int maxIgnoreChars) {

-

-    if (pointer == null) {

-      return null;

-    }

-

-    if (index == text.length()) {

-      if (pointer.isWordEnd()) {

-        return new ArrayList<String>(pointer.getTypes());

-      }

-      if (fragment) {

-        return Collections.emptyList();

-      }

-    }

-

-    char charAt = text.charAt(index);

-    boolean charAtIgnored = false;

-

-    if (ignoreChars != null) {

-      for (char each : ignoreChars) {

-        if (each == charAt) {

-          charAtIgnored = true;

-          break;

-        }

-      }

-      charAtIgnored &= index != 0;

-    }

-

-    int next = ++index;

-

-    if (ignoreCase) {

-

-      // Lower Case Node.

-      MultiTextNode childNodeL = pointer.getChildNode(Character.toLowerCase(charAt));

-      if (childNodeL == null) {

-        childNodeL = skipWS(pointer, Character.toLowerCase(charAt));

-      }

-

-      // Upper Case Node.

-      MultiTextNode childNodeU = pointer.getChildNode(Character.toUpperCase(charAt));

-      if (childNodeU == null) {

-        childNodeU = skipWS(pointer, Character.toUpperCase(charAt));

-      }

-

-      if (charAtIgnored && childNodeL == null && childNodeU == null) {

-        // Character is ignored and does not appear.

-        return recursiveContains2(pointer, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars);

-      } else {

-        // Recursion.

-        Collection<String> recursiveContainsL = recursiveContains2(childNodeL, text, next,

-                ignoreCase, fragment, ignoreChars, maxIgnoreChars);

-        Collection<String> recursiveContainsU = recursiveContains2(childNodeU, text, next,

-                ignoreCase, fragment, ignoreChars, maxIgnoreChars);

-        if (recursiveContainsL == null && recursiveContainsU == null) {

-          return null;

-        }

-        List<String> result = new LinkedList<String>();

-        if (recursiveContainsL != null) {

-          result.addAll(recursiveContainsL);

-        }

-        if (recursiveContainsU != null) {

-          result.addAll(recursiveContainsU);

-        }

-        return result;

-      }

-

-    } else {

-      // Case sensitive.

-      MultiTextNode childNode = pointer.getChildNode(charAt);

-

-      if (charAtIgnored && childNode == null) {

-        // Recursion with incremented index.

-        return recursiveContains2(pointer, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars);

-      } else {

-        // Recursion with new node.

-        return recursiveContains2(childNode, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars);

-      }

-    }

-  }

-

-  private MultiTextNode skipWS(MultiTextNode pointer, char charAt) {

-    MultiTextNode childNode = pointer.getChildNode(' ');

-    if (childNode != null) {

-      MultiTextNode node = childNode.getChildNode(charAt);

-      if (node == null) {

-        return skipWS(childNode, charAt);

-      } else {

-        return node;

-      }

-    }

-    return null;

-  }

-

-  /**

-   * Returns true, if the MultiTreeWordList contains the string text, false otherwise.

-   * 

-   * @param pointer

-   *          The MultiTextNode we are looking at.

-   * @param text

-   *          The string which is contained or not.

-   * @param index

-   *          The index of the string text we checked until now.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param fragment

-   *          Indicates whether we are looking for a prefix of the string text.

-   * @param ignoreChars

-   *          Characters which can be ignored.

-   * @param maxIgnoreChars

-   *          Maximum number of characters which are allowed to be ignored.

-   * @return True, if the TreeWordList contains the string text, false otherwise.

-   */

-  private boolean recursiveContains(MultiTextNode pointer, String text, int index,

-          boolean ignoreCase, boolean fragment, char[] ignoreChars, int maxIgnoreChars) {

-

-    if (pointer == null) {

-      return false;

-    }

-

-    if (index == text.length()) {

-      return fragment || pointer.isWordEnd();

-    }

-

-    char charAt = text.charAt(index);

-    boolean charAtIgnored = false;

-

-    if (ignoreChars != null) {

-      for (char each : ignoreChars) {

-        if (each == charAt) {

-          charAtIgnored = true;

-          break;

-        }

-      }

-      charAtIgnored &= index != 0;

-    }

-

-    int next = ++index;

-

-    if (ignoreCase) {

-

-      // Lower Case Node.

-      MultiTextNode childNodeL = pointer.getChildNode(Character.toLowerCase(charAt));

-

-      // Upper Case Node.

-      MultiTextNode childNodeU = pointer.getChildNode(Character.toUpperCase(charAt));

-

-      if (charAtIgnored && childNodeL == null && childNodeU == null) {

-        // Character is ignored and does not appear.

-        return recursiveContains(pointer, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars);

-      } else {

-        // Recursion.

-        return recursiveContains(childNodeL, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars)

-                || recursiveContains(childNodeU, text, next, ignoreCase, fragment, ignoreChars,

-                        maxIgnoreChars);

-      }

-

-    } else {

-      // Case sensitive.

-      MultiTextNode childNode = pointer.getChildNode(charAt);

-

-      if (charAtIgnored && childNode == null) {

-        // Recursion with incremented index.

-        return recursiveContains(pointer, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars);

-      } else {

-        // Recursion with new node.

-        return recursiveContains(childNode, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars);

-      }

-    }

-  }

-

-  public Collection<AnnotationFS> find(RutaStream stream, Map<String, Object> typeMap,

-          boolean ignoreCase, int ignoreLength, boolean edit, double distance, String ignoreToken) {

-

-    Collection<AnnotationFS> results = new HashSet<AnnotationFS>();

-    stream.moveToFirst();

-    FSIterator<AnnotationFS> streamPointer = stream.copy();

-

-    while (stream.isValid()) {

-      RutaBasic anchorBasic = (RutaBasic) stream.get();

-      streamPointer.moveTo(anchorBasic);

-

-      List<RutaBasic> basicsToAdd = new ArrayList<RutaBasic>();

-      basicsToAdd.add(anchorBasic);

-      String text = anchorBasic.getCoveredText();

-      StringBuilder candidate = new StringBuilder(text);

-      String lastCandidate = candidate.toString();

-

-      if (text.length() != 1 || !ignoreToken.contains(text)) {

-

-        List<AnnotationFS> interResults = new ArrayList<AnnotationFS>();

-

-        while (streamPointer.isValid()) {

-

-          boolean skip = false;

-          String currentBasicText = basicsToAdd.get(basicsToAdd.size() - 1).getCoveredText();

-          if (currentBasicText.length() == 1 && ignoreToken.contains(currentBasicText)) {

-            skip = true;

-          }

-          List<String> types = null;

-          if (!skip) {

-            types = containsFragment(candidate.toString(), ignoreCase, ignoreLength, edit,

-                    distance, ignoreToken);

-          }

-          if (skip || types != null) {

-            streamPointer.moveToNext();

-            if (streamPointer.isValid()) {

-              RutaBasic next = (RutaBasic) streamPointer.get();

-              // List<String> contains = contains(candidate,

-              // ignoreCase,

-              // ignoreLength, edit, distance, ignoreToken);

-              if (!skip) {

-                tryToCreateAnnotation(types, stream, results, basicsToAdd, candidate.toString(),

-                        interResults, ignoreCase, ignoreLength, edit, distance, ignoreToken,

-                        typeMap);

-              }

-              lastCandidate = candidate.toString();

-              candidate.append(next.getCoveredText());

-              basicsToAdd.add(next);

-

-            } else {

-              // !streamPointer.isValid();

-              tryToCreateAnnotation(types, stream, results, basicsToAdd, lastCandidate,

-                      interResults, ignoreCase, ignoreLength, edit, distance, ignoreToken, typeMap);

-            }

-          } else {

-

-            // containsFragment.isEmpty();

-            // basicsToAdd.remove(basicsToAdd.size() - 1);

-            // tryToCreateAnnotation(stream, results, basicsToAdd,

-            // lastCandidate, interResults, ignoreCase,

-            // ignoreLength, edit, distance, ignoreToken, typeMap);

-

-            // breaks inner while()-loop.

-            break;

-          }

-

-        }

-      }

-      stream.moveToNext();

-    }

-

-    return results;

-  }

-

-  public List<AnnotationFS> find(RutaStream stream, boolean ignoreCase, int size,

-          char[] ignoreChars, int maxIgnoredChars, boolean ignoreWS) {

-    assert false;

-    return new ArrayList<AnnotationFS>();

-  }

-

-  private void tryToCreateAnnotation(List<String> types, RutaStream stream,

-          Collection<AnnotationFS> results, List<RutaBasic> basicsToAdd, String lastCandidate,

-          List<AnnotationFS> interResult, boolean ignoreCase, int ignoreLength, boolean edit,

-          double distance, String ignoreToken, Map<String, Object> map) {

-    if (basicsToAdd.size() >= 1 && types != null) {

-      Set<String> set = new HashSet<String>(types);

-      for (String each : set) {

-        Object o = map.get(each);

-        if (o instanceof Type) {

-          Type type = (Type) o;

-          int begin = basicsToAdd.get(0).getBegin();

-          int end = basicsToAdd.get(basicsToAdd.size() - 1).getEnd();

-          AnnotationFS newFS = stream.getCas().createAnnotation(type, begin, end);

-          results.add(newFS);

-        } else if (o instanceof List) {

-          List<?> list = (List<?>) o;

-          Type type = null;

-          String featureString = null;

-          Object value = each;

-          if (list.size() == 2 ||list.size() == 3) {

-            if (list.get(0) instanceof Type) {

-              type = (Type) list.get(0);

-            }

-            if (list.get(1) instanceof String) {

-              featureString = (String) list.get(1);

-            }

-            if (list.size() == 3) {

-              value =  list.get(2);

-            }

-            

-            if (type != null && featureString != null) {

-              int begin = basicsToAdd.get(0).getBegin();

-              int end = basicsToAdd.get(basicsToAdd.size() - 1).getEnd();

-              AnnotationFS newFS = stream.getCas().createAnnotation(type, begin, end);

-              Feature feature = type.getFeatureByBaseName(featureString);

-              setFeatureValue(newFS, feature, value);

-              results.add(newFS);

-            }

-          }

-        }

-      }

-    } else if (interResult != null && !interResult.isEmpty()) {

-      results.addAll(interResult);

-    }

-  }

-

-  private void setFeatureValue(AnnotationFS annotationFS, Feature feature, Object o) {

-    if (feature != null && o != null) {

-      Type range = feature.getRange();

-      String rangeName = range.getName();

-      if (rangeName.equals(UIMAConstants.TYPE_STRING) && o instanceof String) {

-        annotationFS.setStringValue(feature, (String) o);

-      } else if (rangeName.equals(UIMAConstants.TYPE_INTEGER) && o instanceof Number) {

-        annotationFS.setIntValue(feature, ((Number) o).intValue());

-      } else if (rangeName.equals(UIMAConstants.TYPE_DOUBLE) && o instanceof Number) {

-        annotationFS.setDoubleValue(feature, ((Number) o).doubleValue());

-      } else if (rangeName.equals(UIMAConstants.TYPE_FLOAT) && o instanceof Number) {

-        annotationFS.setFloatValue(feature, ((Number) o).floatValue());

-      } else if (rangeName.equals(UIMAConstants.TYPE_BYTE) && o instanceof Number) {

-        annotationFS.setByteValue(feature, ((Number) o).byteValue());

-      } else if (rangeName.equals(UIMAConstants.TYPE_SHORT) && o instanceof Number) {

-        annotationFS.setShortValue(feature, ((Number) o).shortValue());

-      } else if (rangeName.equals(UIMAConstants.TYPE_LONG) && o instanceof Number) {

-        annotationFS.setLongValue(feature, ((Number) o).longValue());

-      } else if (rangeName.equals(UIMAConstants.TYPE_BOOLEAN) && o instanceof Boolean) {

-        annotationFS.setBooleanValue(feature, (Boolean) o);

-      } else if (rangeName.equals(UIMAConstants.TYPE_STRING) & o instanceof Type) {

-        annotationFS.setStringValue(feature, ((Type) o).getName());

-      }

-    } else {

-      throw new IllegalArgumentException("Not able to assign feature value: " + o + " -> "

-              + feature);

-    }

-  }

-

-  /**

-   * Returns a map with all strings with a specified edit distance to the string query as keys and

-   * the files they belong to as values.

-   * 

-   * @param query

-   *          The query string.

-   * @return A map with all strings with a specified edit distance to the string query as keys and

-   *         the files they belong to as values.

-   */

-  public Map<String, Set<String>> editDistance(String query, int distance) {

-    return editDistance(query, distance, false, "");

-  }

-

-  /**

-   * Returns a map with all strings with a specified edit distance to the string query as keys and

-   * the files they belong to as values.

-   * 

-   * @param query

-   *          The query string.

-   * @param distance

-   *          The specified edit distance.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @return A map with all strings with a specified edit distance to the string query as keys and

-   *         the files they belong to as values.

-   */

-  public Map<String, Set<String>> editDistance(String query, int distance, boolean ignoreCase,

-          String ignoreToken) {

-    return editDistance(query, distance, ignoreCase, ignoreToken, false);

-  }

-

-  /**

-   * Returns a map with all strings with a specified edit distance to the string query as keys and

-   * the files they belong to as values.

-   * 

-   * @param query

-   *          The query string.

-   * @param distance

-   *          The specified edit distance.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param fragment

-   *          Indicates whether we search for fragments of the query string or not.

-   * @return A map with all strings with a specified edit distance to the string query as keys and

-   *         the files they belong to as values.

-   */

-  public Map<String, Set<String>> editDistance(String query, int distance, boolean ignoreCase,

-          String ignoreToken, boolean fragment) {

-

-    // The second alternative realizes the fragment functionality by

-    // setting the insert costs of the ignored character to zero. This

-    // is much more elegant and easier to maintain. I don't know if the

-    // other way is faster, so I did not delete it yet.

-

-    Map<Character, Double> oldInsertCosts = new HashMap<Character, Double>();

-    EditDistanceCostMap edcm = new EditDistanceCostMap();

-

-    // We need to store the old insert costs before we set them to zero.

-    for (char c : ignoreToken.toCharArray()) {

-      oldInsertCosts.put(c, edcm.getInsertCosts(c));

-      edcm.setInsertCosts(c, 0.0);

-    }

-

-    Map<String, Set<String>> result = null;

-

-    if (ignoreCase) {

-      result = editDistanceClever(root, query.toLowerCase(), "", distance, 0, true, fragment, edcm,

-              false, false);

-    } else {

-      result = editDistanceClever(root, query, "", distance, 0, false, fragment, edcm, false, false);

-    }

-

-    // Restoring of the old insert costs.

-    for (Entry<Character, Double> c : oldInsertCosts.entrySet()) {

-      edcm.setDeleteCosts(c.getKey(), c.getValue());

-    }

-

-    return result;

-  }

-

-  /**

-   * Returns a map with all strings with a specified edit distance to the string query as keys and

-   * the files they belong to as values.

-   * 

-   * @param node

-   *          The MultiTextNode which is under consideration at the moment.

-   * @param query

-   *          The query string.

-   * @param result

-   *          The result which matched until now.

-   * @param distance

-   *          The remaining edit distance.

-   * @param index

-   *          The index of the query string at the moment.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param fragment

-   *          Indicates whether we search for fragments of the query string or not.

-   * @param edm

-   *          The edit distance cost map we are using.

-   * @param lastActionInsert

-   *          Indicates whether the last action was an insert action.

-   * @param lastActionDelete

-   *          Indicates whether the last action was a delete action.

-   * @return A map with all strings with a specified edit distance to the string query as keys and

-   *         the files they belong to as values.

-   */

-  private Map<String, Set<String>> editDistanceClever(MultiTextNode node, String query,

-          String result, double distance, int index, boolean ignoreCase, boolean fragment,

-          EditDistanceCostMap edm, boolean lastActionInsert, boolean lastActionDelete) {

-

-    EditDistanceResultMap resultMap = new EditDistanceResultMap();

-

-    if (!lastActionInsert) {

-      // Delete.

-      if (distance - edm.getDeleteCosts(node.getValue()) >= 0 && result.length() > 0) {

-        resultMap.putAll(editDistanceClever(node, query, result,

-                distance - edm.getDeleteCosts(node.getValue()), index + 1, ignoreCase, fragment,

-                edm, false, true));

-      }

-    }

-

-    // Recursion stop.

-    if (node.isWordEnd() || fragment) {

-

-      HashMap<String, Set<String>> temp = new HashMap<String, Set<String>>();

-

-      double remainingInsertCosts = 0.0;

-

-      // Accumulating remaining insert costs if the query is longer than

-      // the word in the trie.

-      for (int i = index; i < query.length(); i++) {

-        remainingInsertCosts += edm.getInsertCosts(query.charAt(i));

-      }

-

-      if (remainingInsertCosts <= distance) {

-        // if (remainingInsertCosts <= distance &&

-        // !node.getTypes().isEmpty()) {

-        // if (query.length() - index <= distance) {

-

-        if (fragment) {

-          temp.put(result, new HashSet<String>(getTypeCone(node)));

-        } else {

-          temp.put(result, new HashSet<String>(node.getTypes()));

-        }

-

-        resultMap.putAll(temp);

-      }

-

-      // Important: word end does not mean no children any more!

-      if (node.getChildren() == null) {

-        return resultMap;

-      }

-    }

-

-    // Recursion.

-    for (MultiTextNode tempNode : node.getChildren().values()) {

-

-      if (index < query.length()) {

-        if (ignoreCase) {

-          if (Character.toLowerCase(tempNode.getValue()) == Character.toLowerCase(query

-                  .charAt(index))) {

-            resultMap.putAll(editDistanceClever(tempNode, query, result + tempNode.getValue(),

-                    distance, index + 1, ignoreCase, fragment, edm, false, false));

-          }

-        } else {

-          if (tempNode.getValue() == query.charAt(index)) {

-            resultMap.putAll(editDistanceClever(tempNode, query, result + tempNode.getValue(),

-                    distance, index + 1, ignoreCase, fragment, edm, false, false));

-          }

-        }

-      }

-

-      if (distance - edm.getReplaceCosts(node.getValue(), tempNode.getValue()) >= 0) {

-

-        // Substitute.

-        resultMap.putAll(editDistanceClever(tempNode, query, result + tempNode.getValue(), distance

-                - edm.getReplaceCosts(node.getValue(), tempNode.getValue()), index + 1, ignoreCase,

-                fragment, edm, false, false));

-      }

-

-      if (!lastActionDelete) {

-        if (distance - edm.getInsertCosts(tempNode.getValue()) >= 0) {

-          // Insert - use the same index twice.

-          resultMap.putAll(editDistanceClever(tempNode, query, result + tempNode.getValue(),

-                  distance - edm.getInsertCosts(tempNode.getValue()), index, ignoreCase, fragment,

-                  edm, true, false));

-        }

-      }

-    }

-

-    return resultMap;

-  }

-

-  /**

-   * Checks if a string is contained by the MultiTreeWordList.

-   * 

-   * @param node

-   *          The MultiTextNode which is under consideration at the moment.

-   * @param query

-   *          The query string.

-   * @param result

-   *          The result which matched until now.

-   * @param distance

-   *          The remaining edit distance.

-   * @param index

-   *          The index of the query string at the moment.

-   * @param ignoreCase

-   *          Indicates whether we search case sensitive or not.

-   * @param fragment

-   *          Indicates whether we search for fragments of the query string or not.

-   * @param edm

-   *          The edit distance cost map we are using.

-   * @return A map with all strings with a specified edit distance to the string query as keys and

-   *         the files they belong to as values.

-   */

-  private boolean editDistanceBool(MultiTextNode node, String query, String result,

-          double distance, int index, boolean ignoreCase, boolean fragment, EditDistanceCostMap edm) {

-

-    boolean deletion = false;

-    boolean insertion = false;

-    boolean substitution = false;

-    boolean noop = false;

-

-    // Recursion stop.

-    if (fragment) {

-      if (index == query.length()) {

-        return true;

-      }

-    }

-

-    if (node.isWordEnd()) {

-

-      double remainingInsertCosts = 0.0;

-

-      // Accumulating remaining insert costs if the query is longer than

-      // the word in the trie.

-      for (int i = index; i < query.length(); i++) {

-        remainingInsertCosts += edm.getInsertCosts(query.charAt(i));

-      }

-

-      if (remainingInsertCosts <= distance) {

-        // if (query.length() - index <= distance) {

-        return true;

-      }

-    }

-

-    // Delete.

-    if (distance - edm.getDeleteCosts(node.getValue()) >= 0 && result.length() > 0) {

-      deletion = editDistanceBool(node, query, result,

-              distance - edm.getDeleteCosts(node.getValue()), index + 1, ignoreCase, fragment, edm);

-

-      if (deletion) {

-        return true;

-      }

-    }

-

-    // Recursion.

-    for (MultiTextNode tempNode : node.getChildren().values()) {

-

-      if (index < query.length()) {

-        if (ignoreCase) {

-          if (Character.toLowerCase(tempNode.getValue()) == Character.toLowerCase(query

-                  .charAt(index))) {

-            noop = editDistanceBool(tempNode, query, result + tempNode.getValue(), distance,

-                    index + 1, ignoreCase, fragment, edm);

-          }

-        } else {

-          if (tempNode.getValue() == query.charAt(index)) {

-            noop = editDistanceBool(tempNode, query, result + tempNode.getValue(), distance,

-                    index + 1, ignoreCase, fragment, edm);

-          }

-        }

-

-        if (noop) {

-          return true;

-        }

-      }

-

-      if (distance - edm.getReplaceCosts(node.getValue(), tempNode.getValue()) >= 0) {

-

-        // Substitute.

-        substitution = editDistanceBool(tempNode, query, result + tempNode.getValue(), distance

-                - edm.getReplaceCosts(node.getValue(), tempNode.getValue()), index + 1, ignoreCase,

-                fragment, edm);

-

-        if (substitution) {

-          return true;

-        }

-      }

-

-      if (distance - edm.getInsertCosts(tempNode.getValue()) >= 0) {

-        // Insert - use the same index twice.

-        insertion = editDistanceBool(tempNode, query, result + tempNode.getValue(),

-                distance - edm.getInsertCosts(tempNode.getValue()), index, ignoreCase, fragment,

-                edm);

-

-        if (insertion) {

-          return true;

-        }

-      }

-

-    }

-

-    return false;

-  }

-

-  // private Map<String, Set<String>> editDistance(MultiTextNode node, String query, String result,

-  // double distance, int index, boolean ignoreCase, String ignoreToken, boolean fragment,

-  // EditDistanceCostMap edm) {

-  //

-  //

-  // EditDistanceResultMap resultMap = new EditDistanceResultMap();

-  //

-  // // Delete.

-  // if (distance - edm.getDeleteCosts(node.getValue()) >= 0 && result.length() > 0) {

-  // resultMap.putAll(editDistance(node, query, result, distance

-  // - edm.getDeleteCosts(node.getValue()), index + 1, ignoreCase, ignoreToken, fragment,

-  // edm));

-  // }

-  //

-  // // Recursion stop.

-  // if (node.isWordEnd()) {

-  //

-  // HashMap<String, Set<String>> temp = new HashMap<String, Set<String>>();

-  //

-  // if (query.length() - index <= distance) {

-  // temp.put(result, new HashSet<String>(node.getTypes()));

-  // resultMap.putAll(temp);

-  // }

-  //

-  // // Ignore token at the end of the word.

-  // if (ignoreToken.contains(String.valueOf(node.getValue()))) {

-  // temp.put(result, new HashSet<String>(node.getTypes()));

-  // resultMap.putAll(temp);

-  // }

-  //

-  // if (node.getChildren() == null) {

-  // return resultMap;

-  // }

-  // }

-  //

-  // // Recursion.

-  // for (MultiTextNode tempNode : node.getChildren().values()) {

-  //

-  // if (index < query.length()) {

-  // if (ignoreCase) {

-  // if (Character.toLowerCase(tempNode.getValue()) == Character.toLowerCase(query

-  // .charAt(index))) {

-  // resultMap.putAll(editDistance(tempNode, query, result + tempNode.getValue(), distance,

-  // index + 1, ignoreCase, ignoreToken, fragment, edm));

-  // }

-  // } else {

-  // if (tempNode.getValue() == query.charAt(index)) {

-  // resultMap.putAll(editDistance(tempNode, query, result + tempNode.getValue(), distance,

-  // index + 1, ignoreCase, ignoreToken, fragment, edm));

-  // }

-  // }

-  // }

-  //

-  // if (distance - edm.getReplaceCosts(node.getValue(), tempNode.getValue()) >= 0) {

-  //

-  // // Substitute.

-  // resultMap.putAll(editDistance(tempNode, query, result + tempNode.getValue(), distance

-  // - edm.getReplaceCosts(node.getValue(), tempNode.getValue()), index + 1, ignoreCase,

-  // ignoreToken, fragment, edm));

-  // }

-  //

-  // // Ignore token.

-  // if (ignoreToken.contains(String.valueOf(tempNode.getValue()))) {

-  // resultMap.putAll(editDistance(tempNode, query, result + tempNode.getValue(), distance,

-  // index, ignoreCase, ignoreToken, fragment, edm));

-  // } else {

-  // if (distance - edm.getInsertCosts(tempNode.getValue()) >= 0) {

-  // // Insert - use the same index twice.

-  // resultMap.putAll(editDistance(tempNode, query, result + tempNode.getValue(), distance

-  // - edm.getInsertCosts(tempNode.getValue()), index, ignoreCase, ignoreToken,

-  // fragment, edm));

-  // }

-  // }

-  // }

-  //

-  // return resultMap;

-  // }

-

-  @Override

-  public int hashCode() {

-    final int prime = 31;

-    int result = 1;

-    result = prime * result + ((costMap == null) ? 0 : costMap.hashCode());

-    result = prime * result + ((root == null) ? 0 : root.hashCode());

-    return result;

-  }

-

-  @Override

-  public boolean equals(Object obj) {

-    if (this == obj)

-      return true;

-    if (obj == null)

-      return false;

-    if (getClass() != obj.getClass())

-      return false;

-    MultiTreeWordList other = (MultiTreeWordList) obj;

-    if (costMap == null) {

-      if (other.costMap != null)

-        return false;

-    } else if (!costMap.equals(other.costMap))

-      return false;

-    if (root == null) {

-      if (other.root != null)

-        return false;

-    } else if (!root.equals(other.root))

-      return false;

-    return true;

-  }

-

-  public void createMTWLFile(String path, boolean compress, String encoding) throws IOException {

-    persistence.createMTWLFile(root, path, compress, encoding);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordListPersistence.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordListPersistence.java
deleted file mode 100644
index 2db9a25..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordListPersistence.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.io.BufferedInputStream;

-import java.io.BufferedOutputStream;

-import java.io.FileInputStream;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.InputStreamReader;

-import java.io.OutputStreamWriter;

-import java.io.Writer;

-import java.util.zip.ZipEntry;

-import java.util.zip.ZipInputStream;

-import java.util.zip.ZipOutputStream;

-

-import javax.xml.parsers.ParserConfigurationException;

-import javax.xml.parsers.SAXParser;

-import javax.xml.parsers.SAXParserFactory;

-

-import org.xml.sax.InputSource;

-import org.xml.sax.SAXException;

-import org.xml.sax.XMLReader;

-

-public class MultiTreeWordListPersistence {

-

-  /**

-   * Reads the XML-File with the specified path and creates a TreeWordList.

-   * 

-   * @param root

-   *          - the root node of the tree

-   * @param path

-   *          - path of the word list

-   * @throws IOException

-   */

-  public void readMTWL(MultiTextNode root, String path) throws IOException {

-    readMTWL(root, new FileInputStream(path), "UTF-8");

-  }

-

-  /**

-   * Sniffs the content type for xml type.

-   * 

-   * @param is

-   *          the inputStream to sniff. Must support {@link InputStream#markSupported()}

-   * @return true if this stream starts with '{@literal <?xml}'

-   */

-  public static boolean isSniffedXmlContentType(InputStream is) throws IOException {

-    if (is == null)

-      throw new IOException("Stream is null");

-    if (!is.markSupported()) {

-      throw new IOException("Cannot mark stream. just wrap it in a BufferedInputStream");

-    }

-    byte[] bytes = new byte[5]; // peek first five letters

-    is.mark(5);

-    is.read(bytes);

-    String prefix = new String(bytes);

-    is.reset();

-    if ("<?xml".equals(prefix)) {

-      return true;

-    }

-    return false;

-  }

-

-  public void readMTWL(MultiTextNode root, InputStream stream, String encoding) throws IOException {

-    try {

-      InputStream is = new BufferedInputStream(stream); // adds mark/reset support

-      boolean isXml = isSniffedXmlContentType(is);

-      if (!isXml) { // MTWL is encoded

-        is = new ZipInputStream(is);

-        ((ZipInputStream) is).getNextEntry(); // zip must contain a single entry

-      }

-      InputStreamReader streamReader = new InputStreamReader(is, encoding);

-      TrieXMLEventHandler handler = new TrieXMLEventHandler(root);

-      SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();

-      SAXParser saxParser = saxParserFactory.newSAXParser();

-      XMLReader reader = saxParser.getXMLReader();

-      // was:

-      // XMLReader reader = XMLReaderFactory.createXMLReader();

-      reader.setContentHandler(handler);

-      reader.setErrorHandler(handler);

-      reader.parse(new InputSource(streamReader));

-    } catch (SAXException e) {

-      e.printStackTrace();

-    } catch (ParserConfigurationException e) {

-      e.printStackTrace();

-    }

-  }

-

-  public void createMTWLFile(MultiTextNode root, String path) throws IOException {

-    createMTWLFile(root, path, true, "UTF-8");

-  }

-

-  public void createMTWLFile(MultiTextNode root, boolean compressed, String path)

-          throws IOException {

-    createMTWLFile(root, path, compressed, "UTF-8");

-  }

-

-  public void createMTWLFile(MultiTextNode root, String path, boolean compressed, String encoding)

-          throws IOException {

-    if (compressed) {

-      writeCompressedMTWLFile(root, path, encoding);

-    } else {

-      writeUncompressedMTWLFile(root, path, encoding);

-    }

-  }

-

-  private void writeCompressedMTWLFile(MultiTextNode root, String path, String encoding)

-          throws IOException {

-    FileOutputStream fos = new FileOutputStream(path);

-    BufferedOutputStream bos = new BufferedOutputStream(fos);

-    ZipOutputStream zos = new ZipOutputStream(bos);

-    OutputStreamWriter writer = new OutputStreamWriter(zos, encoding);

-    zos.putNextEntry(new ZipEntry(path));

-    writeMTWLFile(root, writer);

-    writer.flush();

-    zos.closeEntry();

-    writer.close();

-  }

-

-  private void writeUncompressedMTWLFile(MultiTextNode root, String path, String encoding)

-          throws IOException {

-    FileOutputStream output = new FileOutputStream(path);

-    OutputStreamWriter writer = new OutputStreamWriter(output, encoding);

-    writeMTWLFile(root, writer);

-    writer.close();

-  }

-

-  private void writeMTWLFile(MultiTextNode root, OutputStreamWriter writer) throws IOException {

-    writer.write("<?xml version=\"1.0\" ?><root>");

-    for (MultiTextNode node : root.getChildren().values()) {

-      writeTextNode(writer, node);

-    }

-    writer.write("</root>");

-  }

-

-  private void writeTextNode(Writer writer, MultiTextNode node) {

-    try {

-      writer.write("\n");

-      // String s = "<n e=\"" + Boolean.toString(node.isWordEnd()) + "\">";

-      String s = "<n>";

-      writer.write(s);

-      writer.write("<c><![CDATA[" + node.getValue() + "]]></c>");

-      if (Boolean.valueOf(node.isWordEnd())) {

-        for (String type : node.getTypes()) {

-          String t = "<t>" + type + "</t>";

-          writer.write(t);

-        }

-      }

-      for (MultiTextNode child : node.getChildren().values()) {

-        writeTextNode(writer, child);

-      }

-      writer.write("</n>");

-    } catch (IOException e) {

-      e.printStackTrace();

-    }

-

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/ResourcePathResourceLoader.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/ResourcePathResourceLoader.java
deleted file mode 100644
index 9faf924..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/ResourcePathResourceLoader.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.ruta.resource;
-
-import java.io.File;
-
-import org.springframework.core.io.DescriptiveResource;
-import org.springframework.core.io.FileSystemResource;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.ResourceLoader;
-
-/**
- * Load a resource from resource paths.
- */
-public class ResourcePathResourceLoader implements ResourceLoader {
-  private final String[] resourcePaths;
-
-  /**
-   * @param resourcePaths Resource paths to search in.
-   */
-  public ResourcePathResourceLoader(String[] resourcePaths) {
-    this.resourcePaths = resourcePaths;
-  }
-
-  public Resource getResource(String location) {
-    for (String parent : resourcePaths) {
-      final File f = new File(parent, location);
-      if (f.exists()) {
-        return new FileSystemResource(f);
-      }
-    }
-
-    return new DescriptiveResource(location + " was not found in resource paths");
-  }
-
-  public ClassLoader getClassLoader() {
-    return getClass().getClassLoader();
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaResourceLoader.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaResourceLoader.java
deleted file mode 100644
index 9a6bd0a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaResourceLoader.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.ruta.resource;
-
-import org.springframework.core.io.DefaultResourceLoader;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-
-/**
- * Resource loader for ruta.
- *
- * This resource loader first looks in the resource paths and fallback in the classpath if it is not found.
- */
-public class RutaResourceLoader implements ResourceLoader {
-  private final ResourceLoader wrapped;
-  private final ResourceLoader fallback;
-
-  /**
-   * @param resourcePaths Resource paths to search in priority.
-   */
-  public RutaResourceLoader(String[] resourcePaths) {
-    this.wrapped = new PathMatchingResourcePatternResolver(new ResourcePathResourceLoader(resourcePaths));
-    this.fallback = new DefaultResourceLoader();
-  }
-
-  public Resource getResource(String location) {
-    Resource resource = this.wrapped.getResource(location);
-    if (!resource.exists()) {
-      resource = fallback.getResource(location);
-    }
-    return resource;
-  }
-
-  public ClassLoader getClassLoader() {
-     return getClass().getClassLoader();
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaTable.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaTable.java
deleted file mode 100644
index 915dc45..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaTable.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-

-public interface RutaTable {

-

-  RutaWordList getWordList(int index, RutaBlock parent);

-

-  String getEntry(int row, int column);

-

-  List<String> getRowWhere(int column, String value);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaWordList.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaWordList.java
deleted file mode 100644
index 0b8ae5a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/RutaWordList.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.util.Collection;

-import java.util.Map;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-

-public interface RutaWordList {

-

-  boolean contains(String string, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS);

-

-  boolean containsFragment(String string, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS);

-

-  Collection<String> contains(String string, boolean ignoreCase, int ignoreLength, boolean edit,

-          double distance, String ignoreToken);

-

-  Collection<String> containsFragment(String string, boolean ignoreCase, int ignoreLength,

-          boolean edit, double distance, String ignoreToken);

-

-  Collection<AnnotationFS> find(RutaStream stream, boolean ignoreCase, int size,

-          char[] ignoreToken, int maxIgnoredTokens, boolean ingoreWS);

-

-  Collection<AnnotationFS> find(RutaStream stream, Map<String, Object> typeMap, boolean ignoreCase,

-          int ignoreLength, boolean edit, double distance, String ignoreToken);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TextNode.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TextNode.java
deleted file mode 100644
index 9c619ce..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TextNode.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.util.HashMap;

-import java.util.Map;

-

-public class TextNode {

-

-  private char value;

-

-  private boolean isWordEnd;

-

-  private Map<Character, TextNode> children;

-

-  public TextNode() {

-    this.value = ' ';

-    this.isWordEnd = false;

-    this.children = new HashMap<Character, TextNode>();

-  }

-

-  public TextNode(char value, boolean isWordEnd) {

-    this.value = value;

-    this.isWordEnd = isWordEnd;

-    this.children = new HashMap<Character, TextNode>(5);

-  }

-

-  public boolean contains(char c) {

-    if (value == c) {

-      return true;

-    }

-    return false;

-  }

-

-  public void addChild(char c, boolean isWordEnd) {

-    children.put(c, new TextNode(c, isWordEnd));

-  }

-

-  public void addChild(TextNode n) {

-    children.put(n.getValue(), n);

-  }

-

-  public void setWordEnd(boolean b) {

-    this.isWordEnd = b;

-  }

-

-  public TextNode getChildNode(char c) {

-    return children.get(c);

-  }

-

-  public char getValue() {

-    return this.value;

-  }

-

-  public boolean isWordEnd() {

-    return this.isWordEnd;

-  }

-

-  public Map<Character, TextNode> getChildren() {

-    return this.children;

-  }

-

-  public String toString() {

-    return value + (isWordEnd ? "+" : "");

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
deleted file mode 100644
index 223318a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*

- * 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.ruta.resource;

-

-import java.io.BufferedInputStream;

-import java.io.BufferedOutputStream;

-import java.io.File;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.InputStreamReader;

-import java.io.OutputStreamWriter;

-import java.io.Writer;

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.Scanner;

-import java.util.zip.ZipEntry;

-import java.util.zip.ZipInputStream;

-import java.util.zip.ZipOutputStream;

-

-import javax.xml.parsers.ParserConfigurationException;

-import javax.xml.parsers.SAXParser;

-import javax.xml.parsers.SAXParserFactory;

-

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.springframework.core.io.FileSystemResource;

-import org.springframework.core.io.Resource;

-import org.xml.sax.InputSource;

-import org.xml.sax.SAXException;

-import org.xml.sax.SAXParseException;

-import org.xml.sax.XMLReader;

-

-public class TreeWordList implements RutaWordList {

-  private TextNode root;

-

-  private String name;

-

-  private boolean dictRemoveWS = false;

-

-  /**

-   * Default constructor

-   */

-  public TreeWordList() {

-    this.root = null;

-  }

-

-  /**

-   * Constructs a TreeWordList from a resource.

-   * 

-   * @param resource

-   *          Resource to create a TextWordList from

-   * @throws IllegalArgumentException

-   *           When {@code resource.getFileName()} is null or does not end with .txt or .twl.

-   */

-  public TreeWordList(Resource resource, boolean dictRemoveWS) throws IOException {

-    this.dictRemoveWS = dictRemoveWS;

-    final String name = resource.getFilename();

-    InputStream stream = null;

-    try {

-      stream = resource.getInputStream();

-      if (name == null) {

-        throw new IllegalArgumentException("List does not have a name.");

-      } else if (name.endsWith(".txt")) {

-        buildNewTree(stream);

-      } else if (name.endsWith(".twl")) {

-        readXML(stream, "UTF-8");

-      } else {

-        throw new IllegalArgumentException("File name should end with .twl or .txt, found " + name);

-      }

-    } finally {

-      if (stream != null) {

-        stream.close();

-      }

-    }

-

-    this.name = name;

-  }

-

-  /**

-   * Constructs a TreeWordList from a file with path = filename

-   * 

-   * @param pathname

-   *          path of the file to create a TextWordList from

-   */

-  public TreeWordList(String pathname, boolean dictRemoveWS) throws IOException {

-    this(new FileSystemResource(pathname), dictRemoveWS);

-  }

-

-  /**

-   * Constructs a TreeWordList from an open stream with a given name

-   * 

-   * @param stream

-   *          path of the file to create a TextWordList from

-   */

-  public TreeWordList(InputStream stream, String name, boolean dictRemoveWS) throws IOException {

-    this.dictRemoveWS = dictRemoveWS;

-    if (name.endsWith(".twl")) {

-      readXML(stream, "UTF-8");

-    }

-    if (name.endsWith(".txt")) {

-      buildNewTree(stream);

-    }

-    this.name = new File(name).getName();

-  }

-

-  public TreeWordList(List<String> data, boolean dictRemoveWS) {

-    buildNewTree(data);

-    name = "local";

-    this.dictRemoveWS = dictRemoveWS;

-  }

-

-  public void buildNewTree(List<String> data) {

-    this.root = new TextNode();

-    for (String s : data) {

-      addWord(s);

-    }

-  }

-

-  /**

-   * Creates a new Tree in the existing treeWordList from a file with path pathname

-   * 

-   * @param stream

-   *          Open InputStream containing the word for the treeWordList, this method will close the

-   *          stream.

-   */

-  public void buildNewTree(InputStream stream) throws IOException {

-    Scanner scan = new Scanner(stream, "UTF-8");

-    // creating a new tree

-    this.root = new TextNode();

-    while (scan.hasNextLine()) {

-      String s = scan.nextLine().trim();

-      // HOTFIX for old formats

-      if (s.endsWith("=")) {

-        s = s.substring(0, s.length() - 1);

-        s = s.trim();

-      }

-      addWord(s);

-    }

-    scan.close();

-  }

-

-  /**

-   * Returns the root node of the tree

-   * 

-   * @return the root node

-   */

-  public TextNode getRoot() {

-    return this.root;

-  }

-

-  /**

-   * Add a new String into the TreeWordList

-   * 

-   * @param s

-   *          The String to add

-   */

-  public void addWord(String s) {

-    // Create Nodes from all chars of the strings besides the last one

-    TextNode pointer = root;

-    for (Character each : s.toCharArray()) {

-      if (dictRemoveWS && Character.isWhitespace(each)) {

-        continue;

-      }

-      TextNode childNode = pointer.getChildNode(each);

-      if (childNode == null) {

-        childNode = new TextNode(each, false);

-        pointer.addChild(childNode);

-      }

-      pointer = childNode;

-    }

-    pointer.setWordEnd(s.length() > 0);

-  }

-

-  /**

-   * Checks if TreeWordList contains String s

-   */

-  public boolean contains(String s, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS) {

-    if (s == null) {

-      return false;

-    }

-    TextNode pointer = root;

-    return recursiveContains(pointer, s, 0, ignoreCase && s.length() > size, false, ignoreChars,

-            maxIgnoreChars, ignoreWS);

-  }

-

-  public boolean containsFragment(String s, boolean ignoreCase, int size, char[] ignoreChars,

-          int maxIgnoreChars, boolean ignoreWS) {

-    TextNode pointer = root;

-    return recursiveContains(pointer, s, 0, ignoreCase && s.length() > size, true, ignoreChars,

-            maxIgnoreChars, ignoreWS);

-  }

-

-  private boolean recursiveContains(TextNode pointer, String text, int index, boolean ignoreCase,

-          boolean fragment, char[] ignoreChars, int maxIgnoreChars, boolean ignoreWS) {

-    if (pointer == null) {

-      return false;

-    }

-    if (index == text.length()) {

-      return fragment || pointer.isWordEnd();

-    }

-    char charAt = text.charAt(index);

-    boolean charAtIgnored = false;

-    if (ignoreChars != null) {

-      for (char each : ignoreChars) {

-        if (each == charAt) {

-          charAtIgnored = true;

-          maxIgnoreChars--;

-          break;

-        }

-      }

-      charAtIgnored &= index != 0;

-      if (maxIgnoreChars < 0) {

-        return false;

-      }

-    }

-    int next = ++index;

-

-    boolean result = false;

-

-    if (ignoreCase) {

-      TextNode childNodeL = pointer.getChildNode(Character.toLowerCase(charAt));

-      TextNode childNodeU = pointer.getChildNode(Character.toUpperCase(charAt));

-

-      TextNode wsNode = pointer.getChildNode(' ');

-      if (ignoreWS && wsNode != null) {

-        result |= recursiveContains(wsNode, text, --next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars, ignoreWS);

-      }

-

-      if (childNodeL == null && ignoreWS) {

-        childNodeL = skipWS(pointer, charAt);

-      }

-      if (childNodeU == null && ignoreWS) {

-        childNodeU = skipWS(pointer, charAt);

-      }

-      if (charAtIgnored && childNodeL == null && childNodeU == null) {

-        result |= recursiveContains(pointer, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars, ignoreWS);

-      } else {

-        result |= recursiveContains(childNodeL, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars, ignoreWS)

-                | recursiveContains(childNodeU, text, next, ignoreCase, fragment, ignoreChars,

-                        maxIgnoreChars, ignoreWS);

-      }

-    } else {

-      TextNode wsNode = pointer.getChildNode(' ');

-      if (ignoreWS && wsNode != null) {

-        result |= recursiveContains(wsNode, text, --next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars, ignoreWS);

-      }

-

-      TextNode childNode = pointer.getChildNode(charAt);

-      if (childNode == null && ignoreWS) {

-        childNode = skipWS(pointer, charAt);

-      }

-      if (charAtIgnored && childNode == null) {

-        result |= recursiveContains(pointer, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars, ignoreWS);

-      } else {

-        result |= recursiveContains(childNode, text, next, ignoreCase, fragment, ignoreChars,

-                maxIgnoreChars, ignoreWS);

-      }

-    }

-    return result;

-  }

-

-  private TextNode skipWS(TextNode pointer, char charAt) {

-    TextNode childNode = pointer.getChildNode(' ');

-    if (childNode != null) {

-      TextNode node = childNode.getChildNode(charAt);

-      if (node == null) {

-        return skipWS(childNode, charAt);

-      } else {

-        return node;

-      }

-    }

-    return null;

-  }

-

-  public List<AnnotationFS> find(RutaStream stream, boolean ignoreCase, int size,

-          char[] ignoreChars, int maxIgnoredChars, boolean ignoreWS) {

-    ArrayList<AnnotationFS> results = new ArrayList<AnnotationFS>();

-    stream.moveToFirst();

-    FSIterator<AnnotationFS> streamPointer = stream.copy();

-    while (stream.isValid()) {

-      RutaBasic anchorBasic = (RutaBasic) stream.get();

-      streamPointer.moveTo(anchorBasic);

-

-      List<RutaBasic> basicsToAdd = new ArrayList<RutaBasic>();

-      basicsToAdd.add(anchorBasic);

-      String text = anchorBasic.getCoveredText();

-      StringBuilder candidate = new StringBuilder(text);

-      // String lastCandidate = candidate.toString();

-      Annotation interResult = null;

-      while (streamPointer.isValid()) {

-        if (containsFragment(candidate.toString(), ignoreCase, size, ignoreChars, maxIgnoredChars,

-                ignoreWS)) {

-          streamPointer.moveToNext();

-          if (streamPointer.isValid()) {

-            RutaBasic next = (RutaBasic) streamPointer.get();

-            if (contains(candidate.toString(), ignoreCase, size, ignoreChars, maxIgnoredChars,

-                    ignoreWS)) {

-              interResult = new Annotation(stream.getJCas(), basicsToAdd.get(0).getBegin(),

-                      basicsToAdd.get(basicsToAdd.size() - 1).getEnd());

-            }

-            // lastCandidate = candidate.toString();

-            candidate.append(next.getCoveredText());

-            basicsToAdd.add(next);

-          } else {

-            tryToCreateAnnotation(stream, ignoreCase, size, results, basicsToAdd,

-                    candidate.toString(), interResult, ignoreChars, maxIgnoredChars, ignoreWS);

-          }

-        } else {

-          basicsToAdd.remove(basicsToAdd.size() - 1);

-          tryToCreateAnnotation(stream, ignoreCase, size, results, basicsToAdd,

-                  candidate.toString(), interResult, ignoreChars, maxIgnoredChars, ignoreWS);

-          break;

-        }

-

-      }

-      stream.moveToNext();

-    }

-    return results;

-  }

-

-  public List<AnnotationFS> find(RutaStream stream, boolean ignoreCase, int size, boolean ignoreWS) {

-    return find(stream, ignoreCase, size, null, 0, ignoreWS);

-  }

-

-  private void tryToCreateAnnotation(RutaStream stream, boolean ignoreCase, int size,

-          ArrayList<AnnotationFS> results, List<RutaBasic> basicsToAdd, String lastCandidate,

-          Annotation interResult, char[] ignoreChars, int maxIgnoredChars, boolean ignoreWS) {

-    if (basicsToAdd.size() >= 1

-            && contains(lastCandidate, ignoreCase, size, ignoreChars, maxIgnoredChars, ignoreWS)) {

-

-      results.add(new Annotation(stream.getJCas(), basicsToAdd.get(0).getBegin(), basicsToAdd.get(

-              basicsToAdd.size() - 1).getEnd()));

-    } else if (interResult != null) {

-      results.add(interResult);

-    }

-  }

-

-  public void readXML(InputStream stream, String encoding) throws IOException {

-    try {

-      InputStream is = new BufferedInputStream(stream); // adds mark/reset support

-      boolean isXml = MultiTreeWordListPersistence.isSniffedXmlContentType(is);

-      if (!isXml) { // MTWL is encoded

-        is = new ZipInputStream(is);

-        ((ZipInputStream) is).getNextEntry(); // zip must contain a single entry

-      }

-      InputStreamReader streamReader = new InputStreamReader(is, encoding);

-      this.root = new TextNode();

-      XMLEventHandler handler = new XMLEventHandler(root);

-      SAXParserFactory factory = SAXParserFactory.newInstance();

-      SAXParser parser = factory.newSAXParser();

-      XMLReader reader = parser.getXMLReader();

-      // XMLReader reader = XMLReaderFactory.createXMLReader();

-      reader.setContentHandler(handler);

-      reader.setErrorHandler(handler);

-      reader.parse(new InputSource(streamReader));

-    } catch (SAXParseException spe) {

-      StringBuffer sb = new StringBuffer(spe.toString());

-      sb.append("\n  Line number: " + spe.getLineNumber());

-      sb.append("\n Column number: " + spe.getColumnNumber());

-      sb.append("\n Public ID: " + spe.getPublicId());

-      sb.append("\n System ID: " + spe.getSystemId() + "\n");

-      System.out.println(sb.toString());

-    } catch (SAXException se) {

-      System.out.println("loadDOM threw " + se);

-      se.printStackTrace(System.out);

-    } catch (ParserConfigurationException e) {

-      e.printStackTrace();

-    }

-  }

-

-  public void createTWLFile(String path, String encoding) throws IOException {

-    createTWLFile(root, path, true, encoding);

-  }

-

-  public void createTWLFile(String path, boolean compressed, String encoding) throws IOException {

-    createTWLFile(root, path, compressed, encoding);

-  }

-

-  public void createTWLFile(TextNode root, String path, boolean compressed, String encoding)

-          throws IOException {

-    if (compressed) {

-      writeCompressedTWLFile(root, path, encoding);

-    } else {

-      writeUncompressedMTWLFile(root, path, encoding);

-    }

-  }

-

-  private void writeCompressedTWLFile(TextNode root, String path, String encoding)

-          throws IOException {

-    FileOutputStream fos = new FileOutputStream(path);

-    BufferedOutputStream bos = new BufferedOutputStream(fos);

-    ZipOutputStream zos = new ZipOutputStream(bos);

-    OutputStreamWriter writer = new OutputStreamWriter(zos, encoding);

-    zos.putNextEntry(new ZipEntry(path));

-    writeTWLFile(root, writer);

-    writer.flush();

-    zos.closeEntry();

-    writer.close();

-  }

-

-  private void writeUncompressedMTWLFile(TextNode root, String path, String encoding)

-          throws IOException {

-    FileOutputStream output = new FileOutputStream(path);

-    OutputStreamWriter writer = new OutputStreamWriter(output, encoding);

-    writeTWLFile(root, writer);

-    writer.close();

-  }

-

-  private void writeTWLFile(TextNode root, Writer writer) throws IOException {

-    writer.write("<?xml version=\"1.0\" ?>");

-    writer.write("<root>");

-    for (TextNode child : root.getChildren().values()) {

-      writeNode(writer, child);

-    }

-    writer.write("</root>");

-  }

-

-  public void writeNode(Writer writer, TextNode node) throws IOException {

-    String output = "<node char=\"" + node.getValue() + "\" isWordEnd=\""

-            + Boolean.toString(node.isWordEnd()) + "\">";

-    writer.write(output);

-    for (TextNode child : node.getChildren().values()) {

-      writeNode(writer, child);

-

-    }

-    writer.write("</node>");

-  }

-

-  @Override

-  public String toString() {

-    return name;

-  }

-

-  public List<AnnotationFS> find(RutaStream stream, Map<String, Object> typeMap,

-          boolean ignoreCase, int ignoreLength, boolean edit, double distance, String ignoreToken) {

-    return null;

-  }

-

-  public List<String> contains(String string, boolean ignoreCase, int ignoreLength, boolean edit,

-          double distance, String ignoreToken) {

-    return null;

-  }

-

-  public List<String> containsFragment(String string, boolean ignoreCase, int ignoreLength,

-          boolean edit, double distance, String ignoreToken) {

-    return null;

-  }

-

-  public void startDocument() {

-

-  }

-

-  public void endDocument() {

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TrieXMLEventHandler.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TrieXMLEventHandler.java
deleted file mode 100644
index 5634bcb..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/TrieXMLEventHandler.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.ruta.resource;
-
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class TrieXMLEventHandler extends DefaultHandler {
-
-  private Stack<MultiTextNode> stack;
-
-  // boolean listeningState;
-
-  boolean inContent;
-
-  boolean inType;
-
-  public TrieXMLEventHandler(MultiTextNode root) {
-    super();
-    this.stack = new Stack<MultiTextNode>();
-    stack.add(root);
-    // this.listeningState = false;
-  }
-
-  @Override
-  public void startDocument() {
-  }
-
-  @Override
-  public void endDocument() {
-  }
-
-  @Override
-  public void startElement(String namespaceURI, String localName, String qualifiedName,
-          Attributes atts) {
-    if ("n".equals(localName) || "n".equals(qualifiedName)) {
-      // char c = atts.getValue("c").charAt(0);
-      // boolean e = Boolean.valueOf(atts.getValue("e"));
-      MultiTextNode newNode = new MultiTextNode();
-      // newNode.setWordEnd(e);
-      // stack.peek().addChild(newNode);
-      stack.add(newNode);
-      inContent = false;
-      inType = false;
-    }
-    if ("t".equals(localName) || "t".equals(qualifiedName)) {
-      inType = true;
-      inContent = false;
-    }
-    if ("c".equals(localName) || "c".equals(qualifiedName)) {
-      // listeningState = true;
-      inType = false;
-      inContent = true;
-    }
-  }
-
-  @Override
-  public void endElement(String namespaceURI, String localName, String qualifiedName) {
-    if ("n".equals(localName) || "n".equals(qualifiedName)) {
-      MultiTextNode pop = stack.pop();
-      stack.peek().addChild(pop);
-    }
-    if ("t".equals(localName) || "t".equals(qualifiedName)) {
-      inType = false;
-    }
-    if ("c".equals(localName) || "c".equals(qualifiedName)) {
-      inContent = false;
-    }
-  }
-
-  @Override
-  public void characters(char ch[], int start, int length) {
-    if (stack.isEmpty()) {
-      return;
-    }
-    MultiTextNode peek = stack.peek();
-    if (inType) {
-      StringBuilder type = new StringBuilder();
-      for (int i = start; i < start + length; i++) {
-        type.append(String.valueOf(ch[i]));
-      }
-      peek.addType(type.toString());
-      peek.setWordEnd(true);
-    } else if (inContent) {
-      if (ch.length > 0) {
-        peek.setValue(ch[0]);
-      } else {
-        peek.setValue(' ');
-      }
-    }
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/XMLEventHandler.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/XMLEventHandler.java
deleted file mode 100644
index 91411c7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/resource/XMLEventHandler.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.ruta.resource;
-
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class XMLEventHandler extends DefaultHandler {
-
-  Stack<TextNode> stack;
-
-  public XMLEventHandler(TextNode root) {
-    super();
-    stack = new Stack<TextNode>();
-    stack.add(root);
-  }
-
-  @Override
-  public void startDocument() {
-  }
-
-  @Override
-  public void endDocument() {
-  }
-
-  @Override
-  public void startElement(String namespaceURI, String localName, String qualifiedName,
-          Attributes atts) {
-    if ("node".equals(localName) || "node".equals(qualifiedName)) {
-      char c = atts.getValue("char").charAt(0);
-      boolean isWordEnd = Boolean.valueOf(atts.getValue("isWordEnd"));
-      TextNode newNode = new TextNode(c, isWordEnd);
-      stack.peek().addChild(newNode);
-      stack.add(newNode);
-    }
-
-  }
-
-  @Override
-  public void endElement(String namespaceURI, String localName, String qualifiedName) {
-    if ("node".equals(localName) || "node".equals(qualifiedName)) {
-      stack.pop();
-    }
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRule.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRule.java
deleted file mode 100644
index 8d1d37f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRule.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStatement;

-

-public abstract class AbstractRule extends RutaStatement {

-

-  private final int id;

-

-  public AbstractRule(RutaBlock parent, int id) {

-    super(parent);

-    this.id = id;

-  }

-

-  public int getId() {

-    return id;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java
deleted file mode 100644
index e23af6f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.rule.quantifier.NormalQuantifier;

-import org.apache.uima.ruta.rule.quantifier.RuleElementQuantifier;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public abstract class AbstractRuleElement extends RutaElement implements RuleElement {

-

-  protected RuleElementQuantifier quantifier;

-

-  protected List<AbstractRutaCondition> conditions;

-

-  protected List<AbstractRutaAction> actions;

-

-  private boolean startAnchor;

-

-  private RuleElementContainer container;

-

-  protected RutaBlock parent;

-

-  @SuppressWarnings("unchecked")

-  protected final InferenceCrowd emptyCrowd = new InferenceCrowd(Collections.EMPTY_LIST);

-

-  protected List<RutaStatement> inlinedRules;

-

-  protected boolean inlineMode;

-

-  public AbstractRuleElement(RuleElementQuantifier quantifier,

-          List<AbstractRutaCondition> conditions, List<AbstractRutaAction> actions,

-          RuleElementContainer container, RutaBlock parent) {

-    super();

-    this.quantifier = quantifier;

-    this.conditions = conditions;

-    this.actions = actions;

-    this.container = container;

-    this.parent = parent;

-    if (this.conditions == null) {

-      this.conditions = new ArrayList<AbstractRutaCondition>();

-    }

-    if (this.actions == null) {

-      this.actions = new ArrayList<AbstractRutaAction>();

-    }

-    if (this.quantifier == null) {

-      this.quantifier = new NormalQuantifier();

-    }

-  }

-

-  protected void doneMatching(RuleMatch ruleMatch, RuleApply ruleApply, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (!ruleMatch.isApplied()) {

-      ruleApply.add(ruleMatch);

-      if (ruleMatch.matchedCompletely()) {

-        ruleMatch.getRule().getRoot().applyRuleElements(ruleMatch, stream, crowd);

-      }

-      ruleMatch.setApplied(true);

-    }

-  }

-

-  protected List<ScriptApply> processInlinedBlockRules(RuleMatch ruleMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (inlineMode && inlinedRules != null && !inlinedRules.isEmpty()) {

-      return processInlinedRules(ruleMatch, stream, crowd);

-    }

-    return null;

-  }

-

-  protected List<ScriptApply> processInlinedRules(RuleMatch ruleMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<ScriptApply> result = new ArrayList<ScriptApply>();

-    List<AnnotationFS> matchedAnnotationsOf = ruleMatch.getMatchedAnnotationsOf(this);

-    // TODO where to implement the explanation of inlined rules?

-    // BlockApply blockApply = new BlockApply(this);

-    // RuleApply dummyRuleApply = getDummyRuleApply(ruleMatch);

-    // blockApply.setRuleApply(dummyRuleApply);

-    // ruleMatch.addDelegateApply(this, blockApply);

-    for (AnnotationFS annotationFS : matchedAnnotationsOf) {

-      RutaStream windowStream = stream.getWindowStream(annotationFS, annotationFS.getType());

-      for (RutaStatement each : inlinedRules) {

-        ScriptApply apply = each.apply(windowStream, crowd);

-        // blockApply.add(apply);

-        ruleMatch.addDelegateApply(this, apply);

-        result.add(apply);

-      }

-    }

-    return result;

-  }

-

-  protected List<ScriptApply> processInlinedConditionRules(RuleMatch ruleMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (!inlineMode && inlinedRules != null && !inlinedRules.isEmpty()) {

-      return processInlinedRules(ruleMatch, stream, crowd);

-    }

-    return null;

-  }

-

-  public void apply(RuleMatch ruleMatch, RutaStream stream, InferenceCrowd crowd) {

-    for (AbstractRutaAction action : actions) {

-      crowd.beginVisit(action, null);

-      action.execute(ruleMatch, this, stream, crowd);

-      crowd.endVisit(action, null);

-    }

-    processInlinedBlockRules(ruleMatch, stream, crowd);

-  }

-

-  protected boolean matchInnerRules(RuleMatch ruleMatch, RutaStream stream, InferenceCrowd crowd) {

-    boolean inlinedRulesMatched = true;

-    List<ScriptApply> list = processInlinedConditionRules(ruleMatch, stream, crowd);

-    if (list != null) {

-      inlinedRulesMatched = false;

-      for (ScriptApply scriptApply : list) {

-        if (scriptApply instanceof RuleApply) {

-          RuleApply ra = (RuleApply) scriptApply;

-          if (ra.applied > 0) {

-            inlinedRulesMatched = true;

-          }

-        }

-      }

-    }

-    return inlinedRulesMatched;

-  }

-

-  protected List<RuleElementMatch> getMatch(RuleMatch ruleMatch,

-          ComposedRuleElementMatch containerMatch) {

-    List<RuleElementMatch> matchInfo;

-    if (containerMatch != null) {

-      matchInfo = containerMatch.getInnerMatches().get(this);

-    } else {

-      matchInfo = ruleMatch.getMatchInfo(this).get(0);

-    }

-    return matchInfo;

-  }

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, RutaBlock parent,

-          RutaStream stream) {

-    return quantifier.evaluateMatches(matches, parent, stream, emptyCrowd);

-  }

-

-  public List<Integer> getSelfIndexList() {

-    List<Integer> result = new ArrayList<Integer>(1);

-    if (getContainer() == null) {

-      return null;

-    }

-    int indexOf = getContainer().getRuleElements().indexOf(this);

-    result.add(indexOf + 1);

-    return result;

-  }

-

-  public boolean hasAncestor(boolean after) {

-    RuleElementContainer c = getContainer();

-    if (c == null) {

-      return false;

-    }

-    RuleElement nextElement = c.getNextElement(after, this);

-    if (nextElement != null) {

-      return true;

-    }

-    if (c instanceof ComposedRuleElement) {

-      return ((ComposedRuleElement) c).hasAncestor(after);

-    }

-    return false;

-  }

-

-  protected boolean earlyExit(AnnotationFS eachAnchor, RuleApply ruleApply, RutaStream stream) {

-    if (stream.isGreedyAnchoring() && ruleApply != null

-            && isAlreadyCovered(eachAnchor, ruleApply, stream)) {

-      // skip if next matched should not overlap

-      return true;

-    }

-    if (stream.isOnlyOnce() && ruleApply != null && ruleApply.getApplied() > 0) {

-      // skip if the rule should only be applied once, on the first successful match

-      return true;

-    }

-    return false;

-  }

-

-  private boolean isAlreadyCovered(AnnotationFS eachAnchor, RuleApply ruleApply, RutaStream stream) {

-    List<AbstractRuleMatch<? extends AbstractRule>> list = ruleApply.getList();

-    Collections.reverse(list);

-    for (AbstractRuleMatch<? extends AbstractRule> each : list) {

-      if (each instanceof RuleMatch) {

-        RuleMatch rm = (RuleMatch) each;

-        List<AnnotationFS> matchedAnnotationsOf = Collections.emptyList();

-        if (stream.isGreedyRule()) {

-          matchedAnnotationsOf = rm.getMatchedAnnotationsOfRoot();

-        } else if (stream.isGreedyRuleElement()) {

-          matchedAnnotationsOf = rm.getMatchedAnnotationsOf(this);

-        }

-        for (AnnotationFS annotationFS : matchedAnnotationsOf) {

-          if (eachAnchor.getBegin() >= annotationFS.getBegin()

-                  && eachAnchor.getEnd() <= annotationFS.getEnd()) {

-            return true;

-          } else if (eachAnchor.getBegin() < annotationFS.getEnd()) {

-            // overlapping annotations of composed rule elements with null ruleApply lookahead

-            return true;

-          }

-        }

-      }

-    }

-    return false;

-  }

-

-  public RuleElementQuantifier getQuantifier() {

-    return quantifier;

-  }

-

-  public RutaBlock getParent() {

-    return parent;

-  }

-

-  public List<AbstractRutaCondition> getConditions() {

-    return conditions;

-  }

-

-  public void setConditions(List<AbstractRutaCondition> conditions) {

-    this.conditions = conditions;

-  }

-

-  public List<AbstractRutaAction> getActions() {

-    return actions;

-  }

-

-  public void setActions(List<AbstractRutaAction> actions) {

-    this.actions = actions;

-  }

-

-  public void setQuantifier(RuleElementQuantifier quantifier) {

-    this.quantifier = quantifier;

-  }

-

-  public RutaRule getRule() {

-    return container.getRule();

-  }

-

-  public RuleElementContainer getContainer() {

-    return container;

-  }

-

-  public void setContainer(RuleElementContainer container) {

-    this.container = container;

-  }

-

-  public void setStartAnchor(boolean start) {

-    this.startAnchor = start;

-  }

-

-  public boolean isStartAnchor() {

-    return startAnchor;

-  }

-

-  public void setInlinedRules(List<RutaStatement> innerRules) {

-    this.inlinedRules = innerRules;

-  }

-

-  public void setInlineMode(boolean blockMode) {

-    this.inlineMode = blockMode;

-  }

-

-  public List<RutaStatement> getInlinedRules() {

-    return inlinedRules;

-  }

-

-  public boolean getInlineMode() {

-    return inlineMode;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleMatch.java
deleted file mode 100644
index da6a5a7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleMatch.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-

-public abstract class AbstractRuleMatch<T extends AbstractRule> {

-

-  protected boolean matched = true;

-

-  protected final T rule;

-

-  public AbstractRuleMatch(T rule) {

-    super();

-    this.rule = rule;

-  }

-

-  public T getRule() {

-    return rule;

-  }

-

-  public boolean matched() {

-    return matched;

-  }

-

-  public boolean matchedCompletely() {

-    return true;

-  }

-

-  public abstract List<AnnotationFS> getMatchedAnnotationsOfRoot();

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationComparator.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationComparator.java
deleted file mode 100644
index 1cb6ee9..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationComparator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.Comparator;

-

-import org.apache.uima.cas.text.AnnotationFS;

-

-/**

- * Comparator for annotations following mostly the default order.

- * 

- */

-public class AnnotationComparator implements Comparator<AnnotationFS> {

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)

-   */

-  public int compare(AnnotationFS o1, AnnotationFS o2) {

-    if (o1.getBegin() < o2.getBegin()) {

-      return -1;

-    } else if (o1.getBegin() > o2.getBegin()) {

-      return 1;

-    } else if (o1.getEnd() > o2.getEnd()) {

-      return -1;

-    } else if (o1.getEnd() < o2.getEnd()) {

-      return 1;

-    } else {

-      boolean equals = o1.equals(o2);

-      if (equals) {

-        return 0;

-      } else {

-        int compareTo = o1.getType().getName().compareTo(o2.getType().getName());

-        if (compareTo == 0) {

-          return 1;

-        } else {

-          return compareTo;

-        }

-      }

-    }

-

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java
deleted file mode 100644
index 1daa1ef..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java
+++ /dev/null
@@ -1,626 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Comparator;

-import java.util.HashMap;

-import java.util.LinkedHashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.rule.quantifier.RuleElementQuantifier;

-import org.apache.uima.ruta.type.RutaFrame;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ComposedRuleElement extends AbstractRuleElement implements RuleElementContainer {

-

-  protected List<RuleElement> elements;

-

-  protected RuleElementContainer caretaker;

-

-  private Boolean conjunct = null;

-

-  private Comparator<RuleMatch> ruleMatchComparator = new RuleMatchComparator();

-

-  public ComposedRuleElement(List<RuleElement> elements, RuleElementQuantifier quantifier,

-          List<AbstractRutaCondition> conditions, List<AbstractRutaAction> actions,

-          RuleElementContainer container, RutaBlock parent) {

-    super(quantifier, conditions, actions, container, parent);

-    this.elements = elements;

-    this.caretaker = new RuleElementCaretaker(this);

-  }

-

-  public void apply(RuleMatch match, RutaStream symbolStream, InferenceCrowd crowd) {

-    applyRuleElements(match, symbolStream, crowd);

-    super.apply(match, symbolStream, crowd);

-  }

-

-  public List<RuleMatch> startMatch(RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    if (conjunct == null) {

-      ComposedRuleElementMatch composedMatch = createComposedMatch(ruleMatch, containerMatch,

-              stream);

-      RuleElement anchorElement = getAnchoringRuleElement(stream);

-      result = anchorElement.startMatch(ruleMatch, ruleApply, composedMatch, entryPoint, stream,

-              crowd);

-    } else if (!conjunct) {

-      // disjunctive

-      Map<RuleMatch, ComposedRuleElementMatch> ruleMatches = new LinkedHashMap<RuleMatch, ComposedRuleElementMatch>();

-      for (RuleElement each : elements) {

-        ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-        RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, true);

-        ComposedRuleElementMatch composedMatch = createComposedMatch(extendedMatch,

-                extendedContainerMatch, stream);

-        List<RuleMatch> startRuleMatches = each.startMatch(extendedMatch, null, composedMatch,

-                this, stream, crowd);

-        for (RuleMatch startRuleMatch : startRuleMatches) {

-          ComposedRuleElementMatch startElementMatch = (ComposedRuleElementMatch) startRuleMatch

-                  .getLastMatch(this, true);

-          ruleMatches.put(startRuleMatch, startElementMatch);

-        }

-      }

-

-      Map<RuleMatch, ComposedRuleElementMatch> mergedMatches = mergeDisjunctiveRuleMatches(

-              ruleMatches, true, stream);

-      Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = mergedMatches.entrySet();

-      for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {

-        RuleMatch eachRuleMatch = entry.getKey();

-        ComposedRuleElementMatch eachComposedMatch = entry.getValue();

-        AnnotationFS lastAnnotation = eachRuleMatch.getLastMatchedAnnotation(this, true, null,

-                parent, stream);

-        boolean failed = !eachComposedMatch.matched();

-        List<RuleMatch> fallbackContinue = fallbackContinue(true, failed, lastAnnotation,

-                eachRuleMatch, ruleApply, eachComposedMatch, null, entryPoint, stream, crowd);

-        result.addAll(fallbackContinue);

-      }

-    } else if (conjunct) {

-      // conjunctive

-      Map<RuleMatch, ComposedRuleElementMatch> ruleMatches = new LinkedHashMap<RuleMatch, ComposedRuleElementMatch>();

-      RuleElement anchoringRuleElement = getAnchoringRuleElement(stream);

-      RutaRuleElement sideStepOrigin = null;

-

-      if (anchoringRuleElement instanceof RutaRuleElement && hasAncestor(false)) {

-        sideStepOrigin = (RutaRuleElement) anchoringRuleElement;

-      }

-      ComposedRuleElementMatch composedMatch = createComposedMatch(ruleMatch, containerMatch,

-              stream);

-      List<RuleMatch> startRuleMatches = anchoringRuleElement.startMatch(ruleMatch, null,

-              composedMatch, this, stream, crowd);

-      for (RuleMatch eachStartRuleMatch : startRuleMatches) {

-        if (eachStartRuleMatch.matched()) {

-          AnnotationFS prefixAnnotation = getPrefixAnnotation(eachStartRuleMatch, stream);

-          for (RuleElement each : elements) {

-            if (each.equals(anchoringRuleElement)) {

-              continue;

-            }

-            ComposedRuleElementMatch startElementMatch = (ComposedRuleElementMatch) eachStartRuleMatch

-                    .getLastMatch(this, true);

-            List<RuleMatch> continueMatch = each.continueMatch(true, prefixAnnotation,

-                    eachStartRuleMatch, null, startElementMatch, null, this, stream, crowd);

-            for (RuleMatch startRuleMatch : continueMatch) {

-              ComposedRuleElementMatch elementMatch = (ComposedRuleElementMatch) startRuleMatch

-                      .getLastMatch(this, true);

-              ruleMatches.put(startRuleMatch, elementMatch);

-            }

-          }

-        }

-      }

-

-      Map<RuleMatch, ComposedRuleElementMatch> mergedMatches = mergeConjunctiveRuleMatches(

-              ruleMatches, true);

-      Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = mergedMatches.entrySet();

-      for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {

-        RuleMatch eachRuleMatch = entry.getKey();

-        ComposedRuleElementMatch eachComposedMatch = entry.getValue();

-        AnnotationFS lastAnnotation = eachRuleMatch.getLastMatchedAnnotation(this, true, null,

-                parent, stream);

-        boolean failed = !eachComposedMatch.matched();

-        List<AnnotationFS> textsMatched = eachComposedMatch.getTextsMatched();

-        if ((!stream.isGreedyAnchoring() && !stream.isOnlyOnce())

-                || !earlyExit(textsMatched.get(0), ruleApply, stream)) {

-          List<RuleMatch> fallbackContinue = fallbackContinue(true, failed, lastAnnotation,

-                  eachRuleMatch, ruleApply, eachComposedMatch, sideStepOrigin, entryPoint, stream,

-                  crowd);

-          result.addAll(fallbackContinue);

-        }

-      }

-    }

-    return result;

-  }

-

-  private AnnotationFS getPrefixAnnotation(RuleMatch ruleMatch, RutaStream stream) {

-    AnnotationFS lastMatchedAnnotation = ruleMatch.getLastMatchedAnnotation(this, true, null,

-            parent, stream);

-    if (lastMatchedAnnotation.getBegin() == 0) {

-      JCas jCas = stream.getJCas();

-      AnnotationFS dummy = new RutaFrame(jCas, 0, 0);

-      return dummy;

-    }

-    return stream.getEndAnchor(lastMatchedAnnotation.getBegin());

-  }

-

-  protected ComposedRuleElementMatch createComposedMatch(RuleMatch ruleMatch,

-          ComposedRuleElementMatch containerMatch, RutaStream stream) {

-    ComposedRuleElementMatch composedMatch = new ComposedRuleElementMatch(this, containerMatch);

-    includeMatch(ruleMatch, containerMatch, composedMatch, stream);

-    return composedMatch;

-  }

-

-  public List<RuleMatch> continueMatch(boolean after, AnnotationFS annotation, RuleMatch ruleMatch,

-          RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    if (conjunct == null) {

-      // inner next sequential

-      RuleElement nextElement = getNextElement(after, this);

-      if (nextElement != null) {

-        ComposedRuleElementMatch composedMatch = createComposedMatch(ruleMatch, containerMatch,

-                stream);

-        result = nextElement.continueMatch(after, annotation, ruleMatch, ruleApply, composedMatch,

-                sideStepOrigin, entryPoint, stream, crowd);

-      } else {

-        result = fallback(after, false, annotation, ruleMatch, ruleApply, containerMatch,

-                sideStepOrigin, entryPoint, stream, crowd);

-      }

-    } else if (!conjunct) {

-      // disjunctive

-      Map<RuleMatch, ComposedRuleElementMatch> ruleMatches = new HashMap<RuleMatch, ComposedRuleElementMatch>();

-      for (RuleElement each : elements) {

-        ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-        RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-        ComposedRuleElementMatch composedMatch = createComposedMatch(extendedMatch,

-                extendedContainerMatch, stream);

-        List<RuleMatch> continueRuleMatches = each.continueMatch(after, annotation, extendedMatch,

-                null, composedMatch, sideStepOrigin, this, stream, crowd);

-        for (RuleMatch continueRuleMatch : continueRuleMatches) {

-          ComposedRuleElementMatch startElementMatch = (ComposedRuleElementMatch) continueRuleMatch

-                  .getLastMatch(this, true);

-          ruleMatches.put(continueRuleMatch, startElementMatch);

-        }

-      }

-      // TODO sort matches, no need to merge them, right?!

-      Map<RuleMatch, ComposedRuleElementMatch> mergedMatches = mergeDisjunctiveRuleMatches(

-              ruleMatches, after, stream);

-      Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = mergedMatches.entrySet();

-      for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {

-        RuleMatch eachRuleMatch = entry.getKey();

-        ComposedRuleElementMatch eachComposedMatch = entry.getValue();

-        AnnotationFS lastAnnotation = eachRuleMatch.getLastMatchedAnnotation(this, after,

-                annotation, parent, stream);

-        boolean failed = !eachComposedMatch.matched();

-        List<AnnotationFS> textsMatched = eachRuleMatch.getMatchedAnnotationsOfRoot();

-        if ((!stream.isGreedyAnchoring() && !stream.isOnlyOnce())

-                || (!textsMatched.isEmpty() && !earlyExit(textsMatched.get(0), ruleApply, stream))) {

-          List<RuleMatch> fallbackContinue = fallbackContinue(after, failed, lastAnnotation,

-                  eachRuleMatch, ruleApply, eachComposedMatch, sideStepOrigin, entryPoint, stream,

-                  crowd);

-          result.addAll(fallbackContinue);

-        }

-      }

-    } else if (conjunct) {

-      // conjunctive

-      Map<RuleMatch, ComposedRuleElementMatch> ruleMatches = new HashMap<RuleMatch, ComposedRuleElementMatch>();

-

-      RuleElement anchoringRuleElement = getAnchoringRuleElement(stream);

-      ComposedRuleElementMatch composedMatch = createComposedMatch(ruleMatch, containerMatch,

-              stream);

-      List<RuleMatch> startRuleMatches = anchoringRuleElement.continueMatch(after, annotation,

-              ruleMatch, null, composedMatch, sideStepOrigin, this, stream, crowd);

-

-      for (RuleMatch eachStartRuleMatch : startRuleMatches) {

-        for (RuleElement each : elements) {

-          if (each.equals(anchoringRuleElement)) {

-            continue;

-          }

-          ComposedRuleElementMatch startElementMatch = (ComposedRuleElementMatch) eachStartRuleMatch

-                  .getLastMatch(this, true);

-          List<RuleMatch> continueMatch = each.continueMatch(true, annotation, eachStartRuleMatch,

-                  null, startElementMatch, null, this, stream, crowd);

-          for (RuleMatch startRuleMatch : continueMatch) {

-            ComposedRuleElementMatch elementMatch = (ComposedRuleElementMatch) startRuleMatch

-                    .getLastMatch(this, true);

-            ruleMatches.put(startRuleMatch, elementMatch);

-          }

-        }

-      }

-      Map<RuleMatch, ComposedRuleElementMatch> mergedMatches = mergeConjunctiveRuleMatches(

-              ruleMatches, after);

-      Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = mergedMatches.entrySet();

-      for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {

-        RuleMatch eachRuleMatch = entry.getKey();

-        ComposedRuleElementMatch eachComposedMatch = entry.getValue();

-        AnnotationFS lastAnnotation = eachRuleMatch.getLastMatchedAnnotation(this, after,

-                annotation, parent, stream);

-

-        boolean failed = !eachComposedMatch.matched();

-

-        List<AnnotationFS> textsMatched = eachRuleMatch.getMatchedAnnotationsOfRoot();

-        if ((!stream.isGreedyAnchoring() && !stream.isOnlyOnce())

-                || (!textsMatched.isEmpty() && !earlyExit(textsMatched.get(0), ruleApply, stream))) {

-          List<RuleMatch> fallbackContinue = fallbackContinue(after, failed, lastAnnotation,

-                  eachRuleMatch, ruleApply, eachComposedMatch, sideStepOrigin, entryPoint, stream,

-                  crowd);

-          result.addAll(fallbackContinue);

-        }

-      }

-    }

-    return result;

-  }

-

-  private Map<RuleMatch, ComposedRuleElementMatch> mergeConjunctiveRuleMatches(

-          Map<RuleMatch, ComposedRuleElementMatch> ruleMatches, boolean direction) {

-    // TODO hotfix: this needs a correct implementation

-    return ruleMatches;

-    // Map<RuleMatch, ComposedRuleElementMatch> result = new HashMap<RuleMatch,

-    // ComposedRuleElementMatch>();

-    // Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = ruleMatches.entrySet();

-    // Entry<RuleMatch, ComposedRuleElementMatch> largestEntry = null;

-    // boolean allMatched = true;

-    // AnnotationFS largestAnnotation = null;

-    // for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {

-    // RuleMatch ruleMatch = entry.getKey();

-    // ComposedRuleElementMatch elementMatch = entry.getValue();

-    // allMatched &= elementMatch.matched();

-    // AnnotationFS lastMatchedAnnotation = ruleMatch.getLastMatchedAnnotation(getFirstElement(),

-    // direction);

-    // if (largestEntry == null) {

-    // largestEntry = entry;

-    // largestAnnotation = lastMatchedAnnotation;

-    // } else {

-    // if (lastMatchedAnnotation != null

-    // && largestAnnotation != null

-    // && lastMatchedAnnotation.getCoveredText().length() > largestAnnotation

-    // .getCoveredText().length()) {

-    // largestEntry = entry;

-    // largestAnnotation = lastMatchedAnnotation;

-    // }

-    // }

-    // }

-    // if (allMatched) {

-    // result.put(largestEntry.getKey(), largestEntry.getValue());

-    // }

-    // return result;

-  }

-

-  private Map<RuleMatch, ComposedRuleElementMatch> mergeDisjunctiveRuleMatches(

-          Map<RuleMatch, ComposedRuleElementMatch> ruleMatches, boolean direction, RutaStream stream) {

-    // TODO hotfix: this needs a correct implementation

-    Map<RuleMatch, ComposedRuleElementMatch> result = new TreeMap<RuleMatch, ComposedRuleElementMatch>(

-            ruleMatchComparator);

-    Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = ruleMatches.entrySet();

-    Entry<RuleMatch, ComposedRuleElementMatch> largestEntry = null;

-    AnnotationFS largestAnnotation = null;

-    for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {

-      RuleMatch ruleMatch = entry.getKey();

-      ComposedRuleElementMatch elementMatch = entry.getValue();

-      if (elementMatch.matched()) {

-        result.put(ruleMatch, elementMatch);

-      } else {

-        AnnotationFS lastMatchedAnnotation = ruleMatch.getLastMatchedAnnotation(getFirstElement(),

-                direction, null, parent, stream);

-        if (largestEntry == null) {

-          largestEntry = entry;

-          largestAnnotation = lastMatchedAnnotation;

-        } else {

-          if (lastMatchedAnnotation != null

-                  && largestAnnotation != null

-                  && lastMatchedAnnotation.getCoveredText().length() > largestAnnotation

-                          .getCoveredText().length()) {

-            largestEntry = entry;

-            largestAnnotation = lastMatchedAnnotation;

-          }

-        }

-      }

-    }

-    if (result.isEmpty()) {

-      if (largestEntry != null) {

-        result.put(largestEntry.getKey(), largestEntry.getValue());

-      } else {

-        result = ruleMatches;

-      }

-    }

-    return result;

-  }

-

-  public List<RuleMatch> continueOwnMatch(boolean after, AnnotationFS annotation,

-          RuleMatch ruleMatch, RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    if (!stream.isSimpleGreedyForComposed()) {

-      result = continueMatch(after, annotation, ruleMatch, ruleApply, containerMatch,

-              sideStepOrigin, entryPoint, stream, crowd);

-    } else {

-      // HOTFIX

-      boolean stopMatching = false;

-      boolean failed = false;

-      AnnotationFS nextAnnotation = annotation;

-      while (!stopMatching) {

-        RuleElement nextElement = getNextElement(after, this);

-        if (nextElement != null) {

-          ComposedRuleElementMatch composedMatch = createComposedMatch(ruleMatch, containerMatch,

-                  stream);

-          nextElement.continueMatch(after, nextAnnotation, ruleMatch, ruleApply, composedMatch,

-                  sideStepOrigin, this, stream, crowd);

-          ComposedRuleElementMatch parentContainerMatch = containerMatch.getContainerMatch();

-          List<RuleElementMatch> match = getMatch(ruleMatch, parentContainerMatch);

-          int lenghtBefore = match.size();

-          List<RuleElementMatch> evaluateMatches = quantifier.evaluateMatches(match, parent,

-                  stream, crowd);

-          ruleMatch.setMatched(ruleMatch.matched() && evaluateMatches != null);

-          if (evaluateMatches != null && evaluateMatches.size() != lenghtBefore) {

-            failed = true;

-            stopMatching = true;

-          }

-          if (!quantifier.continueMatch(after, nextAnnotation, this, ruleMatch, containerMatch,

-                  stream, crowd)) {

-            stopMatching = true;

-          }

-          if (evaluateMatches != null) {

-            List<AnnotationFS> textsMatched = evaluateMatches.get(evaluateMatches.size() - 1)

-                    .getTextsMatched();

-            nextAnnotation = textsMatched.get(textsMatched.size() - 1);

-          }

-        } else {

-          stopMatching = true;

-        }

-      }

-      result = fallback(after, failed, nextAnnotation, ruleMatch, ruleApply, containerMatch,

-              sideStepOrigin, entryPoint, stream, crowd);

-    }

-    return result;

-  }

-

-  public List<RuleMatch> fallbackContinue(boolean after, boolean failed, AnnotationFS annotation,

-          RuleMatch ruleMatch, RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    RuleElementContainer container = getContainer();

-    doMatch(containerMatch, ruleMatch, stream, crowd);

-    if (this.equals(entryPoint) && ruleApply == null) {

-      result.add(ruleMatch);

-    } else if (container == null) {

-      result = fallback(after, failed, annotation, ruleMatch, ruleApply, containerMatch,

-              sideStepOrigin, entryPoint, stream, crowd);

-    } else {

-      ComposedRuleElementMatch parentContainerMatch = containerMatch.getContainerMatch();

-      RuleElement nextElement = container.getNextElement(after, this);

-      List<RuleElementMatch> match = getMatch(ruleMatch, parentContainerMatch);

-      int sizeBefore = match.size();

-      boolean continueMatch = quantifier.continueMatch(after, annotation, this, ruleMatch,

-              parentContainerMatch, stream, crowd);

-      List<RuleElementMatch> evaluateMatches = quantifier.evaluateMatches(match, parent, stream,

-              crowd);

-      int sizeAfter = evaluateMatches != null ? evaluateMatches.size() : sizeBefore;

-      boolean removedFailedMatches = sizeAfter < sizeBefore;

-      if(removedFailedMatches) {

-        containerMatch.enforceUpdate();

-      }

-      ruleMatch.setMatched((ruleMatch.matched() || removedFailedMatches)

-              && (evaluateMatches != null || continueMatch || sideStepOrigin != null));

-      if (failed) {

-        // TODO failed was caused by a child: should here failed = false?

-        if (!removedFailedMatches && evaluateMatches != null && continueMatch) {

-          result = continueOwnMatch(after, annotation, ruleMatch, ruleApply, parentContainerMatch,

-                  sideStepOrigin, entryPoint, stream, crowd);

-        } else if (nextElement != null) {

-          AnnotationFS backtrackedAnnotation = getBacktrackedAnnotation(after, evaluateMatches,

-                  annotation);

-          if (backtrackedAnnotation != null) {

-            result = nextElement.continueMatch(after, backtrackedAnnotation, ruleMatch, ruleApply,

-                    parentContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-          } else {

-            result = fallback(after, failed, annotation, ruleMatch, ruleApply,

-                    parentContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-          }

-        } else {

-          if (this.equals(entryPoint)) {

-            // hotfix for UIMA-3820

-            result.add(ruleMatch);

-          } else {

-            result = fallback(after, failed, annotation, ruleMatch, ruleApply,

-                    parentContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-          }

-        }

-      } else {

-        if (continueMatch && !removedFailedMatches) {

-          result = continueOwnMatch(after, annotation, ruleMatch, ruleApply, parentContainerMatch,

-                  sideStepOrigin, entryPoint, stream, crowd);

-        } else if (nextElement != null) {

-          result = nextElement.continueMatch(after, annotation, ruleMatch, ruleApply,

-                  parentContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-        } else {

-          result = fallback(after, failed, annotation, ruleMatch, ruleApply, parentContainerMatch,

-                  sideStepOrigin, entryPoint, stream, crowd);

-        }

-      }

-    }

-    return result;

-  }

-

-  private AnnotationFS getBacktrackedAnnotation(boolean after,

-          List<RuleElementMatch> evaluateMatches, AnnotationFS annotation) {

-    if (evaluateMatches == null) {

-      return null;

-    }

-    if (evaluateMatches.isEmpty()) {

-      return annotation;

-    }

-    if (after) {

-      List<AnnotationFS> textsMatched = evaluateMatches.get(evaluateMatches.size() - 1)

-              .getTextsMatched();

-      if (textsMatched.isEmpty()) {

-        return null;

-      }

-      AnnotationFS backtrackedAnnotation = textsMatched.get(textsMatched.size() - 1);

-      return backtrackedAnnotation;

-    } else {

-      List<AnnotationFS> textsMatched = evaluateMatches.get(0).getTextsMatched();

-      if (textsMatched.isEmpty()) {

-        return null;

-      }

-      AnnotationFS backtrackedAnnotation = textsMatched.get(0);

-      return backtrackedAnnotation;

-    }

-  }

-

-  private List<RuleMatch> fallback(boolean after, boolean failed, AnnotationFS annotation,

-          RuleMatch ruleMatch, RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    RuleElementContainer parentContainer = getContainer();

-    if (parentContainer instanceof ComposedRuleElement) {

-      ComposedRuleElement parentElement = (ComposedRuleElement) parentContainer;

-      result = parentElement.fallbackContinue(after, failed, annotation, ruleMatch, ruleApply,

-              containerMatch, sideStepOrigin, entryPoint, stream, crowd);

-    } else if (sideStepOrigin != null) {

-      result = sideStepOrigin.continueSideStep(after, ruleMatch, ruleApply, containerMatch,

-              entryPoint, stream, crowd);

-    } else {

-      result.add(ruleMatch);

-      doneMatching(ruleMatch, ruleApply, stream, crowd);

-    }

-    return result;

-  }

-

-  private void includeMatch(RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch,

-          ComposedRuleElementMatch composedMatch, RutaStream stream) {

-    if (containerMatch == null) {

-      ruleMatch.setRootMatch(composedMatch);

-    } else {

-      containerMatch.addInnerMatch(this, composedMatch, false, stream);

-    }

-  }

-

-  private void doMatch(ComposedRuleElementMatch match, RuleMatch ruleMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<AnnotationFS> textsMatched = match.getTextsMatched();

-    if (textsMatched == null || textsMatched.isEmpty()) {

-      match.evaluateInnerMatches(true, stream);

-      return;

-    }

-    int begin = textsMatched.get(0).getBegin();

-    int end = textsMatched.get(textsMatched.size() - 1).getEnd();

-    AnnotationFS annotation = stream.getCas().createAnnotation(stream.getCas().getAnnotationType(),

-            begin, end);

-

-    List<EvaluatedCondition> evaluatedConditions = new ArrayList<EvaluatedCondition>(

-            conditions.size());

-    for (AbstractRutaCondition condition : conditions) {

-      crowd.beginVisit(condition, null);

-      EvaluatedCondition eval = condition.eval(annotation, this, stream, crowd);

-      crowd.endVisit(condition, null);

-      evaluatedConditions.add(eval);

-    }

-    match.setConditionInfo(evaluatedConditions);

-    match.evaluateInnerMatches(true, stream);

-    boolean inlinedRulesMatched = matchInnerRules(ruleMatch, stream, crowd);

-    match.setInlinedRulesMatched(inlinedRulesMatched);

-  }

-

-  public Collection<AnnotationFS> getAnchors(RutaStream stream) {

-    RuleElement anchorElement = getAnchoringRuleElement(stream);

-    Collection<AnnotationFS> anchors = anchorElement.getAnchors(stream);

-    return anchors;

-  }

-

-  public long estimateAnchors(RutaStream stream) {

-    long result = 1;

-    for (RuleElement each : elements) {

-      result += each.estimateAnchors(stream);

-    }

-    if (quantifier.isOptional(getParent(), stream)) {

-      // three times since sibling elements maybe need to be checked

-      result *= 3 * (int) stream.getIndexPenalty();

-    }

-    return result;

-  }

-

-  public RuleElement getAnchoringRuleElement(RutaStream stream) {

-    return caretaker.getAnchoringRuleElement(stream);

-  }

-

-  public List<RuleElement> getRuleElements() {

-    return elements;

-  }

-

-  public void setRuleElements(List<RuleElement> elements) {

-    this.elements = elements;

-  }

-

-  public RuleElement getFirstElement() {

-    return caretaker.getFirstElement();

-  }

-

-  public RuleElement getLastElement() {

-    return caretaker.getLastElement();

-  }

-

-  public void applyRuleElements(RuleMatch ruleMatch, RutaStream stream, InferenceCrowd crowd) {

-    caretaker.applyRuleElements(ruleMatch, stream, crowd);

-  }

-

-  public String toString() {

-    String con = "";

-    if (conjunct != null) {

-      con = conjunct ? "&" : "|";

-    }

-    String simpleName = getQuantifier().getClass().getSimpleName();

-    return "(" + con + (elements == null ? "null" : elements.toString()) + ")"

-            + (simpleName.equals("NormalQuantifier") ? "" : simpleName)

-    // + (conditions.isEmpty() ? "" : "(" + conditions.toString() + ")" + "\\n")

-    // + (actions.isEmpty() ? "" : "{" + actions.toString() + "}")

-    ;

-  }

-

-  public RuleElement getNextElement(boolean after, RuleElement ruleElement) {

-    // return caretaker.getNextElement(after, ruleElement);

-    if (conjunct == null || this.equals(ruleElement)) {

-      return caretaker.getNextElement(after, ruleElement);

-    } else {

-      return null;

-    }

-  }

-

-  public void setConjunct(Boolean conjunct) {

-    this.conjunct = conjunct;

-  }

-

-  public Boolean getConjunct() {

-    return conjunct;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java
deleted file mode 100644
index 98c83cb..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-import java.util.TreeMap;

-import java.util.TreeSet;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-

-public class ComposedRuleElementMatch extends RuleElementMatch {

-

-  private Map<RuleElement, List<RuleElementMatch>> innerMatches;

-

-  private boolean textsMatchedUpdated = false;

-

-  public ComposedRuleElementMatch(ComposedRuleElement ruleElement,

-          ComposedRuleElementMatch containerMatch) {

-    super(ruleElement, containerMatch);

-    baseConditionMatched = false;

-    ComposedRuleElement cre = (ComposedRuleElement) ruleElement;

-    innerMatches = new TreeMap<RuleElement, List<RuleElementMatch>>(new RuleElementComparator(cre));

-    List<RuleElement> ruleElements = cre.getRuleElements();

-    for (RuleElement eachRuleElement : ruleElements) {

-      innerMatches.put(eachRuleElement, null);

-    }

-  }

-

-  protected void enforceUpdate() {

-    textsMatchedUpdated = false;

-    ComposedRuleElementMatch cm = getContainerMatch();

-    if (cm != null) {

-      cm.enforceUpdate();

-    }

-  }

-

-  private void setInnerMatches(Map<RuleElement, List<RuleElementMatch>> innerMatches) {

-    this.innerMatches = innerMatches;

-    enforceUpdate();

-  }

-

-  public Map<RuleElement, List<RuleElementMatch>> getInnerMatches() {

-    return innerMatches;

-  }

-

-  public void addInnerMatch(RuleElement ruleElement, RuleElementMatch ruleElementMatch,

-          RutaStream stream) {

-    addInnerMatch(ruleElement, ruleElementMatch, true, stream);

-  }

-

-  public void addInnerMatch(RuleElement ruleElement, RuleElementMatch ruleElementMatch,

-          boolean included, RutaStream stream) {

-    List<RuleElementMatch> list = innerMatches.get(ruleElement);

-    if (list == null) {

-      list = new ArrayList<RuleElementMatch>();

-      innerMatches.put(ruleElement, list);

-    }

-    list.add(ruleElementMatch);

-    evaluateInnerMatches(included, stream);

-    enforceUpdate();

-  }

-

-  public void evaluateInnerMatches(boolean included, RutaStream stream) {

-    boolean allDone = true;

-    boolean oneDone = false;

-    Set<Entry<RuleElement, List<RuleElementMatch>>> entrySet = innerMatches.entrySet();

-    for (Entry<RuleElement, List<RuleElementMatch>> entry : entrySet) {

-      RuleElement element = entry.getKey();

-      List<RuleElementMatch> value = entry.getValue();

-      allDone &= (element.getQuantifier().isOptional(element.getParent(), stream) || value != null);

-      if (value != null && !value.isEmpty() && included) {

-        for (RuleElementMatch ruleElementMatch : value) {

-          allDone &= ruleElementMatch.matched();

-          oneDone |= ruleElementMatch.matched();

-        }

-      }

-    }

-    ComposedRuleElement cre = (ComposedRuleElement) ruleElement;

-    if (cre.getConjunct() != null && !cre.getConjunct()) {

-      baseConditionMatched = oneDone;

-    } else {

-      baseConditionMatched = allDone;

-    }

-  }

-

-  public ComposedRuleElementMatch copy() {

-    ComposedRuleElementMatch copy = new ComposedRuleElementMatch((ComposedRuleElement) ruleElement,

-            containerMatch);

-    copy.setBaseConditionMatched(baseConditionMatched);

-    copy.setConditions(conditions);

-    copy.setConditionsMatched(conditionsMatched);

-    copy.setTextsMatched(textsMatched);

-    Map<RuleElement, List<RuleElementMatch>> newMap = new TreeMap<RuleElement, List<RuleElementMatch>>(

-            new RuleElementComparator((ComposedRuleElement) ruleElement));

-    for (Entry<RuleElement, List<RuleElementMatch>> entry : innerMatches.entrySet()) {

-      List<RuleElementMatch> value = entry.getValue();

-      if (value != null) {

-        List<RuleElementMatch> newValue = new ArrayList<RuleElementMatch>();

-        for (RuleElementMatch each : value) {

-          newValue.add(each.copy());

-        }

-        newMap.put(entry.getKey(), newValue);

-      } else {

-        newMap.put(entry.getKey(), null);

-      }

-    }

-    copy.setInnerMatches(newMap);

-    return copy;

-  }

-

-  public ComposedRuleElementMatch copy(ComposedRuleElementMatch extendedContainerMatch,

-          boolean after) {

-    ComposedRuleElementMatch copy = new ComposedRuleElementMatch((ComposedRuleElement) ruleElement,

-            containerMatch);

-    copy.setBaseConditionMatched(baseConditionMatched);

-    copy.setConditions(conditions);

-    copy.setConditionsMatched(conditionsMatched);

-    copy.setTextsMatched(textsMatched);

-    Map<RuleElement, List<RuleElementMatch>> newMap = new TreeMap<RuleElement, List<RuleElementMatch>>(

-            new RuleElementComparator((ComposedRuleElement) ruleElement));

-    for (Entry<RuleElement, List<RuleElementMatch>> entry : innerMatches.entrySet()) {

-      RuleElement key = entry.getKey();

-      List<RuleElementMatch> value = entry.getValue();

-      if (key.equals(extendedContainerMatch.getRuleElement())) {

-        // if (value.isEmpty()) {

-        extendedContainerMatch.setContainerMatch(copy);

-        if (value != null) {

-          List<RuleElementMatch> newValue = new ArrayList<RuleElementMatch>();

-          newValue.addAll(value);

-          newValue.set(newValue.size() - 1, extendedContainerMatch);

-          newMap.put(extendedContainerMatch.getRuleElement(), newValue);

-        }

-        // } else {

-        // List<RuleElementMatch> newValue = new ArrayList<RuleElementMatch>();

-        // newValue.addAll(value);

-        // newValue.add(extendedContainerMatch);

-        // newMap.put(extendedContainerMatch.getRuleElement(), newValue);

-        // }

-      } else {

-        if (value != null) {

-          List<RuleElementMatch> newValue = new ArrayList<RuleElementMatch>();

-          for (RuleElementMatch each : value) {

-            each.setContainerMatch(copy);

-            if (each instanceof ComposedRuleElementMatch) {

-              newValue.add(((ComposedRuleElementMatch) each).copy(extendedContainerMatch, after));

-            } else {

-              newValue.add(each.copy());

-            }

-          }

-          newMap.put(entry.getKey(), newValue);

-        } else {

-          newMap.put(entry.getKey(), null);

-        }

-      }

-    }

-    copy.setInnerMatches(newMap);

-    return copy;

-  }

-

-  public ComposedRuleElementMatch copy2(ComposedRuleElementMatch extendedContainerMatch,

-          boolean after) {

-    ComposedRuleElementMatch copy = new ComposedRuleElementMatch((ComposedRuleElement) ruleElement,

-            containerMatch);

-    copy.setBaseConditionMatched(baseConditionMatched);

-    copy.setConditions(conditions);

-    copy.setConditionsMatched(conditionsMatched);

-    copy.setTextsMatched(textsMatched);

-    Map<RuleElement, List<RuleElementMatch>> newMap = new TreeMap<RuleElement, List<RuleElementMatch>>(

-            new RuleElementComparator((ComposedRuleElement) ruleElement));

-    for (Entry<RuleElement, List<RuleElementMatch>> entry : innerMatches.entrySet()) {

-      RuleElement key = entry.getKey();

-      List<RuleElementMatch> value = entry.getValue();

-      if (key.equals(extendedContainerMatch.getRuleElement())) {

-        extendedContainerMatch.setContainerMatch(copy);

-        if (value != null) {

-          List<RuleElementMatch> newValue = new ArrayList<RuleElementMatch>();

-          newValue.addAll(value);

-          newValue.set(newValue.size() - 1, extendedContainerMatch);

-          newMap.put(extendedContainerMatch.getRuleElement(), newValue);

-        }

-      } else {

-        if (value != null && !value.isEmpty()) {

-          List<RuleElementMatch> newValue = new ArrayList<RuleElementMatch>();

-          int counter = 0;

-          for (RuleElementMatch each : value) {

-            each.setContainerMatch(copy);

-            // really need to copy all?

-            boolean isCurrentOne = false;

-            if (counter == value.size() - 1) {

-              isCurrentOne = true;

-            }

-            // should not be neccessary because empty matches are listed last

-            // if (after && counter == value.size() - 1) {

-            // isCurrentOne = true;

-            // }

-            // if (!after && counter == 0) {

-            // isCurrentOne = true;

-            // }

-            if (each instanceof ComposedRuleElementMatch && isCurrentOne) {

-              newValue.add(((ComposedRuleElementMatch) each).copy2(extendedContainerMatch, after));

-            } else {

-              newValue.add(each.copy());

-            }

-            counter++;

-          }

-          newMap.put(entry.getKey(), newValue);

-        } else {

-          newMap.put(entry.getKey(), null);

-        }

-      }

-    }

-    copy.setInnerMatches(newMap);

-    return copy;

-  }

-

-  public void update(ComposedRuleElementMatch extendedContainerMatch) {

-    for (Entry<RuleElement, List<RuleElementMatch>> entry : innerMatches.entrySet()) {

-      RuleElement key = entry.getKey();

-      List<RuleElementMatch> value = entry.getValue();

-      if (key.equals(extendedContainerMatch.getRuleElement())) {

-        extendedContainerMatch.setContainerMatch(this);

-        if (value != null) {

-          value.set(value.size() - 1, extendedContainerMatch);

-        }

-      } else {

-        if (value != null) {

-          for (RuleElementMatch each : value) {

-            if (each instanceof ComposedRuleElementMatch) {

-              ((ComposedRuleElementMatch) each).update(extendedContainerMatch);

-            }

-          }

-        }

-      }

-    }

-    enforceUpdate();

-  }

-

-  public String toString() {

-    return "CREM" + innerMatches.toString();

-  }

-

-  public List<AnnotationFS> getTextsMatched() {

-    if (!textsMatchedUpdated || textsMatched == null) {

-      Collection<AnnotationFS> set = new TreeSet<AnnotationFS>(new AnnotationComparator());

-      Collection<List<RuleElementMatch>> values = innerMatches.values();

-      for (List<RuleElementMatch> list : values) {

-        if (list != null) {

-          for (RuleElementMatch ruleElementMatch : list) {

-            set.addAll(ruleElementMatch.getTextsMatched());

-          }

-        }

-      }

-      textsMatched = new ArrayList<AnnotationFS>(set);

-      textsMatchedUpdated = true;

-    }

-    return textsMatched;

-  }

-

-  public void setConditionInfo(List<EvaluatedCondition> evaluatedConditions) {

-    conditions = evaluatedConditions;

-    for (EvaluatedCondition each : conditions) {

-      conditionsMatched = conditionsMatched && each.isValue();

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ConjunctRulesRuleElement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ConjunctRulesRuleElement.java
deleted file mode 100644
index f8c407d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ConjunctRulesRuleElement.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class ConjunctRulesRuleElement extends ComposedRuleElement {

-

-  public ConjunctRulesRuleElement(List<RuleElement> elements, RuleElementContainer container,

-          RutaBlock parent) {

-    super(elements, null, null, null, container, parent);

-  }

-

-  public void setElements(List<RuleElement> elements) {

-    this.elements = elements;

-  }

-

-  public List<RuleMatch> startMatch(RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    ComposedRuleElementMatch composedMatch = createComposedMatch(ruleMatch, containerMatch, stream);

-    boolean allMatched = true;

-    for (RuleElement each : elements) {

-      List<RuleMatch> startMatch = each.startMatch(ruleMatch, null, composedMatch, each, stream, crowd);

-      boolean oneMatched = false;;

-      for (RuleMatch eachRuleMatch : startMatch) {

-        boolean matched = eachRuleMatch.matched();

-        if(matched) {

-          oneMatched = true;

-          break;

-        }

-      }

-      allMatched &= oneMatched;

-      result.addAll(startMatch);

-    }

-    

-    for (RuleMatch each : result) {

-      if (!each.isApplied()) {

-        ruleApply.add(each);

-        if (each.matched() && allMatched) {

-          each.getRule().getRoot().applyRuleElements(each, stream, crowd);

-        }

-        each.setApplied(true);

-      }

-    }

-    return result;

-  }

-

-  public List<RuleMatch> continueMatch(boolean after, AnnotationFS annotation, RuleMatch ruleMatch,

-          RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    throw new UnsupportedOperationException();

-  }

-

-  public List<RuleMatch> continueOwnMatch(boolean after, AnnotationFS annotation,

-          RuleMatch ruleMatch, RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    throw new UnsupportedOperationException();

-  }

-

-  public Collection<AnnotationFS> getAnchors(RutaStream symbolStream) {

-    throw new UnsupportedOperationException();

-  }

-

-  public long estimateAnchors(RutaStream stream) {

-    throw new UnsupportedOperationException();

-  }

-

-  public List<RuleElement> getRuleElements() {

-    return elements;

-  }

-

-  public RuleElement getFirstElement() {

-    return null;

-  }

-

-  public RuleElement getLastElement() {

-    return null;

-  }

-

-  public RuleElement getAnchoringRuleElement(RutaStream stream) {

-    return null;

-  }

-

-  public RuleElement getNextElement(boolean after, RuleElement ruleElement) {

-    return null;

-  }

-

-  public boolean hasAncestor(boolean after) {

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/EvaluatedCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/EvaluatedCondition.java
deleted file mode 100644
index 9373389..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/EvaluatedCondition.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.condition.NotCondition;

-

-public class EvaluatedCondition {

-

-  private final AbstractRutaCondition condition;

-

-  private final boolean value;

-

-  private final List<EvaluatedCondition> conditions;

-

-  private final List<EvaluatedCondition> noConditions = new ArrayList<EvaluatedCondition>(0);

-

-  public EvaluatedCondition(AbstractRutaCondition condition, boolean value,

-          List<EvaluatedCondition> conditions) {

-    super();

-    this.condition = condition;

-    this.value = value;

-    this.conditions = conditions;

-  }

-

-  public EvaluatedCondition(AbstractRutaCondition condition, boolean value) {

-    super();

-    this.condition = condition;

-    this.value = value;

-    this.conditions = noConditions;

-  }

-

-  public EvaluatedCondition(NotCondition condition, boolean value, EvaluatedCondition eval) {

-    super();

-    this.condition = condition;

-    this.value = value;

-    this.conditions = new ArrayList<EvaluatedCondition>();

-    conditions.add(eval);

-  }

-

-  public AbstractRutaCondition getCondition() {

-    return condition;

-  }

-

-  public boolean isValue() {

-    return value;

-  }

-

-  public List<EvaluatedCondition> getConditions() {

-    return conditions;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RegExpRule.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RegExpRule.java
deleted file mode 100644
index 36281bc..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RegExpRule.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-import java.util.TreeMap;

-import java.util.regex.MatchResult;

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.utils.UIMAUtils;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RegExpRule extends AbstractRule {

-

-  private Map<TypeExpression, INumberExpression> typeMap;

-

-  private IStringExpression regexpExpr;

-

-  private Map<TypeExpression, Map<IStringExpression, IRutaExpression>> featureAssignments;

-

-  public RegExpRule(AbstractStringExpression regexp, Map<TypeExpression, INumberExpression> typeMap, int id,

-          RutaBlock parent) {

-    super(parent, id);

-    this.regexpExpr = regexp;

-    this.typeMap = typeMap;

-  }

-

-  @Override

-  public ScriptApply apply(RutaStream stream, InferenceCrowd crowd) {

-    RuleApply ruleApply = new RuleApply(this, false);

-    crowd.beginVisit(this, ruleApply);

-

-    String regexpString = regexpExpr.getStringValue(getParent(), null, stream);

-    AnnotationFS documentAnnotation = stream.getDocumentAnnotation();

-    String document = documentAnnotation.getCoveredText();

-    int delta = documentAnnotation.getBegin();

-

-    Map<Integer, List<Type>> groupTypes = getGroup2Types(stream);

-    Map<Integer, Map<Type, Map<String, Object>>> fa = getFeatureAssignmentMap(stream);

-

-    Pattern pattern = Pattern.compile(regexpString, Pattern.MULTILINE | Pattern.DOTALL);

-    Matcher matcher = pattern.matcher(document);

-    int groupCount = matcher.groupCount();

-    while (matcher.find()) {

-      RegExpRuleMatch ruleMatch = new RegExpRuleMatch(this);

-      MatchResult matchResult = matcher.toMatchResult();

-      for (int i = 0; i <= groupCount; i++) {

-        int begin = matchResult.start(i);

-        int end = matchResult.end(i);

-        List<Type> types = groupTypes.get(i);

-        if (types != null) {

-          createAnnotations(i, delta, begin, end, types, fa, matchResult, ruleMatch, stream);

-        } else if (i == 0) {

-          CAS cas = stream.getCas();

-          AnnotationFS afs = cas.createAnnotation(cas.getAnnotationType(), delta + begin, delta

-                  + end);

-          ruleMatch.addMatched(0, afs);

-        }

-      }

-      List<AnnotationFS> matchedAnnotationsOfRoot = ruleMatch.getMatchedAnnotationsOfRoot();

-      if (matchedAnnotationsOfRoot != null && !matchedAnnotationsOfRoot.isEmpty()) {

-        ruleApply.add(ruleMatch);

-      }

-    }

-

-    crowd.endVisit(this, ruleApply);

-    return ruleApply;

-  }

-

-  private Map<Integer, Map<Type, Map<String, Object>>> getFeatureAssignmentMap(RutaStream stream) {

-    Map<Integer, Map<Type, Map<String, Object>>> result = new HashMap<Integer, Map<Type, Map<String, Object>>>();

-    Set<Entry<TypeExpression, Map<IStringExpression, IRutaExpression>>> entrySet = featureAssignments

-            .entrySet();

-    for (Entry<TypeExpression, Map<IStringExpression, IRutaExpression>> entry : entrySet) {

-      TypeExpression key = entry.getKey();

-      Type type = key.getType(getParent());

-      Map<IStringExpression, IRutaExpression> value = entry.getValue();

-      INumberExpression cgExpr = typeMap.get(key);

-      int cg = cgExpr == null ? 0 : cgExpr.getIntegerValue(getParent(), null, stream);

-      Map<Type, Map<String, Object>> map = result.get(cg);

-      if (map == null) {

-        map = new HashMap<Type, Map<String, Object>>();

-        result.put(cg, map);

-      }

-      Map<String, Object> typeMap = map.get(type);

-      if (typeMap == null) {

-        typeMap = new HashMap<String, Object>();

-        map.put(type, typeMap);

-      }

-      Set<Entry<IStringExpression, IRutaExpression>> entrySet2 = value.entrySet();

-      for (Entry<IStringExpression, IRutaExpression> entry2 : entrySet2) {

-        IStringExpression key2 = entry2.getKey();

-        IRutaExpression value2 = entry2.getValue();

-        String stringValue = key2.getStringValue(getParent(), null, stream);

-        typeMap.put(stringValue, value2);

-      }

-    }

-    return result;

-  }

-

-  private Map<Integer, List<Type>> getGroup2Types(RutaStream stream) {

-    Map<Integer, List<Type>> groupTypes = new TreeMap<Integer, List<Type>>();

-    Set<Entry<TypeExpression, INumberExpression>> entrySet = typeMap.entrySet();

-    for (Entry<TypeExpression, INumberExpression> entry : entrySet) {

-      Type type = entry.getKey().getType(getParent());

-      INumberExpression value = entry.getValue();

-      int group = value == null ? 0 : value.getIntegerValue(getParent(), null, stream);

-      List<Type> list = groupTypes.get(group);

-      if (list == null) {

-        list = new ArrayList<Type>();

-        groupTypes.put(group, list);

-      }

-      list.add(type);

-    }

-    return groupTypes;

-  }

-

-  private void createAnnotations(int group, int delta, int begin, int end, List<Type> globalTypes,

-          Map<Integer, Map<Type, Map<String, Object>>> fa, MatchResult matchResult,

-          RegExpRuleMatch match, RutaStream stream) {

-    CAS cas = stream.getCas();

-    if (begin < end) {

-      for (Type type : globalTypes) {

-        AnnotationFS afs = cas.createAnnotation(type, delta + begin, delta + end);

-        fillFeatures(group, afs, fa, delta, matchResult, stream);

-        match.addMatched(group, afs);

-        stream.addAnnotation(afs, true, true, match);

-      }

-    }

-  }

-

-  private void fillFeatures(int group, AnnotationFS afs,

-          Map<Integer, Map<Type, Map<String, Object>>> fa, int delta, MatchResult matchResult,

-          RutaStream stream) {

-    Type type = afs.getType();

-    JCas jcas = null;

-    CAS cas = stream.getCas();

-    try {

-      jcas = cas.getJCas();

-    } catch (CASException e) {

-    }

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Map<Type, Map<String, Object>> typeMap = fa.get(group);

-    if (typeMap != null) {

-      Map<String, Object> map = typeMap.get(type);

-      if (map != null) {

-        for (Entry<String, Object> eachEntry : map.entrySet()) {

-          String featureName = eachEntry.getKey();

-          Feature feature = type.getFeatureByBaseName(featureName);

-          if (feature != null) {

-            Object argExpr = eachEntry.getValue();

-            Type range = feature.getRange();

-            if (argExpr instanceof INumberExpression) {

-              INumberExpression ne = (INumberExpression) argExpr;

-              int cg = ne.getIntegerValue(getParent(), afs, stream);

-              if (range.getName().equals(UIMAConstants.TYPE_STRING)) {

-                String s = matchResult.group(cg);

-                afs.setStringValue(feature, s);

-              } else if (range.getName().equals(UIMAConstants.TYPE_BOOLEAN)) {

-              } else if (range.getName().equals(UIMAConstants.TYPE_BYTE)) {

-              } else if (range.getName().equals(UIMAConstants.TYPE_DOUBLE)) {

-              } else if (range.getName().equals(UIMAConstants.TYPE_FLOAT)) {

-              } else if (range.getName().equals(UIMAConstants.TYPE_INTEGER)) {

-              } else if (range.getName().equals(UIMAConstants.TYPE_LONG)) {

-              } else if (range.getName().equals(UIMAConstants.TYPE_SHORT)) {

-              } else {

-                if (typeSystem.subsumes(jcas.getCasType(FSArray.type), range)) {

-                  // TODO add functionality for fsarrays

-                  // AnnotationFS a = null;

-                  // List<AnnotationFS> annotations = new ArrayList<AnnotationFS>(1);

-                  // annotations.add(a);

-                  // afs.setFeatureValue(feature, UIMAUtils.toFSArray(jcas, annotations));

-                } else {

-                  int begin = delta + matchResult.start(cg);

-                  int end = delta + matchResult.end(cg);

-                  if (begin < end) {

-                    AnnotationFS a = cas.createAnnotation(range, begin, end);

-                    afs.setFeatureValue(feature, a);

-                  }

-                }

-              }

-            } else {

-              if (argExpr instanceof TypeExpression

-                      && range.getName().equals(UIMAConstants.TYPE_STRING)) {

-                TypeExpression typeExpr = (TypeExpression) argExpr;

-                List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(afs,

-                        typeExpr.getType(getParent()));

-                if (annotationsInWindow != null && !annotationsInWindow.isEmpty()) {

-                  AnnotationFS annotation = annotationsInWindow.get(0);

-                  afs.setStringValue(feature, annotation.getCoveredText());

-                }

-              } else if (argExpr instanceof AbstractStringExpression

-                      && range.getName().equals(UIMAConstants.TYPE_STRING)) {

-                afs.setStringValue(feature,

-                        ((AbstractStringExpression) argExpr).getStringValue(getParent(), afs, stream));

-                // numbers are reserved for capturing groups

-                //

-                // } else if (argExpr instanceof NumberExpression) {

-                // if (range.getName().equals(UIMAConstants.TYPE_INTEGER)) {

-                // afs.setIntValue(feature,

-                // ((NumberExpression) argExpr).getIntegerValue(getParent()));

-                // } else if (range.getName().equals(UIMAConstants.TYPE_DOUBLE)) {

-                // afs.setDoubleValue(feature,

-                // ((NumberExpression) argExpr).getDoubleValue(getParent()));

-                // } else if (range.getName().equals(UIMAConstants.TYPE_FLOAT)) {

-                // afs.setFloatValue(feature,

-                // ((NumberExpression) argExpr).getFloatValue(getParent()));

-                // } else if (range.getName().equals(UIMAConstants.TYPE_BYTE)) {

-                // afs.setByteValue(feature,

-                // (byte) ((NumberExpression) argExpr).getIntegerValue(getParent()));

-                // } else if (range.getName().equals(UIMAConstants.TYPE_SHORT)) {

-                // afs.setShortValue(feature,

-                // (short) ((NumberExpression) argExpr).getIntegerValue(getParent()));

-                // } else if (range.getName().equals(UIMAConstants.TYPE_LONG)) {

-                // afs.setLongValue(feature,

-                // (long) ((NumberExpression) argExpr).getIntegerValue(getParent()));

-                // }

-              } else if (argExpr instanceof IBooleanExpression

-                      && range.getName().equals(UIMAConstants.TYPE_BOOLEAN)) {

-                afs.setBooleanValue(feature,

-                        ((IBooleanExpression) argExpr).getBooleanValue(getParent(), null, stream));

-              } else if (argExpr instanceof TypeExpression) {

-                TypeExpression typeExpr = (TypeExpression) argExpr;

-                List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(afs,

-                        typeExpr.getType(getParent()));

-                if (typeSystem.subsumes(jcas.getCasType(FSArray.type), range)) {

-                  afs.setFeatureValue(feature, UIMAUtils.toFSArray(jcas, annotationsInWindow));

-                } else if (typeSystem.subsumes(range, typeExpr.getType(getParent()))

-                        && !annotationsInWindow.isEmpty()) {

-                  AnnotationFS annotation = annotationsInWindow.get(0);

-                  afs.setFeatureValue(feature, annotation);

-                }

-              }

-            }

-          }

-        }

-      }

-    }

-  }

-

-  @Override

-  public RutaEnvironment getEnvironment() {

-    return getParent().getEnvironment();

-  }

-

-  public Map<TypeExpression, INumberExpression> getTypeMap() {

-    return typeMap;

-  }

-

-  public void setTypeMap(Map<TypeExpression, INumberExpression> typeMap) {

-    this.typeMap = typeMap;

-  }

-

-  public IStringExpression getRegExp() {

-    return regexpExpr;

-  }

-

-  public void setRegExp(IStringExpression regexp) {

-    this.regexpExpr = regexp;

-  }

-

-  public void setFeatureAssignments(Map<TypeExpression, Map<IStringExpression, IRutaExpression>> fa) {

-    this.featureAssignments = fa;

-  }

-

-  public Map<TypeExpression, Map<IStringExpression, IRutaExpression>> getFeatureAssignments() {

-    return featureAssignments;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RegExpRuleMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RegExpRuleMatch.java
deleted file mode 100644
index 7a5eb81..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RegExpRuleMatch.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.LinkedList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.text.AnnotationFS;

-

-public class RegExpRuleMatch extends AbstractRuleMatch<RegExpRule> {

-

-  private Map<Integer, List<AnnotationFS>> map = new TreeMap<Integer, List<AnnotationFS>>();

-

-  public RegExpRuleMatch(RegExpRule rule) {

-    super(rule);

-  }

-

-  @Override

-  public List<AnnotationFS> getMatchedAnnotationsOfRoot() {

-    return map.get(0);

-  }

-

-  public void addMatched(int group, AnnotationFS afs) {

-    List<AnnotationFS> list = map.get(group);

-    if (list == null) {

-      list = new LinkedList<AnnotationFS>();

-      map.put(group, list);

-    }

-    list.add(afs);

-  }

-

-  public Map<Integer, List<AnnotationFS>> getMap() {

-    return map;

-  }

-

-  public void setMap(Map<Integer, List<AnnotationFS>> map) {

-    this.map = map;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleApply.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleApply.java
deleted file mode 100644
index 919c553..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleApply.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.ScriptApply;

-

-public class RuleApply extends ScriptApply {

-

-  private List<AbstractRuleMatch<? extends AbstractRule>> list;

-

-  protected int tried = 0;

-

-  protected int applied = 0;

-

-  private boolean acceptMatches;

-

-  public RuleApply(RutaStatement tme, boolean remember) {

-    super(tme);

-    list = new ArrayList<AbstractRuleMatch<? extends AbstractRule>>();

-    this.acceptMatches = remember;

-  }

-

-  public List<AbstractRuleMatch<? extends AbstractRule>> getList() {

-    return list;

-  }

-

-  public void add(AbstractRuleMatch<? extends AbstractRule> match) {

-    if (match.matchedCompletely()) {

-      applied++;

-    }

-    tried++;

-    if (acceptMatches) {

-      list.add(match);

-    }

-  }

-

-  public int getTried() {

-    return tried;

-  }

-

-  public int getApplied() {

-    return applied;

-  }

-

-  public boolean isAcceptMatches() {

-    return acceptMatches;

-  }

-

-  public void setAcceptMatches(boolean acceptMatches) {

-    this.acceptMatches = acceptMatches;

-  }

-

-  public void addAll(List<RuleMatch> matches) {

-    for (RuleMatch ruleMatch : matches) {

-      add(ruleMatch);

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElement.java
deleted file mode 100644
index f42d09d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElement.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.rule.quantifier.RuleElementQuantifier;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public interface RuleElement {

-

-  void apply(RuleMatch match, RutaStream stream, InferenceCrowd crowd);

-

-  List<RuleMatch> startMatch(RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd);

-

-  List<RuleMatch> continueMatch(boolean after, AnnotationFS annotation, RuleMatch ruleMatch,

-          RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd);

-

-  List<RuleMatch> continueOwnMatch(boolean after, AnnotationFS annotation, RuleMatch ruleMatch,

-          RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd);

-

-  List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, RutaBlock parent,

-          RutaStream stream);

-

-  Collection<AnnotationFS> getAnchors(RutaStream symbolStream);

-

-  RutaBlock getParent();

-

-  RutaRule getRule();

-

-  RuleElementContainer getContainer();

-

-  void setContainer(RuleElementContainer container);

-

-  RuleElementQuantifier getQuantifier();

-

-  long estimateAnchors(RutaStream stream);

-

-  List<Integer> getSelfIndexList();

-

-  List<AbstractRutaCondition> getConditions();

-

-  List<AbstractRutaAction> getActions();

-

-  boolean hasAncestor(boolean after);

-

-  void setStartAnchor(boolean start);

-

-  boolean isStartAnchor();

-

-  void setInlinedRules(List<RutaStatement> innerRules);

-

-  void setInlineMode(boolean block);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementCaretaker.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementCaretaker.java
deleted file mode 100644
index cb7cd53..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementCaretaker.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RuleElementCaretaker implements RuleElementContainer {

-

-  private final RuleElementContainer container;

-

-  public RuleElementCaretaker(RuleElementContainer container) {

-    super();

-    this.container = container;

-  }

-

-  public RuleElement getElementAfter(RuleElement element) {

-    int indexOf = container.getRuleElements().indexOf(element);

-    if (indexOf < container.getRuleElements().size() - 1) {

-      RuleElement ruleElement = container.getRuleElements().get(indexOf + 1);

-      return ruleElement;

-    }

-    return null;

-  }

-

-  public RuleElement getElementBefore(RuleElement element) {

-    int indexOf = container.getRuleElements().indexOf(element);

-    if (indexOf > 0) {

-      RuleElement ruleElement = container.getRuleElements().get(indexOf - 1);

-      return ruleElement;

-    } else if(indexOf == -1) {

-      return container.getRuleElements().get(container.getRuleElements().size() - 1);

-    }

-    return null;

-  }

-

-  public List<RuleElement> getRuleElements() {

-    return container.getRuleElements();

-  }

-

-  public RuleElement getAnchoringRuleElement(RutaStream stream) {

-    List<RuleElement> ruleElements = container.getRuleElements();

-    if (ruleElements.size() == 1 

-            //|| containsLiteralMatcher(ruleElements)

-            ) {

-      return ruleElements.get(0);

-    }

-    for (RuleElement ruleElement : ruleElements) {

-      if (ruleElement.isStartAnchor()) {

-        return ruleElement;

-      }

-    }

-

-    if (stream.isDynamicAnchoring()) {

-      long min = Long.MAX_VALUE;

-      RuleElement minElement = null;

-      int i = 1;

-      for (RuleElement each : ruleElements) {

-        long estimate = each.estimateAnchors(stream);

-        if(estimate == 0) {

-          return each;

-        }

-        double factor = stream.getIndexPenalty();

-        if(factor != 0) {

-          estimate = (long) (Math.log(estimate) * (i * factor));

-        }

-        if (estimate < min) {

-          min = estimate;

-          minElement = each;

-        }

-        i++;

-      }

-      return minElement;

-    }

-    return ruleElements.get(0);

-

-  }

-

-

-  public RuleElement getFirstElement() {

-    List<RuleElement> ruleElements = container.getRuleElements();

-    return ruleElements.get(0);

-  }

-

-  public RuleElement getLastElement() {

-    List<RuleElement> ruleElements = container.getRuleElements();

-    return ruleElements.get(ruleElements.size() - 1);

-  }

-

-  public void applyRuleElements(RuleMatch ruleMatch, RutaStream stream, InferenceCrowd crowd) {

-    for (RuleElement eachElement : getRuleElements()) {

-      eachElement.apply(ruleMatch, stream, crowd);

-    }

-  }

-

-  public RutaRule getRule() {

-    return container.getRule();

-  }

-

-  public RuleElement getNextElement(boolean after, RuleElement ruleElement) {

-    if (after) {

-      return getElementAfter(ruleElement);

-    } else {

-      return getElementBefore(ruleElement);

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementComparator.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementComparator.java
deleted file mode 100644
index 205adc9..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementComparator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.Comparator;

-import java.util.List;

-

-public class RuleElementComparator implements Comparator<RuleElement> {

-  private final RuleElementContainer container;

-

-  public RuleElementComparator(RuleElementContainer container) {

-    this.container = container;

-  }

-

-  public int compare(RuleElement re1, RuleElement re2) {

-    List<RuleElement> elements = container.getRuleElements();

-    int i1 = elements.indexOf(re1);

-    int i2 = elements.indexOf(re2);

-    if (i1 == i2)

-      return 0;

-    return i1 < i2 ? -1 : 1;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementContainer.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementContainer.java
deleted file mode 100644
index d463597..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementContainer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public interface RuleElementContainer {

-

-  List<RuleElement> getRuleElements();

-

-  // RuleElement getElementAfter(RuleElement element);

-  //

-  // RuleElement getElementBefore(RuleElement element);

-

-  RuleElement getFirstElement();

-

-  RuleElement getLastElement();

-

-  RuleElement getAnchoringRuleElement(RutaStream stream);

-

-  void applyRuleElements(RuleMatch ruleMatch, RutaStream stream, InferenceCrowd crowd);

-

-  RutaRule getRule();

-

-  RuleElement getNextElement(boolean after, RuleElement ruleElement);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementIsolator.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementIsolator.java
deleted file mode 100644
index f79e05b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementIsolator.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RuleElementIsolator implements RuleElementContainer {

-

-  private RuleElementContainer container;

-

-  public RuleElementIsolator() {

-    super();

-  }

-

-  public RuleElementIsolator(RuleElementContainer container) {

-    super();

-    this.container = container;

-  }

-

-  public List<RuleElement> getRuleElements() {

-    return container.getRuleElements();

-  }

-

-  public RuleElement getAnchoringRuleElement(RutaStream stream) {

-    return getRuleElement();

-  }

-

-  public RuleElement getFirstElement() {

-    return getRuleElement();

-  }

-

-  public RuleElement getLastElement() {

-    return getRuleElement();

-  }

-

-  public void applyRuleElements(RuleMatch ruleMatch, RutaStream stream, InferenceCrowd crowd) {

-    getRuleElement().apply(ruleMatch, stream, crowd);

-  }

-

-  public RuleElementContainer getContainer() {

-    return container;

-  }

-

-  public void setContainer(RutaRule container) {

-    this.container = container.getRoot();

-  }

-

-  private RuleElement getRuleElement() {

-    return container.getRuleElements().get(0);

-  }

-

-  public RutaRule getRule() {

-    return container.getRule();

-  }

-

-  public RuleElement getNextElement(boolean after, RuleElement ruleElement) {

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementMatch.java
deleted file mode 100644
index 11aad08..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleElementMatch.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaStream;

-

-public class RuleElementMatch {

-

-  protected final RuleElement ruleElement;

-

-  protected List<AnnotationFS> textsMatched;

-

-  protected boolean conditionsMatched = true;

-

-  protected boolean baseConditionMatched = true;

-

-  private boolean inlinedRulesMatched = true;

-  

-  protected List<EvaluatedCondition> conditions;

-

-  protected ComposedRuleElementMatch containerMatch;

-

-  private boolean ruleAnchor = false;

-

-  public RuleElementMatch(RuleElement ruleElement, ComposedRuleElementMatch containerMatch) {

-    super();

-    this.ruleElement = ruleElement;

-    this.containerMatch = containerMatch;

-    textsMatched = new ArrayList<AnnotationFS>();

-  }

-

-  public void setMatchInfo(boolean baseCondition, List<AnnotationFS> texts,

-          List<EvaluatedCondition> conditionList, RutaStream stream) {

-    baseConditionMatched = baseCondition;

-    textsMatched = texts;

-    conditions = conditionList;

-    conditionsMatched = baseConditionMatched;

-    if (baseConditionMatched) {

-      for (EvaluatedCondition each : conditions) {

-        conditionsMatched = conditionsMatched && each.isValue();

-      }

-    }

-    if (containerMatch != null) {

-      containerMatch.addInnerMatch(ruleElement, this, stream);

-    }

-  }

-

-  public boolean matched() {

-    return baseConditionMatched && conditionsMatched && inlinedRulesMatched;

-  }

-

-  public RuleElement getRuleElement() {

-    return ruleElement;

-  }

-

-  public List<AnnotationFS> getTextsMatched() {

-    return textsMatched;

-  }

-

-  public void setTextsMatched(List<AnnotationFS> textsMatched) {

-    this.textsMatched = textsMatched;

-  }

-

-  public List<EvaluatedCondition> getConditions() {

-    return conditions;

-  }

-

-  public void setConditions(List<EvaluatedCondition> conditions) {

-    this.conditions = conditions;

-  }

-

-  public void setConditionsMatched(boolean conditionsMatched) {

-    this.conditionsMatched = conditionsMatched;

-  }

-

-  public void setBaseConditionMatched(boolean baseConditionMatched) {

-    this.baseConditionMatched = baseConditionMatched;

-  }

-

-  public void setContainerMatch(ComposedRuleElementMatch containerMatch) {

-    this.containerMatch = containerMatch;

-  }

-

-  @Override

-  public String toString() {

-    StringBuilder sb = new StringBuilder();

-    sb.append(matched() + " : ");

-    for (AnnotationFS each : textsMatched) {

-      sb.append(each.getCoveredText());

-    }

-    String string = sb.toString();

-    if (string.length() > 20) {

-      string = string.substring(0, 20) + "...";

-    }

-    return string;

-  }

-

-  public boolean isBaseConditionMatched() {

-    return baseConditionMatched;

-  }

-

-  public ComposedRuleElementMatch getContainerMatch() {

-    return containerMatch;

-  }

-

-  public RuleElementMatch copy() {

-    RuleElementMatch copy = new RuleElementMatch(ruleElement, containerMatch);

-    copy.setBaseConditionMatched(baseConditionMatched);

-    copy.setConditions(conditions);

-    copy.setConditionsMatched(conditionsMatched);

-    copy.setTextsMatched(textsMatched);

-    copy.setRuleAnchor(ruleAnchor);

-    return copy;

-  }

-

-  public boolean isRuleAnchor() {

-    return ruleAnchor;

-  }

-

-  public void setRuleAnchor(boolean ruleAnchor) {

-    this.ruleAnchor = ruleAnchor;

-  }

-

-  public boolean isInlinedRulesMatched() {

-    return inlinedRulesMatched;

-  }

-

-  public void setInlinedRulesMatched(boolean inlinedRulesMatched) {

-    this.inlinedRulesMatched = inlinedRulesMatched;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleMatch.java
deleted file mode 100644
index 2829e66..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleMatch.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Comparator;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.engine.RutaEngine;

-

-public class RuleMatch extends AbstractRuleMatch<RutaRule> {

-

-  private static class RuleMatchComparator implements Comparator<RuleElementMatch> {

-

-    public int compare(RuleElementMatch rem1, RuleElementMatch rem2) {

-      AnnotationFS fs1 = rem1.getTextsMatched().get(0);

-      AnnotationFS fs2 = rem2.getTextsMatched().get(0);

-

-      return fs1.getBegin() < fs2.getBegin() ? -1 : 1;

-    }

-  }

-

-  private boolean applied = false;

-

-  private Map<RutaElement, ScriptApply> delegateApply;

-

-  // private Map<RuleElement, List<RuleElementMatch>> map;

-

-  private ComposedRuleElementMatch rootMatch;

-

-  public RuleMatch(RutaRule rule) {

-    super(rule);

-    delegateApply = new HashMap<RutaElement, ScriptApply>(0);

-  }

-

-  public boolean matchedCompletely() {

-    return matched && rootMatch.matched();

-  }

-

-  public List<AnnotationFS> getMatchedAnnotationsOf(RuleElement element) {

-    return getMatchedAnnotations(element.getSelfIndexList(), element.getContainer());

-  }

-

-  public AnnotationFS getLastMatchedAnnotation(RuleElement element, boolean direction,

-          AnnotationFS annotation, RutaBlock parent, RutaStream stream) {

-    List<AnnotationFS> matchedAnnotations = getMatchedAnnotationsOf(element);

-    if (matchedAnnotations.isEmpty()) {

-      if (element.getQuantifier().isOptional(parent, stream)) {

-        return annotation;

-      } else {

-        return null;

-      }

-    }

-    if (direction) {

-      return matchedAnnotations.get(matchedAnnotations.size() - 1);

-    } else {

-      return matchedAnnotations.get(0);

-    }

-  }

-

-  @Override

-  public List<AnnotationFS> getMatchedAnnotationsOfRoot() {

-    return getMatchedAnnotationsOf(((RutaRule) getRule()).getRoot());

-  }

-

-  public List<AnnotationFS> getMatchedAnnotations(List<Integer> indexes,

-          RuleElementContainer container) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    indexes = extendIndexes(indexes);

-    if (container == null) {

-      container = ((RutaRule) rule).getRoot();

-    }

-

-    // TODO refactor this!

-    if (indexes == null) {

-      List<RuleElement> ruleElements = container.getRuleElements();

-      indexes = new ArrayList<Integer>();

-      for (RuleElement ruleElement : ruleElements) {

-        indexes.add(ruleElements.indexOf(ruleElement) + 1);

-      }

-    }

-    // TODO refactor this

-    // this method should not be called by elements that need the actual annotation, e.g, for

-    // accessing theirs features.

-    // this is a hotfix for that case...

-    if (indexes.size() == 1) {

-      RuleElement ruleElement = container.getRuleElements().get(indexes.get(0) - 1);

-      List<List<RuleElementMatch>> matchInfo = getMatchInfo(ruleElement);

-      if (matchInfo.size() == 1) {

-        List<RuleElementMatch> list = matchInfo.get(0);

-        if (list != null && list.size() == 1) {

-          List<AnnotationFS> textsMatched = list.get(0).getTextsMatched();

-          if (textsMatched.size() == 1) {

-            AnnotationFS firstNormal = getFirstNormal(textsMatched);

-            if (firstNormal != null) {

-              return textsMatched;

-            }

-          }

-        }

-      }

-    }

-

-    List<List<List<RuleElementMatch>>> reverseList = new ArrayList<List<List<RuleElementMatch>>>();

-    for (Integer index : indexes) {

-      if (index > container.getRuleElements().size()) {

-        continue;

-      }

-      RuleElement ruleElement = container.getRuleElements().get(index - 1);

-      List<List<RuleElementMatch>> matchInfo = getMatchInfo(ruleElement);

-      int i = 0;

-      for (List<RuleElementMatch> list : matchInfo) {

-        if (reverseList.size() <= i) {

-          reverseList.add(new ArrayList<List<RuleElementMatch>>());

-        }

-        List<List<RuleElementMatch>> l = reverseList.get(i);

-        l.add(list);

-        i++;

-      }

-    }

-    CAS cas = null;

-    for (List<List<RuleElementMatch>> list : reverseList) {

-      int begin = Integer.MAX_VALUE;

-      int end = 0;

-      for (List<RuleElementMatch> list2 : list) {

-        if (list2 != null) {

-          for (RuleElementMatch ruleElementMatch : list2) {

-            List<AnnotationFS> textsMatched = ruleElementMatch.getTextsMatched();

-            if (textsMatched != null && !textsMatched.isEmpty()) {

-              AnnotationFS first = getFirstNormal(textsMatched);

-              if (first != null) {

-                begin = Math.min(first.getBegin(), begin);

-              }

-              AnnotationFS last = getLastNormal(textsMatched);

-              if (last != null) {

-                end = Math.max(last.getEnd(), end);

-              }

-              if (cas == null && first != null) {

-                cas = first.getCAS();

-              }

-            }

-          }

-        }

-      }

-      if (cas != null && end != 0) {

-        AnnotationFS annotation = cas.createAnnotation(cas.getAnnotationType(), begin, end);

-        result.add(annotation);

-      }

-    }

-    return result;

-  }

-

-  private AnnotationFS getFirstNormal(List<AnnotationFS> textsMatched) {

-    // hotfix for invisible dummy matches

-    int pointer = 0;

-    AnnotationFS annotationFS = null;

-

-    if (textsMatched.size() == 0) {

-      return null;

-    } else if (textsMatched.size() == 1) {

-      AnnotationFS fs = textsMatched.get(0);

-      if (fs.getType().getName().equals(RutaEngine.OPTIONAL_TYPE)) {

-        return null;

-      }

-    }

-

-    while (pointer < textsMatched.size() && (annotationFS = textsMatched.get(pointer)) != null

-            && annotationFS.getType().getName().equals(RutaEngine.OPTIONAL_TYPE)) {

-      pointer++;

-    }

-    if (pointer < textsMatched.size()) {

-      return annotationFS;

-    }

-    return null;

-  }

-

-  private AnnotationFS getLastNormal(List<AnnotationFS> textsMatched) {

-    // hotfix for invisible dummy matches

-    int pointer = textsMatched.size() - 1;

-    AnnotationFS annotationFS = null;

-    while (pointer >= 0 && (annotationFS = textsMatched.get(pointer)) != null

-            && annotationFS.getType().getName().equals(RutaEngine.OPTIONAL_TYPE)) {

-      pointer--;

-    }

-    if (pointer >= 0) {

-      return annotationFS;

-    }

-    return null;

-  }

-

-  public static List<Integer> extendIndexes(List<Integer> indexes) {

-    if (indexes == null || indexes.size() <= 1) {

-      return indexes;

-    }

-    List<Integer> result = new ArrayList<Integer>();

-    int pointer = indexes.get(0);

-    for (Integer each : indexes) {

-      while (pointer < each - 1) {

-        pointer++;

-        result.add(pointer);

-      }

-      result.add(each);

-      pointer = each;

-    }

-    return result;

-  }

-

-  @Override

-  public String toString() {

-    StringBuilder result = new StringBuilder();

-    result.append((matched ? "Matched : " : "Not Matched :"));

-    result.append(getRootMatch());

-    return result.toString();

-  }

-

-  public Map<RutaElement, ScriptApply> getDelegateApply() {

-    return delegateApply;

-  }

-

-  public void addDelegateApply(RutaElement element, ScriptApply scriptApply) {

-    delegateApply.put(element, scriptApply);

-  }

-

-  public void setMatched(boolean matched) {

-    this.matched = matched;

-  }

-

-  public RuleMatch copy(ComposedRuleElementMatch extendedContainerMatch, boolean after) {

-    RuleMatch copy = new RuleMatch(rule);

-    copy.setMatched(matched);

-    if (extendedContainerMatch.getContainerMatch() == null) {

-      copy.setRootMatch(extendedContainerMatch);

-    } else {

-      copy.setRootMatch(rootMatch.copy2(extendedContainerMatch, after));

-    }

-

-    Map<RutaElement, ScriptApply> newDelegateApply = new HashMap<RutaElement, ScriptApply>(

-            delegateApply);

-    copy.setDelegateApply(newDelegateApply);

-    return copy;

-  }

-

-  public RuleMatch copy() {

-    RuleMatch copy = new RuleMatch(rule);

-    copy.setMatched(matched);

-    copy.setRootMatch(rootMatch.copy());

-    Map<RutaElement, ScriptApply> newDelegateApply = new HashMap<RutaElement, ScriptApply>(

-            delegateApply);

-    copy.setDelegateApply(newDelegateApply);

-    return copy;

-  }

-

-  public void update(ComposedRuleElementMatch extendedContainerMatch) {

-    if (extendedContainerMatch.getContainerMatch() == null) {

-      setRootMatch(extendedContainerMatch);

-    } else {

-      rootMatch.update(extendedContainerMatch);

-    }

-  }

-

-  public void setDelegateApply(Map<RutaElement, ScriptApply> delegateApply) {

-    this.delegateApply = delegateApply;

-  }

-

-  public boolean isApplied() {

-    return applied;

-  }

-

-  public void setApplied(boolean applied) {

-    this.applied = applied;

-  }

-

-  public ComposedRuleElementMatch getRootMatch() {

-    return rootMatch;

-  }

-

-  public void setRootMatch(ComposedRuleElementMatch rootMatch) {

-    this.rootMatch = rootMatch;

-  }

-

-  public List<List<RuleElementMatch>> getMatchInfo(RuleElement element) {

-    return getMatchInfo(rootMatch, element);

-  }

-

-  public List<List<RuleElementMatch>> getMatchInfo(RuleElementMatch rootMatch, RuleElement element) {

-    List<List<RuleElementMatch>> result = new ArrayList<List<RuleElementMatch>>();

-    RuleElement root = rootMatch.getRuleElement();

-    if (element.equals(root)) {

-      List<RuleElementMatch> list = new ArrayList<RuleElementMatch>(1);

-      list.add(rootMatch);

-      result.add(list);

-    } else if (rootMatch instanceof ComposedRuleElementMatch) {

-      ComposedRuleElementMatch crem = (ComposedRuleElementMatch) rootMatch;

-      Set<Entry<RuleElement, List<RuleElementMatch>>> entrySet = crem.getInnerMatches().entrySet();

-      for (Entry<RuleElement, List<RuleElementMatch>> entry : entrySet) {

-        List<RuleElementMatch> value = entry.getValue();

-        if (element.equals(entry.getKey())) {

-          result.add(value);

-        } else {

-          if (value != null) {

-            for (RuleElementMatch eachMatch : value) {

-              result.addAll(getMatchInfo(eachMatch, element));

-            }

-          }

-        }

-      }

-    }

-    return result;

-  }

-

-  public RuleElementMatch getLastMatch(RuleElement ruleElement, boolean direction) {

-    List<List<RuleElementMatch>> matchInfo = getMatchInfo(ruleElement);

-    if (matchInfo == null || matchInfo.isEmpty()) {

-      return null;

-    }

-    if (direction) {

-      List<RuleElementMatch> list = matchInfo.get(matchInfo.size() - 1);

-      if (list != null && !list.isEmpty()) {

-        return list.get(list.size() - 1);

-      }

-    } else {

-      List<RuleElementMatch> list = matchInfo.get(0);

-      if (list != null && !list.isEmpty()) {

-        return list.get(0);

-      }

-    }

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleMatchComparator.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleMatchComparator.java
deleted file mode 100644
index 7359720..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RuleMatchComparator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.Comparator;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-

-/**

- * Comparator for rule matches following mostly the default order.

- * 

- */

-public class RuleMatchComparator implements Comparator<RuleMatch> {

-

-  public RuleMatchComparator() {

-    super();

-  }

-

-  public int compare(RuleMatch m1, RuleMatch m2) {

-    List<AnnotationFS> tm1 = m1.getRootMatch().getTextsMatched();

-    List<AnnotationFS> tm2 = m2.getRootMatch().getTextsMatched();

-    int b1 = 0;

-    int b2 = 0;

-    int e1 = 0;

-    int e2 = 0;

-    if (tm1 != null && !tm1.isEmpty()) {

-      b1 = tm1.get(0).getBegin();

-      e1 = tm1.get(tm1.size() - 1).getEnd();

-    }

-    if (tm2 != null && !tm2.isEmpty()) {

-      b2 = tm2.get(0).getBegin();

-      e2 = tm2.get(tm2.size() - 1).getEnd();

-    }

-    if (b1 < b2) {

-      return -1;

-    } else if (b1 > b2) {

-      return 1;

-    } else if (e1 > e2) {

-      return -1;

-    } else if (e1 < e2) {

-      return 1;

-    } else {

-      return 0;

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaLiteralMatcher.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaLiteralMatcher.java
deleted file mode 100644
index 662a56d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaLiteralMatcher.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.type.RutaBasic;

-

-public class RutaLiteralMatcher implements RutaMatcher {

-

-  private final IStringExpression expression;

-

-  public RutaLiteralMatcher(IStringExpression expression) {

-    super();

-    this.expression = expression;

-  }

-

-  public List<AnnotationFS> getMatchingAnnotations(RutaStream stream, RutaBlock parent) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    AnnotationFS windowAnnotation = stream.getDocumentAnnotation();

-    List<RutaBasic> list = stream.getBasicsInWindow(windowAnnotation);

-    for (RutaBasic each : list) {

-      if (each.getCoveredText().equals(expression.getStringValue(parent, null, stream))) {

-        result.add(each);

-      }

-    }

-    return result;

-  }

-

-  public boolean match(AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    if (annotation == null) {

-      return false;

-    }

-    return annotation.getCoveredText().equals(expression.getStringValue(parent, null, stream));

-  }

-

-  @Override

-  public String toString() {

-    return "\"" + expression.toString() + "\"";

-  }

-

-  public IStringExpression getExpression() {

-    return expression;

-  }

-

-  public long estimateAnchors(RutaBlock parent, RutaStream stream) {

-    return Integer.MAX_VALUE;

-  }

-

-  public Collection<AnnotationFS> getAnnotationsAfter(RutaRuleElement ruleElement,

-          AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    return getNextAnnotations(false, annotation, stream, parent);

-  }

-

-  public Collection<AnnotationFS> getAnnotationsBefore(RutaRuleElement ruleElement,

-          AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    return getNextAnnotations(true, annotation, stream, parent);

-  }

-

-  private Collection<AnnotationFS> getNextAnnotations(boolean before, AnnotationFS annotation,

-          RutaStream stream, RutaBlock parent) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>(1);

-    RutaBasic basicNextTo = stream.getBasicNextTo(before, annotation);

-    if (basicNextTo == null) {

-      return result;

-    }

-    String stringValue = expression.getStringValue(parent, annotation, stream);

-    if (stringValue.equals(basicNextTo.getCoveredText())) {

-      result.add(basicNextTo);

-    }

-    return result;

-  }

-

-  public List<Type> getTypes(RutaBlock parent, RutaStream stream) {

-    return new ArrayList<Type>();

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaMatcher.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaMatcher.java
deleted file mode 100644
index 22732e4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaMatcher.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.IRutaExpression;

-

-public interface RutaMatcher {

-

-  Collection<AnnotationFS> getMatchingAnnotations(RutaStream stream, RutaBlock parent);

-

-  boolean match(AnnotationFS annotation, RutaStream stream, RutaBlock parent);

-

-  List<Type> getTypes(RutaBlock parent, RutaStream stream);

-

-  IRutaExpression getExpression();

-

-  long estimateAnchors(RutaBlock parent, RutaStream stream);

-

-  Collection<AnnotationFS> getAnnotationsAfter(RutaRuleElement ruleElement,

-          AnnotationFS annotation, RutaStream stream, RutaBlock parent);

-

-  Collection<AnnotationFS> getAnnotationsBefore(RutaRuleElement ruleElement,

-          AnnotationFS annotation, RutaStream stream, RutaBlock parent);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRule.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRule.java
deleted file mode 100644
index c0fddcf..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRule.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.List;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaEnvironment;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RutaRule extends AbstractRule {

-

-  private ComposedRuleElement root;

-

-  public RutaRule(List<RuleElement> elements, RutaBlock parent, int id) {

-    super(parent, id);

-    this.root = new ComposedRuleElement(elements, null, null, null, null, parent);

-  }

-

-  @Override

-  public RuleApply apply(RutaStream stream, InferenceCrowd crowd) {

-    return apply(stream, crowd, stream.isGreedyAnchoring());

-  }

-

-  public RuleApply apply(RutaStream stream, InferenceCrowd crowd, boolean remember) {

-    RuleApply ruleApply = new RuleApply(this, remember);

-    crowd.beginVisit(this, ruleApply);

-    RuleMatch ruleMatch = new RuleMatch(this);

-    root.startMatch(ruleMatch, ruleApply, null, null, stream, crowd);

-    crowd.endVisit(this, ruleApply);

-    return ruleApply;

-  }

-

-  @Override

-  public String toString() {

-    return root == null ? "<empty>": root.toString();

-  }

-

-  public final List<RuleElement> getRuleElements() {

-    return root.getRuleElements();

-  }

-

-  @Override

-  public RutaEnvironment getEnvironment() {

-    return getParent().getEnvironment();

-  }

-

-  public void setRuleElements(List<RuleElement> elements) {

-    if (elements != null && elements.size() == 1

-            && elements.get(0) instanceof ConjunctRulesRuleElement) {

-      root = (ComposedRuleElement) elements.get(0);

-    } else {

-      root.setRuleElements(elements);

-    }

-  }

-

-  public ComposedRuleElement getRoot() {

-    return root;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
deleted file mode 100644
index d0bc372..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.rule.quantifier.RuleElementQuantifier;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class RutaRuleElement extends AbstractRuleElement {

-

-  private RutaMatcher matcher;

-

-  @SuppressWarnings("unchecked")

-  protected final InferenceCrowd emptyCrowd = new InferenceCrowd(Collections.EMPTY_LIST);

-

-  public RutaRuleElement(RutaMatcher matcher, RuleElementQuantifier quantifier,

-          List<AbstractRutaCondition> conditions, List<AbstractRutaAction> actions,

-          RuleElementContainer container, RutaBlock parent) {

-    super(quantifier, conditions, actions, container, parent);

-    this.matcher = matcher;

-  }

-

-  public Collection<AnnotationFS> getAnchors(RutaStream stream) {

-    return matcher.getMatchingAnnotations(stream, getParent());

-  }

-

-  public List<RuleMatch> startMatch(RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    Collection<AnnotationFS> anchors = getAnchors(stream);

-    boolean useAlternatives = anchors.size() != 1;

-    for (AnnotationFS eachAnchor : anchors) {

-      if(earlyExit(eachAnchor, ruleApply, stream)) {

-        // ... for different matching paradigms that avoid some matches

-        continue;

-      }

-      

-      ComposedRuleElementMatch extendedContainerMatch = containerMatch;

-      RuleMatch extendedMatch = ruleMatch;

-      if (useAlternatives) {

-        extendedContainerMatch = containerMatch.copy();

-        extendedMatch = ruleMatch.copy(extendedContainerMatch, true);

-      }

-      doMatch(eachAnchor, extendedMatch, extendedContainerMatch, true, stream, crowd);

-      if (this.equals(entryPoint) && ruleApply == null) {

-        result.add(extendedMatch);

-      } else if (extendedMatch.matched()) {

-        RuleElement after = getContainer().getNextElement(true, this);

-        RuleElement before = getContainer().getNextElement(false, this);

-        RutaRuleElement sideStepOrigin = hasAncestor(false) ? this : null;

-        if (quantifier.continueMatch(true, eachAnchor, this, extendedMatch, extendedContainerMatch,

-                stream, crowd)) {

-          List<RuleMatch> continueOwnMatch = continueOwnMatch(true, eachAnchor, extendedMatch,

-                  ruleApply, extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-          result.addAll(continueOwnMatch);

-        } else {

-          if (after != null) {

-            sideStepOrigin = hasAncestor(false) ? this : null;

-            List<RuleMatch> continueMatch = after.continueMatch(true, eachAnchor, extendedMatch,

-                    ruleApply, extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-            result.addAll(continueMatch);

-          } else if ((stream.isDynamicAnchoring() || isStartAnchor()) && before != null) {

-            sideStepOrigin = hasAncestor(true) ? this : null;

-            List<RuleMatch> continueMatch = before.continueMatch(false, eachAnchor, extendedMatch,

-                    ruleApply, extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-            result.addAll(continueMatch);

-          }

-

-          if (after == null && before == null) {

-            if (getContainer() instanceof ComposedRuleElement) {

-              sideStepOrigin = hasAncestor(false) ? this : null;

-              ComposedRuleElement composed = (ComposedRuleElement) getContainer();

-              List<RuleMatch> fallbackContinue = composed.fallbackContinue(true, false, eachAnchor,

-                      extendedMatch, ruleApply, extendedContainerMatch, sideStepOrigin, entryPoint,

-                      stream, crowd);

-              result.addAll(fallbackContinue);

-            } else if (getContainer() instanceof RuleElementIsolator) {

-              // TODO move and refactor this:

-              doneMatching(extendedMatch, ruleApply, stream, crowd);

-            }

-          }

-        }

-      } else {

-        if (getContainer() instanceof ComposedRuleElement) {

-          ComposedRuleElement composed = (ComposedRuleElement) getContainer();

-          List<RuleMatch> fallbackContinue = composed

-                  .fallbackContinue(true, true, eachAnchor, extendedMatch, ruleApply,

-                          extendedContainerMatch, null, entryPoint, stream, crowd);

-          result.addAll(fallbackContinue);

-        }

-      }

-    }

-    return result;

-  }

-

-  public List<RuleMatch> continueOwnMatch(boolean after, AnnotationFS annotation,

-          RuleMatch ruleMatch, RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    if (quantifier.continueMatch(after, annotation, this, ruleMatch, containerMatch, stream, crowd)) {

-      boolean stopMatching = false;

-      AnnotationFS eachAnchor = annotation;

-      AnnotationFS lastAnchor = annotation;

-      ComposedRuleElementMatch extendedContainerMatch = containerMatch;

-      RuleMatch extendedMatch = ruleMatch;

-      while (!stopMatching) {

-        if (!quantifier.continueMatch(after, eachAnchor, this, extendedMatch,

-                extendedContainerMatch, stream, crowd)) {

-          stopMatching = true;

-          stepbackMatch(after, lastAnchor, extendedMatch, ruleApply, extendedContainerMatch,

-                  sideStepOrigin, stream, crowd, entryPoint);

-          break;

-        }

-        Collection<AnnotationFS> nextAnnotations = getNextAnnotations(after, eachAnchor, stream);

-        if (nextAnnotations.size() == 0) {

-          stopMatching = true;

-          result = stepbackMatch(after, eachAnchor, extendedMatch, ruleApply,

-                  extendedContainerMatch, sideStepOrigin, stream, crowd, entryPoint);

-        } else if (nextAnnotations.size() == 1) {

-          lastAnchor = eachAnchor;

-          eachAnchor = nextAnnotations.iterator().next();

-          doMatch(eachAnchor, extendedMatch, extendedContainerMatch, false, stream, crowd);

-          if (this.equals(entryPoint)) {

-            result.add(extendedMatch);

-          } else if (extendedMatch.matched()) {

-            if (quantifier.continueMatch(after, eachAnchor, this, extendedMatch,

-                    extendedContainerMatch, stream, crowd)) {

-              // continue in while loop

-            } else {

-              stopMatching = true;

-              result = continueMatchSomewhereElse(after, false, eachAnchor, extendedMatch,

-                      ruleApply, extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-            }

-          } else {

-            stopMatching = true;

-            result = stepbackMatch(after, lastAnchor, extendedMatch, ruleApply,

-                    extendedContainerMatch, sideStepOrigin, stream, crowd, entryPoint);

-          }

-        } else {

-          stopMatching = true;

-          result = continueMatch(after, lastAnchor, extendedMatch, ruleApply,

-                  extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-        }

-      }

-    } else {

-      result = stepbackMatch(after, annotation, ruleMatch, ruleApply, containerMatch,

-              sideStepOrigin, stream, crowd, entryPoint);

-    }

-    return result;

-  }

-

-  private List<RuleMatch> continueMatchSomewhereElse(boolean after, boolean failed,

-          AnnotationFS eachAnchor, RuleMatch extendedMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch extendedContainerMatch, RutaRuleElement sideStepOrigin,

-          RuleElement entryPoint, RutaStream stream, InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    RuleElement nextRuleElement = getContainer().getNextElement(after, this);

-    if (nextRuleElement != null) {

-      result = nextRuleElement.continueMatch(after, eachAnchor, extendedMatch, ruleApply,

-              extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-    } else if (getContainer() instanceof ComposedRuleElement) {

-      ComposedRuleElement composed = (ComposedRuleElement) getContainer();

-      result = composed.fallbackContinue(after, failed, eachAnchor, extendedMatch, ruleApply,

-              extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-    }

-    return result;

-  }

-

-  public List<RuleMatch> continueMatch(boolean after, AnnotationFS annotation, RuleMatch ruleMatch,

-          RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    // if() for really lazy quantifiers

-    if (quantifier.continueMatch(after, annotation, this, ruleMatch, containerMatch, stream, crowd)) {

-      Collection<AnnotationFS> nextAnnotations = getNextAnnotations(after, annotation, stream);

-      if (nextAnnotations.isEmpty()) {

-        result = stepbackMatch(after, annotation, ruleMatch, ruleApply, containerMatch,

-                sideStepOrigin, stream, crowd, entryPoint);

-      }

-      boolean useAlternatives = nextAnnotations.size() != 1;

-      for (AnnotationFS eachAnchor : nextAnnotations) {

-        if(earlyExit(eachAnchor, ruleApply, stream)) {

-          // ... for different matching paradigms that avoid some matches

-          continue;

-        }

-        

-        ComposedRuleElementMatch extendedContainerMatch = containerMatch;

-        RuleMatch extendedMatch = ruleMatch;

-        if (useAlternatives) {

-          extendedContainerMatch = containerMatch.copy();

-          extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-        }

-        doMatch(eachAnchor, extendedMatch, extendedContainerMatch, false, stream, crowd);

-

-        if (this.equals(entryPoint) && ruleApply == null) {

-          result.add(extendedMatch);

-        } else if (extendedMatch.matched()) {

-          if (quantifier.continueMatch(after, annotation, this, extendedMatch,

-                  extendedContainerMatch, stream, crowd)) {

-            List<RuleMatch> continueOwnMatch = continueOwnMatch(after, eachAnchor, extendedMatch,

-                    ruleApply, extendedContainerMatch, sideStepOrigin, entryPoint, stream, crowd);

-            result.addAll(continueOwnMatch);

-          } else {

-            List<RuleMatch> continueMatchSomewhereElse = continueMatchSomewhereElse(after, false,

-                    eachAnchor, extendedMatch, ruleApply, extendedContainerMatch, sideStepOrigin,

-                    entryPoint, stream, crowd);

-            result.addAll(continueMatchSomewhereElse);

-          }

-        } else {

-          if (this.equals(entryPoint)) {

-            // hotfix for UIMA-3820

-            result.add(extendedMatch);

-          } else {

-            List<RuleMatch> stepbackMatch = stepbackMatch(after, annotation, ruleMatch, ruleApply,

-                    containerMatch, sideStepOrigin, stream, crowd, entryPoint);

-            result.addAll(stepbackMatch);

-          }

-        }

-      }

-    } else {

-      result = stepbackMatch(after, annotation, ruleMatch, ruleApply, containerMatch,

-              sideStepOrigin, stream, crowd, entryPoint);

-    }

-    return result;

-  }

-

-  private List<RuleMatch> stepbackMatch(boolean after, AnnotationFS annotation,

-          RuleMatch ruleMatch, RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RutaStream stream, InferenceCrowd crowd,

-          RuleElement entryPoint) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    if (this.equals(entryPoint) && ruleApply == null) {

-      result.add(ruleMatch);

-      return result;

-    }

-    List<RuleElementMatch> matchInfo = getMatch(ruleMatch, containerMatch);

-    if (matchInfo == null) {

-      if (quantifier.isOptional(parent, stream)) {

-        result = continueMatchSomewhereElse(after, true, annotation, ruleMatch, ruleApply,

-                containerMatch, sideStepOrigin, entryPoint, stream, crowd);

-      } else if (getContainer() instanceof ComposedRuleElement) {

-        ComposedRuleElement cre = (ComposedRuleElement) getContainer();

-        if (cre.getQuantifier().isOptional(parent, stream)) {

-          result = continueMatchSomewhereElse(after, true, annotation, ruleMatch, ruleApply,

-                  containerMatch, sideStepOrigin, entryPoint, stream, crowd);

-        } else {

-          RuleElementMatch failedMatch = new RuleElementMatch(this, containerMatch);

-          failedMatch.setBaseConditionMatched(false);

-          containerMatch.addInnerMatch(this, failedMatch, stream);

-          ComposedRuleElement composed = (ComposedRuleElement) getContainer();

-          result = composed.fallbackContinue(after, true, annotation, ruleMatch, ruleApply,

-                  containerMatch, sideStepOrigin, entryPoint, stream, crowd);

-        }

-      }

-    } else {

-      List<RuleElementMatch> evaluateMatches = quantifier.evaluateMatches(matchInfo, parent,

-              stream, crowd);

-      // TODO enforce match update?

-      ruleMatch.setMatched(evaluateMatches != null);

-      if (ruleMatch.matched()) {

-        result = continueMatchSomewhereElse(after, false, annotation, ruleMatch, ruleApply,

-                containerMatch, sideStepOrigin, entryPoint, stream, crowd);

-      } else {

-        if (getContainer() instanceof ComposedRuleElement) {

-          ComposedRuleElement composed = (ComposedRuleElement) getContainer();

-          List<RuleMatch> fallbackContinue = composed.fallbackContinue(after, true, annotation,

-                  ruleMatch, ruleApply, containerMatch, sideStepOrigin, entryPoint, stream, crowd);

-          result.addAll(fallbackContinue);

-        } else {

-          // should never happen!

-          doneMatching(ruleMatch, ruleApply, stream, crowd);

-        }

-      }

-    }

-    return result;

-  }

-

-  public List<RuleMatch> continueSideStep(boolean after, RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    boolean newDirection = !after;

-    List<AnnotationFS> matchedAnnotationsOf = ruleMatch.getMatchedAnnotationsOf(this);

-    AnnotationFS annotation = null;

-    if (!matchedAnnotationsOf.isEmpty()) {

-      if (newDirection) {

-        annotation = matchedAnnotationsOf.get(matchedAnnotationsOf.size() - 1);

-      } else {

-        annotation = matchedAnnotationsOf.get(0);

-      }

-      ComposedRuleElementMatch sideStepContainerMatch = containerMatch;

-      if (!containerMatch.getRuleElement().equals(getContainer())) {

-        List<List<RuleElementMatch>> matchInfo = ruleMatch

-                .getMatchInfo((ComposedRuleElement) getContainer());

-        if (newDirection) {

-          List<RuleElementMatch> list = matchInfo.get(matchInfo.size() - 1);

-          sideStepContainerMatch = (ComposedRuleElementMatch) list.get(list.size() - 1);

-        } else {

-          List<RuleElementMatch> list = matchInfo.get(0);

-          sideStepContainerMatch = (ComposedRuleElementMatch) list.get(0);

-        }

-      }

-

-      if (quantifier.continueMatch(newDirection, annotation, this, ruleMatch,

-              sideStepContainerMatch, stream, crowd)) {

-        continueMatch(newDirection, annotation, ruleMatch, ruleApply, sideStepContainerMatch, null,

-                entryPoint, stream, crowd);

-      } else {

-        RuleElement nextRuleElement = getContainer().getNextElement(newDirection, this);

-        if (nextRuleElement != null) {

-          result = nextRuleElement.continueMatch(newDirection, annotation, ruleMatch, ruleApply,

-                  sideStepContainerMatch, null, null, stream, crowd);

-        } else if (getContainer() instanceof ComposedRuleElement) {

-          ComposedRuleElement composed = (ComposedRuleElement) getContainer();

-          result = composed.fallbackContinue(newDirection, false, annotation, ruleMatch, ruleApply,

-                  sideStepContainerMatch, null, entryPoint, stream, crowd);

-        }

-      }

-    }

-    return result;

-  }

-

-  private void doMatch(AnnotationFS annotation, RuleMatch ruleMatch,

-          ComposedRuleElementMatch containerMatch, boolean ruleAnchor, RutaStream stream,

-          InferenceCrowd crowd) {

-    RuleElementMatch result = new RuleElementMatch(this, containerMatch);

-    result.setRuleAnchor(ruleAnchor);

-    List<EvaluatedCondition> evaluatedConditions = new ArrayList<EvaluatedCondition>(

-            conditions.size());

-    // boolean base = matcher.match(annotation, stream, getParent());

-    boolean base = true;

-    if (matcher instanceof RutaTypeMatcher) {

-      RutaTypeMatcher rtm = (RutaTypeMatcher) matcher;

-      MatchReference mr = (MatchReference) rtm.getExpression();

-      FeatureExpression featureExpression = mr.getFeatureExpression(parent);

-      if (featureExpression != null) {

-        base = matcher.match(annotation, stream, getParent());

-      }

-    }

-    List<AnnotationFS> textsMatched = new ArrayList<AnnotationFS>(1);

-    if (base) {

-      for (AbstractRutaCondition condition : conditions) {

-        crowd.beginVisit(condition, null);

-        EvaluatedCondition eval = condition.eval(annotation, this, stream, crowd);

-        crowd.endVisit(condition, null);

-        evaluatedConditions.add(eval);

-      }

-    }

-    if (annotation != null) {

-      textsMatched.add(annotation);

-    }

-    result.setMatchInfo(base, textsMatched, evaluatedConditions, stream);

-    boolean inlinedRulesMatched = matchInnerRules(ruleMatch, stream, crowd);

-    result.setInlinedRulesMatched(inlinedRulesMatched);

-    ruleMatch.setMatched(ruleMatch.matched() && result.matched());

-  }

-

-  @Override

-  public String toString() {

-    String simpleName = getQuantifier().getClass().getSimpleName();

-    return matcher.toString() + " " + (simpleName.equals("NormalQuantifier") ? "" : simpleName)

-    // + (conditions.isEmpty() ? "" : "(" + conditions.toString() + ")" + "\\n")

-    // + (actions.isEmpty() ? "" : "{" + actions.toString() + "}")

-    ;

-  }

-

-  public RutaMatcher getMatcher() {

-    return matcher;

-  }

-

-  public List<AbstractRutaCondition> getConditions() {

-    return conditions;

-  }

-

-  public List<AbstractRutaAction> getActions() {

-    return actions;

-  }

-

-  public RutaBlock getParent() {

-    return parent;

-  }

-

-  public long estimateAnchors(RutaStream stream) {

-    if (quantifier.isOptional(getParent(), stream)) {

-      return matcher.estimateAnchors(parent, stream) + Integer.MAX_VALUE;

-    }

-    return matcher.estimateAnchors(parent, stream);

-  }

-

-  public Collection<AnnotationFS> getNextAnnotations(boolean after, AnnotationFS annotation,

-          RutaStream stream) {

-    if (after) {

-      return matcher.getAnnotationsAfter(this, annotation, stream, getParent());

-    } else {

-      return matcher.getAnnotationsBefore(this, annotation, stream, getParent());

-    }

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaTypeMatcher.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaTypeMatcher.java
deleted file mode 100644
index 528cf05..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaTypeMatcher.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.List;

-import java.util.TreeSet;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.type.RutaBasic;

-

-public class RutaTypeMatcher implements RutaMatcher {

-

-  private static final boolean CHECK_ON_FEATURE = false;

-

-  protected final MatchReference mr;

-

-  protected AnnotationComparator comparator;

-

-  public RutaTypeMatcher(MatchReference mr) {

-    super();

-    this.mr = mr;

-    this.comparator = new AnnotationComparator();

-  }

-

-  public Collection<AnnotationFS> getMatchingAnnotations(RutaStream stream, RutaBlock parent) {

-    // TODO what about the matching direction?

-    Collection<AnnotationFS> annotations = new TreeSet<AnnotationFS>(comparator);

-    List<Type> types = getTypes(parent, stream);

-    for (Type type : types) {

-      if (type == null) {

-        continue;

-      }

-      Type currentDAType = stream.getCas().getDocumentAnnotation().getType();

-      String name = type.getName();

-      RutaBasic firstBasicOfAll = stream.getFirstBasicOfAll();

-      if ("uima.tcas.DocumentAnnotation".equals(name)

-              || "org.apache.uima.ruta.type.Document".equals(name)

-              || currentDAType.equals(type)

-//              || (stream.getDocumentAnnotationType().getName().equals(name) && (firstBasicOfAll != null && firstBasicOfAll

-//                      .beginsWith(type)))

-                      ) {

-        // TODO what about dynamic windowing?

-        annotations.add(stream.getDocumentAnnotation());

-      } else {

-        annotations.addAll(stream.getAnnotations(type));

-      }

-    }

-    FeatureExpression featureExpression = mr.getFeatureExpression(parent);

-    if (featureExpression != null) {

-      return featureExpression.getFeatureAnnotations(annotations, stream, parent, CHECK_ON_FEATURE);

-    } else {

-      return annotations;

-    }

-  }

-

-  public Collection<AnnotationFS> getAnnotationsAfter(RutaRuleElement ruleElement,

-          AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    if(annotation.getEnd() == stream.getDocumentAnnotation().getEnd()) {

-      return Collections.emptyList();

-    }

-    RutaBasic lastBasic = stream.getEndAnchor(annotation.getEnd());

-    int end = 0;

-    if (lastBasic == null) {

-      if (annotation.getEnd() != 0) {

-        return Collections.emptyList();

-      }

-    } else {

-      end = lastBasic.getEnd();

-    }

-    if (annotation.getEnd() > 0) {

-      stream.moveTo(lastBasic);

-      if (stream.isVisible(lastBasic) && stream.isValid() && stream.get().getEnd() == lastBasic.getEnd()) {

-        stream.moveToNext();

-      }

-    } else {

-      stream.moveToFirst();

-    }

-

-    if (stream.isValid()) {

-      RutaBasic nextBasic = (RutaBasic) stream.get();

-      // TODO HOTFIX for annotation of length 0

-      while (stream.isValid() && nextBasic.getBegin() < end) {

-        stream.moveToNext();

-        if (stream.isValid()) {

-          nextBasic = (RutaBasic) stream.get();

-        }

-      }

-      List<Type> reTypes = getTypes(parent, stream);

-      Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(comparator);

-      for (Type eachMatchType : reTypes) {

-        Collection<AnnotationFS> beginAnchors = nextBasic.getBeginAnchors(eachMatchType);

-        if (beginAnchors != null) {

-          for (AnnotationFS afs : beginAnchors) {

-            if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin() && afs.getEnd() <= stream.getDocumentAnnotation().getEnd()) {

-              anchors.add(afs);

-            }

-          }

-        }

-      }

-      FeatureExpression fm = mr.getFeatureExpression(parent);

-      if (fm != null) {

-        return fm.getFeatureAnnotations(anchors, stream, parent, CHECK_ON_FEATURE);

-      } else {

-        return anchors;

-      }

-    }

-    return Collections.emptyList();

-  }

-

-  public Collection<AnnotationFS> getAnnotationsBefore(RutaRuleElement ruleElement,

-          AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    if(annotation.getBegin() == stream.getDocumentAnnotation().getBegin()) {

-      return Collections.emptyList();

-    }

-    RutaBasic firstBasic = stream.getBeginAnchor(annotation.getBegin());

-    if (firstBasic == null) {

-      return Collections.emptyList();

-    }

-    stream.moveTo(firstBasic);

-    if (stream.isVisible(firstBasic)) {

-      stream.moveToPrevious();

-    }

-

-    if (stream.isValid()) {

-      RutaBasic nextBasic = (RutaBasic) stream.get();

-      // TODO HOTFIX for annotation of length 0

-      while (stream.isValid() && nextBasic.getEnd() > firstBasic.getBegin()) {

-        stream.moveToPrevious();

-        if (stream.isValid()) {

-          nextBasic = (RutaBasic) stream.get();

-        }

-      }

-      List<Type> reTypes = getTypes(parent, stream);

-      Collection<AnnotationFS> anchors = new TreeSet<AnnotationFS>(comparator);

-      for (Type eachMatchType : reTypes) {

-        Collection<AnnotationFS> endAnchors = nextBasic.getEndAnchors(eachMatchType);

-        if (endAnchors != null) {

-          for (AnnotationFS afs : endAnchors) {

-            if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()) {

-              anchors.add(afs);

-            }

-          }

-        }

-      }

-      FeatureExpression fm = mr.getFeatureExpression(parent);

-      if (fm != null) {

-        return fm.getFeatureAnnotations(anchors, stream, parent, CHECK_ON_FEATURE);

-      } else {

-        return anchors;

-      }

-    }

-    return Collections.emptyList();

-  }

-

-  public boolean match(AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    if (annotation == null) {

-      return false;

-    }

-    FeatureExpression featureExpression = mr.getFeatureExpression(parent);

-    if (featureExpression == null) {

-      boolean b = checkType(annotation, stream, parent);

-      if (b) {

-        return true;

-      }

-    } else {

-      boolean b = checkFeature(annotation, stream, parent);

-      if (b) {

-        return true;

-      }

-    }

-

-    return false;

-

-  }

-

-  private boolean checkType(AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    List<Type> types = getTypes(parent, stream);

-    for (Type type : types) {

-      String name = type.getName();

-      if ("uima.tcas.DocumentAnnotation".equals(name)

-              || stream.getDocumentAnnotationType().getName().equals(name)) {

-        return true;

-      }

-      boolean b = stream.getJCas().getTypeSystem().subsumes(type, annotation.getType());

-      if (b) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  private boolean checkFeature(AnnotationFS annotation, RutaStream stream, RutaBlock parent) {

-    FeatureExpression fe = mr.getFeatureExpression(parent);

-    Feature feature = fe.getFeature(parent);

-    if (fe instanceof FeatureMatchExpression) {

-      FeatureMatchExpression fme = (FeatureMatchExpression) fe;

-      boolean checkFeatureValue = fme.checkFeatureValue(annotation, stream, parent);

-      if (checkFeatureValue) {

-        return true;

-      }

-    } else {

-      TypeSystem typeSystem = stream.getCas().getTypeSystem();

-      boolean subsumes = typeSystem.subsumes(feature.getRange(), annotation.getType());

-      if (subsumes) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  @Override

-  public String toString() {

-    return mr.toString();

-  }

-

-  public RutaExpression getExpression() {

-    return mr;

-  }

-

-  protected Type getType(TypeExpression expression, RutaBlock parent, RutaStream stream) {

-    Type type = expression.getType(parent);

-    if (type != null && "uima.tcas.DocumentAnnotation".equals(type.getName())) {

-      return stream.getDocumentAnnotationType();

-    }

-    return type;

-  }

-

-  public long estimateAnchors(RutaBlock parent, RutaStream stream) {

-    TypeExpression typeExpression = mr.getTypeExpression(parent);

-    return stream.getHistogram(getType(typeExpression, parent, stream));

-  }

-

-  public List<Type> getTypes(RutaBlock parent, RutaStream stream) {

-    List<Type> result = new ArrayList<Type>(1);

-    TypeExpression typeExpression = mr.getTypeExpression(parent);

-    Type type = getType(typeExpression, parent, stream);

-    result.add(type);

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
deleted file mode 100644
index d1dec07..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
+++ /dev/null
@@ -1,613 +0,0 @@
-/*

- * 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.ruta.rule;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.type.RutaFrame;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class WildCardRuleElement extends AbstractRuleElement {

-

-  public WildCardRuleElement(List<AbstractRutaCondition> conditions,

-          List<AbstractRutaAction> actions, RuleElementContainer container, RutaBlock parent) {

-    super(null, conditions, actions, container, parent);

-  }

-

-  public List<RuleMatch> startMatch(RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    List<RuleMatch> result = continueMatch(true, null, ruleMatch, ruleApply, containerMatch, null,

-            entryPoint, stream, crowd);

-    return result;

-  }

-

-  public List<RuleMatch> continueMatch(boolean after, AnnotationFS annotation, RuleMatch ruleMatch,

-          RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    RuleElement nextElement = null;

-    RuleElement current = this;

-    int nextDepth = -1;

-    while (nextElement == null && current != null && current.getContainer() != null) {

-      nextElement = current.getContainer().getNextElement(after, current);

-      RuleElementContainer container = current.getContainer();

-      if (container instanceof RuleElement) {

-        current = (RuleElement) container;

-        nextDepth++;

-      } else {

-        break;

-      }

-    }

-    if (nextElement == null) {

-      nextDepth = 0;

-    }

-    List<RuleMatch> result = tryWithNextRuleElement(nextElement, after, annotation, ruleMatch,

-            ruleApply, containerMatch, nextDepth, sideStepOrigin, entryPoint, stream, crowd);

-    return result;

-  }

-

-  private List<RuleMatch> tryWithNextRuleElement(RuleElement nextElement, boolean after,

-          AnnotationFS annotation, RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, int nextDepth, RutaRuleElement sideStepOrigin,

-          RuleElement entryPoint, RutaStream stream, InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    // what is the next stuff that should match?

-    if (nextElement == null) {

-      AnnotationFS afs = getCoveredByWildCard(after, annotation, null, stream);

-      doMatch(afs, ruleMatch, containerMatch, annotation == null, stream, crowd);

-      ComposedRuleElement composed = (ComposedRuleElement) getContainer();

-      result = composed.fallbackContinue(after, ruleMatch.matched(), afs, ruleMatch, ruleApply,

-              containerMatch, sideStepOrigin, entryPoint, stream, crowd);

-    } else if (nextElement instanceof RutaRuleElement) {

-      RutaRuleElement re = (RutaRuleElement) nextElement;

-      RutaMatcher matcher = re.getMatcher();

-      if (matcher instanceof RutaTypeMatcher) {

-        result = tryWithNextType(after, annotation, nextElement, null, ruleMatch, ruleApply,

-                containerMatch, nextDepth, sideStepOrigin, entryPoint, stream, crowd);

-      } else if (matcher instanceof RutaLiteralMatcher) {

-        result = tryWithNextLiteral(after, annotation, re, ruleMatch, ruleApply, containerMatch,

-                nextDepth, sideStepOrigin, stream, crowd);

-      }

-

-    } else if (nextElement instanceof ComposedRuleElement) {

-      ComposedRuleElement cre = ((ComposedRuleElement) nextElement);

-      result = tryWithNextComposed(after, annotation, cre, ruleMatch, ruleApply, containerMatch,

-              nextDepth, sideStepOrigin, stream, crowd);

-    } else if (nextElement instanceof WildCardRuleElement) {

-      // another wildcard? seriously? then just assume its an "Annotation" type

-      CAS cas = stream.getCas();

-      result = tryWithNextType(after, annotation, nextElement, cas.getAnnotationType(), ruleMatch,

-              ruleApply, containerMatch, nextDepth, sideStepOrigin, entryPoint, stream, crowd);

-    }

-    return result;

-  }

-

-  private List<RuleMatch> tryWithNextComposed(boolean after, AnnotationFS annotation,

-          ComposedRuleElement cre, RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, int nextDepth, RutaRuleElement sideStepOrigin,

-          RutaStream stream, InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    AnnotationFS nextOne = annotation;

-    boolean doneHere = false;

-    while (!doneHere && (nextOne = getNextPositionForComposed(cre, after, nextOne, stream)) != null) {

-      int pointer = after ? nextOne.getBegin() : nextOne.getEnd();

-      RutaBasic anchor = stream.getAnchor(!after, pointer);

-      ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-      RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-      AnnotationFS coveredByWildCard = getCoveredByWildCard(after, annotation, nextOne, stream);

-      doMatch(coveredByWildCard, extendedMatch, extendedContainerMatch, annotation == null, stream,

-              crowd);

-      if (extendedMatch.matched()) {

-        ComposedRuleElementMatch nextContainerMatch = getContainerMatchOfNextElement(

-                extendedContainerMatch, nextDepth);

-        // Hotfix for UIMA-3002

-        int applied = ruleApply.getApplied();

-        if (anchor == null) {

-          result = cre.startMatch(extendedMatch, ruleApply, nextContainerMatch, cre, stream, crowd);

-        } else {

-          result = cre.continueMatch(after, anchor, extendedMatch, ruleApply, nextContainerMatch,

-                  sideStepOrigin, cre, stream, crowd);

-        }

-        List<RuleElementMatch> nextList = nextContainerMatch.getInnerMatches().get(cre);

-        boolean matched = hasMatched(nextList);

-        if (!matched) {

-          // Hotfix for UIMA-3002

-          if (ruleApply.getApplied() > applied) {

-            doneHere = true;

-          }

-          // end hotfix

-          nextOne = stream.getAnchor(after, getNextPointer(!after, nextOne));

-        } else {

-          doneHere = true;

-        }

-      } else {

-        // conditions of wildcard element did not match, try the next possible anchor for the

-        // next rule element

-        nextOne = annotation;

-      }

-    }

-    if (!doneHere) {

-      ComposedRuleElementMatch nextContainerMatch = getContainerMatchOfNextElement(containerMatch,

-              nextDepth);

-      result = cre.continueMatch(after, annotation, ruleMatch, ruleApply, nextContainerMatch,

-              sideStepOrigin, null, stream, crowd);

-    }

-    return result;

-  }

-

-  private boolean hasMatched(List<RuleElementMatch> nextList) {

-    if (nextList == null || nextList.isEmpty()) {

-      return false;

-    }

-    boolean result = true;

-    for (RuleElementMatch each : nextList) {

-      result &= each.matched();

-    }

-    return result;

-  }

-

-  private AnnotationFS getNextPositionForComposed(ComposedRuleElement cre, boolean after,

-          AnnotationFS annotation, RutaStream stream) {

-    RuleElement element = getNextAtomicRuleElement(cre, after);

-    AnnotationFS result = null;

-    Boolean conjunct = cre.getConjunct();

-    if (element instanceof WildCardRuleElement) {

-      if (after) {

-        return stream.getAnchor(after, annotation.getEnd());

-      } else {

-        return stream.getAnchor(after, annotation.getBegin());

-      }

-    } else if (conjunct != null && !conjunct) {

-      // disjunctive

-      List<RuleElement> ruleElements = cre.getRuleElements();

-      List<AnnotationFS> nextPostions = new ArrayList<AnnotationFS>();

-      for (RuleElement ruleElement : ruleElements) {

-        if (ruleElement instanceof ComposedRuleElement) {

-          AnnotationFS nextPositionForComposed = getNextPositionForComposed(

-                  (ComposedRuleElement) ruleElement, after, annotation, stream);

-          if (nextPositionForComposed != null) {

-            nextPostions.add(nextPositionForComposed);

-          }

-        } else if (ruleElement instanceof RutaRuleElement) {

-          AnnotationFS nextPositionForAtomic = getNextPositionForAtomic(after, annotation, stream,

-                  ruleElement, result);

-          if (nextPositionForAtomic != null) {

-            nextPostions.add(nextPositionForAtomic);

-          }

-        }

-      }

-      if (!nextPostions.isEmpty()) {

-

-        Collections.sort(nextPostions, new AnnotationComparator());

-        if (after) {

-          result = nextPostions.get(0);

-        } else {

-          result = nextPostions.get(nextPostions.size() - 1);

-        }

-      }

-    } else {

-      result = getNextPositionForAtomic(after, annotation, stream, element, result);

-    }

-

-    return result;

-  }

-

-  private AnnotationFS getNextPositionForAtomic(boolean after, AnnotationFS annotation,

-          RutaStream stream, RuleElement element, AnnotationFS result) {

-    RutaRuleElement re = (RutaRuleElement) element;

-    RutaMatcher matcher = re.getMatcher();

-    if (matcher instanceof RutaTypeMatcher) {

-      FSIterator<AnnotationFS> iterator = getIterator(after, annotation, re, null, stream);

-      if (iterator == null) {

-        return null;

-      }

-      if (iterator.isValid()) {

-        result = iterator.get();

-        if (annotation != null && (after && result.getEnd() == annotation.getEnd())

-                || (!after && result.getBegin() == annotation.getBegin())) {

-          moveOn(after, iterator, stream);

-          if (iterator.isValid()) {

-            result = iterator.get();

-          } else {

-            result = null;

-          }

-        }

-

-      }

-    } else if (matcher instanceof RutaLiteralMatcher) {

-      RutaLiteralMatcher lm = (RutaLiteralMatcher) matcher;

-      IStringExpression expression = lm.getExpression();

-      String stringValue = expression.getStringValue(parent, annotation, stream);

-      AnnotationFS documentAnnotation = stream.getDocumentAnnotation();

-      int delta = documentAnnotation.getBegin();

-      String document = documentAnnotation.getCoveredText();

-      int pointer = annotation.getEnd() - delta;

-      int indexOf = document.indexOf(stringValue, pointer);

-      if (indexOf < 0) {

-        return null;

-      } else {

-        return stream.getAnchor(after, indexOf);

-      }

-    }

-    return result;

-  }

-

-  private RuleElement getNextAtomicRuleElement(ComposedRuleElement cre, boolean after) {

-    if (after) {

-      RuleElement firstElement = cre.getFirstElement();

-      if (firstElement instanceof ComposedRuleElement) {

-        return getNextAtomicRuleElement((ComposedRuleElement) firstElement, after);

-      } else {

-        return firstElement;

-      }

-    } else {

-      RuleElement lastElement = cre.getLastElement();

-      if (lastElement instanceof ComposedRuleElement) {

-        return getNextAtomicRuleElement((ComposedRuleElement) lastElement, after);

-      } else {

-        return lastElement;

-      }

-    }

-  }

-

-  private List<RuleMatch> tryWithNextType(boolean after, AnnotationFS annotation,

-          RuleElement nextElement, Type defaultType, RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, int nextDepth, RutaRuleElement sideStepOrigin,

-          RuleElement entryPoint, RutaStream stream, InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    FSIterator<AnnotationFS> iterator = getIterator(after, annotation, nextElement, defaultType,

-            stream);

-    // already matched something maybe, but now at the end of the document

-    if (iterator == null || !iterator.isValid()) {

-      RuleElementContainer c = getContainer();

-      if (c instanceof ComposedRuleElement) {

-        ComposedRuleElement cre = (ComposedRuleElement) c;

-        cre.fallbackContinue(after, true, annotation, ruleMatch, ruleApply, containerMatch,

-                sideStepOrigin, entryPoint, stream, crowd);

-      }

-      result.add(ruleMatch);

-      return result;

-    }

-    if(iterator.isValid() && !stream.isVisible(iterator.get())) {

-      moveOn(after, iterator, stream);

-    }

-    boolean doneHere = false;

-    while (!doneHere && iterator.isValid() && stream.isVisible(iterator.get())) {

-      AnnotationFS nextOne = iterator.get();

-      int pointer = after ? nextOne.getBegin() : nextOne.getEnd();

-      RutaBasic anchor = stream.getAnchor(!after, pointer);

-

-      ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-      RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-

-      AnnotationFS coveredByWildCard = getCoveredByWildCard(after, annotation, nextOne, stream);

-      doMatch(coveredByWildCard, extendedMatch, extendedContainerMatch, annotation == null, stream,

-              crowd);

-      if (extendedMatch.matched()) {

-        ComposedRuleElementMatch nextContainerMatch = getContainerMatchOfNextElement(

-                extendedContainerMatch, nextDepth);

-        if (anchor == null) {

-          result = nextElement.startMatch(extendedMatch, ruleApply, nextContainerMatch,

-                  nextElement, stream, crowd);

-        } else {

-          // TODO match and containermatch should be on the correct level!

-          result = nextElement.continueMatch(after, anchor, extendedMatch, ruleApply,

-                  nextContainerMatch, sideStepOrigin, nextElement, stream, crowd);

-        }

-        List<RuleElementMatch> nextList = nextContainerMatch.getInnerMatches().get(nextElement);

-        if (nextList == null || nextList.isEmpty() || !nextList.get(nextList.size() - 1).matched()) {

-          moveOn(after, iterator, stream);

-        } else {

-          doneHere = true;

-        }

-      } else {

-        // conditions of wildcard element did not match, try the next possible anchor for the

-        // next rule element

-        moveOn(after, iterator, stream);

-      }

-    }

-    return result;

-  }

-

-  private ComposedRuleElementMatch getContainerMatchOfNextElement(

-          ComposedRuleElementMatch extendedContainerMatch, int nextDepth) {

-    ComposedRuleElementMatch result = extendedContainerMatch;

-    for (int i = 0; i < nextDepth; i++) {

-      result = result.getContainerMatch();

-    }

-    return result;

-  }

-

-  private FSIterator<AnnotationFS> getIterator(boolean after, AnnotationFS annotation,

-          RuleElement nextElement, Type defaultType, RutaStream stream) {

-    FSIterator<AnnotationFS> iterator = null;

-    if (defaultType == null) {

-      RutaRuleElement re = (RutaRuleElement) nextElement;

-      RutaMatcher matcher = re.getMatcher();

-      if (matcher instanceof RutaTypeMatcher) {

-        RutaTypeMatcher typeMatcher = (RutaTypeMatcher) re.getMatcher();

-        List<Type> types = typeMatcher.getTypes(parent, stream);

-        Type type = types.get(0);

-        iterator = getIteratorOfType(after, type, annotation, stream);

-      } else {

-        // should not happen

-      }

-    } else {

-      iterator = getIteratorOfType(after, defaultType, annotation, stream);

-    }

-    if (iterator != null && iterator.isValid() && iterator.get().equals(annotation)) {

-      moveOn(after, iterator, stream);

-    }

-    return iterator;

-  }

-

-  private FSIterator<AnnotationFS> getIteratorOfType(boolean after, Type type,

-          AnnotationFS annotation, RutaStream stream) {

-    CAS cas = stream.getCas();

-    FSIterator<AnnotationFS> result = null;

-    if (stream.getDocumentAnnotation().equals(cas.getDocumentAnnotation())) {

-      // no windowing needed

-      if (annotation == null) {

-        result = cas.getAnnotationIndex(type).iterator();

-      } else {

-        AnnotationFS pointer = stream.getAnchor(after, annotation);

-        result = cas.getAnnotationIndex(type).iterator(pointer);

-        if (!after) {

-          result.moveToPrevious();

-        }

-        if (annotation != null && result.isValid()) {

-          // hotfix for index overflow...

-          AnnotationFS a = result.get();

-          // not greater equal because caller method will fix it for same positions, should be fixed

-          // right here

-          if (after) {

-            if (a.getBegin() < annotation.getBegin()) {

-              return null;

-            }

-          } else {

-            if (a.getEnd() > annotation.getEnd()) {

-              return null;

-            }

-          }

-        }

-      }

-    } else {

-      JCas jcas = null;

-      try {

-        jcas = cas.getJCas();

-      } catch (CASException e) {

-        e.printStackTrace();

-      }

-      RutaFrame window = new RutaFrame(jcas, stream.getDocumentAnnotation().getBegin(), stream

-              .getDocumentAnnotation().getEnd());

-      if (annotation == null) {

-        result = cas.getAnnotationIndex(type).subiterator(window);

-      } else {

-        result = cas.getAnnotationIndex(type).subiterator(window);

-        AnnotationFS pointer = stream.getAnchor(after, annotation);

-        result.moveTo(pointer);

-        if (!after) {

-          result.moveToPrevious();

-        }

-      }

-    }

-

-    return result;

-  }

-

-  private List<RuleMatch> tryWithNextLiteral(boolean after, AnnotationFS annotation,

-          RutaRuleElement nextElement, RuleMatch ruleMatch, RuleApply ruleApply,

-          ComposedRuleElementMatch containerMatch, int nextDepth, RutaRuleElement sideStepOrigin,

-          RutaStream stream, InferenceCrowd crowd) {

-    List<RuleMatch> result = new ArrayList<RuleMatch>();

-    RutaLiteralMatcher matcher = (RutaLiteralMatcher) nextElement.getMatcher();

-    IStringExpression expression = matcher.getExpression();

-    String stringValue = expression.getStringValue(parent, null, stream);

-    AnnotationFS documentAnnotation = stream.getDocumentAnnotation();

-    int delta = documentAnnotation.getBegin();

-    String document = documentAnnotation.getCoveredText();

-    int pointer = 0;

-    if (annotation != null) {

-      pointer = annotation.getEnd() - delta;

-    }

-    int indexOf = 0;

-    boolean doneHere = false;

-    // TODO matching direction not included in document.indexOf(). Need another method here

-    while (!doneHere && (indexOf = document.indexOf(stringValue, pointer)) < document.length()) {

-      if (indexOf < 0) {

-        // can't match, the next next element will see it.

-        ComposedRuleElementMatch nextContainerMatch = getContainerMatchOfNextElement(

-                containerMatch, nextDepth);

-        nextElement.continueMatch(after, annotation, ruleMatch, ruleApply, nextContainerMatch,

-                sideStepOrigin, null, stream, crowd);

-        doneHere = true;

-        break;

-      }

-      RutaBasic anchor = stream.getAnchor(after, indexOf + delta);

-      RutaBasic endAnchor = stream.getAnchor(!after, indexOf + delta);

-      ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-      RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-      AnnotationFS coveredByWildCard = getCoveredByWildCard(after, annotation, anchor, stream);

-      doMatch(coveredByWildCard, extendedMatch, extendedContainerMatch, annotation == null, stream,

-              crowd);

-      if (extendedMatch.matched()) {

-        ComposedRuleElementMatch nextContainerMatch = getContainerMatchOfNextElement(

-                extendedContainerMatch, nextDepth);

-        if (endAnchor == null) {

-          result = nextElement.startMatch(extendedMatch, ruleApply, nextContainerMatch,

-                  nextElement, stream, crowd);

-        } else {

-          result = nextElement.continueMatch(after, endAnchor, extendedMatch, ruleApply,

-                  nextContainerMatch, sideStepOrigin, nextElement, stream, crowd);

-        }

-        List<RuleElementMatch> nextList = nextContainerMatch.getInnerMatches().get(nextElement);

-        if (nextList == null || nextList.isEmpty()) {

-          pointer = getNextPointer(after, anchor);

-        } else {

-          doneHere = true;

-        }

-      } else {

-        pointer = getNextPointer(after, anchor);

-      }

-    }

-    return result;

-  }

-

-  private int getNextPointer(boolean after, AnnotationFS anchor) {

-    if (after) {

-      return anchor.getEnd();

-    } else {

-      return anchor.getBegin();

-    }

-  }

-

-  private void moveOn(boolean after, FSIterator<AnnotationFS> iterator, RutaStream stream) {

-    if (after) {

-      iterator.moveToNext();

-    } else {

-      iterator.moveToPrevious();

-    }

-    while(iterator.isValid() && !stream.isVisible(iterator.get())) {

-      if (after) {

-        iterator.moveToNext();

-      } else {

-        iterator.moveToPrevious();

-      }

-    }

-  }

-

-  private AnnotationFS getCoveredByWildCard(boolean after, AnnotationFS last, AnnotationFS next,

-          RutaStream stream) {

-    CAS cas = stream.getCas();

-    Type type = cas.getAnnotationType();

-    AnnotationFS documentAnnotation = stream.getDocumentAnnotation();

-

-    // order like in the index

-    AnnotationFS before = last;

-    AnnotationFS later = next;

-    if (!after) {

-      before = next;

-      later = last;

-    }

-

-    // without any information, match on everything

-    int begin = documentAnnotation.getBegin();

-    int end = documentAnnotation.getEnd();

-

-    // limit offsets

-    if (before != null) {

-      begin = before.getEnd();

-    }

-    if (later != null) {

-      end = later.getBegin();

-    }

-

-    int filteredBegin = begin;

-    int filteredEnd = end;

-    RutaBasic beginAnchor = stream.getBeginAnchor(begin);

-    RutaBasic endAnchor = stream.getEndAnchor(end);

-    if (beginAnchor != null && !stream.isVisible(beginAnchor)) {

-      beginAnchor = stream.getBasicNextTo(false, beginAnchor);

-      if (beginAnchor != null) {

-        filteredBegin = beginAnchor.getBegin();

-      }

-    }

-    if (endAnchor != null && !stream.isVisible(endAnchor)) {

-      endAnchor = stream.getBasicNextTo(true, endAnchor);

-      if (endAnchor != null) {

-        filteredEnd = endAnchor.getEnd();

-      }

-    }

-

-    if (filteredBegin < filteredEnd) {

-      begin = filteredBegin;

-      end = filteredEnd;

-    } else {

-      type = cas.getTypeSystem().getType(RutaEngine.OPTIONAL_TYPE);

-    }

-    AnnotationFS afs = cas.createAnnotation(type, begin, end);

-    return afs;

-  }

-

-  private void doMatch(AnnotationFS annotation, RuleMatch ruleMatch,

-          ComposedRuleElementMatch containerMatch, boolean ruleAnchor, RutaStream stream,

-          InferenceCrowd crowd) {

-    RuleElementMatch result = new RuleElementMatch(this, containerMatch);

-    result.setRuleAnchor(ruleAnchor);

-    List<EvaluatedCondition> evaluatedConditions = new ArrayList<EvaluatedCondition>(

-            conditions.size());

-    boolean base = true;

-    List<AnnotationFS> textsMatched = new ArrayList<AnnotationFS>(1);

-    if (base) {

-      for (AbstractRutaCondition condition : conditions) {

-        crowd.beginVisit(condition, null);

-        EvaluatedCondition eval = condition.eval(annotation, this, stream, crowd);

-        crowd.endVisit(condition, null);

-        evaluatedConditions.add(eval);

-      }

-    }

-    if (annotation != null) {

-      textsMatched.add(annotation);

-    }

-    result.setMatchInfo(base, textsMatched, evaluatedConditions, stream);

-    ruleMatch.setMatched(ruleMatch.matched() && result.matched());

-  }

-

-  public List<RuleMatch> continueOwnMatch(boolean after, AnnotationFS annotation,

-          RuleMatch ruleMatch, RuleApply ruleApply, ComposedRuleElementMatch containerMatch,

-          RutaRuleElement sideStepOrigin, RuleElement entryPoint, RutaStream stream,

-          InferenceCrowd crowd) {

-    // won't happen

-    return Collections.emptyList();

-  }

-

-  public Collection<AnnotationFS> getAnchors(RutaStream symbolStream) {

-    // shouldn't happen

-    // really? what about anchoring at start?

-    return Collections.emptyList();

-  }

-

-  public long estimateAnchors(RutaStream stream) {

-    return Integer.MAX_VALUE;

-  }

-

-  public String toString() {

-    return "#" + (conditions.isEmpty() ? "" : "(" + conditions.toString() + ")" + "\\n")

-            + (actions.isEmpty() ? "" : "{" + actions.toString() + "}");

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxGreedy.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxGreedy.java
deleted file mode 100644
index 12e3a09..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxGreedy.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MinMaxGreedy implements RuleElementQuantifier {

-

-  private INumberExpression min;

-

-  private INumberExpression max;

-

-  public MinMaxGreedy(INumberExpression min, INumberExpression max, boolean interval) {

-    super();

-    if (!interval) {

-      this.min = min;

-      this.max = min;

-    } else {

-      this.min = min;

-      this.max = max;

-      if (this.max == null) {

-        this.max = new SimpleNumberExpression(Integer.MAX_VALUE);

-      }

-    }

-  }

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, RutaBlock parent,

-          RutaStream stream, InferenceCrowd crowd) {

-    int minValue = min.getIntegerValue(parent, null, stream);

-    int maxValue = max.getIntegerValue(parent, null, stream);

-

-    if (matches.size() > 0) {

-      RuleElementMatch ruleElementMatch = matches.get(matches.size() - 1);

-      if (!ruleElementMatch.matched()) {

-        matches.remove(ruleElementMatch);

-      }

-    }

-

-    int matchedSize = matches.size();

-

-    boolean result = matchedSize >= minValue && matchedSize <= maxValue;

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if (annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    int minValue = min.getIntegerValue(ruleElement.getParent(), annotation, stream);

-    int maxValue = max.getIntegerValue(ruleElement.getParent(), annotation, stream);

-    List<RuleElementMatch> list = containerMatch.getInnerMatches().get(ruleElement);

-    if (list == null) {

-      if (maxValue > 0) {

-        return true;

-      } else {

-        return false;

-      }

-    }

-    int matchedSize = list.size();

-    if (list == null || list.isEmpty() || matchedSize < minValue) {

-      return true;

-    }

-    RuleElementMatch lastMatch = null;

-    if (after) {

-      lastMatch = list.get(list.size() - 1);

-    } else {

-      lastMatch = list.get(0);

-    }

-    return matchedSize < maxValue

-            || (!lastMatch.matched() && matchedSize >= minValue && matchedSize <= maxValue);

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    int minValue = min.getIntegerValue(parent, null, stream);

-    return minValue == 0;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxReluctant.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxReluctant.java
deleted file mode 100644
index 5041e2a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/MinMaxReluctant.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class MinMaxReluctant implements RuleElementQuantifier {

-

-  private INumberExpression min;

-

-  private INumberExpression max;

-

-  public MinMaxReluctant(INumberExpression min, INumberExpression max, boolean interval) {

-    super();

-    if (!interval) {

-      this.min = min;

-      this.max = min;

-    } else {

-      this.min = min;

-      this.max = max;

-      if (this.max == null) {

-        this.max = new SimpleNumberExpression(Integer.MAX_VALUE);

-      }

-    }

-  }

-

-  public INumberExpression getMin() {

-    return min;

-  }

-

-  public INumberExpression getMax() {

-    return max;

-  }

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    int minValue = min.getIntegerValue(parent, null, stream);

-    int maxValue = max.getIntegerValue(parent, null, stream);

-    if (matches.size() > 0) {

-      RuleElementMatch ruleElementMatch = matches.get(matches.size() - 1);

-      if (!ruleElementMatch.matched()) {

-        matches.remove(ruleElementMatch);

-      }

-    }

-    int matchedSize = matches.size();

-    boolean result = matchedSize >= minValue && matchedSize <= maxValue;

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    int minValue = min.getIntegerValue(ruleElement.getParent(), annotation, stream);

-    int maxValue = max.getIntegerValue(ruleElement.getParent(), annotation, stream);

-    List<RuleElementMatch> list = containerMatch.getInnerMatches().get(ruleElement);

-    if (list == null) {

-      if (maxValue > 0) {

-        return true;

-      } else {

-        return false;

-      }

-    }

-

-    int matchedSize = list.size();

-    if (list == null || list.isEmpty() || matchedSize < minValue) {

-      return true;

-    }

-    RuleElementMatch lastMatch = null;

-    if (after) {

-      lastMatch = list.get(list.size() - 1);

-    } else {

-      lastMatch = list.get(0);

-    }

-

-    RuleElement nextElement = ruleElement.getContainer().getNextElement(after, ruleElement);

-    if (nextElement == null) {

-      return false;

-    }

-    ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-    nextElement.continueMatch(after, annotation, extendedMatch, null, extendedContainerMatch, null,

-            nextElement, stream, crowd);

-    List<RuleElementMatch> nextList = extendedContainerMatch.getInnerMatches().get(nextElement);

-    boolean nextMatched = (nextList != null && !nextList.isEmpty());

-

-    return (matchedSize < maxValue && matchedSize >= minValue && !nextMatched)

-            || (!lastMatch.matched() && matchedSize >= minValue && matchedSize <= maxValue && !nextMatched);

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    int minValue = min.getIntegerValue(parent, null, stream);

-    return minValue == 0;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/NormalQuantifier.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/NormalQuantifier.java
deleted file mode 100644
index 9ab1e16..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/NormalQuantifier.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class NormalQuantifier implements RuleElementQuantifier {

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    if (matches == null) {

-      return null;

-    }

-    boolean result = true;

-    boolean allEmpty = true;

-    

-    for (RuleElementMatch match : matches) {

-      result &= match.matched();

-      allEmpty &= match.getTextsMatched().isEmpty();

-    }

-    result &= !allEmpty;

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    List<RuleElementMatch> list = containerMatch.getInnerMatches().get(ruleElement);

-    return list == null || list.isEmpty();

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    return false;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusGreedy.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusGreedy.java
deleted file mode 100644
index 15e0cbb..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusGreedy.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class PlusGreedy implements RuleElementQuantifier {

-

-  public PlusGreedy() {

-    super();

-  }

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    boolean result = true;

-    boolean allEmpty = true;

-    if (matches == null) {

-      return null;

-    }

-    for (RuleElementMatch match : matches) {

-      allEmpty &= match.getTextsMatched().isEmpty();

-      result &= match.matched();

-    }

-    if (!result && matches.size() > 1) {

-      matches.remove(matches.size() - 1);

-      result = true;

-    }

-    if (matches.size() < 1 || allEmpty) {

-      result = false;

-    }

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    List<List<RuleElementMatch>> matchInfo = extendedMatch.getMatchInfo(ruleElement);

-    List<RuleElementMatch> matches;

-    if (after) {

-      matches = matchInfo.get(matchInfo.size() - 1);

-    } else {

-      matches = matchInfo.get(0);

-    }

-    boolean result = true;

-    boolean allEmpty = true;

-    if (matches == null) {

-      return true;

-    }

-

-    for (RuleElementMatch match : matches) {

-      allEmpty &= match.getTextsMatched().isEmpty();

-      result &= match.getTextsMatched().isEmpty() || match.matched();

-    }

-    if (!result && matches.size() > 1) {

-      matches.remove(matches.size() - 1);

-      result = true;

-    }

-    if (matches.size() < 1 || allEmpty) {

-      result = false;

-    }

-    return result;

-

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    return false;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusReluctant.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusReluctant.java
deleted file mode 100644
index 015cf55..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/PlusReluctant.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class PlusReluctant implements RuleElementQuantifier {

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    boolean result = true;

-    boolean allEmpty = true;

-    for (RuleElementMatch match : matches) {

-      List<AnnotationFS> textsMatched = match.getTextsMatched();

-      allEmpty &= textsMatched.isEmpty();

-      result &= match.matched();

-    }

-    if (!result && matches.size() > 1) {

-      matches.remove(matches.size() - 1);

-      result = true;

-    }

-    if (matches.size() < 1 || allEmpty) {

-      result = false;

-    }

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    List<RuleElementMatch> ownList = containerMatch.getInnerMatches().get(ruleElement);

-    if (ownList == null || ownList.isEmpty()) {

-      return true;

-    }

-

-    RuleElement nextElement = ruleElement.getContainer().getNextElement(after, ruleElement);

-    if (nextElement == null) {

-      return false;

-    }

-    ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-    nextElement.continueMatch(after, annotation, extendedMatch, null, extendedContainerMatch, null,

-            nextElement, stream, crowd);

-    List<RuleElementMatch> nextList = extendedContainerMatch.getInnerMatches().get(nextElement);

-    return nextList == null || nextList.isEmpty() || !nextList.get(nextList.size() - 1).matched();

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    return false;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionGreedy.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionGreedy.java
deleted file mode 100644
index 7046c3a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionGreedy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.Collections;

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class QuestionGreedy implements RuleElementQuantifier {

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    boolean result = true;

-    if (matches == null) {

-      return Collections.emptyList();

-    }

-    for (RuleElementMatch match : matches) {

-      result &= match.matched()

-              || (!(match instanceof ComposedRuleElementMatch) && match.getTextsMatched().isEmpty());

-    }

-    if (!result) {

-      matches.remove(0);

-      result = true;

-    }

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    List<RuleElementMatch> list = containerMatch.getInnerMatches().get(ruleElement);

-    return list == null || list.isEmpty();

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    return true;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionReluctant.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionReluctant.java
deleted file mode 100644
index 0896b88..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/QuestionReluctant.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class QuestionReluctant implements RuleElementQuantifier {

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    boolean result = true;

-    for (RuleElementMatch match : matches) {

-      result &= match.matched() || match.getTextsMatched().isEmpty();

-    }

-    if (!result) {

-      matches.remove(0);

-      result = true;

-    }

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    List<RuleElementMatch> ownList = containerMatch.getInnerMatches().get(ruleElement);

-    if (ownList != null && !ownList.isEmpty()) {

-      return false;

-    }

-

-    RuleElement nextElement = ruleElement.getContainer().getNextElement(after, ruleElement);

-    if (nextElement == null) {

-      return false;

-    }

-    ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-    nextElement.continueMatch(after, annotation, extendedMatch, null, extendedContainerMatch, null,

-            nextElement, stream, crowd);

-    List<RuleElementMatch> nextList = extendedContainerMatch.getInnerMatches().get(nextElement);

-    return nextList == null || nextList.isEmpty() || !nextList.get(nextList.size() - 1).matched();

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    return true;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/RuleElementQuantifier.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/RuleElementQuantifier.java
deleted file mode 100644
index f8f11cc..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/RuleElementQuantifier.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public interface RuleElementQuantifier {

-

-  List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches, RutaBlock parent,

-          RutaStream stream, InferenceCrowd crowd);

-

-  boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd);

-

-  boolean isOptional(RutaBlock parent, RutaStream stream);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarGreedy.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarGreedy.java
deleted file mode 100644
index 4977a22..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarGreedy.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class StarGreedy implements RuleElementQuantifier {

-

-  public StarGreedy() {

-    super();

-  }

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    boolean result = true;

-    if (matches == null) {

-      return null;

-    }

-    for (RuleElementMatch match : matches) {

-      result &= match.matched()

-              || (!(match instanceof ComposedRuleElementMatch) && match.getTextsMatched().isEmpty());

-    }

-    if (!result && matches.size() > 0) {

-      matches.remove(matches.size() - 1);

-      result = true;

-    }

-    if (result) {

-      return matches;

-    } else {

-      return null;

-    }

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch extendedMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    return true;

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    return true;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarReluctant.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarReluctant.java
deleted file mode 100644
index 698a85a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/quantifier/StarReluctant.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * 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.ruta.rule.quantifier;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.visitor.InferenceCrowd;

-

-public class StarReluctant implements RuleElementQuantifier {

-

-  public List<RuleElementMatch> evaluateMatches(List<RuleElementMatch> matches,

-          RutaBlock parent, RutaStream stream, InferenceCrowd crowd) {

-    return matches;

-  }

-

-  public boolean continueMatch(boolean after, AnnotationFS annotation, RuleElement ruleElement,

-          RuleMatch ruleMatch, ComposedRuleElementMatch containerMatch, RutaStream stream,

-          InferenceCrowd crowd) {

-    if(annotation == null) {

-      // do not try to continue a match that totally failed

-      return false;

-    }

-    RuleElement nextElement = ruleElement.getContainer().getNextElement(after, ruleElement);

-    if (nextElement == null) {

-      return false;

-    }

-    ComposedRuleElementMatch extendedContainerMatch = containerMatch.copy();

-    RuleMatch extendedMatch = ruleMatch.copy(extendedContainerMatch, after);

-    nextElement.continueMatch(after, annotation, extendedMatch, null, extendedContainerMatch, null,

-            nextElement, stream, crowd);

-    List<RuleElementMatch> nextList = extendedContainerMatch.getInnerMatches().get(nextElement);

-    return nextList == null || nextList.isEmpty() || !nextList.get(nextList.size() - 1).matched();

-  }

-

-  public boolean isOptional(RutaBlock parent, RutaStream stream) {

-    return true;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/DefaultSeeder.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/DefaultSeeder.java
deleted file mode 100644
index 804acdc..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/DefaultSeeder.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.seed;

-

-import java.io.BufferedReader;

-import java.io.StringReader;

-import java.util.Collection;

-import java.util.LinkedList;

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.ruta.type.MARKUP;

-import org.apache.uima.ruta.type.TokenSeed;

-

-public class DefaultSeeder implements RutaAnnotationSeeder {

-

-  public static final String seedType = "org.apache.uima.ruta.type.TokenSeed";

-

-  private final Pattern markupPattern = Pattern

-          .compile("</?\\w+((\\s+\\w+(\\s*=\\s*(?:\".*?\"|'.*?'|[^'\">\\s]+))?)+\\s*|\\s*)/?>");

-

-  public Type seed(String text, CAS cas) {

-    Type result = null;

-    JCas jCas = null;

-    int size = 0;

-    try {

-      jCas = cas.getJCas();

-      size = jCas.getAnnotationIndex(TokenSeed.type).size();

-      result = jCas.getTypeSystem().getType(seedType);

-    } catch (CASException e1) {

-    }

-    // do not apply seeding if there are already annotations of this seed type

-    if (jCas == null || size != 0 || text == null) {

-      return result;

-    }

-    BufferedReader reader = new BufferedReader(new StringReader(text));

-    final SeedLexer sourceLexer = new SeedLexer(reader);

-    sourceLexer.setJCas(jCas);

-    AnnotationFS a = null;

-

-    try {

-      a = sourceLexer.yylex();

-    } catch (Exception e) {

-    }

-    while (a != null) {

-      cas.addFsToIndexes(a);

-      try {

-        a = sourceLexer.yylex();

-      } catch (Exception e) {

-      }

-    }

-

-    // FIXME: lexer rules for html markup won't work. Therrfore, those rules where removed in the

-    // grammar and the functionality is included directly with regexp

-    Matcher matcher = markupPattern.matcher(text);

-    Collection<AnnotationFS> toRemove = new LinkedList<AnnotationFS>();

-    while (matcher.find()) {

-      int begin = matcher.start();

-      int end = matcher.end();

-      MARKUP markup = new MARKUP(jCas, begin, end);

-      markup.addToIndexes();

-      FSIterator<AnnotationFS> subiterator = cas.getAnnotationIndex(result).subiterator(markup);

-      while (subiterator.isValid()) {

-        AnnotationFS fs = subiterator.get();

-        toRemove.add(fs);

-        subiterator.moveToNext();

-      }

-    }

-    for (AnnotationFS each : toRemove) {

-      cas.removeFsFromIndexes(each);

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/RutaAnnotationSeeder.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/RutaAnnotationSeeder.java
deleted file mode 100644
index c3f1c06..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/RutaAnnotationSeeder.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * 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.ruta.seed;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-

-public interface RutaAnnotationSeeder {

-

-  Type seed(String text, CAS cas);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/SeedLexer.flex b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/SeedLexer.flex
deleted file mode 100644
index 438cc85..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/SeedLexer.flex
+++ /dev/null
@@ -1,215 +0,0 @@
-/*

- * 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.ruta.seed;

-import java.util.*;

-import java.util.regex.*;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-

-import org.apache.uima.ruta.type.AMP;

-import org.apache.uima.ruta.type.BREAK;

-import org.apache.uima.ruta.type.CAP;

-import org.apache.uima.ruta.type.COLON;

-import org.apache.uima.ruta.type.COMMA;

-import org.apache.uima.ruta.type.CW;

-import org.apache.uima.ruta.type.EXCLAMATION;

-import org.apache.uima.ruta.type.MARKUP;

-import org.apache.uima.ruta.type.NBSP;

-import org.apache.uima.ruta.type.NUM;

-import org.apache.uima.ruta.type.PERIOD;

-import org.apache.uima.ruta.type.QUESTION;

-import org.apache.uima.ruta.type.SEMICOLON;

-import org.apache.uima.ruta.type.SPACE;

-import org.apache.uima.ruta.type.SPECIAL;

-import org.apache.uima.ruta.type.SW;

-

-%%

-

-%{

-    private JCas cas;

-        

-    public void setJCas(JCas cas) {

-        this.cas = cas;

-    }

-%}

-

-%unicode

-%line

-%char

-%type AnnotationFS

-%class SeedLexer

-

-ALPHA=[A-Za-z]

-DIGIT=[0-9]

-WHITE_SPACE_CHAR=[\n\r\ \t\b\012]

-BREAK=[\n\r\b\012]

-SPACE=[ \t]

-

-%%

-

-

-<YYINITIAL> {

-    

-    \<[/][!][^>]*> {

-                MARKUP t = new MARKUP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-                    

-    \<[!][^>]*> {

-                MARKUP t = new MARKUP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-    

-                                       

-    \u00A0|\u202F|\uFEFF|\u2007|\u180E|&nbsp;|&NBSP; {

-                NBSP t = new NBSP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    &{ALPHA}+; {

-                AMP t = new AMP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    {BREAK} {

-                BREAK t = new BREAK(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    {SPACE} {

-                SPACE t = new SPACE(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    ":" {

-                COLON t = new COLON(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    "," {

-                COMMA t = new COMMA(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    "." {

-                PERIOD t = new PERIOD(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    

-    "!" {

-                EXCLAMATION t = new EXCLAMATION(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;    

-    }

-

-    ";" {

-                SEMICOLON t = new SEMICOLON(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    "?" {

-                QUESTION t = new QUESTION(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    [:lowercase:]+ {

-                SW t = new SW(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    [:uppercase:][:lowercase:]* {

-                CW t = new CW(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    [:uppercase:]+ {

-                CAP t = new CAP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    {DIGIT}+ {

-                NUM t = new NUM(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    . {

-                SPECIAL t = new SPECIAL(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-    }

-

-    <<EOF>> {

-                return null;

-    }

-

-}

-

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/SeedLexer.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/SeedLexer.java
deleted file mode 100644
index 25ad7c6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/SeedLexer.java
+++ /dev/null
@@ -1,913 +0,0 @@
-/* The following code was generated by JFlex 1.4.3 on 04.11.14 14:02 */

-

-/*

- * 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.ruta.seed;

-import java.util.*;

-import java.util.regex.*;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-

-import org.apache.uima.ruta.type.AMP;

-import org.apache.uima.ruta.type.BREAK;

-import org.apache.uima.ruta.type.CAP;

-import org.apache.uima.ruta.type.COLON;

-import org.apache.uima.ruta.type.COMMA;

-import org.apache.uima.ruta.type.CW;

-import org.apache.uima.ruta.type.EXCLAMATION;

-import org.apache.uima.ruta.type.MARKUP;

-import org.apache.uima.ruta.type.NBSP;

-import org.apache.uima.ruta.type.NUM;

-import org.apache.uima.ruta.type.PERIOD;

-import org.apache.uima.ruta.type.QUESTION;

-import org.apache.uima.ruta.type.SEMICOLON;

-import org.apache.uima.ruta.type.SPACE;

-import org.apache.uima.ruta.type.SPECIAL;

-import org.apache.uima.ruta.type.SW;

-

-

-/**

- * This class is a scanner generated by 

- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3

- * on 04.11.14 14:02 from the specification file

- * <tt>D:/work/workspace-uima-ruta5/ruta/ruta-core/src/main/java/org/apache/uima/ruta/seed/SeedLexer.flex</tt>

- */

-class SeedLexer {

-

-  /** This character denotes the end of file */

-  public static final int YYEOF = -1;

-

-  /** initial size of the lookahead buffer */

-  private static final int ZZ_BUFFERSIZE = 16384;

-

-  /** lexical states */

-  public static final int YYINITIAL = 0;

-

-  /**

-   * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l

-   * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l

-   *                  at the beginning of a line

-   * l is of the form l = 2*k, k a non negative integer

-   */

-  private static final int ZZ_LEXSTATE[] = { 

-     0, 0

-  };

-

-  /** 

-   * Translates characters to character classes

-   */

-  private static final String ZZ_CMAP_PACKED = 

-    "\10\0\1\4\1\3\1\4\2\0\1\4\22\0\1\3\1\7\4\0"+

-    "\1\12\5\0\1\25\1\0\1\26\1\6\12\2\1\24\1\17\1\5"+

-    "\1\0\1\10\1\27\1\0\1\1\1\21\13\1\1\20\1\1\1\23"+

-    "\2\1\1\22\7\1\6\0\1\31\1\14\13\31\1\13\1\31\1\16"+

-    "\2\31\1\15\7\31\45\0\1\11\11\0\1\30\12\0\1\30\4\0"+

-    "\1\30\5\0\27\32\1\0\7\32\30\30\1\0\10\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\2\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\2\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\2\32\1\30\1\32\1\30"+

-    "\1\32\3\30\2\32\1\30\1\32\1\30\2\32\1\30\3\32\2\30"+

-    "\4\32\1\30\2\32\1\30\3\32\3\30\2\32\1\30\2\32\1\30"+

-    "\1\32\1\30\1\32\1\30\2\32\1\30\1\32\2\30\1\32\1\30"+

-    "\2\32\1\30\3\32\1\30\1\32\1\30\2\32\2\30\1\0\1\32"+

-    "\3\30\4\0\1\32\1\0\1\30\1\32\1\0\1\30\1\32\1\0"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\2\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\2\30\1\32\1\0\1\30\1\32\1\30"+

-    "\3\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\7\30"+

-    "\2\32\1\30\2\32\2\30\1\32\1\30\4\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\105\30\1\0\44\30\7\0\2\30"+

-    "\36\0\5\30\140\0\1\30\52\0\1\32\1\30\1\32\1\30\2\0"+

-    "\1\32\1\30\2\0\4\30\10\0\1\32\1\0\3\32\1\0\1\32"+

-    "\1\0\2\32\1\30\21\32\1\0\11\32\43\30\1\32\2\30\3\32"+

-    "\3\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\5\30\1\32\1\30\1\0\1\32\1\30"+

-    "\2\32\2\30\63\32\60\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\10\0\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\2\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\2\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\11\0\46\32\12\0\47\30\u0b18\0"+

-    "\46\32\1\0\1\32\5\0\1\32\u0740\0\1\11\u04f1\0\300\30\100\0"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\11\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\11\30\10\32\6\30"+

-    "\2\0\6\32\2\0\10\30\10\32\10\30\10\32\6\30\2\0\6\32"+

-    "\2\0\10\30\1\0\1\32\1\0\1\32\1\0\1\32\1\0\1\32"+

-    "\10\30\10\32\16\30\2\0\10\30\10\0\10\30\10\0\10\30\10\0"+

-    "\5\30\1\0\2\30\4\32\2\0\1\30\3\0\3\30\1\0\2\30"+

-    "\4\32\4\0\4\30\2\0\2\30\4\32\4\0\10\30\5\32\5\0"+

-    "\3\30\1\0\2\30\4\32\13\0\1\11\47\0\1\11\101\0\1\30"+

-    "\15\0\1\30\20\0\15\30\145\0\1\32\4\0\1\32\2\0\1\30"+

-    "\3\32\2\30\3\32\1\30\1\0\1\32\3\0\5\32\6\0\1\32"+

-    "\1\0\1\32\1\0\1\32\1\0\4\32\1\0\1\30\4\32\1\30"+

-    "\4\0\1\30\2\0\2\30\2\32\5\0\1\32\4\30\4\0\1\30"+

-    "\21\0\20\32\20\30\3\0\1\32\1\30\u0331\0\32\32\32\30\u0716\0"+

-    "\57\32\1\0\57\30\1\0\1\32\1\30\3\32\2\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\4\32\1\30\1\32\2\30\1\32\10\30"+

-    "\3\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\2\30"+

-    "\6\0\1\32\1\30\1\32\1\30\3\0\1\32\1\30\14\0\46\30"+

-    "\1\0\1\30\5\0\1\30\u7912\0\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\22\0\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\212\0\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\3\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32"+

-    "\1\30\1\32\12\30\1\32\1\30\1\32\1\30\2\32\1\30\1\32"+

-    "\1\30\1\32\1\30\1\32\1\30\1\32\1\30\3\0\1\32\1\30"+

-    "\1\32\1\30\1\0\1\32\1\30\1\32\1\30\14\0\1\32\1\30"+

-    "\1\32\1\30\1\32\1\30\1\32\1\30\1\32\1\30\1\32\115\0"+

-    "\3\30\u5305\0\7\30\14\0\5\30\u03e7\0\1\11\41\0\32\32\6\0"+

-    "\32\30\245\0";

-

-  /** 

-   * Translates characters to character classes

-   */

-  private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);

-

-  /** 

-   * Translates DFA states to action switch labels.

-   */

-  private static final int [] ZZ_ACTION = zzUnpackAction();

-

-  private static final String ZZ_ACTION_PACKED_0 =

-    "\1\0\1\1\1\2\1\3\1\4\1\5\1\1\1\6"+

-    "\1\7\1\1\1\10\1\11\1\12\1\13\1\14\1\15"+

-    "\1\16\1\2\5\0\1\17\1\20\5\0";

-

-  private static int [] zzUnpackAction() {

-    int [] result = new int[30];

-    int offset = 0;

-    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);

-    return result;

-  }

-

-  private static int zzUnpackAction(String packed, int offset, int [] result) {

-    int i = 0;       /* index in packed string  */

-    int j = offset;  /* index in unpacked array */

-    int l = packed.length();

-    while (i < l) {

-      int count = packed.charAt(i++);

-      int value = packed.charAt(i++);

-      do result[j++] = value; while (--count > 0);

-    }

-    return j;

-  }

-

-

-  /** 

-   * Translates a state to a row index in the transition table

-   */

-  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();

-

-  private static final String ZZ_ROWMAP_PACKED_0 =

-    "\0\0\0\33\0\66\0\121\0\33\0\33\0\154\0\33"+

-    "\0\33\0\207\0\242\0\33\0\33\0\33\0\33\0\33"+

-    "\0\275\0\330\0\363\0\u010e\0\u0129\0\u0144\0\u015f\0\33"+

-    "\0\33\0\u017a\0\u0195\0\u01b0\0\u01cb\0\u01e6";

-

-  private static int [] zzUnpackRowMap() {

-    int [] result = new int[30];

-    int offset = 0;

-    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);

-    return result;

-  }

-

-  private static int zzUnpackRowMap(String packed, int offset, int [] result) {

-    int i = 0;  /* index in packed string  */

-    int j = offset;  /* index in unpacked array */

-    int l = packed.length();

-    while (i < l) {

-      int high = packed.charAt(i++) << 16;

-      result[j++] = high | packed.charAt(i++);

-    }

-    return j;

-  }

-

-  /** 

-   * The transition table of the DFA

-   */

-  private static final int [] ZZ_TRANS = zzUnpackTrans();

-

-  private static final String ZZ_TRANS_PACKED_0 =

-    "\1\2\1\3\1\4\1\5\1\6\1\7\1\2\1\10"+

-    "\1\2\1\11\1\12\4\13\1\14\4\3\1\15\1\16"+

-    "\1\17\1\20\2\13\1\3\34\0\1\21\11\0\4\22"+

-    "\1\0\4\21\4\0\2\22\1\21\2\0\1\4\36\0"+

-    "\1\23\1\24\24\0\1\25\11\0\1\26\3\25\1\0"+

-    "\1\27\3\25\5\0\1\25\14\0\4\13\11\0\2\13"+

-    "\2\0\1\21\16\0\4\21\6\0\1\21\13\0\4\22"+

-    "\11\0\2\22\10\0\1\24\23\0\10\24\1\30\22\24"+

-    "\1\0\1\25\11\0\4\25\1\31\4\25\5\0\1\25"+

-    "\2\0\1\25\11\0\1\25\1\32\2\25\1\31\4\25"+

-    "\5\0\1\25\2\0\1\25\11\0\4\25\1\31\1\25"+

-    "\1\33\2\25\5\0\1\25\2\0\1\25\11\0\2\25"+

-    "\1\34\1\25\1\31\4\25\5\0\1\25\2\0\1\25"+

-    "\11\0\4\25\1\31\2\25\1\35\1\25\5\0\1\25"+

-    "\2\0\1\25\11\0\3\25\1\36\1\31\4\25\5\0"+

-    "\1\25\2\0\1\25\11\0\4\25\1\31\3\25\1\36"+

-    "\5\0\1\25\2\0\1\25\11\0\4\25\1\11\4\25"+

-    "\5\0\1\25\1\0";

-

-  private static int [] zzUnpackTrans() {

-    int [] result = new int[513];

-    int offset = 0;

-    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);

-    return result;

-  }

-

-  private static int zzUnpackTrans(String packed, int offset, int [] result) {

-    int i = 0;       /* index in packed string  */

-    int j = offset;  /* index in unpacked array */

-    int l = packed.length();

-    while (i < l) {

-      int count = packed.charAt(i++);

-      int value = packed.charAt(i++);

-      value--;

-      do result[j++] = value; while (--count > 0);

-    }

-    return j;

-  }

-

-

-  /* error codes */

-  private static final int ZZ_UNKNOWN_ERROR = 0;

-  private static final int ZZ_NO_MATCH = 1;

-  private static final int ZZ_PUSHBACK_2BIG = 2;

-

-  /* error messages for the codes above */

-  private static final String ZZ_ERROR_MSG[] = {

-    "Unkown internal scanner error",

-    "Error: could not match input",

-    "Error: pushback value was too large"

-  };

-

-  /**

-   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>

-   */

-  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();

-

-  private static final String ZZ_ATTRIBUTE_PACKED_0 =

-    "\1\0\1\11\2\1\2\11\1\1\2\11\2\1\5\11"+

-    "\2\1\5\0\2\11\5\0";

-

-  private static int [] zzUnpackAttribute() {

-    int [] result = new int[30];

-    int offset = 0;

-    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);

-    return result;

-  }

-

-  private static int zzUnpackAttribute(String packed, int offset, int [] result) {

-    int i = 0;       /* index in packed string  */

-    int j = offset;  /* index in unpacked array */

-    int l = packed.length();

-    while (i < l) {

-      int count = packed.charAt(i++);

-      int value = packed.charAt(i++);

-      do result[j++] = value; while (--count > 0);

-    }

-    return j;

-  }

-

-  /** the input device */

-  private java.io.Reader zzReader;

-

-  /** the current state of the DFA */

-  private int zzState;

-

-  /** the current lexical state */

-  private int zzLexicalState = YYINITIAL;

-

-  /** this buffer contains the current text to be matched and is

-      the source of the yytext() string */

-  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];

-

-  /** the textposition at the last accepting state */

-  private int zzMarkedPos;

-

-  /** the current text position in the buffer */

-  private int zzCurrentPos;

-

-  /** startRead marks the beginning of the yytext() string in the buffer */

-  private int zzStartRead;

-

-  /** endRead marks the last character in the buffer, that has been read

-      from input */

-  private int zzEndRead;

-

-  /** number of newlines encountered up to the start of the matched text */

-  private int yyline;

-

-  /** the number of characters up to the start of the matched text */

-  private int yychar;

-

-  /**

-   * the number of characters from the last newline up to the start of the 

-   * matched text

-   */

-  private int yycolumn;

-

-  /** 

-   * zzAtBOL == true <=> the scanner is currently at the beginning of a line

-   */

-  private boolean zzAtBOL = true;

-

-  /** zzAtEOF == true <=> the scanner is at the EOF */

-  private boolean zzAtEOF;

-

-  /** denotes if the user-EOF-code has already been executed */

-  private boolean zzEOFDone;

-

-  /* user code: */

-    private JCas cas;

-        

-    public void setJCas(JCas cas) {

-        this.cas = cas;

-    }

-

-

-  /**

-   * Creates a new scanner

-   * There is also a java.io.InputStream version of this constructor.

-   *

-   * @param   in  the java.io.Reader to read input from.

-   */

-  SeedLexer(java.io.Reader in) {

-    this.zzReader = in;

-  }

-

-  /**

-   * Creates a new scanner.

-   * There is also java.io.Reader version of this constructor.

-   *

-   * @param   in  the java.io.Inputstream to read input from.

-   */

-  SeedLexer(java.io.InputStream in) {

-    this(new java.io.InputStreamReader(in));

-  }

-

-  /** 

-   * Unpacks the compressed character translation table.

-   *

-   * @param packed   the packed character translation table

-   * @return         the unpacked character translation table

-   */

-  private static char [] zzUnpackCMap(String packed) {

-    char [] map = new char[0x10000];

-    int i = 0;  /* index in packed string  */

-    int j = 0;  /* index in unpacked array */

-    while (i < 2624) {

-      int  count = packed.charAt(i++);

-      char value = packed.charAt(i++);

-      do map[j++] = value; while (--count > 0);

-    }

-    return map;

-  }

-

-

-  /**

-   * Refills the input buffer.

-   *

-   * @return      <code>false</code>, iff there was new input.

-   * 

-   * @exception   java.io.IOException  if any I/O-Error occurs

-   */

-  private boolean zzRefill() throws java.io.IOException {

-

-    /* first: make room (if you can) */

-    if (zzStartRead > 0) {

-      System.arraycopy(zzBuffer, zzStartRead,

-                       zzBuffer, 0,

-                       zzEndRead-zzStartRead);

-

-      /* translate stored positions */

-      zzEndRead-= zzStartRead;

-      zzCurrentPos-= zzStartRead;

-      zzMarkedPos-= zzStartRead;

-      zzStartRead = 0;

-    }

-

-    /* is the buffer big enough? */

-    if (zzCurrentPos >= zzBuffer.length) {

-      /* if not: blow it up */

-      char newBuffer[] = new char[zzCurrentPos*2];

-      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);

-      zzBuffer = newBuffer;

-    }

-

-    /* finally: fill the buffer with new input */

-    int numRead = zzReader.read(zzBuffer, zzEndRead,

-                                            zzBuffer.length-zzEndRead);

-

-    if (numRead > 0) {

-      zzEndRead+= numRead;

-      return false;

-    }

-    // unlikely but not impossible: read 0 characters, but not at end of stream    

-    if (numRead == 0) {

-      int c = zzReader.read();

-      if (c == -1) {

-        return true;

-      } else {

-        zzBuffer[zzEndRead++] = (char) c;

-        return false;

-      }     

-    }

-

-	// numRead < 0

-    return true;

-  }

-

-    

-  /**

-   * Closes the input stream.

-   */

-  public final void yyclose() throws java.io.IOException {

-    zzAtEOF = true;            /* indicate end of file */

-    zzEndRead = zzStartRead;  /* invalidate buffer    */

-

-    if (zzReader != null)

-      zzReader.close();

-  }

-

-

-  /**

-   * Resets the scanner to read from a new input stream.

-   * Does not close the old reader.

-   *

-   * All internal variables are reset, the old input stream 

-   * <b>cannot</b> be reused (internal buffer is discarded and lost).

-   * Lexical state is set to <tt>ZZ_INITIAL</tt>.

-   *

-   * @param reader   the new input stream 

-   */

-  public final void yyreset(java.io.Reader reader) {

-    zzReader = reader;

-    zzAtBOL  = true;

-    zzAtEOF  = false;

-    zzEOFDone = false;

-    zzEndRead = zzStartRead = 0;

-    zzCurrentPos = zzMarkedPos = 0;

-    yyline = yychar = yycolumn = 0;

-    zzLexicalState = YYINITIAL;

-  }

-

-

-  /**

-   * Returns the current lexical state.

-   */

-  public final int yystate() {

-    return zzLexicalState;

-  }

-

-

-  /**

-   * Enters a new lexical state

-   *

-   * @param newState the new lexical state

-   */

-  public final void yybegin(int newState) {

-    zzLexicalState = newState;

-  }

-

-

-  /**

-   * Returns the text matched by the current regular expression.

-   */

-  public final String yytext() {

-    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );

-  }

-

-

-  /**

-   * Returns the character at position <tt>pos</tt> from the 

-   * matched text. 

-   * 

-   * It is equivalent to yytext().charAt(pos), but faster

-   *

-   * @param pos the position of the character to fetch. 

-   *            A value from 0 to yylength()-1.

-   *

-   * @return the character at position pos

-   */

-  public final char yycharat(int pos) {

-    return zzBuffer[zzStartRead+pos];

-  }

-

-

-  /**

-   * Returns the length of the matched text region.

-   */

-  public final int yylength() {

-    return zzMarkedPos-zzStartRead;

-  }

-

-

-  /**

-   * Reports an error that occured while scanning.

-   *

-   * In a wellformed scanner (no or only correct usage of 

-   * yypushback(int) and a match-all fallback rule) this method 

-   * will only be called with things that "Can't Possibly Happen".

-   * If this method is called, something is seriously wrong

-   * (e.g. a JFlex bug producing a faulty scanner etc.).

-   *

-   * Usual syntax/scanner level error handling should be done

-   * in error fallback rules.

-   *

-   * @param   errorCode  the code of the errormessage to display

-   */

-  private void zzScanError(int errorCode) {

-    String message;

-    try {

-      message = ZZ_ERROR_MSG[errorCode];

-    }

-    catch (ArrayIndexOutOfBoundsException e) {

-      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];

-    }

-

-    throw new Error(message);

-  } 

-

-

-  /**

-   * Pushes the specified amount of characters back into the input stream.

-   *

-   * They will be read again by then next call of the scanning method

-   *

-   * @param number  the number of characters to be read again.

-   *                This number must not be greater than yylength()!

-   */

-  public void yypushback(int number)  {

-    if ( number > yylength() )

-      zzScanError(ZZ_PUSHBACK_2BIG);

-

-    zzMarkedPos -= number;

-  }

-

-

-  /**

-   * Resumes scanning until the next regular expression is matched,

-   * the end of input is encountered or an I/O-Error occurs.

-   *

-   * @return      the next token

-   * @exception   java.io.IOException  if any I/O-Error occurs

-   */

-  public AnnotationFS yylex() throws java.io.IOException {

-    int zzInput;

-    int zzAction;

-

-    // cached fields:

-    int zzCurrentPosL;

-    int zzMarkedPosL;

-    int zzEndReadL = zzEndRead;

-    char [] zzBufferL = zzBuffer;

-    char [] zzCMapL = ZZ_CMAP;

-

-    int [] zzTransL = ZZ_TRANS;

-    int [] zzRowMapL = ZZ_ROWMAP;

-    int [] zzAttrL = ZZ_ATTRIBUTE;

-

-    while (true) {

-      zzMarkedPosL = zzMarkedPos;

-

-      yychar+= zzMarkedPosL-zzStartRead;

-

-      boolean zzR = false;

-      for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL;

-                                                             zzCurrentPosL++) {

-        switch (zzBufferL[zzCurrentPosL]) {

-        case '\u000B':

-        case '\u000C':

-        case '\u0085':

-        case '\u2028':

-        case '\u2029':

-          yyline++;

-          zzR = false;

-          break;

-        case '\r':

-          yyline++;

-          zzR = true;

-          break;

-        case '\n':

-          if (zzR)

-            zzR = false;

-          else {

-            yyline++;

-          }

-          break;

-        default:

-          zzR = false;

-        }

-      }

-

-      if (zzR) {

-        // peek one character ahead if it is \n (if we have counted one line too much)

-        boolean zzPeek;

-        if (zzMarkedPosL < zzEndReadL)

-          zzPeek = zzBufferL[zzMarkedPosL] == '\n';

-        else if (zzAtEOF)

-          zzPeek = false;

-        else {

-          boolean eof = zzRefill();

-          zzEndReadL = zzEndRead;

-          zzMarkedPosL = zzMarkedPos;

-          zzBufferL = zzBuffer;

-          if (eof) 

-            zzPeek = false;

-          else 

-            zzPeek = zzBufferL[zzMarkedPosL] == '\n';

-        }

-        if (zzPeek) yyline--;

-      }

-      zzAction = -1;

-

-      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;

-  

-      zzState = ZZ_LEXSTATE[zzLexicalState];

-

-

-      zzForAction: {

-        while (true) {

-    

-          if (zzCurrentPosL < zzEndReadL)

-            zzInput = zzBufferL[zzCurrentPosL++];

-          else if (zzAtEOF) {

-            zzInput = YYEOF;

-            break zzForAction;

-          }

-          else {

-            // store back cached positions

-            zzCurrentPos  = zzCurrentPosL;

-            zzMarkedPos   = zzMarkedPosL;

-            boolean eof = zzRefill();

-            // get translated positions and possibly new buffer

-            zzCurrentPosL  = zzCurrentPos;

-            zzMarkedPosL   = zzMarkedPos;

-            zzBufferL      = zzBuffer;

-            zzEndReadL     = zzEndRead;

-            if (eof) {

-              zzInput = YYEOF;

-              break zzForAction;

-            }

-            else {

-              zzInput = zzBufferL[zzCurrentPosL++];

-            }

-          }

-          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];

-          if (zzNext == -1) break zzForAction;

-          zzState = zzNext;

-

-          int zzAttributes = zzAttrL[zzState];

-          if ( (zzAttributes & 1) == 1 ) {

-            zzAction = zzState;

-            zzMarkedPosL = zzCurrentPosL;

-            if ( (zzAttributes & 8) == 8 ) break zzForAction;

-          }

-

-        }

-      }

-

-      // store back cached position

-      zzMarkedPos = zzMarkedPosL;

-

-      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {

-        case 3: 

-          { NUM t = new NUM(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 17: break;

-        case 13: 

-          { QUESTION t = new QUESTION(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 18: break;

-        case 8: 

-          { SW t = new SW(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 19: break;

-        case 4: 

-          { SPACE t = new SPACE(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 20: break;

-        case 11: 

-          { COMMA t = new COMMA(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 21: break;

-        case 1: 

-          { SPECIAL t = new SPECIAL(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 22: break;

-        case 15: 

-          { MARKUP t = new MARKUP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 23: break;

-        case 6: 

-          { EXCLAMATION t = new EXCLAMATION(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 24: break;

-        case 7: 

-          { NBSP t = new NBSP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 25: break;

-        case 14: 

-          { CAP t = new CAP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 26: break;

-        case 12: 

-          { PERIOD t = new PERIOD(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 27: break;

-        case 5: 

-          { BREAK t = new BREAK(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 28: break;

-        case 2: 

-          { CW t = new CW(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 29: break;

-        case 10: 

-          { COLON t = new COLON(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 30: break;

-        case 9: 

-          { SEMICOLON t = new SEMICOLON(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 31: break;

-        case 16: 

-          { AMP t = new AMP(cas);

-                t.setBegin(yychar);

-                t.setEnd(yychar + yytext().length());

-                

-                return t;

-          }

-        case 32: break;

-        default: 

-          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {

-            zzAtEOF = true;

-            switch (zzLexicalState) {

-            case YYINITIAL: {

-              return null;

-            }

-            case 31: break;

-            default:

-            return null;

-            }

-          } 

-          else {

-            zzScanError(ZZ_NO_MATCH);

-          }

-      }

-    }

-  }

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ALL.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ALL.java
deleted file mode 100644
index 33210d0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ALL.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class ALL extends TokenSeed {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(ALL.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected ALL() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public ALL(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public ALL(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public ALL(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ALL_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ALL_Type.java
deleted file mode 100644
index 287bf13..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ALL_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class ALL_Type extends TokenSeed_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (ALL_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = ALL_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new ALL(addr, ALL_Type.this);
-          ALL_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new ALL(addr, ALL_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = ALL.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.ALL");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public ALL_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/AMP.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/AMP.java
deleted file mode 100644
index 7c192d6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/AMP.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class AMP extends ANY {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(AMP.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected AMP() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public AMP(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public AMP(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public AMP(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/AMP_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/AMP_Type.java
deleted file mode 100644
index 56c7185..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/AMP_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class AMP_Type extends ANY_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (AMP_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = AMP_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new AMP(addr, AMP_Type.this);
-          AMP_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new AMP(addr, AMP_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = AMP.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.AMP");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public AMP_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ANY.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ANY.java
deleted file mode 100644
index 4faf73b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ANY.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class ANY extends ALL {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(ANY.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected ANY() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public ANY(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public ANY(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public ANY(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ANY_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ANY_Type.java
deleted file mode 100644
index 43a5e98..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ANY_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class ANY_Type extends ALL_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (ANY_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = ANY_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new ANY(addr, ANY_Type.this);
-          ANY_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new ANY(addr, ANY_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = ANY.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.ANY");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public ANY_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/BREAK.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/BREAK.java
deleted file mode 100644
index 736cd16..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/BREAK.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class BREAK extends WS {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(BREAK.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected BREAK() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public BREAK(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public BREAK(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public BREAK(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/BREAK_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/BREAK_Type.java
deleted file mode 100644
index be299d6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/BREAK_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class BREAK_Type extends WS_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (BREAK_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = BREAK_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new BREAK(addr, BREAK_Type.this);
-          BREAK_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new BREAK(addr, BREAK_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = BREAK.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.BREAK");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public BREAK_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CAP.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CAP.java
deleted file mode 100644
index 7d43749..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CAP.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class CAP extends W {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(CAP.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected CAP() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public CAP(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public CAP(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public CAP(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CAP_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CAP_Type.java
deleted file mode 100644
index 72ebff0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CAP_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class CAP_Type extends W_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (CAP_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = CAP_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new CAP(addr, CAP_Type.this);
-          CAP_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new CAP(addr, CAP_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = CAP.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.CAP");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public CAP_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COLON.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COLON.java
deleted file mode 100644
index c7efa79..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COLON.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class COLON extends PM {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(COLON.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected COLON() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public COLON(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public COLON(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public COLON(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COLON_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COLON_Type.java
deleted file mode 100644
index 52b773f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COLON_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class COLON_Type extends PM_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (COLON_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = COLON_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new COLON(addr, COLON_Type.this);
-          COLON_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new COLON(addr, COLON_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = COLON.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.COLON");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public COLON_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COMMA.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COMMA.java
deleted file mode 100644
index 774aa15..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COMMA.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class COMMA extends PM {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(COMMA.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected COMMA() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public COMMA(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public COMMA(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public COMMA(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COMMA_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COMMA_Type.java
deleted file mode 100644
index c94f05c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/COMMA_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class COMMA_Type extends PM_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (COMMA_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = COMMA_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new COMMA(addr, COMMA_Type.this);
-          COMMA_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new COMMA(addr, COMMA_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = COMMA.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.COMMA");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public COMMA_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CW.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CW.java
deleted file mode 100644
index acd3131..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CW.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class CW extends W {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(CW.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected CW() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public CW(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public CW(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public CW(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CW_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CW_Type.java
deleted file mode 100644
index 0eacb31..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/CW_Type.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class CW_Type extends W_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (CW_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = CW_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new CW(addr, CW_Type.this);
-          CW_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new CW(addr, CW_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = CW.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.CW");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public CW_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugBlockApply.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugBlockApply.java
deleted file mode 100644
index 9f49fe1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugBlockApply.java
+++ /dev/null
@@ -1,135 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.FSArray;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugBlockApply extends DebugRuleApply {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugBlockApply.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugBlockApply() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugBlockApply(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugBlockApply(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugBlockApply(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: innerApply
-
-  /**
-   * getter for innerApply - gets
-   * 
-   * @generated
-   */
-  public FSArray getInnerApply() {
-    if (DebugBlockApply_Type.featOkTst
-            && ((DebugBlockApply_Type) jcasType).casFeat_innerApply == null)
-      jcasType.jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugBlockApply_Type) jcasType).casFeatCode_innerApply)));
-  }
-
-  /**
-   * setter for innerApply - sets
-   * 
-   * @generated
-   */
-  public void setInnerApply(FSArray v) {
-    if (DebugBlockApply_Type.featOkTst
-            && ((DebugBlockApply_Type) jcasType).casFeat_innerApply == null)
-      jcasType.jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    jcasType.ll_cas.ll_setRefValue(addr, ((DebugBlockApply_Type) jcasType).casFeatCode_innerApply,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for innerApply - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugScriptApply getInnerApply(int i) {
-    if (DebugBlockApply_Type.featOkTst
-            && ((DebugBlockApply_Type) jcasType).casFeat_innerApply == null)
-      jcasType.jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugBlockApply_Type) jcasType).casFeatCode_innerApply), i);
-    return (DebugScriptApply) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugBlockApply_Type) jcasType).casFeatCode_innerApply), i)));
-  }
-
-  /**
-   * indexed setter for innerApply - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setInnerApply(int i, DebugScriptApply v) {
-    if (DebugBlockApply_Type.featOkTst
-            && ((DebugBlockApply_Type) jcasType).casFeat_innerApply == null)
-      jcasType.jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugBlockApply_Type) jcasType).casFeatCode_innerApply), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugBlockApply_Type) jcasType).casFeatCode_innerApply), i, jcasType.ll_cas
-            .ll_getFSRef(v));
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugBlockApply_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugBlockApply_Type.java
deleted file mode 100644
index c33875a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugBlockApply_Type.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugBlockApply_Type extends DebugRuleApply_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugBlockApply_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugBlockApply_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugBlockApply(addr, DebugBlockApply_Type.this);
-          DebugBlockApply_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugBlockApply(addr, DebugBlockApply_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugBlockApply.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugBlockApply");
-
-  /** @generated */
-  final Feature casFeat_innerApply;
-
-  /** @generated */
-  final int casFeatCode_innerApply;
-
-  /** @generated */
-  public int getInnerApply(int addr) {
-    if (featOkTst && casFeat_innerApply == null)
-      jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_innerApply);
-  }
-
-  /** @generated */
-  public void setInnerApply(int addr, int v) {
-    if (featOkTst && casFeat_innerApply == null)
-      jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    ll_cas.ll_setRefValue(addr, casFeatCode_innerApply, v);
-  }
-
-  /** @generated */
-  public int getInnerApply(int addr, int i) {
-    if (featOkTst && casFeat_innerApply == null)
-      jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_innerApply), i,
-              true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_innerApply), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_innerApply), i);
-  }
-
-  /** @generated */
-  public void setInnerApply(int addr, int i, int v) {
-    if (featOkTst && casFeat_innerApply == null)
-      jcas.throwFeatMissing("innerApply", "org.apache.uima.ruta.type.DebugBlockApply");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_innerApply), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_innerApply), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_innerApply), i, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugBlockApply_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_innerApply = jcas.getRequiredFeatureDE(casType, "innerApply", "uima.cas.FSArray",
-            featOkTst);
-    casFeatCode_innerApply = (null == casFeat_innerApply) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_innerApply).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugCreatedBy.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugCreatedBy.java
deleted file mode 100644
index 5c56541..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugCreatedBy.java
+++ /dev/null
@@ -1,176 +0,0 @@
-
-/* First created by JCasGen Wed Jul 11 15:10:37 CEST 2012 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugCreatedBy extends TOP {
-  /**
-   * @generated
-   * @ordered
-   */
-  @SuppressWarnings("hiding")
-  public final static int typeIndexID = JCasRegistry.register(DebugCreatedBy.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  @SuppressWarnings("hiding")
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  @Override
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugCreatedBy() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugCreatedBy(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugCreatedBy(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {/* default - does nothing empty block */
-  }
-
-  // *--------------*
-  // * Feature: rule
-
-  /**
-   * getter for rule - gets
-   * 
-   * @generated
-   */
-  public String getRule() {
-    if (DebugCreatedBy_Type.featOkTst && ((DebugCreatedBy_Type) jcasType).casFeat_rule == null)
-      jcasType.jcas.throwFeatMissing("rule", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((DebugCreatedBy_Type) jcasType).casFeatCode_rule);
-  }
-
-  /**
-   * setter for rule - sets
-   * 
-   * @generated
-   */
-  public void setRule(String v) {
-    if (DebugCreatedBy_Type.featOkTst && ((DebugCreatedBy_Type) jcasType).casFeat_rule == null)
-      jcasType.jcas.throwFeatMissing("rule", "org.apache.uima.ruta.type.DebugCreatedBy");
-    jcasType.ll_cas.ll_setStringValue(addr, ((DebugCreatedBy_Type) jcasType).casFeatCode_rule, v);
-  }
-
-  // *--------------*
-  // * Feature: annotation
-
-  /**
-   * getter for annotation - gets
-   * 
-   * @generated
-   */
-  public Annotation getAnnotation() {
-    if (DebugCreatedBy_Type.featOkTst
-            && ((DebugCreatedBy_Type) jcasType).casFeat_annotation == null)
-      jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return (Annotation) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugCreatedBy_Type) jcasType).casFeatCode_annotation)));
-  }
-
-  /**
-   * setter for annotation - sets
-   * 
-   * @generated
-   */
-  public void setAnnotation(Annotation v) {
-    if (DebugCreatedBy_Type.featOkTst
-            && ((DebugCreatedBy_Type) jcasType).casFeat_annotation == null)
-      jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.DebugCreatedBy");
-    jcasType.ll_cas.ll_setRefValue(addr, ((DebugCreatedBy_Type) jcasType).casFeatCode_annotation,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  // *--------------*
-  // * Feature: script
-
-  /**
-   * getter for script - gets
-   * 
-   * @generated
-   */
-  public String getScript() {
-    if (DebugCreatedBy_Type.featOkTst && ((DebugCreatedBy_Type) jcasType).casFeat_script == null)
-      jcasType.jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((DebugCreatedBy_Type) jcasType).casFeatCode_script);
-  }
-
-  /**
-   * setter for script - sets
-   * 
-   * @generated
-   */
-  public void setScript(String v) {
-    if (DebugCreatedBy_Type.featOkTst && ((DebugCreatedBy_Type) jcasType).casFeat_script == null)
-      jcasType.jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugCreatedBy");
-    jcasType.ll_cas.ll_setStringValue(addr, ((DebugCreatedBy_Type) jcasType).casFeatCode_script, v);
-  }
-
-  // *--------------*
-  // * Feature: id
-
-  /**
-   * getter for id - gets
-   * 
-   * @generated
-   */
-  public int getId() {
-    if (DebugCreatedBy_Type.featOkTst && ((DebugCreatedBy_Type) jcasType).casFeat_id == null)
-      jcasType.jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return jcasType.ll_cas.ll_getIntValue(addr, ((DebugCreatedBy_Type) jcasType).casFeatCode_id);
-  }
-
-  /**
-   * setter for id - sets
-   * 
-   * @generated
-   */
-  public void setId(int v) {
-    if (DebugCreatedBy_Type.featOkTst && ((DebugCreatedBy_Type) jcasType).casFeat_id == null)
-      jcasType.jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugCreatedBy");
-    jcasType.ll_cas.ll_setIntValue(addr, ((DebugCreatedBy_Type) jcasType).casFeatCode_id, v);
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugCreatedBy_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugCreatedBy_Type.java
deleted file mode 100644
index 6eb6f9d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugCreatedBy_Type.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/* First created by JCasGen Wed Jul 11 15:10:37 CEST 2012 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugCreatedBy_Type extends TOP_Type {
-  /** @generated */
-  @Override
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugCreatedBy_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugCreatedBy_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugCreatedBy(addr, DebugCreatedBy_Type.this);
-          DebugCreatedBy_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugCreatedBy(addr, DebugCreatedBy_Type.this);
-    }
-  };
-
-  /** @generated */
-  @SuppressWarnings("hiding")
-  public final static int typeIndexID = DebugCreatedBy.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  @SuppressWarnings("hiding")
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugCreatedBy");
-
-  /** @generated */
-  final Feature casFeat_rule;
-
-  /** @generated */
-  final int casFeatCode_rule;
-
-  /** @generated */
-  public String getRule(int addr) {
-    if (featOkTst && casFeat_rule == null)
-      jcas.throwFeatMissing("rule", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_rule);
-  }
-
-  /** @generated */
-  public void setRule(int addr, String v) {
-    if (featOkTst && casFeat_rule == null)
-      jcas.throwFeatMissing("rule", "org.apache.uima.ruta.type.DebugCreatedBy");
-    ll_cas.ll_setStringValue(addr, casFeatCode_rule, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_annotation;
-
-  /** @generated */
-  final int casFeatCode_annotation;
-
-  /** @generated */
-  public int getAnnotation(int addr) {
-    if (featOkTst && casFeat_annotation == null)
-      jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_annotation);
-  }
-
-  /** @generated */
-  public void setAnnotation(int addr, int v) {
-    if (featOkTst && casFeat_annotation == null)
-      jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.DebugCreatedBy");
-    ll_cas.ll_setRefValue(addr, casFeatCode_annotation, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_script;
-
-  /** @generated */
-  final int casFeatCode_script;
-
-  /** @generated */
-  public String getScript(int addr) {
-    if (featOkTst && casFeat_script == null)
-      jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_script);
-  }
-
-  /** @generated */
-  public void setScript(int addr, String v) {
-    if (featOkTst && casFeat_script == null)
-      jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugCreatedBy");
-    ll_cas.ll_setStringValue(addr, casFeatCode_script, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_id;
-
-  /** @generated */
-  final int casFeatCode_id;
-
-  /** @generated */
-  public int getId(int addr) {
-    if (featOkTst && casFeat_id == null)
-      jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugCreatedBy");
-    return ll_cas.ll_getIntValue(addr, casFeatCode_id);
-  }
-
-  /** @generated */
-  public void setId(int addr, int v) {
-    if (featOkTst && casFeat_id == null)
-      jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugCreatedBy");
-    ll_cas.ll_setIntValue(addr, casFeatCode_id, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugCreatedBy_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_rule = jcas.getRequiredFeatureDE(casType, "rule", "uima.cas.String", featOkTst);
-    casFeatCode_rule = (null == casFeat_rule) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_rule).getCode();
-
-    casFeat_annotation = jcas.getRequiredFeatureDE(casType, "annotation", "uima.tcas.Annotation",
-            featOkTst);
-    casFeatCode_annotation = (null == casFeat_annotation) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_annotation).getCode();
-
-    casFeat_script = jcas.getRequiredFeatureDE(casType, "script", "uima.cas.String", featOkTst);
-    casFeatCode_script = (null == casFeat_script) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_script).getCode();
-
-    casFeat_id = jcas.getRequiredFeatureDE(casType, "id", "uima.cas.Integer", featOkTst);
-    casFeatCode_id = (null == casFeat_id) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_id)
-            .getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugEvaluatedCondition.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugEvaluatedCondition.java
deleted file mode 100644
index 195dbce..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugEvaluatedCondition.java
+++ /dev/null
@@ -1,193 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.FSArray;
-import org.apache.uima.jcas.cas.TOP;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugEvaluatedCondition extends TOP {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugEvaluatedCondition.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugEvaluatedCondition() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugEvaluatedCondition(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugEvaluatedCondition(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: element
-
-  /**
-   * getter for element - gets
-   * 
-   * @generated
-   */
-  public String getElement() {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_element == null)
-      jcasType.jcas
-              .throwFeatMissing("element", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_element);
-  }
-
-  /**
-   * setter for element - sets
-   * 
-   * @generated
-   */
-  public void setElement(String v) {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_element == null)
-      jcasType.jcas
-              .throwFeatMissing("element", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    jcasType.ll_cas.ll_setStringValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_element, v);
-  }
-
-  // *--------------*
-  // * Feature: value
-
-  /**
-   * getter for value - gets
-   * 
-   * @generated
-   */
-  public boolean getValue() {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_value == null)
-      jcasType.jcas.throwFeatMissing("value", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    return jcasType.ll_cas.ll_getBooleanValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_value);
-  }
-
-  /**
-   * setter for value - sets
-   * 
-   * @generated
-   */
-  public void setValue(boolean v) {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_value == null)
-      jcasType.jcas.throwFeatMissing("value", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    jcasType.ll_cas.ll_setBooleanValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_value, v);
-  }
-
-  // *--------------*
-  // * Feature: conditions
-
-  /**
-   * getter for conditions - gets
-   * 
-   * @generated
-   */
-  public FSArray getConditions() {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_conditions)));
-  }
-
-  /**
-   * setter for conditions - sets
-   * 
-   * @generated
-   */
-  public void setConditions(FSArray v) {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    jcasType.ll_cas.ll_setRefValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_conditions,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for conditions - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugEvaluatedCondition getConditions(int i) {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_conditions), i);
-    return (DebugEvaluatedCondition) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas
-            .ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_conditions), i)));
-  }
-
-  /**
-   * indexed setter for conditions - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setConditions(int i, DebugEvaluatedCondition v) {
-    if (DebugEvaluatedCondition_Type.featOkTst
-            && ((DebugEvaluatedCondition_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_conditions), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugEvaluatedCondition_Type) jcasType).casFeatCode_conditions), i, jcasType.ll_cas
-            .ll_getFSRef(v));
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugEvaluatedCondition_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugEvaluatedCondition_Type.java
deleted file mode 100644
index 281730a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugEvaluatedCondition_Type.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugEvaluatedCondition_Type extends TOP_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugEvaluatedCondition_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugEvaluatedCondition_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugEvaluatedCondition(addr, DebugEvaluatedCondition_Type.this);
-          DebugEvaluatedCondition_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugEvaluatedCondition(addr, DebugEvaluatedCondition_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugEvaluatedCondition.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugEvaluatedCondition");
-
-  /** @generated */
-  final Feature casFeat_element;
-
-  /** @generated */
-  final int casFeatCode_element;
-
-  /** @generated */
-  public String getElement(int addr) {
-    if (featOkTst && casFeat_element == null)
-      jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_element);
-  }
-
-  /** @generated */
-  public void setElement(int addr, String v) {
-    if (featOkTst && casFeat_element == null)
-      jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    ll_cas.ll_setStringValue(addr, casFeatCode_element, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_value;
-
-  /** @generated */
-  final int casFeatCode_value;
-
-  /** @generated */
-  public boolean getValue(int addr) {
-    if (featOkTst && casFeat_value == null)
-      jcas.throwFeatMissing("value", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    return ll_cas.ll_getBooleanValue(addr, casFeatCode_value);
-  }
-
-  /** @generated */
-  public void setValue(int addr, boolean v) {
-    if (featOkTst && casFeat_value == null)
-      jcas.throwFeatMissing("value", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    ll_cas.ll_setBooleanValue(addr, casFeatCode_value, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_conditions;
-
-  /** @generated */
-  final int casFeatCode_conditions;
-
-  /** @generated */
-  public int getConditions(int addr) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_conditions);
-  }
-
-  /** @generated */
-  public void setConditions(int addr, int v) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    ll_cas.ll_setRefValue(addr, casFeatCode_conditions, v);
-  }
-
-  /** @generated */
-  public int getConditions(int addr, int i) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i,
-              true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i);
-  }
-
-  /** @generated */
-  public void setConditions(int addr, int i, int v) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugEvaluatedCondition");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugEvaluatedCondition_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_element = jcas.getRequiredFeatureDE(casType, "element", "uima.cas.String", featOkTst);
-    casFeatCode_element = (null == casFeat_element) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_element).getCode();
-
-    casFeat_value = jcas.getRequiredFeatureDE(casType, "value", "uima.cas.Boolean", featOkTst);
-    casFeatCode_value = (null == casFeat_value) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_value).getCode();
-
-    casFeat_conditions = jcas.getRequiredFeatureDE(casType, "conditions", "uima.cas.FSArray",
-            featOkTst);
-    casFeatCode_conditions = (null == casFeat_conditions) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_conditions).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugFailedRuleMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugFailedRuleMatch.java
deleted file mode 100644
index f8bd3a1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugFailedRuleMatch.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugFailedRuleMatch extends DebugRuleMatch {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugFailedRuleMatch.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugFailedRuleMatch() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugFailedRuleMatch(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugFailedRuleMatch(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugFailedRuleMatch(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugFailedRuleMatch_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugFailedRuleMatch_Type.java
deleted file mode 100644
index 432b1f7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugFailedRuleMatch_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugFailedRuleMatch_Type extends DebugRuleMatch_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugFailedRuleMatch_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugFailedRuleMatch_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugFailedRuleMatch(addr, DebugFailedRuleMatch_Type.this);
-          DebugFailedRuleMatch_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugFailedRuleMatch(addr, DebugFailedRuleMatch_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugFailedRuleMatch.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugFailedRuleMatch");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugFailedRuleMatch_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugMatchedRuleMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugMatchedRuleMatch.java
deleted file mode 100644
index 9f5e616..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugMatchedRuleMatch.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugMatchedRuleMatch extends DebugRuleMatch {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugMatchedRuleMatch.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugMatchedRuleMatch() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugMatchedRuleMatch(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugMatchedRuleMatch(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugMatchedRuleMatch(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugMatchedRuleMatch_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugMatchedRuleMatch_Type.java
deleted file mode 100644
index 1467ec7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugMatchedRuleMatch_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugMatchedRuleMatch_Type extends DebugRuleMatch_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugMatchedRuleMatch_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugMatchedRuleMatch_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugMatchedRuleMatch(addr, DebugMatchedRuleMatch_Type.this);
-          DebugMatchedRuleMatch_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugMatchedRuleMatch(addr, DebugMatchedRuleMatch_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugMatchedRuleMatch.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugMatchedRuleMatch");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugMatchedRuleMatch_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleApply.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleApply.java
deleted file mode 100644
index 0add512..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleApply.java
+++ /dev/null
@@ -1,232 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.FSArray;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugRuleApply extends DebugScriptApply {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugRuleApply.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugRuleApply() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugRuleApply(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugRuleApply(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugRuleApply(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: applied
-
-  /**
-   * getter for applied - gets
-   * 
-   * @generated
-   */
-  public int getApplied() {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_applied == null)
-      jcasType.jcas.throwFeatMissing("applied", "org.apache.uima.ruta.type.DebugRuleApply");
-    return jcasType.ll_cas.ll_getIntValue(addr,
-            ((DebugRuleApply_Type) jcasType).casFeatCode_applied);
-  }
-
-  /**
-   * setter for applied - sets
-   * 
-   * @generated
-   */
-  public void setApplied(int v) {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_applied == null)
-      jcasType.jcas.throwFeatMissing("applied", "org.apache.uima.ruta.type.DebugRuleApply");
-    jcasType.ll_cas.ll_setIntValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_applied, v);
-  }
-
-  // *--------------*
-  // * Feature: tried
-
-  /**
-   * getter for tried - gets
-   * 
-   * @generated
-   */
-  public int getTried() {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_tried == null)
-      jcasType.jcas.throwFeatMissing("tried", "org.apache.uima.ruta.type.DebugRuleApply");
-    return jcasType.ll_cas.ll_getIntValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_tried);
-  }
-
-  /**
-   * setter for tried - sets
-   * 
-   * @generated
-   */
-  public void setTried(int v) {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_tried == null)
-      jcasType.jcas.throwFeatMissing("tried", "org.apache.uima.ruta.type.DebugRuleApply");
-    jcasType.ll_cas.ll_setIntValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_tried, v);
-  }
-
-  // *--------------*
-  // * Feature: rules
-
-  /**
-   * getter for rules - gets
-   * 
-   * @generated
-   */
-  public FSArray getRules() {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_rules == null)
-      jcasType.jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleApply_Type) jcasType).casFeatCode_rules)));
-  }
-
-  /**
-   * setter for rules - sets
-   * 
-   * @generated
-   */
-  public void setRules(FSArray v) {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_rules == null)
-      jcasType.jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    jcasType.ll_cas.ll_setRefValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_rules,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for rules - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugRuleMatch getRules(int i) {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_rules == null)
-      jcasType.jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleApply_Type) jcasType).casFeatCode_rules), i);
-    return (DebugRuleMatch) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(
-            jcasType.ll_cas
-                    .ll_getRefValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_rules), i)));
-  }
-
-  /**
-   * indexed setter for rules - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setRules(int i, DebugRuleMatch v) {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_rules == null)
-      jcasType.jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleApply_Type) jcasType).casFeatCode_rules), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleApply_Type) jcasType).casFeatCode_rules), i, jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  // *--------------*
-  // * Feature: id
-
-  /**
-   * getter for id - gets
-   * 
-   * @generated
-   */
-  public int getId() {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_id == null)
-      jcasType.jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugRuleApply");
-    return jcasType.ll_cas.ll_getIntValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_id);
-  }
-
-  /**
-   * setter for id - sets
-   * 
-   * @generated
-   */
-  public void setId(int v) {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_id == null)
-      jcasType.jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugRuleApply");
-    jcasType.ll_cas.ll_setIntValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_id, v);
-  }
-
-  // *--------------*
-  // * Feature: script
-
-  /**
-   * getter for script - gets
-   * 
-   * @generated
-   */
-  public String getScript() {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_script == null)
-      jcasType.jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugRuleApply");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((DebugRuleApply_Type) jcasType).casFeatCode_script);
-  }
-
-  /**
-   * setter for script - sets
-   * 
-   * @generated
-   */
-  public void setScript(String v) {
-    if (DebugRuleApply_Type.featOkTst && ((DebugRuleApply_Type) jcasType).casFeat_script == null)
-      jcasType.jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugRuleApply");
-    jcasType.ll_cas.ll_setStringValue(addr, ((DebugRuleApply_Type) jcasType).casFeatCode_script, v);
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleApply_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleApply_Type.java
deleted file mode 100644
index 8f7975c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleApply_Type.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugRuleApply_Type extends DebugScriptApply_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugRuleApply_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugRuleApply_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugRuleApply(addr, DebugRuleApply_Type.this);
-          DebugRuleApply_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugRuleApply(addr, DebugRuleApply_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugRuleApply.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugRuleApply");
-
-  /** @generated */
-  final Feature casFeat_applied;
-
-  /** @generated */
-  final int casFeatCode_applied;
-
-  /** @generated */
-  public int getApplied(int addr) {
-    if (featOkTst && casFeat_applied == null)
-      jcas.throwFeatMissing("applied", "org.apache.uima.ruta.type.DebugRuleApply");
-    return ll_cas.ll_getIntValue(addr, casFeatCode_applied);
-  }
-
-  /** @generated */
-  public void setApplied(int addr, int v) {
-    if (featOkTst && casFeat_applied == null)
-      jcas.throwFeatMissing("applied", "org.apache.uima.ruta.type.DebugRuleApply");
-    ll_cas.ll_setIntValue(addr, casFeatCode_applied, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_tried;
-
-  /** @generated */
-  final int casFeatCode_tried;
-
-  /** @generated */
-  public int getTried(int addr) {
-    if (featOkTst && casFeat_tried == null)
-      jcas.throwFeatMissing("tried", "org.apache.uima.ruta.type.DebugRuleApply");
-    return ll_cas.ll_getIntValue(addr, casFeatCode_tried);
-  }
-
-  /** @generated */
-  public void setTried(int addr, int v) {
-    if (featOkTst && casFeat_tried == null)
-      jcas.throwFeatMissing("tried", "org.apache.uima.ruta.type.DebugRuleApply");
-    ll_cas.ll_setIntValue(addr, casFeatCode_tried, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_rules;
-
-  /** @generated */
-  final int casFeatCode_rules;
-
-  /** @generated */
-  public int getRules(int addr) {
-    if (featOkTst && casFeat_rules == null)
-      jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_rules);
-  }
-
-  /** @generated */
-  public void setRules(int addr, int v) {
-    if (featOkTst && casFeat_rules == null)
-      jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    ll_cas.ll_setRefValue(addr, casFeatCode_rules, v);
-  }
-
-  /** @generated */
-  public int getRules(int addr, int i) {
-    if (featOkTst && casFeat_rules == null)
-      jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_rules), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_rules), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_rules), i);
-  }
-
-  /** @generated */
-  public void setRules(int addr, int i, int v) {
-    if (featOkTst && casFeat_rules == null)
-      jcas.throwFeatMissing("rules", "org.apache.uima.ruta.type.DebugRuleApply");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_rules), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_rules), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_rules), i, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_id;
-
-  /** @generated */
-  final int casFeatCode_id;
-
-  /** @generated */
-  public int getId(int addr) {
-    if (featOkTst && casFeat_id == null)
-      jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugRuleApply");
-    return ll_cas.ll_getIntValue(addr, casFeatCode_id);
-  }
-
-  /** @generated */
-  public void setId(int addr, int v) {
-    if (featOkTst && casFeat_id == null)
-      jcas.throwFeatMissing("id", "org.apache.uima.ruta.type.DebugRuleApply");
-    ll_cas.ll_setIntValue(addr, casFeatCode_id, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_script;
-
-  /** @generated */
-  final int casFeatCode_script;
-
-  /** @generated */
-  public String getScript(int addr) {
-    if (featOkTst && casFeat_script == null)
-      jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugRuleApply");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_script);
-  }
-
-  /** @generated */
-  public void setScript(int addr, String v) {
-    if (featOkTst && casFeat_script == null)
-      jcas.throwFeatMissing("script", "org.apache.uima.ruta.type.DebugRuleApply");
-    ll_cas.ll_setStringValue(addr, casFeatCode_script, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugRuleApply_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_applied = jcas.getRequiredFeatureDE(casType, "applied", "uima.cas.Integer", featOkTst);
-    casFeatCode_applied = (null == casFeat_applied) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_applied).getCode();
-
-    casFeat_tried = jcas.getRequiredFeatureDE(casType, "tried", "uima.cas.Integer", featOkTst);
-    casFeatCode_tried = (null == casFeat_tried) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_tried).getCode();
-
-    casFeat_rules = jcas.getRequiredFeatureDE(casType, "rules", "uima.cas.FSArray", featOkTst);
-    casFeatCode_rules = (null == casFeat_rules) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_rules).getCode();
-
-    casFeat_id = jcas.getRequiredFeatureDE(casType, "id", "uima.cas.Integer", featOkTst);
-    casFeatCode_id = (null == casFeat_id) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_id)
-            .getCode();
-
-    casFeat_script = jcas.getRequiredFeatureDE(casType, "script", "uima.cas.String", featOkTst);
-    casFeatCode_script = (null == casFeat_script) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_script).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatch.java
deleted file mode 100644
index 6d7e0ab..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatch.java
+++ /dev/null
@@ -1,235 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.FSArray;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugRuleElementMatch extends ProfiledAnnotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugRuleElementMatch.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugRuleElementMatch() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugRuleElementMatch(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugRuleElementMatch(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugRuleElementMatch(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: baseCondition
-
-  /**
-   * getter for baseCondition - gets
-   * 
-   * @generated
-   */
-  public DebugEvaluatedCondition getBaseCondition() {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_baseCondition == null)
-      jcasType.jcas.throwFeatMissing("baseCondition",
-              "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    return (DebugEvaluatedCondition) (jcasType.ll_cas
-            .ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugRuleElementMatch_Type) jcasType).casFeatCode_baseCondition)));
-  }
-
-  /**
-   * setter for baseCondition - sets
-   * 
-   * @generated
-   */
-  public void setBaseCondition(DebugEvaluatedCondition v) {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_baseCondition == null)
-      jcasType.jcas.throwFeatMissing("baseCondition",
-              "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    jcasType.ll_cas.ll_setRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_baseCondition,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  // *--------------*
-  // * Feature: conditions
-
-  /**
-   * getter for conditions - gets
-   * 
-   * @generated
-   */
-  public FSArray getConditions() {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_conditions)));
-  }
-
-  /**
-   * setter for conditions - sets
-   * 
-   * @generated
-   */
-  public void setConditions(FSArray v) {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    jcasType.ll_cas.ll_setRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_conditions,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for conditions - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugEvaluatedCondition getConditions(int i) {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_conditions), i);
-    return (DebugEvaluatedCondition) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas
-            .ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugRuleElementMatch_Type) jcasType).casFeatCode_conditions), i)));
-  }
-
-  /**
-   * indexed setter for conditions - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setConditions(int i, DebugEvaluatedCondition v) {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_conditions == null)
-      jcasType.jcas.throwFeatMissing("conditions",
-              "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_conditions), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_conditions), i, jcasType.ll_cas
-            .ll_getFSRef(v));
-  }
-
-  // *--------------*
-  // * Feature: elements
-
-  /**
-   * getter for elements - gets
-   * 
-   * @generated
-   */
-  public FSArray getElements() {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_elements)));
-  }
-
-  /**
-   * setter for elements - sets
-   * 
-   * @generated
-   */
-  public void setElements(FSArray v) {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    jcasType.ll_cas.ll_setRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_elements,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for elements - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugRuleElementMatches getElements(int i) {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_elements), i);
-    return (DebugRuleElementMatches) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas
-            .ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugRuleElementMatch_Type) jcasType).casFeatCode_elements), i)));
-  }
-
-  /**
-   * indexed setter for elements - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setElements(int i, DebugRuleElementMatches v) {
-    if (DebugRuleElementMatch_Type.featOkTst
-            && ((DebugRuleElementMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_elements), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatch_Type) jcasType).casFeatCode_elements), i, jcasType.ll_cas
-            .ll_getFSRef(v));
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatch_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatch_Type.java
deleted file mode 100644
index 6607495..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatch_Type.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugRuleElementMatch_Type extends ProfiledAnnotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugRuleElementMatch_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugRuleElementMatch_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugRuleElementMatch(addr, DebugRuleElementMatch_Type.this);
-          DebugRuleElementMatch_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugRuleElementMatch(addr, DebugRuleElementMatch_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugRuleElementMatch.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugRuleElementMatch");
-
-  /** @generated */
-  final Feature casFeat_baseCondition;
-
-  /** @generated */
-  final int casFeatCode_baseCondition;
-
-  /** @generated */
-  public int getBaseCondition(int addr) {
-    if (featOkTst && casFeat_baseCondition == null)
-      jcas.throwFeatMissing("baseCondition", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_baseCondition);
-  }
-
-  /** @generated */
-  public void setBaseCondition(int addr, int v) {
-    if (featOkTst && casFeat_baseCondition == null)
-      jcas.throwFeatMissing("baseCondition", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    ll_cas.ll_setRefValue(addr, casFeatCode_baseCondition, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_conditions;
-
-  /** @generated */
-  final int casFeatCode_conditions;
-
-  /** @generated */
-  public int getConditions(int addr) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_conditions);
-  }
-
-  /** @generated */
-  public void setConditions(int addr, int v) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    ll_cas.ll_setRefValue(addr, casFeatCode_conditions, v);
-  }
-
-  /** @generated */
-  public int getConditions(int addr, int i) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i,
-              true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i);
-  }
-
-  /** @generated */
-  public void setConditions(int addr, int i, int v) {
-    if (featOkTst && casFeat_conditions == null)
-      jcas.throwFeatMissing("conditions", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_conditions), i, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_elements;
-
-  /** @generated */
-  final int casFeatCode_elements;
-
-  /** @generated */
-  public int getElements(int addr) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_elements);
-  }
-
-  /** @generated */
-  public void setElements(int addr, int v) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    ll_cas.ll_setRefValue(addr, casFeatCode_elements, v);
-  }
-
-  /** @generated */
-  public int getElements(int addr, int i) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i);
-  }
-
-  /** @generated */
-  public void setElements(int addr, int i, int v) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleElementMatch");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugRuleElementMatch_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_baseCondition = jcas.getRequiredFeatureDE(casType, "baseCondition",
-            "org.apache.uima.ruta.type.DebugEvaluatedCondition", featOkTst);
-    casFeatCode_baseCondition = (null == casFeat_baseCondition) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_baseCondition).getCode();
-
-    casFeat_conditions = jcas.getRequiredFeatureDE(casType, "conditions", "uima.cas.FSArray",
-            featOkTst);
-    casFeatCode_conditions = (null == casFeat_conditions) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_conditions).getCode();
-
-    casFeat_elements = jcas
-            .getRequiredFeatureDE(casType, "elements", "uima.cas.FSArray", featOkTst);
-    casFeatCode_elements = (null == casFeat_elements) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_elements).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatches.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatches.java
deleted file mode 100644
index dbfb282..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatches.java
+++ /dev/null
@@ -1,195 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.FSArray;
-import org.apache.uima.jcas.cas.TOP;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugRuleElementMatches extends TOP {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugRuleElementMatches.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugRuleElementMatches() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugRuleElementMatches(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugRuleElementMatches(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: matches
-
-  /**
-   * getter for matches - gets
-   * 
-   * @generated
-   */
-  public FSArray getMatches() {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_matches == null)
-      jcasType.jcas
-              .throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_matches)));
-  }
-
-  /**
-   * setter for matches - sets
-   * 
-   * @generated
-   */
-  public void setMatches(FSArray v) {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_matches == null)
-      jcasType.jcas
-              .throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    jcasType.ll_cas.ll_setRefValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_matches,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for matches - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugRuleElementMatch getMatches(int i) {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_matches == null)
-      jcasType.jcas
-              .throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_matches), i);
-    return (DebugRuleElementMatch) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas
-            .ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugRuleElementMatches_Type) jcasType).casFeatCode_matches), i)));
-  }
-
-  /**
-   * indexed setter for matches - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setMatches(int i, DebugRuleElementMatch v) {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_matches == null)
-      jcasType.jcas
-              .throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_matches), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_matches), i, jcasType.ll_cas
-            .ll_getFSRef(v));
-  }
-
-  // *--------------*
-  // * Feature: element
-
-  /**
-   * getter for element - gets
-   * 
-   * @generated
-   */
-  public String getElement() {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_element == null)
-      jcasType.jcas
-              .throwFeatMissing("element", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_element);
-  }
-
-  /**
-   * setter for element - sets
-   * 
-   * @generated
-   */
-  public void setElement(String v) {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_element == null)
-      jcasType.jcas
-              .throwFeatMissing("element", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    jcasType.ll_cas.ll_setStringValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_element, v);
-  }
-
-  // *--------------*
-  // * Feature: ruleAnchor
-
-  /**
-   * getter for ruleAnchor - gets
-   * 
-   * @generated
-   */
-  public boolean getRuleAnchor() {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_ruleAnchor == null)
-      jcasType.jcas.throwFeatMissing("ruleAnchor",
-              "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    return jcasType.ll_cas.ll_getBooleanValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_ruleAnchor);
-  }
-
-  /**
-   * setter for ruleAnchor - sets
-   * 
-   * @generated
-   */
-  public void setRuleAnchor(boolean v) {
-    if (DebugRuleElementMatches_Type.featOkTst
-            && ((DebugRuleElementMatches_Type) jcasType).casFeat_ruleAnchor == null)
-      jcasType.jcas.throwFeatMissing("ruleAnchor",
-              "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    jcasType.ll_cas.ll_setBooleanValue(addr,
-            ((DebugRuleElementMatches_Type) jcasType).casFeatCode_ruleAnchor, v);
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatches_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatches_Type.java
deleted file mode 100644
index 13832e0..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleElementMatches_Type.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugRuleElementMatches_Type extends TOP_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugRuleElementMatches_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugRuleElementMatches_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugRuleElementMatches(addr, DebugRuleElementMatches_Type.this);
-          DebugRuleElementMatches_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugRuleElementMatches(addr, DebugRuleElementMatches_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugRuleElementMatches.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugRuleElementMatches");
-
-  /** @generated */
-  final Feature casFeat_matches;
-
-  /** @generated */
-  final int casFeatCode_matches;
-
-  /** @generated */
-  public int getMatches(int addr) {
-    if (featOkTst && casFeat_matches == null)
-      jcas.throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_matches);
-  }
-
-  /** @generated */
-  public void setMatches(int addr, int v) {
-    if (featOkTst && casFeat_matches == null)
-      jcas.throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    ll_cas.ll_setRefValue(addr, casFeatCode_matches, v);
-  }
-
-  /** @generated */
-  public int getMatches(int addr, int i) {
-    if (featOkTst && casFeat_matches == null)
-      jcas.throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_matches), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_matches), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_matches), i);
-  }
-
-  /** @generated */
-  public void setMatches(int addr, int i, int v) {
-    if (featOkTst && casFeat_matches == null)
-      jcas.throwFeatMissing("matches", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_matches), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_matches), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_matches), i, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_element;
-
-  /** @generated */
-  final int casFeatCode_element;
-
-  /** @generated */
-  public String getElement(int addr) {
-    if (featOkTst && casFeat_element == null)
-      jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_element);
-  }
-
-  /** @generated */
-  public void setElement(int addr, String v) {
-    if (featOkTst && casFeat_element == null)
-      jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    ll_cas.ll_setStringValue(addr, casFeatCode_element, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_ruleAnchor;
-
-  /** @generated */
-  final int casFeatCode_ruleAnchor;
-
-  /** @generated */
-  public boolean getRuleAnchor(int addr) {
-    if (featOkTst && casFeat_ruleAnchor == null)
-      jcas.throwFeatMissing("ruleAnchor", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    return ll_cas.ll_getBooleanValue(addr, casFeatCode_ruleAnchor);
-  }
-
-  /** @generated */
-  public void setRuleAnchor(int addr, boolean v) {
-    if (featOkTst && casFeat_ruleAnchor == null)
-      jcas.throwFeatMissing("ruleAnchor", "org.apache.uima.ruta.type.DebugRuleElementMatches");
-    ll_cas.ll_setBooleanValue(addr, casFeatCode_ruleAnchor, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugRuleElementMatches_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_matches = jcas.getRequiredFeatureDE(casType, "matches", "uima.cas.FSArray", featOkTst);
-    casFeatCode_matches = (null == casFeat_matches) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_matches).getCode();
-
-    casFeat_element = jcas.getRequiredFeatureDE(casType, "element", "uima.cas.String", featOkTst);
-    casFeatCode_element = (null == casFeat_element) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_element).getCode();
-
-    casFeat_ruleAnchor = jcas.getRequiredFeatureDE(casType, "ruleAnchor", "uima.cas.Boolean",
-            featOkTst);
-    casFeatCode_ruleAnchor = (null == casFeat_ruleAnchor) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_ruleAnchor).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleMatch.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleMatch.java
deleted file mode 100644
index d4250ca..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleMatch.java
+++ /dev/null
@@ -1,215 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.FSArray;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugRuleMatch extends ProfiledAnnotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugRuleMatch.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugRuleMatch() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugRuleMatch(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugRuleMatch(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugRuleMatch(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: elements
-
-  /**
-   * getter for elements - gets
-   * 
-   * @generated
-   */
-  public FSArray getElements() {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_elements)));
-  }
-
-  /**
-   * setter for elements - sets
-   * 
-   * @generated
-   */
-  public void setElements(FSArray v) {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    jcasType.ll_cas.ll_setRefValue(addr, ((DebugRuleMatch_Type) jcasType).casFeatCode_elements,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for elements - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugRuleElementMatches getElements(int i) {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_elements), i);
-    return (DebugRuleElementMatches) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas
-            .ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugRuleMatch_Type) jcasType).casFeatCode_elements), i)));
-  }
-
-  /**
-   * indexed setter for elements - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setElements(int i, DebugRuleElementMatches v) {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_elements == null)
-      jcasType.jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_elements), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_elements), i, jcasType.ll_cas
-            .ll_getFSRef(v));
-  }
-
-  // *--------------*
-  // * Feature: matched
-
-  /**
-   * getter for matched - gets
-   * 
-   * @generated
-   */
-  public boolean getMatched() {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_matched == null)
-      jcasType.jcas.throwFeatMissing("matched", "org.apache.uima.ruta.type.DebugRuleMatch");
-    return jcasType.ll_cas.ll_getBooleanValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_matched);
-  }
-
-  /**
-   * setter for matched - sets
-   * 
-   * @generated
-   */
-  public void setMatched(boolean v) {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_matched == null)
-      jcasType.jcas.throwFeatMissing("matched", "org.apache.uima.ruta.type.DebugRuleMatch");
-    jcasType.ll_cas.ll_setBooleanValue(addr, ((DebugRuleMatch_Type) jcasType).casFeatCode_matched,
-            v);
-  }
-
-  // *--------------*
-  // * Feature: delegates
-
-  /**
-   * getter for delegates - gets
-   * 
-   * @generated
-   */
-  public FSArray getDelegates() {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_delegates == null)
-      jcasType.jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_delegates)));
-  }
-
-  /**
-   * setter for delegates - sets
-   * 
-   * @generated
-   */
-  public void setDelegates(FSArray v) {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_delegates == null)
-      jcasType.jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    jcasType.ll_cas.ll_setRefValue(addr, ((DebugRuleMatch_Type) jcasType).casFeatCode_delegates,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for delegates - gets an indexed value -
-   * 
-   * @generated
-   */
-  public DebugScriptApply getDelegates(int i) {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_delegates == null)
-      jcasType.jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_delegates), i);
-    return (DebugScriptApply) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr,
-                    ((DebugRuleMatch_Type) jcasType).casFeatCode_delegates), i)));
-  }
-
-  /**
-   * indexed setter for delegates - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setDelegates(int i, DebugScriptApply v) {
-    if (DebugRuleMatch_Type.featOkTst && ((DebugRuleMatch_Type) jcasType).casFeat_delegates == null)
-      jcasType.jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_delegates), i);
-    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-            ((DebugRuleMatch_Type) jcasType).casFeatCode_delegates), i, jcasType.ll_cas
-            .ll_getFSRef(v));
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleMatch_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleMatch_Type.java
deleted file mode 100644
index 9afd808..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugRuleMatch_Type.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugRuleMatch_Type extends ProfiledAnnotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugRuleMatch_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugRuleMatch_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugRuleMatch(addr, DebugRuleMatch_Type.this);
-          DebugRuleMatch_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugRuleMatch(addr, DebugRuleMatch_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugRuleMatch.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugRuleMatch");
-
-  /** @generated */
-  final Feature casFeat_elements;
-
-  /** @generated */
-  final int casFeatCode_elements;
-
-  /** @generated */
-  public int getElements(int addr) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_elements);
-  }
-
-  /** @generated */
-  public void setElements(int addr, int v) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    ll_cas.ll_setRefValue(addr, casFeatCode_elements, v);
-  }
-
-  /** @generated */
-  public int getElements(int addr, int i) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i);
-  }
-
-  /** @generated */
-  public void setElements(int addr, int i, int v) {
-    if (featOkTst && casFeat_elements == null)
-      jcas.throwFeatMissing("elements", "org.apache.uima.ruta.type.DebugRuleMatch");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_elements), i, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_matched;
-
-  /** @generated */
-  final int casFeatCode_matched;
-
-  /** @generated */
-  public boolean getMatched(int addr) {
-    if (featOkTst && casFeat_matched == null)
-      jcas.throwFeatMissing("matched", "org.apache.uima.ruta.type.DebugRuleMatch");
-    return ll_cas.ll_getBooleanValue(addr, casFeatCode_matched);
-  }
-
-  /** @generated */
-  public void setMatched(int addr, boolean v) {
-    if (featOkTst && casFeat_matched == null)
-      jcas.throwFeatMissing("matched", "org.apache.uima.ruta.type.DebugRuleMatch");
-    ll_cas.ll_setBooleanValue(addr, casFeatCode_matched, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_delegates;
-
-  /** @generated */
-  final int casFeatCode_delegates;
-
-  /** @generated */
-  public int getDelegates(int addr) {
-    if (featOkTst && casFeat_delegates == null)
-      jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_delegates);
-  }
-
-  /** @generated */
-  public void setDelegates(int addr, int v) {
-    if (featOkTst && casFeat_delegates == null)
-      jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    ll_cas.ll_setRefValue(addr, casFeatCode_delegates, v);
-  }
-
-  /** @generated */
-  public int getDelegates(int addr, int i) {
-    if (featOkTst && casFeat_delegates == null)
-      jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    if (lowLevelTypeChecks)
-      return ll_cas
-              .ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_delegates), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_delegates), i);
-    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_delegates), i);
-  }
-
-  /** @generated */
-  public void setDelegates(int addr, int i, int v) {
-    if (featOkTst && casFeat_delegates == null)
-      jcas.throwFeatMissing("delegates", "org.apache.uima.ruta.type.DebugRuleMatch");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_delegates), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_delegates), i);
-    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_delegates), i, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugRuleMatch_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_elements = jcas
-            .getRequiredFeatureDE(casType, "elements", "uima.cas.FSArray", featOkTst);
-    casFeatCode_elements = (null == casFeat_elements) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_elements).getCode();
-
-    casFeat_matched = jcas.getRequiredFeatureDE(casType, "matched", "uima.cas.Boolean", featOkTst);
-    casFeatCode_matched = (null == casFeat_matched) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_matched).getCode();
-
-    casFeat_delegates = jcas.getRequiredFeatureDE(casType, "delegates", "uima.cas.FSArray",
-            featOkTst);
-    casFeatCode_delegates = (null == casFeat_delegates) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_delegates).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugScriptApply.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugScriptApply.java
deleted file mode 100644
index 26fb45c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugScriptApply.java
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class DebugScriptApply extends ProfiledAnnotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(DebugScriptApply.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected DebugScriptApply() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public DebugScriptApply(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugScriptApply(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public DebugScriptApply(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: element
-
-  /**
-   * getter for element - gets
-   * 
-   * @generated
-   */
-  public String getElement() {
-    if (DebugScriptApply_Type.featOkTst
-            && ((DebugScriptApply_Type) jcasType).casFeat_element == null)
-      jcasType.jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugScriptApply");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((DebugScriptApply_Type) jcasType).casFeatCode_element);
-  }
-
-  /**
-   * setter for element - sets
-   * 
-   * @generated
-   */
-  public void setElement(String v) {
-    if (DebugScriptApply_Type.featOkTst
-            && ((DebugScriptApply_Type) jcasType).casFeat_element == null)
-      jcasType.jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugScriptApply");
-    jcasType.ll_cas.ll_setStringValue(addr, ((DebugScriptApply_Type) jcasType).casFeatCode_element,
-            v);
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugScriptApply_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugScriptApply_Type.java
deleted file mode 100644
index a595a6d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/DebugScriptApply_Type.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class DebugScriptApply_Type extends ProfiledAnnotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (DebugScriptApply_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = DebugScriptApply_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new DebugScriptApply(addr, DebugScriptApply_Type.this);
-          DebugScriptApply_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new DebugScriptApply(addr, DebugScriptApply_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = DebugScriptApply.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.DebugScriptApply");
-
-  /** @generated */
-  final Feature casFeat_element;
-
-  /** @generated */
-  final int casFeatCode_element;
-
-  /** @generated */
-  public String getElement(int addr) {
-    if (featOkTst && casFeat_element == null)
-      jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugScriptApply");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_element);
-  }
-
-  /** @generated */
-  public void setElement(int addr, String v) {
-    if (featOkTst && casFeat_element == null)
-      jcas.throwFeatMissing("element", "org.apache.uima.ruta.type.DebugScriptApply");
-    ll_cas.ll_setStringValue(addr, casFeatCode_element, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public DebugScriptApply_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_element = jcas.getRequiredFeatureDE(casType, "element", "uima.cas.String", featOkTst);
-    casFeatCode_element = (null == casFeat_element) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_element).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Document.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Document.java
deleted file mode 100644
index 6484ebd..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Document.java
+++ /dev/null
@@ -1,67 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-
-/** 
- * Updated by JCasGen Fri Jul 26 17:02:04 CEST 2013
- * XML source: D:/work/workspace-uima-ruta/ruta/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * @generated */
-public class Document extends Annotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(Document.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {return typeIndexID;}
- 
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected Document() {/* intentionally empty block */}
-    
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public Document(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-  
-  /** @generated */
-  public Document(JCas jcas) {
-    super(jcas);
-    readObject();   
-  } 
-
-  /** @generated */
-  public Document(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }   
-
-  /** <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-  @generated modifiable */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Document_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Document_Type.java
deleted file mode 100644
index 194e158..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Document_Type.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/** 
- * Updated by JCasGen Fri Jul 26 17:02:04 CEST 2013
- * @generated */
-public class Document_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {return fsGenerator;}
-  /** @generated */
-  private final FSGenerator fsGenerator = 
-    new FSGenerator() {
-      public FeatureStructure createFS(int addr, CASImpl cas) {
-  			 if (Document_Type.this.useExistingInstance) {
-  			   // Return eq fs instance if already created
-  		     FeatureStructure fs = Document_Type.this.jcas.getJfsFromCaddr(addr);
-  		     if (null == fs) {
-  		       fs = new Document(addr, Document_Type.this);
-  			   Document_Type.this.jcas.putJfsFromCaddr(addr, fs);
-  			   return fs;
-  		     }
-  		     return fs;
-        } else return new Document(addr, Document_Type.this);
-  	  }
-    };
-
-  /** @generated */
-  public final static int typeIndexID = Document.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.Document");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public Document_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EXCLAMATION.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EXCLAMATION.java
deleted file mode 100644
index e3b6880..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EXCLAMATION.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class EXCLAMATION extends SENTENCEEND {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(EXCLAMATION.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected EXCLAMATION() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public EXCLAMATION(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public EXCLAMATION(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public EXCLAMATION(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EXCLAMATION_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EXCLAMATION_Type.java
deleted file mode 100644
index 966043f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EXCLAMATION_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class EXCLAMATION_Type extends SENTENCEEND_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (EXCLAMATION_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = EXCLAMATION_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new EXCLAMATION(addr, EXCLAMATION_Type.this);
-          EXCLAMATION_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new EXCLAMATION(addr, EXCLAMATION_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = EXCLAMATION.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.EXCLAMATION");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public EXCLAMATION_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EvalAnnotation.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EvalAnnotation.java
deleted file mode 100644
index 75201b7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EvalAnnotation.java
+++ /dev/null
@@ -1,101 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class EvalAnnotation extends Annotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(EvalAnnotation.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected EvalAnnotation() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public EvalAnnotation(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public EvalAnnotation(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public EvalAnnotation(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: original
-
-  /**
-   * getter for original - gets
-   * 
-   * @generated
-   */
-  public Annotation getOriginal() {
-    if (EvalAnnotation_Type.featOkTst && ((EvalAnnotation_Type) jcasType).casFeat_original == null)
-      jcasType.jcas.throwFeatMissing("original", "org.apache.uima.ruta.type.EvalAnnotation");
-    return (Annotation) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((EvalAnnotation_Type) jcasType).casFeatCode_original)));
-  }
-
-  /**
-   * setter for original - sets
-   * 
-   * @generated
-   */
-  public void setOriginal(Annotation v) {
-    if (EvalAnnotation_Type.featOkTst && ((EvalAnnotation_Type) jcasType).casFeat_original == null)
-      jcasType.jcas.throwFeatMissing("original", "org.apache.uima.ruta.type.EvalAnnotation");
-    jcasType.ll_cas.ll_setRefValue(addr, ((EvalAnnotation_Type) jcasType).casFeatCode_original,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EvalAnnotation_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EvalAnnotation_Type.java
deleted file mode 100644
index 333657d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/EvalAnnotation_Type.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class EvalAnnotation_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (EvalAnnotation_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = EvalAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new EvalAnnotation(addr, EvalAnnotation_Type.this);
-          EvalAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new EvalAnnotation(addr, EvalAnnotation_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = EvalAnnotation.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.EvalAnnotation");
-
-  /** @generated */
-  final Feature casFeat_original;
-
-  /** @generated */
-  final int casFeatCode_original;
-
-  /** @generated */
-  public int getOriginal(int addr) {
-    if (featOkTst && casFeat_original == null)
-      jcas.throwFeatMissing("original", "org.apache.uima.ruta.type.EvalAnnotation");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_original);
-  }
-
-  /** @generated */
-  public void setOriginal(int addr, int v) {
-    if (featOkTst && casFeat_original == null)
-      jcas.throwFeatMissing("original", "org.apache.uima.ruta.type.EvalAnnotation");
-    ll_cas.ll_setRefValue(addr, casFeatCode_original, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public EvalAnnotation_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_original = jcas.getRequiredFeatureDE(casType, "original", "uima.tcas.Annotation",
-            featOkTst);
-    casFeatCode_original = (null == casFeat_original) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_original).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalseNegative.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalseNegative.java
deleted file mode 100644
index 95c9774..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalseNegative.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class FalseNegative extends EvalAnnotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(FalseNegative.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected FalseNegative() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public FalseNegative(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public FalseNegative(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public FalseNegative(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalseNegative_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalseNegative_Type.java
deleted file mode 100644
index d53eaf4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalseNegative_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class FalseNegative_Type extends EvalAnnotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (FalseNegative_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = FalseNegative_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new FalseNegative(addr, FalseNegative_Type.this);
-          FalseNegative_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new FalseNegative(addr, FalseNegative_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = FalseNegative.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.FalseNegative");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public FalseNegative_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalsePositive.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalsePositive.java
deleted file mode 100644
index 0c23b86..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalsePositive.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class FalsePositive extends EvalAnnotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(FalsePositive.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected FalsePositive() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public FalsePositive(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public FalsePositive(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public FalsePositive(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalsePositive_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalsePositive_Type.java
deleted file mode 100644
index 6cdbc7c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/FalsePositive_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class FalsePositive_Type extends EvalAnnotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (FalsePositive_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = FalsePositive_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new FalsePositive(addr, FalsePositive_Type.this);
-          FalsePositive_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new FalsePositive(addr, FalsePositive_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = FalsePositive.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.FalsePositive");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public FalsePositive_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/MARKUP.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/MARKUP.java
deleted file mode 100644
index db236e7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/MARKUP.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class MARKUP extends ALL {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(MARKUP.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected MARKUP() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public MARKUP(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public MARKUP(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public MARKUP(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/MARKUP_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/MARKUP_Type.java
deleted file mode 100644
index 7e583c8..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/MARKUP_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class MARKUP_Type extends ALL_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (MARKUP_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = MARKUP_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new MARKUP(addr, MARKUP_Type.this);
-          MARKUP_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new MARKUP(addr, MARKUP_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = MARKUP.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.MARKUP");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public MARKUP_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NBSP.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NBSP.java
deleted file mode 100644
index 3d3912c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NBSP.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class NBSP extends ANY {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(NBSP.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected NBSP() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public NBSP(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public NBSP(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public NBSP(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NBSP_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NBSP_Type.java
deleted file mode 100644
index fe42965..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NBSP_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class NBSP_Type extends ANY_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (NBSP_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = NBSP_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new NBSP(addr, NBSP_Type.this);
-          NBSP_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new NBSP(addr, NBSP_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = NBSP.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.NBSP");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public NBSP_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NUM.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NUM.java
deleted file mode 100644
index 22d4d87..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NUM.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class NUM extends ANY {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(NUM.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected NUM() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public NUM(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public NUM(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public NUM(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NUM_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NUM_Type.java
deleted file mode 100644
index 74520a7..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/NUM_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class NUM_Type extends ANY_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (NUM_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = NUM_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new NUM(addr, NUM_Type.this);
-          NUM_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new NUM(addr, NUM_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = NUM.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.NUM");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public NUM_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PERIOD.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PERIOD.java
deleted file mode 100644
index 627cd14..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PERIOD.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class PERIOD extends SENTENCEEND {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(PERIOD.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected PERIOD() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public PERIOD(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public PERIOD(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public PERIOD(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PERIOD_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PERIOD_Type.java
deleted file mode 100644
index 83d9e2e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PERIOD_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class PERIOD_Type extends SENTENCEEND_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (PERIOD_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = PERIOD_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new PERIOD(addr, PERIOD_Type.this);
-          PERIOD_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new PERIOD(addr, PERIOD_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = PERIOD.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.PERIOD");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public PERIOD_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PM.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PM.java
deleted file mode 100644
index c7091ec..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PM.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class PM extends ANY {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(PM.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected PM() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public PM(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public PM(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public PM(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PM_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PM_Type.java
deleted file mode 100644
index e0c5aa1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/PM_Type.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class PM_Type extends ANY_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (PM_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = PM_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new PM(addr, PM_Type.this);
-          PM_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new PM(addr, PM_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = PM.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.PM");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public PM_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ProfiledAnnotation.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ProfiledAnnotation.java
deleted file mode 100644
index c74ed38..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ProfiledAnnotation.java
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class ProfiledAnnotation extends Annotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(ProfiledAnnotation.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected ProfiledAnnotation() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public ProfiledAnnotation(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public ProfiledAnnotation(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public ProfiledAnnotation(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: time
-
-  /**
-   * getter for time - gets
-   * 
-   * @generated
-   */
-  public long getTime() {
-    if (ProfiledAnnotation_Type.featOkTst
-            && ((ProfiledAnnotation_Type) jcasType).casFeat_time == null)
-      jcasType.jcas.throwFeatMissing("time", "org.apache.uima.ruta.type.ProfiledAnnotation");
-    return jcasType.ll_cas.ll_getLongValue(addr,
-            ((ProfiledAnnotation_Type) jcasType).casFeatCode_time);
-  }
-
-  /**
-   * setter for time - sets
-   * 
-   * @generated
-   */
-  public void setTime(long v) {
-    if (ProfiledAnnotation_Type.featOkTst
-            && ((ProfiledAnnotation_Type) jcasType).casFeat_time == null)
-      jcasType.jcas.throwFeatMissing("time", "org.apache.uima.ruta.type.ProfiledAnnotation");
-    jcasType.ll_cas.ll_setLongValue(addr, ((ProfiledAnnotation_Type) jcasType).casFeatCode_time, v);
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ProfiledAnnotation_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ProfiledAnnotation_Type.java
deleted file mode 100644
index 0f5f695..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/ProfiledAnnotation_Type.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class ProfiledAnnotation_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (ProfiledAnnotation_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = ProfiledAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new ProfiledAnnotation(addr, ProfiledAnnotation_Type.this);
-          ProfiledAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new ProfiledAnnotation(addr, ProfiledAnnotation_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = ProfiledAnnotation.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.ProfiledAnnotation");
-
-  /** @generated */
-  final Feature casFeat_time;
-
-  /** @generated */
-  final int casFeatCode_time;
-
-  /** @generated */
-  public long getTime(int addr) {
-    if (featOkTst && casFeat_time == null)
-      jcas.throwFeatMissing("time", "org.apache.uima.ruta.type.ProfiledAnnotation");
-    return ll_cas.ll_getLongValue(addr, casFeatCode_time);
-  }
-
-  /** @generated */
-  public void setTime(int addr, long v) {
-    if (featOkTst && casFeat_time == null)
-      jcas.throwFeatMissing("time", "org.apache.uima.ruta.type.ProfiledAnnotation");
-    ll_cas.ll_setLongValue(addr, casFeatCode_time, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public ProfiledAnnotation_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_time = jcas.getRequiredFeatureDE(casType, "time", "uima.cas.Long", featOkTst);
-    casFeatCode_time = (null == casFeat_time) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_time).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/QUESTION.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/QUESTION.java
deleted file mode 100644
index 1c900ff..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/QUESTION.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class QUESTION extends SENTENCEEND {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(QUESTION.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected QUESTION() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public QUESTION(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public QUESTION(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public QUESTION(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/QUESTION_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/QUESTION_Type.java
deleted file mode 100644
index 1615ccf..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/QUESTION_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class QUESTION_Type extends SENTENCEEND_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (QUESTION_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = QUESTION_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new QUESTION(addr, QUESTION_Type.this);
-          QUESTION_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new QUESTION(addr, QUESTION_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = QUESTION.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.QUESTION");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public QUESTION_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation.java
deleted file mode 100644
index d769559..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation.java
+++ /dev/null
@@ -1,129 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class RutaAnnotation extends Annotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(RutaAnnotation.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected RutaAnnotation() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public RutaAnnotation(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaAnnotation(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaAnnotation(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: score
-
-  /**
-   * getter for score - gets
-   * 
-   * @generated
-   */
-  public double getScore() {
-    if (RutaAnnotation_Type.featOkTst && ((RutaAnnotation_Type) jcasType).casFeat_score == null)
-      jcasType.jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
-    return jcasType.ll_cas.ll_getDoubleValue(addr,
-            ((RutaAnnotation_Type) jcasType).casFeatCode_score);
-  }
-
-  /**
-   * setter for score - sets
-   * 
-   * @generated
-   */
-  public void setScore(double v) {
-    if (RutaAnnotation_Type.featOkTst && ((RutaAnnotation_Type) jcasType).casFeat_score == null)
-      jcasType.jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
-    jcasType.ll_cas.ll_setDoubleValue(addr, ((RutaAnnotation_Type) jcasType).casFeatCode_score, v);
-  }
-
-  // *--------------*
-  // * Feature: annotation
-
-  /**
-   * getter for annotation - gets
-   * 
-   * @generated
-   */
-  public Annotation getAnnotation() {
-    if (RutaAnnotation_Type.featOkTst
-            && ((RutaAnnotation_Type) jcasType).casFeat_annotation == null)
-      jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
-    return (Annotation) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((RutaAnnotation_Type) jcasType).casFeatCode_annotation)));
-  }
-
-  /**
-   * setter for annotation - sets
-   * 
-   * @generated
-   */
-  public void setAnnotation(Annotation v) {
-    if (RutaAnnotation_Type.featOkTst
-            && ((RutaAnnotation_Type) jcasType).casFeat_annotation == null)
-      jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
-    jcasType.ll_cas.ll_setRefValue(addr, ((RutaAnnotation_Type) jcasType).casFeatCode_annotation,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation_Type.java
deleted file mode 100644
index 1271b29..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation_Type.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class RutaAnnotation_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (RutaAnnotation_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = RutaAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new RutaAnnotation(addr, RutaAnnotation_Type.this);
-          RutaAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new RutaAnnotation(addr, RutaAnnotation_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = RutaAnnotation.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.RutaAnnotation");
-
-  /** @generated */
-  final Feature casFeat_score;
-
-  /** @generated */
-  final int casFeatCode_score;
-
-  /** @generated */
-  public double getScore(int addr) {
-    if (featOkTst && casFeat_score == null)
-      jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
-    return ll_cas.ll_getDoubleValue(addr, casFeatCode_score);
-  }
-
-  /** @generated */
-  public void setScore(int addr, double v) {
-    if (featOkTst && casFeat_score == null)
-      jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
-    ll_cas.ll_setDoubleValue(addr, casFeatCode_score, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_annotation;
-
-  /** @generated */
-  final int casFeatCode_annotation;
-
-  /** @generated */
-  public int getAnnotation(int addr) {
-    if (featOkTst && casFeat_annotation == null)
-      jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_annotation);
-  }
-
-  /** @generated */
-  public void setAnnotation(int addr, int v) {
-    if (featOkTst && casFeat_annotation == null)
-      jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
-    ll_cas.ll_setRefValue(addr, casFeatCode_annotation, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public RutaAnnotation_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_score = jcas.getRequiredFeatureDE(casType, "score", "uima.cas.Double", featOkTst);
-    casFeatCode_score = (null == casFeat_score) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_score).getCode();
-
-    casFeat_annotation = jcas.getRequiredFeatureDE(casType, "annotation", "uima.tcas.Annotation",
-            featOkTst);
-    casFeatCode_annotation = (null == casFeat_annotation) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_annotation).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
deleted file mode 100644
index e2c97c1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/* First created by JCasGen Wed Apr 16 17:01:16 CEST 2008 */
-package org.apache.uima.ruta.type;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.cas.impl.TypeSystemImpl;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class RutaBasic extends Annotation {
-
-  private static final int INITIAL_CAPACITY = 2;
-
-  private static final String ROOT_TYPE1 = "uima.tcas.Annotation";
-
-  private static final String ROOT_TYPE2 = "uima.cas.AnnotationBase";
-
-  private boolean lowMemoryProfile = false;
-
-  private int[] partOf = new int[((TypeSystemImpl) getCAS().getTypeSystem()).getLargestTypeCode()];
-
-  private Collection<?>[] beginMap = new ArrayList<?>[((TypeSystemImpl) getCAS().getTypeSystem())
-          .getLargestTypeCode()];
-
-  private Collection<?>[] endMap = new ArrayList<?>[((TypeSystemImpl) getCAS().getTypeSystem())
-          .getLargestTypeCode()];
-
-  private boolean empty = true;
-
-  public boolean isEmpty() {
-    return empty;
-  }
-
-  public boolean isLowMemoryProfile() {
-    return lowMemoryProfile;
-  }
-
-  public void setLowMemoryProfile(boolean lowMemoryProfile) {
-    this.lowMemoryProfile = lowMemoryProfile;
-  }
-
-  public void addPartOf(Type type) {
-    int code = ((TypeImpl) type).getCode();
-    addPartOf(code);
-  }
-
-  private void addPartOf(int code) {
-    partOf[code] = partOf[code] + 1;
-    if (!lowMemoryProfile) {
-      int parentCode = getCAS().getTypeSystem().getLowLevelTypeSystem().ll_getParentType(code);
-      if (parentCode > 0) {
-        addPartOf(parentCode);
-      }
-    }
-  }
-
-  public void removePartOf(Type type) {
-    int code = ((TypeImpl) type).getCode();
-    removePartOf(code);
-  }
-
-  private void removePartOf(int code) {
-    if (partOf[code] != 0) {
-      partOf[code] = partOf[code] - 1;
-      if (!lowMemoryProfile) {
-        int parentCode = getCAS().getTypeSystem().getLowLevelTypeSystem().ll_getParentType(code);
-        if (parentCode > 0) {
-          removePartOf(parentCode);
-        }
-      }
-    }
-  }
-
-  public boolean isPartOf(Type type) {
-    int code = ((TypeImpl) type).getCode();
-    int count = partOf[code];
-    if (count > 0) {
-      return true;
-    }
-    if (lowMemoryProfile) {
-      List<Type> subsumedTypes = getCAS().getTypeSystem().getProperlySubsumedTypes(type);
-      for (Type each : subsumedTypes) {
-        int code2 = ((TypeImpl) each).getCode();
-        int count2 = partOf[code2];
-        if (count2 > 0) {
-          return true;
-        }
-      }
-
-    }
-    return false;
-
-  }
-
-  @SuppressWarnings("unchecked")
-  public Collection<AnnotationFS> getBeginAnchors(Type type) {
-    int code = ((TypeImpl) type).getCode();
-    Collection<AnnotationFS> set = (Collection<AnnotationFS>) beginMap[code];
-    if (lowMemoryProfile) {
-      Collection<AnnotationFS> result = new ArrayList<AnnotationFS>();
-      if (set != null) {
-        result.addAll(set);
-      }
-      List<Type> subsumedTypes = getCAS().getTypeSystem().getProperlySubsumedTypes(type);
-      for (Type each : subsumedTypes) {
-        int parentCode = ((TypeImpl) each).getCode();
-        Collection<?> c = beginMap[parentCode];
-        if (c != null) {
-          result.addAll((Collection<? extends AnnotationFS>) c);
-        }
-      }
-      return result;
-    } else {
-      if (set == null) {
-        return Collections.emptySet();
-      } else {
-        return set;
-      }
-    }
-  }
-
-  @SuppressWarnings("unchecked")
-  public Collection<AnnotationFS> getEndAnchors(Type type) {
-    int code = ((TypeImpl) type).getCode();
-    Collection<AnnotationFS> set = (Collection<AnnotationFS>) endMap[code];
-    if (lowMemoryProfile) {
-      Collection<AnnotationFS> result = new ArrayList<AnnotationFS>();
-      if (set != null) {
-        result.addAll(set);
-      }
-      List<Type> subsumedTypes = getCAS().getTypeSystem().getProperlySubsumedTypes(type);
-      for (Type each : subsumedTypes) {
-        int parentCode = ((TypeImpl) each).getCode();
-        Collection<?> c = endMap[parentCode];
-        if (c != null) {
-          result.addAll((Collection<? extends AnnotationFS>) c);
-        }
-      }
-      return result;
-    } else {
-      if (set == null) {
-        return Collections.emptySet();
-      } else {
-        return set;
-      }
-    }
-  }
-
-  public boolean beginsWith(Type type) {
-    int code = ((TypeImpl) type).getCode();
-    Collection<?> set = beginMap[code];
-    boolean beginsWith = set != null && !set.isEmpty();
-    if (beginsWith) {
-      return true;
-    }
-    if (lowMemoryProfile) {
-      List<Type> subsumedTypes = getCAS().getTypeSystem().getProperlySubsumedTypes(type);
-      for (Type each : subsumedTypes) {
-        if (beginsWith(each)) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  public boolean endsWith(Type type) {
-    int code = ((TypeImpl) type).getCode();
-    Collection<?> set = endMap[code];
-    boolean endswith = set != null && !set.isEmpty();
-    if (endswith) {
-      return true;
-    }
-    if (lowMemoryProfile) {
-      List<Type> subsumedTypes = getCAS().getTypeSystem().getProperlySubsumedTypes(type);
-      for (Type each : subsumedTypes) {
-        if (endsWith(each)) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  @SuppressWarnings("unchecked")
-  public void addBegin(AnnotationFS annotation, Type type) {
-    empty = false;
-    int code = ((TypeImpl) type).getCode();
-    Collection<Object> set = (Collection<Object>) beginMap[code];
-    if (set == null) {
-      set = new ArrayList<Object>(INITIAL_CAPACITY);
-      beginMap[code] = set;
-    }
-    set.add(annotation);
-    if (!lowMemoryProfile && !type.getName().equals(ROOT_TYPE1)
-            && !type.getName().equals(ROOT_TYPE2)) {
-      TypeSystem typeSystem = getCAS().getTypeSystem();
-      Type parent = typeSystem.getParent(type);
-      if (parent != null) {
-        addBegin(annotation, parent);
-      }
-    }
-  }
-
-  @SuppressWarnings("unchecked")
-  public void addEnd(AnnotationFS annotation, Type type) {
-    empty = false;
-    int code = ((TypeImpl) type).getCode();
-    Collection<Object> set = (Collection<Object>) endMap[code];
-    if (set == null) {
-      set = new ArrayList<Object>(INITIAL_CAPACITY);
-      endMap[code] = set;
-    }
-    set.add(annotation);
-    if (!lowMemoryProfile && !type.getName().equals(ROOT_TYPE1)
-            && !type.getName().equals(ROOT_TYPE2)) {
-      TypeSystem typeSystem = getCAS().getTypeSystem();
-      Type parent = typeSystem.getParent(type);
-      if (parent != null) {
-        addEnd(annotation, parent);
-      }
-    }
-  }
-
-  @SuppressWarnings("unchecked")
-  public void removeBegin(AnnotationFS annotation, Type type) {
-    int code = ((TypeImpl) type).getCode();
-    Collection<Object> set = (Collection<Object>) beginMap[code];
-    if (set != null) {
-      set.remove(annotation);
-      if (set.isEmpty()) {
-        beginMap[code] = null;
-      }
-    }
-    if (!lowMemoryProfile) {
-      TypeSystem typeSystem = getCAS().getTypeSystem();
-      Type parent = typeSystem.getParent(type);
-      if (parent != null) {
-        removeBegin(annotation, parent);
-      }
-    }
-  }
-
-  @SuppressWarnings("unchecked")
-  public void removeEnd(AnnotationFS annotation, Type type) {
-    int code = ((TypeImpl) type).getCode();
-    Collection<Object> set = (Collection<Object>) endMap[code];
-    if (set != null) {
-      set.remove(annotation);
-      if (set.isEmpty()) {
-        endMap[code] = null;
-      }
-    }
-    if (!lowMemoryProfile) {
-      TypeSystem typeSystem = getCAS().getTypeSystem();
-      Type parent = typeSystem.getParent(type);
-      if (parent != null) {
-        removeEnd(annotation, parent);
-      }
-    }
-  }
-
-  public Collection<?>[] getBeginMap() {
-    return beginMap;
-  }
-
-  public Collection<?>[] getEndMap() {
-    return endMap;
-  }
-
-  public void setBeginMap(Collection<?>[] beginMap) {
-    this.beginMap = beginMap;
-    for (Collection<?> each : beginMap) {
-      if (each != null && !each.isEmpty()) {
-        this.empty = false;
-      }
-    }
-  }
-
-  public void setEndMap(Collection<?>[] endMap) {
-    this.endMap = endMap;
-    for (Collection<?> each : endMap) {
-      if (each != null && !each.isEmpty()) {
-        this.empty = false;
-      }
-    }
-  }
-
-  public void clearBeginMap() {
-    this.beginMap = new ArrayList<?>[((TypeSystemImpl) getCAS().getTypeSystem())
-            .getLargestTypeCode()];
-  }
-
-  public void clearEndMap() {
-    this.endMap = new ArrayList<?>[((TypeSystemImpl) getCAS().getTypeSystem()).getLargestTypeCode()];
-  }
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(RutaBasic.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  @Override
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected RutaBasic() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public RutaBasic(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaBasic(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaBasic(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: Replacement
-
-  /**
-   * getter for Replacement - gets
-   * 
-   * @generated
-   */
-  public String getReplacement() {
-    if (RutaBasic_Type.featOkTst && ((RutaBasic_Type) jcasType).casFeat_replacement == null)
-      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((RutaBasic_Type) jcasType).casFeatCode_replacement);
-  }
-
-  /**
-   * setter for Replacement - sets
-   * 
-   * @generated
-   */
-  public void setReplacement(String v) {
-    if (RutaBasic_Type.featOkTst && ((RutaBasic_Type) jcasType).casFeat_replacement == null)
-      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    jcasType.ll_cas.ll_setStringValue(addr, ((RutaBasic_Type) jcasType).casFeatCode_replacement, v);
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java
deleted file mode 100644
index 82e4a9d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class RutaBasic_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (RutaBasic_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = RutaBasic_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new RutaBasic(addr, RutaBasic_Type.this);
-          RutaBasic_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new RutaBasic(addr, RutaBasic_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = RutaBasic.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.RutaBasic");
-
-  /** @generated */
-  final Feature casFeat_replacement;
-
-  /** @generated */
-  final int casFeatCode_replacement;
-
-  /** @generated */
-  public String getReplacement(int addr) {
-    if (featOkTst && casFeat_replacement == null)
-      jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_replacement);
-  }
-
-  /** @generated */
-  public void setReplacement(int addr, String v) {
-    if (featOkTst && casFeat_replacement == null)
-      jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    ll_cas.ll_setStringValue(addr, casFeatCode_replacement, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public RutaBasic_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_replacement = jcas.getRequiredFeatureDE(casType, "replacement", "uima.cas.String",
-            featOkTst);
-    casFeatCode_replacement = (null == casFeat_replacement) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_replacement).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring.java
deleted file mode 100644
index 41445b4..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring.java
+++ /dev/null
@@ -1,180 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class RutaColoring extends Annotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(RutaColoring.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected RutaColoring() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public RutaColoring(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaColoring(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaColoring(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: bgColor
-
-  /**
-   * getter for bgColor - gets
-   * 
-   * @generated
-   */
-  public String getBgColor() {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_bgColor == null)
-      jcasType.jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((RutaColoring_Type) jcasType).casFeatCode_bgColor);
-  }
-
-  /**
-   * setter for bgColor - sets
-   * 
-   * @generated
-   */
-  public void setBgColor(String v) {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_bgColor == null)
-      jcasType.jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
-    jcasType.ll_cas.ll_setStringValue(addr, ((RutaColoring_Type) jcasType).casFeatCode_bgColor, v);
-  }
-
-  // *--------------*
-  // * Feature: targetType
-
-  /**
-   * getter for targetType - gets
-   * 
-   * @generated
-   */
-  public String getTargetType() {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_targetType == null)
-      jcasType.jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((RutaColoring_Type) jcasType).casFeatCode_targetType);
-  }
-
-  /**
-   * setter for targetType - sets
-   * 
-   * @generated
-   */
-  public void setTargetType(String v) {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_targetType == null)
-      jcasType.jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
-    jcasType.ll_cas.ll_setStringValue(addr, ((RutaColoring_Type) jcasType).casFeatCode_targetType,
-            v);
-  }
-
-  // *--------------*
-  // * Feature: fgColor
-
-  /**
-   * getter for fgColor - gets
-   * 
-   * @generated
-   */
-  public String getFgColor() {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_fgColor == null)
-      jcasType.jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((RutaColoring_Type) jcasType).casFeatCode_fgColor);
-  }
-
-  /**
-   * setter for fgColor - sets
-   * 
-   * @generated
-   */
-  public void setFgColor(String v) {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_fgColor == null)
-      jcasType.jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
-    jcasType.ll_cas.ll_setStringValue(addr, ((RutaColoring_Type) jcasType).casFeatCode_fgColor, v);
-  }
-
-  // *--------------*
-  // * Feature: selected
-
-  /**
-   * getter for selected - gets
-   * 
-   * @generated
-   */
-  public boolean getSelected() {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_selected == null)
-      jcasType.jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
-    return jcasType.ll_cas.ll_getBooleanValue(addr,
-            ((RutaColoring_Type) jcasType).casFeatCode_selected);
-  }
-
-  /**
-   * setter for selected - sets
-   * 
-   * @generated
-   */
-  public void setSelected(boolean v) {
-    if (RutaColoring_Type.featOkTst && ((RutaColoring_Type) jcasType).casFeat_selected == null)
-      jcasType.jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
-    jcasType.ll_cas
-            .ll_setBooleanValue(addr, ((RutaColoring_Type) jcasType).casFeatCode_selected, v);
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring_Type.java
deleted file mode 100644
index 067e76f..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring_Type.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012
- * 
- * @generated
- */
-public class RutaColoring_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (RutaColoring_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = RutaColoring_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new RutaColoring(addr, RutaColoring_Type.this);
-          RutaColoring_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new RutaColoring(addr, RutaColoring_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = RutaColoring.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.RutaColoring");
-
-  /** @generated */
-  final Feature casFeat_bgColor;
-
-  /** @generated */
-  final int casFeatCode_bgColor;
-
-  /** @generated */
-  public String getBgColor(int addr) {
-    if (featOkTst && casFeat_bgColor == null)
-      jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_bgColor);
-  }
-
-  /** @generated */
-  public void setBgColor(int addr, String v) {
-    if (featOkTst && casFeat_bgColor == null)
-      jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
-    ll_cas.ll_setStringValue(addr, casFeatCode_bgColor, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_targetType;
-
-  /** @generated */
-  final int casFeatCode_targetType;
-
-  /** @generated */
-  public String getTargetType(int addr) {
-    if (featOkTst && casFeat_targetType == null)
-      jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_targetType);
-  }
-
-  /** @generated */
-  public void setTargetType(int addr, String v) {
-    if (featOkTst && casFeat_targetType == null)
-      jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
-    ll_cas.ll_setStringValue(addr, casFeatCode_targetType, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_fgColor;
-
-  /** @generated */
-  final int casFeatCode_fgColor;
-
-  /** @generated */
-  public String getFgColor(int addr) {
-    if (featOkTst && casFeat_fgColor == null)
-      jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_fgColor);
-  }
-
-  /** @generated */
-  public void setFgColor(int addr, String v) {
-    if (featOkTst && casFeat_fgColor == null)
-      jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
-    ll_cas.ll_setStringValue(addr, casFeatCode_fgColor, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_selected;
-
-  /** @generated */
-  final int casFeatCode_selected;
-
-  /** @generated */
-  public boolean getSelected(int addr) {
-    if (featOkTst && casFeat_selected == null)
-      jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
-    return ll_cas.ll_getBooleanValue(addr, casFeatCode_selected);
-  }
-
-  /** @generated */
-  public void setSelected(int addr, boolean v) {
-    if (featOkTst && casFeat_selected == null)
-      jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
-    ll_cas.ll_setBooleanValue(addr, casFeatCode_selected, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public RutaColoring_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_bgColor = jcas.getRequiredFeatureDE(casType, "bgColor", "uima.cas.String", featOkTst);
-    casFeatCode_bgColor = (null == casFeat_bgColor) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_bgColor).getCode();
-
-    casFeat_targetType = jcas.getRequiredFeatureDE(casType, "targetType", "uima.cas.String",
-            featOkTst);
-    casFeatCode_targetType = (null == casFeat_targetType) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_targetType).getCode();
-
-    casFeat_fgColor = jcas.getRequiredFeatureDE(casType, "fgColor", "uima.cas.String", featOkTst);
-    casFeatCode_fgColor = (null == casFeat_fgColor) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_fgColor).getCode();
-
-    casFeat_selected = jcas
-            .getRequiredFeatureDE(casType, "selected", "uima.cas.Boolean", featOkTst);
-    casFeatCode_selected = (null == casFeat_selected) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_selected).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame.java
deleted file mode 100644
index 27eca72..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame.java
+++ /dev/null
@@ -1,75 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class RutaFrame extends Annotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(RutaFrame.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected RutaFrame() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public RutaFrame(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaFrame(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public RutaFrame(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame_Type.java
deleted file mode 100644
index 3bb7347..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame_Type.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012
- * 
- * @generated
- */
-public class RutaFrame_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (RutaFrame_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = RutaFrame_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new RutaFrame(addr, RutaFrame_Type.this);
-          RutaFrame_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new RutaFrame(addr, RutaFrame_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = RutaFrame.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.RutaFrame");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public RutaFrame_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaOptional.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaOptional.java
deleted file mode 100644
index eccfd2b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaOptional.java
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-/* First created by JCasGen Sat Jun 08 19:25:02 CEST 2013 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-
-/** 
- * Updated by JCasGen Sat Jun 08 19:25:02 CEST 2013
- * XML source: D:/work/workspace-tmb5/ruta/ruta-core/src/main/resources/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * @generated */
-public class RutaOptional extends Annotation {
-  /** @generated
-   * @ordered 
-   */
-  @SuppressWarnings ("hiding")
-  public final static int typeIndexID = JCasRegistry.register(RutaOptional.class);
-  /** @generated
-   * @ordered 
-   */
-  @SuppressWarnings ("hiding")
-  public final static int type = typeIndexID;
-  /** @generated  */
-  @Override
-  public              int getTypeIndexID() {return typeIndexID;}
- 
-  /** Never called.  Disable default constructor
-   * @generated */
-  protected RutaOptional() {/* intentionally empty block */}
-    
-  /** Internal - constructor used by generator 
-   * @generated */
-  public RutaOptional(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-  
-  /** @generated */
-  public RutaOptional(JCas jcas) {
-    super(jcas);
-    readObject();   
-  } 
-
-  /** @generated */  
-  public RutaOptional(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }   
-
-  /** <!-- begin-user-doc -->
-    * Write your own initialization here
-    * <!-- end-user-doc -->
-  @generated modifiable */
-  private void readObject() {/*default - does nothing empty block */}
-     
-}
-
-    
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaOptional_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaOptional_Type.java
deleted file mode 100644
index 245af27..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaOptional_Type.java
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/* First created by JCasGen Sat Jun 08 19:25:02 CEST 2013 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/** 
- * Updated by JCasGen Sat Jun 08 19:25:02 CEST 2013
- * @generated */
-public class RutaOptional_Type extends Annotation_Type {
-  /** @generated */
-  @Override
-  protected FSGenerator getFSGenerator() {return fsGenerator;}
-  /** @generated */
-  private final FSGenerator fsGenerator = 
-    new FSGenerator() {
-      public FeatureStructure createFS(int addr, CASImpl cas) {
-  			 if (RutaOptional_Type.this.useExistingInstance) {
-  			   // Return eq fs instance if already created
-  		     FeatureStructure fs = RutaOptional_Type.this.jcas.getJfsFromCaddr(addr);
-  		     if (null == fs) {
-  		       fs = new RutaOptional(addr, RutaOptional_Type.this);
-  			   RutaOptional_Type.this.jcas.putJfsFromCaddr(addr, fs);
-  			   return fs;
-  		     }
-  		     return fs;
-        } else return new RutaOptional(addr, RutaOptional_Type.this);
-  	  }
-    };
-  /** @generated */
-  @SuppressWarnings ("hiding")
-  public final static int typeIndexID = RutaOptional.typeIndexID;
-  /** @generated 
-     @modifiable */
-  @SuppressWarnings ("hiding")
-  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.RutaOptional");
-
-
-
-  /** initialize variables to correspond with Cas Type and Features
-	* @generated */
-  public RutaOptional_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
-
-  }
-}
-
-
-
-    
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SEMICOLON.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SEMICOLON.java
deleted file mode 100644
index ce5dbc3..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SEMICOLON.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class SEMICOLON extends PM {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(SEMICOLON.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected SEMICOLON() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public SEMICOLON(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public SEMICOLON(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public SEMICOLON(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SEMICOLON_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SEMICOLON_Type.java
deleted file mode 100644
index acf2d93..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SEMICOLON_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class SEMICOLON_Type extends PM_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (SEMICOLON_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = SEMICOLON_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new SEMICOLON(addr, SEMICOLON_Type.this);
-          SEMICOLON_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new SEMICOLON(addr, SEMICOLON_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = SEMICOLON.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.SEMICOLON");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public SEMICOLON_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SENTENCEEND.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SENTENCEEND.java
deleted file mode 100644
index 46ce3b2..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SENTENCEEND.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class SENTENCEEND extends PM {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(SENTENCEEND.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected SENTENCEEND() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public SENTENCEEND(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public SENTENCEEND(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public SENTENCEEND(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SENTENCEEND_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SENTENCEEND_Type.java
deleted file mode 100644
index 276489a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SENTENCEEND_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class SENTENCEEND_Type extends PM_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (SENTENCEEND_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = SENTENCEEND_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new SENTENCEEND(addr, SENTENCEEND_Type.this);
-          SENTENCEEND_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new SENTENCEEND(addr, SENTENCEEND_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = SENTENCEEND.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.SENTENCEEND");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public SENTENCEEND_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPACE.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPACE.java
deleted file mode 100644
index 5d9ce52..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPACE.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class SPACE extends WS {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(SPACE.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected SPACE() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public SPACE(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public SPACE(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public SPACE(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPACE_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPACE_Type.java
deleted file mode 100644
index cb18239..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPACE_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class SPACE_Type extends WS_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (SPACE_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = SPACE_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new SPACE(addr, SPACE_Type.this);
-          SPACE_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new SPACE(addr, SPACE_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = SPACE.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.SPACE");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public SPACE_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPECIAL.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPECIAL.java
deleted file mode 100644
index 9f8c397..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPECIAL.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class SPECIAL extends ANY {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(SPECIAL.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected SPECIAL() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public SPECIAL(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public SPECIAL(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public SPECIAL(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPECIAL_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPECIAL_Type.java
deleted file mode 100644
index e16176d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SPECIAL_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class SPECIAL_Type extends ANY_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (SPECIAL_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = SPECIAL_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new SPECIAL(addr, SPECIAL_Type.this);
-          SPECIAL_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new SPECIAL(addr, SPECIAL_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = SPECIAL.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.SPECIAL");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public SPECIAL_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SW.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SW.java
deleted file mode 100644
index ec00a2c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SW.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class SW extends W {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(SW.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected SW() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public SW(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public SW(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public SW(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SW_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SW_Type.java
deleted file mode 100644
index eb9fd77..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/SW_Type.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class SW_Type extends W_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (SW_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = SW_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new SW(addr, SW_Type.this);
-          SW_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new SW(addr, SW_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = SW.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.SW");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public SW_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Statistics.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Statistics.java
deleted file mode 100644
index 6f1276e..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Statistics.java
+++ /dev/null
@@ -1,299 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.DoubleArray;
-import org.apache.uima.jcas.cas.IntegerArray;
-import org.apache.uima.jcas.cas.StringArray;
-import org.apache.uima.jcas.cas.TOP;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class Statistics extends TOP {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(Statistics.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected Statistics() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public Statistics(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public Statistics(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-  // *--------------*
-  // * Feature: name
-
-  /**
-   * getter for name - gets
-   * 
-   * @generated
-   */
-  public StringArray getName() {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_name == null)
-      jcasType.jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    return (StringArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((Statistics_Type) jcasType).casFeatCode_name)));
-  }
-
-  /**
-   * setter for name - sets
-   * 
-   * @generated
-   */
-  public void setName(StringArray v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_name == null)
-      jcasType.jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    jcasType.ll_cas.ll_setRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_name,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for name - gets an indexed value -
-   * 
-   * @generated
-   */
-  public String getName(int i) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_name == null)
-      jcasType.jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas.checkArrayBounds(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_name), i);
-    return jcasType.ll_cas.ll_getStringArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_name), i);
-  }
-
-  /**
-   * indexed setter for name - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setName(int i, String v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_name == null)
-      jcasType.jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas.checkArrayBounds(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_name), i);
-    jcasType.ll_cas.ll_setStringArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_name), i,
-            v);
-  }
-
-  // *--------------*
-  // * Feature: total
-
-  /**
-   * getter for total - gets
-   * 
-   * @generated
-   */
-  public DoubleArray getTotal() {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_total == null)
-      jcasType.jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    return (DoubleArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((Statistics_Type) jcasType).casFeatCode_total)));
-  }
-
-  /**
-   * setter for total - sets
-   * 
-   * @generated
-   */
-  public void setTotal(DoubleArray v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_total == null)
-      jcasType.jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    jcasType.ll_cas.ll_setRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_total,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for total - gets an indexed value -
-   * 
-   * @generated
-   */
-  public double getTotal(int i) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_total == null)
-      jcasType.jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas
-            .checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((Statistics_Type) jcasType).casFeatCode_total), i);
-    return jcasType.ll_cas
-            .ll_getDoubleArrayValue(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((Statistics_Type) jcasType).casFeatCode_total), i);
-  }
-
-  /**
-   * indexed setter for total - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setTotal(int i, double v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_total == null)
-      jcasType.jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas
-            .checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr,
-                    ((Statistics_Type) jcasType).casFeatCode_total), i);
-    jcasType.ll_cas.ll_setDoubleArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_total),
-            i, v);
-  }
-
-  // *--------------*
-  // * Feature: amount
-
-  /**
-   * getter for amount - gets
-   * 
-   * @generated
-   */
-  public IntegerArray getAmount() {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_amount == null)
-      jcasType.jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    return (IntegerArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((Statistics_Type) jcasType).casFeatCode_amount)));
-  }
-
-  /**
-   * setter for amount - sets
-   * 
-   * @generated
-   */
-  public void setAmount(IntegerArray v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_amount == null)
-      jcasType.jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    jcasType.ll_cas.ll_setRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_amount,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for amount - gets an indexed value -
-   * 
-   * @generated
-   */
-  public int getAmount(int i) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_amount == null)
-      jcasType.jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas.checkArrayBounds(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_amount),
-            i);
-    return jcasType.ll_cas.ll_getIntArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_amount),
-            i);
-  }
-
-  /**
-   * indexed setter for amount - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setAmount(int i, int v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_amount == null)
-      jcasType.jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas.checkArrayBounds(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_amount),
-            i);
-    jcasType.ll_cas.ll_setIntArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_amount),
-            i, v);
-  }
-
-  // *--------------*
-  // * Feature: part
-
-  /**
-   * getter for part - gets
-   * 
-   * @generated
-   */
-  public DoubleArray getPart() {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_part == null)
-      jcasType.jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    return (DoubleArray) (jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr,
-            ((Statistics_Type) jcasType).casFeatCode_part)));
-  }
-
-  /**
-   * setter for part - sets
-   * 
-   * @generated
-   */
-  public void setPart(DoubleArray v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_part == null)
-      jcasType.jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    jcasType.ll_cas.ll_setRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_part,
-            jcasType.ll_cas.ll_getFSRef(v));
-  }
-
-  /**
-   * indexed getter for part - gets an indexed value -
-   * 
-   * @generated
-   */
-  public double getPart(int i) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_part == null)
-      jcasType.jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas.checkArrayBounds(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_part), i);
-    return jcasType.ll_cas.ll_getDoubleArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_part), i);
-  }
-
-  /**
-   * indexed setter for part - sets an indexed value -
-   * 
-   * @generated
-   */
-  public void setPart(int i, double v) {
-    if (Statistics_Type.featOkTst && ((Statistics_Type) jcasType).casFeat_part == null)
-      jcasType.jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    jcasType.jcas.checkArrayBounds(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_part), i);
-    jcasType.ll_cas.ll_setDoubleArrayValue(
-            jcasType.ll_cas.ll_getRefValue(addr, ((Statistics_Type) jcasType).casFeatCode_part), i,
-            v);
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Statistics_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Statistics_Type.java
deleted file mode 100644
index 0ae0088..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/Statistics_Type.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class Statistics_Type extends TOP_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (Statistics_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = Statistics_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new Statistics(addr, Statistics_Type.this);
-          Statistics_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new Statistics(addr, Statistics_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = Statistics.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.Statistics");
-
-  /** @generated */
-  final Feature casFeat_name;
-
-  /** @generated */
-  final int casFeatCode_name;
-
-  /** @generated */
-  public int getName(int addr) {
-    if (featOkTst && casFeat_name == null)
-      jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_name);
-  }
-
-  /** @generated */
-  public void setName(int addr, int v) {
-    if (featOkTst && casFeat_name == null)
-      jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    ll_cas.ll_setRefValue(addr, casFeatCode_name, v);
-  }
-
-  /** @generated */
-  public String getName(int addr, int i) {
-    if (featOkTst && casFeat_name == null)
-      jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_name), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_name), i);
-    return ll_cas.ll_getStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_name), i);
-  }
-
-  /** @generated */
-  public void setName(int addr, int i, String v) {
-    if (featOkTst && casFeat_name == null)
-      jcas.throwFeatMissing("name", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_name), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_name), i);
-    ll_cas.ll_setStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_name), i, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_total;
-
-  /** @generated */
-  final int casFeatCode_total;
-
-  /** @generated */
-  public int getTotal(int addr) {
-    if (featOkTst && casFeat_total == null)
-      jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_total);
-  }
-
-  /** @generated */
-  public void setTotal(int addr, int v) {
-    if (featOkTst && casFeat_total == null)
-      jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    ll_cas.ll_setRefValue(addr, casFeatCode_total, v);
-  }
-
-  /** @generated */
-  public double getTotal(int addr, int i) {
-    if (featOkTst && casFeat_total == null)
-      jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_total), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_total), i);
-    return ll_cas.ll_getDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_total), i);
-  }
-
-  /** @generated */
-  public void setTotal(int addr, int i, double v) {
-    if (featOkTst && casFeat_total == null)
-      jcas.throwFeatMissing("total", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_total), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_total), i);
-    ll_cas.ll_setDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_total), i, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_amount;
-
-  /** @generated */
-  final int casFeatCode_amount;
-
-  /** @generated */
-  public int getAmount(int addr) {
-    if (featOkTst && casFeat_amount == null)
-      jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_amount);
-  }
-
-  /** @generated */
-  public void setAmount(int addr, int v) {
-    if (featOkTst && casFeat_amount == null)
-      jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    ll_cas.ll_setRefValue(addr, casFeatCode_amount, v);
-  }
-
-  /** @generated */
-  public int getAmount(int addr, int i) {
-    if (featOkTst && casFeat_amount == null)
-      jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_amount), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_amount), i);
-    return ll_cas.ll_getIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_amount), i);
-  }
-
-  /** @generated */
-  public void setAmount(int addr, int i, int v) {
-    if (featOkTst && casFeat_amount == null)
-      jcas.throwFeatMissing("amount", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_amount), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_amount), i);
-    ll_cas.ll_setIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_amount), i, v);
-  }
-
-  /** @generated */
-  final Feature casFeat_part;
-
-  /** @generated */
-  final int casFeatCode_part;
-
-  /** @generated */
-  public int getPart(int addr) {
-    if (featOkTst && casFeat_part == null)
-      jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    return ll_cas.ll_getRefValue(addr, casFeatCode_part);
-  }
-
-  /** @generated */
-  public void setPart(int addr, int v) {
-    if (featOkTst && casFeat_part == null)
-      jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    ll_cas.ll_setRefValue(addr, casFeatCode_part, v);
-  }
-
-  /** @generated */
-  public double getPart(int addr, int i) {
-    if (featOkTst && casFeat_part == null)
-      jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      return ll_cas.ll_getDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_part), i, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_part), i);
-    return ll_cas.ll_getDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_part), i);
-  }
-
-  /** @generated */
-  public void setPart(int addr, int i, double v) {
-    if (featOkTst && casFeat_part == null)
-      jcas.throwFeatMissing("part", "org.apache.uima.ruta.type.Statistics");
-    if (lowLevelTypeChecks)
-      ll_cas.ll_setDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_part), i, v, true);
-    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_part), i);
-    ll_cas.ll_setDoubleArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_part), i, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public Statistics_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_name = jcas.getRequiredFeatureDE(casType, "name", "uima.cas.StringArray", featOkTst);
-    casFeatCode_name = (null == casFeat_name) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_name).getCode();
-
-    casFeat_total = jcas.getRequiredFeatureDE(casType, "total", "uima.cas.DoubleArray", featOkTst);
-    casFeatCode_total = (null == casFeat_total) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_total).getCode();
-
-    casFeat_amount = jcas.getRequiredFeatureDE(casType, "amount", "uima.cas.IntegerArray",
-            featOkTst);
-    casFeatCode_amount = (null == casFeat_amount) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_amount).getCode();
-
-    casFeat_part = jcas.getRequiredFeatureDE(casType, "part", "uima.cas.DoubleArray", featOkTst);
-    casFeatCode_part = (null == casFeat_part) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_part).getCode();
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TokenSeed.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TokenSeed.java
deleted file mode 100644
index 782e193..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TokenSeed.java
+++ /dev/null
@@ -1,75 +0,0 @@
-
-/* First created by JCasGen Wed Jan 11 14:42:22 CET 2012 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-import org.apache.uima.jcas.tcas.Annotation;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class TokenSeed extends Annotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(TokenSeed.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected TokenSeed() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public TokenSeed(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public TokenSeed(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public TokenSeed(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TokenSeed_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TokenSeed_Type.java
deleted file mode 100644
index 180024b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TokenSeed_Type.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/* First created by JCasGen Wed Jan 11 14:42:22 CET 2012 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class TokenSeed_Type extends Annotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (TokenSeed_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = TokenSeed_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new TokenSeed(addr, TokenSeed_Type.this);
-          TokenSeed_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new TokenSeed(addr, TokenSeed_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = TokenSeed.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.TokenSeed");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public TokenSeed_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TruePositive.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TruePositive.java
deleted file mode 100644
index e1dfbe1..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TruePositive.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
- * 
- * @generated
- */
-public class TruePositive extends EvalAnnotation {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(TruePositive.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected TruePositive() {/* intentionally empty block */
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public TruePositive(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public TruePositive(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public TruePositive(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TruePositive_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TruePositive_Type.java
deleted file mode 100644
index a80a3d3..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TruePositive_Type.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012
- * 
- * @generated
- */
-public class TruePositive_Type extends EvalAnnotation_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (TruePositive_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = TruePositive_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new TruePositive(addr, TruePositive_Type.this);
-          TruePositive_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new TruePositive(addr, TruePositive_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = TruePositive.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.TruePositive");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public TruePositive_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/W.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/W.java
deleted file mode 100644
index 30b8793..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/W.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class W extends ANY {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(W.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected W() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public W(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public W(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public W(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/WS.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/WS.java
deleted file mode 100644
index c79bf68..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/WS.java
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012 XML source:
- * D:/work/workspace-uima3/uimaj-ep-ruta-
- * engine/src/main/java/org/apache/uima/ruta/engine/BasicTypeSystem.xml
- * 
- * @generated
- */
-public class WS extends ANY {
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int typeIndexID = JCasRegistry.register(WS.class);
-
-  /**
-   * @generated
-   * @ordered
-   */
-  public final static int type = typeIndexID;
-
-  /** @generated */
-  public int getTypeIndexID() {
-    return typeIndexID;
-  }
-
-  /**
-   * Never called. Disable default constructor
-   * 
-   * @generated
-   */
-  protected WS() {
-  }
-
-  /**
-   * Internal - constructor used by generator
-   * 
-   * @generated
-   */
-  public WS(int addr, TOP_Type type) {
-    super(addr, type);
-    readObject();
-  }
-
-  /** @generated */
-  public WS(JCas jcas) {
-    super(jcas);
-    readObject();
-  }
-
-  /** @generated */
-  public WS(JCas jcas, int begin, int end) {
-    super(jcas);
-    setBegin(begin);
-    setEnd(end);
-    readObject();
-  }
-
-  /**
-   * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
-   * @generated modifiable
-   */
-  private void readObject() {
-  }
-
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/WS_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/WS_Type.java
deleted file mode 100644
index 9e1de76..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/WS_Type.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class WS_Type extends ANY_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (WS_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = WS_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new WS(addr, WS_Type.this);
-          WS_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new WS(addr, WS_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = WS.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.WS");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public WS_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/W_Type.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/W_Type.java
deleted file mode 100644
index f73c82d..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/W_Type.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-
-/**
- * Updated by JCasGen Wed Jan 11 14:42:26 CET 2012
- * 
- * @generated
- */
-public class W_Type extends ANY_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (W_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = W_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new W(addr, W_Type.this);
-          W_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new W(addr, W_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = W.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.W");
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public W_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-  }
-}
diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/utils/UIMAUtils.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/utils/UIMAUtils.java
deleted file mode 100644
index 560a88a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/utils/UIMAUtils.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*

- * 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.ruta.utils;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.cas.DoubleArray;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.jcas.cas.IntegerArray;

-import org.apache.uima.jcas.cas.StringArray;

-

-public class UIMAUtils {

-

-  public static FSArray toFSArray(JCas jCas, List<? extends FeatureStructure> fsList) {

-    FSArray fsArray = new FSArray(jCas, fsList.size());

-    fsArray.copyFromArray(fsList.toArray(new FeatureStructure[fsList.size()]), 0, 0, fsList.size());

-    return fsArray;

-  }

-

-  public static StringArray toStringArray(JCas jCas, String[] sArray) {

-    StringArray uimaSArray = new StringArray(jCas, sArray.length);

-    uimaSArray.copyFromArray(sArray, 0, 0, sArray.length);

-    return uimaSArray;

-  }

-

-  public static DoubleArray toDoubleArray(JCas jCas, double[] sArray) {

-    DoubleArray uimaSArray = new DoubleArray(jCas, sArray.length);

-    uimaSArray.copyFromArray(sArray, 0, 0, sArray.length);

-    return uimaSArray;

-  }

-

-  public static IntegerArray toIntegerArray(JCas jCas, int[] sArray) {

-    IntegerArray uimaSArray = new IntegerArray(jCas, sArray.length);

-    uimaSArray.copyFromArray(sArray, 0, 0, sArray.length);

-    return uimaSArray;

-  }

-

-  public static <T extends FeatureStructure> List<T> toList(FSArray fsArray, Class<T> cls) {

-    List<T> list = new ArrayList<T>();

-    if (fsArray == null) {

-      return list;

-    }

-    for (FeatureStructure fs : fsArray.toArray()) {

-      list.add(cls.cast(fs));

-    }

-    return list;

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ActionVerbalizer.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ActionVerbalizer.java
deleted file mode 100644
index d1d8998..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ActionVerbalizer.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*

- * 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.ruta.verbalize;

-

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.action.AddAction;

-import org.apache.uima.ruta.action.AssignAction;

-import org.apache.uima.ruta.action.CallAction;

-import org.apache.uima.ruta.action.ClearAction;

-import org.apache.uima.ruta.action.ColorAction;

-import org.apache.uima.ruta.action.ConfigureAction;

-import org.apache.uima.ruta.action.CreateAction;

-import org.apache.uima.ruta.action.DelAction;

-import org.apache.uima.ruta.action.DynamicAnchoringAction;

-import org.apache.uima.ruta.action.ExecAction;

-import org.apache.uima.ruta.action.FillAction;

-import org.apache.uima.ruta.action.FilterTypeAction;

-import org.apache.uima.ruta.action.GatherAction;

-import org.apache.uima.ruta.action.GetAction;

-import org.apache.uima.ruta.action.GetFeatureAction;

-import org.apache.uima.ruta.action.GetListAction;

-import org.apache.uima.ruta.action.GreedyAnchoringAction;

-import org.apache.uima.ruta.action.ImplicitFeatureAction;

-import org.apache.uima.ruta.action.ImplicitMarkAction;

-import org.apache.uima.ruta.action.LogAction;

-import org.apache.uima.ruta.action.MarkAction;

-import org.apache.uima.ruta.action.MarkFastAction;

-import org.apache.uima.ruta.action.MarkFirstAction;

-import org.apache.uima.ruta.action.MarkLastAction;

-import org.apache.uima.ruta.action.MarkOnceAction;

-import org.apache.uima.ruta.action.MarkTableAction;

-import org.apache.uima.ruta.action.MatchedTextAction;

-import org.apache.uima.ruta.action.MergeAction;

-import org.apache.uima.ruta.action.RemoveAction;

-import org.apache.uima.ruta.action.RemoveDuplicateAction;

-import org.apache.uima.ruta.action.ReplaceAction;

-import org.apache.uima.ruta.action.RetainTypeAction;

-import org.apache.uima.ruta.action.SetFeatureAction;

-import org.apache.uima.ruta.action.ShiftAction;

-import org.apache.uima.ruta.action.TransferAction;

-import org.apache.uima.ruta.action.TrieAction;

-import org.apache.uima.ruta.action.TrimAction;

-import org.apache.uima.ruta.action.UnmarkAction;

-import org.apache.uima.ruta.action.UnmarkAllAction;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ActionVerbalizer {

-

-  private RutaVerbalizer verbalizer;

-

-  public ActionVerbalizer(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-  }

-

-  public String verbalizeName(AbstractRutaAction action) {

-    if (action instanceof AddAction) {

-      return "ADD";

-    } else if (action instanceof AssignAction) {

-      return "ASSIGN";

-    } else if (action instanceof ExecAction) {

-      return "EXEC";

-    } else if (action instanceof CallAction) {

-      return "CALL";

-    } else if (action instanceof ColorAction) {

-      return "COLOR";

-    } else if (action instanceof CreateAction) {

-      return "CREATE";

-    } else if (action instanceof DelAction) {

-      return "DEL";

-    } else if (action instanceof FillAction) {

-      return "FILL";

-    } else if (action instanceof FilterTypeAction) {

-      return "FILTERTYPE";

-    } else if (action instanceof LogAction) {

-      return "LOG";

-    } else if (action instanceof MarkOnceAction) {

-      return "MARKONCE";

-    } else if (action instanceof ShiftAction) {

-      return "SHIFT";

-    } else if (action instanceof MarkAction) {

-      MarkAction a = (MarkAction) action;

-      if (a.getScore() != null) {

-        return "MARKSCORE";

-      }

-      return "MARK";

-    } else if (action instanceof MarkFastAction) {

-      return "MARKFAST";

-    } else if (action instanceof MarkLastAction) {

-      return "MARKLAST";

-    } else if (action instanceof MarkFirstAction) {

-      return "MARKFIRST";

-    } else if (action instanceof ReplaceAction) {

-      return "REPLACE";

-    } else if (action instanceof RetainTypeAction) {

-      return "RETAINTYPE";

-    } else if (action instanceof SetFeatureAction) {

-      String name = "SETFEATURE";

-      return name;

-    } else if (action instanceof GetFeatureAction) {

-      String name = "GETFEATURE";

-      return name;

-    } else if (action instanceof UnmarkAction) {

-      return "UNMARK";

-    } else if (action instanceof TransferAction) {

-      return "TRANSFER";

-    } else if (action instanceof TrieAction) {

-      return "TRIE";

-    } else if (action instanceof GatherAction) {

-      return "GATHER";

-    } else if (action instanceof MergeAction) {

-      return "MERGE";

-    } else if (action instanceof GetAction) {

-      return "GET";

-    } else if (action instanceof RemoveAction) {

-      return "REMOVE";

-    } else if (action instanceof RemoveDuplicateAction) {

-      return "REMOVEDUPLICATE";

-    } else if (action instanceof ClearAction) {

-      return "CLEAR";

-    } else if (action instanceof ConfigureAction) {

-      return "CONFIGURE";

-    } else if (action instanceof DynamicAnchoringAction) {

-      return "DYNAMICANCHORING";

-    } else if (action instanceof GreedyAnchoringAction) {

-      return "GREEDYANCHORING";

-    } else if (action instanceof GetListAction) {

-      return "GETLIST";

-    } else if (action instanceof MarkTableAction) {

-      return "MARKTABLE";

-    } else if (action instanceof MatchedTextAction) {

-      return "MATCHEDTEXT";

-    } else if (action instanceof RemoveDuplicateAction) {

-      return "REMOVEDUPLICATE";

-    } else if (action instanceof UnmarkAllAction) {

-      return "UNMARKALL";

-    } else if (action instanceof TrimAction) {

-      return "TRIM";

-    } else if (action instanceof ImplicitMarkAction) {

-      return "";

-    } else if (action instanceof ImplicitFeatureAction) {

-      return "";

-    }

-

-    return action.getClass().getSimpleName();

-  }

-

-  public String verbalize(AbstractRutaAction action) {

-    String name = verbalizeName(action) + "(";

-    if (action instanceof AssignAction) {

-      AssignAction a = (AssignAction) action;

-      return name + a.getVar() + ", " + verbalizer.verbalize(a.getExpression()) + ")";

-    } else if (action instanceof ExecAction) {

-      ExecAction a = (ExecAction) action;

-      TypeListExpression typeList = a.getTypeList();

-      String types = typeList == null ? "" : ", " + verbalizer.verbalize(typeList);

-      String view = a.getView() == null ? "" : verbalizer.verbalize(a.getView()) + ", ";

-      return name + view + a.getNamespace() + types + ")";

-    } else if (action instanceof CallAction) {

-      CallAction a = (CallAction) action;

-      return name + a.getNamespace() + ")";

-    } else if (action instanceof ColorAction) {

-      ColorAction a = (ColorAction) action;

-      return name + verbalizer.verbalize(a.getType()) + ", " + verbalizer.verbalize(a.getBgColor())

-              + ", " + verbalizer.verbalize(a.getFgColor()) + ", "

-              + verbalizer.verbalize(a.getSelected()) + ")";

-    } else if (action instanceof CreateAction) {

-      CreateAction a = (CreateAction) action;

-      StringBuilder features = new StringBuilder();

-      if (a.getFeatures() != null) {

-        features.append(", ");

-        for (Entry<IStringExpression, IRutaExpression> each : a.getFeatures().entrySet()) {

-          features.append(verbalizer.verbalize(each.getKey()));

-          features.append(" = ");

-          features.append(verbalizer.verbalize(each.getValue()));

-          features.append(", ");

-        }

-      }

-      String feats = features.toString();

-      if (feats.endsWith(", ")) {

-        feats = feats.substring(0, features.length() - 2);

-      }

-      String indexes = "";

-      if (a.getIndexes() != null) {

-        indexes += ", ";

-        indexes += verbalizer.verbalizeExpressionList(a.getIndexes());

-      }

-

-      return name + verbalizer.verbalize(a.getStructureType()) + indexes + feats + ")";

-    } else if (action instanceof GatherAction) {

-      GatherAction a = (GatherAction) action;

-      String features = "";

-      if (a.getFeatures() != null) {

-        features += ", ";

-        for (IStringExpression each : a.getFeatures().keySet()) {

-          features += verbalizer.verbalize(each);

-          features += " = ";

-          features += verbalizer.verbalize(a.getFeatures().get(each));

-          features += ", ";

-        }

-      }

-      if (features.endsWith(", ")) {

-        features = features.substring(0, features.length() - 2);

-      }

-      String indexes = "";

-      if (a.getIndexes() != null) {

-        indexes += ", ";

-        indexes = verbalizer.verbalizeExpressionList(a.getIndexes());

-      }

-      if (indexes.endsWith(", ") && !a.getFeatures().isEmpty()) {

-        indexes = indexes.substring(0, features.length() - 1);

-      }

-      return name + verbalizer.verbalize(a.getStructureType()) + ", " + indexes + features + ")";

-    } else if (action instanceof DelAction) {

-      return "DEL";

-    } else if (action instanceof FillAction) {

-      FillAction a = (FillAction) action;

-      String features = "";

-      if (a.getFeatures() != null) {

-        features += ", ";

-        for (IStringExpression each : a.getFeatures().keySet()) {

-          features += verbalizer.verbalize(each);

-          features += " = ";

-          features += verbalizer.verbalize(a.getFeatures().get(each));

-          features += ", ";

-        }

-      }

-      if (features.endsWith(", ")) {

-        features = features.substring(0, features.length() - 2);

-      }

-      return name + verbalizer.verbalize(a.getStructureType()) + features + ")";

-    } else if (action instanceof FilterTypeAction) {

-      FilterTypeAction a = (FilterTypeAction) action;

-      return a.getList().isEmpty() ? "FILTERTYPE" : "FILTERTYPE("

-              + verbalizer.verbalizeExpressionList(a.getList()) + ")";

-    } else if (action instanceof LogAction) {

-      LogAction a = (LogAction) action;

-      return name + verbalizer.verbalize(a.getText()) + ", " + a.getLevel() + ")";

-    } else if (action instanceof MarkOnceAction) {

-      MarkOnceAction a = (MarkOnceAction) action;

-      // String score = verbalizer.verbalize(a.getScore());

-      // if (!"".equals(score)) {

-      // score += ", ";

-      // }

-      String string = "";

-      if (a.getList() != null && !a.getList().isEmpty()) {

-        string = ", " + verbalizer.verbalizeExpressionList(a.getList());

-      }

-      return name + verbalizer.verbalize(a.getType()) + string + ")";

-    } else if (action instanceof ShiftAction) {

-      ShiftAction a = (ShiftAction) action;

-      String string = "";

-      if (a.getList() != null && !a.getList().isEmpty()) {

-        string = ", " + verbalizer.verbalizeExpressionList(a.getList());

-      }

-      return name + verbalizer.verbalize(a.getType()) + string + ")";

-    } else if (action instanceof MarkAction) {

-      MarkAction a = (MarkAction) action;

-      if (a.getScore() != null) {

-        String score = verbalizer.verbalize(a.getScore());

-        if (!"".equals(score)) {

-          score += ", ";

-        }

-        String string = "";

-        if (a.getList() != null && !a.getList().isEmpty()) {

-          string = ", " + verbalizer.verbalizeExpressionList(a.getList());

-        }

-        return name + score + verbalizer.verbalize(a.getType()) + string + ")";

-      } else {

-        String string = "";

-        if (a.getList() != null && !a.getList().isEmpty()) {

-          string = ", " + verbalizer.verbalizeExpressionList(a.getList());

-        }

-        return name + verbalizer.verbalize(a.getType()) + string + ")";

-      }

-    } else if (action instanceof MarkFastAction) {

-      MarkFastAction a = (MarkFastAction) action;

-      String list = "";

-      if (a.getList() != null) {

-        list = verbalizer.verbalize(a.getList());

-      } else if (a.getStringList() != null) {

-        list = verbalizer.verbalize(a.getStringList());

-      }

-      return name + verbalizer.verbalize(a.getType()) + ", " + list + ", "

-              + verbalizer.verbalize(a.getIgnore()) + ", "

-              + verbalizer.verbalize(a.getIgnoreLength()) + ", "

-              + verbalizer.verbalize(a.getIgnoreWS()) + ")";

-    } else if (action instanceof MarkLastAction) {

-      MarkLastAction a = (MarkLastAction) action;

-      return name + verbalizer.verbalize(a.getType()) + ")";

-    } else if (action instanceof MarkFirstAction) {

-      MarkFirstAction a = (MarkFirstAction) action;

-      return name + verbalizer.verbalize(a.getType()) + ")";

-    } else if (action instanceof ReplaceAction) {

-      ReplaceAction a = (ReplaceAction) action;

-      return name + verbalizer.verbalize(a.getReplacement()) + ")";

-    } else if (action instanceof RetainTypeAction) {

-      RetainTypeAction a = (RetainTypeAction) action;

-      return a.getList().isEmpty() ? "RETAINTYPE" : "RETAINTYPE("

-              + verbalizer.verbalizeExpressionList(a.getList()) + ")";

-    } else if (action instanceof SetFeatureAction) {

-      SetFeatureAction a = (SetFeatureAction) action;

-      String e1 = verbalizer.verbalize(a.getFeatureStringExpression());

-      String e2 = verbalizer.verbalize(a.getExpr());

-      return name + e1 + ", " + e2 + ")";

-    } else if (action instanceof GetFeatureAction) {

-      GetFeatureAction a = (GetFeatureAction) action;

-

-      return name + verbalizer.verbalize(a.getFeatureStringExpression()) + ", " + a.getVariable()

-              + ")";

-    } else if (action instanceof UnmarkAction) {

-      UnmarkAction a = (UnmarkAction) action;

-      if (a.getAllAnchor() == null) {

-        if (a.getList() == null) {

-          return name + verbalizer.verbalize(a.getType()) + ")";

-        } else {

-          return name + verbalizer.verbalize(a.getType()) + ", "

-                  + verbalizer.verbalizeExpressionList(a.getList()) + ")";

-        }

-      } else {

-        return name + verbalizer.verbalize(a.getType()) + ", "

-                + verbalizer.verbalizeExpressionList(a.getList()) + ", "

-                + verbalizer.verbalize(a.getAllAnchor()) + ")";

-      }

-    } else if (action instanceof TransferAction) {

-      TransferAction a = (TransferAction) action;

-      return name + verbalizer.verbalize(a.getType()) + ")";

-    } else if (action instanceof TrieAction) {

-      TrieAction a = (TrieAction) action;

-      String map = "";

-      if (a.getMap() != null) {

-        for (IStringExpression each : a.getMap().keySet()) {

-          map += verbalizer.verbalize(each);

-          map += " = ";

-          map += verbalizer.verbalize(a.getMap().get(each));

-          map += ", ";

-        }

-      }

-      return name + map + verbalizer.verbalize(a.getList()) + ", "

-              + verbalizer.verbalize(a.getIgnoreCase()) + ", "

-              + verbalizer.verbalize(a.getIgnoreLength()) + ", "

-              + verbalizer.verbalize(a.getEdit()) + ", " + verbalizer.verbalize(a.getDistance())

-              + ", " + verbalizer.verbalize(a.getIgnoreChar()) + ")";

-    } else if (action instanceof AddAction) {

-      AddAction a = (AddAction) action;

-      return name + a.getListExpr() + ", " + verbalizer.verbalizeExpressionList(a.getElements())

-              + ")";

-    } else if (action instanceof RemoveAction) {

-      RemoveAction a = (RemoveAction) action;

-      return name + a.getListExpr() + ", " + verbalizer.verbalizeExpressionList(a.getElements())

-              + ")";

-    } else if (action instanceof RemoveAction) {

-      RemoveAction a = (RemoveAction) action;

-      return name + a.getListExpr() + ")";

-    } else if (action instanceof MergeAction) {

-      MergeAction a = (MergeAction) action;

-      return name + verbalizer.verbalize(a.getUnion()) + ", " + a.getTarget() + ", "

-              + verbalizer.verbalizeExpressionList(a.getLists()) + ")";

-    } else if (action instanceof GetAction) {

-      GetAction a = (GetAction) action;

-      return name + verbalizer.verbalize(a.getListExpr()) + ", " + a.getVar() + ", "

-              + verbalizer.verbalize(a.getOpExpr()) + ")";

-    } else if (action instanceof ClearAction) {

-      ClearAction a = (ClearAction) action;

-      return name + a.getList() + ")";

-    } else if (action instanceof ConfigureAction) {

-      ConfigureAction a = (ConfigureAction) action;

-

-      String map = "";

-      if (a.getParameterMap() != null) {

-        map += ", ";

-        for (IStringExpression each : a.getParameterMap().keySet()) {

-          map += verbalizer.verbalize(each);

-          map += " = ";

-          map += verbalizer.verbalize(a.getParameterMap().get(each));

-          map += ", ";

-        }

-      }

-      map = map.substring(0, map.length() - 2);

-      return name + a.getNamespace() + map + ")";

-    } else if (action instanceof DynamicAnchoringAction) {

-      DynamicAnchoringAction a = (DynamicAnchoringAction) action;

-

-      IBooleanExpression active = a.getActive();

-      INumberExpression panelty = a.getPanelty();

-      INumberExpression factor = a.getFactor();

-

-      String pa = verbalizer.verbalize(active);

-      String pp = panelty == null ? "" : ", " + verbalizer.verbalize(panelty);

-      String pf = factor == null ? "" : ", " + verbalizer.verbalize(factor);

-      return name + pa + pp + pf + ")";

-    } else if (action instanceof GreedyAnchoringAction) {

-      GreedyAnchoringAction a = (GreedyAnchoringAction) action;

-      IBooleanExpression active = a.getGreedyRuleElement();

-      IBooleanExpression active2 = a.getGreedyRule();

-      String pa = verbalizer.verbalize(active);

-      String pa2 = "";

-      if (active2 != null) {

-        pa2 = ", " + verbalizer.verbalize(active2);

-      }

-      return name + pa + pa2 + ")";

-    } else if (action instanceof GetListAction) {

-      GetListAction a = (GetListAction) action;

-      String var = a.getVar();

-      String op = verbalizer.verbalize(a.getOpExpr());

-      return name + var + ", " + op + ")";

-    } else if (action instanceof MarkTableAction) {

-      MarkTableAction a = (MarkTableAction) action;

-      TypeExpression typeExpr = a.getTypeExpr();

-      INumberExpression indexExpr = a.getIndexExpr();

-      WordTableExpression tableExpr = a.getTableExpr();

-      Map<IStringExpression, INumberExpression> featureMap = a.getFeatureMap();

-      IBooleanExpression ignoreCase = a.getIgnoreCase();

-      INumberExpression ignoreLength = a.getIgnoreLength();

-      IStringExpression ignoreChar = a.getIgnoreChar();

-      INumberExpression maxIgnoreChar = a.getMaxIgnoreChar();

-

-      String type = verbalizer.verbalize(typeExpr);

-      String index = verbalizer.verbalize(indexExpr);

-      String table = verbalizer.verbalize(tableExpr);

-      String map = "";

-      if (featureMap != null) {

-        map += ", ";

-        for (IStringExpression each : featureMap.keySet()) {

-          map += verbalizer.verbalize(each);

-          map += " = ";

-          map += verbalizer.verbalize(featureMap.get(each));

-          map += ", ";

-        }

-      }

-      String icase = ignoreCase == null ? "" : ", " + verbalizer.verbalize(ignoreCase);

-      String ilength = ignoreCase == null ? "" : ", " + verbalizer.verbalize(ignoreLength);

-      String ichar = ignoreCase == null ? "" : ", " + verbalizer.verbalize(ignoreChar);

-      String mic = ignoreCase == null ? "" : ", " + verbalizer.verbalize(maxIgnoreChar);

-

-      return name + type + ", " + index + ", " + table + map + icase + ilength + ichar + mic + ")";

-    } else if (action instanceof MatchedTextAction) {

-      MatchedTextAction a = (MatchedTextAction) action;

-      String var = a.getVar();

-      List<INumberExpression> list = a.getList();

-      String indexes = list == null ? "" : ", " + verbalizer.verbalizeExpressionList(list);

-      return name + var + indexes + ")";

-    } else if (action instanceof RemoveDuplicateAction) {

-      RemoveDuplicateAction a = (RemoveDuplicateAction) action;

-      String listExpr = a.getListExpr();

-      return name + listExpr + ")";

-    } else if (action instanceof UnmarkAllAction) {

-      UnmarkAllAction a = (UnmarkAllAction) action;

-      String verbalize = verbalizer.verbalize(a.getType());

-      String but = a.getList() == null ? "" : ", " + verbalizer.verbalize(a.getList());

-      return name + verbalize + but + ")";

-    } else if (action instanceof TrimAction) {

-      TrimAction a = (TrimAction) action;

-      TypeListExpression typeList = a.getTypeList();

-      String verbalize = "";

-      if (typeList != null) {

-        verbalize = verbalizer.verbalize(typeList);

-      } else if (a.getTypes() != null) {

-        verbalize = verbalizer.verbalizeExpressionList(a.getTypes());

-      }

-      return name + verbalize + ")";

-    } else if (action instanceof ImplicitMarkAction) {

-      ImplicitMarkAction a = (ImplicitMarkAction) action;

-      return verbalizer.verbalize(a.getType());

-    } else if (action instanceof ImplicitFeatureAction) {

-      ImplicitFeatureAction a = (ImplicitFeatureAction) action;

-      return verbalizer.verbalize(a.getExpr());

-    }

-

-    return action.getClass().getSimpleName();

-  }

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ConditionVerbalizer.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ConditionVerbalizer.java
deleted file mode 100644
index c0edd7b..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ConditionVerbalizer.java
+++ /dev/null
@@ -1,458 +0,0 @@
-/*

- * 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.ruta.verbalize;

-

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.condition.AfterCondition;

-import org.apache.uima.ruta.condition.AndCondition;

-import org.apache.uima.ruta.condition.BeforeCondition;

-import org.apache.uima.ruta.condition.ContainsCondition;

-import org.apache.uima.ruta.condition.ContextCountCondition;

-import org.apache.uima.ruta.condition.CountCondition;

-import org.apache.uima.ruta.condition.CurrentCountCondition;

-import org.apache.uima.ruta.condition.EndsWithCondition;

-import org.apache.uima.ruta.condition.FeatureCondition;

-import org.apache.uima.ruta.condition.IfCondition;

-import org.apache.uima.ruta.condition.ImplicitCondition;

-import org.apache.uima.ruta.condition.InListCondition;

-import org.apache.uima.ruta.condition.IsCondition;

-import org.apache.uima.ruta.condition.LastCondition;

-import org.apache.uima.ruta.condition.MOfNCondition;

-import org.apache.uima.ruta.condition.NearCondition;

-import org.apache.uima.ruta.condition.NotCondition;

-import org.apache.uima.ruta.condition.OrCondition;

-import org.apache.uima.ruta.condition.ParseCondition;

-import org.apache.uima.ruta.condition.PartOfCondition;

-import org.apache.uima.ruta.condition.PartOfNeqCondition;

-import org.apache.uima.ruta.condition.PositionCondition;

-import org.apache.uima.ruta.condition.RegExpCondition;

-import org.apache.uima.ruta.condition.ScoreCondition;

-import org.apache.uima.ruta.condition.SizeCondition;

-import org.apache.uima.ruta.condition.StartsWithCondition;

-import org.apache.uima.ruta.condition.TotalCountCondition;

-import org.apache.uima.ruta.condition.VoteCondition;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-

-public class ConditionVerbalizer {

-

-  private RutaVerbalizer verbalizer;

-

-  public ConditionVerbalizer(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-  }

-

-  public String verbalizeName(AbstractRutaCondition condition) {

-    if (condition instanceof AndCondition) {

-      return "AND";

-    } else if (condition instanceof ContainsCondition) {

-      String name = "CONTAINS";

-      return name;

-    } else if (condition instanceof ContextCountCondition) {

-      String name = "CONTEXTCOUNT";

-      return name;

-    } else if (condition instanceof CountCondition) {

-      String name = "COUNT";

-      return name;

-    } else if (condition instanceof CurrentCountCondition) {

-      String name = "CURRENTCOUNT";

-      return name;

-    } else if (condition instanceof IfCondition) {

-      String name = "IF";

-      return name;

-    } else if (condition instanceof InListCondition) {

-      return "INLIST";

-    } else if (condition instanceof LastCondition) {

-      return "LAST";

-    } else if (condition instanceof MOfNCondition) {

-      return "MOFN";

-    } else if (condition instanceof NearCondition) {

-      String name = "NEAR";

-      return name;

-    } else if (condition instanceof NotCondition) {

-      return "NOT";

-    } else if (condition instanceof OrCondition) {

-      return "OR";

-    } else if (condition instanceof PartOfCondition) {

-      return "PARTOF";

-    } else if (condition instanceof PartOfNeqCondition) {

-      return "PARTOFNEQ";

-    } else if (condition instanceof PositionCondition) {

-      return "POSITION";

-    } else if (condition instanceof RegExpCondition) {

-      return "REGEXP";

-    } else if (condition instanceof ScoreCondition) {

-      String name = "SCORE";

-      return name;

-    } else if (condition instanceof TotalCountCondition) {

-      String name = "TOTALCOUNT";

-      return name;

-    } else if (condition instanceof VoteCondition) {

-      String name = "VOTE";

-      return name;

-    } else if (condition instanceof FeatureCondition) {

-      String name = "FEATURE";

-      return name;

-    } else if (condition instanceof ParseCondition) {

-      String name = "PARSE";

-      return name;

-    } else if (condition instanceof IsCondition) {

-      String name = "IS";

-      return name;

-    } else if (condition instanceof BeforeCondition) {

-      String name = "BEFORE";

-      return name;

-    } else if (condition instanceof AfterCondition) {

-      String name = "AFTER";

-      return name;

-    } else if (condition instanceof StartsWithCondition) {

-      String name = "STARTSWITH";

-      return name;

-    } else if (condition instanceof EndsWithCondition) {

-      String name = "ENDSWITH";

-      return name;

-    } else if (condition instanceof SizeCondition) {

-      String name = "SIZE";

-      return name;

-    } else if (condition instanceof ImplicitCondition) {

-      String name = "";

-      return name;

-    }

-

-    return condition.getClass().getSimpleName();

-  }

-

-  public String verbalize(AbstractRutaCondition condition) {

-    String name = verbalizeName(condition) + "(";

-    if (condition instanceof AndCondition) {

-      AndCondition c = (AndCondition) condition;

-      List<AbstractRutaCondition> conditions = c.getConditions();

-      StringBuilder sb = new StringBuilder();

-      sb.append(name);

-      Iterator<AbstractRutaCondition> it = conditions.iterator();

-      while (it.hasNext()) {

-        AbstractRutaCondition each = (AbstractRutaCondition) it.next();

-        sb.append(verbalize(each));

-        if (it.hasNext()) {

-          sb.append(", ");

-        }

-      }

-      sb.append(")");

-      return sb.toString();

-    } else if (condition instanceof ContainsCondition) {

-      ContainsCondition c = (ContainsCondition) condition;

-      INumberExpression minE = c.getMin();

-      String min = verbalizeMin(minE, 1);

-      INumberExpression maxE = c.getMax();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      String percent = verbalizer.verbalize(c.getPercent());

-      percent = !percent.equals("false") ? ", " + percent : "";

-      if (c.getType() != null) {

-        String type = verbalizer.verbalize(c.getType());

-        return name + type + min + max + percent + ")";

-      } else {

-        return name + verbalizer.verbalize(c.getArgList()) + ", "

-                + verbalizer.verbalize(c.getArg()) + min + max + percent + ")";

-      }

-    } else if (condition instanceof ContextCountCondition) {

-      ContextCountCondition c = (ContextCountCondition) condition;

-      String type = verbalizer.verbalize(c.getType());

-      INumberExpression minE = c.getMin();

-      String min = verbalizeMin(minE, Integer.MIN_VALUE);

-      INumberExpression maxE = c.getMax();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      String var = c.getVar() == null ? "" : ", " + c.getVar();

-      return name + type + min + max + var + ")";

-    } else if (condition instanceof CountCondition) {

-      CountCondition c = (CountCondition) condition;

-      if (c.getArg() == null) {

-        String type = verbalizer.verbalize(c.getType());

-        INumberExpression minE = c.getMin();

-        String min = verbalizeMin(minE, Integer.MIN_VALUE);

-        INumberExpression maxE = c.getMax();

-        String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-        String var = c.getVar() == null ? "" : ", " + c.getVar();

-        return name + type + min + max + var + ")";

-      } else {

-        String list = verbalizer.verbalize(c.getArgList());

-        String arg = verbalizer.verbalize(c.getArg());

-        INumberExpression minE = c.getMin();

-        String min = verbalizeMin(minE, Integer.MIN_VALUE);

-        INumberExpression maxE = c.getMax();

-        String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-        String var = c.getVar() == null ? "" : ", " + c.getVar();

-        return name + list + ", " + arg + min + max + var + ")";

-      }

-    } else if (condition instanceof CurrentCountCondition) {

-      CurrentCountCondition c = (CurrentCountCondition) condition;

-      String type = verbalizer.verbalize(c.getType());

-      INumberExpression minE = c.getMin();

-      String min = verbalizeMin(minE, Integer.MIN_VALUE);

-      INumberExpression maxE = c.getMax();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      String var = c.getVar() == null ? "" : ", " + c.getVar();

-      return name + type + min + max + var + ")";

-    } else if (condition instanceof IfCondition) {

-      IfCondition c = (IfCondition) condition;

-      return name + verbalizer.verbalize(c.getExpression()) + ")";

-    } else if (condition instanceof InListCondition) {

-      InListCondition c = (InListCondition) condition;

-      String list = "";

-      if (c.getListExpression() != null) {

-        list = verbalizer.verbalize(c.getListExpression());

-      } else {

-        list = verbalizer.verbalize(c.getStringList());

-      }

-      IStringExpression a = c.getArg();

-      String arg = "";

-      if (a != null) {

-        arg = ", " + verbalizer.verbalize(a);

-      }

-      return name + list +arg + ")";

-    } else if (condition instanceof LastCondition) {

-      LastCondition c = (LastCondition) condition;

-      return name + verbalizer.verbalize(c.getType()) + ")";

-    } else if (condition instanceof MOfNCondition) {

-      MOfNCondition c = (MOfNCondition) condition;

-      StringBuilder sb = new StringBuilder();

-      sb.append(name);

-

-      INumberExpression minE = c.getMin();

-      String min = verbalizeMin(minE, Integer.MIN_VALUE);

-      INumberExpression maxE = c.getMax();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      sb.append(min.substring(2, min.length()));

-      sb.append(max);

-      List<AbstractRutaCondition> conditions = c.getConditions();

-      if (!conditions.isEmpty()) {

-        sb.append(", ");

-      }

-      Iterator<AbstractRutaCondition> it = conditions.iterator();

-      while (it.hasNext()) {

-        AbstractRutaCondition each = (AbstractRutaCondition) it.next();

-        sb.append(verbalize(each));

-        if (it.hasNext()) {

-          sb.append(", ");

-        }

-      }

-      sb.append(")");

-      return sb.toString();

-    } else if (condition instanceof NearCondition) {

-      NearCondition c = (NearCondition) condition;

-      String type = verbalizer.verbalize(c.getType());

-      String var = verbalizer.verbalize(c.getForward());

-      INumberExpression minE = c.getMin();

-      String min = verbalizeMin(minE, Integer.MIN_VALUE);

-      INumberExpression maxE = c.getMax();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      String filtered = verbalizer.verbalize(c.getFiltered());

-      if (!"".equals(filtered)) {

-        filtered = ", " + filtered;

-      }

-      return name + type + min + max + ", " + var + filtered + ")";

-    } else if (condition instanceof NotCondition) {

-      NotCondition c = (NotCondition) condition;

-      List<AbstractRutaCondition> conditions = c.getConditions();

-      if (conditions.size() != 1) {

-        StringBuilder sb = new StringBuilder();

-        sb.append(name);

-        Iterator<AbstractRutaCondition> it = conditions.iterator();

-        while (it.hasNext()) {

-          AbstractRutaCondition each = (AbstractRutaCondition) it.next();

-          sb.append(verbalize(each));

-          if (it.hasNext()) {

-            sb.append(", ");

-          }

-        }

-        sb.append(")");

-        return sb.toString();

-      } else {

-        return "-" + verbalize(conditions.get(0));

-      }

-    } else if (condition instanceof OrCondition) {

-      OrCondition c = (OrCondition) condition;

-      List<AbstractRutaCondition> conditions = c.getConditions();

-      StringBuilder sb = new StringBuilder();

-      sb.append(name);

-      Iterator<AbstractRutaCondition> it = conditions.iterator();

-      while (it.hasNext()) {

-        AbstractRutaCondition each = (AbstractRutaCondition) it.next();

-        sb.append(verbalize(each));

-        if (it.hasNext()) {

-          sb.append(", ");

-        }

-      }

-      sb.append(")");

-      return sb.toString();

-    } else if (condition instanceof PartOfCondition) {

-      PartOfCondition c = (PartOfCondition) condition;

-      if (c.getType() == null) {

-        return name + verbalizer.verbalize(c.getList()) + ")";

-      } else {

-        return name + verbalizer.verbalize(c.getType()) + ")";

-      }

-    } else if (condition instanceof PartOfNeqCondition) {

-      PartOfNeqCondition c = (PartOfNeqCondition) condition;

-      if (c.getType() == null) {

-        return name + verbalizer.verbalize(c.getList()) + ")";

-      } else {

-        return name + verbalizer.verbalize(c.getType()) + ")";

-      }

-    } else if (condition instanceof PositionCondition) {

-      PositionCondition c = (PositionCondition) condition;

-      String relative = "";

-      if (c.getRelative() != null) {

-        relative = ", " + verbalizer.verbalize(c.getRelative());

-      }

-      return name + verbalizer.verbalize(c.getType()) + ", "

-              + verbalizer.verbalize(c.getPosition()) + relative + ")";

-    } else if (condition instanceof RegExpCondition) {

-      RegExpCondition c = (RegExpCondition) condition;

-      IStringExpression variable = c.getVariable();

-      String ic = verbalizer.verbalize(c.getIgnoreCase());

-      if (variable == null) {

-        return name + verbalizer.verbalize(c.getPattern()) + ", " + ic + ")";

-      } else {

-        return name + verbalizer.verbalize(variable) + ", " + verbalizer.verbalize(c.getPattern()) + ", " + ic + ")";

-      }

-    } else if (condition instanceof ScoreCondition) {

-      ScoreCondition c = (ScoreCondition) condition;

-      // String type = verbalizer.verbalize(c.getType());

-      INumberExpression minE = c.getMin();

-      String min = verbalizeMin(minE, Integer.MIN_VALUE);

-      INumberExpression maxE = c.getMax();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      String var = c.getVar() == null ? "" : ", " + c.getVar();

-      return name + min.substring(2) + max + var + ")";

-    } else if (condition instanceof TotalCountCondition) {

-      TotalCountCondition c = (TotalCountCondition) condition;

-      String type = verbalizer.verbalize(c.getType());

-      INumberExpression minE = c.getMin();

-      String min = verbalizeMin(minE, Integer.MIN_VALUE);

-      INumberExpression maxE = c.getMax();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      String var = c.getVar() == null ? "" : ", " + c.getVar();

-      return name + type + min + max + var + ")";

-    } else if (condition instanceof VoteCondition) {

-      VoteCondition c = (VoteCondition) condition;

-      String type1 = verbalizer.verbalize(c.getType1());

-      String type2 = verbalizer.verbalize(c.getType2());

-      return name + type1 + ", " + type2 + ")";

-    } else if (condition instanceof FeatureCondition) {

-      FeatureCondition c = (FeatureCondition) condition;

-      String e1 = verbalizer.verbalize(c.getFeatureStringExpression());

-      String e2 = verbalizer.verbalize(c.getArgExpr());

-      return name + e1 + ", " + e2 + ")";

-    } else if (condition instanceof ParseCondition) {

-      ParseCondition c = (ParseCondition) condition;

-      String var = c.getVar();

-      return name + var + ")";

-    } else if (condition instanceof IsCondition) {

-      IsCondition c = (IsCondition) condition;

-      String type = "";

-      if (c.getType() != null) {

-        type = verbalizer.verbalize(c.getType());

-      } else {

-        type = verbalizer.verbalize(c.getList());

-      }

-      return name + type + ")";

-    } else if (condition instanceof BeforeCondition) {

-      BeforeCondition c = (BeforeCondition) condition;

-      String type = "";

-      if (c.getType() != null) {

-        type = verbalizer.verbalize(c.getType());

-      } else {

-        type = verbalizer.verbalize(c.getList());

-      }

-      return name + type + ")";

-    } else if (condition instanceof AfterCondition) {

-      AfterCondition c = (AfterCondition) condition;

-      String type = "";

-      if (c.getType() != null) {

-        type = verbalizer.verbalize(c.getType());

-      } else {

-        type = verbalizer.verbalize(c.getList());

-      }

-      return name + type + ")";

-    } else if (condition instanceof StartsWithCondition) {

-      StartsWithCondition c = (StartsWithCondition) condition;

-      String arg = "";

-      if (c.getType() != null) {

-        arg = verbalizer.verbalize(c.getType());

-      } else {

-        arg = verbalizer.verbalize(c.getList());

-      }

-      return name + arg + ")";

-    } else if (condition instanceof EndsWithCondition) {

-      EndsWithCondition c = (EndsWithCondition) condition;

-      String type = "";

-      if (c.getType() != null) {

-        type = verbalizer.verbalize(c.getType());

-      } else {

-        type = verbalizer.verbalize(c.getList());

-      }

-      return name + type + ")";

-    } else if (condition instanceof SizeCondition) {

-      SizeCondition c = (SizeCondition) condition;

-      INumberExpression minE = c.getMinExpr();

-      String min = verbalizeMin(minE, Integer.MIN_VALUE);

-      INumberExpression maxE = c.getMaxExpr();

-      String max = verbalizeMax(maxE, Integer.MAX_VALUE);

-      String var = c.getVarExpr() == null ? "" : ", " + c.getVarExpr();

-      ListExpression<?> listExpr = c.getListExpr();

-      if (listExpr == null) {

-        return name + min + max + var + ")";

-      } else {

-        String l = verbalizer.verbalize(listExpr);

-        return name + l + min + max + var + ")";

-      }

-    } else if (condition instanceof ImplicitCondition) {

-      ImplicitCondition c = (ImplicitCondition) condition;

-      return verbalizer.verbalize(c.getExpr());

-    }

-

-    return condition.getClass().getSimpleName();

-  }

-

-  private String verbalizeMax(INumberExpression maxE, int def) {

-    String max = "";

-    if (!(maxE instanceof SimpleNumberExpression && ((SimpleNumberExpression) maxE).getNumber()

-            .equals(def))) {

-      max = ", " + verbalizer.verbalize(maxE);

-    }

-    return max;

-  }

-

-  private String verbalizeMin(INumberExpression minE, int def) {

-    String min = "";

-    if (!(minE instanceof SimpleNumberExpression && ((SimpleNumberExpression) minE).getNumber()

-            .equals(def))) {

-      min = ", " + verbalizer.verbalize(minE);

-    }

-    return min;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ExpressionVerbalizer.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ExpressionVerbalizer.java
deleted file mode 100644
index 53d9cfd..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ExpressionVerbalizer.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*

- * 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.ruta.verbalize;

-

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.MatchReference;

-import org.apache.uima.ruta.expression.bool.BooleanFeatureExpression;

-import org.apache.uima.ruta.expression.bool.BooleanNumberExpression;

-import org.apache.uima.ruta.expression.bool.BooleanTypeExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.ReferenceBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.feature.FeatureExpression;

-import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;

-import org.apache.uima.ruta.expression.feature.GenericFeatureExpression;

-import org.apache.uima.ruta.expression.feature.SimpleFeatureExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceBooleanListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceNumberListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceStringListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceTypeListExpression;

-import org.apache.uima.ruta.expression.list.SimpleBooleanListExpression;

-import org.apache.uima.ruta.expression.list.SimpleNumberListExpression;

-import org.apache.uima.ruta.expression.list.SimpleStringListExpression;

-import org.apache.uima.ruta.expression.list.SimpleTypeListExpression;

-import org.apache.uima.ruta.expression.list.UntypedListExpression;

-import org.apache.uima.ruta.expression.number.ComposedNumberExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.NegativeNumberExpression;

-import org.apache.uima.ruta.expression.number.NumberFeatureExpression;

-import org.apache.uima.ruta.expression.number.ReferenceNumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.resource.ReferenceWordListExpression;

-import org.apache.uima.ruta.expression.resource.ReferenceWordTableExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.ComposedStringExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.string.LiteralStringExpression;

-import org.apache.uima.ruta.expression.string.ReferenceStringExpression;

-import org.apache.uima.ruta.expression.string.SimpleStringExpression;

-import org.apache.uima.ruta.expression.string.StringFeatureExpression;

-import org.apache.uima.ruta.expression.type.ReferenceTypeExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-

-public class ExpressionVerbalizer {

-

-  private RutaVerbalizer verbalizer;

-

-  public ExpressionVerbalizer(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-  }

-

-  public String verbalize(IRutaExpression expression) {

-    if (expression instanceof TypeExpression) {

-      return verbalize((TypeExpression) expression);

-    } else if (expression instanceof IBooleanExpression) {

-      return verbalize((IBooleanExpression) expression);

-    } else if (expression instanceof INumberExpression) {

-      return verbalize((INumberExpression) expression);

-    } else if (expression instanceof WordListExpression) {

-      return verbalize((WordListExpression) expression);

-    } else if (expression instanceof WordTableExpression) {

-      return verbalize((WordTableExpression) expression);

-    } else if (expression instanceof ListExpression<?>) {

-      return verbalize((ListExpression<?>) expression);

-    } else if (expression instanceof FeatureMatchExpression) {

-      return verbalize((FeatureMatchExpression) expression);

-    } else if (expression instanceof FeatureExpression) {

-      return verbalize((FeatureExpression) expression);

-    } else if (expression instanceof IStringExpression) {

-      return verbalize((IStringExpression) expression);

-    } else if (expression instanceof MatchReference) {

-      return verbalize((MatchReference) expression);

-    } else if (expression instanceof GenericFeatureExpression) {

-      return verbalize(((GenericFeatureExpression) expression).getFeatureExpression());

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(WordTableExpression expression) {

-    if (expression instanceof ReferenceWordTableExpression) {

-      ReferenceWordTableExpression e = (ReferenceWordTableExpression) expression;

-      return e.getRef();

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(WordListExpression expression) {

-    if (expression instanceof ReferenceWordListExpression) {

-      ReferenceWordListExpression e = (ReferenceWordListExpression) expression;

-      return e.getRef();

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(ListExpression<?> expression) {

-    if (expression instanceof SimpleBooleanListExpression) {

-      SimpleBooleanListExpression e = (SimpleBooleanListExpression) expression;

-      return "{" + verbalizer.verbalizeExpressionList(e.getList()) + "}";

-    } else if (expression instanceof ReferenceBooleanListExpression) {

-      ReferenceBooleanListExpression e = (ReferenceBooleanListExpression) expression;

-      return e.getVar();

-    } else if (expression instanceof SimpleNumberListExpression) {

-      SimpleNumberListExpression e = (SimpleNumberListExpression) expression;

-      return "{" + verbalizer.verbalizeExpressionList(e.getList()) + "}";

-    } else if (expression instanceof ReferenceNumberListExpression) {

-      ReferenceNumberListExpression e = (ReferenceNumberListExpression) expression;

-      return e.getVar();

-    } else if (expression instanceof SimpleStringListExpression) {

-      SimpleStringListExpression e = (SimpleStringListExpression) expression;

-      return "{" + verbalizer.verbalizeExpressionList(e.getList()) + "}";

-    } else if (expression instanceof ReferenceStringListExpression) {

-      ReferenceStringListExpression e = (ReferenceStringListExpression) expression;

-      return e.getVar();

-    } else if (expression instanceof SimpleTypeListExpression) {

-      SimpleTypeListExpression e = (SimpleTypeListExpression) expression;

-      return "{" + verbalizer.verbalizeExpressionList(e.getList()) + "}";

-    } else if (expression instanceof ReferenceTypeListExpression) {

-      ReferenceTypeListExpression e = (ReferenceTypeListExpression) expression;

-      return e.getVar();

-    } else if (expression instanceof UntypedListExpression) {

-      UntypedListExpression e = (UntypedListExpression) expression;

-      return "{" + verbalizer.verbalizeExpressionList(e.getList()) + "}";

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(INumberExpression expression) {

-    if (expression == null) {

-      return "";

-    } else if (expression instanceof NegativeNumberExpression) {

-      NegativeNumberExpression e = (NegativeNumberExpression) expression;

-      return "-(" + e.getExpression() + ")";

-    } else if (expression instanceof ReferenceNumberExpression) {

-      ReferenceNumberExpression e = (ReferenceNumberExpression) expression;

-      return e.getVar();

-    } else if (expression instanceof SimpleNumberExpression) {

-      SimpleNumberExpression e = (SimpleNumberExpression) expression;

-      return e.getNumber().toString();

-    } else if (expression instanceof ComposedNumberExpression) {

-      ComposedNumberExpression e = (ComposedNumberExpression) expression;

-      INumberExpression ne = e.getExpressions().get(0);

-      if (ne == null) {

-        return "";

-      }

-      StringBuilder result = new StringBuilder(verbalize(ne));

-      for (int i = 0; i < e.getOperators().size(); i++) {

-        result.append(" " + e.getOperators().get(i) + " ");

-        if (e.getExpressions().size() > i + 1) {

-          result.append(verbalize(e.getExpressions().get(i + 1)));

-        }

-      }

-      return result.toString();

-    } else if (expression instanceof NumberFeatureExpression) {

-      return verbalize(((NumberFeatureExpression) expression).getFe());

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(IBooleanExpression expression) {

-    if (expression == null) {

-      return "";

-    } else if (expression instanceof BooleanNumberExpression) {

-      BooleanNumberExpression e = (BooleanNumberExpression) expression;

-      return verbalize(e.getFristExpression()) + " " + e.getOperator() + " "

-              + verbalize(e.getSecondExpression());

-    } else if (expression instanceof BooleanTypeExpression) {

-      BooleanTypeExpression e = (BooleanTypeExpression) expression;

-      return verbalize(e.getFristExpression()) + " " + e.getOperator() + " "

-              + verbalize(e.getSecondExpression());

-    } else if (expression instanceof ReferenceBooleanExpression) {

-      ReferenceBooleanExpression e = (ReferenceBooleanExpression) expression;

-      return e.getVar();

-    } else if (expression instanceof SimpleBooleanExpression) {

-      SimpleBooleanExpression e = (SimpleBooleanExpression) expression;

-      return e.getPrimitiveValue() ? "true" : "false";

-    } else if (expression instanceof BooleanFeatureExpression) {

-      return verbalize(((BooleanFeatureExpression) expression).getFe());

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(IStringExpression expression) {

-    if (expression == null) {

-      return "";

-    } else if (expression instanceof INumberExpression) {

-      return verbalize((INumberExpression) expression);

-    } else if (expression instanceof TypeExpression) {

-      return verbalize((TypeExpression) expression);

-    } else if (expression instanceof IBooleanExpression) {

-      return verbalize((IBooleanExpression) expression);

-    } else if (expression instanceof ListExpression) {

-      return verbalize((ListExpression) expression);

-    } else if (expression instanceof LiteralStringExpression) {

-      return verbalize((LiteralStringExpression) expression);

-    } else if (expression instanceof StringFeatureExpression) {

-      return verbalize(((StringFeatureExpression) expression).getFe());

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(LiteralStringExpression expression) {

-    if (expression == null) {

-      return "";

-    } else if (expression instanceof ComposedStringExpression) {

-      ComposedStringExpression e = (ComposedStringExpression) expression;

-      StringBuilder sb = new StringBuilder();

-      Iterator<IStringExpression> it = e.getExpressions().iterator();

-      while (it.hasNext()) {

-        IStringExpression each = it.next();

-        sb.append(verbalize(each));

-        if (it.hasNext()) {

-          sb.append(" + ");

-        }

-      }

-      return sb.toString();

-    } else if (expression instanceof ReferenceStringExpression) {

-      ReferenceStringExpression e = (ReferenceStringExpression) expression;

-      return e.getVar();

-    } else if (expression instanceof SimpleStringExpression) {

-      SimpleStringExpression e = (SimpleStringExpression) expression;

-      return "\"" + e.getValue() + "\"";

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(TypeExpression expression) {

-    if (expression == null) {

-      return null;

-    }

-    if (expression instanceof SimpleTypeExpression) {

-      SimpleTypeExpression e = (SimpleTypeExpression) expression;

-      String type = e.getTypeString();

-      int indexOf = type.lastIndexOf(".");

-      if (indexOf != -1) {

-        type = type.substring(indexOf + 1, type.length());

-      }

-      if (type.equals("DocumentAnnotation")) {

-        type = "Document";

-      }

-      return type;

-    } else if (expression instanceof ReferenceTypeExpression) {

-      ReferenceTypeExpression e = (ReferenceTypeExpression) expression;

-      return e.getVar();

-    }

-    return expression.getClass().getSimpleName();

-  }

-

-  public String verbalize(MatchReference expression) {

-    String tail = "";

-    String head = expression.getMatch();

-    if (expression.getOp() != null) {

-      tail += expression.getOp();

-      if (expression.getArg() != null) {

-        tail += verbalize(expression.getArg());

-      }

-    }

-    return head + tail;

-  }

-

-  public String verbalize(FeatureExpression expression) {

-    StringBuilder sb = new StringBuilder();

-    if (expression instanceof SimpleFeatureExpression) {

-      SimpleFeatureExpression sfe = (SimpleFeatureExpression) expression;

-      sb.append(sfe.getMatchReference().getMatch());

-    } else {

-      sb.append(verbalize(expression.getTypeExpr(null)));

-      List<String> list = expression.getFeatureStringList(null);

-      if (list != null) {

-        for (String string : list) {

-          sb.append(".");

-          sb.append(string);

-        }

-      }

-    }

-    return sb.toString();

-  }

-

-  public String verbalize(FeatureMatchExpression expression) {

-    return verbalize((FeatureExpression) expression) + expression.getOp()

-            + verbalize(expression.getArg());

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/RutaVerbalizer.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/RutaVerbalizer.java
deleted file mode 100644
index b1e4d32..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/RutaVerbalizer.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*

- * 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.ruta.verbalize;

-

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.RutaExpression;

-import org.apache.uima.ruta.extensions.IRutaExtension;

-import org.apache.uima.ruta.rule.ComposedRuleElement;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-

-public class RutaVerbalizer {

-

-  private Map<Class<?>, IRutaExtension> externalVerbalizers = new HashMap<Class<?>, IRutaExtension>();

-

-  private ActionVerbalizer actionVerbalizer;

-

-  private ConditionVerbalizer conditionVerbalizer;

-

-  private ExpressionVerbalizer expressionVerbalizer;

-

-  private ScriptVerbalizer scriptVerbalizer;

-

-  private VerbalizerUtils verbalizerUtils;

-

-  public RutaVerbalizer() {

-    super();

-    actionVerbalizer = new ActionVerbalizer(this);

-    conditionVerbalizer = new ConditionVerbalizer(this);

-    expressionVerbalizer = new ExpressionVerbalizer(this);

-    scriptVerbalizer = new ScriptVerbalizer(this);

-    verbalizerUtils = new VerbalizerUtils(this);

-  }

-

-  public void addExternalVerbalizers(IRutaExtension verbalizer) {

-    Class<?>[] extensions = verbalizer.extensions();

-    for (Class<?> eachClass : extensions) {

-      externalVerbalizers.put(eachClass, verbalizer);

-    }

-  }

-

-  public String verbalize(Object element) {

-    if (externalVerbalizers.keySet().contains(element.getClass()) && element instanceof RutaElement) {

-      return externalVerbalizers.get(element.getClass()).verbalize((RutaElement) element, this);

-    } else if (element instanceof AbstractRutaAction) {

-      return actionVerbalizer.verbalize((AbstractRutaAction) element);

-    } else if (element instanceof AbstractRutaCondition) {

-      return conditionVerbalizer.verbalize((AbstractRutaCondition) element);

-    } else if (element instanceof IRutaExpression) {

-      return expressionVerbalizer.verbalize((RutaExpression) element);

-    } else if(element instanceof RutaElement){

-      return scriptVerbalizer.verbalize((RutaElement) element);

-    } else if(element instanceof RutaBlock){

-      return verbalize((RutaBlock) element, false);

-    } else {

-      return element.getClass().getSimpleName();

-    }

-  }

-  

-  public String verbalizeName(RutaElement element) {

-    if (externalVerbalizers.keySet().contains(element.getClass())) {

-      return externalVerbalizers.get(element.getClass()).verbalizeName(element);

-    } else if (element instanceof AbstractRutaAction) {

-      return actionVerbalizer.verbalizeName((AbstractRutaAction) element);

-    } else if (element instanceof AbstractRutaCondition) {

-      return conditionVerbalizer.verbalizeName((AbstractRutaCondition) element);

-    }

-    return element.getClass().getSimpleName();

-  }

-

-  public String verbalize(RutaBlock block, boolean withElements) {

-    return scriptVerbalizer.verbalizeBlock(block, withElements);

-  }

-

-  public String verbalize(RuleElement element) {

-    return scriptVerbalizer.verbalizeRuleElement(element);

-  }

-

-  public String verbalizeType(Type type) {

-    if (type.getName().equals("uima.tcas.DocumentAnnotation")) {

-      return "Document";

-    } else {

-      return type.getShortName();

-    }

-  }

-

-  public String verbalizeList(List<?> list) {

-    return verbalizerUtils.verbalizeList(list);

-  }

-

-  public String verbalizeTypeList(List<Type> list) {

-    return verbalizerUtils.verbalizeTypeList(list);

-  }

-

-  public String verbalizeExpressionList(List<? extends IRutaExpression> list) {

-    return verbalizerUtils.verbalizeExpressionList(list);

-  }

-

-  public String verbalizeMatcher(RutaRuleElement tmre) {

-    return scriptVerbalizer.verbalizeMatcher(tmre);

-  }

-

-  public String verbalizeComposed(ComposedRuleElement cre) {

-    return scriptVerbalizer.verbalizeComposed(cre);

-  }

-

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ScriptVerbalizer.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ScriptVerbalizer.java
deleted file mode 100644
index 8aa2393..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/ScriptVerbalizer.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*

- * 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.ruta.verbalize;

-

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.rule.AbstractRuleElement;

-import org.apache.uima.ruta.rule.ComposedRuleElement;

-import org.apache.uima.ruta.rule.ConjunctRulesRuleElement;

-import org.apache.uima.ruta.rule.RegExpRule;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RutaMatcher;

-import org.apache.uima.ruta.rule.RutaRule;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-import org.apache.uima.ruta.rule.WildCardRuleElement;

-import org.apache.uima.ruta.rule.quantifier.MinMaxGreedy;

-import org.apache.uima.ruta.rule.quantifier.MinMaxReluctant;

-import org.apache.uima.ruta.rule.quantifier.NormalQuantifier;

-import org.apache.uima.ruta.rule.quantifier.PlusGreedy;

-import org.apache.uima.ruta.rule.quantifier.PlusReluctant;

-import org.apache.uima.ruta.rule.quantifier.QuestionGreedy;

-import org.apache.uima.ruta.rule.quantifier.QuestionReluctant;

-import org.apache.uima.ruta.rule.quantifier.RuleElementQuantifier;

-import org.apache.uima.ruta.rule.quantifier.StarGreedy;

-import org.apache.uima.ruta.rule.quantifier.StarReluctant;

-

-public class ScriptVerbalizer {

-

-  private static final String CBCLOSE = "}";

-

-  private static final String CBOPEN = "{";

-

-  private static final String THEN = " -> ";

-

-  private static final String THEN2 = " <- ";

-  

-  private RutaVerbalizer verbalizer;

-

-  public ScriptVerbalizer(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-  }

-

-  public String verbalizeBlock(RutaBlock block, boolean withElements) {

-    StringBuilder result = new StringBuilder();

-    RutaRule rule = block.getRule();

-    List<RutaStatement> elements = block.getElements();

-    String name = block.getName();

-    result.append("BLOCK");

-    if(name != null) {

-      result.append("(");

-      result.append(name);

-      result.append(")");

-    }

-    result.append(" ");

-    if (rule != null) {

-      result.append(verbalizeRule(rule));

-    }

-    if (withElements) {

-      result.append(" {\n");

-      for (RutaStatement each : elements) {

-        if (each instanceof RutaBlock) {

-          result.append(verbalizeBlock((RutaBlock) each, withElements));

-        } else if (each instanceof RutaRule) {

-          result.append(verbalizeRule((RutaRule) each));

-        }

-        result.append(";");

-        result.append("\n");

-      }

-      result.append(" }\n");

-    }

-    return result.toString();

-  }

-

-  public String verbalizeRule(RutaRule rule) {

-    List<RuleElement> elements = rule.getRuleElements();

-    StringBuilder result = new StringBuilder();

-    for (RuleElement each : elements) {

-      result.append(verbalizeRuleElement(each));

-      result.append(" ");

-    }

-    return result.toString();

-  }

-

-  public String verbalizeRuleElement(RuleElement re) {

-    List<AbstractRutaCondition> conditions = re.getConditions();

-    List<AbstractRutaAction> actions = re.getActions();

-    RuleElementQuantifier quantifier = re.getQuantifier();

-    StringBuilder result = new StringBuilder();

-    if(re.isStartAnchor()) {

-      result.append("@");

-    }

-    if(re instanceof ConjunctRulesRuleElement) {

-      result.append(verbalizeConjunct((ConjunctRulesRuleElement) re));

-    } else if (re instanceof ComposedRuleElement) {

-      result.append(verbalizeComposed((ComposedRuleElement) re));

-    } else if (re instanceof RutaRuleElement) {

-      RutaRuleElement tmre = (RutaRuleElement) re;

-      result.append(verbalizeMatcher(tmre));

-    } else if (re instanceof WildCardRuleElement) {

-      result.append("#");

-    }

-    result.append(verbalizeQuantifier(quantifier));

-

-    if (!conditions.isEmpty() || !actions.isEmpty()) {

-      result.append(CBOPEN);

-      Iterator<AbstractRutaCondition> cit = conditions.iterator();

-      while (cit.hasNext()) {

-        AbstractRutaCondition each = cit.next();

-        result.append(verbalizer.verbalize(each));

-        if (cit.hasNext()) {

-          result.append(",");

-        }

-      }

-      if (!actions.isEmpty()) {

-        result.append(THEN);

-        Iterator<AbstractRutaAction> ait = actions.iterator();

-        while (ait.hasNext()) {

-          AbstractRutaAction each = ait.next();

-          result.append(verbalizer.verbalize(each));

-          if (ait.hasNext()) {

-            result.append(",");

-          }

-        }

-      }

-      result.append(CBCLOSE);

-    }

-    if(re instanceof AbstractRuleElement) {

-      AbstractRuleElement are = (AbstractRuleElement) re;

-      boolean blockMode = are.getInlineMode();

-      List<RutaStatement> inlinedRules = are.getInlinedRules();

-      if(inlinedRules != null && !inlinedRules.isEmpty()) {

-        if(blockMode) {

-          result.append(THEN);

-        } else {

-          result.append(THEN2);

-        }

-        result.append(CBOPEN);

-        for (RutaStatement rutaStatement : inlinedRules) {

-          result.append(verbalize(rutaStatement));

-          result.append(";");

-//          result.append("\n");

-        }

-        result.append(CBCLOSE);

-      }

-    }

-    return result.toString();

-  }

-

-  private String verbalizeConjunct(ConjunctRulesRuleElement re) {

-    StringBuilder result = new StringBuilder();

-    String sep = " % ";

-    List<RuleElement> ruleElements = re.getRuleElements();

-    for (RuleElement each : ruleElements) {

-      if (re.getRuleElements().indexOf(each) != 0) {

-        result.append(sep);

-      }

-      result.append(verbalizeRuleElement(each));

-    }

-    return result.toString();

-  }

-

-  public String verbalizeComposed(ComposedRuleElement cre) {

-    StringBuilder result = new StringBuilder();

-    List<RuleElement> ruleElements = cre.getRuleElements();

-    result.append("(");

-    String sep = " ";

-    Boolean conjunct = cre.getConjunct();

-    if(conjunct != null) {

-      if(conjunct) {

-        sep = " & ";

-      } else {

-        sep = " | ";

-      }

-    }

-    for (RuleElement each : ruleElements) {

-      if (cre.getRuleElements().indexOf(each) != 0) {

-        result.append(sep);

-      }

-      result.append(verbalizeRuleElement(each));

-    }

-    result.append(")");

-    return result.toString();

-  }

-

-  public String verbalizeMatcher(RutaRuleElement tmre) {

-    StringBuilder result = new StringBuilder();

-    RutaMatcher matcher = tmre.getMatcher();

-    result.append(verbalizer.verbalize(matcher.getExpression()));

-    return result.toString();

-  }

-

-  public String verbalizeQuantifier(RuleElementQuantifier quantifier) {

-    if (quantifier instanceof NormalQuantifier) {

-      return "";

-    } else if (quantifier instanceof MinMaxGreedy) {

-      MinMaxGreedy mmg = (MinMaxGreedy) quantifier;

-      return "[" + verbalizer.verbalize(mmg.getMin()) + "," + verbalizer.verbalize(mmg.getMax())

-              + "]";

-    } else if (quantifier instanceof MinMaxReluctant) {

-      MinMaxReluctant mmr = (MinMaxReluctant) quantifier;

-      return "[" + verbalizer.verbalize(mmr.getMin()) + "," + verbalizer.verbalize(mmr.getMax())

-              + "]?";

-    } else if (quantifier instanceof PlusGreedy) {

-      return "+";

-    } else if (quantifier instanceof PlusReluctant) {

-      return "+?";

-    } else if (quantifier instanceof QuestionGreedy) {

-      return "?";

-    } else if (quantifier instanceof QuestionReluctant) {

-      return "??";

-    } else if (quantifier instanceof StarGreedy) {

-      return "*";

-    } else if (quantifier instanceof StarReluctant) {

-      return "*?";

-    }

-    return null;

-  }

-

-  public String verbalize(RutaElement element) {

-    if (element instanceof RutaBlock) {

-      return verbalizeBlock((RutaBlock) element, false);

-    } else if (element instanceof RuleElementQuantifier) {

-      return verbalizeQuantifier((RuleElementQuantifier) element);

-    } else if (element instanceof RutaRule) {

-      return verbalizeRule((RutaRule) element);

-    } else if (element instanceof RegExpRule) {

-      return verbalizeRegExpRule((RegExpRule) element);

-    } else if (element instanceof RutaRuleElement) {

-      return verbalizeRuleElement((RutaRuleElement) element);

-    }

-    return null;

-  }

-

-  private String verbalizeRegExpRule(RegExpRule rule) {

-    StringBuilder sb = new StringBuilder();

-    String regexp = verbalizer.verbalize(rule.getRegExp());

-    sb.append(regexp);

-    sb.append(THEN);

-

-    Iterator<Entry<TypeExpression, INumberExpression>> iterator = rule.getTypeMap().entrySet()

-            .iterator();

-    while (iterator.hasNext()) {

-      Entry<TypeExpression, INumberExpression> next = iterator.next();

-      String type = verbalizer.verbalize(next.getKey());

-      INumberExpression value = next.getValue();

-      if (value != null) {

-        String group = verbalizer.verbalize(value);

-        sb.append(group + " = " + type);

-      } else {

-        sb.append(type);

-      }

-      Map<TypeExpression, Map<IStringExpression, IRutaExpression>> featureAssignments = rule

-              .getFeatureAssignments();

-      if (featureAssignments != null) {

-        Map<IStringExpression, IRutaExpression> map = featureAssignments.get(next.getKey());

-        if (map != null) {

-          sb.append("(");

-          Iterator<Entry<IStringExpression, IRutaExpression>> fit = map.entrySet().iterator();

-          while (fit.hasNext()) {

-            Map.Entry<IStringExpression, IRutaExpression> entry = (Map.Entry<IStringExpression, IRutaExpression>) fit

-                    .next();

-            sb.append(verbalizer.verbalize(entry.getKey()));

-            sb.append(" = ");

-            sb.append(verbalizer.verbalize(entry.getValue()));

-            if (fit.hasNext()) {

-              sb.append(", ");

-            }

-          }

-          sb.append(")");

-        }

-

-      }

-      if (iterator.hasNext()) {

-        sb.append(", ");

-      }

-    }

-    sb.append(";");

-    return sb.toString();

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/VerbalizerUtils.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/VerbalizerUtils.java
deleted file mode 100644
index 1b07f6a..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/VerbalizerUtils.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * 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.ruta.verbalize;

-

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.expression.IRutaExpression;

-

-public class VerbalizerUtils {

-

-  private RutaVerbalizer verbalizer;

-

-  public VerbalizerUtils(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-  }

-

-  public String verbalizeList(List<?> list) {

-    StringBuilder result = new StringBuilder();

-    Iterator<?> it = list.iterator();

-    while (it.hasNext()) {

-      Object obj = it.next();

-      result.append(obj.toString());

-      if (it.hasNext()) {

-        result.append(", ");

-      }

-    }

-    return result.toString();

-  }

-

-  public String verbalizeTypeList(List<Type> list) {

-    StringBuilder result = new StringBuilder();

-    Iterator<Type> it = list.iterator();

-    while (it.hasNext()) {

-      Type type = it.next();

-      result.append(verbalizer.verbalizeType(type));

-      if (it.hasNext()) {

-        result.append(", ");

-      }

-    }

-    return result.toString();

-  }

-

-  public String verbalizeExpressionList(List<? extends IRutaExpression> list) {

-    StringBuilder result = new StringBuilder();

-    Iterator<? extends IRutaExpression> it = list.iterator();

-    while (it.hasNext()) {

-      IRutaExpression e = it.next();

-      result.append(verbalizer.verbalize(e));

-      if (it.hasNext()) {

-        result.append(", ");

-      }

-    }

-    return result.toString();

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/CreatedByVisitor.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/CreatedByVisitor.java
deleted file mode 100644
index 8748451..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/CreatedByVisitor.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*

- * 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.ruta.visitor;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class CreatedByVisitor implements RutaInferenceVisitor {

-

-  public static final String TYPE = "org.apache.uima.ruta.type.DebugCreatedBy";

-

-  public static final String FEATURE_RULE = "rule";

-

-  public static final String FEATURE_ANNOTATION = "annotation";

-

-  public static final String FEATURE_SCRIPT = "script";

-

-  public static final String FEATURE_ID = "id";

-

-  private List<FeatureStructure> fsList = new ArrayList<FeatureStructure>();

-

-  private RutaVerbalizer verbalizer;

-

-  public CreatedByVisitor(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-  }

-

-  public void beginVisit(RutaElement element, ScriptApply result) {

-  }

-

-  public void endVisit(RutaElement element, ScriptApply result) {

-  }

-

-  public void finished(RutaStream stream, List<RutaInferenceVisitor> visitors) {

-    for (FeatureStructure each : fsList) {

-      each.getCAS().addFsToIndexes(each);

-    }

-  }

-

-  public void annotationAdded(AnnotationFS annotation,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-    CAS cas = annotation.getCAS();

-    Type t = cas.getTypeSystem().getType(TYPE);

-    Feature featureRule = t.getFeatureByBaseName(FEATURE_RULE);

-    Feature featureAnnotation = t.getFeatureByBaseName(FEATURE_ANNOTATION);

-    Feature featureScript = t.getFeatureByBaseName(FEATURE_SCRIPT);

-    Feature featureId = t.getFeatureByBaseName(FEATURE_ID);

-

-    String ruleString = "provided";

-    String ruleScript = "";

-    int ruleId = -1;

-    if (creator != null) {

-      ruleString = verbalizer.verbalize(creator.getRule());

-      ruleId = creator.getRule().getId();

-      ruleScript = creator.getRule().getParent().getScript().getRootBlock().getNamespace();

-    }

-    FeatureStructure fs = cas.createFS(t);

-    fs.setStringValue(featureRule, ruleString);

-    fs.setFeatureValue(featureAnnotation, annotation);

-    fs.setIntValue(featureId, ruleId);

-    fs.setStringValue(featureScript, ruleScript);

-    fsList.add(fs);

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoCollectorVisitor.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoCollectorVisitor.java
deleted file mode 100644
index c603b03..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoCollectorVisitor.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*

- * 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.ruta.visitor;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Stack;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.BlockApply;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaModule;

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-import org.apache.uima.ruta.rule.RuleApply;

-import org.apache.uima.ruta.rule.RutaRule;

-import org.apache.uima.ruta.type.DebugScriptApply;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class DebugInfoCollectorVisitor implements RutaInferenceVisitor {

-

-  private boolean createDebugInfo;

-

-  private List<String> ids;

-

-  private DebugInfoFactory debugFactory;

-

-  private boolean withMatches;

-

-  private ScriptApply rootApply;

-

-  private Map<RutaStatement, Stack<ScriptApply>> applies;

-

-  private Stack<RutaElement> callStack;

-

-  public DebugInfoCollectorVisitor(boolean createDebugInfo, boolean withMatches, List<String> ids,

-          RutaVerbalizer verbalizer) {

-    super();

-    this.createDebugInfo = createDebugInfo;

-    this.withMatches = withMatches;

-    this.ids = ids;

-

-    debugFactory = new DebugInfoFactory(verbalizer);

-    applies = new HashMap<RutaStatement, Stack<ScriptApply>>();

-    callStack = new Stack<RutaElement>();

-  }

-

-  public DebugInfoCollectorVisitor(boolean createDebugInfo) {

-    super();

-    this.createDebugInfo = createDebugInfo;

-    this.ids = new ArrayList<String>();

-  }

-

-  public boolean isCreateDebugInfo() {

-    return createDebugInfo;

-  }

-

-  public boolean createDebugInfo(RutaRule rule) {

-    return createDebugInfo || ids.contains("" + rule.getId());

-  }

-

-  public void beginVisit(RutaElement element, ScriptApply result) {

-    if (element instanceof RutaStatement) {

-      callStack.push(element);

-      RutaStatement stmt = (RutaStatement) element;

-      Stack<ScriptApply> stack = applies.get(stmt);

-      if (stack == null) {

-        stack = new Stack<ScriptApply>();

-        applies.put(stmt, stack);

-      }

-      stack.push(result);

-      applies.put(stmt, stack);

-      if (result instanceof RuleApply) {

-        RuleApply ra = (RuleApply) result;

-        ra.setAcceptMatches(ra.isAcceptMatches() || withMatches);

-      }

-    }

-  }

-

-  public void endVisit(RutaElement element, ScriptApply result) {

-    // TODO create UIMA stuff here not later -> save memory!

-    if (element instanceof RutaStatement) {

-      RutaStatement stmt = (RutaStatement) element;

-      RutaBlock parent = stmt.getParent();

-      Stack<ScriptApply> stack = applies.get(stmt);

-      if (stack == null) {

-        stack = new Stack<ScriptApply>();

-        applies.put(stmt, stack);

-      }

-      // replace

-      if (!stack.isEmpty()) {

-        stack.pop();

-      }

-      stack.push(result);

-      applies.put(stmt, stack);

-      if (parent != null) {

-        Stack<ScriptApply> parentStack = applies.get(parent);

-        if (parentStack != null && !parentStack.isEmpty()) {

-          ScriptApply parentApply = parentStack.peek();

-          if (parentApply instanceof BlockApply) {

-            BlockApply blockApply = (BlockApply) parentApply;

-            if (element instanceof RutaRule && parent.getRule().equals(element)

-                    && result instanceof RuleApply) {

-              blockApply.setRuleApply((RuleApply) result);

-

-              // } else {

-              // blockApply.add(result);

-              // }

-

-            } else if (stack.size() == 1) {

-              if (callStack.size() > 1) {

-                // TODO hotfixed

-                RutaElement tme = callStack.get(callStack.size() - 2);

-                if (tme.equals(parent)

-                // || tme.equals(element)

-                ) {

-                  blockApply.add(result);

-                } else {

-                  // TODO too many blocks added

-                }

-              } else {

-                blockApply.add(result);

-

-              }

-            } else {

-              // TODO refactor !!! ... really!!!!

-              RutaElement tme = callStack.get(callStack.size() - 2);

-              if (tme.equals(parent)

-              // || tme.equals(element)

-              ) {

-                blockApply.add(result);

-              } else {

-                // TODO too many blocks added

-              }

-            }

-          }

-        }

-      }

-      stack.pop();

-      callStack.pop();

-    }

-    if (element instanceof RutaModule) {

-      rootApply = result;

-    }

-  }

-

-  public void finished(RutaStream stream, List<RutaInferenceVisitor> visitors) {

-    if (createDebugInfo) {

-      Map<RutaElement, Long> timeInfo = getTimeInfo(visitors);

-

-      DebugScriptApply debugScriptApply = debugFactory.createDebugScriptApply(rootApply, stream,

-              false, withMatches, timeInfo);

-      debugScriptApply.addToIndexes();

-    }

-  }

-

-  private Map<RutaElement, Long> getTimeInfo(List<RutaInferenceVisitor> visitors) {

-    for (RutaInferenceVisitor each : visitors) {

-      if (each instanceof TimeProfilerVisitor) {

-        return ((TimeProfilerVisitor) each).getTimeInfo();

-      }

-    }

-    return null;

-  }

-

-  public void annotationAdded(AnnotationFS annotation,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoFactory.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoFactory.java
deleted file mode 100644
index 5a724aa..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoFactory.java
+++ /dev/null
@@ -1,445 +0,0 @@
-/*

- * 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.ruta.visitor;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.ruta.BlockApply;

-import org.apache.uima.ruta.RutaBlock;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStatement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleElement;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-import org.apache.uima.ruta.rule.ComposedRuleElement;

-import org.apache.uima.ruta.rule.ComposedRuleElementMatch;

-import org.apache.uima.ruta.rule.EvaluatedCondition;

-import org.apache.uima.ruta.rule.RegExpRule;

-import org.apache.uima.ruta.rule.RegExpRuleMatch;

-import org.apache.uima.ruta.rule.RuleApply;

-import org.apache.uima.ruta.rule.RuleElement;

-import org.apache.uima.ruta.rule.RuleElementMatch;

-import org.apache.uima.ruta.rule.RuleMatch;

-import org.apache.uima.ruta.rule.RutaRule;

-import org.apache.uima.ruta.rule.RutaRuleElement;

-import org.apache.uima.ruta.type.DebugBlockApply;

-import org.apache.uima.ruta.type.DebugEvaluatedCondition;

-import org.apache.uima.ruta.type.DebugFailedRuleMatch;

-import org.apache.uima.ruta.type.DebugMatchedRuleMatch;

-import org.apache.uima.ruta.type.DebugRuleApply;

-import org.apache.uima.ruta.type.DebugRuleElementMatch;

-import org.apache.uima.ruta.type.DebugRuleElementMatches;

-import org.apache.uima.ruta.type.DebugRuleMatch;

-import org.apache.uima.ruta.type.DebugScriptApply;

-import org.apache.uima.ruta.utils.UIMAUtils;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class DebugInfoFactory {

-

-  private RutaVerbalizer verbalizer;

-

-  public DebugInfoFactory(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-  }

-

-  public DebugBlockApply createDummyBlockApply(RuleMatch ruleMatch, RutaStream stream,

-          boolean addToIndex, boolean withMatches, Map<RutaElement, Long> timeInfo) {

-    JCas cas = stream.getJCas();

-    DebugBlockApply dba = new DebugBlockApply(cas);

-    AnnotationFS matchedAnnotation = ruleMatch.getMatchedAnnotationsOf(

-            ((RutaRule) ruleMatch.getRule()).getRoot()).get(0);

-    dba.setElement(matchedAnnotation.getCoveredText());

-    dba.setBegin(matchedAnnotation.getBegin());

-    dba.setEnd(matchedAnnotation.getEnd());

-    return dba;

-  }

-

-  public DebugBlockApply createDebugBlockApply(BlockApply blockApply, RutaStream stream,

-          boolean addToIndex, boolean withMatches, Map<RutaElement, Long> timeInfo) {

-    JCas cas = stream.getJCas();

-    DebugBlockApply dba = new DebugBlockApply(cas);

-    List<DebugScriptApply> innerApply = new ArrayList<DebugScriptApply>();

-    // TODO refactor and remove counting hotfix

-    int applied = blockApply.getRuleApply().getApplied();

-    RutaElement element = blockApply.getElement();

-    String verbalize = "";

-    verbalize = verbalizer.verbalize(element);

-    if (applied > 1) {

-      List<ScriptApply> innerApplies = blockApply.getInnerApplies();

-      List<List<ScriptApply>> loops = new ArrayList<List<ScriptApply>>();

-      for (int i = 0; i < applied; i++) {

-        loops.add(new ArrayList<ScriptApply>());

-      }

-      int counter = 0;

-      int size = innerApplies.size();

-      int parts = size / applied;

-      for (ScriptApply each : innerApplies) {

-        int listIndex = Math.max(0, counter / parts);

-        List<ScriptApply> list = loops.get(listIndex);

-        list.add(each);

-        counter++;

-      }

-      counter = 0;

-      for (List<ScriptApply> list : loops) {

-        AbstractRuleMatch<? extends AbstractRule> ruleMatch = blockApply.getRuleApply().getList()

-                .get(counter);

-        DebugBlockApply dummyBlockApply = createDummyBlockApply((RuleMatch) ruleMatch, stream,

-                addToIndex, withMatches, timeInfo);

-        List<DebugRuleMatch> ruleMatches = new ArrayList<DebugRuleMatch>();

-        ruleMatches.add(createDebugRuleMatch(ruleMatch, stream, addToIndex, withMatches, timeInfo));

-        dummyBlockApply.setApplied(1);

-        dummyBlockApply.setTried(1);

-        dummyBlockApply.setRules(UIMAUtils.toFSArray(cas, ruleMatches));

-        List<DebugScriptApply> innerInnerApply = new ArrayList<DebugScriptApply>();

-        for (ScriptApply each : list) {

-          DebugScriptApply eachInnerInner = createDebugScriptApply(each, stream, addToIndex,

-                  withMatches, timeInfo);

-          innerInnerApply.add(eachInnerInner);

-        }

-        dummyBlockApply.setInnerApply(UIMAUtils.toFSArray(cas, innerInnerApply));

-        innerApply.add(dummyBlockApply);

-        counter++;

-      }

-      dba.setInnerApply(UIMAUtils.toFSArray(cas, innerApply));

-      dba.setElement(verbalize);

-      DebugRuleApply ruleApply = createDebugRuleApply(blockApply.getRuleApply(), stream,

-              addToIndex, withMatches, timeInfo);

-      dba.setApplied(ruleApply.getApplied());

-      dba.setTried(ruleApply.getTried());

-      dba.setRules(ruleApply.getRules());

-      dba.setBegin(ruleApply.getBegin());

-      dba.setEnd(ruleApply.getEnd());

-      if (timeInfo != null) {

-        long time = timeInfo.get(element);

-        dba.setTime(time);

-      }

-      if (addToIndex)

-        dba.addToIndexes();

-      return dba;

-    } else {

-

-      for (ScriptApply each : blockApply.getInnerApplies()) {

-        innerApply.add(createDebugScriptApply(each, stream, addToIndex, withMatches, timeInfo));

-      }

-      dba.setInnerApply(UIMAUtils.toFSArray(cas, innerApply));

-      dba.setElement(verbalize);

-      DebugRuleApply ruleApply = createDebugRuleApply(blockApply.getRuleApply(), stream,

-              addToIndex, withMatches, timeInfo);

-      dba.setApplied(ruleApply.getApplied());

-      dba.setTried(ruleApply.getTried());

-      dba.setRules(ruleApply.getRules());

-      dba.setBegin(ruleApply.getBegin());

-      dba.setEnd(ruleApply.getEnd());

-      if (timeInfo != null) {

-        Long time = timeInfo.get(element);

-        if(time != null) {

-          dba.setTime(time);

-        }

-      }

-      if (addToIndex)

-        dba.addToIndexes();

-      return dba;

-    }

-  }

-

-  public DebugRuleApply createDebugRuleApply(RuleApply ruleApply, RutaStream stream,

-          boolean addToIndex, boolean withMatches, Map<RutaElement, Long> timeInfo) {

-    JCas cas = stream.getJCas();

-    DebugRuleApply dra = new DebugRuleApply(cas);

-    List<DebugRuleMatch> ruleMatches = new ArrayList<DebugRuleMatch>();

-    int begin = Integer.MAX_VALUE;

-    int end = 0;

-    if (withMatches) {

-      for (AbstractRuleMatch<? extends AbstractRule> match : ruleApply.getList()) {

-        DebugRuleMatch debugRuleMatch = createDebugRuleMatch(match, stream, addToIndex,

-                withMatches, timeInfo);

-        begin = Math.min(begin, debugRuleMatch.getBegin());

-        end = Math.max(end, debugRuleMatch.getEnd());

-        ruleMatches.add(debugRuleMatch);

-      }

-    }

-    if (begin >= end) {

-      begin = end;

-    }

-    dra.setRules(UIMAUtils.toFSArray(cas, ruleMatches));

-    RutaElement element = ruleApply.getElement();

-    String namespace = "";

-    if(element instanceof RutaStatement) {

-      RutaStatement rs = (RutaStatement) element;

-      namespace = rs.getParent().getScript().getRootBlock().getNamespace();

-    } else if(element instanceof AbstractRuleElement) {

-      AbstractRuleElement are = (AbstractRuleElement) element;

-      are.getRule().getParent().getScript().getRootBlock().getNamespace();

-    }

-    dra.setElement(verbalizer.verbalize(element));

-    dra.setApplied(ruleApply.getApplied());

-    dra.setTried(ruleApply.getTried());

-    dra.setId(((AbstractRule) element).getId());

-    dra.setScript(namespace);

-    dra.setBegin(begin);

-    dra.setEnd(end);

-    if (timeInfo != null) {

-      Long time = timeInfo.get(element);

-      if(time != null) {

-        dra.setTime(time);

-      }

-    }

-    if (addToIndex)

-      dra.addToIndexes();

-    return dra;

-  }

-

-  public DebugRuleMatch createDebugRuleMatch(AbstractRuleMatch<? extends AbstractRule> match,

-          RutaStream stream, boolean addToIndex, boolean withMatches,

-          Map<RutaElement, Long> timeInfo) {

-    JCas cas = stream.getJCas();

-    DebugRuleMatch drm = null;

-    if (match.matchedCompletely()) {

-      drm = new DebugMatchedRuleMatch(cas);

-    } else {

-      drm = new DebugFailedRuleMatch(cas);

-    }

-    drm.setMatched(match.matchedCompletely());

-    if (match instanceof RuleMatch) {

-      ComposedRuleElementMatch rootMatch = ((RuleMatch) match).getRootMatch();

-      setInnerMatches(stream, addToIndex, cas, drm, rootMatch);

-//      if (match.matched()) {

-        List<DebugScriptApply> delegates = new ArrayList<DebugScriptApply>();

-        for (ScriptApply rem : ((RuleMatch) match).getDelegateApply().values()) {

-          delegates.add(createDebugScriptApply(rem, stream, addToIndex, withMatches, timeInfo));

-        }

-        drm.setDelegates(UIMAUtils.toFSArray(cas, delegates));

-//      }

-    } else if (match instanceof RegExpRuleMatch) {

-      RegExpRuleMatch rerm = (RegExpRuleMatch) match;

-      Map<Integer, List<AnnotationFS>> map = rerm.getMap();

-      Set<Entry<Integer, List<AnnotationFS>>> entrySet = map.entrySet();

-      List<DebugRuleElementMatches> ruleElementMatches = new ArrayList<DebugRuleElementMatches>();

-      for (Entry<Integer, List<AnnotationFS>> entry : entrySet) {

-        DebugRuleElementMatches drems = new DebugRuleElementMatches(cas);

-        RegExpRule rule = rerm.getRule();

-        Integer key = entry.getKey();

-        List<AnnotationFS> value = entry.getValue();

-        drems.setElement(verbalizer.verbalize(rule));

-        List<DebugRuleElementMatch> remList = new ArrayList<DebugRuleElementMatch>();

-        if (value != null) {

-          for (AnnotationFS each : value) {

-            DebugRuleElementMatch drem = new DebugRuleElementMatch(cas);

-

-            DebugEvaluatedCondition base = new DebugEvaluatedCondition(cas);

-            base.setValue(true);

-            String baseString = "Group " + key;

-            base.setElement(baseString);

-            drem.setBaseCondition(base);

-

-            drem.setBegin(each.getBegin());

-            drem.setEnd(each.getEnd());

-            if (addToIndex) {

-              drem.addToIndexes();

-            }

-            remList.add(drem);

-          }

-        }

-        drems.setMatches(UIMAUtils.toFSArray(cas, remList));

-        if (addToIndex) {

-          drems.addToIndexes();

-        }

-        ruleElementMatches.add(drems);

-      }

-

-      drm.setElements(UIMAUtils.toFSArray(cas, ruleElementMatches));

-    }

-    if (timeInfo != null) {

-      long time = timeInfo.get(match.getRule());

-      drm.setTime(time);

-    }

-    List<AnnotationFS> matchedAnnotationsOfRoot = match.getMatchedAnnotationsOfRoot();

-    if (!matchedAnnotationsOfRoot.isEmpty()) {

-      AnnotationFS matchedAnnotation = matchedAnnotationsOfRoot.get(0);

-      if (matchedAnnotation != null) {

-        drm.setBegin(matchedAnnotation.getBegin());

-        drm.setEnd(matchedAnnotation.getEnd());

-        if (addToIndex || withMatches)

-          drm.addToIndexes();

-      }

-    }

-    return drm;

-  }

-

-  private void setInnerMatches(RutaStream stream, boolean addToIndex, JCas cas, DebugRuleMatch drm,

-          ComposedRuleElementMatch rootMatch) {

-    Set<Entry<RuleElement, List<RuleElementMatch>>> entrySet = rootMatch.getInnerMatches()

-            .entrySet();

-    List<DebugRuleElementMatches> ruleElementMatches = new ArrayList<DebugRuleElementMatches>();

-    for (Entry<RuleElement, List<RuleElementMatch>> entry : entrySet) {

-      RuleElement re = entry.getKey();

-      List<RuleElementMatch> rems = entry.getValue();

-      ruleElementMatches.add(createDebugRuleElementMatches(re, rems, stream, addToIndex));

-    }

-

-    drm.setElements(UIMAUtils.toFSArray(cas, ruleElementMatches));

-  }

-

-  private void setInnerMatches(RutaStream stream, boolean addToIndex, JCas cas,

-          DebugRuleElementMatch drm, ComposedRuleElementMatch rootMatch) {

-    Set<Entry<RuleElement, List<RuleElementMatch>>> entrySet = rootMatch.getInnerMatches()

-            .entrySet();

-    List<DebugRuleElementMatches> ruleElementMatches = new ArrayList<DebugRuleElementMatches>();

-    for (Entry<RuleElement, List<RuleElementMatch>> entry : entrySet) {

-      RuleElement re = entry.getKey();

-      List<RuleElementMatch> rems = entry.getValue();

-      ruleElementMatches.add(createDebugRuleElementMatches(re, rems, stream, addToIndex));

-    }

-    drm.setElements(UIMAUtils.toFSArray(cas, ruleElementMatches));

-  }

-

-  public DebugRuleElementMatches createDebugRuleElementMatches(RuleElement re,

-          List<RuleElementMatch> rems, RutaStream stream, boolean addToIndex) {

-    JCas cas = stream.getJCas();

-    DebugRuleElementMatches drems = new DebugRuleElementMatches(cas);

-    drems.setElement(verbalizer.verbalize(re));

-    List<DebugRuleElementMatch> remList = new ArrayList<DebugRuleElementMatch>();

-    if (rems != null) {

-      for (RuleElementMatch each : rems) {

-        if (each instanceof ComposedRuleElementMatch) {

-          remList.add(createDebugComposedRuleElementMatch((ComposedRuleElementMatch) each, stream,

-                  addToIndex));

-        } else {

-          remList.add(createDebugRuleElementMatch(each, stream, addToIndex));

-        }

-      }

-    }

-    if (rems != null && !rems.isEmpty()) {

-      drems.setRuleAnchor(rems.get(0).isRuleAnchor());

-    }

-    drems.setMatches(UIMAUtils.toFSArray(cas, remList));

-    if (addToIndex)

-      drems.addToIndexes();

-    return drems;

-  }

-

-  public DebugRuleElementMatch createDebugComposedRuleElementMatch(ComposedRuleElementMatch rem,

-          RutaStream stream, boolean addToIndex) {

-    JCas cas = stream.getJCas();

-    DebugRuleElementMatch drem = new DebugRuleElementMatch(cas);

-

-    DebugEvaluatedCondition base = new DebugEvaluatedCondition(cas);

-    base.setValue(rem.isBaseConditionMatched());

-

-    setInnerMatches(stream, addToIndex, cas, drem, rem);

-

-    String baseString = verbalizer.verbalize(rem.getRuleElement());

-    base.setElement(baseString);

-    drem.setBaseCondition(base);

-    drem.setConditions(createEvaluatedConditions(rem, stream, addToIndex));

-    List<AnnotationFS> annotations = rem.getTextsMatched();

-    if (!annotations.isEmpty()) {

-      drem.setBegin(annotations.get(0).getBegin());

-      drem.setEnd(annotations.get(annotations.size() - 1).getEnd());

-    }

-    if (addToIndex)

-      drem.addToIndexes();

-    return drem;

-  }

-

-  public DebugRuleElementMatch createDebugRuleElementMatch(RuleElementMatch rem, RutaStream stream,

-          boolean addToIndex) {

-    JCas cas = stream.getJCas();

-    DebugRuleElementMatch drem = new DebugRuleElementMatch(cas);

-

-    DebugEvaluatedCondition base = new DebugEvaluatedCondition(cas);

-    base.setValue(rem.isBaseConditionMatched());

-    RuleElement ruleElement = rem.getRuleElement();

-    String baseString = "";

-    if (ruleElement instanceof RutaRuleElement) {

-      baseString = verbalizer.verbalizeMatcher((RutaRuleElement) ruleElement);

-    } else if (ruleElement instanceof ComposedRuleElement) {

-      baseString = verbalizer.verbalizeComposed((ComposedRuleElement) ruleElement);

-    }

-    base.setElement(baseString);

-    drem.setBaseCondition(base);

-

-    drem.setConditions(createEvaluatedConditions(rem, stream, addToIndex));

-    List<AnnotationFS> annotations = rem.getTextsMatched();

-    if (!annotations.isEmpty()) {

-      drem.setBegin(annotations.get(0).getBegin());

-      drem.setEnd(annotations.get(annotations.size() - 1).getEnd());

-    }

-    if (addToIndex)

-      drem.addToIndexes();

-    return drem;

-  }

-

-  private FSArray createEvaluatedConditions(RuleElementMatch rem, RutaStream stream,

-          boolean addToIndex) {

-    JCas cas = stream.getJCas();

-    List<DebugEvaluatedCondition> ecs = new ArrayList<DebugEvaluatedCondition>();

-    if (rem.getConditions() != null) {

-      for (EvaluatedCondition each : rem.getConditions()) {

-        DebugEvaluatedCondition ec = new DebugEvaluatedCondition(cas);

-        ec.setValue(each.isValue());

-        ec.setElement(verbalizer.verbalize(each.getCondition()));

-        ec.setConditions(createEvaluatedConditions(each, stream, addToIndex));

-        ecs.add(ec);

-      }

-    }

-    FSArray result = UIMAUtils.toFSArray(cas, ecs);

-    return result;

-  }

-

-  private FSArray createEvaluatedConditions(EvaluatedCondition eval, RutaStream stream,

-          boolean addToIndex) {

-    JCas cas = stream.getJCas();

-    List<DebugEvaluatedCondition> ecs = new ArrayList<DebugEvaluatedCondition>();

-    for (EvaluatedCondition each : eval.getConditions()) {

-      DebugEvaluatedCondition ec = new DebugEvaluatedCondition(cas);

-      ec.setValue(each.isValue());

-      ec.setElement(verbalizer.verbalize(each.getCondition()));

-      ec.setConditions(createEvaluatedConditions(each, stream, addToIndex));

-      ecs.add(ec);

-    }

-    FSArray result = UIMAUtils.toFSArray(cas, ecs);

-    return result;

-  }

-

-  public DebugScriptApply createDebugScriptApply(ScriptApply apply, RutaStream stream,

-          boolean addToIndex, boolean withMatches, Map<RutaElement, Long> timeInfo) {

-    DebugScriptApply debug = null;

-    if (apply instanceof BlockApply) {

-      debug = createDebugBlockApply((BlockApply) apply, stream, addToIndex, withMatches, timeInfo);

-    } else if (apply instanceof RuleApply) {

-      debug = createDebugRuleApply((RuleApply) apply, stream, addToIndex, withMatches, timeInfo);

-    }

-    if (addToIndex)

-      debug.addToIndexes();

-    return debug;

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/InferenceCrowd.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/InferenceCrowd.java
deleted file mode 100644
index 9bafa5c..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/InferenceCrowd.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.visitor;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-

-public class InferenceCrowd implements RutaInferenceVisitor {

-

-  private final List<RutaInferenceVisitor> visitors;

-

-  public InferenceCrowd(List<RutaInferenceVisitor> visitors) {

-    super();

-    this.visitors = visitors;

-  }

-

-  public void beginVisit(RutaElement element, ScriptApply result) {

-    for (RutaInferenceVisitor each : visitors) {

-      each.beginVisit(element, result);

-    }

-  }

-

-  public void endVisit(RutaElement element, ScriptApply result) {

-    for (RutaInferenceVisitor each : visitors) {

-      each.endVisit(element, result);

-    }

-  }

-

-  public void finished(RutaStream stream) {

-    for (RutaInferenceVisitor each : visitors) {

-      each.finished(stream, visitors);

-    }

-  }

-

-  public void finished(RutaStream stream, List<RutaInferenceVisitor> visitors) {

-    finished(stream);

-  }

-

-  public void annotationAdded(AnnotationFS annotation,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-    if(visitors.isEmpty()) { 

-      return;

-    }

-    for (RutaInferenceVisitor each : visitors) {

-      each.annotationAdded(annotation, creator);

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/RutaInferenceVisitor.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/RutaInferenceVisitor.java
deleted file mode 100644
index 41feeff..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/RutaInferenceVisitor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.visitor;

-

-import java.util.List;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-

-public interface RutaInferenceVisitor {

-

-  void beginVisit(RutaElement element, ScriptApply result);

-

-  void endVisit(RutaElement element, ScriptApply result);

-

-  void finished(RutaStream stream, List<RutaInferenceVisitor> visitors);

-

-  void annotationAdded(AnnotationFS annotation, AbstractRuleMatch<? extends AbstractRule> creator);

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/StatisticsVisitor.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/StatisticsVisitor.java
deleted file mode 100644
index 45c9d63..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/StatisticsVisitor.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*

- * 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.ruta.visitor;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.cas.DoubleArray;

-import org.apache.uima.jcas.cas.IntegerArray;

-import org.apache.uima.jcas.cas.StringArray;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-import org.apache.uima.ruta.type.Statistics;

-import org.apache.uima.ruta.utils.UIMAUtils;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-

-public class StatisticsVisitor implements RutaInferenceVisitor {

-

-  private Map<String, Long> conditionTime;

-

-  private Map<String, Long> actionTime;

-

-  private Map<String, Integer> conditionAmount;

-

-  private Map<String, Integer> actionAmount;

-

-  private Map<String, Long> conditionDelta;

-

-  private Map<String, Long> actionDelta;

-

-  private RutaVerbalizer verbalizer;

-

-  public StatisticsVisitor(RutaVerbalizer verbalizer) {

-    super();

-    this.verbalizer = verbalizer;

-    conditionTime = new HashMap<String, Long>();

-    actionTime = new HashMap<String, Long>();

-    conditionAmount = new HashMap<String, Integer>();

-    actionAmount = new HashMap<String, Integer>();

-    conditionDelta = new HashMap<String, Long>();

-    actionDelta = new HashMap<String, Long>();

-  }

-

-  public void beginVisit(RutaElement element, ScriptApply result) {

-    if (element instanceof AbstractRutaCondition) {

-      AbstractRutaCondition c = (AbstractRutaCondition) element;

-      String name = verbalizer.verbalizeName(c);

-      Integer amount = conditionAmount.get(name);

-      if (amount == null)

-        amount = 0;

-      amount++;

-      conditionAmount.put(name, amount);

-      conditionDelta.put(name, System.currentTimeMillis());

-    } else if (element instanceof AbstractRutaAction) {

-      AbstractRutaAction a = (AbstractRutaAction) element;

-      String name = verbalizer.verbalizeName(a);

-      Integer amount = actionAmount.get(name);

-      if (amount == null)

-        amount = 0;

-      amount++;

-      actionAmount.put(name, amount);

-      actionDelta.put(name, System.currentTimeMillis());

-    }

-  }

-

-  public void endVisit(RutaElement element, ScriptApply result) {

-    if (element instanceof AbstractRutaCondition) {

-      AbstractRutaCondition c = (AbstractRutaCondition) element;

-      String name = verbalizer.verbalizeName(c);

-      Long start = conditionDelta.get(name);

-      long delta = System.currentTimeMillis() - start;

-      Long total = conditionTime.get(name);

-      if (total == null)

-        total = 0L;

-      total += delta;

-      conditionTime.put(name, total);

-    } else if (element instanceof AbstractRutaAction) {

-      AbstractRutaAction a = (AbstractRutaAction) element;

-      String name = verbalizer.verbalizeName(a);

-      Long start = actionDelta.get(name);

-      long delta = System.currentTimeMillis() - start;

-      Long total = actionTime.get(name);

-      if (total == null)

-        total = 0L;

-      total += delta;

-      actionTime.put(name, total);

-    }

-  }

-

-  public void finished(RutaStream stream, List<RutaInferenceVisitor> visitors) {

-    List<String> names = new ArrayList<String>();

-    List<Double> totals = new ArrayList<Double>();

-    List<Integer> amounts = new ArrayList<Integer>();

-    List<Double> parts = new ArrayList<Double>();

-    for (String each : conditionTime.keySet()) {

-      double total = conditionTime.get(each);

-      double amount = conditionAmount.get(each);

-      double part = total / amount;

-      part *= 10000;

-      part = Math.round(part);

-      part /= 10000;

-      names.add(each);

-      totals.add(total);

-      amounts.add((int) amount);

-      parts.add(part);

-    }

-

-    for (String each : actionTime.keySet()) {

-      double total = actionTime.get(each);

-      double amount = actionAmount.get(each);

-      double part = total / amount;

-      part *= 10000;

-      part = Math.round(part);

-      part /= 10000;

-      names.add(each);

-      totals.add(total);

-      amounts.add((int) amount);

-      parts.add(part);

-    }

-    JCas jCas = stream.getJCas();

-    StringArray nameArray = UIMAUtils.toStringArray(jCas, names.toArray(new String[] {}));

-    DoubleArray totalArray = UIMAUtils.toDoubleArray(jCas, getDoubleArray(totals));

-    IntegerArray amountArray = UIMAUtils.toIntegerArray(jCas, getIntegerArray(amounts));

-    DoubleArray partArray = UIMAUtils.toDoubleArray(jCas, getDoubleArray(parts));

-

-    Type type = jCas.getCasType(Statistics.type);

-    Feature fname = type.getFeatureByBaseName("name");

-    Feature ftotal = type.getFeatureByBaseName("total");

-    Feature famount = type.getFeatureByBaseName("amount");

-    Feature fparts = type.getFeatureByBaseName("part");

-    FeatureStructure fs = jCas.getCas().createFS(type);

-    fs.setFeatureValue(fname, nameArray);

-    fs.setFeatureValue(ftotal, totalArray);

-    fs.setFeatureValue(famount, amountArray);

-    fs.setFeatureValue(fparts, partArray);

-    jCas.getCas().addFsToIndexes(fs);

-  }

-

-  private int[] getIntegerArray(List<Integer> array) {

-    int[] result = new int[array.size()];

-    int i = 0;

-    for (Integer each : array) {

-      result[i++] = each;

-    }

-    return result;

-  }

-

-  private double[] getDoubleArray(List<Double> array) {

-    double[] result = new double[array.size()];

-    int i = 0;

-    for (Double each : array) {

-      result[i++] = each;

-    }

-    return result;

-  }

-

-  public Map<String, Long> getConditionTime() {

-    return conditionTime;

-  }

-

-  public Map<String, Long> getActionTime() {

-    return actionTime;

-  }

-

-  public Map<String, Integer> getConditionAmount() {

-    return conditionAmount;

-  }

-

-  public Map<String, Integer> getActionAmount() {

-    return actionAmount;

-  }

-

-  public void annotationAdded(AnnotationFS annotation,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/TimeProfilerVisitor.java b/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/TimeProfilerVisitor.java
deleted file mode 100644
index 73bc7a6..0000000
--- a/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/TimeProfilerVisitor.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * 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.ruta.visitor;

-

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.RutaElement;

-import org.apache.uima.ruta.RutaStream;

-import org.apache.uima.ruta.ScriptApply;

-import org.apache.uima.ruta.rule.AbstractRule;

-import org.apache.uima.ruta.rule.AbstractRuleMatch;

-

-public class TimeProfilerVisitor implements RutaInferenceVisitor {

-

-  private Map<RutaElement, Long> timeInfo;

-

-  public TimeProfilerVisitor() {

-    super();

-    timeInfo = new HashMap<RutaElement, Long>();

-  }

-

-  public void beginVisit(RutaElement element, ScriptApply result) {

-    getTimeInfo().put(element, System.currentTimeMillis());

-  }

-

-  public void endVisit(RutaElement element, ScriptApply result) {

-    Long start = getTimeInfo().get(element);

-    long value = System.currentTimeMillis() - start;

-    getTimeInfo().put(element, value);

-  }

-

-  public void finished(RutaStream stream, List<RutaInferenceVisitor> visitors) {

-    // others do the work

-  }

-

-  public Map<RutaElement, Long> getTimeInfo() {

-    return timeInfo;

-  }

-

-  public void annotationAdded(AnnotationFS annotation,

-          AbstractRuleMatch<? extends AbstractRule> creator) {

-  }

-

-}

diff --git a/trunk/ruta-core/src/main/resources/META-INF/org.apache.uima.fit/typepriorities.txt b/trunk/ruta-core/src/main/resources/META-INF/org.apache.uima.fit/typepriorities.txt
deleted file mode 100644
index 246ddc1..0000000
--- a/trunk/ruta-core/src/main/resources/META-INF/org.apache.uima.fit/typepriorities.txt
+++ /dev/null
@@ -1 +0,0 @@
-classpath*:org/apache/uima/ruta/engine/TypePriorities.xml
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/resources/META-INF/org.apache.uima.fit/types.txt b/trunk/ruta-core/src/main/resources/META-INF/org.apache.uima.fit/types.txt
deleted file mode 100644
index 332c7a6..0000000
--- a/trunk/ruta-core/src/main/resources/META-INF/org.apache.uima.fit/types.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-classpath*:org/apache/uima/ruta/engine/BasicTypeSystem.xml

-classpath*:org/apache/uima/ruta/engine/InternalTypeSystem.xml

-classpath*:org/apache/uima/ruta/engine/HtmlTypeSystem.xml

-classpath*:org/apache/uima/ruta/engine/PlainTextTypeSystem.xml
\ No newline at end of file
diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AAED.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AAED.xml
deleted file mode 100644
index e1ec0e4..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AAED.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>false</primitive>

-  <delegateAnalysisEngineSpecifiers>

-    <delegateAnalysisEngine key="RutaEngine">

-      <import location="${descriptorLocation}"/>

-    </delegateAnalysisEngine>

-  </delegateAnalysisEngineSpecifiers>

-  <analysisEngineMetaData>

-    <name>AAED</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters/>

-    <configurationParameterSettings/>

-    <flowConstraints>

-      <fixedFlow>

-        <node>RutaEngine</node>

-      </fixedFlow>

-    </flowConstraints>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <inputSofas>

-          <sofaName>${sofaName}</sofaName>

-        </inputSofas>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-  <sofaMappings>

-    <sofaMapping>

-      <componentKey>RutaEngine</componentKey>

-      <aggregateSofaName>${sofaName}</aggregateSofaName>

-    </sofaMapping>

-  </sofaMappings>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AAEDBasicEngine.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AAEDBasicEngine.xml
deleted file mode 100644
index 1e4d873..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AAEDBasicEngine.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>false</primitive>

-  <delegateAnalysisEngineSpecifiers>

-    <delegateAnalysisEngine key="RutaEngine">

-      <import location="${descriptorLocation}"/>

-    </delegateAnalysisEngine>

-  </delegateAnalysisEngineSpecifiers>

-  <analysisEngineMetaData>

-    <name>AAED</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>debug</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-        <overrides>

-          <parameter>RutaEngine/debug</parameter>

-        </overrides>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugWithMatches</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-        <overrides>

-          <parameter>RutaEngine/debugWithMatches</parameter>

-        </overrides>

-      </configurationParameter>

-      <configurationParameter>

-        <name>profile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-        <overrides>

-          <parameter>RutaEngine/profile</parameter>

-        </overrides>

-      </configurationParameter>

-      <configurationParameter>

-        <name>statistics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-        <overrides>

-          <parameter>RutaEngine/statistics</parameter>

-        </overrides>

-      </configurationParameter>

-      <configurationParameter>

-        <name>createdBy</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-        <overrides>

-          <parameter>RutaEngine/createdBy</parameter>

-        </overrides>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varNames</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-        <overrides>

-          <parameter>RutaEngine/varNames</parameter>

-        </overrides>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varValues</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-        <overrides>

-          <parameter>RutaEngine/varValues</parameter>

-        </overrides>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <flowConstraints>

-      <fixedFlow>

-        <node>RutaEngine</node>

-      </fixedFlow>

-    </flowConstraints>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <inputSofas>

-          <sofaName>${sofaName}</sofaName>

-        </inputSofas>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-  <sofaMappings>

-    <sofaMapping>

-      <componentKey>RutaEngine</componentKey>

-      <aggregateSofaName>${sofaName}</aggregateSofaName>

-    </sofaMapping>

-  </sofaMappings>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AnnotationWriter.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AnnotationWriter.xml
deleted file mode 100644
index 64ada39..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/AnnotationWriter.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.AnnotationWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the annotation is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Encoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>Type</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Type</name>

-        <value>

-          <string>uima.tcas.DocumentAnnotation</string>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>Encoding</name>

-        <value>

-          <string>UTF-8</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicEngine.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicEngine.xml
deleted file mode 100644
index 30e8014..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicEngine.xml
+++ /dev/null
@@ -1,279 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>BasicEngine</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters searchStrategy="language_fallback">

-      <configurationParameter>

-        <name>seeders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debug</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalScripts</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>profile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugWithMatches</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>statistics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalExtensions</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugOnlyFor</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptEncoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngineLoaders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>resourcePaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>defaultFilteredTypes</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>mainScript</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>removeBasics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>dynamicAnchoring</name>

-        <description>Activates dynamic anchoring (possible speed up).</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRuleElement</name>

-        <description>Activates greedy anchoring for rule elements.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRule</name>

-        <description>Activates greedy anchoring for complete rules.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>lowMemoryProfile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>createdBy</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>simpleGreedyForComposed</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalUimafitEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>strictImports</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varNames</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varValues</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>rules</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>debug</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>profile</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>debugWithMatches</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>defaultFilteredTypes</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.type.SPACE</string>

-            <string>org.apache.uima.ruta.type.BREAK</string>

-            <string>org.apache.uima.ruta.type.MARKUP</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>removeBasics</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>seeders</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>createdBy</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="BasicTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities>

-      <priorityList>

-        <type>org.apache.uima.ruta.type.RutaFrame</type>

-        <type>uima.tcas.Annotation</type>

-        <type>org.apache.uima.ruta.type.RutaBasic</type>

-      </priorityList>

-    </typePriorities>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicTypeSystem.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicTypeSystem.xml
deleted file mode 100644
index fea497f..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>BasicTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <imports>

-    <import location="InternalTypeSystem.xml"/>

-  </imports>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ALL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ANY</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.MARKUP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.W</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CAP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PERIOD</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.QUESTION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COMMA</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SEMICOLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WS</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NUM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPECIAL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NBSP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SPACE</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AMP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPACE</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.BREAK</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Document</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TokenSeed</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/Cutter.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/Cutter.xml
deleted file mode 100644
index 9a61571..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/Cutter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaCutter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>keep</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlAnnotator.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlAnnotator.xml
deleted file mode 100644
index 1acac59..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlAnnotator.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>onlyContent</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>onlyContent</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="HtmlTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlConverter.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlConverter.xml
deleted file mode 100644
index 2f70f7a..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlConverter.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.HtmlConverter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTags</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>newlineInducingTagRegExp</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>replaceLinebreaks</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>linebreakReplacement</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPolicy</name>

-        <description>Either heuristic, explicit, or none.

-Defaults to heuristic.</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionPatterns</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>conversionReplacements</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>skipWhitespaces</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>processAll</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>gapText</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>gapInducingTags</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>expandOffsets</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    <configurationParameter>

-        <name>useSpaceGap</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>skipWhitespaces</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlTypeSystem.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlTypeSystem.xml
deleted file mode 100644
index f5fb687..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/HtmlTypeSystem.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>typeSystemDescriptor</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TAG</name>

-      <description></description>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>expandedOffsets</name>

-          <description></description>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeName</name>

-          <description></description>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-        <featureDescription>

-          <name>attributeValue</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.B</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H1</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H2</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H3</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H4</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H5</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.H6</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.COMMENT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TITLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.I</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.U</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BIG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SMALL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FONT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.A</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HEAD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.HTML</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.EM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TABLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.DIV</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SPAN</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.UL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.OL</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.P</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LI</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TBODY</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TD</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.TH</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.IMG</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.STYLE</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.SCRIPT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.LINK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.INPUT</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.FORM</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.META</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.BR</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.html.REMARK</name>

-      <description></description>

-      <supertypeName>org.apache.uima.ruta.type.html.TAG</supertypeName>

-      <features>

-        <featureDescription>

-          <name>comment</name>

-          <description></description>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/InternalTypeSystem.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/InternalTypeSystem.xml
deleted file mode 100644
index e0e207c..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/InternalTypeSystem.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>InternalTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaBasic</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>replacement</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaOptional</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>score</name>

-          <description/>

-          <rangeTypeName>uima.cas.Double</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>applied</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>tried</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>rules</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>matched</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>delegates</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>innerApply</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>baseCondition</name>

-          <description/>

-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>matches</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>ruleAnchor</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaColoring</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>bgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>targetType</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>fgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>selected</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>value</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalsePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>original</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalseNegative</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>time</name>

-          <description/>

-          <rangeTypeName>uima.cas.Long</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaFrame</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Statistics</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>total</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>amount</name>

-          <description/>

-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>part</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TruePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>rule</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/Modifier.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/Modifier.xml
deleted file mode 100644
index a5a251e..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/Modifier.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>Modifier</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputLocation</name>

-        <description></description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>outputView</name>

-        <value>

-          <string>modified</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <outputSofas>

-          <sofaName>modified</sofaName>

-        </outputSofas>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/PlainTextAnnotator.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/PlainTextAnnotator.xml
deleted file mode 100644
index 77a0a55..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/PlainTextAnnotator.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.PlainTextAnnotator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>PlainTextAnnotator</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters/>

-    <configurationParameterSettings/>

-    <typeSystemDescription>

-      <imports>

-        <import location="PlainTextTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/PlainTextTypeSystem.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/PlainTextTypeSystem.xml
deleted file mode 100644
index 7081c20..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/PlainTextTypeSystem.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.

--->

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>PlainTextTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Line</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Paragraph</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WSLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EmptyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EmptyLine</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.AnyLine</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AnyLine</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/SourceDocumentInformation.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/SourceDocumentInformation.xml
deleted file mode 100644
index 8322d25..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/SourceDocumentInformation.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-   
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-	<name>org.apache.uima.examples.SourceDocumentInformation</name>
-	<description>Defines a type for storing information about the original source document from which the current CAS was initialized</description>
-	<version>1.0</version>
-	<vendor>The Apache Software Foundation</vendor>
-	<types>
-		<typeDescription>
-			<name>org.apache.uima.examples.SourceDocumentInformation</name>
-			<description>Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.</description>
-			<supertypeName>uima.tcas.Annotation</supertypeName>
-			<features>
-				<featureDescription>
-					<name>uri</name>
-					<description>URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)</description>
-					<rangeTypeName>uima.cas.String</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>offsetInSource</name>
-					<description>Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-					<name>documentSize</name>
-					<description>Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.</description>
-					<rangeTypeName>uima.cas.Integer</rangeTypeName>
-				</featureDescription>
-				<featureDescription>
-				  <name>lastSegment</name>
-				  <description>For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. </description>
-			      <rangeTypeName>uima.cas.Boolean</rangeTypeName>
-			    </featureDescription>				
-			</features>
-		</typeDescription>
-	</types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/StyleMapCreator.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/StyleMapCreator.xml
deleted file mode 100644
index 8e150de..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/StyleMapCreator.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.StyleMapCreator</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>styleMap</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/TypePriorities.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/TypePriorities.xml
deleted file mode 100644
index 22bba9b..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/TypePriorities.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
--->
-
-<typePriorities xmlns="http://uima.apache.org/resourceSpecifier">
-<name>TypePrioritites</name>
-<description></description>
-<version>1.0</version>
-<vendor></vendor>
-
-      <priorityList>
-        <type>org.apache.uima.ruta.type.RutaFrame</type>
-        <type>uima.tcas.Annotation</type>
-        <type>org.apache.uima.ruta.type.RutaBasic</type>
-      </priorityList>
-    

-    
-</typePriorities>
-

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/ViewWriter.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/ViewWriter.xml
deleted file mode 100644
index 89b5bf4..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/ViewWriter.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>output</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/XMIWriter.xml b/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/XMIWriter.xml
deleted file mode 100644
index 3a935cf..0000000
--- a/trunk/ruta-core/src/main/resources/org/apache/uima/ruta/engine/XMIWriter.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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.

--->

-

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.XMIWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>ReferenceSectionWriterDescriptor</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>Output</name>

-        <description>Location where the xmi is stored</description>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>true</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>Output</name>

-        <value>

-          <string>/../output/</string>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription/>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>false</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/AdditionalScriptUimaFitTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/AdditionalScriptUimaFitTest.java
deleted file mode 100644
index 3bd5c9e..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/AdditionalScriptUimaFitTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription;
-import static org.junit.Assert.assertEquals;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.junit.Test;
-
-public class AdditionalScriptUimaFitTest {
-
-  @Test
-  public void test() throws Exception {
-    
-    AnalysisEngineDescription aed = createEngineDescription(RutaEngine.class,
-            RutaEngine.PARAM_MAIN_SCRIPT, "org.apache.uima.ruta.Main", RutaEngine.PARAM_DEBUG, false,
-            RutaEngine.PARAM_ADDITIONAL_SCRIPTS, new String[] {"org.apache.uima.ruta.Additional"}
-//            , RutaEngine.PARAM_STRICT_IMPORTS, true
-            );
-    
-    
-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);
-    CAS cas = ae.newCAS();
-    cas.setDocumentText("Some text 10.");
-    
-    ae.process(cas);
-  
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = cas.getTypeSystem().getType("org.apache.uima.ruta.Additional.NewType1");
-    ai = cas.getAnnotationIndex(t);
-    iterator = ai.iterator();
-    assertEquals(1, ai.size());
-    assertEquals("10", iterator.next().getCoveredText());
-    
-    t = cas.getTypeSystem().getType("org.apache.uima.ruta.Additional.NewType2");
-    ai = cas.getAnnotationIndex(t);
-    iterator = ai.iterator();
-    assertEquals(1, ai.size());
-    assertEquals("Some", iterator.next().getCoveredText());
-
-    cas.release();
-  }
-  
-  @Test
-  public void testStrictImport() throws Exception {
-    
-    AnalysisEngineDescription aed = createEngineDescription(RutaEngine.class,
-            RutaEngine.PARAM_MAIN_SCRIPT, "org.apache.uima.ruta.Main", RutaEngine.PARAM_DEBUG, false,
-            RutaEngine.PARAM_ADDITIONAL_SCRIPTS, new String[] {"org.apache.uima.ruta.Additional"}
-            , RutaEngine.PARAM_STRICT_IMPORTS, true
-            );
-    
-    
-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);
-    CAS cas = ae.newCAS();
-    cas.setDocumentText("Some text 10.");
-    
-    ae.process(cas);
-  
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = cas.getTypeSystem().getType("org.apache.uima.ruta.Additional.NewType1");
-    ai = cas.getAnnotationIndex(t);
-    iterator = ai.iterator();
-    assertEquals(1, ai.size());
-    assertEquals("10", iterator.next().getCoveredText());
-    
-    t = cas.getTypeSystem().getType("org.apache.uima.ruta.Additional.NewType2");
-    ai = cas.getAnnotationIndex(t);
-    iterator = ai.iterator();
-    assertEquals(1, ai.size());
-    assertEquals("Some", iterator.next().getCoveredText());
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CommentBeforePackageTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CommentBeforePackageTest.java
deleted file mode 100644
index 5550f39..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CommentBeforePackageTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class CommentBeforePackageTest {
-
-  @Test
-  public void test() {
-    String document = "Some text.";
-    String script = "// some comment\n";
-    script += "PACKAGE my.package;\n";
-    script += "CW{-> T1};";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Some");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ComposedRuleElementWithQuantifierTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ComposedRuleElementWithQuantifierTest.java
deleted file mode 100644
index 0bab306..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ComposedRuleElementWithQuantifierTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ComposedRuleElementWithQuantifierTest {

-

-  @Test

-  public void test() {

-    String document = "Bla DDD, Bla, DDD,DDD, Bla, DDD,DDD Bla.";

-    String script = "";

-    script += "\"DDD\" -> T1;\n";

-    script += "(T1 COMMA)+? (T1 W){->MARKONCE(T2,1,2)};\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "DDD,DDD Bla");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConflictingTypeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConflictingTypeTest.java
deleted file mode 100644
index f77f6dc..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConflictingTypeTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.fit.factory.AnalysisEngineFactory;
-import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.util.InvalidXMLException;
-import org.junit.Test;
-
-/**
- * There is no warning when short type names are ambiguous.
- */
-public class ConflictingTypeTest {
-  /**
-   * Create an analysis engine for a Ruta script.
-   *
-   * @param script Script path.
-   * @return Analysis engine.
-   */
-  private AnalysisEngine createAE(String script) throws ResourceInitializationException, IOException, InvalidXMLException {
-    final TypeSystemDescription tsd = TypeSystemDescriptionFactory.createTypeSystemDescription(
-            "org.apache.uima.ruta.BasicTypeSystem",
-            "org.apache.uima.ruta.ConflictingTypeSystem");
-    final AnalysisEngineDescription ruta = AnalysisEngineFactory.createEngineDescription(
-            "org.apache.uima.ruta.engine.BasicEngine",
-            RutaEngine.PARAM_MAIN_SCRIPT, script);
-
-    ruta.getAnalysisEngineMetaData().setTypeSystem(tsd);
-    ruta.getAnalysisEngineMetaData()
-            .getTypeSystem()
-            .addType("org.apache.uima.T1", "Type for Testing", "uima.tcas.Annotation");
-
-    return AnalysisEngineFactory.createEngine(ruta);
-  }
-
-  @Test
-  public void test() throws ResourceInitializationException, IOException, InvalidXMLException, AnalysisEngineProcessException {
-    final String name = getClass().getSimpleName();
-    final String namespace = getClass().getPackage().getName();
-    final AnalysisEngine ae = createAE(namespace + "." + name);
-    final CAS cas = ae.newCAS();
-
-    cas.setDocumentText("text is not relevant here");
-
-    try {
-      ae.process(cas);
-      fail("An IllegalArgumentException should be triggered because W is ambiguous.");
-    } catch (AnalysisEngineProcessException e) {
-      // we are expecting an IllegalArgumentException because both org.apache.uima.ruta.type.W and
-      // org.apache.uima.ruta.type.conflicting.W are imported into RUTA's namespace as W;
-      assertTrue(e.getCause() instanceof IllegalArgumentException);
-    } finally {
-        cas.release();
-        ae.destroy();
-    }
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConjunctRulesTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConjunctRulesTest.java
deleted file mode 100644
index b456893..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConjunctRulesTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ConjunctRulesTest {

-

-  @Test

-  public void test() {

-    String document = "Peter Kluegl, Joern Kottmann, Marshall Schor.";

-    String script = "DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T14, T15, T16, T17, T18;\n";

-    script += "W{REGEXP(\"Peter\")} ANY{-> T1} % ANY{REGEXP(\"J.*\")} CW PM{->MARK(T2)} % (COMMA # PM){->MARK(T3)};";

-    script += "W{REGEXP(\"Peter\")} ANY{-> T4} % ANY{REGEXP(\"J.*\")} CW PM{->MARK(T5)} % (COMMA # QUESTION){->MARK(T6)};";

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Kluegl");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, ",");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, ", Joern Kottmann,", ", Marshall Schor.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConjunctiveRuleElementTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConjunctiveRuleElementTest.java
deleted file mode 100644
index 02c7bff..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ConjunctiveRuleElementTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class ConjunctiveRuleElementTest {

-

-  @Test

-  public void test() {

-    String document = "Peter Kluegl, Joern Kottmann, Marshall Schor.";

-    String script = "DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T14, T15, T16, T17, T18;\n";

-    script += "(W & SW & ANY){->MARK(T1)};\n";

-    script += "((CW ANY{REGEXP(\"K.*\")}) & ANY{REGEXP(\"P.*\")}){->MARK(T2)};\n";

-    script += "(ALL & ANY & W & CW{REGEXP(\"Schor\")}){->T3};\n";

-    script += "((ALL ALL) & ANY & (W PERIOD) & CW{REGEXP(\"Schor\")}){->T4};\n";

-    script += "((ALL ALL) & ANY & (W W) & (ANY CW{REGEXP(\"Schor\")})){->T5};\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Peter Kluegl");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Schor.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "Marshall Schor");

-

-    cas.release();

-  }

-

-  @Test

-  public void testWithFeatureMatch() {

-

-    String document = "Peter did something.";

-    String script = "";

-    script += "CW{-> CREATE(Token, \"posTag\" = \"noun\")} SW{-> CREATE(Token, \"posTag\" = \"verb\", \"mood\" = \"p\", \"tense\" = \"p\")} SW;\n";

-    script += "(Token.posTag == \"verb\" & Token.mood==\"p\" & Token.tense==\"p\" ){-> T1};\n";

-    // script +=

-    script += "(Token.posTag == \"noun\" ( Token.posTag == \"verb\" & Token.mood==\"p\" & Token.tense==\"p\" )){-> T3};\n";

-

-    Map<String, String> typeMap = new TreeMap<String, String>();

-    String typeName1 = "Token";

-    typeMap.put(typeName1, "uima.tcas.Annotation");

-

-    Map<String, List<TestFeature>> featureMap = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    featureMap.put(typeName1, list);

-    String fn1 = "posTag";

-    list.add(new TestFeature(fn1, "", "uima.cas.String"));

-    String fn2 = "mood";

-    list.add(new TestFeature(fn2, "", "uima.cas.String"));

-    String fn3 = "tense";

-    list.add(new TestFeature(fn3, "", "uima.cas.String"));

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document, typeMap, featureMap);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "did");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Peter did");

-

-    cas.release();

-  }

-

-  @Test

-  public void testWithStartAnchor() {

-

-    String document = "Peter did something.";

-    String script = "";

-    script += "CW{-> CREATE(Token, \"posTag\" = \"noun\")} SW{-> CREATE(Token, \"posTag\" = \"verb\", \"mood\" = \"p\", \"tense\" = \"p\")} SW;\n";

-    script += "(Token.posTag == \"noun\" @( Token.posTag == \"verb\" & Token.mood==\"p\" & Token.tense==\"p\" )){-> T1};\n";

-    script += "(Token.posTag == \"noun\" @( Token.posTag == \"verb\" & Token.mood==\"p\" & Token.tense==\"p\" )){-> T2} ANY;\n";

-    script += "Token.posTag == \"noun\" @(Token.posTag == \"verb\" ANY){-> T3};\n";

-

-    Map<String, String> typeMap = new TreeMap<String, String>();

-    String typeName1 = "Token";

-    typeMap.put(typeName1, "uima.tcas.Annotation");

-

-    Map<String, List<TestFeature>> featureMap = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    featureMap.put(typeName1, list);

-    String fn1 = "posTag";

-    list.add(new TestFeature(fn1, "", "uima.cas.String"));

-    String fn2 = "mood";

-    list.add(new TestFeature(fn2, "", "uima.cas.String"));

-    String fn3 = "tense";

-    list.add(new TestFeature(fn3, "", "uima.cas.String"));

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document, typeMap, featureMap);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Peter did");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Peter did");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "did something");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CoveredTextTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CoveredTextTest.java
deleted file mode 100644
index 5780c78..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CoveredTextTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.ruta;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;
-import org.junit.Test;
-
-public class CoveredTextTest {
-
-  @Test
-  public void testWithCTFeature() {
-    String document = "This is the document.";
-    String script = "";
-    script += "DECLARE Annotation Type(STRING ct);\n";
-    script += "CW{-> CREATE(Type, \"ct\" = \"cw\")};";
-    script += "SW{-> CREATE(Type, \"ct\" = \"sw\")};";
-    script += "Type.ct == \"cw\" {-> T1};";
-    script += "Type.ct == \"sw\" {-> T2};";
-    script += "Type.ct == \"This\" {-> T3};";
-    script += "Type.ct == \"is\" {-> T4};";
-    script += "Type.ct == Type.coveredText {-> T5};";
-
-    Map<String, String> typeMap = new TreeMap<String, String>();
-    String typeName1 = "Type";
-    typeMap.put(typeName1, "uima.tcas.Annotation");
-
-    Map<String, List<TestFeature>> featureMap = new TreeMap<String, List<TestFeature>>();
-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
-    featureMap.put(typeName1, list);
-    String fn1 = "ct";
-    list.add(new TestFeature(fn1, "", "uima.cas.String"));
-
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document, typeMap, featureMap);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "This");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "is", "the", "document");
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);
-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 0);
-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 0);
-
-    cas.release();
-  }
-
-  @Test
-  public void testCoveredText() {
-    String document = "This is the document.";
-    String script = "STRING var = \"This\";";
-    script += "W.ct == \"This\"{-> T1};";
-    script += "W.ct == \"is\"{-> T2};";
-    script += "W.coveredText == \"This\"{-> T3};";
-    script += "W.coveredText == \"is\"{-> T4};";
-    script += "W{W.ct == var -> T5};";
-    script += "W{W.coveredText == var -> T6};";
-    // script += "W{-> W.coveredText = \"NEW\"};";
-    // script += "W{-> SETFEATURE(\"coveredText\", \"NEW\")};";
-
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "This");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "is");
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "This");
-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "is");
-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "This");
-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 1, "This");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CustomViewTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CustomViewTest.java
deleted file mode 100644
index 7d14e5a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/CustomViewTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*

- * 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.ruta;

-

-import static org.junit.Assert.assertEquals;

-

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.List;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.fit.factory.AggregateBuilder;

-import org.apache.uima.fit.factory.AnalysisEngineFactory;

-import org.apache.uima.fit.util.JCasUtil;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.type.W;

-import org.apache.uima.util.InvalidXMLException;

-import org.junit.After;

-import org.junit.Before;

-import org.junit.Test;

-

-/**

- * Tests Ruta when it is runned on another view than _InitialView.

- */

-public class CustomViewTest {

-  private AnalysisEngine engine;

-

-  /**

-   * Create an analysis engine for a Ruta script.

-   *

-   * @param script Script path.

-   * @return Analysis engine.

-   */

-  private AnalysisEngine createAE(String script) throws ResourceInitializationException, IOException, InvalidXMLException {

-    final AnalysisEngineDescription ruta = AnalysisEngineFactory.createEngineDescription(

-            "org.apache.uima.ruta.engine.BasicEngine",

-            RutaEngine.PARAM_MAIN_SCRIPT, script);

-

-    ruta.getAnalysisEngineMetaData()

-            .getTypeSystem()

-            .addType("org.apache.uima.T1", "Type for Testing", "uima.tcas.Annotation");

-

-    final AggregateBuilder builder = new AggregateBuilder();

-    builder.add(ruta, "_InitialView", "text");

-

-    return builder.createAggregate();

-  }

-

-  @Before

-  public void setUp() throws Exception {

-    final String name = this.getClass().getSimpleName();

-    final String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    engine = createAE(String.format("%s/%s", namespace, name));

-  }

-

-  @After

-  public void tearDown() throws Exception {

-    engine.destroy();

-  }

-

-  @Test

-  public void testManyExecutionsOnCustomView() throws Exception {

-    for (int i = 0; i < 5; ++i) {

-      final JCas jcas = engine.newJCas().createView("text");

-      jcas.setDocumentText("This is a short document.");

-

-      engine.process(jcas);

-      final List<String> words = new ArrayList<String>();

-

-      for (Annotation a : JCasUtil.select(jcas, W.class)) {

-        words.add(a.getCoveredText());

-      }

-

-      assertEquals("Checking run " + i, words, Arrays.asList("This", "is", "a", "short", "document"));

-    }

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/DynamicAnchoring1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/DynamicAnchoring1Test.java
deleted file mode 100644
index e82d3fe..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/DynamicAnchoring1Test.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class DynamicAnchoring1Test {

-

-  @Test

-  public void test() {

-    String name = RuleInference1Test.class.getSimpleName();

-    String namespace = RuleInference1Test.class.getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 4, "Peter", "Jochen", "Flo", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 5, "Peter", "Jochen", "Flo und Georg", "und Georg", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, ",", ",");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "Peter, Jochen,", "Jochen,");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 5, "Peter", "Jochen", "Flo", "und", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 5, "Peter", "Jochen", "Flo und Georg", "und Georg", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 2, "Peter, Jochen, Flo", "Jochen, Flo");

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 3, "Peter, Jochen, Flo und", "Jochen, Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 3, "Peter, Jochen, Flo und Georg.", "Jochen, Flo und Georg.",

-            "Flo und Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 12, 6, ",", ",", ",", "und", "und", "und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 6, "Peter,", "Jochen,", "Jochen,", "Flo und", "Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 3, "Peter, Jochen, Flo und", "Jochen, Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 15, 1, "Peter, Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 16, 1, "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 17, 1, "Flo und Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 18, 3, "Peter,", "Jochen,", "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 20, 1, "Peter, Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 21, 1, "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 22, 1, "Flo und Georg.");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/DynamicAnchoring2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/DynamicAnchoring2Test.java
deleted file mode 100644
index dc9bf22..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/DynamicAnchoring2Test.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class DynamicAnchoring2Test {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "A b");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "b A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "A b A");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/EmptyDocumentTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/EmptyDocumentTest.java
deleted file mode 100644
index cc427f8..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/EmptyDocumentTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*

- * 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.ruta;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class EmptyDocumentTest {

-

-  @Test

-  public void test() {

-    String name = RuleInference1Test.class.getSimpleName();

-    String namespace = RuleInference1Test.class.getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/"

-              + "EmptyDocumentTest.txt", 50);

-

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    ai = cas.getAnnotationIndex();

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    assertEquals("", iterator.next().getCoveredText());

-    

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/EqualShortNameTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/EqualShortNameTest.java
deleted file mode 100644
index e33c037..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/EqualShortNameTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class EqualShortNameTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-

-    Map<String, String> complexTypes = new HashMap<String, String>();

-    complexTypes.put("org.apache.uima.EqualShortNameTest.NUM", "uima.tcas.Annotation");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 5, "Only", "some", "text", "with", "number");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 5, "Only", "some", "text", "with", "number");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "1", "2", "3");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 3, "1", "2", "3");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ExternalWordResourceTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ExternalWordResourceTest.java
deleted file mode 100644
index 906612d..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ExternalWordResourceTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ExternalWordResourceTest {
-
-  @Test
-  public void test() {
-    String document = "Some text.";
-    String script = "";
-    script += "WORDTABLE table = RESOURCE(my.package.Class, \"parameter\", \"value\");";
-    script += "WORDLIST list = RESOURCE(my.package.Class, \"parameter\", \"value\");";
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-//    Type t = null;
-//    AnnotationIndex<AnnotationFS> ai = null;
-//    FSIterator<AnnotationFS> iterator = null;
-//
-//    t = RutaTestUtils.getTestType(cas, 1);
-//    ai = cas.getAnnotationIndex(t);
-//    assertEquals(1, ai.size());
-//    iterator = ai.iterator();
-//    assertEquals("Some", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FeatureMatch1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FeatureMatch1Test.java
deleted file mode 100644
index 40af95f..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FeatureMatch1Test.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class FeatureMatch1Test {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    Map<String, String> complexTypes = new HashMap<String, String>();

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    String typeNameA = "org.apache.uima.ruta.FeatureMatchTest.A";

-    String typeNameB = "org.apache.uima.ruta.FeatureMatchTest.B";

-    String typeNameC = "org.apache.uima.ruta.FeatureMatchTest.C";

-    String typeNameD = "org.apache.uima.ruta.FeatureMatchTest.D";

-    complexTypes.put(typeNameA, "uima.tcas.Annotation");

-    complexTypes.put(typeNameB, typeNameD);

-    complexTypes.put(typeNameC, typeNameD);

-    complexTypes.put(typeNameD, "uima.tcas.Annotation");

-    List<TestFeature> listA = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameA, listA);

-    String fnab = "ab";

-    listA.add(new TestFeature(fnab, "", typeNameB));

-    String fnac = "ac";

-    listA.add(new TestFeature(fnac, "", typeNameC));

-    List<TestFeature> listB = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameB, listB);

-    String fnbc = "bc";

-    listB.add(new TestFeature(fnbc, "", typeNameC));

-    List<TestFeature> listC = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameC, listC);

-    String fnci = "ci";

-    listC.add(new TestFeature(fnci, "", "uima.cas.Integer"));

-    String fncb = "cb";

-    listC.add(new TestFeature(fncb, "", "uima.cas.Boolean"));

-    List<TestFeature> listD = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameD, listD);

-    String fnds = "ds";

-    listD.add(new TestFeature(fnds, "", "uima.cas.String"));

-

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION,

-              namespace + "/" + name + ".txt", 50, false, false, complexTypes, features, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 3, "Peter", "Joern", "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 3, "Kluegl", "Kottmann", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 3, "Kluegl", "Kottmann", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 3, "Kluegl", "Kottmann", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 3, "Kluegl", "Kottmann", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 1, "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 1, "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 12, 1, "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 3, "Peter", "Joern", "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 3, "Kluegl", "Kottmann", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 15, 3, "Peter", "Joern", "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 16, 1, "Peter Kluegl, Joern Kottmann, Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 17, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 18, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FeatureMatch2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FeatureMatch2Test.java
deleted file mode 100644
index 5cca11a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FeatureMatch2Test.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class FeatureMatch2Test {

-

-  @Test

-  public void test() {

-    String document = "Peter Kluegl, Joern Kottmann, Marshall Schor.";

-    String script = "";

-    script += "CW.begin<=14{-> T1};\n";

-    script += "CW.begin<14{-> T2};\n";

-    script += "CW.begin==0{-> T3};\n";

-    script += "CW.begin!=0{-> T4};\n";

-    script += "CW.begin>=20{-> T5};\n";

-    script += "CW.begin>20{-> T6};\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Peter", "Kluegl", "Joern");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "Peter", "Kluegl");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Peter");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 5, "Kluegl", "Joern", "Kottmann", "Marshall", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 3, "Kottmann", "Marshall", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "Marshall", "Schor");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FilteringTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FilteringTest.java
deleted file mode 100644
index 4862983..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/FilteringTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class FilteringTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "Peter, Jochen", "Jochen, Flo");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, ", Jochen, ", ", ");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 4, "Peter, Jochen, Flo", "Flo und", "und Georg", "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 15, 1, "Peter, Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 16, 1, "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 17, 1, "Flo und Georg.");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/GreedyAnchoringTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/GreedyAnchoringTest.java
deleted file mode 100644
index 0f57505..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/GreedyAnchoringTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.ruta;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class GreedyAnchoringTest {
-
-  @Test
-  public void testGreedyRuleElement() {
-    String document = "Peter Kluegl, Joern Kottmann, Marshall Schor.";
-    String script = "";
-    script += "ANY+{->T1};";
-    script += "ANY*{->T2};";
-    script += "((SW | CW) (W & CW) PM)+{->T3};";
-    
-    CAS cas = null;
-    Map<String, Object> params = new HashMap<String, Object>();
-    params.put(RutaEngine.PARAM_GREEDY_RULE_ELEMENT, true);
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, params);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, document);
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, document);
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, document);
-
-    cas.release();
-  }
-  
-  @Test
-  public void testGreedyRule() {
-    String document = "Peter Kluegl Joern Kottmann Marshall Schor.";
-    String script = "";
-    script += "(CW CW){->T1};";
-    script += "((SW | CW) (W & CW)){->T2};";
-    
-    CAS cas = null;
-    Map<String, Object> params = new HashMap<String, Object>();
-    params.put(RutaEngine.PARAM_GREEDY_RULE, true);
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, params);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Peter Kluegl", "Joern Kottmann", "Marshall Schor");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "Peter Kluegl", "Joern Kottmann", "Marshall Schor");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/GreedyComposedWithConditionTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/GreedyComposedWithConditionTest.java
deleted file mode 100644
index b20bb7a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/GreedyComposedWithConditionTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class GreedyComposedWithConditionTest {
-
-  @Test
-  public void test() {
-    String document = "Cw 1: sw 2 Cw, sw 3 sw, sw 4 Cw, sw 5 sw, Cw 6 sw, Cw 7 sw, 8 sw.";
-    String script = "";
-    script += "((#{-> T1} (COMMA | PERIOD)))+;";
-    script += "T1 (COMMA T1)+{-CONTAINS(CW) -> MARK(T2,1,2)};";
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 7, "Cw 1: sw 2 Cw", "sw 3 sw", "sw 4 Cw", "sw 5 sw", "Cw 6 sw",
-            "Cw 7 sw", "8 sw");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "Cw 1: sw 2 Cw, sw 3 sw", "sw 4 Cw, sw 5 sw", "Cw 7 sw, 8 sw");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ImplicitRuleTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ImplicitRuleTest.java
deleted file mode 100644
index fd276d4..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ImplicitRuleTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ImplicitRuleTest {
-
-  @Test
-  public void test() {
-    String document = "Some text.";
-    String script = "MARK(T1);";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = RutaTestUtils.getTestType(cas, 1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("Some text.", iterator.next().getCoveredText());
-
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ImportStatementsTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ImportStatementsTest.java
deleted file mode 100644
index d2a20b8..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ImportStatementsTest.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.fit.factory.AnalysisEngineFactory;
-import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;
-import org.apache.uima.fit.util.CasUtil;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.util.InvalidXMLException;
-import org.junit.Test;
-
-/**
- * Test various import statements syntaxes (see UIMA-3303).
- */
-public class ImportStatementsTest {
-  private final String NAME = this.getClass().getSimpleName();
-  private final String NAMESPACE = this.getClass().getPackage().getName().replaceAll("\\.", "/");
-
-  /**
-   * Create an analysis engine for a Ruta script.
-   *
-   * @param script       Script path.
-   * @param strictImport {@link org.apache.uima.ruta.engine.RutaEngine#PARAM_STRICT_IMPORTS} value.
-   * @return Analysis engine.
-   */
-  private AnalysisEngine createAE(String script, boolean strictImport) throws ResourceInitializationException, IOException, InvalidXMLException {
-    final TypeSystemDescription tsd = TypeSystemDescriptionFactory.createTypeSystemDescription(
-        "org.apache.uima.ruta.BasicTypeSystem",
-        "org.apache.uima.ruta.ImportStatementsTestTypeSystem",
-        "org.apache.uima.ruta.ImportStatementsTestTypeSystemWithAmbiguousShortNames",
-        "org.apache.uima.ruta.ImportStatementsTestTypeSystemWithManyPackages");
-    final AnalysisEngineDescription ruta = AnalysisEngineFactory.createEngineDescription(
-        "org.apache.uima.ruta.engine.BasicEngine",
-        RutaEngine.PARAM_MAIN_SCRIPT, script,
-        RutaEngine.PARAM_STRICT_IMPORTS, strictImport);
-
-    ruta.getAnalysisEngineMetaData().setTypeSystem(tsd);
-
-    return AnalysisEngineFactory.createEngine(ruta);
-  }
-
-  @Test
-  public void testImportType() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportType", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("Word");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("Word"), selectText(cas, "org.apache.uima.ruta.Type1"));
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testImportTypeFromDefaultTypesystem() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportTypeFromDefaultTypeSystem", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("Word");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("Word"), selectText(cas, "org.apache.uima.ruta.Type1"));
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testUnimportedTypesAreNotResolved() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "UnimportedTypesAreNotResolved", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("Word");
-      ae.process(cas);
-
-      fail("Type2 should not be resolved because it is not imported.");
-    } catch (AnalysisEngineProcessException e) {
-      // success, Type2 should not be resolved
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testImportTypeAs() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportTypeAs", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.Type2"));
-    } finally {
-      ae.destroy();
-    }
-
-  }
-
-  @Test
-  public void testImportTypeAsStrictModeOff() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportTypeAs", false);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.Type2"));
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testImportStarFromTypeSystem() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportStarFromTypeSystem", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.Type2"));
-    } finally {
-      ae.destroy();
-    }
-
-  }
-
-  @Test
-  public void testImportPackageFromTypeSystem() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportPackageFromTypeSystem", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other.Type2"));
-    } finally {
-      ae.destroy();
-    }
-
-  }
-
-  @Test
-  public void testImportPackageAliasFromTypeSystem() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportPackageAliasFromTypeSystem", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other2.Type1"));
-    } finally {
-      ae.destroy();
-    }
-
-  }
-
-  @Test
-  public void testImportPackageAsWhenStrictModeIsOff() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportPackageAs", false);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.Type2"));
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testImportPackageFromCasTypeSystem() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportPackageFromCasTypeSystem", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other2.Type1"));
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testImportAllPackagesFromTypeSystem() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportAllPackagesFromTypeSystem", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other3.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other4.Type2"));
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testImportAllPackagesWithAliasFromTypeSystem() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportAllPackagesWithAliasFromTypeSystem", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other3.Type1"));
-      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other4.Type2"));
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  @Test
-  public void testImportAllPackagesFromTypeSystemWithAmbiguousShortNames() throws Exception {
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "ImportAllPackagesFromTypeSystemWithAmbiguousShortNames", true);
-    try {
-      CAS cas = ae.newCAS();
-      cas.setDocumentText("First Second");
-      ae.process(cas);
-
-      fail("Engine should fail because Type1 and Type2 are ambiguous");
-    } catch (AnalysisEngineProcessException e) {
-      if (e.getCause() instanceof IllegalArgumentException) {
-        // success, Type1 and Type2 are ambiguous and this exception should be raised.
-      } else {
-        throw e;
-      }
-    } finally {
-      ae.destroy();
-    }
-  }
-
-  private List<String> selectText(CAS cas, String type) {
-    List<String> values = new ArrayList<String>();
-    for (AnnotationFS annotation : CasUtil.select(cas, cas.getTypeSystem().getType(type))) {
-      values.add(annotation.getCoveredText());
-    }
-
-    return values;
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/IncompletePartitioningTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/IncompletePartitioningTest.java
deleted file mode 100644
index 1f19ccd..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/IncompletePartitioningTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*

- * 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.ruta;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-public class IncompletePartitioningTest {

-

-  @Test

-  public void test() throws Exception, IOException {

-    String className = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-

-    String ruleFileName = namespace + "/" + className + RutaEngine.SCRIPT_FILE_EXTENSION;

-    String textFileName = namespace + "/" + className + ".txt";

-    URL ruleURL = RutaTestUtils.class.getClassLoader().getResource(ruleFileName);

-    File ruleFile = new File(ruleURL.toURI());

-    URL textURL = RutaTestUtils.class.getClassLoader().getResource(textFileName);

-    File textFile = new File(textURL.toURI());

-    URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/TestEngine.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-

-    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-    for (int i = 1; i <= 50; i++) {

-      basicTypeSystem.addType(RutaTestUtils.TYPE + i, "Type for Testing",

-              "uima.tcas.Annotation");

-    }

-    Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-    tsds.add(basicTypeSystem);

-    TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-    aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { ruleFile

-            .getParentFile().getPath() });

-    String name = ruleFile.getName();

-    if (name.endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {

-      name = name.substring(0, name.length() - 5);

-    }

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-    ae.setConfigParameterValue(RutaEngine.PARAM_SEEDERS, new String[0]);

-    ae.setConfigParameterValue(RutaEngine.PARAM_DEFAULT_FILTERED_TYPES, new String[0]);

-

-    ae.reconfigure();

-    CAS cas = ae.newCAS();

-    cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));

-    

-    Type typeCW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.CW");

-    Type typeSW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.SW");

-    cas.addFsToIndexes(cas.createAnnotation(typeCW, 0, 5));

-    cas.addFsToIndexes(cas.createAnnotation(typeCW, 7, 13));

-    cas.addFsToIndexes(cas.createAnnotation(typeCW, 15, 18));

-    cas.addFsToIndexes(cas.createAnnotation(typeSW, 19, 22));

-    cas.addFsToIndexes(cas.createAnnotation(typeCW, 23, 28));

-    

-    ae.process(cas);

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "Peter, Jochen", "Flo and");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/InlinedRulesTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/InlinedRulesTest.java
deleted file mode 100644
index 812392c..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/InlinedRulesTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class InlinedRulesTest {

-

-  @Test

-  public void test() {

-    String document = "The Ruta language is an imperative rule language extended with scripting elements. A Ruta rule defines a pattern of annotations with additional conditions. If this pattern applies, then the actions of the rule are performed  on the matched annotations. A rule is composed of a sequence of rule elements and a rule element essentially consists of four parts: A matching condition, an optional quantifier, a list of conditions and a list of actions. The matching condition is typically a type of an annotation by which the rule element matches on the covered text of one of those annotations. The quantifier specifies, whether it is necessary that the rule element successfully matches and how often the rule element may match. The list of conditions specifies additional constraints that the matched text or annotations need to fulfill. The list of actions defines the consequences of the rule and often creates new annotations or modifies existing annotations.";

-    String script = "";

-    script += "PERIOD #{-> T1} @PERIOD;\n";

-    script += "#{-> T1} PERIOD;\n";

-     // inlined as block

-     script += "T1{STARTSWITH(Document)}->{CW{->T2};};\n";

-     script += "(T1 PERIOD T1){CONTAINS(COLON)}->{COMMA #{->T3} COMMA; COLON ANY{-> T4};};\n";

-     script += "(COLON # COMMA)->{ANY{REGEXP(\"a.*\", true)-> T5};};";

-     // inlined as condition

-     script += "T1{->T6}<-{ANY COLON ANY{->T6};};\n";

-     script += "T1{->T7}<-{CW COLON CW{->T7};};\n";

-     script +=

-     "(T1 PERIOD{ -> T8} T1){CONTAINS(COLON)}<-{CW COLON CW{->T9}; COLON ANY{-> T10};};\n";

-     script += "(T1 PERIOD{ -> T11} T1){CONTAINS(COLON)}<-{CW COLON CW{->T11};};\n";

-     script +=

-     "(T1 PERIOD T1{-> T12}){CONTAINS(COLON)}<-{W COLON (W W)<-{ANY{REGEXP(\"match.*\")};};};\n";

-    // both types

-    script += "(T1 PERIOD T1){CONTAINS(COLON)}<-{W COLON W W;}->{COLON{->T13};};\n";

-    script += "(T1 PERIOD T1){CONTAINS(COLON)}<-{W COLON (W W)<-{ANY{REGEXP(\"match.*\")};}->{W{->T14};};};\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "The", "Ruta");

-    RutaTestUtils

-            .assertAnnotationsEquals(

-                    cas,

-                    3,

-                    3,//

-                    "then the actions of the rule are performed  on the matched annotations. A rule is composed of a sequence of rule elements and a rule element essentially consists of four parts: A matching condition",

-                    "an optional quantifier", "an optional quantifier");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "A", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "A");

-    RutaTestUtils

-            .assertAnnotationsEquals(

-                    cas,

-                    6,

-                    2, //

-                    "A rule is composed of a sequence of rule elements and a rule element essentially consists of four parts: A matching condition, an optional quantifier, a list of conditions and a list of actions",

-                    "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 2, ".", ".");

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 2, "A", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 0);

-    RutaTestUtils

-            .assertAnnotationsEquals(

-                    cas,

-                    12,

-                    2, //

-                    "A rule is composed of a sequence of rule elements and a rule element essentially consists of four parts: A matching condition, an optional quantifier, a list of conditions and a list of actions",

-                    "The matching condition is typically a type of an annotation by which the rule element matches on the covered text of one of those annotations");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 2, ":", ":");

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 4, "A", "A", "matching", "matching");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/InvisibleWildcardMatchTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/InvisibleWildcardMatchTest.java
deleted file mode 100644
index 80de9c6..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/InvisibleWildcardMatchTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class InvisibleWildcardMatchTest {
-
-  @Test
-  public void test() {
-    String document = "Some text. ";
-    String script = "PERIOD #{->T1};";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 0);
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LiteralStringMatchTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LiteralStringMatchTest.java
deleted file mode 100644
index 559377f..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LiteralStringMatchTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*

- * Licensed to the Apache Software FoSWation (ASF) SWer 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 SWer 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 SWer 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

- * SWer the License.

- */

-

-package org.apache.uima.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class LiteralStringMatchTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 4, "CW", "CW", "CW", "CW");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "SW");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "CW COMMA CW COMMA", "CW COMMA");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 5, "CW", "CW", "CW", "SW", "CW");

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 5, "CW", "CW", "CW SW CW", "SW CW", "CW");

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 2, "CW COMMA CW COMMA CW", "CW COMMA CW");

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 3, "CW COMMA CW COMMA CW SW", "CW COMMA CW SW", "CW SW");

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 3, "CW COMMA CW COMMA CW SW CW PERIOD", "CW COMMA CW SW CW PERIOD",

-            "CW SW CW PERIOD");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 6, "CW COMMA", "CW COMMA", "CW COMMA", "CW SW", "CW SW", "CW SW");

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 3, "CW COMMA CW COMMA CW SW", "CW COMMA CW SW", "CW SW");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LoadResourceFromClassPathTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LoadResourceFromClassPathTest.java
deleted file mode 100644
index dec72c5..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LoadResourceFromClassPathTest.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*

- * 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.ruta;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class LoadResourceFromClassPathTest {

-

-  @Test

-  public void test() {

-    String document = "Peter Kluegl: Ruta\nMarshall Schor: UIMA\nJoern Kottmann: CAS Editor\n";

-    String script = "WORDTABLE table = '/org/apache/uima/ruta/action/table.csv';\n";

-    script += "WORDLIST list = '/org/apache/uima/ruta/action/trie.mtwl';\n";

-    script += "WORDLIST list2 = '/org/apache/uima/ruta/action/firstnames.txt';\n";

-    script += "TRIE(\"FirstNames.txt\" = T1, \"LastNames.txt\" = T2, list, true, 4, false, 0, \".,-/\");\n";

-    script += "MARKTABLE(Person, 1, table, true, 0, \"\", 0, \"firstname\" = 2, \"system\" = 3);\n";

-    script += "MARKFAST(T3, list2);\n";

-    

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String typeName = "org.apache.uima.Person";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-    

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "firstname";

-    list.add(new TestFeature(fn1, "", "uima.cas.String"));

-    String fn2 = "system";

-    list.add(new TestFeature(fn2, "", "uima.cas.String"));

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document, complexTypes, features);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Peter", "Marshall", "Joern");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "Kluegl", "Schor", "Kottmann");

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    AnnotationFS next = null;

-    String v1 = null;

-    String v2 = null;

-    t = cas.getTypeSystem().getType(typeName);

-    Feature f1 = t.getFeatureByBaseName(fn1);

-    Feature f2 = t.getFeatureByBaseName(fn2);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(3, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Peter", v1);

-    assertEquals("Ruta", v2);

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Marshall", v1);

-    assertEquals("UIMA", v2);

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Joern", v1);

-    assertEquals("CAS Editor", v2);

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "Peter", "Marshall", "Joern");

-

-    cas.release();

-  }

-

-  @Test

-  public void testWithClasspathPrefix() {

-    String document = "Peter Kluegl: Ruta\nMarshall Schor: UIMA\nJoern Kottmann: CAS Editor\n";

-    String script = "WORDTABLE table = 'classpath:/org/apache/uima/ruta/action/table.csv';\n";

-    script += "WORDLIST list = 'classpath:/org/apache/uima/ruta/action/trie.mtwl';\n";

-    script += "WORDLIST list2 = 'classpath:/org/apache/uima/ruta/action/firstnames.txt';\n";

-    script += "TRIE(\"FirstNames.txt\" = T1, \"LastNames.txt\" = T2, list, true, 4, false, 0, \".,-/\");\n";

-    script += "MARKTABLE(Person, 1, table, true, 0, \"\", 0, \"firstname\" = 2, \"system\" = 3);\n";

-    script += "MARKFAST(T3, list2);\n";

-

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String typeName = "org.apache.uima.Person";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "firstname";

-    list.add(new TestFeature(fn1, "", "uima.cas.String"));

-    String fn2 = "system";

-    list.add(new TestFeature(fn2, "", "uima.cas.String"));

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document, complexTypes, features);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Peter", "Marshall", "Joern");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "Kluegl", "Schor", "Kottmann");

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    AnnotationFS next = null;

-    String v1 = null;

-    String v2 = null;

-    t = cas.getTypeSystem().getType(typeName);

-    Feature f1 = t.getFeatureByBaseName(fn1);

-    Feature f2 = t.getFeatureByBaseName(fn2);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(3, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Peter", v1);

-    assertEquals("Ruta", v2);

-

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Marshall", v1);

-    assertEquals("UIMA", v2);

-

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Joern", v1);

-    assertEquals("CAS Editor", v2);

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "Peter", "Marshall", "Joern");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LoadScriptFromClassPathTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LoadScriptFromClassPathTest.java
deleted file mode 100644
index b86a288..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LoadScriptFromClassPathTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class LoadScriptFromClassPathTest {

-

-  @Test

-  public void test() {

-    String document = "Peter, Jochen, Flo und Georg.";

-    String script = "SCRIPT org.apache.uima.ruta.RuleInference1Test;\n";

-    script += "CALL(RuleInference1Test);\n";

-

-    Map<String, Object> parameters = new HashMap<String, Object>();

-    parameters.put(RutaEngine.PARAM_ADDITIONAL_SCRIPTS,

-            new String[] { "org.apache.uima.ruta.RuleInference1Test" });

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script, parameters);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 4, "Peter", "Jochen", "Flo", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 5, "Peter", "Jochen", "Flo und Georg", "und Georg", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, ",", ",");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "Peter, Jochen,", "Jochen,");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 5, "Peter", "Jochen", "Flo", "und", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 5, "Peter", "Jochen", "Flo und Georg", "und Georg", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 2, "Peter, Jochen, Flo", "Jochen, Flo");

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 3, "Peter, Jochen, Flo und", "Jochen, Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 3, "Peter, Jochen, Flo und Georg.", "Jochen, Flo und Georg.",

-            "Flo und Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 12, 6, ",", ",", ",", "und", "und", "und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 6, "Peter,", "Jochen,", "Jochen,", "Flo und", "Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 3, "Peter, Jochen, Flo und", "Jochen, Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 15, 1, "Peter, Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 16, 1, "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 17, 1, "Flo und Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 18, 3, "Peter,", "Jochen,", "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 20, 1, "Peter, Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 21, 1, "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 22, 1, "Flo und Georg.");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LongGreedy1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LongGreedy1Test.java
deleted file mode 100644
index 4ff2fb3..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LongGreedy1Test.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.junit.Test;

-

-public class LongGreedy1Test {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-//      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-//              + ".txt", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-//    t = RutaTestUtils.getTestType(cas, 1);

-//    ai = cas.getAnnotationIndex(t);

-//    assertEquals(1, ai.size());

-//    iterator = ai.iterator();

-//    String coveredText = iterator.next().getCoveredText();

-//    assertEquals(64998, coveredText.length());

-    

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LongGreedy2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LongGreedy2Test.java
deleted file mode 100644
index 2e495af..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/LongGreedy2Test.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.junit.Test;

-

-public class LongGreedy2Test {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    try {

-//      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-//              + ".txt", 50, false, true, null, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    // t = RutaTestUtils.getTestType(cas, 2);

-    // ai = cas.getAnnotationIndex(t);

-    // assertEquals(1, ai.size());

-    // iterator = ai.iterator();

-    // String coveredText2 = iterator.next().getCoveredText();

-    // assertEquals(64998, coveredText2.length());

-

-    if (cas != null) {

-      cas.release();

-    }

-

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ManualAnchoringTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ManualAnchoringTest.java
deleted file mode 100644
index 48cdb5a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ManualAnchoringTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ManualAnchoringTest {
-
-  @Test
-  public void test() {
-    String document = "A, B and C.";
-    String script = "";
-    script += "CW{-> T1};\n";
-    script += "\"and\"{-> T2};\n";
-    script += "T1 (COMMA T1)* @T2 T1 {->MARK(T3,1,4)};\n";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "A, B and C");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/MarkInGreedyComposedTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/MarkInGreedyComposedTest.java
deleted file mode 100644
index ea0dfb0..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/MarkInGreedyComposedTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class MarkInGreedyComposedTest {
-
-  @Test
-  public void testWildCardFollowedByComposedReversed() {
-    String document = "1 x f B e d B x c A b a A 1";
-    String script = "";
-    script += "( ( (SW{REGEXP(\"x\")} SW ) #) {-> T1} )+ @NUM;";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "x f B e d B", "x c A b a A");
-
-    cas.release();
-  }
-
-  @Test
-  public void testSimpleFollowedByComposedReversed() {
-    String document = "1 x f B x c A 1";
-    String script = "";
-    script += "( ( (SW{REGEXP(\"x\")} SW ) CW) {-> T1} )+ @NUM;";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "x f B", "x c A");
-
-    cas.release();
-  }
-
-  @Test
-  public void testWildCardFollowedByComposed() {
-    String document = "A c b A c x A c b A c x";
-    String script = "";
-    script += "( ( # (SW SW{REGEXP(\"x\")}) ) {-> T1} )+;";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "A c b A c x", "A c b A c x");
-
-    cas.release();
-  }
-
-  @Test
-  public void testWildCardFollowedByCondition() {
-    String document = "A A b A c X X b X c";
-    String script = "";
-    script += "((# SW{REGEXP(\"c\")}){-> T1})+; ";
-    script += "((# SW{REGEXP(\"c\")}){-> MARKONCE(T2)})+; ";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "A A b A c", "X X b X c");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "A A b A c", "X X b X c");
-
-    cas.release();
-  }
-
-  @Test
-  public void testWithWildCard() {
-    String document = "1 . 2 .";
-    String script = "";
-    script += "((# PERIOD){-> T1})+; ";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "1 .", "2 .");
-
-    cas.release();
-  }
-
-  @Test
-  public void test() {
-    String document = "1 . 2 .";
-    String script = "";
-    script += "((NUM PERIOD){-> MARKONCE(T1)})+; ";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "1 .", "2 .");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NBSPWSTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NBSPWSTest.java
deleted file mode 100644
index 69a8789..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NBSPWSTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class NBSPWSTest {
-
-  @Test
-  public void test() {
-    String document = ((char) 160) + "-" + ((char) 8239) + "-" + ((char) 65279) + "-" + ((char) 8199)
-            + "-" + ((char) 6158);
-    String script = "RETAINTYPE(SPACE);";
-    script += "WS{-> T1};";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 5);
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NestedDisjunctiveTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NestedDisjunctiveTest.java
deleted file mode 100644
index 2e64624..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NestedDisjunctiveTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class NestedDisjunctiveTest {
-
-  @Test
-  public void test() {
-    String document = "";
-    document +=
-    "A: C D X\n";
-    document +="B C D X\n";
-    document +="E X\n";
-    document +="F X\n";
-    String script = "(((\"A\" | \"B\") COLON? \"C\" \"D\") | (\"E\" | \"F\")) ANY {->MARK(T1)};";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 4, "X", "X", "X", "X");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NewCASPipelineTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NewCASPipelineTest.java
deleted file mode 100644
index c06b72a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NewCASPipelineTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.fit.factory.AnalysisEngineFactory;
-import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;
-import org.apache.uima.fit.pipeline.SimplePipeline;
-import org.apache.uima.resource.ResourceConfigurationException;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.metadata.ResourceMetaData;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.util.CasCreationUtils;
-import org.apache.uima.util.InvalidXMLException;
-import org.junit.Test;
-
-
-/**
- * Tests if the script is correctly applied in a pipeline if a new CAS is used.
- *
- */
-public class NewCASPipelineTest {
-  private static final String TEST_TYPE = "org.apache.uima.T1";
-
-  /**
-   * Create an analysis engine for a Ruta script.
-   * 
-   * @param script
-   *          Script path.
-   * @return Analysis engine.
-   */
-  private AnalysisEngine createAE(String script) throws ResourceInitializationException,
-          IOException, InvalidXMLException {
-    final TypeSystemDescription tsd = TypeSystemDescriptionFactory
-            .createTypeSystemDescription("org.apache.uima.ruta.BasicTypeSystem");
-    final AnalysisEngineDescription ruta = AnalysisEngineFactory.createEngineDescription(
-            "org.apache.uima.ruta.engine.BasicEngine", RutaEngine.PARAM_MAIN_SCRIPT, script);
-
-    ruta.getAnalysisEngineMetaData().setTypeSystem(tsd);
-    ruta.getAnalysisEngineMetaData().getTypeSystem()
-            .addType(TEST_TYPE, "Type for Testing", "uima.tcas.Annotation");
-
-    return AnalysisEngineFactory.createEngine(ruta);
-  }
-
-  @Test
-  public void test() throws ResourceInitializationException, IOException, InvalidXMLException,
-          AnalysisEngineProcessException, ResourceConfigurationException {
-    final String name = getClass().getSimpleName();
-    final String namespace = getClass().getPackage().getName();
-    final AnalysisEngine ae = createAE(namespace + "." + name);
-    List<ResourceMetaData> metaData = new ArrayList<ResourceMetaData>();
-    metaData.add(ae.getMetaData());
-    String input = "This is a test.";
-    Type t1 = null;
-    
-    
-    // create a cas and apply rules
-    final CAS cas = CasCreationUtils.createCas(metaData);
-    cas.setDocumentText(input);
-    SimplePipeline.runPipeline(cas, ae);
-
-    t1 = cas.getTypeSystem().getType(TEST_TYPE);
-    assertEquals(1, cas.getAnnotationIndex(t1).size());
-
-    // reset the cas and do it again
-    cas.reset();
-    cas.setDocumentText(input);
-    SimplePipeline.runPipeline(cas, ae);
-
-    t1 = cas.getTypeSystem().getType(TEST_TYPE);
-    assertEquals(1, cas.getAnnotationIndex(t1).size());
-    
-    // create a new cas and force the ae to update its types
-    ae.setConfigParameterValue(RutaEngine.PARAM_RELOAD_SCRIPT, true);
-    ae.reconfigure();
-    
-    final CAS cas2 = CasCreationUtils.createCas(metaData);
-    cas2.setDocumentText(input);
-    SimplePipeline.runPipeline(cas2, ae);
-
-    t1 = cas2.getTypeSystem().getType(TEST_TYPE);
-    assertEquals(1, cas2.getAnnotationIndex(t1).size());
-    
-    // create a new cas and do not force the ae to update its types
-    ae.setConfigParameterValue(RutaEngine.PARAM_RELOAD_SCRIPT, false);
-    ae.reconfigure();
-    final CAS cas3 = CasCreationUtils.createCas(metaData);
-    cas3.setDocumentText(input);
-    SimplePipeline.runPipeline(cas3, ae);
-
-    t1 = cas3.getTypeSystem().getType(TEST_TYPE);
-    assertEquals(1, cas3.getAnnotationIndex(t1).size());
-    
-    // create a new cas and do not reconfigure the engine
-    final CAS cas4 = CasCreationUtils.createCas(metaData);
-    cas4.setDocumentText(input);
-    SimplePipeline.runPipeline(cas4, ae);
-
-    t1 = cas4.getTypeSystem().getType(TEST_TYPE);
-    assertEquals(1, cas4.getAnnotationIndex(t1).size());
-    
-    if (ae != null) {
-      ae.destroy();
-    }
-    if (cas != null) {
-      cas.release();
-    }
-    if (cas2 != null) {
-      cas2.release();
-    }
-    if (cas3 != null) {
-      cas3.release();
-    }
-    if (cas4 != null) {
-      cas4.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NullExpressionTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NullExpressionTest.java
deleted file mode 100644
index d8f4c2f..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/NullExpressionTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.ruta;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;
-import org.junit.Test;
-
-public class NullExpressionTest {
-
-  @Test
-  public void test() {
-    String document = "Some text.";
-    String script = "";
-    script += "CREATE(A, \"a\" = \"test\", \"b\" = SW), CREATE(B, \"a\" = \"test\", \"b\" = SW);\n";
-    script += "A.a != null{-> T5};";
-    script += "A.b != null{-> T6};";
-    script += "A{-> A.a = null, A.b = null};";
-    script += "B{-> SETFEATURE(\"a\", null), SETFEATURE(\"b\", null)};";
-    script += "A.a == null{-> T1};";
-    script += "A.b == null{-> T2};";
-    script += "B{FEATURE(\"a\", null)-> T3};";
-    script += "B{FEATURE(\"b\", null)-> T4};";
-
-    
-    Map<String, String> typeMap = new TreeMap<String, String>();
-    String typeName1 = "A";
-    typeMap.put(typeName1, "uima.tcas.Annotation");
-    String typeName2 = "B";
-    typeMap.put(typeName2, "uima.tcas.Annotation");
-    
-    Map<String, List<TestFeature>> featureMap = new TreeMap<String, List<TestFeature>>();
-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
-    featureMap.put(typeName1, list);
-    featureMap.put(typeName2, list);
-    String fn1 = "a";
-    list.add(new TestFeature(fn1, "", "uima.cas.String"));
-    String fn2 = "b";
-    list.add(new TestFeature(fn2, "", "uima.tcas.Annotation"));
-    
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document, typeMap, featureMap);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Some text.");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Some text.");
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Some text.");
-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Some text.");
-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "Some text.");
-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 1, "Some text.");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OptionalComposedEndTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OptionalComposedEndTest.java
deleted file mode 100644
index a04be71..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OptionalComposedEndTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class OptionalComposedEndTest {

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "20,20", "20", "20,20");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "20,20", "20", "20,20");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "20,20", "20", "20,20");

-

-    cas.release();

-  }  

-  

-  @Test

-  public void testDisjunctive() {

-    String document = "bq. A0.0, a. A.";

-    String script = "";

-    script += "(NUM ((COMMA|PERIOD) NUM)?) {-> T1};\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "0.0", "0");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OptionalDisjunctiveBeforeAnchoringTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OptionalDisjunctiveBeforeAnchoringTest.java
deleted file mode 100644
index f82c689..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OptionalDisjunctiveBeforeAnchoringTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class OptionalDisjunctiveBeforeAnchoringTest {
-
-  @Test
-  public void test() {
-    String document = "0.3-0.7";
-    String script = "NUM {-PARTOF(T1)} ((COMMA | PERIOD) NUM)? {->MARK(T1,1,2)};";
-    script +="((T1? (\"<\" | \">\" | \"=\" | \"-\" | \"+\") )?  @T1) {->T2};\n";
-    script +="T2{-PARTOFNEQ(T2)->T3};\n";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "0.3", "0.7");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "0.3-0.7", "0.3");
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "0.3-0.7");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OutOfWindowTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OutOfWindowTest.java
deleted file mode 100644
index 4404743..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/OutOfWindowTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class OutOfWindowTest {

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "Peter, Jochen", "Jochen, Flo", "Lena, Beate");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Jochen, Flo");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier1Test.java
deleted file mode 100644
index 6201979..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier1Test.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class Quantifier1Test {

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "A B", "A B", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "A", "A", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "A B", "A B B", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 3, "A", "A", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, "A B", "A B B");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "A B", "A B");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 1, "A B B");

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 1, "A B B");

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 2, "A B", "A B B");

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 3, "A B", "A B", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 3, "A B", "A B B", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 12, 2, "A B C", "A C");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 2, "A B C", "A C");

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 3, "A B C", "A B B C", "A C");

-    RutaTestUtils.assertAnnotationsEquals(cas, 15, 3, "A B C", "A B B C", "A C");

-    RutaTestUtils.assertAnnotationsEquals(cas, 16, 2, "A B C", "A B B C");

-    RutaTestUtils.assertAnnotationsEquals(cas, 17, 2, "A B C", "A B B C");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier2Test.java
deleted file mode 100644
index 2e83ed6..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier2Test.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class Quantifier2Test {

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "A3 A4", "A4 A5", "A6 A7");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "A1 B B A2");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 4, "A1 B B A2", "A3 A4", "A4 A5", "A6 A7");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier3Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier3Test.java
deleted file mode 100644
index ff77e31..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier3Test.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class Quantifier3Test {

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Big Big Big");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Big Big Big");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Big Big Big");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier4Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier4Test.java
deleted file mode 100644
index 051623c..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier4Test.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class Quantifier4Test {

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "org.apache.uima.ruta.type.CW");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier5Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier5Test.java
deleted file mode 100644
index 45dfdf5..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier5Test.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class Quantifier5Test {

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, "Peter geht zur Arbeit", "Peter zur Arbeit");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "Peter geht zur Arbeit", "Peter zur Arbeit");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 2, "Peter geht zur Arbeit", "zur Arbeit");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier6Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier6Test.java
deleted file mode 100644
index 71325cb..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier6Test.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class Quantifier6Test {

-  @Test

-  public void test() {

-    String document = "A1B-2C3-D4E";

-    String script = "RETAINTYPE(WS);\n";

-    script += "(CW | NUM)+{-PARTOF(T1)-> MARK(T1, 1, 2)} (SPECIAL{REGEXP(\"-\")} (CW | NUM)+)+;\n";

-    script += "RETAINTYPE;\n";

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "A1B-2C3-D4E");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier7Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier7Test.java
deleted file mode 100644
index 8438eec..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier7Test.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class Quantifier7Test {
-  @Test
-  public void test() {
-    String document = "n 1 2 3, H 1 2 3, i 1 2 3, i 1 2 3, i 1 2 3, n 1 2 3, n 1 2 3";
-    String script = "\"H\" -> T1;\n";
-    script += "\"i\" -> T2;\n";
-    script += "COMMA {-> T3};\n";
-    script += "COMMA #{-> T5} COMMA;\n";
-    script += "T5 { CONTAINS(T1)} (T3? T5 { CONTAINS(T2) } T3?)* { -> MARK(T4, 1, 2) };\n";
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "H 1 2 3, i 1 2 3, i 1 2 3, i 1 2 3,");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier8Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier8Test.java
deleted file mode 100644
index 817f317..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/Quantifier8Test.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class Quantifier8Test {
-  @Test
-  public void test() {
-    String document = "A B C D. A B D.";
-    String script = "";
-    script += "W{REGEXP(\"A\")} W{REGEXP(\"B\")} W?{REGEXP(\"C\")} W{REGEXP(\"D\") -> MARK(T1,1,4)};\n";
-    script += "W{REGEXP(\"A\")} W{REGEXP(\"B\")} W*{REGEXP(\"C\")} W{REGEXP(\"D\") -> MARK(T2,1,4)};\n";
-    script += "W{REGEXP(\"A\")} W{REGEXP(\"B\")} W[0,2]{REGEXP(\"C\")} W{REGEXP(\"D\") -> MARK(T3,1,4)};\n";
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "A B C D", "A B D");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "A B C D", "A B D");
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "A B C D", "A B D");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RegExpRuleTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RegExpRuleTest.java
deleted file mode 100644
index 186c371..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RegExpRuleTest.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*

- * 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.ruta;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class RegExpRuleTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    Map<String, String> complexTypes = new HashMap<String, String>();

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    String typeName = "org.apache.uima.Complex";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "a";

-    list.add(new TestFeature(fn1, "", "uima.tcas.Annotation"));

-    String fn2 = "b";

-    list.add(new TestFeature(fn2, "", "uima.cas.Boolean"));

-    String fn3 = "s";

-    list.add(new TestFeature(fn3, "", "uima.cas.String"));

-    

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false,false,complexTypes,features, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    t = RutaTestUtils.getTestType(cas, 1);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    assertEquals(28, iterator.next().getCoveredText().length());

-   

-    t = RutaTestUtils.getTestType(cas, 2);

-    ai = cas.getAnnotationIndex(t);

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    assertEquals(26, iterator.next().getCoveredText().length());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "y", "z");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "y", "z");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 3, "B", "B", "B");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "y", "z");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 3, "ByB", "BzB", "BB");

-

-    t = cas.getTypeSystem().getType(typeName);

-    ai = cas.getAnnotationIndex(t);

-    iterator = ai.iterator();

-    assertEquals(5, ai.size());

-    AnnotationFS next = null;

-    String stringValue = null;

-    Boolean booleanValue = null;

-    AnnotationFS afs = null;

-    

-    next = iterator.next();

-    assertEquals("y", next.getCoveredText());

-    stringValue = next.getStringValue(t.getFeatureByBaseName(fn3));

-    assertEquals("ByBB", stringValue);

-    booleanValue = next.getBooleanValue(t.getFeatureByBaseName(fn2));

-    assertEquals(true, booleanValue);

-    afs = (AnnotationFS) next.getFeatureValue(t.getFeatureByBaseName(fn1));

-    assertEquals("B", afs.getCoveredText());

-    

-    next = iterator.next();

-    assertEquals("B", next.getCoveredText());

-    stringValue = next.getStringValue(t.getFeatureByBaseName(fn3));

-    assertEquals("ByBB", stringValue);

-    booleanValue = next.getBooleanValue(t.getFeatureByBaseName(fn2));

-    assertEquals(false, booleanValue);

-    afs = (AnnotationFS) next.getFeatureValue(t.getFeatureByBaseName(fn1));

-    assertEquals("y", afs.getCoveredText());

-    

-    next = iterator.next();

-    assertEquals("z", next.getCoveredText());

-    stringValue = next.getStringValue(t.getFeatureByBaseName(fn3));

-    assertEquals("BzBB", stringValue);

-    booleanValue = next.getBooleanValue(t.getFeatureByBaseName(fn2));

-    assertEquals(true, booleanValue);

-    afs = (AnnotationFS) next.getFeatureValue(t.getFeatureByBaseName(fn1));

-    assertEquals("B", afs.getCoveredText());

-    

-    next = iterator.next();

-    assertEquals("B", next.getCoveredText());

-    stringValue = next.getStringValue(t.getFeatureByBaseName(fn3));

-    assertEquals("BzBB", stringValue);

-    booleanValue = next.getBooleanValue(t.getFeatureByBaseName(fn2));

-    assertEquals(false, booleanValue);

-    afs = (AnnotationFS) next.getFeatureValue(t.getFeatureByBaseName(fn1));

-    assertEquals("z", afs.getCoveredText());

-    

-    next = iterator.next();

-    assertEquals("B", next.getCoveredText());

-    stringValue = next.getStringValue(t.getFeatureByBaseName(fn3));

-    assertEquals("BBB", stringValue);

-    booleanValue = next.getBooleanValue(t.getFeatureByBaseName(fn2));

-    assertEquals(false, booleanValue);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RemoveDocumentAnnotationTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RemoveDocumentAnnotationTest.java
deleted file mode 100644
index d9c2292..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RemoveDocumentAnnotationTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class RemoveDocumentAnnotationTest {
-
-  @Test
-  public void testWildCardFollowedByComposedReversed() {
-    String document = "some text";
-    String script = "";
-    script += "Annotation{-> UNMARKALL(Annotation)};";
-    script += "\"some\" -> T1;";
-    script += "\"text\" -> T2;";
-    script += "(T1 T2){-> T3};";
-    script += "DocumentAnnotation{-> T4};";
-    script += "Document{-> T5};";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "some");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "text");
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "some text");
-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "some text");
-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "some text");
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ReverseQuantifierTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ReverseQuantifierTest.java
deleted file mode 100644
index fd23dcb..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ReverseQuantifierTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.ruta;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class ReverseQuantifierTest {
-  @Test
-  public void test() {
-    String document = "A B C. A C. B C. C";
-    String script = "";
-    script += "W??{REGEXP(\"A\")} W??{REGEXP(\"B\")} @W{REGEXP(\"C\") -> MARK(T2,1,3)};\n";
-    script += "W?{REGEXP(\"A\")} W?{REGEXP(\"B\")} @W{REGEXP(\"C\") -> MARK(T1,1,3)};\n";
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 4, "A B C", "A C", "B C", "C");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 4, "B C", "C", "B C", "C");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference1Test.java
deleted file mode 100644
index 7453b70..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference1Test.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RuleInference1Test {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 4, "Peter", "Jochen", "Flo", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 5, "Peter", "Jochen", "Flo und Georg", "und Georg", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, ",", ",");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "Peter, Jochen,", "Jochen,");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 5, "Peter", "Jochen", "Flo", "und", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 5, "Peter", "Jochen", "Flo und Georg", "und Georg", "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 2, "Peter, Jochen, Flo", "Jochen, Flo");

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 3, "Peter, Jochen, Flo und", "Jochen, Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 3, "Peter, Jochen, Flo und Georg.", "Jochen, Flo und Georg.",

-            "Flo und Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 12, 6, ",", ",", ",", "und", "und", "und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 6, "Peter,", "Jochen,", "Jochen,", "Flo und", "Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 3, "Peter, Jochen, Flo und", "Jochen, Flo und", "Flo und");

-    RutaTestUtils.assertAnnotationsEquals(cas, 15, 1, "Peter, Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 16, 1, "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 17, 1, "Flo und Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 18, 3, "Peter,", "Jochen,", "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 20, 1, "Peter, Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 21, 1, "Georg.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 22, 1, "Flo und Georg.");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference2Test.java
deleted file mode 100644
index 6b27d5c..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference2Test.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RuleInference2Test {

-

-  

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 8, "References",

-            "Bergmark, D. (2000). Automatic extraction of reference linking information from online docu-",

-            "ments. Technical Report CSTR2000-1821, Cornell Digital Library Research Group.",

-            "Bergmark, D., Phempoonpanich, P., and Zhao, S. (2001). Scraping the ACM digital library.",

-            "SIGIR Forum, 35(2):1–7.",

-            "Berkowitz, E. and Elkhadiri, M. R. (2004). Creation of a style independent intelligent au-",

-            "tonomous citation indexer to support academic research. In Proceedings of the the Fifteenth",

-            "Midwest Artificial Intelligence and Cognitive Science conference MAICS 2004, pages 68–73.");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference3Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference3Test.java
deleted file mode 100644
index 4a67d27..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RuleInference3Test.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RuleInference3Test {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 4, "[1]", "[2]", "[3]", "[4]");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.java
deleted file mode 100644
index dd1dbea..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.resource.ResourceConfigurationException;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.apache.uima.util.InvalidXMLException;
-import org.junit.Test;
-
-/**
- * There was a {@link NullPointerException} when calling
- * {@link org.apache.uima.ruta.type.RutaBasic#getEndAnchors(org.apache.uima.cas.Type)}
- * with a type that is not annotated in the CAS when running on the low memory profile. This
- * test ensures this bug does not come back.
- */
-public class ShiftWithLowMemoryProfileTest {
-  @Test
-  public void testWithLowMemory() throws AnalysisEngineProcessException, InvalidXMLException, ResourceConfigurationException, IOException, URISyntaxException, ResourceInitializationException {
-    String name = this.getClass().getSimpleName();
-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
-    Map<String, Object> parameters = new HashMap<String, Object>();
-    parameters.put(RutaEngine.PARAM_LOW_MEMORY_PROFILE, true);
-
-    CAS cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION,
-            namespace + "/" + name + ".txt", parameters, 50);
-
-
-    Type t = cas.getTypeSystem().getType("org.apache.uima.ruta.type.W");
-    AnnotationIndex<AnnotationFS> ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    FSIterator<AnnotationFS> iterator = ai.iterator();
-    assertEquals("A", iterator.next().getCoveredText());
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/SidestepInComposedTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/SidestepInComposedTest.java
deleted file mode 100644
index 70732d0..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/SidestepInComposedTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class SidestepInComposedTest {

-

-  @Test

-  public void test() {

-    String document = "15. Mai 2005";

-    String script = "\"Mai\" -> T1;";

-    script += "NUM{->T2} PERIOD @T1 NUM;\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "15");

-      

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/StrictImportTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/StrictImportTest.java
deleted file mode 100644
index da04368..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/StrictImportTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.fit.factory.AnalysisEngineFactory;
-import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;
-import org.apache.uima.fit.util.CasUtil;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.util.InvalidXMLException;
-import org.junit.Test;
-
-/**
- * Test the strict import option of {@link org.apache.uima.ruta.engine.RutaEngine}.
- */
-public class StrictImportTest {
-  private final String NAME = this.getClass().getSimpleName();
-  private final String NAMESPACE = this.getClass().getPackage().getName().replaceAll("\\.", "/");
-
-  /**
-   * Create an analysis engine for a Ruta script.
-   *
-   * @param script       Script path.
-   * @param strictImport {@link RutaEngine#PARAM_STRICT_IMPORTS} value.
-   * @return Analysis engine.
-   */
-  private AnalysisEngine createAE(String script, boolean strictImport) throws ResourceInitializationException, IOException, InvalidXMLException {
-    final TypeSystemDescription tsd = TypeSystemDescriptionFactory.createTypeSystemDescription(
-            "org.apache.uima.ruta.BasicTypeSystem",
-            "org.apache.uima.ruta.StrictImportTestTypeSystem");
-    final AnalysisEngineDescription ruta = AnalysisEngineFactory.createEngineDescription(
-            "org.apache.uima.ruta.engine.BasicEngine",
-            RutaEngine.PARAM_MAIN_SCRIPT, script,
-            RutaEngine.PARAM_STRICT_IMPORTS, strictImport);
-
-    tsd.addType(script.replaceAll("/", ".") + ".T1", "Type for Testing", "uima.tcas.Annotation");
-    ruta.getAnalysisEngineMetaData().setTypeSystem(tsd);
-
-    return AnalysisEngineFactory.createEngine(ruta);
-  }
-
-  @Test
-  public void testUndeclaredTypeSystem() throws Exception {
-    CAS cas;
-    AnalysisEngine ae = createAE(NAMESPACE + "/" + NAME + "UndeclaredTypeSystem", true);
-    try {
-      cas = ae.newCAS();
-      cas.setDocumentText("Word");
-      ae.process(cas);
-      fail("MyType should not be resolved in the ruta script because it is not imported.");
-    } catch (AnalysisEngineProcessException e) {
-      // success, the usage of MyType raised an exception because its type system is not imported.
-    } finally {
-      if (ae != null) {
-        ae.destroy();
-      }
-    }
-  }
-
-  @Test
-  public void testUndeclaredTypeSystemWithStrictImportOff() throws Exception {
-    CAS cas;
-    String script = NAMESPACE + "/" + NAME + "UndeclaredTypeSystem";
-    AnalysisEngine ae = createAE(script, false);
-    try {
-      cas = ae.newCAS();
-      cas.setDocumentText("Word");
-      ae.process(cas);
-    } finally {
-      if (ae != null) {
-        ae.destroy();
-      }
-    }
-
-    assertEquals(Arrays.asList("Word"), selectText(cas, "org.apache.uima.ruta.MyType"));
-    assertEquals(Arrays.asList("Word"), selectText(cas, script.replaceAll("/", ".") + ".T1"));
-  }
-
-  @Test
-  public void testDeclaredTypeSystem() throws Exception {
-    CAS cas;
-    String script = NAMESPACE + "/" + NAME + "DeclaredTypeSystem";
-    AnalysisEngine ae = createAE(script, true);
-    try {
-      cas = ae.newCAS();
-      cas.setDocumentText("Word");
-      ae.process(cas);
-    } finally {
-      if (ae != null) {
-        ae.destroy();
-      }
-    }
-
-    assertEquals(Arrays.asList("Word"), selectText(cas, "org.apache.uima.ruta.MyType"));
-    assertEquals(Arrays.asList("Word"), selectText(cas, script.replaceAll("/", ".") + ".T1"));
-  }
-
-  private List<String> selectText(CAS cas, String type) {
-    List<String> values = new ArrayList<String>();
-    for (AnnotationFS annotation : CasUtil.select(cas, cas.getTypeSystem().getType(type))) {
-      values.add(annotation.getCoveredText());
-    }
-
-    return values;
-  }
-}
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/SubAtomicTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/SubAtomicTest.java
deleted file mode 100644
index 0bad8c9..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/SubAtomicTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * 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.ruta;

-

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class SubAtomicTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    complexTypes.put("org.apache.uima.SubAtomic1", "uima.tcas.Annotation");

-    complexTypes.put("org.apache.uima.SubAtomic2", "uima.tcas.Annotation");

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 0);

-    

-    Type type1 = cas.getTypeSystem().getType("org.apache.uima.SubAtomic1");

-    Type type2 = cas.getTypeSystem().getType("org.apache.uima.SubAtomic2");

-    AnnotationFS a1 = cas.createAnnotation(type1, 7, 10);

-    AnnotationFS a2 = cas.createAnnotation(type2, 10, 13);

-    cas.addFsToIndexes(a1);

-    cas.addFsToIndexes(a2);

-    

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, null, null, cas);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "hen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Joc");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Jochen");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/TypeAliasTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/TypeAliasTest.java
deleted file mode 100644
index bed97e6..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/TypeAliasTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertEquals;
-
-import java.net.URL;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.util.XMLInputSource;
-import org.junit.Test;
-
-public class TypeAliasTest {
-
-  @Test
-  public void test() throws Exception {
-    URL url = this.getClass().getResource("TypeAliasTestEngine.xml");
-    AnalysisEngineDescription aed = (AnalysisEngineDescription) UIMAFramework.getXMLParser().parse(
-            new XMLInputSource(url));
-
-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);
-    CAS cas = ae.newCAS();
-    cas.setDocumentText("Peter");
-    ae.process(cas);
-    
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-
-    t = cas.getTypeSystem().getType("org.apache.uima.ruta.TypeAliasTest.T1");
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(2, ai.size());
-    iterator = ai.iterator();
-    assertEquals("Peter", iterator.next().getCoveredText());
-    assertEquals("Peter", iterator.next().getCoveredText());
-    
-    t = cas.getTypeSystem().getType("org.apache.uima.ruta.TypeAliasTest.T2");
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(2, ai.size());
-    iterator = ai.iterator();
-    assertEquals("Peter", iterator.next().getCoveredText());
-    assertEquals("Peter", iterator.next().getCoveredText());
-    
-    t = cas.getTypeSystem().getType("org.apache.uima.ruta.TypeAliasTest.T3");
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(2, ai.size());
-    iterator = ai.iterator();
-    assertEquals("Peter", iterator.next().getCoveredText());
-    assertEquals("Peter", iterator.next().getCoveredText());
-    
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WSDictionaryTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WSDictionaryTest.java
deleted file mode 100644
index 36ebbe0..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WSDictionaryTest.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * 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.ruta;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;
-import org.junit.Test;
-
-public class WSDictionaryTest {
-
-  @Test
-  public void test() {
-    String document = "Peter Kluegl, Marshall Schor, Joern Kottmann\n";
-    document += "PeterKluegl, MarshallSchor, JoernKottmann\n";
-    document += "Peter<x>Kluegl, Marshall<x>Schor, Joern<x>Kottmann\n";
-    String script = "WORDLIST list = 'org/apache/uima/ruta/WSDictionaryTestList.txt';";
-    script += "MARKFAST(T1, list);";
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-    
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 9, "Peter Kluegl", "Marshall Schor", "Joern Kottmann", "PeterKluegl",
-            "MarshallSchor", "JoernKottmann", "Peter<x>Kluegl", "Marshall<x>Schor", "Joern<x>Kottmann");
-
-    cas.release();
-  }
-  
-  @Test
-  public void testDictRemoveWS() {
-    String document = "Peter Kluegl, Marshall Schor, Joern Kottmann\n";
-    document += "PeterKluegl, MarshallSchor, JoernKottmann\n";
-    document += "Peter<x>Kluegl, Marshall<x>Schor, Joern<x>Kottmann\n";
-    String script = "WORDLIST list = 'org/apache/uima/ruta/WSDictionaryTestList.txt';";
-    script += "MARKFAST(T1, list, true, 0, false);";
-    CAS cas = null;
-    Map<String,Object> map = new HashMap<String, Object>();
-    map.put(RutaEngine.PARAM_DICT_REMOVE_WS, true);
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, map);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 9, "Peter Kluegl", "Marshall Schor", "Joern Kottmann", "PeterKluegl",
-            "MarshallSchor", "JoernKottmann", "Peter<x>Kluegl", "Marshall<x>Schor", "Joern<x>Kottmann");
-
-    cas.release();
-  }
-  
-  @Test
-  public void testTableWithWS() {
-    String document = "Peter Kluegl, Marshall Schor, Joern Kottmann\n";
-    document += "PeterKluegl, MarshallSchor, JoernKottmann\n";
-    document += "Peter<x>Kluegl, Marshall<x>Schor, Joern<x>Kottmann\n";
-    String script = "WORDTABLE table = 'org/apache/uima/ruta/table2.csv';";
-    script += "MARKTABLE(Struct, 1, table, true, 0, \"-.,\", 10, \"name\" = 1, \"system\" = 2);";
-    
-    Map<String, String> complexTypes = new TreeMap<String, String>();
-    String typeName = "org.apache.uima.Struct";
-    complexTypes.put(typeName, "uima.tcas.Annotation");
-    
-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();
-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
-    features.put(typeName, list);
-    String fn1 = "name";
-    list.add(new TestFeature(fn1, "", "uima.cas.String"));
-    String fn2 = "system";
-    list.add(new TestFeature(fn2, "", "uima.cas.String"));
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document, complexTypes, features);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-    AnnotationFS next = null;
-    String v1 = null;
-    String v2 = null;
-    t = cas.getTypeSystem().getType(typeName);
-    Feature f1 = t.getFeatureByBaseName(fn1);
-    Feature f2 = t.getFeatureByBaseName(fn2);
-    ai = cas.getAnnotationIndex(t);
-    
-    assertEquals(9, ai.size());
-    iterator = ai.iterator();
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Peter Kluegl", v1);
-    assertEquals("UIMA Ruta", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Marshall Schor", v1);
-    assertEquals("UIMA Core", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Joern Kottmann", v1);
-    assertEquals("CAS Editor", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Peter Kluegl", v1);
-    assertEquals("UIMA Ruta", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Marshall Schor", v1);
-    assertEquals("UIMA Core", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Joern Kottmann", v1);
-    assertEquals("CAS Editor", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Peter Kluegl", v1);
-    assertEquals("UIMA Ruta", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Marshall Schor", v1);
-    assertEquals("UIMA Core", v2);
-    
-    next = iterator.next();
-    v1 = next.getStringValue(f1);
-    v2 = next.getStringValue(f2);
-    assertEquals("Joern Kottmann", v1);
-    assertEquals("CAS Editor", v2);
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard1Test.java
deleted file mode 100644
index e8ed0d7..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard1Test.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class WildCard1Test {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    final String TEXT = "The Ruta language is an imperative rule language extended with scripting elements";

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, cas.getDocumentText());

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "The");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, TEXT + ".");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 8);

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, TEXT);

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 1, TEXT);

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 1, cas.getDocumentText());

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 1, cas.getDocumentText());

-    RutaTestUtils.assertAnnotationsEquals(cas, 9, 2);

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 10, 1, TEXT);

-    RutaTestUtils.assertAnnotationsEquals(cas, 11, 9);

-    RutaTestUtils.assertAnnotationsEquals(cas, 12, 1, TEXT + ".");

-    RutaTestUtils.assertAnnotationsEquals(cas, 13, 8);

-    RutaTestUtils.assertAnnotationsEquals(cas, 14, 1, TEXT + ".");

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 16, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 17, 4, "The", "If", "The", "The");

-    RutaTestUtils.assertAnnotationsEquals(cas, 18, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 19, 8);

-    RutaTestUtils.assertAnnotationsEquals(cas, 20, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 21, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 22, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 23, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 24, 2);

-    RutaTestUtils.assertAnnotationsEquals(cas, 25, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 26, 9);

-    RutaTestUtils.assertAnnotationsEquals(cas, 27, 4);

-    RutaTestUtils.assertAnnotationsEquals(cas, 28, 8);

-    RutaTestUtils.assertAnnotationsEquals(cas, 29, 1);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard2Test.java
deleted file mode 100644
index 1244ba5..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard2Test.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class WildCard2Test {

-

-  @Test

-  public void test() {

-    String document = "Ogren, P.V., Wetzler, P.G., Bethard, S.: ClearTK: A UIMA Toolkit for Statistical Natural Language Processing. In: UIMA for NLP workshop at LREC 08. (2008)";

-    document +="\n";

-    document += "Stephen Soderland, Claire Cardie, and Raymond Mooney. Learning Information Extraction Rules for Semi-Structured and Free Text. In Machine Learning, volume 34, pages 233–272, 1999.";

-    String script = "";

-    script += "RETAINTYPE(BREAK, SPACE);\n";

-    script += "#{-> T6} BREAK #{-> T6};\n";

-    script += "T6{-> TRIM(BREAK, SPACE)};\n";

-    script += "CW{REGEXP(\".\")} PERIOD{->T7};\n";

-    script += "RETAINTYPE;\n";

-    script += "BLOCK(forEach) T6 {}{\n";

-    script += "(# COLON){-> T1} (# PERIOD){-> T2} # \"(\" NUM{REGEXP(\"....\")-> T3} \")\";\n";

-    script += "(#{-CONTAINS(COLON)} PERIOD{-PARTOF(T7)}){-> T1} (# PERIOD){-> T2} # NUM{REGEXP(\"....\")-> T3};\n";

-    script += "}\n";

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "Ogren, P.V., Wetzler, P.G., Bethard, S.:",

-            "Stephen Soderland, Claire Cardie, and Raymond Mooney.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2,

-            "ClearTK: A UIMA Toolkit for Statistical Natural Language Processing.",

-            "Learning Information Extraction Rules for Semi-Structured and Free Text.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "2008", "1999");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard3Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard3Test.java
deleted file mode 100644
index bf08225..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/WildCard3Test.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class WildCard3Test {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor,");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor,");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Peter Kluegl, Joern Kottmann, Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor, and");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 7, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor,");

-    RutaTestUtils.assertAnnotationsEquals(cas, 8, 1, "Peter Kluegl, Joern Kottmann, Marshall Schor, and others.");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/AddFilterTypeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/AddFilterTypeTest.java
deleted file mode 100644
index 31fc58a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/AddFilterTypeTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class AddFilterTypeTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, " text<br/>");

-       

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/AddRetainTypeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/AddRetainTypeTest.java
deleted file mode 100644
index 9fc6096..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/AddRetainTypeTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class AddRetainTypeTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, " text<br/>");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ClearTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ClearTest.java
deleted file mode 100644
index e0ffe0e..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ClearTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ClearTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1);

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1);

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/CreateTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/CreateTest.java
deleted file mode 100644
index cb4f016..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/CreateTest.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-import static org.junit.Assert.assertNotNull;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class CreateTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String typeName = "org.apache.uima.C";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "a";

-    list.add(new TestFeature(fn1, "", "uima.tcas.Annotation"));

-    String fn2 = "b";

-    list.add(new TestFeature(fn2, "", "uima.tcas.Annotation"));

-    String fn3 = "count";

-    list.add(new TestFeature(fn3, "", "uima.cas.Integer"));

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION,

-              namespace + "/" + name + ".txt", 50, false, false, complexTypes, features, namespace

-                      + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-    AnnotationFS next = null;

-    AnnotationFS v1 = null;

-    AnnotationFS v2 = null;

-    t = cas.getTypeSystem().getType(typeName);

-    Feature f1 = t.getFeatureByBaseName(fn1);

-    Feature f2 = t.getFeatureByBaseName(fn2);

-    Feature f3 = t.getFeatureByBaseName(fn3);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    v1 = (AnnotationFS) next.getFeatureValue(f1);

-    v2 = (AnnotationFS) next.getFeatureValue(f2);

-    int intValue = next.getIntValue(f3);

-    assertEquals("A", v1.getCoveredText());

-    assertEquals("B", v2.getCoveredText());

-    assertEquals(2, intValue);

-

-    cas.release();

-  }

-

-  @Test

-  public void testFeature() {

-    String document = "Test.";

-    String script = "";

-    script += "W{-> CREATE(Inner, \"word\" = W)};";

-    script += "Inner{-> CREATE(Source, \"inner\" = Inner)};";

-    script += "Source{-> CREATE(Target, \"word\" = Source.inner.word)};";

-

-    Map<String, String> typeMap = new TreeMap<String, String>();

-    String typeName1 = "Source";

-    typeMap.put(typeName1, "uima.tcas.Annotation");

-    String typeName2 = "Inner";

-    typeMap.put(typeName2, "uima.tcas.Annotation");

-    String typeName3 = "Target";

-    typeMap.put(typeName3, "uima.tcas.Annotation");

-

-    Map<String, List<TestFeature>> featureMap = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    featureMap.put(typeName1, list);

-    String fn1 = "inner";

-    list.add(new TestFeature(fn1, "", typeName2));

-

-    list = new ArrayList<RutaTestUtils.TestFeature>();

-    featureMap.put(typeName2, list);

-

-    String fn2 = "word";

-    list.add(new TestFeature(fn2, "", "uima.tcas.Annotation"));

-

-    list = new ArrayList<RutaTestUtils.TestFeature>();

-    featureMap.put(typeName3, list);

-

-    String fn3 = "word";

-    list.add(new TestFeature(fn3, "", "uima.tcas.Annotation"));

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document, typeMap, featureMap);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    t = cas.getTypeSystem().getType(typeName3);

-    Feature f3 = t.getFeatureByBaseName(fn3);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    AnnotationFS next = iterator.next();

-    FeatureStructure fv1 = next.getFeatureValue(f3);

-    assertNotNull(fv1);

-

-    assertEquals("Test", ((AnnotationFS) fv1).getCoveredText());

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/FillTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/FillTest.java
deleted file mode 100644
index 8f207c5..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/FillTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class FillTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String type = "org.apache.uima.LanguageStorage";

-    complexTypes.put(type, "uima.tcas.DocumentAnnotation");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    t = cas.getTypeSystem().getType(type);

-    ai = cas.getAnnotationIndex(t);

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    AnnotationFS afs = iterator.next();

-    Feature featureByBaseName = t.getFeatureByBaseName("language");

-    String stringValue = afs.getStringValue(featureByBaseName);

-    assertEquals("en", stringValue);

-   

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/FilterTypeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/FilterTypeTest.java
deleted file mode 100644
index d01727b..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/FilterTypeTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class FilterTypeTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-   

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, " text<br/>");

-   

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GatherTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GatherTest.java
deleted file mode 100644
index 8a6605a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GatherTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class GatherTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String typeName = "org.apache.uima.C";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "a";

-    list.add(new TestFeature(fn1, "", "uima.tcas.Annotation"));

-    String fn2 = "b";

-    list.add(new TestFeature(fn2, "", "uima.tcas.Annotation"));

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION,

-              namespace + "/" + name + ".txt", 50, false, false, complexTypes, features, namespace

-                      + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-    AnnotationFS next = null;

-    AnnotationFS v1 = null;

-    AnnotationFS v2 = null;

-    t = cas.getTypeSystem().getType(typeName);

-    Feature f1 = t.getFeatureByBaseName(fn1);

-    Feature f2 = t.getFeatureByBaseName(fn2);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    v1 = (AnnotationFS) next.getFeatureValue(f1);

-    v2 = (AnnotationFS) next.getFeatureValue(f2);

-    assertEquals("A", v1.getCoveredText());

-    assertEquals("B", v2.getCoveredText());

-

-    cas.release();

-  }

-

-  @Test

-  public void testOptionalMatch() {

-    String document = "A X C";

-    String script = "";

-    script += "W{REGEXP(\"A\")->MARK(T1)};";

-    script += "W{REGEXP(\"B\")->MARK(T2)};";

-    script += "T1 T2?{-> GATHER(C, 1, 2, \"a\" = 1, \"b\" = 2)};";

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String typeName = "org.apache.uima.C";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "a";

-    list.add(new TestFeature(fn1, "", "uima.tcas.Annotation"));

-    String fn2 = "b";

-    list.add(new TestFeature(fn2, "", "uima.tcas.Annotation"));

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document, complexTypes, features);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-    AnnotationFS next = null;

-    AnnotationFS v1 = null;

-    AnnotationFS v2 = null;

-    t = cas.getTypeSystem().getType(typeName);

-    Feature f1 = t.getFeatureByBaseName(fn1);

-    Feature f2 = t.getFeatureByBaseName(fn2);

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    v1 = (AnnotationFS) next.getFeatureValue(f1);

-    v2 = (AnnotationFS) next.getFeatureValue(f2);

-    assertEquals("A", v1.getCoveredText());

-    assertEquals(null, v2);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetFeatureTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetFeatureTest.java
deleted file mode 100644
index 6f07b7d..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetFeatureTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class GetFeatureTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetListTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetListTest.java
deleted file mode 100644
index f737374..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetListTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class GetListTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1);

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1);

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1);

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetTest.java
deleted file mode 100644
index ecabad8..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/GetTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class GetTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Only");

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ImplicitActionTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ImplicitActionTest.java
deleted file mode 100644
index 6dccd73..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ImplicitActionTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*

- * 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.ruta.action;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.FeatureMatch1Test;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class ImplicitActionTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    Map<String, String> complexTypes = new HashMap<String, String>();

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    String typeNameA = "org.apache.uima.ruta.FeatureMatchTest.A";

-    String typeNameB = "org.apache.uima.ruta.FeatureMatchTest.B";

-    String typeNameC = "org.apache.uima.ruta.FeatureMatchTest.C";

-    String typeNameD = "org.apache.uima.ruta.FeatureMatchTest.D";

-    complexTypes.put(typeNameA, "uima.tcas.Annotation");

-    complexTypes.put(typeNameB, typeNameD);

-    complexTypes.put(typeNameC, typeNameD);

-    complexTypes.put(typeNameD, "uima.tcas.Annotation");

-    List<TestFeature> listA = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameA, listA);

-    String fnab = "ab";

-    listA.add(new TestFeature(fnab, "", typeNameB));

-    String fnac = "ac";

-    listA.add(new TestFeature(fnac, "", typeNameC));

-    List<TestFeature> listB = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameB, listB);

-    String fnbc = "bc";

-    listB.add(new TestFeature(fnbc, "", typeNameC));

-    List<TestFeature> listC = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameC, listC);

-    String fnci = "ci";

-    listC.add(new TestFeature(fnci, "", "uima.cas.Integer"));

-    String fncb = "cb";

-    listC.add(new TestFeature(fncb, "", "uima.cas.Boolean"));

-    List<TestFeature> listD = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameD, listD);

-    String fnds = "ds";

-    listD.add(new TestFeature(fnds, "", "uima.cas.String"));

-

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION,

-              FeatureMatch1Test.class.getName().replaceAll("\\.", "/") +".txt", 50, false, false, complexTypes, features, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }    

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Peter Kluegl", "Joern Kottmann", "Marshall Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "Peter", "Joern", "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "Peter", "Joern", "Marshall");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 3, "Peter", "Joern", "Marshall");

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkFastTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkFastTest.java
deleted file mode 100644
index dfc11d9..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkFastTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MarkFastTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, null, namespace + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "1 0 0", "100", "2 0 0");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "100");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "1 0 0", "2 0 0");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkFirstActionTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkFirstActionTest.java
deleted file mode 100644
index e4d517b..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkFirstActionTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MarkFirstActionTest {

-

-  @Test

-  public void test() {

-    String document = "Peter Kluegl, Joern Kottmann, Marshall Schor.";

-    String script = "MARKFIRST(T1);\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Peter");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkLastTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkLastTest.java
deleted file mode 100644
index 701eebb..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkLastTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MarkLastTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "text");

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkOnceTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkOnceTest.java
deleted file mode 100644
index 3667026..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkOnceTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MarkOnceTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "only", "some", "text");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "only some text");    

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkScoreTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkScoreTest.java
deleted file mode 100644
index 23870c2..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkScoreTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MarkScoreTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "Like a Headline:","Headline");

-        

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkTableTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkTableTest.java
deleted file mode 100644
index 9886238..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkTableTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class MarkTableTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String typeName = "org.apache.uima.Person";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-    

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "firstname";

-    list.add(new TestFeature(fn1, "", "uima.cas.String"));

-    String fn2 = "system";

-    list.add(new TestFeature(fn2, "", "uima.cas.String"));

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, features, namespace + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-    AnnotationFS next = null;

-    String v1 = null;

-    String v2 = null;

-    t = cas.getTypeSystem().getType(typeName);

-    Feature f1 = t.getFeatureByBaseName(fn1);

-    Feature f2 = t.getFeatureByBaseName(fn2);

-    ai = cas.getAnnotationIndex(t);

-    

-    assertEquals(6, ai.size());

-    iterator = ai.iterator();

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Peter", v1);

-    assertEquals("Ruta", v2);

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Marshall", v1);

-    assertEquals("UIMA", v2);

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Joern", v1);

-    assertEquals("CAS Editor", v2);

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Peter", v1);

-    assertEquals("Ruta", v2);

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Marshall", v1);

-    assertEquals("UIMA", v2);

-    

-    next = iterator.next();

-    v1 = next.getStringValue(f1);

-    v2 = next.getStringValue(f2);

-    assertEquals("Joern", v1);

-    assertEquals("CAS Editor", v2);    

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkTest.java
deleted file mode 100644
index 36061e4..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MarkTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MarkTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "only", "some", "text");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "only some text");

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MatchedTextTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MatchedTextTest.java
deleted file mode 100644
index 8569218..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MatchedTextTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MatchedTextTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1);

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MergeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MergeTest.java
deleted file mode 100644
index ecea14c..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/MergeTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MergeTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1);

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1);

-

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveDuplicateTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveDuplicateTest.java
deleted file mode 100644
index 6c67bf2..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveDuplicateTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RemoveDuplicateTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1);

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveFilterTypeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveFilterTypeTest.java
deleted file mode 100644
index 33cf366..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveFilterTypeTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RemoveFilterTypeTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "some text");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveRetainTypeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveRetainTypeTest.java
deleted file mode 100644
index 81f716d..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveRetainTypeTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RemoveRetainTypeTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, " text<br/>");

-       

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveTest.java
deleted file mode 100644
index 413f7a3..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RemoveTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RemoveTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ReplaceTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ReplaceTest.java
deleted file mode 100644
index 93e33f2..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/ReplaceTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ReplaceTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    t = cas.getTypeSystem().getType(RutaEngine.BASIC_TYPE);

-    ai = cas.getAnnotationIndex(t);

-    iterator = ai.iterator();

-    iterator.moveToLast();

-    AnnotationFS afs = iterator.get();

-    Feature feature = t.getFeatureByBaseName("replacement");

-    String stringValue = afs.getStringValue(feature);

-    assertEquals("MARKUP", stringValue);

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RetainTypeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RetainTypeTest.java
deleted file mode 100644
index 47ebf87..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/RetainTypeTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RetainTypeTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-        

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, " some"," text");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "text<br/>");

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/SetFeatureTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/SetFeatureTest.java
deleted file mode 100644
index 431d51a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/SetFeatureTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class SetFeatureTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String type = "org.apache.uima.LanguageStorage";

-    complexTypes.put(type, "uima.tcas.DocumentAnnotation");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    t = cas.getTypeSystem().getType(type);

-    ai = cas.getAnnotationIndex(t);

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    AnnotationFS afs = iterator.next();

-    Feature featureByBaseName = t.getFeatureByBaseName("language");

-    String stringValue = afs.getStringValue(featureByBaseName);

-    assertEquals("en", stringValue);

-   

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Shift1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Shift1Test.java
deleted file mode 100644
index fbbaa49..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Shift1Test.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class Shift1Test {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "only some text<br/>");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Shift2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Shift2Test.java
deleted file mode 100644
index dccfabf..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Shift2Test.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class Shift2Test {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    

-    Map<String, String> complexTypes = new HashMap<String, String>();

-    String typeName = "org.apache.uima.FS";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-    

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "doc";

-    list.add(new TestFeature(fn1, "", "uima.tcas.Annotation"));

-    String fn2 = "lang";

-    list.add(new TestFeature(fn2, "", "uima.cas.String"));

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, features, namespace + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    Type type = cas.getTypeSystem().getType(typeName);

-    Feature f1 = type.getFeatureByBaseName(fn1);

-    Feature f2 = type.getFeatureByBaseName(fn2);

-    ai = cas.getAnnotationIndex(type);

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    AnnotationFS next = iterator.next();

-    AnnotationFS v1 = (AnnotationFS) next.getFeatureValue(f1);

-    String v2 = next.getStringValue(f2); 

-    assertEquals("only some text<br/>", v1.getCoveredText());

-    assertEquals("unknown", v2);

-    assertEquals("only some text", next.getCoveredText());

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Transfer2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Transfer2Test.java
deleted file mode 100644
index 3d3eb1a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/Transfer2Test.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.ruta.action;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;
-import org.junit.Test;
-
-public class Transfer2Test {
-
-  @Test
-  public void test() {
-    String document = "Visa.";
-    String script = "";
-    script += "DECLARE Annotation CardType(STRING cardName, STRING cardType);\n";
-    script += "DECLARE Annotation BigAnnotation( STRING laonName, STRING loanType, STRING cardName, STRING cardType);\n";
-    script += "\"Visa\" -> CardType (\"cardName\" = \"Peter\", \"cardType\" = \"Visa\");\n";
-    script += "CardType{->TRANSFER(BigAnnotation)};";
-    
-    Map<String, String> typeMap = new TreeMap<String, String>();
-    String typeName1 = "CardType";
-    typeMap.put(typeName1, "uima.tcas.Annotation");
-    String typeName2 = "BigAnnotation";
-    typeMap.put(typeName2, "uima.tcas.Annotation");
-    
-    Map<String, List<TestFeature>> featureMap = new TreeMap<String, List<TestFeature>>();
-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
-    featureMap.put(typeName1, list);
-    String fn1 = "cardName";
-    list.add(new TestFeature(fn1, "", "uima.cas.String"));
-    String fn2 = "cardType";
-    list.add(new TestFeature(fn2, "", "uima.cas.String"));
-    
-    list = new ArrayList<RutaTestUtils.TestFeature>();
-    featureMap.put(typeName2, list);
-    list.add(new TestFeature(fn1, "", "uima.cas.String"));
-    list.add(new TestFeature(fn2, "", "uima.cas.String"));
-    String fn3 = "laonName";
-    list.add(new TestFeature(fn3, "", "uima.cas.String"));
-    String fn4 = "loanType";
-    list.add(new TestFeature(fn4, "", "uima.cas.String"));
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document, typeMap, featureMap);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-    
-    t = cas.getTypeSystem().getType(typeName2);
-    Feature f1 = t.getFeatureByBaseName(fn1);
-    Feature f2 = t.getFeatureByBaseName(fn2);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    AnnotationFS next = iterator.next();
-    assertEquals("Peter", next.getStringValue(f1));
-    assertEquals("Visa", next.getStringValue(f2));
-    
-    if (cas != null) {
-      cas.release();
-    }
-
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TransferTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TransferTest.java
deleted file mode 100644
index 1b7fc55..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TransferTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class TransferTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String type = "org.apache.uima.LanguageStorage";

-    complexTypes.put(type, "uima.tcas.DocumentAnnotation");

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    t = cas.getTypeSystem().getType(type);

-    ai = cas.getAnnotationIndex(t);

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    AnnotationFS afs = iterator.next();

-    Feature featureByBaseName = t.getFeatureByBaseName("language");

-    String stringValue = afs.getStringValue(featureByBaseName);

-    assertEquals("x-unspecified", stringValue);

-   

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TrieTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TrieTest.java
deleted file mode 100644
index 2f422bf..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TrieTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*

- * 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.ruta.action;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class TrieTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-

-    for (String scriptname : new String[] { name, name + "_compressed" }) {

-

-      CAS cas = null;

-      try {

-        cas = RutaTestUtils.process(

-                namespace + "/" + scriptname + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/"

-                        + name + ".txt", 50, false, false, null, namespace + "/");

-      } catch (Exception e) {

-        e.printStackTrace();

-        assert (false);

-      }

-      

-      RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Peter", "Marshall", "Joern");

-      RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "Kluegl", "Schor", "Kottmann");

-      RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "Peter Kluegl", "Marshall Schor", "Joern Kottmann");

-      RutaTestUtils.assertAnnotationsEquals(cas, 4, 3, "Peter Kluegl: Ruta", "Marshall Schor: UIMA",

-              "Joern Kottmann: CAS Editor");

-

-      cas.release();

-    }

-  }

-

-  @Test

-  public void testWithFeature() {

-    String name = this.getClass().getSimpleName() + "WithFeature";

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    Map<String, String> complexTypes = new HashMap<String, String>();

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    String typeNameA = "org.apache.uima.ruta.A";

-    String typeNameB = "org.apache.uima.ruta.B";

-    String typeNameC = "org.apache.uima.ruta.C";

-    complexTypes.put(typeNameA, "uima.tcas.Annotation");

-    complexTypes.put(typeNameB, "uima.tcas.Annotation");

-    complexTypes.put(typeNameC, "uima.tcas.Annotation");

-    List<TestFeature> listA = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameA, listA);

-    String fnab = "a";

-    listA.add(new TestFeature(fnab, "", "uima.cas.String"));

-    List<TestFeature> listB = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameB, listB);

-    String fnbc = "b";

-    listB.add(new TestFeature(fnbc, "", "uima.cas.Boolean"));

-    List<TestFeature> listC = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameC, listC);

-    String fnci = "c";

-    listC.add(new TestFeature(fnci, "", "uima.cas.Integer"));

-

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION,

-              namespace + "/" + this.getClass().getSimpleName() + ".txt", 50, false, false,

-              complexTypes, features, namespace + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    Type t = null;

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-    AnnotationFS next = null;

-    Feature feature = null;

-

-    t = cas.getTypeSystem().getType(typeNameA);

-    feature = t.getFeatureByBaseName("a");

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(3, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    assertEquals("Peter", next.getCoveredText());

-    assertEquals("first", next.getStringValue(feature));

-    next = iterator.next();

-    assertEquals("Marshall", next.getCoveredText());

-    assertEquals("first", next.getStringValue(feature));

-    next = iterator.next();

-    assertEquals("Joern", next.getCoveredText());

-    assertEquals("first", next.getStringValue(feature));

-

-    t = cas.getTypeSystem().getType(typeNameB);

-    feature = t.getFeatureByBaseName("b");

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(3, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    assertEquals("Kluegl", next.getCoveredText());

-    assertEquals(true, next.getBooleanValue(feature));

-    next = iterator.next();

-    assertEquals("Schor", next.getCoveredText());

-    assertEquals(true, next.getBooleanValue(feature));

-    next = iterator.next();

-    assertEquals("Kottmann", next.getCoveredText());

-    assertEquals(true, next.getBooleanValue(feature));

-

-    t = cas.getTypeSystem().getType(typeNameC);

-    feature = t.getFeatureByBaseName("c");

-    ai = cas.getAnnotationIndex(t);

-    assertEquals(3, ai.size());

-    iterator = ai.iterator();

-    next = iterator.next();

-    assertEquals("Peter Kluegl", next.getCoveredText());

-    assertEquals(6, next.getIntValue(feature));

-    next = iterator.next();

-    assertEquals("Marshall Schor", next.getCoveredText());

-    assertEquals(6, next.getIntValue(feature));

-    next = iterator.next();

-    assertEquals("Joern Kottmann", next.getCoveredText());

-    assertEquals(6, next.getIntValue(feature));

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TrimTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TrimTest.java
deleted file mode 100644
index b06c764..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/TrimTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class TrimTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "some text");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "some text");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "some text");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/UnmarkAllTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/UnmarkAllTest.java
deleted file mode 100644
index 5889ab1..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/UnmarkAllTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class UnmarkAllTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Some");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 6, "Some", "text", "for", "some", "test", ".");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/UnmarkTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/UnmarkTest.java
deleted file mode 100644
index 21fb2f6..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/action/UnmarkTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.action;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class UnmarkTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/AfterTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/AfterTest.java
deleted file mode 100644
index 0f2bb29..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/AfterTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class AfterTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, ".", ".");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 8, "So", "every", "word", "from", "here", "on", "is", "marked");

-    RutaTestUtils

-            .assertAnnotationsEquals(cas, 3, 9, "dot", "So", "every", "word", "from", "here", "on", "is", "marked");

-    RutaTestUtils

-            .assertAnnotationsEquals(cas, 4, 9, "dot", "So", "every", "word", "from", "here", "on", "is", "marked");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/AndTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/AndTest.java
deleted file mode 100644
index 155507c..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/AndTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class AndTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "This is a malformed text", "But others have many of them",

-            "Like this one that is written to test the AND Condition of Ruta");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "some sentences do not start with a capital word");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 4, "This", "some", "But", "Like");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 3, "This", "But", "Like");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "some");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/BeforeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/BeforeTest.java
deleted file mode 100644
index 977b895..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/BeforeTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class BeforeTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "To mark everything before a special annotation");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "To mark everything before a special annotation",

-            "you need the BEFORE condition of Ruta");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "To mark everything before a special annotation",

-            "you need the BEFORE condition of Ruta");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ContainsTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ContainsTest.java
deleted file mode 100644
index 9e3eb99..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ContainsTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ContainsTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "A single sentence", "And here is another one",

-            "Testing the CONTAINS condition of Ruta");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "A single sentence", "And here is another one",

-            "Testing the CONTAINS condition of Ruta");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Testing the CONTAINS condition of Ruta");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "A single sentence", "Testing the CONTAINS condition of Ruta");

-

-    // TODO CONTAINS with RutaExpression?

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ContextCountTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ContextCountTest.java
deleted file mode 100644
index 9807f6b..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ContextCountTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ContextCountTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "A single sentence", "And here is another one",

-            "Testing the CONTEXTCOUNT condition of Ruta System");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 4, "A", "And", "Testing", "Ruta");

-

-    Type t = RutaTestUtils.getTestType(cas, 3);

-    AnnotationIndex<AnnotationFS> ai = cas.getAnnotationIndex(t);

-    assertEquals(1, ai.size());

-    FSIterator<AnnotationFS> iterator = ai.iterator();

-    assertEquals("A single sentence." + "And here is another one."

-            + "Testing the CONTEXTCOUNT condition of Ruta System.",

-            iterator.next().getCoveredText().replaceAll("[\n\r]", ""));

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/CountTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/CountTest.java
deleted file mode 100644
index ccad8f9..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/CountTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class CountTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "A single sentence", "And here is another one",

-            "Testing the COUNT condition of Ruta System");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Testing the COUNT condition of Ruta System");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Testing the COUNT condition of Ruta System");

-    

-    cas.release();    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/CurrentCountTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/CurrentCountTest.java
deleted file mode 100644
index b3e70cd..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/CurrentCountTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class CurrentCountTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "and");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Georg");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Flo");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/EndsWithTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/EndsWithTest.java
deleted file mode 100644
index 555163a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/EndsWithTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class EndsWithTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "A single sentence!", "And here is another one?",

-            "Testing the ENDSWITH condition of Ruta.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Testing the ENDSWITH condition of Ruta.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "A single sentence!", "Testing the ENDSWITH condition of Ruta.");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/FeatureTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/FeatureTest.java
deleted file mode 100644
index 6604d5a..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/FeatureTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class FeatureTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    String typeName = "org.apache.uima.FS";

-    complexTypes.put(typeName, "uima.tcas.Annotation");

-    

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeName, list);

-    String fn1 = "string";

-    list.add(new TestFeature(fn1, "", "uima.cas.String"));

-    String fn2 = "double";

-    list.add(new TestFeature(fn2, "", "uima.cas.Double"));

-    String fn3 = "int";

-    list.add(new TestFeature(fn3, "", "uima.cas.Integer"));

-    String fn4 = "boolean";

-    list.add(new TestFeature(fn4, "", "uima.cas.Boolean"));

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, features, namespace + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Testing FEATURE condition.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Testing FEATURE condition.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Testing FEATURE condition.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Testing FEATURE condition.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/IfTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/IfTest.java
deleted file mode 100644
index 0b0b1ad..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/IfTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class IfTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Will this text be annotated?");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Will this text be annotated?");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ImplicitCondition1Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ImplicitCondition1Test.java
deleted file mode 100644
index 77356e2..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ImplicitCondition1Test.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.FeatureMatch1Test;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;

-import org.junit.Test;

-

-public class ImplicitCondition1Test {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    CAS cas = null;

-    Map<String, String> complexTypes = new HashMap<String, String>();

-    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();

-    String typeNameA = "org.apache.uima.ruta.FeatureMatchTest.A";

-    String typeNameB = "org.apache.uima.ruta.FeatureMatchTest.B";

-    String typeNameC = "org.apache.uima.ruta.FeatureMatchTest.C";

-    String typeNameD = "org.apache.uima.ruta.FeatureMatchTest.D";

-    complexTypes.put(typeNameA, "uima.tcas.Annotation");

-    complexTypes.put(typeNameB, typeNameD);

-    complexTypes.put(typeNameC, typeNameD);

-    complexTypes.put(typeNameD, "uima.tcas.Annotation");

-    List<TestFeature> listA = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameA, listA);

-    String fnab = "ab";

-    listA.add(new TestFeature(fnab, "", typeNameB));

-    String fnac = "ac";

-    listA.add(new TestFeature(fnac, "", typeNameC));

-    List<TestFeature> listB = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameB, listB);

-    String fnbc = "bc";

-    listB.add(new TestFeature(fnbc, "", typeNameC));

-    List<TestFeature> listC = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameC, listC);

-    String fnci = "ci";

-    listC.add(new TestFeature(fnci, "", "uima.cas.Integer"));

-    String fncb = "cb";

-    listC.add(new TestFeature(fncb, "", "uima.cas.Boolean"));

-    List<TestFeature> listD = new ArrayList<RutaTestUtils.TestFeature>();

-    features.put(typeNameD, listD);

-    String fnds = "ds";

-    listD.add(new TestFeature(fnds, "", "uima.cas.String"));

-

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION,

-              FeatureMatch1Test.class.getName().replaceAll("\\.", "/") +".txt", 50, false, false, complexTypes, features, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Marshall Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "Peter Kluegl", "Joern Kottmann", "Marshall Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, "Peter Kluegl", "Joern Kottmann", "Marshall Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Joern Kottmann");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 3, "Peter Kluegl", "Joern Kottmann", "Marshall Schor");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ImplicitCondition2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ImplicitCondition2Test.java
deleted file mode 100644
index 169503b..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ImplicitCondition2Test.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ImplicitCondition2Test {

-

-  @Test

-  public void test() {

-    String document = "Peter Kluegl, Joern Kottmann, Marshall Schor.";

-    String script = "";

-    script += "CW{CW.begin<=14 -> T1};\n";

-    script += "CW{CW.begin<14-> T2};\n";

-    script += "CW{CW.begin==0-> T3};\n";

-    script += "CW{CW.begin!=0-> T4};\n";

-    script += "CW{CW.begin>=20-> T5};\n";

-    script += "CW{CW.begin>20-> T6};\n";

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      Ruta.apply(cas, script);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Peter", "Kluegl", "Joern");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "Peter", "Kluegl");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Peter");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 5, "Kluegl", "Joern", "Kottmann", "Marshall", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 3, "Kottmann", "Marshall", "Schor");

-    RutaTestUtils.assertAnnotationsEquals(cas, 6, 2, "Marshall", "Schor");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/InListTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/InListTest.java
deleted file mode 100644
index ad73019..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/InListTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class InListTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, null, namespace + "/");

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "INLIST", "condition");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "INLIST");

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/IsTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/IsTest.java
deleted file mode 100644
index a8ffe84..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/IsTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class IsTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 4, ":", ":", ":", ":");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, ",", ".", ".");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 3, ",", ".", ".");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/LastTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/LastTest.java
deleted file mode 100644
index 3e82eca..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/LastTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class LastTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Some different sentences.",

-            "But which of them end with an exclamation mark?", "This we can test with the LAST condition!");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "This we can test with the LAST condition!");

-      

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/MOfNTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/MOfNTest.java
deleted file mode 100644
index 4481b8f..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/MOfNTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class MOfNTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "MOFN", "MOFN");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "MOFN Condition");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "Condition", "MOFN");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/NearTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/NearTest.java
deleted file mode 100644
index 5b9f3bb..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/NearTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class NearTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "test");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "The", "NEAR", "test");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "the");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 5, "the", "NEAR", "condition", "evaluates", "true");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/NotTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/NotTest.java
deleted file mode 100644
index c2c233d..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/NotTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class NotTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1,

-            "To negate the meaning of a condition, simply write \"-\" before it");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "NOT", "Condition");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/OrTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/OrTest.java
deleted file mode 100644
index f4ce6a4..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/OrTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class OrTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "The OR Test");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 3, "OR", "Test", "OR");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 4, "The", "OR", "Test", "OR");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ParseTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ParseTest.java
deleted file mode 100644
index 1fca612..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ParseTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ParseTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 5, "42", "2", "1", "2", "3");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "2,1");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "true");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 5, "A Boolean b that is true", "b = false", "The Number 42",

-            "The Double d = 2,1", "Another Double that is 2.3");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfNEQ2Test.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfNEQ2Test.java
deleted file mode 100644
index d706c4c..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfNEQ2Test.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.ruta.condition;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.engine.Ruta;
-import org.apache.uima.ruta.engine.RutaTestUtils;
-import org.junit.Test;
-
-public class PartOfNEQ2Test {
-
-  @Test
-  public void test() {
-    String document = "> 51%";
-    String script = "";
-    script += "\"> 51%\" -> Leaf1;\n";
-    script += "\"51%\" -> Leaf2;\n";
-    script += "Base{PARTOFNEQ(Base) -> UNMARK(Base)};\n";
-    
-    Map<String, String> complexTypes = new TreeMap<String, String>();
-    String typeName1 = "uima.ruta.Base";
-    complexTypes.put(typeName1, "uima.tcas.Annotation");
-    String typeName2 = "uima.ruta.Leaf1";
-    complexTypes.put(typeName2, typeName1);
-    String typeName3 = "uima.ruta.Leaf2";
-    complexTypes.put(typeName3, typeName1);
-    
-    CAS cas = null;
-    try {
-      cas = RutaTestUtils.getCAS(document, complexTypes, null);
-      Ruta.apply(cas, script);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-    Type t = null;
-    AnnotationIndex<AnnotationFS> ai = null;
-    FSIterator<AnnotationFS> iterator = null;
-    
-    t = cas.getTypeSystem().getType(typeName1);
-    ai = cas.getAnnotationIndex(t);
-    assertEquals(1, ai.size());
-    iterator = ai.iterator();
-    assertEquals("> 51%", iterator.next().getCoveredText());
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfNEQTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfNEQTest.java
deleted file mode 100644
index 0b52112..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfNEQTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class PartOfNEQTest {

-

-  @Test

-  public void test() {

-    

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "Vitamine", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "Vitamine", "A");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfTest.java
deleted file mode 100644
index 77fe622..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PartOfTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import java.util.Map;

-import java.util.TreeMap;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class PartOfTest {

-

-  @Test

-  public void test() {

-    String name = this.getClass().getSimpleName();

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    Map<String, String> complexTypes = new TreeMap<String, String>();

-    complexTypes.put("org.apache.uima.WithInitial", "uima.tcas.Annotation");

-    complexTypes.put("org.apache.uima.Initial", "uima.tcas.Annotation");

-    complexTypes.put("org.apache.uima.WithInitialEnd", "org.apache.uima.WithInitial");

-

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name

-              + ".txt", 50, false, false, complexTypes, null);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "Vitamine", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "Vitamine", "A");

-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, "Vitamine", "A");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PositionTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PositionTest.java
deleted file mode 100644
index 96b6134..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/PositionTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class PositionTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, ".");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, ",");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/RegExpTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/RegExpTest.java
deleted file mode 100644
index 4001ca0..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/RegExpTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class RegExpTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Use REGEXP to match annotations on different patterns.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "Use REGEXP to match annotations on different patterns.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "annotations");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ScoreTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ScoreTest.java
deleted file mode 100644
index 8b8076f..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/ScoreTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class ScoreTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "Score", "Condition", "As");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "Condition", "As");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Score");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/SizeTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/SizeTest.java
deleted file mode 100644
index f0e35f9..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/SizeTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class SizeTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "SIZE");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "SIZE");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "SIZE");

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/StartsWithTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/StartsWithTest.java
deleted file mode 100644
index 4dc1cc7..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/StartsWithTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class StartsWithTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "This");

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "This text starts with \"This\".");

-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "This text starts with \"This\".");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/TotalCountTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/TotalCountTest.java
deleted file mode 100644
index 77600db..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/TotalCountTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class TotalCountTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-    

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "To count the number of annotations within a given annotation,"

-            + " use the TOTALCOUNT condition.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "To count the number of annotations within a given annotation,"

-            + " use the TOTALCOUNT condition.");

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/VoteTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/VoteTest.java
deleted file mode 100644
index 605561f..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/condition/VoteTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.condition;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.junit.Test;

-

-public class VoteTest {

-

-  @Test

-  public void test() {

-

-    CAS cas = RutaTestUtils.processTestScript(this.getClass());

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Use the VOTE Condition, to compare the number of occurrences"

-            + " of two different annotations.");

-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/descriptor/GenerateDescriptorTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/descriptor/GenerateDescriptorTest.java
deleted file mode 100644
index 10f4f62..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/descriptor/GenerateDescriptorTest.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * 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.ruta.descriptor;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.ResourceManager;
-import org.apache.uima.resource.impl.ResourceManager_impl;
-import org.apache.uima.resource.metadata.ConfigurationParameterSettings;
-import org.apache.uima.resource.metadata.FeatureDescription;
-import org.apache.uima.resource.metadata.TypeDescription;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.engine.HtmlAnnotator;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.util.InvalidXMLException;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class GenerateDescriptorTest {
-
-  private static URL basicAEUrl;
-
-  private static URL basicTSUrl;
-
-  @BeforeClass
-  public static void setUpClass() {
-    basicAEUrl = HtmlAnnotator.class.getClassLoader().getResource("BasicEngine.xml");
-    if (basicAEUrl == null) {
-      basicAEUrl = HtmlAnnotator.class.getClassLoader().getResource(
-              "org/apache/uima/ruta/engine/BasicEngine.xml");
-    }
-
-    basicTSUrl = HtmlAnnotator.class.getClassLoader().getResource("BasicTypeSystem.xml");
-    if (basicTSUrl == null) {
-      basicTSUrl = HtmlAnnotator.class.getClassLoader().getResource(
-              "org/apache/uima/ruta/engine/BasicTypeSystem.xml");
-    }
-  }
-
-  @Test
-  public void testCreateAnalysisEngineDescription() throws InvalidXMLException, IOException,
-          RecognitionException, URISyntaxException {
-    String script = "";
-    script += "PACKAGE test.package;\n";
-    script += "ENGINE org.apache.uima.ruta.engine.HtmlAnnotator;\n";
-    script += "UIMAFIT org.apache.uima.ruta.engine.PlainTextAnnotator;\n";
-    script += "SCRIPT org.apache.uiima.ruta.Additional;\n";
-
-    RutaDescriptorFactory rdf = new RutaDescriptorFactory(basicTSUrl, basicAEUrl);
-    RutaDescriptorInformation descriptorInformation = rdf.parseDescriptorInformation(script);
-    RutaBuildOptions options = new RutaBuildOptions();
-    String typeSystemOutput = new File(basicTSUrl.toURI()).getAbsolutePath();
-    ClassLoader classLoader = GenerateDescriptorTest.class.getClassLoader();
-    AnalysisEngineDescription aed = rdf.createAnalysisEngineDescription(typeSystemOutput,
-            descriptorInformation, options, null, null, null, classLoader);
-
-    ConfigurationParameterSettings cps = aed.getAnalysisEngineMetaData()
-            .getConfigurationParameterSettings();
-
-    String mainScript = (String) cps.getParameterValue(RutaEngine.PARAM_MAIN_SCRIPT);
-    assertEquals("test.package.Anonymous", mainScript);
-    
-    String[] additionalEngines = (String[]) cps.getParameterValue(RutaEngine.PARAM_ADDITIONAL_ENGINES);
-    assertNotNull(additionalEngines);
-    assertEquals("org.apache.uima.ruta.engine.HtmlAnnotator", additionalEngines[0]);
-    
-    String[] additionalUimafitEngines = (String[]) cps.getParameterValue(RutaEngine.PARAM_ADDITIONAL_UIMAFIT_ENGINES);
-    assertNotNull(additionalUimafitEngines);
-    assertEquals("org.apache.uima.ruta.engine.PlainTextAnnotator", additionalUimafitEngines[0]);
-    
-    String[] additionalScripts = (String[]) cps.getParameterValue(RutaEngine.PARAM_ADDITIONAL_SCRIPTS);
-    assertNotNull(additionalScripts);
-    assertEquals("org.apache.uiima.ruta.Additional", additionalScripts[0]);
-    
-  }
-
-  @Test
-  public void testCreateTypeSystemDescription() throws URISyntaxException, IOException,
-          RecognitionException, InvalidXMLException, ResourceInitializationException {
-    String script = "";
-    script += "PACKAGE test.package;\n";
-    script += "TYPESYSTEM org.apache.uima.ruta.engine.HtmlTypeSystem;\n";
-    script += "DECLARE SimpleType;\n";
-    script += "DECLARE SimpleType ComplexType (SimpleType fs, STRING s, BOOLEAN b, INT i);\n";
-    script += "DECLARE ComplexType2 (SimpleType fs, STRING s, BOOLEAN b, INT i);\n";
-    script += "BLOCK(sub) Document{}{\n";
-    script += "DECLARE InnerType;\n";
-    script += "}\n";
-
-    RutaDescriptorFactory rdf = new RutaDescriptorFactory(basicTSUrl, basicAEUrl);
-    RutaDescriptorInformation descriptorInformation = rdf.parseDescriptorInformation(script);
-    RutaBuildOptions options = new RutaBuildOptions();
-    String typeSystemOutput = new File(basicTSUrl.toURI()).getAbsolutePath();
-    ClassLoader classLoader = GenerateDescriptorTest.class.getClassLoader();
-    TypeSystemDescription tsd = rdf.createTypeSystemDescription(typeSystemOutput,
-            descriptorInformation, options, classLoader);
-    ResourceManager rm = new ResourceManager_impl(classLoader);
-    tsd.resolveImports(rm);
-
-    TypeDescription tagType = tsd.getType("org.apache.uima.ruta.type.html.TAG");
-    assertNotNull(tagType);
-
-    TypeDescription simpleType = tsd.getType("test.package.Anonymous.SimpleType");
-    assertNotNull(simpleType);
-    assertEquals("uima.tcas.Annotation", simpleType.getSupertypeName());
-
-    TypeDescription complexType = tsd.getType("test.package.Anonymous.ComplexType");
-    assertNotNull(complexType);
-    assertEquals("Type defined in test.package.Anonymous", complexType.getDescription());
-    assertEquals("test.package.Anonymous.SimpleType", complexType.getSupertypeName());
-    FeatureDescription[] features = complexType.getFeatures();
-    Map<String, String> featureMap = new HashMap<>();
-    featureMap.put("fs", "test.package.Anonymous.SimpleType");
-    featureMap.put("s", "uima.cas.String");
-    featureMap.put("b", "uima.cas.Boolean");
-    featureMap.put("i", "uima.cas.Integer");
-    assertEquals(4, features.length);
-    for (FeatureDescription each : features) {
-      String f = featureMap.get(each.getName());
-      assertNotNull(f);
-    }
-    
-    TypeDescription complexType2 = tsd.getType("test.package.Anonymous.ComplexType2");
-    assertNotNull(complexType2);
-    assertEquals("Type defined in test.package.Anonymous", complexType2.getDescription());
-    assertEquals("uima.tcas.Annotation", complexType2.getSupertypeName());
-    FeatureDescription[] features2 = complexType2.getFeatures();
-    Map<String, String> featureMap2 = new HashMap<>();
-    featureMap2.put("fs", "test.package.Anonymous.SimpleType");
-    featureMap2.put("s", "uima.cas.String");
-    featureMap2.put("b", "uima.cas.Boolean");
-    featureMap2.put("i", "uima.cas.Integer");
-    assertEquals(4, features2.length);
-    for (FeatureDescription each : features2) {
-      String f = featureMap2.get(each.getName());
-      assertNotNull(f);
-    }
-
-    TypeDescription innerType = tsd.getType("test.package.Anonymous.sub.InnerType");
-    assertNotNull(innerType);
-    assertEquals("uima.tcas.Annotation", innerType.getSupertypeName());
-
-  }
-
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/CascadedModifierTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/CascadedModifierTest.java
deleted file mode 100644
index b47bd2b..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/CascadedModifierTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.ruta.engine;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.resource.ResourceConfigurationException;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.ResourceSpecifier;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLInputSource;
-import org.junit.Test;
-import org.xml.sax.SAXException;
-
-public class CascadedModifierTest {
-
-  @Test
-  public void test() throws IOException, URISyntaxException, InvalidXMLException,
-          ResourceInitializationException, ResourceConfigurationException,
-          AnalysisEngineProcessException, SAXException {
-
-    URL url = RutaEngine.class.getClassLoader().getResource("AAE.xml");
-    if (url == null) {
-      url = RutaTestUtils.class.getClassLoader().getResource("org/apache/uima/ruta/engine/AAE.xml");
-    }
-    XMLInputSource in = new XMLInputSource(url);
-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
-    CAS cas = ae.newCAS();
-    CAS mCas = cas.createView("global1");
-    mCas.setDocumentText("Peter is tired.");
-    ae.process(mCas);
-
-    Type cwswType = cas.getTypeSystem().getType("Simple.CwSw");
-    CAS lastCas = cas.getView("global3");
-    AnnotationIndex<AnnotationFS> ai = lastCas.getAnnotationIndex(cwswType);
-    assertEquals(1, ai.size());
-    FSIterator<AnnotationFS> iterator = ai.iterator();
-    AnnotationFS a = iterator.next();
-    assertEquals("CW SW", a.getCoveredText());
-
-    cas.release();
-    ae.destroy();
-  }
-
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlAnnotatorTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlAnnotatorTest.java
deleted file mode 100644
index 66ed048..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlAnnotatorTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import static org.junit.Assert.assertEquals;

-

-import java.io.File;

-import java.net.URL;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-public class HtmlAnnotatorTest {

-

-  @Test

-  public void test() throws Exception {

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    String name = namespace + "/" + "test.html";

-    URL textURL = HtmlAnnotatorTest.class.getClassLoader().getResource(name);

-    File textFile = new File(textURL.toURI());

-    String html = FileUtils.file2String(textFile, "UTF-8");

-    URL url = HtmlAnnotator.class.getClassLoader().getResource("HtmlAnnotator.xml");

-    if (url == null) {

-      url = HtmlAnnotator.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlAnnotator.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-    Type tagType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "TAG");

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    ae.setConfigParameterValue("onlyContent", false);

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(html);

-    ae.process(cas);

-    ai = cas.getAnnotationIndex(tagType);

-    iterator = ai.iterator();

-    assertEquals(7, ai.size());

-    AnnotationFS a = iterator.next();

-    assertEquals("HTML", a.getType().getShortName());

-    assertEquals(0, a.getBegin());

-    assertEquals(127, a.getEnd());

-    a = iterator.next();

-    assertEquals("HEAD", a.getType().getShortName());

-    assertEquals(8, a.getBegin());

-    assertEquals(39, a.getEnd());

-    a = iterator.next();

-    assertEquals("REMARK", a.getType().getShortName());

-    assertEquals(16, a.getBegin());

-    assertEquals(30, a.getEnd());

-    a = iterator.next();

-    assertEquals("BODY", a.getType().getShortName());

-    assertEquals(41, a.getBegin());

-    assertEquals(118, a.getEnd());

-    a = iterator.next();

-    assertEquals("BR", a.getType().getShortName());

-    assertEquals(64, a.getBegin());

-    assertEquals(69, a.getEnd());

-    a = iterator.next();

-    assertEquals("B", a.getType().getShortName());

-    assertEquals(78, a.getBegin());

-    assertEquals(89, a.getEnd());

-    a = iterator.next();

-    assertEquals("BR", a.getType().getShortName());

-    assertEquals(91, a.getBegin());

-    assertEquals(96, a.getEnd());

-

-    

-    ae.setConfigParameterValue("onlyContent", true);

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(html);

-    ae.process(cas);

-    ai = cas.getAnnotationIndex(tagType);

-    iterator = ai.iterator();

-    assertEquals(4, ai.size());

-    a = iterator.next();

-    assertEquals("HTML", a.getType().getShortName());

-    assertEquals(6, a.getBegin());

-    assertEquals(120, a.getEnd());

-    a = iterator.next();

-    assertEquals("HEAD", a.getType().getShortName());

-    assertEquals(14, a.getBegin());

-    assertEquals(32, a.getEnd());

-    a = iterator.next();

-    assertEquals("BODY", a.getType().getShortName());

-    assertEquals(47, a.getBegin());

-    assertEquals(111, a.getEnd());

-    a = iterator.next();

-    assertEquals("B", a.getType().getShortName());

-    assertEquals(81, a.getBegin());

-    assertEquals(85, a.getEnd());

-    

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlConverterTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlConverterTest.java
deleted file mode 100644
index 7d56f76..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlConverterTest.java
+++ /dev/null
@@ -1,543 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import static org.junit.Assert.assertEquals;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URISyntaxException;

-import java.net.URL;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.BeforeClass;

-import org.junit.Test;

-

-public class HtmlConverterTest {

-

-  private static String htmlWin;

-

-  private static String htmlWithComments;

-

-  private static String htmlWithCommentsAndScript;

-

-  private static String htmlUnix;

-

-  private static String htmlDecoding;

-

-  private static String htmlDecodingAnnotations;

-

-  private String outputViewName = "raw_testing";

-

-  @BeforeClass

-  public static void setUpClass() throws IOException, URISyntaxException {

-    // get resource

-    String namespace = HtmlConverterTest.class.getPackage().getName().replaceAll("\\.", "/");

-    String testFilename = namespace + "/" + "testWin.html";

-    URL textURL = HtmlConverterTest.class.getClassLoader().getResource(testFilename);

-    File textFile = new File(textURL.toURI());

-    HtmlConverterTest.htmlWin = FileUtils.file2String(textFile, "UTF-8");

-    //

-    testFilename = namespace + "/" + "testUnix.html";

-    textURL = HtmlConverterTest.class.getClassLoader().getResource(testFilename);

-    textFile = new File(textURL.toURI());

-    HtmlConverterTest.htmlUnix = FileUtils.file2String(textFile, "UTF-8");

-    //

-    testFilename = namespace + "/" + "testHtmlDecoding.html";

-    textURL = HtmlConverterTest.class.getClassLoader().getResource(testFilename);

-    textFile = new File(textURL.toURI());

-    HtmlConverterTest.htmlDecoding = FileUtils.file2String(textFile, "UTF-8");

-    //

-    testFilename = namespace + "/" + "testHtmlDecodingAnnotations.html";

-    textURL = HtmlConverterTest.class.getClassLoader().getResource(testFilename);

-    textFile = new File(textURL.toURI());

-    HtmlConverterTest.htmlDecodingAnnotations = FileUtils.file2String(textFile, "UTF-8");

-    //

-    testFilename = namespace + "/" + "testWithComments.html";

-    textURL = HtmlConverterTest.class.getClassLoader().getResource(testFilename);

-    textFile = new File(textURL.toURI());

-    HtmlConverterTest.htmlWithComments = FileUtils.file2String(textFile, "UTF-8");

-    //

-    testFilename = namespace + "/" + "testWithCommentsAndScript.html";

-    textURL = HtmlConverterTest.class.getClassLoader().getResource(testFilename);

-    textFile = new File(textURL.toURI());

-    HtmlConverterTest.htmlWithCommentsAndScript = FileUtils.file2String(textFile, "UTF-8");

-  }

-

-  @Test

-  public void htmlBodyContentHtmlDecodingExplicitPolicyTest()

-          throws AnalysisEngineProcessException, ResourceConfigurationException,

-          ResourceInitializationException, InvalidXMLException, IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.setConfigParameterValue(HtmlConverter.PARAM_CONVERSION_POLICY, "explicit");

-    ae.setConfigParameterValue(HtmlConverter.PARAM_CONVERSION_PATTERNS, new String[] { "&nbsp;" });

-    ae.setConfigParameterValue(HtmlConverter.PARAM_CONVERSION_REPLACEMENTS, new String[] { " " });

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(htmlDecoding);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String inputText = cas.getDocumentText();

-    String expectedText = "start of body\nnormal normal bold\nend of body 3&#8364;&#160;&auml;&ouml;&uuml;";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-

-  @Test

-  public void htmlBodyContentHtmlDecodingHeuristicPolicyTest()

-          throws AnalysisEngineProcessException, ResourceConfigurationException,

-          ResourceInitializationException, InvalidXMLException, IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(htmlDecoding);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String inputText = cas.getDocumentText();

-    String expectedText = "start of body\nnormal\u00A0normal bold\nend of body 3\u20AC\u00A0äöü";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-

-  @Test

-  public void htmlBodyContentUnixTest() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(htmlUnix);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String expectedText = "start of body\nnormal bold\nend of body";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-

-  @Test

-  public void htmlBodyContentWinTest() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(htmlWin);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String expectedText = "start of body\nnormal bold\nend of body";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-

-  @Test

-  public void htmlBodyContentWithCommentsTest() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(htmlWithComments);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String expectedText = "start of body\nnormal bold\nend of body";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-

-  @Test

-  public void htmlBodyContentNLTagsTest() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.setConfigParameterValue(HtmlConverter.PARAM_NEWLINE_INDUCING_TAGS, new String[] { "br" });

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(htmlWin);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String expectedText = "start of body\nnormal bold\nend of body";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-

-  @Test

-  public void htmlBodyContentWithCommentsAndScriptTest() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.reconfigure();

-    cas.reset();

-    cas.setDocumentText(htmlWithCommentsAndScript);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String expectedText = "start of body\nnormal bold\nend of body";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-

-  @Test

-  public void annotationPropagationTest() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    for (String htmlContent : new String[] { htmlWin }) {

-      // configure annotator and create AE:

-      URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-      if (url == null) {

-        url = HtmlConverter.class.getClassLoader().getResource(

-                "org/apache/uima/ruta/engine/HtmlConverter.xml");

-      }

-      XMLInputSource in = new XMLInputSource(url);

-      AnalysisEngineDescription specifier = (AnalysisEngineDescription) UIMAFramework

-              .getXMLParser().parseResourceSpecifier(in);

-

-      TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();

-      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",

-              "uima.tcas.Annotation");

-      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",

-              "uima.tcas.Annotation");

-      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",

-              "uima.tcas.Annotation");

-      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",

-              "uima.tcas.Annotation");

-      specifier.getAnalysisEngineMetaData().setTypeSystem(basicTypeSystem);

-

-      AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-      ae.setConfigParameterValue("outputView", outputViewName);

-      ae.reconfigure();

-

-      // create the cas and input annotation

-      CAS cas = ae.newCAS();

-      cas.reset();

-      cas.setDocumentText(htmlContent);

-      Type boldType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "B");

-      AnnotationFS fs = cas.createAnnotation(boldType, 78, 89);

-      cas.addFsToIndexes(fs);

-

-      // go:

-      ae.process(cas);

-

-      // test:

-      CAS modifiedView = cas.getView(outputViewName);

-      AnnotationIndex<AnnotationFS> ai = modifiedView.getAnnotationIndex(boldType);

-      FSIterator<AnnotationFS> iterator = ai.iterator();

-      assertEquals(true, iterator.hasNext());

-      AnnotationFS next = iterator.next();

-      assertEquals("B", next.getType().getShortName());

-      assertEquals(21, next.getBegin());

-      assertEquals(25, next.getEnd());

-      assertEquals(next.getCoveredText(), "bold");

-      assertEquals(next.getCoveredText().length(), 4);

-

-      // fini

-      cas.release();

-

-    }

-

-  }

-

-  @Test

-  public void annotationPropagationAndDecodingTest() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    AnalysisEngineDescription specifier = (AnalysisEngineDescription) UIMAFramework

-            .getXMLParser().parseResourceSpecifier(in);

-

-    TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();

-    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",

-            "uima.tcas.Annotation");

-    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",

-            "uima.tcas.Annotation");

-    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",

-            "uima.tcas.Annotation");

-    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",

-            "uima.tcas.Annotation");

-    specifier.getAnalysisEngineMetaData().setTypeSystem(basicTypeSystem);

-    

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    ae.setConfigParameterValue("outputView", outputViewName);

-    ae.reconfigure();

-

-    // create the cas and input annotation

-    CAS cas = ae.newCAS();

-    cas.reset();

-    cas.setDocumentText(htmlDecodingAnnotations);

-    Type boldType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "B");

-    AnnotationFS fs1 = cas.createAnnotation(boldType, 210, 221);

-    AnnotationFS fs2 = cas.createAnnotation(boldType, 279, 290);

-    cas.addFsToIndexes(fs1);

-    cas.addFsToIndexes(fs2);

-

-    // go:

-    ae.process(cas);

-

-    // test: should be:

-    //

-    // start of body\nnormal normal bold\nend of body 3€ äöü and bold.

-    // 01234567890123 4567890123456789012 34567890123456789012345678901234567890

-    // 0 ------- 1 -------- 2 ------- 3 -------- 4 ------- 5 ------- 6 ------- 7

-    // ____________________________ <--> _______________________ <--> __________

-    // _____________________________ BB _________________________ BB ___________

-    //

-    CAS modifiedView = cas.getView(outputViewName);

-    String modifiedText = modifiedView.getDocumentText();

-    int modLength = modifiedText.length();

-    int modLengthCodepoints = modifiedText.codePointCount(0, modLength);

-    AnnotationIndex<AnnotationFS> ai = modifiedView.getAnnotationIndex(boldType);

-    FSIterator<AnnotationFS> iterator = ai.iterator();

-    assertEquals(true, iterator.hasNext());

-    // check first bold annotation

-    AnnotationFS next = iterator.next();

-    assertEquals("B", next.getType().getShortName());

-    assertEquals(28, next.getBegin());

-    assertEquals(32, next.getEnd());

-    assertEquals(next.getCoveredText(), "bold");

-    assertEquals(next.getCoveredText().length(), 4);

-    // check second bold annotation

-    next = iterator.next();

-    int begin = next.getBegin();

-    int end = next.getEnd();

-    assertEquals("B", next.getType().getShortName());

-    assertEquals(56, begin); // map[279] == 56

-    assertEquals(60, end); // map[290] == 60

-    assertEquals(next.getCoveredText(), "bold");

-    assertEquals(next.getCoveredText().length(), 4);

-

-    // fini

-    cas.release();

-

-  }

-

-  @Test

-  public void parameterTestInputView() throws AnalysisEngineProcessException,

-          ResourceConfigurationException, ResourceInitializationException, InvalidXMLException,

-          IOException {

-    // configure annotator and create AE:

-    URL url = HtmlConverter.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (url == null) {

-      url = HtmlConverter.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    String inputViewName = "inview";

-

-    ae.setConfigParameterValue(HtmlConverter.PARAM_INPUT_VIEW, inputViewName);

-    ae.setConfigParameterValue(HtmlConverter.PARAM_OUTPUT_VIEW, outputViewName);

-    ae.reconfigure();

-    cas.reset();

-    CAS inview = cas.createView(inputViewName);

-    inview.setDocumentText(htmlUnix);

-

-    // go:

-    ae.process(cas);

-

-    CAS modifiedView = cas.getView(outputViewName);

-    String text = modifiedView.getDocumentText();

-

-    String expectedText = "start of body\nnormal bold\nend of body";

-    AnnotationFS documentAnnotation = modifiedView.getDocumentAnnotation();

-    assertEquals(String.format("begin of annotation is %d, %d expected.",

-            documentAnnotation.getBegin(), 0), documentAnnotation.getBegin(), 0);

-    assertEquals(documentAnnotation.getEnd(), text.length());

-    assertEquals(expectedText, text);

-

-    // fini

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlConverterXmlTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlConverterXmlTest.java
deleted file mode 100644
index 189d864..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/HtmlConverterXmlTest.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import static org.junit.Assert.assertEquals;

-

-import java.net.URL;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-public class HtmlConverterXmlTest {

-

-  @Test

-  public void test() throws Exception {

-    String html = "<Parent>\n";

-    html += "<Child1>Some content</Child1>\n";

-    html += "<Child2 attribute=“someValue” />\n";

-    html += "<Child3>More content.</Child3>\n";

-    html += "</Parent>\n";

-

-    URL urlA = HtmlAnnotator.class.getClassLoader().getResource("HtmlAnnotator.xml");

-    if (urlA == null) {

-      urlA = HtmlAnnotator.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlAnnotator.xml");

-    }

-

-    URL urlC = HtmlAnnotator.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (urlC == null) {

-      urlC = HtmlAnnotator.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-

-    XMLInputSource inA = new XMLInputSource(urlA);

-    ResourceSpecifier specifierA = UIMAFramework.getXMLParser().parseResourceSpecifier(inA);

-    AnalysisEngine aeA = UIMAFramework.produceAnalysisEngine(specifierA);

-    aeA.setConfigParameterValue(HtmlAnnotator.PARAM_ONLY_CONTENT, false);

-    aeA.reconfigure();

-

-    XMLInputSource inC = new XMLInputSource(urlC);

-    ResourceSpecifier specifierC = UIMAFramework.getXMLParser().parseResourceSpecifier(inC);

-    AnalysisEngine aeC = UIMAFramework.produceAnalysisEngine(specifierC);

-    aeC.setConfigParameterValue(HtmlConverter.PARAM_SKIP_WHITESPACES, false);

-    aeC.setConfigParameterValue(HtmlConverter.PARAM_PROCESS_ALL, true);

-    aeC.setConfigParameterValue(HtmlConverter.PARAM_GAP_INDUCING_TAGS, new String[] { "child1",

-        "child2", "child3" });

-    aeC.setConfigParameterValue(HtmlConverter.PARAM_GAP_TEXT, "$");

-    aeC.reconfigure();

-

-    CAS cas = aeA.newCAS();

-    Type tagType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "TAG");

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    cas.setDocumentText(html);

-    aeA.process(cas);

-    aeC.process(cas);

-

-    CAS plainTextCas = cas.getView(HtmlConverter.DEFAULT_MODIFIED_VIEW);

-

-    assertEquals("$Some content$$More content.", plainTextCas.getDocumentText());

-

-    ai = plainTextCas.getAnnotationIndex(tagType);

-    iterator = ai.iterator();

-    assertEquals(4, ai.size());

-    assertEquals("$Some content$$More content.", iterator.next().getCoveredText());

-    assertEquals("$Some content", iterator.next().getCoveredText());

-    assertEquals("$", iterator.next().getCoveredText());

-    assertEquals("$More content.", iterator.next().getCoveredText());

-

-    cas.release();

-  }

-

-  @Test

-  public void testExpandOffsets() throws Exception {

-    String html = "<Parent>\n";

-    html += "<Child1>Some content</Child1>\n";

-    html += "<Child2 attribute=“someValue” />\n";

-    html += "<Child3>More content.</Child3>\n";

-    html += "</Parent>\n";

-

-    URL urlA = HtmlAnnotator.class.getClassLoader().getResource("HtmlAnnotator.xml");

-    if (urlA == null) {

-      urlA = HtmlAnnotator.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlAnnotator.xml");

-    }

-

-    URL urlC = HtmlAnnotator.class.getClassLoader().getResource("HtmlConverter.xml");

-    if (urlC == null) {

-      urlC = HtmlAnnotator.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/HtmlConverter.xml");

-    }

-

-    XMLInputSource inA = new XMLInputSource(urlA);

-    ResourceSpecifier specifierA = UIMAFramework.getXMLParser().parseResourceSpecifier(inA);

-    AnalysisEngine aeA = UIMAFramework.produceAnalysisEngine(specifierA);

-    aeA.setConfigParameterValue(HtmlAnnotator.PARAM_ONLY_CONTENT, false);

-    aeA.reconfigure();

-

-    XMLInputSource inC = new XMLInputSource(urlC);

-    ResourceSpecifier specifierC = UIMAFramework.getXMLParser().parseResourceSpecifier(inC);

-    AnalysisEngine aeC = UIMAFramework.produceAnalysisEngine(specifierC);

-    aeC.setConfigParameterValue(HtmlConverter.PARAM_SKIP_WHITESPACES, false);

-    aeC.setConfigParameterValue(HtmlConverter.PARAM_PROCESS_ALL, true);

-    aeC.setConfigParameterValue(HtmlConverter.PARAM_EXPAND_OFFSETS, true);

-    aeC.reconfigure();

-

-    CAS cas = aeA.newCAS();

-    Type tagType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "TAG");

-    Feature expandedFeature = tagType.getFeatureByBaseName("expandedOffsets");

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-

-    cas.setDocumentText(html);

-    aeA.process(cas);

-    aeC.process(cas);

-

-    CAS plainTextCas = cas.getView(HtmlConverter.DEFAULT_MODIFIED_VIEW);

-

-    assertEquals("Some contentMore content.", plainTextCas.getDocumentText());

-

-    ai = plainTextCas.getAnnotationIndex(tagType);

-    iterator = ai.iterator();

-    assertEquals(4, ai.size());

-    AnnotationFS next = null;

-    next = iterator.next();

-    assertEquals(false, next.getBooleanValue(expandedFeature));

-    assertEquals("Some contentMore content.", next.getCoveredText());

-    next = iterator.next();

-    assertEquals(false, next.getBooleanValue(expandedFeature));

-    assertEquals("Some content", next.getCoveredText());

-    next = iterator.next();

-    boolean b1 = next.getBooleanValue(expandedFeature);

-    assertEquals("More content.", next.getCoveredText());

-    next = iterator.next();

-    boolean b2 = next.getBooleanValue(expandedFeature);

-    assertEquals("More content.", next.getCoveredText());

-    // for one of these two annotation (with same offsets) the feature must be set to true 

-    assertEquals(true, b1 || b2);

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/ParamVarTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/ParamVarTest.java
deleted file mode 100644
index 6b3f437..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/ParamVarTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.ruta.engine;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.cas.CAS;
-import org.junit.Test;
-
-public class ParamVarTest {
-
-  @Test
-  public void test() {
-    String document = "Some text.";
-    String script = "";
-    script += "BLOCK(First) Document{}{\n";
-    script += "STRING s = \"a\";\n";
-    script += "W.ct==s{-> T1};\n";
-    script += "}\n";
-    script += "BLOCK(Second) Document{}{\n";
-    script += "STRING s = \"b\";\n";
-    script += "W.ct==s{-> T2};\n";
-    script += "}\n";
-    script += "STRING s = \"x\";\n";
-    script += "INT i = 100;\n";
-    script += "BOOLEAN b = false;\n";
-    script += "W.ct==s{-> T3};\n";
-    script += "W.begin==i{-> T4};\n";
-    script += "Document{b -> T5};\n";
-    CAS cas = null;
-    Map<String, Object> params = new HashMap<String, Object>();
-    params.put(RutaEngine.PARAM_VAR_NAMES, new String[] {"First.s", "Second.s", "s", "i", "b"});
-    params.put(RutaEngine.PARAM_VAR_VALUES, new String[] {"Some", "text", "Some", "0", "true"});
-    
-    try {
-      cas = RutaTestUtils.getCAS(document);
-      Ruta.apply(cas, script, params);
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-    
-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Some");
-    RutaTestUtils.assertAnnotationsEquals(cas, 2, 1, "text");
-    RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "Some");
-    RutaTestUtils.assertAnnotationsEquals(cas, 4, 1, "Some");
-    RutaTestUtils.assertAnnotationsEquals(cas, 5, 1, "Some text.");
-
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/PlainTextAnnotatorTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/PlainTextAnnotatorTest.java
deleted file mode 100644
index 0c56a8f..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/PlainTextAnnotatorTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.ruta.engine;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.net.URL;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.resource.ResourceSpecifier;
-import org.apache.uima.util.FileUtils;
-import org.apache.uima.util.XMLInputSource;
-import org.junit.Test;
-
-public class PlainTextAnnotatorTest {
-
-  @Test
-  public void test() throws Exception {
-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
-    String name = namespace + "/" + "PlainTextAnnotatorTest.txt";
-    URL textURL = PlainTextAnnotatorTest.class.getClassLoader().getResource(name);
-    File textFile = new File(textURL.toURI());
-    String text = FileUtils.file2String(textFile, "UTF-8");
-    URL url = PlainTextAnnotator.class.getClassLoader().getResource("PlainTextAnnotator.xml");
-    if (url == null) {
-      url = HtmlAnnotator.class.getClassLoader().getResource(
-              "org/apache/uima/ruta/engine/PlainTextAnnotator.xml");
-    }
-    XMLInputSource in = new XMLInputSource(url);
-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
-    CAS cas = ae.newCAS();
-    AnnotationIndex<AnnotationFS> ai = null;
-
-    cas.setDocumentText(text);
-    ae.process(cas);
-    
-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("org.apache.uima.ruta.type.AnyLine"));
-    assertEquals(18, ai.size());
-
-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("org.apache.uima.ruta.type.Line"));
-    assertEquals(10, ai.size());
-
-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("org.apache.uima.ruta.type.EmptyLine"));
-    assertEquals(8, ai.size());
-
-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("org.apache.uima.ruta.type.WSLine"));
-    assertEquals(5, ai.size());
-
-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("org.apache.uima.ruta.type.Paragraph"));
-    assertEquals(4, ai.size());
-
-    ae.destroy();
-    cas.release();
-  }
-}
diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RulesParamTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RulesParamTest.java
deleted file mode 100644
index 3b9f973..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RulesParamTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import java.io.IOException;

-import java.net.URL;

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-public class RulesParamTest {

-  @Test

-  public void test() throws IOException, InvalidXMLException, ResourceInitializationException, ResourceConfigurationException {

-    String document = "Some text.";

-    String script = "CW SW{-> T1};\n";

-

-    Map<String, Object> parameters = new HashMap<String, Object>();

-    parameters.put(RutaEngine.PARAM_RULES, script);

-    

-    URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource("org/apache/uima/ruta/TestEngine.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    ae.setConfigParameterValue(RutaEngine.PARAM_RULES, script);

-    ae.reconfigure();

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-    ae.process(cas);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "text");

-

-    cas.release();

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaModifierTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaModifierTest.java
deleted file mode 100644
index e3e0af6..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaModifierTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import static org.junit.Assert.assertEquals;

-

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-public class RutaModifierTest {

-

-  @Test

-  public void test() throws Exception {

-    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");

-    URL url = HtmlAnnotator.class.getClassLoader().getResource("Modifier.xml");

-    if (url == null) {

-      url = HtmlAnnotator.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/Modifier.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-    

-    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-    for (int i = 1; i <= 20; i++) {

-      basicTypeSystem.addType(RutaTestUtils.TYPE + i, "Type for Testing", "uima.tcas.Annotation");

-    }

-    Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-    tsds.add(basicTypeSystem);

-    TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-    aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);

-    ae.setConfigParameterValue(RutaModifier.PARAM_OUTPUT_LOCATION, "");

-    String viewName = "modified_for_testing";

-    ae.setConfigParameterValue(RutaModifier.PARAM_OUTPUT_VIEW, viewName);

-    ae.reconfigure();

-    

-    String scriptName = this.getClass().getSimpleName();

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.process(namespace + "/" + scriptName + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/test.html", 50);

-    } catch (Exception e) {

-      e.printStackTrace();

-      assert (false);

-    }

-    ae.process(cas);

-    

-    CAS modifiedView = cas.getView(viewName);

-    String text = modifiedView.getDocumentText();

-    

-    assertEquals("start of bodynormal BOLDend of body" , text);

-    

-    

-    cas.release();

-    ae.destroy();

-  }

-

-  

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java
deleted file mode 100644
index 791d764..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import static org.junit.Assert.assertEquals;

-

-import java.net.URL;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.resource.metadata.FsIndexDescription;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypePriorities;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.resource.metadata.impl.TypeDescription_impl;

-import org.apache.uima.resource.metadata.impl.TypeSystemDescription_impl;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-public class RutaTest {

-

-  @Test

-  public void testApply() throws Exception {

-    URL typePrioritiesUrl = RutaTestUtils.class.getResource("TypePriorities.xml");

-    URL tsUrl = RutaTestUtils.class.getResource("BasicTypeSystem.xml");

-    Object descriptor = UIMAFramework.getXMLParser().parse(new XMLInputSource(tsUrl));

-    TypeSystemDescription tsDesc = (TypeSystemDescription) descriptor;

-    tsDesc.addType("uima.ruta.T1", "", "uima.tcas.Annotation");

-    tsDesc.addType("uima.ruta.T2", "", "uima.tcas.Annotation");

-    tsDesc.addType("uima.ruta.T3", "", "uima.tcas.Annotation");

-    tsDesc.resolveImports();

-    TypePriorities typePriorities = UIMAFramework.getXMLParser().parseTypePriorities(new XMLInputSource(typePrioritiesUrl));

-    CAS cas = CasCreationUtils.createCas(tsDesc, typePriorities, new FsIndexDescription[0]);

-    

-    cas.setDocumentText("Some document.");

-    

-    Ruta.apply(cas, "CW{-> MARK(T1)} SW;");

-    AnnotationIndex<AnnotationFS> ai = null;

-    FSIterator<AnnotationFS> iterator = null;

-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.ruta.T1"));

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    assertEquals("Some", iterator.next().getCoveredText());

-    

-    Ruta.apply(cas, "T1 SW{-> MARK(T2)};");

-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.ruta.T2"));

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    assertEquals("document", iterator.next().getCoveredText());

-    

-    Ruta.apply(cas, "T1{-> MARK(T3,1,2,3)} T2 PERIOD;");

-    ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.ruta.T3"));

-    iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    assertEquals("Some document.", iterator.next().getCoveredText());

-    

-    cas.release();

-  }

-  

-  @Test

-  public void testCreateAnalysisEngineDescription() throws Exception {

-    TypeSystemDescription_impl tsdi = new TypeSystemDescription_impl();

-    String t1 = "some.type.Test1";

-    String t2 = "some.type.Test2";

-    TypeDescription_impl ti1 = new TypeDescription_impl(t1, "", "uima.tcas.Annotation");

-    TypeDescription_impl ti2 = new TypeDescription_impl(t2, "", "uima.tcas.Annotation");

-    tsdi.setTypes(new TypeDescription[] {ti1, ti2});

-    

-    String script = "CW SW{-> MARK(Test1)};\n Test1 SW{-> MARK(Test2)};";

-    AnalysisEngineDescription aed = Ruta.createAnalysisEngineDescription(script, tsdi);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);

-    CAS cas = ae.newCAS();

-    cas.setDocumentText("Only some text.");

-    ae.process(cas);

-

-    Type type1 = cas.getTypeSystem().getType(t1);

-    AnnotationIndex<AnnotationFS> ai1 = cas.getAnnotationIndex(type1);

-    assertEquals(1, ai1.size());

-    assertEquals("some", ai1.iterator().get().getCoveredText());

-    

-    Type type2 = cas.getTypeSystem().getType(t2);

-    AnnotationIndex<AnnotationFS> ai2 = cas.getAnnotationIndex(type2);

-    assertEquals(1, ai2.size());

-    assertEquals("text", ai2.iterator().get().getCoveredText());

-  }

-  

-  

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/UimafitTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/UimafitTest.java
deleted file mode 100644
index 68e7037..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/UimafitTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine;

-import static org.junit.Assert.assertEquals;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.fit.factory.JCasBuilder;

-import org.apache.uima.jcas.JCas;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.type.FalsePositive;

-import org.apache.uima.ruta.type.TruePositive;

-import org.junit.Test;

-

-public class UimafitTest {

-  @Test

-  public void test() throws Exception {

-    AnalysisEngine ae = createEngine(RutaEngine.class,

-    // Load script in "Java" notation, with "." as package separator and no extension.

-    // File needs to be located in the path specified below with ending ".ruta".

-            RutaEngine.PARAM_MAIN_SCRIPT, "org.apache.uima.ruta.engine.UimafitTest",

-            // Path(s) where the scripts are located

-            RutaEngine.PARAM_SCRIPT_PATHS, new String[] { "src/test/resources" });

-

-    // Create a CAS from the AE so it has the required type priorities

-    JCas jcas = ae.newJCas();

-

-    // Fill the CAS with some tokens

-    JCasBuilder builder = new JCasBuilder(jcas);

-    builder.add("This", TruePositive.class);

-    builder.add(" ");

-    builder.add("is", TruePositive.class);

-    builder.add(" ");

-    builder.add("a", TruePositive.class);

-    builder.add(" ");

-    builder.add("test", TruePositive.class);

-    builder.add(".", TruePositive.class);

-    builder.close();

-

-    // Apply the script

-    ae.process(jcas);

-

-    // Test the result

-    AnnotationIndex<Annotation> ai = jcas.getAnnotationIndex(FalsePositive.type);

-    FSIterator<Annotation> iterator = ai.iterator();

-    assertEquals(1, ai.size());

-    assertEquals("This is a test.", iterator.next().getCoveredText());

-    

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/ViewWriterTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/ViewWriterTest.java
deleted file mode 100644
index d67dda4..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/ViewWriterTest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*

- * 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.ruta.engine;

-

-import static org.junit.Assert.assertEquals;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.IOException;

-import java.net.URISyntaxException;

-import java.net.URL;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-import org.xml.sax.SAXException;

-

-public class ViewWriterTest {

-

-  private static final String TEST_TYPE = "uima.ruta.test.T1";

-

-  private static final String NEW_VIEW = "newView";

-

-  @Test

-  public void test() throws IOException, URISyntaxException, InvalidXMLException,

-          ResourceInitializationException, ResourceConfigurationException,

-          AnalysisEngineProcessException, SAXException {

-    URL url = RutaEngine.class.getClassLoader().getResource("ViewWriter.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/ViewWriter.xml");

-    }

-    File tempFile = File.createTempFile("ViewWriterTest", ".xmi");

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    ae.setConfigParameterValue(ViewWriter.PARAM_INPUT_VIEW, NEW_VIEW);

-    ae.setConfigParameterValue(ViewWriter.PARAM_OUTPUT_VIEW, CAS.NAME_DEFAULT_SOFA);

-    ae.setConfigParameterValue(ViewWriter.PARAM_OUTPUT, tempFile.getAbsolutePath());

-    ae.reconfigure();

-

-    CAS cas = ae.newCAS();

-    cas.setDocumentText("This is the default view.");

-    CAS newView = cas.createView(NEW_VIEW);

-    newView.setDocumentText("This is a new view.");

-    Type type = cas.getTypeSystem().getType(TEST_TYPE);

-    AnnotationFS createAnnotation = newView.createAnnotation(type, 5, 7);

-    newView.addFsToIndexes(createAnnotation);

-

-    ae.process(cas);

-

-    cas.reset();

-    FileInputStream stream = new FileInputStream(tempFile);

-    XmiCasDeserializer.deserialize(stream, cas, true);

-

-    assertEquals("This is a new view.", cas.getDocumentText());

-    type = cas.getTypeSystem().getType(TEST_TYPE);

-    AnnotationIndex<AnnotationFS> ai = cas.getAnnotationIndex(type);

-    AnnotationFS next = ai.iterator().next();

-    assertEquals("is", next.getCoveredText());

-

-    if (cas != null) {

-      cas.release();

-    }

-

-    if (newView != null) {

-      newView.release();

-    }

-    stream.close();

-    in.close();

-    tempFile.delete();

-  }

-

-  @Test

-  public void testInRuta() throws IOException, URISyntaxException, InvalidXMLException,

-          ResourceInitializationException, ResourceConfigurationException,

-          AnalysisEngineProcessException, SAXException {

-    File xmiOutputFile = File.createTempFile("ViewWriterTest", ".xmi");

-    File scriptFile = File.createTempFile("ViewWriterTest", ".ruta");

-    StringBuilder scriptSB = new StringBuilder();

-    scriptSB.append("ENGINE ViewWriter;\n");

-    String absolutePath = xmiOutputFile.getAbsolutePath().replaceAll("\\\\", "/");

-    scriptSB.append("CONFIGURE(ViewWriter, \"inputView\" = \"" + NEW_VIEW

-            + "\", \"outputView\" = \"_InitialView\", \"output\" = \"" + absolutePath

-            + "\"), EXEC(ViewWriter);\n");

-

-    FileUtils.saveString2File(scriptSB.toString(), scriptFile, "UTF-8");

-    URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource("org/apache/uima/ruta/TestEngine.xml");

-    }

-    URL urlDesc = RutaEngine.class.getClassLoader().getResource("ViewWriter.xml");

-    if (urlDesc == null) {

-      urlDesc = RutaTestUtils.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/engine/ViewWriter.xml");

-    }

-    File descFile = new File(urlDesc.toURI());

-

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-    TypeSystemDescription tsd = aed.getAnalysisEngineMetaData().getTypeSystem();

-    tsd.addType(TEST_TYPE, "Type for Testing", "uima.tcas.Annotation");

-

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    String module = scriptFile.getName().substring(0, scriptFile.getName().length() - 5);

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, module);

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { scriptFile.getParentFile()

-            .getAbsolutePath() });

-    String aeName = descFile.getName().substring(0, descFile.getName().length() - 4);

-    ae.setConfigParameterValue(RutaEngine.PARAM_ADDITIONAL_ENGINES, new String[] { aeName });

-    ae.setConfigParameterValue(RutaEngine.PARAM_DESCRIPTOR_PATHS, new String[] { descFile.getParentFile()

-            .getAbsolutePath() });

-    ae.reconfigure();

-

-    CAS cas = ae.newCAS();

-    cas.setDocumentText("This is the default view.");

-    CAS newView = cas.createView(NEW_VIEW);

-    newView.setDocumentText("This is a new view.");

-    Type type = cas.getTypeSystem().getType(TEST_TYPE);

-    AnnotationFS createAnnotation = newView.createAnnotation(type, 10, 13);

-    newView.addFsToIndexes(createAnnotation);

-

-    ae.process(cas);

-

-    cas.reset();

-    FileInputStream stream = new FileInputStream(xmiOutputFile);

-    XmiCasDeserializer.deserialize(stream, cas, true);

-

-    assertEquals("This is a new view.", cas.getDocumentText());

-    type = cas.getTypeSystem().getType(TEST_TYPE);

-    AnnotationIndex<AnnotationFS> ai = cas.getAnnotationIndex(type);

-    assertEquals(1, ai.size());

-    AnnotationFS next = ai.iterator().next();

-    assertEquals("new", next.getCoveredText());

-

-    if (cas != null) {

-      cas.release();

-    }

-    if (newView != null) {

-      newView.release();

-    }

-    stream.close();

-    in.close();

-    xmiOutputFile.delete();

-    scriptFile.delete();

-  }

-

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/seed/DefaultSeederTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/seed/DefaultSeederTest.java
deleted file mode 100644
index 6647bc3..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/seed/DefaultSeederTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*

- * 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.ruta.seed;

-

-import static org.junit.Assert.assertEquals;

-

-import java.net.URL;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.engine.RutaTestUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.junit.Test;

-

-public class DefaultSeederTest {

-  @Test

-  public void test() throws Exception {

-    URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");

-    if (url == null) {

-      url = RutaTestUtils.class.getClassLoader().getResource(

-              "org/apache/uima/ruta/TestEngine.xml");

-    }

-    XMLInputSource in = new XMLInputSource(url);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-    CAS cas = ae.newCAS();

-

-    String text = "Different kinds of tokens like ApacheUIMA % &amp; <nomarkup !?.;:,"

-            + " and also <FONT CLASS=\"western\" ALIGN=JUSTIFY "

-            + "STYLE=\"margin-bottom: 0cm\">html <b>markup</b></FONT>" + "<br/>\n";

-    cas.setDocumentText(text);

-

-    DefaultSeeder seeder = new DefaultSeeder();

-    Type type = seeder.seed(text, cas);

-    assertEquals("org.apache.uima.ruta.type.TokenSeed", type.getName());

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(type);

-    assertEquals(40, annotationIndex.size());

-    FSIterator<AnnotationFS> iterator = annotationIndex.iterator();

-

-    assertEquals("CW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("CW", iterator.next().getType().getShortName());

-    assertEquals("CAP", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SPECIAL", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("AMP", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SPECIAL", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("EXCLAMATION", iterator.next().getType().getShortName());

-    assertEquals("QUESTION", iterator.next().getType().getShortName());

-    assertEquals("PERIOD", iterator.next().getType().getShortName());

-    assertEquals("SEMICOLON", iterator.next().getType().getShortName());

-    assertEquals("COLON", iterator.next().getType().getShortName());

-    assertEquals("COMMA", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("MARKUP", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("SPACE", iterator.next().getType().getShortName());

-    assertEquals("MARKUP", iterator.next().getType().getShortName());

-    assertEquals("SW", iterator.next().getType().getShortName());

-    assertEquals("MARKUP", iterator.next().getType().getShortName());

-    assertEquals("MARKUP", iterator.next().getType().getShortName());

-    assertEquals("MARKUP", iterator.next().getType().getShortName());

-    assertEquals("BREAK", iterator.next().getType().getShortName());

-    

-    cas.release();

-  }

-  

-  

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ActionVerbalizerTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ActionVerbalizerTest.java
deleted file mode 100644
index 33f9c45..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ActionVerbalizerTest.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*

- * 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.ruta.verbalizer;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.logging.Level;

-

-import org.apache.uima.ruta.action.AbstractRutaAction;

-import org.apache.uima.ruta.action.AddAction;

-import org.apache.uima.ruta.action.AssignAction;

-import org.apache.uima.ruta.action.CallAction;

-import org.apache.uima.ruta.action.ClearAction;

-import org.apache.uima.ruta.action.ColorAction;

-import org.apache.uima.ruta.action.ConfigureAction;

-import org.apache.uima.ruta.action.CreateAction;

-import org.apache.uima.ruta.action.DelAction;

-import org.apache.uima.ruta.action.DynamicAnchoringAction;

-import org.apache.uima.ruta.action.ExecAction;

-import org.apache.uima.ruta.action.FillAction;

-import org.apache.uima.ruta.action.FilterTypeAction;

-import org.apache.uima.ruta.action.GatherAction;

-import org.apache.uima.ruta.action.GetAction;

-import org.apache.uima.ruta.action.GetFeatureAction;

-import org.apache.uima.ruta.action.GetListAction;

-import org.apache.uima.ruta.action.LogAction;

-import org.apache.uima.ruta.action.MarkAction;

-import org.apache.uima.ruta.action.MarkFastAction;

-import org.apache.uima.ruta.action.MarkLastAction;

-import org.apache.uima.ruta.action.MarkOnceAction;

-import org.apache.uima.ruta.action.MarkTableAction;

-import org.apache.uima.ruta.action.MatchedTextAction;

-import org.apache.uima.ruta.action.MergeAction;

-import org.apache.uima.ruta.action.RemoveDuplicateAction;

-import org.apache.uima.ruta.action.ReplaceAction;

-import org.apache.uima.ruta.action.RetainTypeAction;

-import org.apache.uima.ruta.action.SetFeatureAction;

-import org.apache.uima.ruta.action.ShiftAction;

-import org.apache.uima.ruta.action.TransferAction;

-import org.apache.uima.ruta.action.TrieAction;

-import org.apache.uima.ruta.action.UnmarkAction;

-import org.apache.uima.ruta.action.UnmarkAllAction;

-import org.apache.uima.ruta.expression.IRutaExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.list.ListExpression;

-import org.apache.uima.ruta.expression.list.SimpleStringListExpression;

-import org.apache.uima.ruta.expression.list.SimpleTypeListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.ReferenceNumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.resource.ReferenceWordListExpression;

-import org.apache.uima.ruta.expression.resource.ReferenceWordTableExpression;

-import org.apache.uima.ruta.expression.resource.WordListExpression;

-import org.apache.uima.ruta.expression.resource.WordTableExpression;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.string.SimpleStringExpression;

-import org.apache.uima.ruta.expression.type.ReferenceTypeExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-import org.junit.Test;

-

-public class ActionVerbalizerTest {

-

-  @SuppressWarnings("unchecked")

-  @Test

-  public void test() {

-    RutaVerbalizer v = new RutaVerbalizer();

-    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();

-    List<IStringExpression> stringExprList = new ArrayList<IStringExpression>();

-    List<IRutaExpression> exprList = new ArrayList<IRutaExpression>();

-    List<INumberExpression> indexes = new ArrayList<INumberExpression>();

-    String var = "anyVar";

-    TypeExpression typeExpr1 = new SimpleTypeExpression("Type1");

-    TypeExpression typeExpr2 = new ReferenceTypeExpression("typeVar");

-    typeExprList.add(typeExpr1);

-    typeExprList.add(typeExpr2);

-    INumberExpression numExpr1 = new SimpleNumberExpression(4);

-    INumberExpression numExpr2 = new ReferenceNumberExpression("numVar");

-    IBooleanExpression boolExpr1 = new SimpleBooleanExpression(true);

-    AbstractStringExpression stringExpr = new SimpleStringExpression("string");

-    stringExprList.add(stringExpr);

-    exprList.add(typeExpr1);

-    WordTableExpression wordTableExpr = new ReferenceWordTableExpression(var);

-    WordListExpression wordListExpr = new ReferenceWordListExpression(var);

-    TypeListExpression typeListExpr = new SimpleTypeListExpression(typeExprList);

-    StringListExpression stringListExpr = new SimpleStringListExpression(stringExprList);

-    Map<IStringExpression, IRutaExpression> stringExprMap = new HashMap<IStringExpression, IRutaExpression>();

-    Map<IStringExpression, INumberExpression> stringExprNumExprMap = new HashMap<IStringExpression, INumberExpression>();

-    Map<IStringExpression, IRutaExpression> stringExprTypeExprMap = new HashMap<IStringExpression, IRutaExpression>();

-    @SuppressWarnings("rawtypes")

-    ListExpression listExpr = new SimpleTypeListExpression(typeExprList);

-    @SuppressWarnings("rawtypes")

-    List<ListExpression> listExprList = new ArrayList<ListExpression>();

-    listExprList.add(listExpr);

-    stringExprMap.put(stringExpr, stringExpr);

-    stringExprNumExprMap.put(stringExpr, numExpr1);

-    stringExprTypeExprMap.put(stringExpr, typeExpr1);

-    indexes.add(numExpr1);

-    indexes.add(numExpr2);

-    AbstractRutaAction a = null;

-    String s = null;

-

-    // ADD

-    a = new AddAction(var, exprList);

-    s = v.verbalize(a);

-    assertEquals("ADD(anyVar, Type1)", s);

-

-    // ASSIGN

-    a = new AssignAction(var, stringExpr);

-    s = v.verbalize(a);

-    assertEquals("ASSIGN(anyVar, \"string\")", s);

-

-    // CALL

-    a = new CallAction(var);

-    s = v.verbalize(a);

-    assertEquals("CALL(anyVar)", s);

-

-    // CLEAR

-    a = new ClearAction(var);

-    s = v.verbalize(a);

-    assertEquals("CLEAR(anyVar)", s);

-

-    // COLOR

-    a = new ColorAction(typeExpr1, stringExpr, stringExpr, boolExpr1);

-    s = v.verbalize(a);

-    assertEquals("COLOR(Type1, \"string\", \"string\", true)", s);

-

-    // CONFIGURE

-    a = new ConfigureAction(var, stringExprMap);

-    s = v.verbalize(a);

-    assertEquals("CONFIGURE(anyVar, \"string\" = \"string\")", s);

-

-    // CREATE

-    a = new CreateAction(typeExpr1, stringExprMap, indexes);

-    s = v.verbalize(a);

-    assertEquals("CREATE(Type1, 4, numVar, \"string\" = \"string\")", s);

-

-    // DEL

-    a = new DelAction();

-    s = v.verbalize(a);

-    assertEquals("DEL", s);

-

-    // DYNAMICANCHORING

-    a = new DynamicAnchoringAction(boolExpr1, numExpr1, numExpr2);

-    s = v.verbalize(a);

-    assertEquals("DYNAMICANCHORING(true, 4, numVar)", s);

-

-    // EXEC

-    a = new ExecAction(var, typeListExpr, stringExpr);

-    s = v.verbalize(a);

-    assertEquals("EXEC(\"string\", anyVar, {Type1, typeVar})", s);

-

-    // FILL

-    a = new FillAction(typeExpr1, stringExprMap);

-    s = v.verbalize(a);

-    assertEquals("FILL(Type1, \"string\" = \"string\")", s);

-

-    // FILTERTYPE

-    a = new FilterTypeAction(typeExprList);

-    s = v.verbalize(a);

-    assertEquals("FILTERTYPE(Type1, typeVar)", s);

-

-    // GATHER

-    a = new GatherAction(typeExpr1, stringExprMap, indexes);

-    s = v.verbalize(a);

-    assertEquals("GATHER(Type1, 4, numVar, \"string\" = \"string\")", s);

-

-    // GET

-    a = new GetAction(listExpr, var, stringExpr);

-    s = v.verbalize(a);

-    assertEquals("GET({Type1, typeVar}, anyVar, \"string\")", s);

-

-    // GETFEATURE

-    a = new GetFeatureAction(stringExpr, var);

-    s = v.verbalize(a);

-    assertEquals("GETFEATURE(\"string\", anyVar)", s);

-

-    // GETLIST

-    a = new GetListAction(var, stringExpr);

-    s = v.verbalize(a);

-    assertEquals("GETLIST(anyVar, \"string\")", s);

-

-    // LOG

-    a = new LogAction(stringExpr, Level.INFO);

-    s = v.verbalize(a);

-    assertEquals("LOG(\"string\", INFO)", s);

-

-    // MARK

-    a = new MarkAction(typeExpr1, null, indexes);

-    s = v.verbalize(a);

-    assertEquals("MARK(Type1, 4, numVar)", s);

-

-    // MARKFAST

-    a = new MarkFastAction(typeExpr1, stringListExpr, boolExpr1, numExpr1, boolExpr1);

-    s = v.verbalize(a);

-    assertEquals("MARKFAST(Type1, {\"string\"}, true, 4, true)", s);

-

-    // MARKLAST

-    a = new MarkLastAction(typeExpr1);

-    s = v.verbalize(a);

-    assertEquals("MARKLAST(Type1)", s);

-

-    // MARKONCE

-    a = new MarkOnceAction(typeExpr1, null, indexes);

-    s = v.verbalize(a);

-    assertEquals("MARKONCE(Type1, 4, numVar)", s);

-

-    // MARKSCORE

-    a = new MarkAction(typeExpr1, numExpr1, indexes);

-    s = v.verbalize(a);

-    assertEquals("MARKSCORE(4, Type1, 4, numVar)", s);

-

-    // MARKTABLE

-    a = new MarkTableAction(typeExpr1, numExpr1, wordTableExpr, stringExprNumExprMap, boolExpr1,

-            numExpr1, stringExpr, numExpr1);

-    s = v.verbalize(a);

-    assertEquals("MARKTABLE(Type1, 4, anyVar, \"string\" = 4, , true, 4, \"string\", 4)", s);

-

-    // MATCHEDTEXT

-    a = new MatchedTextAction(var, indexes);

-    s = v.verbalize(a);

-    assertEquals("MATCHEDTEXT(anyVar, 4, numVar)", s);

-

-    // MERGE

-    a = new MergeAction(boolExpr1, var, listExprList);

-    s = v.verbalize(a);

-    assertEquals("MERGE(true, anyVar, {Type1, typeVar})", s);

-

-    // REMOVEDUPLICATE

-    a = new RemoveDuplicateAction(var);

-    s = v.verbalize(a);

-    assertEquals("REMOVEDUPLICATE(anyVar)", s);

-

-    // REPLACE

-    a = new ReplaceAction(stringExpr);

-    s = v.verbalize(a);

-    assertEquals("REPLACE(\"string\")", s);

-

-    // RETAINTYPE

-    a = new RetainTypeAction(typeExprList);

-    s = v.verbalize(a);

-    assertEquals("RETAINTYPE(Type1, typeVar)", s);

-

-    // SETFEATURE

-    a = new SetFeatureAction(stringExpr, typeExpr1);

-    s = v.verbalize(a);

-    assertEquals("SETFEATURE(\"string\", Type1)", s);

-

-    // SHIFT

-    a = new ShiftAction(typeExpr1, indexes);

-    s = v.verbalize(a);

-    assertEquals("SHIFT(Type1, 4, numVar)", s);

-

-    // TRANSFER

-    a = new TransferAction(typeExpr1);

-    s = v.verbalize(a);

-    assertEquals("TRANSFER(Type1)", s);

-

-    // TRIE

-    a = new TrieAction(wordListExpr, stringExprTypeExprMap, boolExpr1, numExpr1, boolExpr1,

-            numExpr1, stringExpr);

-    s = v.verbalize(a);

-    assertEquals("TRIE(\"string\" = Type1, anyVar, true, 4, true, 4, \"string\")", s);

-

-    // UNMARK

-    a = new UnmarkAction(typeExpr1, indexes, boolExpr1);

-    s = v.verbalize(a);

-    assertEquals("UNMARK(Type1, 4, numVar, true)", s);

-

-    // UNMARKALL

-    a = new UnmarkAllAction(typeExpr1, typeListExpr);

-    s = v.verbalize(a);

-    assertEquals("UNMARKALL(Type1, {Type1, typeVar})", s);

-

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ConditionVerbalizerTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ConditionVerbalizerTest.java
deleted file mode 100644
index 3147a29..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ConditionVerbalizerTest.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*

- * 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.ruta.verbalizer;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.condition.AbstractRutaCondition;

-import org.apache.uima.ruta.condition.AfterCondition;

-import org.apache.uima.ruta.condition.AndCondition;

-import org.apache.uima.ruta.condition.BeforeCondition;

-import org.apache.uima.ruta.condition.ContainsCondition;

-import org.apache.uima.ruta.condition.ContextCountCondition;

-import org.apache.uima.ruta.condition.CountCondition;

-import org.apache.uima.ruta.condition.CurrentCountCondition;

-import org.apache.uima.ruta.condition.EndsWithCondition;

-import org.apache.uima.ruta.condition.FeatureCondition;

-import org.apache.uima.ruta.condition.IfCondition;

-import org.apache.uima.ruta.condition.InListCondition;

-import org.apache.uima.ruta.condition.IsCondition;

-import org.apache.uima.ruta.condition.LastCondition;

-import org.apache.uima.ruta.condition.MOfNCondition;

-import org.apache.uima.ruta.condition.NearCondition;

-import org.apache.uima.ruta.condition.NotCondition;

-import org.apache.uima.ruta.condition.OrCondition;

-import org.apache.uima.ruta.condition.ParseCondition;

-import org.apache.uima.ruta.condition.PartOfCondition;

-import org.apache.uima.ruta.condition.PartOfNeqCondition;

-import org.apache.uima.ruta.condition.PositionCondition;

-import org.apache.uima.ruta.condition.RegExpCondition;

-import org.apache.uima.ruta.condition.ScoreCondition;

-import org.apache.uima.ruta.condition.SizeCondition;

-import org.apache.uima.ruta.condition.StartsWithCondition;

-import org.apache.uima.ruta.condition.TotalCountCondition;

-import org.apache.uima.ruta.condition.VoteCondition;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.list.SimpleStringListExpression;

-import org.apache.uima.ruta.expression.list.SimpleTypeListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.ReferenceNumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.string.SimpleStringExpression;

-import org.apache.uima.ruta.expression.type.ReferenceTypeExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-import org.junit.Test;

-

-public class ConditionVerbalizerTest {

-

-  @Test

-  public void test() {

-    RutaVerbalizer v = new RutaVerbalizer();

-    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();

-    List<IStringExpression> stringExprList = new ArrayList<IStringExpression>();

-    String var = "anyVar";

-    IStringExpression varExpr = new ReferenceNumberExpression(var);

-    TypeExpression typeExpr1 = new SimpleTypeExpression("Type1");

-    TypeExpression typeExpr2 = new ReferenceTypeExpression("typeVar");

-    typeExprList.add(typeExpr1);

-    typeExprList.add(typeExpr2);

-    INumberExpression numExpr1 = new SimpleNumberExpression(4);

-    INumberExpression numExpr2 = new ReferenceNumberExpression("numVar");

-    IBooleanExpression boolExpr1 = new SimpleBooleanExpression(true);

-    IStringExpression stringExpr = new SimpleStringExpression("string");

-    stringExprList.add(stringExpr);

-    TypeListExpression typeListExpr = new SimpleTypeListExpression(typeExprList);

-    StringListExpression stringListExpr = new SimpleStringListExpression(stringExprList);

-    AbstractRutaCondition c = null;

-    String s = null;

-

-    // AFTER

-    c = new AfterCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("AFTER(Type1)", s);

-

-    c = new AfterCondition(typeExpr2);

-    s = v.verbalize(c);

-    assertEquals("AFTER(typeVar)", s);

-

-    c = new AfterCondition(typeListExpr);

-    s = v.verbalize(c);

-    assertEquals("AFTER({Type1, typeVar})", s);

-

-    // AND

-    List<AbstractRutaCondition> conds = new ArrayList<AbstractRutaCondition>();

-    AbstractRutaCondition c1 = new AfterCondition(typeExpr2);

-    AbstractRutaCondition c2 = new AfterCondition(typeListExpr);

-    conds.add(c1);

-    conds.add(c2);

-    c = new AndCondition(conds);

-    s = v.verbalize(c);

-    assertEquals("AND(AFTER(typeVar), AFTER({Type1, typeVar}))", s);

-

-    // BEFORE

-    c = new BeforeCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("BEFORE(Type1)", s);

-

-    c = new BeforeCondition(typeExpr2);

-    s = v.verbalize(c);

-    assertEquals("BEFORE(typeVar)", s);

-

-    c = new BeforeCondition(typeListExpr);

-    s = v.verbalize(c);

-    assertEquals("BEFORE({Type1, typeVar})", s);

-

-    // CONTAINS

-    c = new ContainsCondition(typeExpr1, numExpr1, numExpr2, boolExpr1);

-    s = v.verbalize(c);

-    assertEquals("CONTAINS(Type1, 4, numVar, true)", s);

-

-    c = new ContainsCondition(typeExpr2, null, null, null);

-    s = v.verbalize(c);

-    assertEquals("CONTAINS(typeVar)", s);

-

-    c = new ContainsCondition(typeListExpr, typeExpr2, null, null, null);

-    s = v.verbalize(c);

-    assertEquals("CONTAINS({Type1, typeVar}, typeVar)", s);

-

-    // CONTEXTCOUNT

-    c = new ContextCountCondition(typeExpr1, numExpr1, numExpr2, var);

-    s = v.verbalize(c);

-    assertEquals("CONTEXTCOUNT(Type1, 4, numVar, anyVar)", s);

-

-    // COUNT

-    c = new CountCondition(typeExpr1, numExpr1, numExpr2, var);

-    s = v.verbalize(c);

-    assertEquals("COUNT(Type1, 4, numVar, anyVar)", s);

-

-    c = new CountCondition(typeListExpr, typeExpr2, null, null, null);

-    s = v.verbalize(c);

-    assertEquals("COUNT({Type1, typeVar}, typeVar)", s);

-

-    // CURRENTCOUNT

-    c = new CurrentCountCondition(typeExpr1, numExpr1, numExpr2, var);

-    s = v.verbalize(c);

-    assertEquals("CURRENTCOUNT(Type1, 4, numVar, anyVar)", s);

-

-    // ENDSWITH

-    c = new EndsWithCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("ENDSWITH(Type1)", s);

-

-    c = new EndsWithCondition(typeListExpr);

-    s = v.verbalize(c);

-    assertEquals("ENDSWITH({Type1, typeVar})", s);

-

-    // FEATURE

-    c = new FeatureCondition(stringExpr, stringExpr);

-    s = v.verbalize(c);

-    assertEquals("FEATURE(\"string\", \"string\")", s);

-

-    // IF

-    c = new IfCondition(boolExpr1);

-    s = v.verbalize(c);

-    assertEquals("IF(true)", s);

-

-    // INLIST

-    c = new InListCondition(stringListExpr, stringExpr);

-    s = v.verbalize(c);

-    assertEquals("INLIST({\"string\"}, \"string\")", s);

-

-    // IS

-    c = new IsCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("IS(Type1)", s);

-

-    c = new IsCondition(typeListExpr);

-    s = v.verbalize(c);

-    assertEquals("IS({Type1, typeVar})", s);

-

-    // LAST

-    c = new LastCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("LAST(Type1)", s);

-

-    // MOFN

-    c = new MOfNCondition(conds, numExpr1, numExpr2);

-    s = v.verbalize(c);

-    assertEquals("MOFN(4, numVar, AFTER(typeVar), AFTER({Type1, typeVar}))", s);

-

-    // NEAR

-    c = new NearCondition(typeExpr1, numExpr1, numExpr2, boolExpr1, boolExpr1);

-    s = v.verbalize(c);

-    assertEquals("NEAR(Type1, 4, numVar, true, true)", s);

-

-    // NOT

-    c = new NotCondition(c1);

-    s = v.verbalize(c);

-    assertEquals("-AFTER(typeVar)", s);

-

-    // OR

-    c = new OrCondition(conds);

-    s = v.verbalize(c);

-    assertEquals("OR(AFTER(typeVar), AFTER({Type1, typeVar}))", s);

-

-    // PARSE

-    c = new ParseCondition(var);

-    s = v.verbalize(c);

-    assertEquals("PARSE(anyVar)", s);

-

-    // PARTOF

-    c = new PartOfCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("PARTOF(Type1)", s);

-

-    c = new PartOfCondition(typeListExpr);

-    s = v.verbalize(c);

-    assertEquals("PARTOF({Type1, typeVar})", s);

-

-    // PARTOFNEQ

-    c = new PartOfNeqCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("PARTOFNEQ(Type1)", s);

-

-    c = new PartOfNeqCondition(typeListExpr);

-    s = v.verbalize(c);

-    assertEquals("PARTOFNEQ({Type1, typeVar})", s);

-

-    // POSITION

-    c = new PositionCondition(typeExpr1, numExpr1, boolExpr1);

-    s = v.verbalize(c);

-    assertEquals("POSITION(Type1, 4, true)", s);

-

-    // REGEXP

-    c = new RegExpCondition(stringExpr, boolExpr1);

-    s = v.verbalize(c);

-    assertEquals("REGEXP(\"string\", true)", s);

-

-    c = new RegExpCondition(varExpr, stringExpr, boolExpr1);

-    s = v.verbalize(c);

-    assertEquals("REGEXP(anyVar, \"string\", true)", s);

-

-    // SCORE

-    c = new ScoreCondition(numExpr1, numExpr2, var);

-    s = v.verbalize(c);

-    assertEquals("SCORE(4, numVar, anyVar)", s);

-

-    // SIZE

-    c = new SizeCondition(typeListExpr, numExpr1, numExpr2, var);

-    s = v.verbalize(c);

-    assertEquals("SIZE({Type1, typeVar}, 4, numVar, anyVar)", s);

-

-    // STARTSWITH

-    c = new StartsWithCondition(typeExpr1);

-    s = v.verbalize(c);

-    assertEquals("STARTSWITH(Type1)", s);

-

-    c = new StartsWithCondition(typeListExpr);

-    s = v.verbalize(c);

-    assertEquals("STARTSWITH({Type1, typeVar})", s);

-

-    // TOTALCOUNT

-    c = new TotalCountCondition(typeExpr1, numExpr1, numExpr2, var);

-    s = v.verbalize(c);

-    assertEquals("TOTALCOUNT(Type1, 4, numVar, anyVar)", s);

-

-    // VOTE

-    c = new VoteCondition(typeExpr1, typeExpr2);

-    s = v.verbalize(c);

-    assertEquals("VOTE(Type1, typeVar)", s);

-

-  }

-}

diff --git a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java b/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java
deleted file mode 100644
index 1427251..0000000
--- a/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*

- * 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.ruta.verbalizer;

-

-import static org.junit.Assert.assertEquals;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.expression.bool.BooleanNumberExpression;

-import org.apache.uima.ruta.expression.bool.BooleanTypeExpression;

-import org.apache.uima.ruta.expression.bool.IBooleanExpression;

-import org.apache.uima.ruta.expression.bool.ReferenceBooleanExpression;

-import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;

-import org.apache.uima.ruta.expression.list.BooleanListExpression;

-import org.apache.uima.ruta.expression.list.NumberListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceBooleanListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceNumberListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceStringListExpression;

-import org.apache.uima.ruta.expression.list.ReferenceTypeListExpression;

-import org.apache.uima.ruta.expression.list.SimpleBooleanListExpression;

-import org.apache.uima.ruta.expression.list.SimpleNumberListExpression;

-import org.apache.uima.ruta.expression.list.SimpleStringListExpression;

-import org.apache.uima.ruta.expression.list.SimpleTypeListExpression;

-import org.apache.uima.ruta.expression.list.StringListExpression;

-import org.apache.uima.ruta.expression.list.TypeListExpression;

-import org.apache.uima.ruta.expression.number.ComposedNumberExpression;

-import org.apache.uima.ruta.expression.number.INumberExpression;

-import org.apache.uima.ruta.expression.number.ReferenceNumberExpression;

-import org.apache.uima.ruta.expression.number.SimpleNumberExpression;

-import org.apache.uima.ruta.expression.string.AbstractStringExpression;

-import org.apache.uima.ruta.expression.string.ComposedStringExpression;

-import org.apache.uima.ruta.expression.string.IStringExpression;

-import org.apache.uima.ruta.expression.string.ReferenceStringExpression;

-import org.apache.uima.ruta.expression.string.SimpleStringExpression;

-import org.apache.uima.ruta.expression.type.ReferenceTypeExpression;

-import org.apache.uima.ruta.expression.type.SimpleTypeExpression;

-import org.apache.uima.ruta.expression.type.TypeExpression;

-import org.apache.uima.ruta.verbalize.RutaVerbalizer;

-import org.junit.Test;

-

-public class ExpressionVerbalizerTest {

-

-  @SuppressWarnings("unchecked")

-  @Test

-  public void test() {

-    RutaVerbalizer v = new RutaVerbalizer();

-//    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();

-//    List<StringExpression> stringExprList = new ArrayList<StringExpression>();

-//    List<RutaExpression> exprList = new ArrayList<RutaExpression>();

-//    List<INumberExpression> indexes = new ArrayList<INumberExpression>();

-

-//    

-////    typeExprList.add(typeExpr1);

-////    typeExprList.add(typeExpr2);

-//    

-//

-//    StringExpression stringExpr = new SimpleStringExpression("string");

-//    stringExprList.add(stringExpr);

-////    exprList.add(typeExpr1);

-//    WordTableExpression wordTableExpr = new ReferenceWordTableExpression(var);

-//    WordListExpression wordListExpr = new ReferenceWordListExpression(var);

-//    TypeListExpression typeListExpr = new SimpleTypeListExpression(typeExprList);

-//    StringListExpression stringListExpr = new SimpleStringListExpression(stringExprList);

-//    Map<StringExpression, RutaExpression> stringExprMap = new HashMap<StringExpression, RutaExpression>();

-//    Map<StringExpression, INumberExpression> stringExprNumExprMap = new HashMap<StringExpression, INumberExpression>();

-//    Map<StringExpression, TypeExpression> stringExprTypeExprMap = new HashMap<StringExpression, TypeExpression>();

-//    @SuppressWarnings("rawtypes")

-//    ListExpression listExpr = new SimpleTypeListExpression(typeExprList);

-//    @SuppressWarnings("rawtypes")

-//    List<ListExpression> listExprList = new ArrayList<ListExpression>();

-//    listExprList.add(listExpr);

-//    stringExprMap.put(stringExpr, stringExpr);

-////    stringExprNumExprMap.put(stringExpr, numExpr1);

-////    stringExprTypeExprMap.put(stringExpr, typeExpr1);

-////    indexes.add(numExpr1);

-////    indexes.add(numExpr2);

-

-    String s = null;

-  String var = "anyVar";

-    TypeExpression typeExpr1 = new SimpleTypeExpression("Type1");

-    TypeExpression typeExpr2 = new ReferenceTypeExpression("typeVar");

-    

-    List<INumberExpression> numExprList1 = new ArrayList<INumberExpression>();

-    List<INumberExpression> numExprList2 = new ArrayList<INumberExpression>();

-    List<String> opList1 = new ArrayList<String>();

-    List<String> opList2 = new ArrayList<String>();

-    INumberExpression numExpr1 = new SimpleNumberExpression(4);

-    INumberExpression numExpr2 = new ReferenceNumberExpression("numVar");

-    INumberExpression numExpr3 = new ReferenceNumberExpression("4.9");

-    INumberExpression numExpr4 = new ReferenceNumberExpression("-4");

-    numExprList1.add(numExpr1);

-    numExprList1.add(numExpr2);

-    opList1.add("+");

-    opList2.add("*");

-    INumberExpression numExpr5 = new ComposedNumberExpression(numExprList1, opList1);

-    numExprList2.add(numExpr3);

-    numExprList2.add(numExpr5);

-    INumberExpression numExpr6 = new ComposedNumberExpression(numExprList2, opList2);

-    

-    s = v.verbalize(numExpr1);

-    assertEquals("4", s);

-    s = v.verbalize(numExpr2);

-    assertEquals("numVar", s);

-    s = v.verbalize(numExpr3);

-    assertEquals("4.9", s);

-    s = v.verbalize(numExpr4);

-    assertEquals("-4", s);

-    s = v.verbalize(numExpr5);

-    assertEquals("4 + numVar", s);

-    s = v.verbalize(numExpr6);

-    assertEquals("4.9 * 4 + numVar", s);

-    

-    

-    

-    IBooleanExpression boolExpr1 = new SimpleBooleanExpression(true);

-    IBooleanExpression boolExpr2 = new SimpleBooleanExpression(false);

-    IBooleanExpression boolExpr3 = new ReferenceBooleanExpression(var);

-    IBooleanExpression boolExpr4 = new BooleanNumberExpression(numExpr1, "==", numExpr2);

-    IBooleanExpression boolExpr5 = new BooleanNumberExpression(numExpr1, "!=", numExpr2);

-    IBooleanExpression boolExpr6 = new BooleanNumberExpression(numExpr1, "<=", numExpr2);

-    IBooleanExpression boolExpr7 = new BooleanNumberExpression(numExpr1, ">=", numExpr2);

-    IBooleanExpression boolExpr8 = new BooleanNumberExpression(numExpr1, "<", numExpr2);

-    IBooleanExpression boolExpr9 = new BooleanNumberExpression(numExpr1, ">", numExpr2);

-    IBooleanExpression boolExpr10 = new BooleanTypeExpression(typeExpr1, "==", typeExpr2);

-    IBooleanExpression boolExpr11 = new BooleanTypeExpression(typeExpr1, "!=", typeExpr2);

-    

-    s = v.verbalize(boolExpr1);

-    assertEquals("true", s);

-    s = v.verbalize(boolExpr2);

-    assertEquals("false", s);

-    s = v.verbalize(boolExpr3);

-    assertEquals("anyVar", s);

-    s = v.verbalize(boolExpr4);

-    assertEquals("4 == numVar", s);

-    s = v.verbalize(boolExpr5);

-    assertEquals("4 != numVar", s);

-    s = v.verbalize(boolExpr6);

-    assertEquals("4 <= numVar", s);

-    s = v.verbalize(boolExpr7);

-    assertEquals("4 >= numVar", s);

-    s = v.verbalize(boolExpr8);

-    assertEquals("4 < numVar", s);

-    s = v.verbalize(boolExpr9);

-    assertEquals("4 > numVar", s);

-    s = v.verbalize(boolExpr10);

-    assertEquals("Type1 == typeVar", s);

-    s = v.verbalize(boolExpr11);

-    assertEquals("Type1 != typeVar", s);

-

-    List<IStringExpression> stringExprList = new ArrayList<IStringExpression>();

-    AbstractStringExpression stringExpr1 = new SimpleStringExpression("string");

-    AbstractStringExpression stringExpr2 = new ReferenceStringExpression(var);

-    stringExprList.add(stringExpr1);

-    stringExprList.add(stringExpr2);

-    AbstractStringExpression stringExpr3 = new ComposedStringExpression(stringExprList);

-    

-    s = v.verbalize(stringExpr1);

-    assertEquals("\"string\"", s);

-    s = v.verbalize(stringExpr2);

-    assertEquals("anyVar", s);

-    s = v.verbalize(stringExpr3);

-    assertEquals("\"string\" + anyVar"  , s);

-    

-    

-    StringListExpression sle1 = new SimpleStringListExpression(stringExprList);

-    StringListExpression sle2 = new ReferenceStringListExpression(var);

-    s = v.verbalize(sle1);

-    assertEquals("{\"string\", anyVar}", s);

-    s = v.verbalize(sle2);

-    assertEquals("anyVar", s);

-    

-    List<IBooleanExpression> boolExprList = new ArrayList<IBooleanExpression>();

-    boolExprList.add(boolExpr1);

-    boolExprList.add(boolExpr3);

-    BooleanListExpression ble1 = new SimpleBooleanListExpression(boolExprList);

-    BooleanListExpression ble2 = new ReferenceBooleanListExpression(var);

-    s = v.verbalize(ble1);

-    assertEquals("{true, anyVar}", s);

-    s = v.verbalize(ble2);

-    assertEquals("anyVar", s);

-    

-    List<INumberExpression> numExprList = new ArrayList<INumberExpression>();

-    numExprList.add(numExpr1);

-    numExprList.add(numExpr3);

-    NumberListExpression nle1 = new SimpleNumberListExpression(numExprList);

-    NumberListExpression nle2 = new ReferenceNumberListExpression(var);

-    s = v.verbalize(nle1);

-    assertEquals("{4, 4.9}", s);

-    s = v.verbalize(nle2);

-    assertEquals("anyVar", s);

-    

-    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();

-    typeExprList.add(typeExpr1);

-    typeExprList.add(typeExpr2);

-    TypeListExpression tle1 = new SimpleTypeListExpression(typeExprList);

-    TypeListExpression tle2 = new ReferenceTypeListExpression(var);

-    s = v.verbalize(tle1);

-    assertEquals("{Type1, typeVar}", s);

-    s = v.verbalize(tle2);

-    assertEquals("anyVar", s);

-    

-  }

-}

diff --git a/trunk/ruta-core/src/test/resources/META-INF/org.apache.uima.fit/types.txt b/trunk/ruta-core/src/test/resources/META-INF/org.apache.uima.fit/types.txt
deleted file mode 100644
index f17c308..0000000
--- a/trunk/ruta-core/src/test/resources/META-INF/org.apache.uima.fit/types.txt
+++ /dev/null
@@ -1 +0,0 @@
-classpath*:org/apache/uima/ruta/MainTypeSystem.xml
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Additional.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Additional.ruta
deleted file mode 100644
index 65e4353..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Additional.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima.ruta;

-DECLARE NewType1, NewType2;

-TYPE RutaNum = org.apache.uima.ruta.type.NUM;

-RutaNum {-> NewType1};

-CW{-> NewType2};

-

-

-

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/AdditionalTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/AdditionalTypeSystem.xml
deleted file mode 100644
index b4b41e2..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/AdditionalTypeSystem.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>org.apache.uima.ruta.AdditionalTypeSystem</name>
-    <imports>
-        <import location="BasicTypeSystem.xml"/>
-    </imports>
-    <types>
-        <typeDescription>
-            <name>org.apache.uima.ruta.Additional.NewType1</name>
-            <description>Type defined in org.apache.uima.ruta.Additional</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-        <typeDescription>
-            <name>org.apache.uima.ruta.Additional.NewType2</name>
-            <description>Type defined in org.apache.uima.ruta.Additional</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/BasicTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/BasicTypeSystem.xml
deleted file mode 100644
index e2f74ca..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/BasicTypeSystem.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>BasicTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <imports>

-    <import location="InternalTypeSystem.xml"/>

-  </imports>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ALL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.TokenSeed</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ANY</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.MARKUP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ALL</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.W</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SW</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.CAP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.W</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.PERIOD</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SENTENCEEND</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.QUESTION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.COMMA</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EXCLAMATION</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SENTENCEEND</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SEMICOLON</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.PM</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.WS</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NUM</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPECIAL</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.NBSP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.SPACE</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.AMP</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.SPACE</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.BREAK</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.WS</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Document</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TokenSeed</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ConflictingTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ConflictingTypeSystem.xml
deleted file mode 100644
index eac931b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ConflictingTypeSystem.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>ConflictingTypeSystem</name>
-    <description>
-        A type system having type whose short names conflict with BasicTypeSystem.
-    </description>
-    <version>1.0</version>
-    <vendor/>
-    <types>
-        <typeDescription>
-            <name>org.apache.uima.ruta.type.conflicting.W</name>
-            <description/>
-            <supertypeName>org.apache.uima.ruta.type.ANY</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ConflictingTypeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ConflictingTypeTest.ruta
deleted file mode 100644
index 19dde45..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ConflictingTypeTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE T1;
-
-// there is no way to know if this matches org.apache.uima.ruta.ConflictingTypeSystem.W or org.apache.uima.ruta.W
-W{->T1};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/CustomViewTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/CustomViewTest.ruta
deleted file mode 100644
index a8f4326..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/CustomViewTest.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1;

-

-W{->T1};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/DynamicAnchoring2Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/DynamicAnchoring2Test.ruta
deleted file mode 100644
index 0d29f97..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/DynamicAnchoring2Test.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-CW SW{-> MARK(T1,1,2)};

-

-SW CW{-> MARK(T2,1,2)};

-

-CW SW{-> MARK(T3,1,2,3)} CW;
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/DynamicAnchoring2Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/DynamicAnchoring2Test.txt
deleted file mode 100644
index 651a0e3..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/DynamicAnchoring2Test.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A b A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EmptyDocumentTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EmptyDocumentTest.txt
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EmptyDocumentTest.txt
+++ /dev/null
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EqualShortNameTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EqualShortNameTest.ruta
deleted file mode 100644
index 63640b9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EqualShortNameTest.ruta
+++ /dev/null
@@ -1,17 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE T1, T2, T3, T4;
-DECLARE NUM;
-
-TYPE NUM_Ruta = org.apache.uima.ruta.type.NUM;
-TYPE NUM_Test = org.apache.uima.EqualShortNameTest.NUM;
-
-
-CW { -> MARK(org.apache.uima.EqualShortNameTest.NUM)};
-SW { -> MARK(NUM_Test)};
-
-org.apache.uima.EqualShortNameTest.NUM{-> MARK(T1)};
-NUM_Test{-> MARK(T2)};
-
-org.apache.uima.ruta.type.NUM {-> MARK(T3)};
-NUM_Ruta {-> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EqualShortNameTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EqualShortNameTest.txt
deleted file mode 100644
index 83dd75d..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/EqualShortNameTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Only some text with number: 1, 2, 3 ...
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FeatureMatch1Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FeatureMatch1Test.ruta
deleted file mode 100644
index 47bc078..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FeatureMatch1Test.ruta
+++ /dev/null
@@ -1,39 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-DECLARE Annotation D(STRING ds);
-DECLARE D C(INT ci, BOOLEAN cb);
-DECLARE D B(C bc);
-DECLARE Annotation A(B ab, C ac);
-
-INT count;
-CW{ -> ASSIGN(count, count+1), CREATE(C, "ds" = "firstname", "ci" = count, "cb" = false)} CW{ -> 
-    GATHER(B, "bc" = 1), FILL(B, "ds" = "lastname")};
-C{REGEXP("M.*") -> SETFEATURE("cb", true)};
-(CW CW){-> CREATE(A, "ab" = B, "ac" = C)};
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, 
-    T10, T11, T12, T13, T14, T15, T16, T17, T18, T19;
-
-C.cb==true{ -> MARK(T1)};
-B.bc.cb==true{ -> MARK(T2)};
-A.ac.cb==true{ -> MARK(T3)};
-A.ab.bc.cb==true{ -> MARK(T4)};
-
-D{FEATURE("ds", "firstname") -> MARK(T5)};
-B{FEATURE("ds", "lastname") -> MARK(T6)};
-D.ds=="lastname"{-> MARK(T7)};
-B.ds=="lastname"{-> MARK(T8)};
-A.ab.ds=="lastname"{-> MARK(T9)};
-
-C.ci==3{-> MARK(T10)};
-B.bc.ci==3{-> MARK(T11)};
-A.ab.bc.ci==3{-> MARK(T12)};
-
-A.ab.bc{-> MARK(T13)};
-A.ab{-> MARK(T14)};
-A.ac{-> MARK(T15)};
-
-(A.ac.ci==1 # A.ac.ci==2 # A.ac.ci==3){-> MARK(T16)};
-(A.ac.ci==1 # A.ac # A.ab){-> MARK(T17)};
-(A{A.ac.ci==1} # A{A.ac.ci==2} # A{A.ac.ci==3}){-> MARK(T18)};
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FeatureMatch1Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FeatureMatch1Test.txt
deleted file mode 100644
index 85a5b42..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FeatureMatch1Test.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter Kluegl, Joern Kottmann, Marshall Schor
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FilteringTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FilteringTest.ruta
deleted file mode 100644
index 48ca56b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FilteringTest.ruta
+++ /dev/null
@@ -1,28 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;
-
-
-RETAINTYPE(SPACE);
-
-W W{-> MARK(T1)};
-
-W PM SPACE W{-> MARK(T2,1,2,3,4)};
-
-FILTERTYPE(W);
-
-W{-> MARK(T3)};
-
-(PM SPACE)+{-> MARK(T4)};
-
-RETAINTYPE(W);
-
-FILTERTYPE(T4);
-
-W ANY{-> MARK(T5,1,2)};
-
-FILTERTYPE, RETAINTYPE;
-
-(((CW PM) CW){-> MARK(T15)} COMMA)
-  (CW SW  (CW PERIOD){-> MARK(T16)})
-  {-> MARK(T17)};
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FilteringTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FilteringTest.txt
deleted file mode 100644
index b20a0b6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/FilteringTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter, Jochen, Flo und Georg.

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesFromTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesFromTypeSystem.ruta
deleted file mode 100644
index 24e0e40..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesFromTypeSystem.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT PACKAGE * FROM org.apache.uima.ruta.ImportStatementsTestTypeSystemWithManyPackages;
-
-W{REGEXP("First") -> MARK(Type1)};
-W{REGEXP("Second") -> MARK(Type2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesFromTypeSystemWithAmbiguousShortNames.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesFromTypeSystemWithAmbiguousShortNames.ruta
deleted file mode 100644
index 8fac1c7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesFromTypeSystemWithAmbiguousShortNames.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT PACKAGE * FROM org.apache.uima.ruta.ImportStatementsTestTypeSystemWithAmbiguousShortNames;
-
-W{REGEXP("First") -> MARK(Type1)};
-W{REGEXP("Second") -> MARK(Type2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesWithAliasFromTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesWithAliasFromTypeSystem.ruta
deleted file mode 100644
index 0fa4d6d..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportAllPackagesWithAliasFromTypeSystem.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT PACKAGE * FROM org.apache.uima.ruta.ImportStatementsTestTypeSystemWithManyPackages AS pkg;
-
-W{REGEXP("First") -> MARK(pkg.Type1)};
-W{REGEXP("Second") -> MARK(pkg.Type2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageAliasFromTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageAliasFromTypeSystem.ruta
deleted file mode 100644
index f3aee20..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageAliasFromTypeSystem.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT PACKAGE org.apache.uima.ruta.other FROM org.apache.uima.ruta.ImportStatementsTestTypeSystemWithAmbiguousShortNames AS p1;
-IMPORT PACKAGE org.apache.uima.ruta.other2 FROM org.apache.uima.ruta.ImportStatementsTestTypeSystemWithAmbiguousShortNames AS p2;
-
-W{REGEXP("First") -> MARK(p1.Type1)};
-W{REGEXP("Second") -> MARK(p2.Type1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageAs.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageAs.ruta
deleted file mode 100644
index 78ec7af..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageAs.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT PACKAGE org.apache.uima.ruta AS pkg;
-
-W{REGEXP("First") -> MARK(pkg.Type1)};
-W{REGEXP("Second") -> MARK(pkg.Type2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageFromCasTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageFromCasTypeSystem.ruta
deleted file mode 100644
index 2e0ed30..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageFromCasTypeSystem.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT PACKAGE org.apache.uima.ruta.other;
-IMPORT PACKAGE org.apache.uima.ruta.other2 AS other2;
-
-W{REGEXP("First") -> MARK(Type1)};
-W{REGEXP("Second") -> MARK(other2.Type1)};
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageFromTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageFromTypeSystem.ruta
deleted file mode 100644
index 0445f23..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportPackageFromTypeSystem.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT PACKAGE org.apache.uima.ruta.other FROM org.apache.uima.ruta.ImportStatementsTestTypeSystemWithAmbiguousShortNames;
-
-W{REGEXP("First") -> MARK(Type1)};
-W{REGEXP("Second") -> MARK(Type2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportStarFromTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportStarFromTypeSystem.ruta
deleted file mode 100644
index 2f4e1d7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportStarFromTypeSystem.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT * FROM org.apache.uima.ruta.ImportStatementsTestTypeSystem;
-
-W{REGEXP("First") -> MARK(Type1)};
-W{REGEXP("Second") -> MARK(Type2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportType.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportType.ruta
deleted file mode 100644
index 655cc6f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportType.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT org.apache.uima.ruta.Type1 FROM org.apache.uima.ruta.ImportStatementsTestTypeSystem;
-
-W{-> MARK(Type1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportTypeAs.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportTypeAs.ruta
deleted file mode 100644
index 8c534d3..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportTypeAs.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT org.apache.uima.ruta.Type1 FROM org.apache.uima.ruta.ImportStatementsTestTypeSystem AS A1;
-IMPORT org.apache.uima.ruta.Type2 AS A2;
-
-W{REGEXP("First") -> MARK(A1)};
-W{REGEXP("Second") -> MARK(A2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportTypeFromDefaultTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportTypeFromDefaultTypeSystem.ruta
deleted file mode 100644
index e66e5cf..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestImportTypeFromDefaultTypeSystem.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT org.apache.uima.ruta.Type1;
-
-W{-> MARK(Type1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystem.xml
deleted file mode 100644
index a3538e5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystem.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>ImportStatementsTestTypeSystem</name>
-  <description>
-    A type system to test ruta engine's import statements.
-  </description>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.Type1</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.Type2</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystemWithAmbiguousShortNames.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystemWithAmbiguousShortNames.xml
deleted file mode 100644
index 2946fc9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystemWithAmbiguousShortNames.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>ImportStatementsTestTypeSystem</name>
-  <description>
-    A type system to test ruta engine's import statements.
-  </description>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.other.Type1</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.other.Type2</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.other2.Type1</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.other2.Type2</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystemWithManyPackages.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystemWithManyPackages.xml
deleted file mode 100644
index 9fc19e5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestTypeSystemWithManyPackages.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <name>ImportStatementsTestTypeSystemWithManyPackages</name>
-  <description>
-    A type system to test ruta engine's import statements.
-  </description>
-  <version>1.0</version>
-  <vendor/>
-  <types>
-    <typeDescription>
-      <name>org.apache.uima.ruta.other3.Type1</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-    <typeDescription>
-      <name>org.apache.uima.ruta.other4.Type2</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestUnimportedTypesAreNotResolved.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestUnimportedTypesAreNotResolved.ruta
deleted file mode 100644
index df4b995..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ImportStatementsTestUnimportedTypesAreNotResolved.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-IMPORT org.apache.uima.ruta.Type1 FROM org.apache.uima.ruta.ImportStatementsTestTypeSystem;
-
-// Type2 is in org.apache.uima.ruta.ImportStatementsTestTypeSystem, but it is not imported. It should not be resolved.
-W{-> MARK(Type2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/IncompletePartitioningTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/IncompletePartitioningTest.ruta
deleted file mode 100644
index 3257d85..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/IncompletePartitioningTest.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-W{-PARTOF(T1)} W{-> MARK(T1, 1, 2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/IncompletePartitioningTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/IncompletePartitioningTest.txt
deleted file mode 100644
index 2b2e5af..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/IncompletePartitioningTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter, Jochen, Flo and Georg.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/InternalTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/InternalTypeSystem.xml
deleted file mode 100644
index e0e207c..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/InternalTypeSystem.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.

--->

-

-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <name>InternalTypeSystem</name>

-  <description/>

-  <version>1.0</version>

-  <vendor/>

-  <types>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaBasic</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>replacement</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaOptional</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>score</name>

-          <description/>

-          <rangeTypeName>uima.cas.Double</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugScriptApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>applied</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>tried</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>rules</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>matched</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>delegates</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugScriptApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugBlockApply</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleApply</supertypeName>

-      <features>

-        <featureDescription>

-          <name>innerApply</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugScriptApply</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.ProfiledAnnotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>baseCondition</name>

-          <description/>

-          <rangeTypeName>org.apache.uima.ruta.type.DebugEvaluatedCondition</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>elements</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatches</elementType>

-          <multipleReferencesAllowed>false</multipleReferencesAllowed>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugRuleElementMatches</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>matches</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugRuleElementMatch</elementType>

-        </featureDescription>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>ruleAnchor</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaColoring</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>bgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>targetType</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>fgColor</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>selected</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugEvaluatedCondition</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>element</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>value</name>

-          <description/>

-          <rangeTypeName>uima.cas.Boolean</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>conditions</name>

-          <description/>

-          <rangeTypeName>uima.cas.FSArray</rangeTypeName>

-          <elementType>org.apache.uima.ruta.type.DebugEvaluatedCondition</elementType>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugMatchedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugFailedRuleMatch</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.DebugRuleMatch</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalsePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.EvalAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>original</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.FalseNegative</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.ProfiledAnnotation</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-      <features>

-        <featureDescription>

-          <name>time</name>

-          <description/>

-          <rangeTypeName>uima.cas.Long</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.RutaFrame</name>

-      <description/>

-      <supertypeName>uima.tcas.Annotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.Statistics</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>name</name>

-          <description/>

-          <rangeTypeName>uima.cas.StringArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>total</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>amount</name>

-          <description/>

-          <rangeTypeName>uima.cas.IntegerArray</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>part</name>

-          <description/>

-          <rangeTypeName>uima.cas.DoubleArray</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.TruePositive</name>

-      <description/>

-      <supertypeName>org.apache.uima.ruta.type.EvalAnnotation</supertypeName>

-    </typeDescription>

-    <typeDescription>

-      <name>org.apache.uima.ruta.type.DebugCreatedBy</name>

-      <description/>

-      <supertypeName>uima.cas.TOP</supertypeName>

-      <features>

-        <featureDescription>

-          <name>rule</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>annotation</name>

-          <description/>

-          <rangeTypeName>uima.tcas.Annotation</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>script</name>

-          <description/>

-          <rangeTypeName>uima.cas.String</rangeTypeName>

-        </featureDescription>

-        <featureDescription>

-          <name>id</name>

-          <description/>

-          <rangeTypeName>uima.cas.Integer</rangeTypeName>

-        </featureDescription>

-      </features>

-    </typeDescription>

-  </types>

-</typeSystemDescription>

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LiteralStringMatchTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LiteralStringMatchTest.ruta
deleted file mode 100644
index e731a2f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LiteralStringMatchTest.ruta
+++ /dev/null
@@ -1,27 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-

-"CW"{-> MARK(T1)};

-

-"CW" "SW"{-> MARK(T2)};

-

-"SW" "SW"{-> MARK(T3)};

-

-("CW" "COMMA")+{-> MARK(T6)};

-

-("CW" | "SW"){->MARK(T7)};

-

-("CW" | "SW")+{->MARK(T8)};

-

-("CW" "COMMA")+ "CW"{-> MARK(T9,1,2)};

-

-("CW" ("COMMA" | "SW"))+{-> MARK(T10)};

-

-("CW" ("COMMA" | "SW"))+ "CW" "PERIOD"+{-> MARK(T11,1,2,3)};

-

-("CW" ("COMMA" | "SW"){-> MARK(T12), MARK(T13,1,2)})+{-> MARK(T14)} 

-    "CW" "PERIOD"+;

-

-         
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LiteralStringMatchTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LiteralStringMatchTest.txt
deleted file mode 100644
index a1d551a..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LiteralStringMatchTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-CW COMMA CW COMMA CW SW CW PERIOD
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy1Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy1Test.ruta
deleted file mode 100644
index 9259f32..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy1Test.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-W+{-PARTOF(T1) -> MARK(T1)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy1Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy1Test.txt
deleted file mode 100644
index ac4bfb6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy1Test.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-X A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A Y
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy2Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy2Test.ruta
deleted file mode 100644
index e1c82d1..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy2Test.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-(W W)+{-PARTOF(T2) -> MARK(T2)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy2Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy2Test.txt
deleted file mode 100644
index ac4bfb6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/LongGreedy2Test.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-X A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

-A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A Y
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Main.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Main.ruta
deleted file mode 100644
index 45fe406..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Main.ruta
+++ /dev/null
@@ -1,3 +0,0 @@
-PACKAGE org.apache.uima.ruta;

-SCRIPT org.apache.uima.ruta.Additional;

-CALL(Additional);

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/MainTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/MainTypeSystem.xml
deleted file mode 100644
index af6eb70..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/MainTypeSystem.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>org.apache.uima.ruta.MainTypeSystem</name>
-    <imports>
-        <import location="BasicTypeSystem.xml"/>
-        <import location="AdditionalTypeSystem.xml"/>
-    </imports>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/NewCASPipelineTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/NewCASPipelineTest.ruta
deleted file mode 100644
index 7adf4aa..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/NewCASPipelineTest.ruta
+++ /dev/null
@@ -1 +0,0 @@
-Document{CONTAINS(CW)->MARK(T1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OptionalComposedEndTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OptionalComposedEndTest.ruta
deleted file mode 100644
index 0aff294..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OptionalComposedEndTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE T1,T2,T3,T4,T5;
-NUM{-PARTOF(T1)-> MARK(T1,1,2)} (COMMA NUM)?;
-NUM{-PARTOF(T2)-> MARK(T2,1,2)} (COMMA NUM)*;
-NUM{-PARTOF(T3)-> MARK(T3,1,2)} (COMMA NUM)[0,1];
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OptionalComposedEndTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OptionalComposedEndTest.txt
deleted file mode 100644
index 6760ce0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OptionalComposedEndTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-some data : 20,20

-some more data : 20

-and again : 20,20
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OutOfWindowTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OutOfWindowTest.ruta
deleted file mode 100644
index c877cbc..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OutOfWindowTest.ruta
+++ /dev/null
@@ -1,13 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE T1, T2, T3, T4;
-RETAINTYPE(BREAK);
-ANY+{-PARTOF(BREAK), -PARTOF(T1) -> MARK(T1)};
-RETAINTYPE;
-
-W PM W{-> MARK(T2,1,2,3)};
-
-BLOCK(forEach) T1{}{
-    T2{-> MARK(T3)};
-    ANY T2{-> MARK(T4)};
-}
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OutOfWindowTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OutOfWindowTest.txt
deleted file mode 100644
index 46c2ca8..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/OutOfWindowTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Peter, Jochen, Flo and Georg.

-Lena, Beate and Martina.

-Frank and Andreas.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier1Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier1Test.ruta
deleted file mode 100644
index 8956895..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier1Test.ruta
+++ /dev/null
@@ -1,32 +0,0 @@
-PACKAGE org.apache.uima;
-
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17;
-DECLARE T20, T21, T22;
-
-
-W {REGEXP("A") -> MARK(T20)};
-W {REGEXP("B") -> MARK(T21)};
-W {REGEXP("C") -> MARK(T22)};
-
-
-T20{-> MARK(T1, 1, 2)} T21?;
-T20{-> MARK(T2, 1, 2)} T21??;
-T20{-> MARK(T3, 1, 2)} T21*;
-T20{-> MARK(T4, 1, 2)} T21*?;
-T20{-> MARK(T5, 1, 2)} T21+;
-T20{-> MARK(T6, 1, 2)} T21+?;
-T20{-> MARK(T7, 1, 2)} T21[2];
-T20{-> MARK(T8, 1, 2)} T21[2,];
-T20{-> MARK(T9, 1, 2)} T21[1,2];
-T20{-> MARK(T10, 1, 2)} T21[0,1];
-T20{-> MARK(T11, 1, 2)} T21[0,];
-
-T20{-> MARK(T12, 1, 2, 3)} T21? T22;
-T20{-> MARK(T13, 1, 2, 3)} T21?? T22;
-T20{-> MARK(T14, 1, 2, 3)} T21* T22;
-T20{-> MARK(T15, 1, 2, 3)} T21*? T22;
-T20{-> MARK(T16, 1, 2, 3)} T21+ T22;
-T20{-> MARK(T17, 1, 2, 3)} T21+? T22;
-
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier1Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier1Test.txt
deleted file mode 100644
index 3c81f1b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier1Test.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-A B C

-

-A B B C

-

-A C
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier2Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier2Test.ruta
deleted file mode 100644
index fb32aa0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier2Test.ruta
+++ /dev/null
@@ -1,20 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE A, B, C;
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17;
-DECLARE T20, T21, T22;
-
-W {REGEXP("A") -> MARK(T20,1,2)} NUM;
-W {REGEXP("B") -> MARK(T21)};
-W {REGEXP("C") -> MARK(T22)};
-
-
-T20+?{->MARK(T1, 1, 2)} T20;
-
-FILTERTYPE(T21);
-T20+?{-PARTOF(T1) -> MARK(T2, 1, 2)} T20;
-T20+{-PARTOF(T1) -> MARK(T3, 1, 2)} T20;
-
-T20+?{ -> MARK(T4, 1, 2)} T20;
-T20*{ -> MARK(T5, 1, 2)} T20;
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier2Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier2Test.txt
deleted file mode 100644
index 81ed2c9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier2Test.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-A1 B B A2 C

-A3 A4 A5 C

-A6 A7
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier3Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier3Test.ruta
deleted file mode 100644
index e3f3b7a..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier3Test.ruta
+++ /dev/null
@@ -1,11 +0,0 @@
-PACKAGE org.apache.uima;
-
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17;
-SW CW[2,100]?{-> MARK(T1)} SW;
-SW W[2,100]?{-> MARK(T2)} SW;
-SW W[4,5]?{-> MARK(T3)} SW;
-CW[3]{-> MARK(T4)};
-CW[4]{-> MARK(T5)};
-
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier3Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier3Test.txt
deleted file mode 100644
index e8476fb..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier3Test.txt
+++ /dev/null
@@ -1 +0,0 @@
-123 456 small Big Big Big small Big.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier4Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier4Test.ruta
deleted file mode 100644
index ae6e51f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier4Test.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima;
-DECLARE T1;
-((W PERIOD)[5,5] W){-> MARK(T1)};
-
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier4Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier4Test.txt
deleted file mode 100644
index 80f035d..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier4Test.txt
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.uima.ruta.type.CW
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier5Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier5Test.ruta
deleted file mode 100644
index 071de33..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier5Test.ruta
+++ /dev/null
@@ -1,11 +0,0 @@
-PACKAGE uima.ruta.tests;
-
-DECLARE T1, T2, T3, T4, T5, T6, T7;
-
-W{-> T1} W{-> T2} W{-> T3} W{-> T4};
-PERIOD W{-> T1}  W{-> T3} W{-> T4};
-T1 T2? T3 T4{->MARK(T5, 1, 4)};
-T1 (T2)? T3 T4{->MARK(T6, 1, 4)};
-(T1 T2)? T3 T4{->MARK(T7, 1, 4)};
-
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier5Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier5Test.txt
deleted file mode 100644
index 7b56d68..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/Quantifier5Test.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Peter geht zur Arbeit.

-Peter zur Arbeit
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RegExpRuleTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RegExpRuleTest.ruta
deleted file mode 100644
index e81f6c9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RegExpRuleTest.ruta
+++ /dev/null
@@ -1,22 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE T1, T2, T3, T4, T5, T6, T7;
-
-DECLARE Annotation Complex (STRING s, Annotation a, BOOLEAN b);
-
-"A(.*?)C" -> T1, 1 = T2;
-
-"^B(.*?)B" -> T7, 1 = T3;
-
-"B(.*?)B(.)" -> 1 = T4, 2 = T5;
-
-BLOCK(limited) T7{} {
-    "B(.*?)B" -> 1 = T6;
-}
-
-"B(.*?)B(.)" -> 1 = Complex ("s" = 0, "a" = 2, "b" = true),
-                2 = Complex ("s" = 0, "a" = 1, "b" = false);
-
-
-
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RegExpRuleTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RegExpRuleTest.txt
deleted file mode 100644
index 5a70059..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RegExpRuleTest.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-AxAA

-

-ByBB

-BzBB

-BBB

-

-CCC
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference1Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference1Test.ruta
deleted file mode 100644
index 0c84dff..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference1Test.ruta
+++ /dev/null
@@ -1,40 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-CW{-> MARK(T1)};

-

-CW SW{-> MARK(T2)};

-

-SW SW{-> MARK(T3)};

-

-W+{-> MARK(T4)};

-

-W+ COMMA{-> MARK(T5)};

-

-(CW COMMA)+{-> MARK(T6)};

-

-(CW | SW){->MARK(T7)};

-

-(CW | SW)+{->MARK(T8)};

-

-(CW COMMA)+ CW{-> MARK(T9,1,2)};

-

-(CW (COMMA | SW))+{-> MARK(T10)};

-

-(CW (COMMA | SW))+ CW PERIOD+{-> MARK(T11,1,2,3)};

-

-(CW (COMMA | SW){-> MARK(T12), MARK(T13,1,2)})+{-> MARK(T14)} 

-    CW PERIOD+;

-    

-(((CW PM) CW){-> MARK(T15)} COMMA)

-     (CW SW  (CW PERIOD){-> MARK(T16)})

-     {-> MARK(T17)};

-     

-(ANY ANY){STARTSWITH(CW), ENDSWITH(PM) -> MARK(T18)};

-

-CW{REGEXP("Flo")-> MARK(T19)};

-

-(((CW PM) CW){-> MARK(T20)} COMMA)

-     (T19 SW  (CW PERIOD){-> MARK(T21)})

-     {-> MARK(T22)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference1Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference1Test.txt
deleted file mode 100644
index d4e23e5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference1Test.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter, Jochen, Flo und Georg.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference2Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference2Test.ruta
deleted file mode 100644
index 64272c6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference2Test.ruta
+++ /dev/null
@@ -1,11 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-

-RETAINTYPE(BREAK);

-//BREAK BREAK{-> MARK(T1,1,2,3,4)} BREAK BREAK{-> LOG("FOUND T2 BREAK")};

-BREAK BREAK{-> MARK(T1,1,2)};

-ANY+{-PARTOF(T2), -PARTOF(BREAK)-> MARK(T2)} BREAK;

-T2 BREAK[1,2] ANY+{-PARTOF(BREAK),-PARTOF(T2) -> MARK(T2)};

-RETAINTYPE;

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference2Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference2Test.txt
deleted file mode 100644
index 56021e0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference2Test.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-References

-Bergmark, D. (2000). Automatic extraction of reference linking information from online docu-

-ments. Technical Report CSTR2000-1821, Cornell Digital Library Research Group.

-Bergmark, D., Phempoonpanich, P., and Zhao, S. (2001). Scraping the ACM digital library.

-SIGIR Forum, 35(2):1–7.

-Berkowitz, E. and Elkhadiri, M. R. (2004). Creation of a style independent intelligent au-

-tonomous citation indexer to support academic research. In Proceedings of the the Fifteenth

-Midwest Artificial Intelligence and Cognitive Science conference MAICS 2004, pages 68–73.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference3Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference3Test.ruta
deleted file mode 100644
index 4d20617..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference3Test.ruta
+++ /dev/null
@@ -1,18 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-// T1 = LBrack

-// T2 = T2

-// T3 = FirstLBrack

-// T4 = RefStart

-

-RETAINTYPE(BREAK);

-

-SPECIAL{REGEXP("\\[") -> MARK(T1)};

-SPECIAL{REGEXP("\\]") -> MARK(T2)};

-

-T1{POSITION(Document,1) -> MARK(T3)};

-

-BREAK T1 ANY[1,10]{-PARTOF(T2) -> MARK(T4, 2, 3, 4)} T2;

-T1{PARTOF(T3)} ANY[1,10]{-PARTOF(T2) -> MARK(T4, 1, 2, 3, 4)} T2;

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference3Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference3Test.txt
deleted file mode 100644
index dbccc87..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/RuleInference3Test.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-[1] Califf M. E., and R. J. Mooney. Bottom-up Relational 

-Learning of Pattern Matching Rules for Information 

-Extraction. Journal of Machine Learning Research, 2003, pp. 

-177-210. 

- 

-[2] Cui H., et al. Generic Soft Pattern Models for Definitional 

-Question Answering. In Proceedings of SIGIR-05, 2005. 

- 

-[3] Hu D., et al. SIIPU*S: A Semantic Pattern Learning 

-Algorithm. In Proceedings of the second international 

-conference on Semantics, Knowledge and Grid (SKG2006), 

-2006. 

- 

-[4] Kim, J., and Moldovan, D. Acquisition of Linguistic Patterns 

-for Knowledge-based Information Extraction. In IEEE 

-Transactions on Knowledge and Data Engineering, 1995, pp. 

-713-724. 
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.ruta
deleted file mode 100644
index 1e787e8..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.ruta
+++ /dev/null
@@ -1,3 +0,0 @@
-PACKAGE org.apache.uima;
-
-W{->SHIFT(W, 1, 1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.txt
deleted file mode 100644
index 8c7e5a6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/ShiftWithLowMemoryProfileTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-A
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestDeclaredTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestDeclaredTypeSystem.ruta
deleted file mode 100644
index 7083cdf..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestDeclaredTypeSystem.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-TYPESYSTEM org.apache.uima.ruta.StrictImportTestTypeSystem;
-
-DECLARE T1;
-
-W{-> MARK(MyType)};
-W{-> MARK(T1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestTypeSystem.xml
deleted file mode 100644
index a8a824e..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestTypeSystem.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>StrictImportTypeSystem</name>
-    <description>
-        A type system to test ruta engine's strict import property.
-    </description>
-    <version>1.0</version>
-    <vendor/>
-    <types>
-        <typeDescription>
-            <name>org.apache.uima.ruta.MyType</name>
-            <description/>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestUndeclaredTypeSystem.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestUndeclaredTypeSystem.ruta
deleted file mode 100644
index ffedf5f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/StrictImportTestUndeclaredTypeSystem.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-DECLARE T1;
-
-W{-> MARK(MyType)};
-W{-> MARK(T1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/SubAtomicTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/SubAtomicTest.ruta
deleted file mode 100644
index a47b9b7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/SubAtomicTest.ruta
+++ /dev/null
@@ -1,13 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE Annotation SubAtomic1;

-DECLARE Annotation SubAtomic2;

-

-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;

-

-COMMA SubAtomic1{-> MARK(T1,2,3)} SubAtomic2 COMMA;

-SubAtomic2{-> MARK(T2)} COMMA;

-COMMA SubAtomic1{-> MARK(T3)};

-W{CONTAINS(SubAtomic1) -> MARK(T4)};

-SubAtomic1 W{-> MARK(T5)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/SubAtomicTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/SubAtomicTest.txt
deleted file mode 100644
index 2b2e5af..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/SubAtomicTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter, Jochen, Flo and Georg.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TS1.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TS1.xml
deleted file mode 100644
index 3051e0f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TS1.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>TS1</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-  <types>
-    <typeDescription>
-      <name>ts1.Token</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>pos</name>
-          <description/>
-          <rangeTypeName>ts1.POS</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>ts1.POS</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>value</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TS2.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TS2.xml
deleted file mode 100644
index bcbc371..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TS2.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?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.
--->
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>ts2</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-  <types>
-    <typeDescription>
-      <name>ts2.Token</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>pos</name>
-          <description/>
-          <rangeTypeName>ts2.POS</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-    <typeDescription>
-      <name>ts2.POS</name>
-      <description/>
-      <supertypeName>uima.tcas.Annotation</supertypeName>
-      <features>
-        <featureDescription>
-          <name>value</name>
-          <description/>
-          <rangeTypeName>uima.cas.String</rangeTypeName>
-        </featureDescription>
-      </features>
-    </typeDescription>
-  </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TestEngine.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TestEngine.xml
deleted file mode 100644
index 93f3c91..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TestEngine.xml
+++ /dev/null
@@ -1,274 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>BasicEngine</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters searchStrategy="language_fallback">

-      <configurationParameter>

-        <name>seeders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debug</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalScripts</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>profile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugWithMatches</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>statistics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalExtensions</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>debugOnlyFor</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptEncoding</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalEngineLoaders</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>resourcePaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>defaultFilteredTypes</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>mainScript</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>scriptPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>descriptorPaths</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>removeBasics</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>dynamicAnchoring</name>

-        <description>Activates dynamic anchoring (possible speed up).</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRuleElement</name>

-        <description>Activates greedy anchoring for rule elements.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>greedyRule</name>

-        <description>Activates greedy anchoring for complete rules.</description>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>lowMemoryProfile</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>createdBy</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>simpleGreedyForComposed</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>additionalUimafitEngines</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>strictImports</name>

-        <type>Boolean</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varNames</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>varValues</name>

-        <type>String</type>

-        <multiValued>true</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings>

-      <nameValuePair>

-        <name>debug</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>profile</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>debugWithMatches</name>

-        <value>

-          <boolean>true</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>defaultFilteredTypes</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.type.SPACE</string>

-            <string>org.apache.uima.ruta.type.BREAK</string>

-            <string>org.apache.uima.ruta.type.MARKUP</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>removeBasics</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>seeders</name>

-        <value>

-          <array>

-            <string>org.apache.uima.ruta.seed.DefaultSeeder</string>

-          </array>

-        </value>

-      </nameValuePair>

-      <nameValuePair>

-        <name>createdBy</name>

-        <value>

-          <boolean>false</boolean>

-        </value>

-      </nameValuePair>

-    </configurationParameterSettings>

-    <typeSystemDescription>

-      <imports>

-        <import location="BasicTypeSystem.xml"/>

-      </imports>

-    </typeSystemDescription>

-    <typePriorities>

-      <priorityList>

-        <type>org.apache.uima.ruta.type.RutaFrame</type>

-        <type>uima.tcas.Annotation</type>

-        <type>org.apache.uima.ruta.type.RutaBasic</type>

-      </priorityList>

-    </typePriorities>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypeAliasTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypeAliasTest.ruta
deleted file mode 100644
index 4cc6f7e..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypeAliasTest.ruta
+++ /dev/null
@@ -1,16 +0,0 @@
-PACKAGE org.apache.uima.ruta;
-
-TYPESYSTEM org.apache.uima.ruta.TS1;// defines ts1.Token
-TYPESYSTEM org.apache.uima.ruta.TS2;// defined ts2.Token
-IMPORT ts1.Token FROM TS1 AS Token1;
-
-DECLARE T1, T2, T3;
-
-TYPE T = ts1.Token;
-"Peter" -> ts1.POS ("value" = "NN");
-ts1.POS {-> GATHER(ts1.Token, "pos" = 1)};
-ts1.POS {-> CREATE(ts1.Token, "pos" = ts1.POS)};
-(ts1.Token{REGEXP(ts1.Token.pos.value, "N.*")}){-> MARK(T1)}; 
-(T{REGEXP(T.pos.value, "N.*")}){-> MARK(T2)}; 
-(Token1{REGEXP(Token1.pos.value, "N.*")}){-> MARK(T3)}; 
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypeAliasTestEngine.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypeAliasTestEngine.xml
deleted file mode 100644
index 31e5e4f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypeAliasTestEngine.xml
+++ /dev/null
@@ -1,362 +0,0 @@
-<?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.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>org.apache.uima.ruta.TypeAliasTest</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.string.bool.BooleanOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.string.StringOperationsExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyOnceBlockExtension</string>
-                        <string>org.apache.uima.ruta.block.fst.FSTBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <name>org.apache.uima.ruta.TypeAliasTestTypeSystem</name>
-            <imports>
-                <import location="TS1.xml"/>
-                <import location="TS2.xml"/>
-                <import location="BasicTypeSystem.xml"/>
-            </imports>
-            <types>
-                <typeDescription>
-                    <name>org.apache.uima.ruta.TypeAliasTest.T1</name>
-                    <description>Type defined in org.apache.uima.ruta.TypeAliasTest</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>org.apache.uima.ruta.TypeAliasTest.T2</name>
-                    <description>Type defined in org.apache.uima.ruta.TypeAliasTest</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-                <typeDescription>
-                    <name>org.apache.uima.ruta.TypeAliasTest.T3</name>
-                    <description>Type defined in org.apache.uima.ruta.TypeAliasTest</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-            </types>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-            <capability>
-                <inputs>
-                    <type>org.apache.uima.ruta.TypeAliasTest.T1</type>
-                    <type>org.apache.uima.ruta.TypeAliasTest.T2</type>
-                    <type>org.apache.uima.ruta.TypeAliasTest.T3</type>
-                </inputs>
-                <outputs>
-                    <type>org.apache.uima.ruta.TypeAliasTest.T1</type>
-                    <type>org.apache.uima.ruta.TypeAliasTest.T2</type>
-                    <type>org.apache.uima.ruta.TypeAliasTest.T3</type>
-                </outputs>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypePriorities.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypePriorities.xml
deleted file mode 100644
index 22bba9b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/TypePriorities.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
--->
-
-<typePriorities xmlns="http://uima.apache.org/resourceSpecifier">
-<name>TypePrioritites</name>
-<description></description>
-<version>1.0</version>
-<vendor></vendor>
-
-      <priorityList>
-        <type>org.apache.uima.ruta.type.RutaFrame</type>
-        <type>uima.tcas.Annotation</type>
-        <type>org.apache.uima.ruta.type.RutaBasic</type>
-      </priorityList>
-    

-    
-</typePriorities>
-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WSDictionaryTestList.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WSDictionaryTestList.txt
deleted file mode 100644
index 8689fbe..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WSDictionaryTestList.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Peter Kluegl
-Marshall Schor
-Joern Kottmann
-PeterKottmann
-MarshallSchmidt
-JoernKluegl
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard1Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard1Test.ruta
deleted file mode 100644
index e4d9215..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard1Test.ruta
+++ /dev/null
@@ -1,47 +0,0 @@
-PACKAGE org.apache.uima;
-
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30;
-
-
-CW{-PARTOF(T1)} #{-> MARK(T1,1,2)};
-DYNAMICANCHORING(true);
-#{-PARTOF(T2)-> MARK(T2,1,2)} CW;
-#{-PARTOF(T3) -> MARK(T3,1,2)} PERIOD;
-DYNAMICANCHORING(false);
-CW{-PARTOF(T4)} #{-> MARK(T4,1,2,3)} PERIOD;
-#{-> MARK(T5)} PERIOD;
-DYNAMICANCHORING(true);
-#{-PARTOF(T6) -> MARK(T6)} PERIOD;
-DYNAMICANCHORING(false);
-#{-> MARK(T7)};
-# #{-> MARK(T8)};
-"Ruta" #{-> MARK(T9)} ".";
-#{-PARTOF(T10)-> MARK(T10)} ".";
-CW{-PARTOF(T11)} #{-> MARK(T11,1,2,3)} (PERIOD | COLON);
-#{-PARTOF(T12) -> MARK(T12,1,2)} (PERIOD | COLON);
-CW{-PARTOF(T13)} #{-> MARK(T13,1,2,3)} (SW PERIOD);
-CW{-PARTOF(T14)} #{-> MARK(T14,1,2,3)} ("elements" PERIOD);
-
-T4{-PARTOF(T15) -> MARK(T15,1,2)} T4;
-
-BLOCK(window) T15{}{
-    CW{-PARTOF(T16)} #{-> MARK(T16,1,2)};
-    DYNAMICANCHORING(true);
-    #{-PARTOF(T17)-> MARK(T17,1,2)} CW;
-    #{-PARTOF(T18) -> MARK(T18,1,2)} PERIOD;
-    DYNAMICANCHORING(false);
-    CW{-PARTOF(T19)} #{-> MARK(T19,1,2,3)} PERIOD;
-    #{-> MARK(T20)} PERIOD;
-    DYNAMICANCHORING(true);
-    #{-PARTOF(T21) -> MARK(T21)} PERIOD;
-    DYNAMICANCHORING(false);
-    #{-> MARK(T22)};
-    # #{-> MARK(T23)};
-    "Ruta" #{-> MARK(T24)} ".";
-    #{-PARTOF(T25)-> MARK(T25)} ".";
-    CW{-PARTOF(T26)} #{-> MARK(T26,1,2,3)} (PERIOD | COLON);
-    #{-PARTOF(T27) -> MARK(T27,1,2)} (PERIOD | COLON);
-    CW{-PARTOF(T28)} #{-> MARK(T28,1,2,3)} (SW PERIOD);
-    CW{-PARTOF(T29)} #{-> MARK(T29,1,2,3)} ("elements" PERIOD);
-}
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard1Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard1Test.txt
deleted file mode 100644
index b18fcc5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard1Test.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-The Ruta language is an imperative rule language extended with scripting elements. 

-A Ruta rule defines a pattern of annotations with additional conditions. If this 

-pattern applies, then the actions of the rule are performed  on the matched annotations. 

-A rule is composed of a sequence of rule elements and a rule element essentially consists 

-of four parts: A matching condition, an optional quantifier, a list of conditions and a 

-list of actions. The matching condition is typically a type of an annotation by which the 

-rule element matches on the covered text of one of those annotations. The quantifier 

-specifies, whether it is necessary that the rule element successfully matches and how often 

-the rule element may match. The list of conditions specifies additional constraints that 

-the matched text or annotations need to fulfill. The list of actions defines the 

-consequences of the rule and often creates new annotations or modifies existing annotations.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard3Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard3Test.ruta
deleted file mode 100644
index 5149777..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard3Test.ruta
+++ /dev/null
@@ -1,16 +0,0 @@
-PACKAGE uima.ruta.test;
-
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9, 
-    T10, T11, T12, T13, T14, T15, T16, T17, T18, T19;
-    
-(CW{STARTSWITH(Document)} CW COMMA CW CW COMMA){-> T1};
-(T1 # COMMA){-> T2};
-((T1 #) COMMA){-> T3};    
-(((T1 #)) W){-> T4}; 
-((T1 #) (COMMA ANY)){-> T5};    
-(((T1 #)) (W ANY)){-> T6};  
-((T1 #) ","){-> T7};    
-(((T1 #)) "."){-> T8};     
-    
-    
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard3Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard3Test.txt
deleted file mode 100644
index ac3f793..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/WildCard3Test.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter Kluegl, Joern Kottmann, Marshall Schor, and others.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddFilterTypeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddFilterTypeTest.ruta
deleted file mode 100644
index d28b8e5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddFilterTypeTest.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(SPACE, MARKUP);

-ADDFILTERTYPE(W);

-SPACE MARKUP{-> MARK(T1,1,2)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddFilterTypeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddFilterTypeTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddFilterTypeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddRetainTypeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddRetainTypeTest.ruta
deleted file mode 100644
index d3e48c6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddRetainTypeTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-ADDRETAINTYPE(SPACE, MARKUP);

-FILTERTYPE(W);

-SPACE MARKUP{-> MARK(T1,1,2)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddRetainTypeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddRetainTypeTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/AddRetainTypeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ClearTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ClearTest.ruta
deleted file mode 100644
index 55e664a..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ClearTest.ruta
+++ /dev/null
@@ -1,13 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-TYPELIST list1 = {ANY, W, CW};

-TYPELIST list2;

-

-ADD(list1, NUM);

-ADD(list2, NUM);

-

-CLEAR(list1), CLEAR(list2);

-Document{SIZE(list1,3,3) -> MARK(T1)};

-Document{SIZE(list2,0,0) -> MARK(T2)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ClearTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ClearTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ClearTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/CreateTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/CreateTest.ruta
deleted file mode 100644
index b300d79..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/CreateTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5;

-

-DECLARE Annotation C(Annotation a, Annotation b, INT count);

-W{REGEXP("A")->MARK(T1)};

-W{REGEXP("B")->MARK(T2)};

-INT count;

-(T1 T2){COUNT(W,0,100,count)-> CREATE(C, "a" = T1, "b" = T2, "count" = count)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/CreateTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/CreateTest.txt
deleted file mode 100644
index 0f83394..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/CreateTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-A B
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FillTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FillTest.ruta
deleted file mode 100644
index 40b553e..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FillTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE Document LanguageStorage(STRING language);

-

-MARK(LanguageStorage);

-LanguageStorage{-> FILL(LanguageStorage, "language" = "en")};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FillTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FillTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FillTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FilterTypeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FilterTypeTest.ruta
deleted file mode 100644
index b3983f9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FilterTypeTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(SPACE, MARKUP);

-FILTERTYPE(W);

-SPACE MARKUP{-> MARK(T1,1,2)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FilterTypeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FilterTypeTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/FilterTypeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GatherTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GatherTest.ruta
deleted file mode 100644
index b7b8172..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GatherTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5;

-

-DECLARE Annotation C(Annotation a, Annotation b);

-W{REGEXP("A")->MARK(T1)};

-W{REGEXP("B")->MARK(T2)};

-T1 T2{-> GATHER(C, 1, 2, "a" = 1, "b" = 2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GatherTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GatherTest.txt
deleted file mode 100644
index 0f83394..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GatherTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-A B
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetFeatureTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetFeatureTest.ruta
deleted file mode 100644
index 8fe086b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetFeatureTest.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1;

-

-STRING language;

-GETFEATURE("language", language);

-Document{REGEXP(language, "x-unspecified") -> MARK(T1)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetFeatureTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetFeatureTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetFeatureTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetListTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetListTest.ruta
deleted file mode 100644
index bbefd5c..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetListTest.ruta
+++ /dev/null
@@ -1,16 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-TYPELIST list1;

-TYPELIST list2;

-TYPELIST list3;

-

-GETLIST(list1, "Types");

-Document{SIZE(list1,1,1) -> MARK(T1)};

-

-GETLIST(list1, "Types:Begin");

-Document{SIZE(list1,3,3) -> MARK(T2)};

-

-GETLIST(list1, "Types:End");

-Document{SIZE(list1,4,4) -> MARK(T3)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetListTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetListTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetListTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetTest.ruta
deleted file mode 100644
index a638aff..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-TYPELIST list = {W, SW, CW, SW, CW, W, ANY, CW};

-TYPE type;

-

-GET(list, type, "dominant");

-type{-> MARK(T1)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetTest.txt
deleted file mode 100644
index 8d21ff5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/GetTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ImplicitActionTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ImplicitActionTest.ruta
deleted file mode 100644
index ebbbdd4..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ImplicitActionTest.ruta
+++ /dev/null
@@ -1,24 +0,0 @@
-PACKAGE uima.ruta.tests;
-
-DECLARE Annotation D(STRING ds);
-DECLARE D C(INT ci, BOOLEAN cb);
-DECLARE D B(C bc);
-DECLARE Annotation A(B ab, C ac);
-
-INT count;
-CW{ -> ASSIGN(count, count+1), CREATE(C, "ds" = "firstname", "ci" = count, "cb" = false)} CW{ -> 
-    GATHER(B, "bc" = 1), FILL(B, "ds" = "lastname")};
-C{REGEXP("M.*") -> SETFEATURE("cb", true)};
-(CW CW){-> CREATE(A, "ab" = B, "ac" = C)};
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9;
-A{-> T1};
-A{-> A.ac.ds="name"};
-A.ac.ds=="name"{-> T2};
-A{-> A.ac.cb=true};
-A.ac.cb==true{-> T3};
-A{-> A.ac.ci=10};
-A.ac.ci==10{-> T4};
-
-
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTest.ruta
deleted file mode 100644
index dfab7c7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTest.ruta
+++ /dev/null
@@ -1,15 +0,0 @@
-PACKAGE org.apache.uima;

-

-WORDLIST list1 = 'MarkFastTestList.txt';

-

-DECLARE T1, T2, T3, T4, T5;

-

-MARKFAST(T1, list1, false, 0, true);

-

-MARKFAST(T2, list1, false, 0, false);

-

-RETAINTYPE(SPACE);

-

-MARKFAST(T3, list1, false, 0, true);

-

-MARKFAST(T4, list1, false, 0, false);

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTest.txt
deleted file mode 100644
index 681f593..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTest.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-1 0 0

-aaaaa

-100 

-bbbbb

-2 0 0

-ccccc
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTestList.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTestList.txt
deleted file mode 100644
index 009dde6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkFastTestList.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-1 0 0

-2 0 0

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkLastTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkLastTest.ruta
deleted file mode 100644
index 55fd0c7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkLastTest.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-MARKLAST(T1);

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkLastTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkLastTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkLastTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkOnceTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkOnceTest.ruta
deleted file mode 100644
index eaea8ae..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkOnceTest.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-ANY{-> MARKONCE(T1), MARKONCE(T1)};

-ANY+{-PARTOF(T2) -> MARKONCE(T2), MARKONCE(T2)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkOnceTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkOnceTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkOnceTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkScoreTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkScoreTest.ruta
deleted file mode 100644
index 5704e59..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkScoreTest.ruta
+++ /dev/null
@@ -1,12 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(BREAK);

-ANY+{-PARTOF(BREAK), -PARTOF(T1) -> MARK(T1)};

-

-T1{CONTAINS(W,1,2) -> MARKSCORE(10, T2)};

-T1{STARTSWITH(CW) -> MARKSCORE(10, T2)};

-T1{ENDSWITH(COLON) -> MARKSCORE(10, T2)};

-

-T2{SCORE(20,100) -> MARK(T3)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkScoreTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkScoreTest.txt
deleted file mode 100644
index 9634a82..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkScoreTest.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-only some text

-Like a Headline:

-only some text

-Headline
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTableTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTableTest.ruta
deleted file mode 100644
index a46de0f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTableTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-WORDTABLE table = 'table.csv';

-

-DECLARE T1, T2, T3, T4, T5;

-

-DECLARE Annotation Person (STRING firstname, STRING system);

-

-MARKTABLE(Person, 1, table, true, 0, "-.,", 10, "firstname" = 2, "system" = 3);

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTableTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTableTest.txt
deleted file mode 100644
index fd5ced2..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTableTest.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Kluegl

-Schor

-Kottmann

-

-now with some extra chars

-

-K-l--ue-gl

-Sc h<b> o</b>.r

-K,o,   t,,tm,ann

-

-should not match:

-

-K-l-...........................-ue-gl

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTest.ruta
deleted file mode 100644
index 3fc223c..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-ANY{ -> MARK(T1)};

-SW SW SW{ -> MARK(T2,1,2,3)};

-

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MarkTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MatchedTextTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MatchedTextTest.ruta
deleted file mode 100644
index 73e94d5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MatchedTextTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-STRING string;

-

-Document{ -> MATCHEDTEXT(string)};

-Document{REGEXP(string)-> MARK(T1)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MatchedTextTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MatchedTextTest.txt
deleted file mode 100644
index ef12025..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MatchedTextTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Peter Kluegl: Ruta

-Marshall Schor: UIMA

-Joern Kottmann: CAS Editor
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MergeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MergeTest.ruta
deleted file mode 100644
index 696f2f4..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MergeTest.ruta
+++ /dev/null
@@ -1,17 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-TYPELIST list1 = {ANY, W, CW};

-TYPELIST list2 = {ANY, PM, PERIOD};

-TYPELIST list3 = {ANY, NUM};

-

-TYPELIST intersection;

-TYPELIST union;

-

-MERGE(true, union, list1, list2, list3);

-Document{SIZE(union,8,8) -> MARK(T1)};

-

-MERGE(false, intersection, list1, list2, list3);

-Document{SIZE(intersection,1,1) -> MARK(T2)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MergeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MergeTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/MergeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveDuplicateTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveDuplicateTest.ruta
deleted file mode 100644
index 1d493b7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveDuplicateTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-TYPELIST typeList = {CW, CW, SW, SW, W};

-

-REMOVEDUPLICATE(typeList);

-Document{SIZE(typeList,3,3) -> MARK(T1)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveDuplicateTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveDuplicateTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveDuplicateTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveFilterTypeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveFilterTypeTest.ruta
deleted file mode 100644
index fd6f14b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveFilterTypeTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(MARKUP);

-FILTERTYPE(W, NUM);

-REMOVEFILTERTYPE(W);

-ANY ANY MARKUP{-> MARK(T1,1,2)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveFilterTypeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveFilterTypeTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveFilterTypeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveRetainTypeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveRetainTypeTest.ruta
deleted file mode 100644
index 8e2a183..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveRetainTypeTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(SPACE, MARKUP, CW, SW, NUM);

-REMOVERETAINTYPE(CW, SW, NUM);

-FILTERTYPE(W);

-SPACE MARKUP{-> MARK(T1,1,2)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveRetainTypeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveRetainTypeTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveRetainTypeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveTest.ruta
deleted file mode 100644
index 20c1568..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveTest.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-TYPELIST typeList = {CW, CW, SW, SW, W};

-

-REMOVE(typeList, CW);

-Document{SIZE(typeList,3,3) -> MARK(T1)};

-

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RemoveTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ReplaceTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ReplaceTest.ruta
deleted file mode 100644
index a302ec7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ReplaceTest.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(MARKUP);

-MARKUP{-> REPLACE("MARKUP")};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ReplaceTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ReplaceTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/ReplaceTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RetainTypeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RetainTypeTest.ruta
deleted file mode 100644
index c9ef76a..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RetainTypeTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(SPACE, MARKUP);

-

-SPACE ANY{-> MARK(T1,1,2)};

-ANY MARKUP{-> MARK(T2,1,2)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RetainTypeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RetainTypeTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/RetainTypeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/SetFeatureTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/SetFeatureTest.ruta
deleted file mode 100644
index e520eee..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/SetFeatureTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE Document LanguageStorage(STRING language);

-

-MARK(LanguageStorage);

-LanguageStorage{-> SETFEATURE("language", "en")};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/SetFeatureTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/SetFeatureTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/SetFeatureTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift1Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift1Test.ruta
deleted file mode 100644
index f7713c6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift1Test.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(MARKUP);

-W+{-PARTOF(T1) -> MARK(T1)};

-

-T1{-> SHIFT(T1, 1, 2)} MARKUP;

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift1Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift1Test.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift1Test.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift2Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift2Test.ruta
deleted file mode 100644
index d411262..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift2Test.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-DECLARE Annotation FS (Annotation doc, STRING lang);

-

-CREATE(FS, "doc" = Document, "lang" = "unknown");

-RETAINTYPE(MARKUP);

-W{STARTSWITH(FS) -> SHIFT(FS, 1, 2)} W+ MARKUP;

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift2Test.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift2Test.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/Shift2Test.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TransferTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TransferTest.ruta
deleted file mode 100644
index 3856865..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TransferTest.ruta
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE Document LanguageStorage(STRING language);

-

-TRANSFER(LanguageStorage);

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TransferTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TransferTest.txt
deleted file mode 100644
index 853c9dd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TransferTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest.ruta
deleted file mode 100644
index 2f4c16b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-WORDLIST list1 = 'trie.mtwl';

-

-DECLARE T1, T2, T3, T4, T5;

-

-TRIE("FirstNames.txt" = T1, "LastNames.txt" = T2,

-    "CompleteNames.txt" = T3, "NamesWithSystems.txt" = T4,

-	list1, true, 4, false, 0, ":");

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest.txt
deleted file mode 100644
index ef12025..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Peter Kluegl: Ruta

-Marshall Schor: UIMA

-Joern Kottmann: CAS Editor
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTestWithFeature.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTestWithFeature.ruta
deleted file mode 100644
index a975d23..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTestWithFeature.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;

-

-WORDLIST list1 = 'trie.mtwl';

-

-TRIE("FirstNames.txt" = {A, "a", "first"}, "LastNames.txt" = {B, "b", true},

-    "CompleteNames.txt" = {C, "c", 6},

-	list1, true, 4, false, 0, ":");

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest_compressed.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest_compressed.ruta
deleted file mode 100644
index d507b9d..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrieTest_compressed.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-WORDLIST list1 = 'trie_compressed.mtwl';

-

-DECLARE T1, T2, T3, T4, T5;

-

-TRIE("FirstNames.txt" = T1, "LastNames.txt" = T2,

-    "CompleteNames.txt" = T3, "NamesWithSystems.txt" = T4,

-	list1, true, 4, false, 0, ":");

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrimTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrimTest.ruta
deleted file mode 100644
index 456c796..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrimTest.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-RETAINTYPE(SPACE, MARKUP);

-SPACE ANY+{-PARTOF(T1) -> MARK(T1), MARK(T2), MARK(T3)};

-

-T1{-> TRIM(SPACE), TRIM(MARKUP)};

-T2{-> TRIM(SPACE, MARKUP)};

-T3{-> TRIM({SPACE, MARKUP})};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrimTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrimTest.txt
deleted file mode 100644
index 8af1798..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/TrimTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-only some text<br/>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkAllTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkAllTest.ruta
deleted file mode 100644
index 8778f20..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkAllTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-CW{-> MARK(T1)};

-W{-> MARK(T2)};

-ANY{ -> MARK(T3)};

-

-Annotation {-> UNMARKALL(Annotation, {T1, T3})};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkAllTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkAllTest.txt
deleted file mode 100644
index 2dedee0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkAllTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Some text for some test.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkTest.ruta
deleted file mode 100644
index 7840179..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkTest.ruta
+++ /dev/null
@@ -1,12 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8;

-

-CW{-> MARK(T1)};

-W W W{-> MARK(T2)};

-W PERIOD{ -> MARK(T3,1,2)};

-

-T1 {-> UNMARK(T1)};

-W W W{-> UNMARK(T2)};

-W {-> UNMARK(T3, true)};

-

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkTest.txt
deleted file mode 100644
index 2dedee0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/UnmarkTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Some text for some test.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/firstnames.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/firstnames.txt
deleted file mode 100644
index d7bb0d9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/firstnames.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Peter

-Joern

-Marshall
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/table.csv b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/table.csv
deleted file mode 100644
index bc68ea1..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/table.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-Kluegl;Peter;Ruta

-Schor;Marshall;UIMA

-Kottmann;Joern;CAS Editor
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/trie.mtwl b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/trie.mtwl
deleted file mode 100644
index 6d8298d..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/trie.mtwl
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" ?><root>
-<n><c><![CDATA[M]]></c>
-<n><c><![CDATA[a]]></c>
-<n><c><![CDATA[r]]></c>
-<n><c><![CDATA[s]]></c>
-<n><c><![CDATA[h]]></c>
-<n><c><![CDATA[a]]></c>
-<n><c><![CDATA[l]]></c>
-<n><c><![CDATA[l]]></c><t>FirstNames.txt</t>
-<n><c><![CDATA[ ]]></c>
-<n><c><![CDATA[S]]></c>
-<n><c><![CDATA[c]]></c>
-<n><c><![CDATA[h]]></c>
-<n><c><![CDATA[o]]></c>
-<n><c><![CDATA[r]]></c><t>CompleteNames.txt</t>
-<n><c><![CDATA[ ]]></c>
-<n><c><![CDATA[U]]></c>
-<n><c><![CDATA[I]]></c>
-<n><c><![CDATA[M]]></c>
-<n><c><![CDATA[A]]></c><t>NamesWithSystems.txt</t></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n>
-<n><c><![CDATA[P]]></c>
-<n><c><![CDATA[e]]></c>
-<n><c><![CDATA[t]]></c>
-<n><c><![CDATA[e]]></c>
-<n><c><![CDATA[r]]></c><t>FirstNames.txt</t>
-<n><c><![CDATA[ ]]></c>
-<n><c><![CDATA[K]]></c>
-<n><c><![CDATA[l]]></c>
-<n><c><![CDATA[u]]></c>
-<n><c><![CDATA[e]]></c>
-<n><c><![CDATA[g]]></c>
-<n><c><![CDATA[l]]></c><t>CompleteNames.txt</t>
-<n><c><![CDATA[ ]]></c>
-<n><c><![CDATA[R]]></c>
-<n><c><![CDATA[u]]></c>
-<n><c><![CDATA[t]]></c>
-<n><c><![CDATA[a]]></c><t>NamesWithSystems.txt</t></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n>
-<n><c><![CDATA[S]]></c>
-<n><c><![CDATA[c]]></c>
-<n><c><![CDATA[h]]></c>
-<n><c><![CDATA[o]]></c>
-<n><c><![CDATA[r]]></c><t>LastNames.txt</t></n></n></n></n></n>
-<n><c><![CDATA[J]]></c>
-<n><c><![CDATA[o]]></c>
-<n><c><![CDATA[e]]></c>
-<n><c><![CDATA[r]]></c>
-<n><c><![CDATA[n]]></c><t>FirstNames.txt</t>
-<n><c><![CDATA[ ]]></c>
-<n><c><![CDATA[K]]></c>
-<n><c><![CDATA[o]]></c>
-<n><c><![CDATA[t]]></c>
-<n><c><![CDATA[t]]></c>
-<n><c><![CDATA[m]]></c>
-<n><c><![CDATA[a]]></c>
-<n><c><![CDATA[n]]></c>
-<n><c><![CDATA[n]]></c><t>CompleteNames.txt</t>
-<n><c><![CDATA[ ]]></c>
-<n><c><![CDATA[C]]></c>
-<n><c><![CDATA[A]]></c>
-<n><c><![CDATA[S]]></c>
-<n><c><![CDATA[ ]]></c>
-<n><c><![CDATA[E]]></c>
-<n><c><![CDATA[d]]></c>
-<n><c><![CDATA[i]]></c>
-<n><c><![CDATA[t]]></c>
-<n><c><![CDATA[o]]></c>
-<n><c><![CDATA[r]]></c><t>NamesWithSystems.txt</t></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n></n>
-<n><c><![CDATA[K]]></c>
-<n><c><![CDATA[o]]></c>
-<n><c><![CDATA[t]]></c>
-<n><c><![CDATA[t]]></c>
-<n><c><![CDATA[m]]></c>
-<n><c><![CDATA[a]]></c>
-<n><c><![CDATA[n]]></c>
-<n><c><![CDATA[n]]></c><t>LastNames.txt</t></n></n></n></n></n></n></n>
-<n><c><![CDATA[l]]></c>
-<n><c><![CDATA[u]]></c>
-<n><c><![CDATA[e]]></c>
-<n><c><![CDATA[g]]></c>
-<n><c><![CDATA[l]]></c><t>LastNames.txt</t></n></n></n></n></n></n></root>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/trie_compressed.mtwl b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/trie_compressed.mtwl
deleted file mode 100644
index b4b61db9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/action/trie_compressed.mtwl
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AfterTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AfterTest.ruta
deleted file mode 100644
index b6ce05b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AfterTest.ruta
+++ /dev/null
@@ -1,11 +0,0 @@
-PACKAGE org.apache.uima;

-

-TYPELIST types = {PERIOD, NUM};

-

-DECLARE SentenceStart, SentenceEnd;

-DECLARE T1, T2, T3, T4;

-

-PERIOD{-> MARK(T1)};

-W{AFTER(PERIOD) -> MARK(T2)};

-W{AFTER(types) -> MARK(T3)};

-W{AFTER({PERIOD, NUM}) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AfterTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AfterTest.txt
deleted file mode 100644
index ba286ed..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AfterTest.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-In this text, every word is marked, that stands after at least 1 dot.

-So every word from here on is marked.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AndTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AndTest.ruta
deleted file mode 100644
index b66e65c..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AndTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5;

-

-CW{-> MARK(T3)} W+{-PARTOF(T1) -> MARK(T1,1,2)} PERIOD;

-SW{-> MARK(T3)} W+{-PARTOF(T2), -PARTOF(T1) -> MARK(T2,1,2)} PERIOD;

-W{AND(PARTOF(T1), PARTOF(T3)) -> MARK(T4)};

-W{AND(PARTOF(T2), PARTOF(T3)) -> MARK(T5)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AndTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AndTest.txt
deleted file mode 100644
index 5c3020d..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/AndTest.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a malformed text.

-some sentences do not start with a capital word.

-But others have many of them.

-Like this one that is written to test the AND Condition of Ruta.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/BeforeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/BeforeTest.ruta
deleted file mode 100644
index a0aae55..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/BeforeTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-TYPELIST types = {COMMA, PERIOD};

-

-DECLARE T1, T2, T3;

-

-W+{BEFORE(COMMA), -PARTOF(T1) -> MARK(T1)};

-W+{BEFORE(types), -PARTOF(T2) -> MARK(T2)};

-W+{BEFORE({COMMA, PERIOD}), -PARTOF(T3) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/BeforeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/BeforeTest.txt
deleted file mode 100644
index ae938bc..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/BeforeTest.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-To mark everything before a special annotation,

-you need the BEFORE condition of Ruta.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContainsTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContainsTest.ruta
deleted file mode 100644
index 5717b13..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContainsTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4;

-

-ANY+{-PARTOF(PERIOD), -PARTOF(T1) -> MARK(T1)} PERIOD;

-T1{CONTAINS(CW) -> MARK(T2)};

-T1{CONTAINS(CW,2,4) -> MARK(T3)};

-T1{CONTAINS(CW,25,100,true) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContainsTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContainsTest.txt
deleted file mode 100644
index 1e81b0f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContainsTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-A single sentence.

-And here is another one.

-Testing the CONTAINS condition of Ruta.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContextCountTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContextCountTest.ruta
deleted file mode 100644
index 5fae267..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContextCountTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-INT var;

-

-DECLARE T1, T2, T3, T4;

-

-ANY+{-PARTOF(PERIOD), -PARTOF(T1) -> MARK(T1)};

-CW{CONTEXTCOUNT(T1,1,2,var) -> MARK(T2)};

-Document{IF((var == 3)) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContextCountTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContextCountTest.txt
deleted file mode 100644
index 7e9bfa9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ContextCountTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-A single sentence.

-And here is another one.

-Testing the CONTEXTCOUNT condition of Ruta System.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CountTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CountTest.ruta
deleted file mode 100644
index a015d31..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CountTest.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;

-

-INT var;

-STRINGLIST list = {"A", "B", "A"};

-

-DECLARE T1, T2, T3;

-

-ANY+{-PARTOF(PERIOD), -PARTOF(T1) -> MARK(T1)};

-T1{COUNT(CW,2,5,var), IF((var == 3)) -> MARK(T2)};

-T2{COUNT(list,"A",2,5,var), IF((var == 2)) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CountTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CountTest.txt
deleted file mode 100644
index 0506d6b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CountTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-A single sentence.

-And here is another one.

-Testing the COUNT condition of Ruta System.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CurrentCountTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CurrentCountTest.ruta
deleted file mode 100644
index 8ca5dd0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CurrentCountTest.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;

-

-

-DECLARE T1, T2, T3, T4, T5;

-

-INT count;

-

-W{CURRENTCOUNT(W,3,3) -> MARK(T1)};

-W{CURRENTCOUNT(W,2,8,count), IF((count>3)) -> MARK(T2)};

-W{CURRENTCOUNT(W,2,8,count), IF((count<3)) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CurrentCountTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CurrentCountTest.txt
deleted file mode 100644
index 2b2e5af..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/CurrentCountTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter, Jochen, Flo and Georg.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/EndsWithTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/EndsWithTest.ruta
deleted file mode 100644
index ebf28ea..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/EndsWithTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-TYPELIST types = {EXCLAMATION, PERIOD};

-

-DECLARE T1, T2, T3;

-

-ANY+{-PARTOF(PM), -PARTOF(T1) -> MARK(T1,1,2)} PM;

-T1{ENDSWITH(PERIOD) -> MARK(T2)};

-T1{ENDSWITH(types) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/EndsWithTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/EndsWithTest.txt
deleted file mode 100644
index abb20cf..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/EndsWithTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-A single sentence!

-And here is another one?

-Testing the ENDSWITH condition of Ruta.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/FeatureTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/FeatureTest.ruta
deleted file mode 100644
index a21de15..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/FeatureTest.ruta
+++ /dev/null
@@ -1,18 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9;

-

-DECLARE Annotation FS (STRING string, DOUBLE double, INT int, BOOLEAN boolean);

-

-

-CREATE(FS, "string" = "string", "double" = 0.5, "int" = 2, "boolean" = true);

-

-FS{FEATURE("string", "string") -> MARK(T1)};

-FS{FEATURE("double", 0.5) -> MARK(T2)};

-FS{FEATURE("int", 2) -> MARK(T3)};

-FS{FEATURE("boolean", true) -> MARK(T4)};

-

-FS{FEATURE("string", "") -> MARK(T5)};

-FS{FEATURE("double", 0.6) -> MARK(T5)};

-FS{FEATURE("int", 3) -> MARK(T5)};

-FS{FEATURE("boolean", false) -> MARK(T5)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/FeatureTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/FeatureTest.txt
deleted file mode 100644
index c08b461..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/FeatureTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Testing FEATURE condition.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IfTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IfTest.ruta
deleted file mode 100644
index a7a0956..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IfTest.ruta
+++ /dev/null
@@ -1,11 +0,0 @@
-PACKAGE org.apache.uima;

-

-BOOLEAN b1 = true;

-BOOLEAN b2 = false;

-INT int1 = 5;

-

-DECLARE T1, T2, T3;

-

-Document{IF(b1) -> MARK(T1)};

-Document{IF(b2) -> MARK(T2)};

-Document{IF((int1 > 3)) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IfTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IfTest.txt
deleted file mode 100644
index 6345080..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IfTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Will this text be annotated?
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ImplicitCondition1Test.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ImplicitCondition1Test.ruta
deleted file mode 100644
index ccfb927..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ImplicitCondition1Test.ruta
+++ /dev/null
@@ -1,19 +0,0 @@
-PACKAGE uima.ruta.tests;
-
-DECLARE Annotation D(STRING ds);
-DECLARE D C(INT ci, BOOLEAN cb);
-DECLARE D B(C bc);
-DECLARE Annotation A(B ab, C ac);
-
-INT count;
-CW{ -> ASSIGN(count, count+1), CREATE(C, "ds" = "firstname", "ci" = count, "cb" = false)} CW{ -> 
-    GATHER(B, "bc" = 1), FILL(B, "ds" = "lastname")};
-C{REGEXP("M.*") -> SETFEATURE("cb", true)};
-(CW CW){-> CREATE(A, "ab" = B, "ac" = C)};
-
-DECLARE T1, T2, T3, T4, T5, T6, T7, T8, T9;
-A{A.ac.cb==true -> T1};
-A{A.ac.ds=="firstname" -> T2};
-A{(count>2) -> T3};
-A{A.ac.ci==2 -> T4};
-A{true -> T5};
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTest.ruta
deleted file mode 100644
index 08fd4fe..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-WORDLIST list1 = 'InListTestList.txt';

-

-DECLARE T1, T2;

-

-W{INLIST(list1) -> MARK(T1)};

-W{INLIST({"INLIST","and","or"}) -> MARK(T2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTest.txt
deleted file mode 100644
index 088ef8e..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Testing the INLIST condition of Ruta.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTestList.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTestList.txt
deleted file mode 100644
index 5110dc6..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/InListTestList.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-INLIST

-MARK

-condition

-and

-or
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IsTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IsTest.ruta
deleted file mode 100644
index 8c26439..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IsTest.ruta
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGE org.apache.uima;

-

-TYPELIST list = {PERIOD, COMMA};

-

-DECLARE T1, T2, T3;

-

-PM{IS(COLON) -> MARK(T1)};

-ANY{IS({PERIOD, COMMA}) -> MARK(T2)};

-ANY{IS(list) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IsTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IsTest.txt
deleted file mode 100644
index dcea602..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/IsTest.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-1: In this text,

-2: every colon is marked.

-3: The same is done

-4: with all commas and periods.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/LastTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/LastTest.ruta
deleted file mode 100644
index 28a1f88..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/LastTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2;

-

-ANY+{-PARTOF(PM), -PARTOF(T1)-> MARK(T1,1,2)} PM;

-T1{LAST(EXCLAMATION) -> MARK(T2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/LastTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/LastTest.txt
deleted file mode 100644
index 8716400..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/LastTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Some different sentences.

-But which of them end with an exclamation mark?

-This we can test with the LAST condition!
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/MOfNTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/MOfNTest.ruta
deleted file mode 100644
index 9cf4bed..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/MOfNTest.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3;

-

-"MOFN"{-> MARK(T1)};

-"MOFN" "Condition"{-> MARK(T2,1,2)};

-W{MOFN(1,1,PARTOF(T2),CONTAINS(T1)) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/MOfNTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/MOfNTest.txt
deleted file mode 100644
index 2b612c3..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/MOfNTest.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-MOFN Condition

-

-The MOFN condition evaluates true, if the number of given conditions evaluating true

-do not exceed the given interval.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NearTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NearTest.ruta
deleted file mode 100644
index 72a70c7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NearTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4;

-

-W{NEAR(COLON,1,2) -> MARK(T1)};

-W{NEAR(COLON,1,5,true) -> MARK(T2)};

-W{NEAR(COLON,1,5,false) -> MARK(T3)};

-W{NEAR(COLON,1,5,false,true) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NearTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NearTest.txt
deleted file mode 100644
index 610fc90..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NearTest.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-The NEAR test:

-

-the NEAR condition evaluates true, if the actual annotation lies within a given distance

-to another annotation. We can control the search direction wit a boolean parameter.

-Another optional boolean parameter toggles filtering.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NotTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NotTest.ruta
deleted file mode 100644
index e6e98cf..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NotTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2;

-

-ANY+{-PARTOF(PERIOD), -PARTOF(COLON), -PARTOF(T1)-> MARK(T1)} PERIOD;

-W{-PARTOF(T1) -> MARK(T2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NotTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NotTest.txt
deleted file mode 100644
index 92c4a61..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/NotTest.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-NOT-Condition:

-

-To negate the meaning of a condition, simply write "-" before it.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/OrTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/OrTest.ruta
deleted file mode 100644
index 1160ceb..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/OrTest.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3;

-

-CW W+{-> MARK(T1,1,2)} COLON;

-ANY{INLIST({"OR", "Test"}) -> MARK(T2)};

-W{OR(PARTOF(T1),PARTOF(T2)) -> MARK(T3)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/OrTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/OrTest.txt
deleted file mode 100644
index a6bdb86..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/OrTest.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The OR Test:

-

-Use the OR condition to annotate something that has to meet

-at least one out of many conditions.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ParseTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ParseTest.ruta
deleted file mode 100644
index 24799a5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ParseTest.ruta
+++ /dev/null
@@ -1,13 +0,0 @@
-PACKAGE org.apache.uima;

-

-INT i1;

-DOUBLE d1;

-BOOLEAN b1;

-STRING s1;

-

-DECLARE T1, T2, T3, T4;

-

-NUM{PARSE(i1) -> MARK(T1)};

-(NUM PM NUM){PARSE(d1), IF((d1==2.1)) -> MARK(T2)};

-W{PARSE(b1), IF(b1) -> MARK(T3)};

-ANY+{PARSE(s1), -PARTOF(T4), -PARTOF(SEMICOLON) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ParseTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ParseTest.txt
deleted file mode 100644
index 3c7b5d5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ParseTest.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-A Boolean b that is true;

-b = false;

-The Number 42;

-The Double d = 2,1;

-Another Double that is 2.3;
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfNEQTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfNEQTest.ruta
deleted file mode 100644
index 614753d..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfNEQTest.ruta
+++ /dev/null
@@ -1,12 +0,0 @@
-PACKAGE org.apache.uima;

-

-TYPELIST types = {COMMA, PERIOD, T5};

-

-DECLARE T1, T2, T3, T4, T5, T6;

-

-CW{-> MARK(T5,1,2)} CW{-> MARK(T6)} PERIOD;

-

-ANY{PARTOFNEQ(T5) -> MARK(T1)};

-(CW CW){PARTOFNEQ(T5) -> MARK(T2)};

-W{PARTOFNEQ(T6) -> MARK(T3)};

-ANY{PARTOFNEQ(types) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfNEQTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfNEQTest.txt
deleted file mode 100644
index 8ae59ab..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfNEQTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-I like Vitamine A.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfTest.ruta
deleted file mode 100644
index ed1de88..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfTest.ruta
+++ /dev/null
@@ -1,16 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE WithInitial, Initial;

-DECLARE WithInitial WithInitialEnd;

-

-TYPELIST list = {Initial, WithInitial};

-

-DECLARE T1, T2, T3, T4, T5;

-

-CW{-> MARK(WithInitialEnd,1,2)} CW{-> MARK(Initial)} PERIOD;

-

-ANY{PARTOF(WithInitialEnd) -> MARK(T1)};

-Initial {PARTOF(WithInitial) -> MARK(T2)};

-SW{PARTOF(WithInitialEnd) -> MARK(T3)};

-ANY{PARTOF({Initial, WithInitial}) -> MARK(T4)};

-ANY{PARTOF(list) -> MARK(T5)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfTest.txt
deleted file mode 100644
index 8ae59ab..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PartOfTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-I like Vitamine A.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PositionTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PositionTest.ruta
deleted file mode 100644
index 1416ae5..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PositionTest.ruta
+++ /dev/null
@@ -1,8 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3, T4, T5;

-

-

-PM{POSITION(Document,3,true) -> MARK(T1)};

-PM{POSITION(Document,2,false) -> MARK(T2)};

-PM{POSITION(Document,3,false) -> MARK(T3)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PositionTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PositionTest.txt
deleted file mode 100644
index 2b2e5af..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/PositionTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Peter, Jochen, Flo and Georg.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/RegExpTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/RegExpTest.ruta
deleted file mode 100644
index 68a6db7..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/RegExpTest.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;

-

-STRING var = "Test";

-

-DECLARE T1, T2, T3, T4;

-

-Document{REGEXP("^.*$") -> MARK(T1)};

-Document{REGEXP(var, "t.*", true) -> MARK(T2)};

-W{REGEXP("A.*", true) -> MARK(T3)};

-W{REGEXP("A.*", false) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/RegExpTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/RegExpTest.txt
deleted file mode 100644
index 9b1a536..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/RegExpTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Use REGEXP to match annotations on different patterns.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ScoreTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ScoreTest.ruta
deleted file mode 100644
index 71b7531..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ScoreTest.ruta
+++ /dev/null
@@ -1,12 +0,0 @@
-PACKAGE org.apache.uima;

-

-INT int1;

-

-DECLARE T1, T2, T3, T4;

-

-CW{-> MARKSCORE(10,T1)};

-CW{-> MARKSCORE(20,T1)} CW;

-

-T1{SCORE(5,15) -> MARK(T2)};

-T1{SCORE(16,25) -> MARK(T3)};

-T1{SCORE(26,35,int1), IF((int1 == 30)) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ScoreTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ScoreTest.txt
deleted file mode 100644
index c28f669..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/ScoreTest.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Score Condition:

-

-As some rules mark annotations with different scores (e.g. according to their accuracy),

-it is possible to read these scores with the SCORE condition.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/SizeTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/SizeTest.ruta
deleted file mode 100644
index 3e1e076..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/SizeTest.ruta
+++ /dev/null
@@ -1,12 +0,0 @@
-PACKAGE org.apache.uima;

-

-INT counter = 0;

-INTLIST intList = {1,2,3,4,5};

-STRINGLIST stringList = {"a","b","c","d","e"};

-

-DECLARE T1, T2, T3, T4;

-

-"SIZE"{SIZE(intList) -> MARK(T1)};

-"SIZE"{SIZE(intList,4,10) -> MARK(T2)};

-"SIZE"{SIZE(intList,6,10) -> MARK(T3)};

-"SIZE"{SIZE(stringList,5,10,counter) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/SizeTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/SizeTest.txt
deleted file mode 100644
index 020a30e..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/SizeTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Use SIZE to count the numbers of list entries.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/StartsWithTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/StartsWithTest.ruta
deleted file mode 100644
index c1d7cfd..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/StartsWithTest.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;

-

-TYPELIST types = {SW, CW};

-

-DECLARE T1, T2, T3, T4;

-

-SW{STARTSWITH(Document) -> MARK(T1)};

-CW{STARTSWITH(Document) -> MARK(T2)};

-Document{STARTSWITH(types) -> MARK(T3)};

-Document{STARTSWITH({SW, CW}) -> MARK(T4)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/StartsWithTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/StartsWithTest.txt
deleted file mode 100644
index dd8a20e..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/StartsWithTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-This text starts with "This".
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/TotalCountTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/TotalCountTest.ruta
deleted file mode 100644
index 8264559..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/TotalCountTest.ruta
+++ /dev/null
@@ -1,11 +0,0 @@
-PACKAGE org.apache.uima;

-

-INT int1 = 0;

-

-DECLARE T1, T2, T3, T4;

-

-RETAINTYPE(SPACE);

-

-Document{TOTALCOUNT(CW) -> MARK(T1)};

-Document{TOTALCOUNT(SPACE,1,5) -> MARK(T2)};

-Document{TOTALCOUNT(PM,1,10,int1), IF((int1 == 2)) -> MARK(T3)};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/TotalCountTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/TotalCountTest.txt
deleted file mode 100644
index 445aefc..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/TotalCountTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-To count the number of annotations within a given annotation, use the TOTALCOUNT condition.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/VoteTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/VoteTest.ruta
deleted file mode 100644
index 9700911..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/VoteTest.ruta
+++ /dev/null
@@ -1,6 +0,0 @@
-PACKAGE org.apache.uima;

-

-DECLARE T1, T2, T3;

-

-Document{VOTE(SW,CW) -> MARK(T1)};

-Document{VOTE(PM,CW) -> MARK(T2)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/VoteTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/VoteTest.txt
deleted file mode 100644
index 0939670..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/condition/VoteTest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Use the VOTE Condition, to compare the number of occurrences of two different annotations.
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/AAE.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/AAE.xml
deleted file mode 100644
index 9bb8f78..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/AAE.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>false</primitive>  
-  <delegateAnalysisEngineSpecifiers>
-    <delegateAnalysisEngine key="CWEngine">
-      <import location="CWEngine.xml"/>
-    </delegateAnalysisEngine>
-    <delegateAnalysisEngine key="SWEngine">
-      <import location="SWEngine.xml"/>
-    </delegateAnalysisEngine>
-    <delegateAnalysisEngine key="SimpleEngine">
-      <import location="SimpleEngine.xml"/>
-    </delegateAnalysisEngine>
-  <delegateAnalysisEngine key="ModifierCW">
-      <import location="ModifierCW.xml"/>
-    </delegateAnalysisEngine>
-    <delegateAnalysisEngine key="ModifierSW">
-      <import location="ModifierSW.xml"/>
-    </delegateAnalysisEngine>
-  </delegateAnalysisEngineSpecifiers>
-  <analysisEngineMetaData>
-    <name>AAE</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters/>
-    <configurationParameterSettings/>
-    <flowConstraints>
-      <fixedFlow>
-        <node>CWEngine</node>
-        <node>ModifierCW</node>
-        <node>SWEngine</node>
-        <node>ModifierSW</node>
-        <node>SimpleEngine</node>
-      </fixedFlow>
-    </flowConstraints>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <inputSofas>
-          <sofaName>global1</sofaName>
-        </inputSofas>
-        <outputSofas>
-          <sofaName>global2</sofaName>
-          <sofaName>global3</sofaName>
-        </outputSofas>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-  <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>true</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-<sofaMappings>
-    <sofaMapping>
-      <componentKey>ModifierCW</componentKey>
-      <componentSofaName>modified</componentSofaName>
-      <aggregateSofaName>global2</aggregateSofaName>
-    </sofaMapping>
-    <sofaMapping>
-      <componentKey>ModifierSW</componentKey>
-      <aggregateSofaName>global2</aggregateSofaName>
-    </sofaMapping>
-    <sofaMapping>
-      <componentKey>SWEngine</componentKey>
-      <aggregateSofaName>global2</aggregateSofaName>
-    </sofaMapping>
-    <sofaMapping>
-      <componentKey>ModifierSW</componentKey>
-      <componentSofaName>modified</componentSofaName>
-      <aggregateSofaName>global3</aggregateSofaName>
-    </sofaMapping>
-    <sofaMapping>
-      <componentKey>SimpleEngine</componentKey>
-      <aggregateSofaName>global3</aggregateSofaName>
-    </sofaMapping>
-    <sofaMapping>
-      <componentKey>CWEngine</componentKey>
-      <aggregateSofaName>global1</aggregateSofaName>
-    </sofaMapping>
-  <sofaMapping>
-      <componentKey>ModifierCW</componentKey>
-      <aggregateSofaName>global1</aggregateSofaName>
-    </sofaMapping>
-  </sofaMappings>
-</analysisEngineDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CW.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CW.ruta
deleted file mode 100644
index 6db0197..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CW.ruta
+++ /dev/null
@@ -1 +0,0 @@
-CW{-> REPLACE("CW")};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CWEngine.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CWEngine.xml
deleted file mode 100644
index 29f0948..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CWEngine.xml
+++ /dev/null
@@ -1,333 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>org.apache.uima.ruta.engine.CW</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <name>CWTypeSystem</name>
-            <imports>
-                <import location="../BasicTypeSystem.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CWTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CWTypeSystem.xml
deleted file mode 100644
index 386aba3..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/CWTypeSystem.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>CWTypeSystem</name>
-    <imports>
-        <import location="../BasicTypeSystem.xml"/>
-    </imports>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ModifierCW.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ModifierCW.xml
deleted file mode 100644
index c3d40d0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ModifierCW.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>Modifier</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>styleMap</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputLocation</name>
-        <description></description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>outputView</name>
-        <value>
-          <string>modified</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <outputSofas>
-          <sofaName>modified</sofaName>
-        </outputSofas>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ModifierSW.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ModifierSW.xml
deleted file mode 100644
index c3d40d0..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ModifierSW.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-  <primitive>true</primitive>
-  <annotatorImplementationName>org.apache.uima.ruta.engine.RutaModifier</annotatorImplementationName>
-  <analysisEngineMetaData>
-    <name>Modifier</name>
-    <description/>
-    <version>1.0</version>
-    <vendor/>
-    <configurationParameters>
-      <configurationParameter>
-        <name>styleMap</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>descriptorPaths</name>
-        <type>String</type>
-        <multiValued>true</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputLocation</name>
-        <description></description>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-      <configurationParameter>
-        <name>outputView</name>
-        <type>String</type>
-        <multiValued>false</multiValued>
-        <mandatory>false</mandatory>
-      </configurationParameter>
-    </configurationParameters>
-    <configurationParameterSettings>
-      <nameValuePair>
-        <name>outputView</name>
-        <value>
-          <string>modified</string>
-        </value>
-      </nameValuePair>
-    </configurationParameterSettings>
-    <typeSystemDescription/>
-    <typePriorities/>
-    <fsIndexCollection/>
-    <capabilities>
-      <capability>
-        <inputs/>
-        <outputs/>
-        <outputSofas>
-          <sofaName>modified</sofaName>
-        </outputSofas>
-        <languagesSupported/>
-      </capability>
-    </capabilities>
-    <operationalProperties>
-      <modifiesCas>true</modifiesCas>
-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-      <outputsNewCASes>false</outputsNewCASes>
-    </operationalProperties>
-  </analysisEngineMetaData>
-  <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/PlainTextAnnotatorTest.txt b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/PlainTextAnnotatorTest.txt
deleted file mode 100644
index 8b4cfd4..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/PlainTextAnnotatorTest.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-1 some text
-2 some text
-3 some text

- 
-  
-  
-8 some text
-9 some text
-10 some text
- 
-
-13 some text
-14 some text
-15 some text
-
-
-18 end
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/RutaModifierTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/RutaModifierTest.ruta
deleted file mode 100644
index 6c10186..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/RutaModifierTest.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25;
-
-RETAINTYPE(MARKUP, SPACE, BREAK);
-
-MARKUP{ -> DEL}; BREAK{-> DEL};
-
-SW {REGEXP("bold") -> REPLACE("BOLD")};
-
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SW.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SW.ruta
deleted file mode 100644
index ca7cd76..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SW.ruta
+++ /dev/null
@@ -1 +0,0 @@
-SW{-> REPLACE("SW")};

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SWEngine.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SWEngine.xml
deleted file mode 100644
index 91a1bfa..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SWEngine.xml
+++ /dev/null
@@ -1,333 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>org.apache.uima.ruta.engine.SW</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <name>SWTypeSystem</name>
-            <imports>
-                <import location="../BasicTypeSystem.xml"/>
-            </imports>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SWTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SWTypeSystem.xml
deleted file mode 100644
index b8b7053..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SWTypeSystem.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>SWTypeSystem</name>
-    <imports>
-        <import location="../BasicTypeSystem.xml"/>
-    </imports>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/Simple.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/Simple.ruta
deleted file mode 100644
index 9cf123c..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/Simple.ruta
+++ /dev/null
@@ -1,2 +0,0 @@
-DECLARE CwSw;

-("CW" "SW"){-> CwSw};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SimpleEngine.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SimpleEngine.xml
deleted file mode 100644
index 7f70209..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SimpleEngine.xml
+++ /dev/null
@@ -1,349 +0,0 @@
-<?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.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
-    <primitive>true</primitive>
-    <annotatorImplementationName>org.apache.uima.ruta.engine.RutaEngine</annotatorImplementationName>
-    <analysisEngineMetaData>
-        <name>BasicEngine</name>
-        <description/>
-        <version>1.0</version>
-        <vendor/>
-        <configurationParameters searchStrategy="language_fallback">
-            <configurationParameter>
-                <name>seeders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debug</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalScripts</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>profile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugWithMatches</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>statistics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalExtensions</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>debugOnlyFor</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptEncoding</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalEngineLoaders</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>resourcePaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>defaultFilteredTypes</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>mainScript</name>
-                <type>String</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>scriptPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>descriptorPaths</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>removeBasics</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>dynamicAnchoring</name>
-                <description>Activates dynamic anchoring (possible speed up).</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRuleElement</name>
-                <description>Activates greedy anchoring for rule elements.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>greedyRule</name>
-                <description>Activates greedy anchoring for complete rules.</description>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>lowMemoryProfile</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>createdBy</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>simpleGreedyForComposed</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>additionalUimafitEngines</name>
-                <type>String</type>
-                <multiValued>true</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-            <configurationParameter>
-                <name>strictImports</name>
-                <type>Boolean</type>
-                <multiValued>false</multiValued>
-                <mandatory>false</mandatory>
-            </configurationParameter>
-        </configurationParameters>
-        <configurationParameterSettings>
-            <nameValuePair>
-                <name>debug</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>profile</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>debugWithMatches</name>
-                <value>
-                    <boolean>true</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>defaultFilteredTypes</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.type.SPACE</string>
-                        <string>org.apache.uima.ruta.type.BREAK</string>
-                        <string>org.apache.uima.ruta.type.MARKUP</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>removeBasics</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>seeders</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.seed.DefaultSeeder</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>createdBy</name>
-                <value>
-                    <boolean>false</boolean>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>mainScript</name>
-                <value>
-                    <string>org.apache.uima.ruta.engine.Simple</string>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>scriptPaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>descriptorPaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>resourcePaths</name>
-                <value>
-                    <array>
-                        <string></string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalScripts</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalUimafitEngines</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalExtensions</name>
-                <value>
-                    <array>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleConditionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleActionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBooleanFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleNumberFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleStringFunctionExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleTypeFunctionExtension</string>
-                        <string>org.apache.uima.ruta.block.OnlyFirstBlockExtension</string>
-                        <string>org.apache.uima.ruta.example.extensions.ExampleBlockExtension</string>
-                    </array>
-                </value>
-            </nameValuePair>
-            <nameValuePair>
-                <name>additionalEngineLoaders</name>
-                <value>
-                    <array/>
-                </value>
-            </nameValuePair>
-        </configurationParameterSettings>
-        <typeSystemDescription>
-            <name>SimpleTypeSystem</name>
-            <imports>
-                <import location="../BasicTypeSystem.xml"/>
-            </imports>
-            <types>
-                <typeDescription>
-                    <name>Simple.CwSw</name>
-                    <description>Type defined in null.Simple</description>
-                    <supertypeName>uima.tcas.Annotation</supertypeName>
-                </typeDescription>
-            </types>
-        </typeSystemDescription>
-        <typePriorities>
-            <priorityList>
-                <type>org.apache.uima.ruta.type.RutaFrame</type>
-                <type>uima.tcas.Annotation</type>
-                <type>org.apache.uima.ruta.type.RutaBasic</type>
-            </priorityList>
-        </typePriorities>
-        <fsIndexCollection/>
-        <capabilities>
-            <capability>
-                <inputs/>
-                <outputs/>
-                <languagesSupported/>
-            </capability>
-            <capability>
-                <inputs>
-                    <type>Simple.CwSw</type>
-                </inputs>
-                <outputs>
-                    <type>Simple.CwSw</type>
-                </outputs>
-                <languagesSupported/>
-            </capability>
-        </capabilities>
-        <operationalProperties>
-            <modifiesCas>true</modifiesCas>
-            <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
-            <outputsNewCASes>true</outputsNewCASes>
-        </operationalProperties>
-    </analysisEngineMetaData>
-    <resourceManagerConfiguration/>
-</analysisEngineDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SimpleTypeSystem.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SimpleTypeSystem.xml
deleted file mode 100644
index 1bc119f..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/SimpleTypeSystem.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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.
--->
-
-<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
-    <name>SimpleTypeSystem</name>
-    <imports>
-        <import location="../BasicTypeSystem.xml"/>
-    </imports>
-    <types>
-        <typeDescription>
-            <name>Simple.CwSw</name>
-            <description>Type defined in null.Simple</description>
-            <supertypeName>uima.tcas.Annotation</supertypeName>
-        </typeDescription>
-    </types>
-</typeSystemDescription>
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/UimafitTest.ruta b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/UimafitTest.ruta
deleted file mode 100644
index ebd989b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/UimafitTest.ruta
+++ /dev/null
@@ -1 +0,0 @@
-TruePositive+{-PARTOF(FalsePositive) -> MARK(FalsePositive)};
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ViewWriter.xml b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ViewWriter.xml
deleted file mode 100644
index 78149a9..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/ViewWriter.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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.

--->

-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

-  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

-  <primitive>true</primitive>

-  <annotatorImplementationName>org.apache.uima.ruta.engine.ViewWriter</annotatorImplementationName>

-  <analysisEngineMetaData>

-    <name>XMLConverter</name>

-    <description/>

-    <version>1.0</version>

-    <vendor/>

-    <configurationParameters>

-      <configurationParameter>

-        <name>outputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>inputView</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-      <configurationParameter>

-        <name>output</name>

-        <type>String</type>

-        <multiValued>false</multiValued>

-        <mandatory>false</mandatory>

-      </configurationParameter>

-    </configurationParameters>

-    <configurationParameterSettings/>

-    <typeSystemDescription>

-      <types>

-        <typeDescription>

-          <name>uima.ruta.test.T1</name>

-          <description/>

-          <supertypeName>uima.tcas.Annotation</supertypeName>

-        </typeDescription>

-      </types>

-    </typeSystemDescription>

-    <typePriorities/>

-    <fsIndexCollection/>

-    <capabilities>

-      <capability>

-        <inputs/>

-        <outputs/>

-        <languagesSupported/>

-      </capability>

-    </capabilities>

-    <operationalProperties>

-      <modifiesCas>true</modifiesCas>

-      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>

-      <outputsNewCASes>true</outputsNewCASes>

-    </operationalProperties>

-  </analysisEngineMetaData>

-  <resourceManagerConfiguration/>

-</analysisEngineDescription>

diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/test.html b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/test.html
deleted file mode 100644
index f0f2199..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/test.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>

-<head>

-<!--in head-->

-</head>

-<body>

-start of body

-<br/>

-normal <b>bold</b>

-<br/>

-end of body

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testHtmlDecoding.html b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testHtmlDecoding.html
deleted file mode 100644
index 54ac4c3..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testHtmlDecoding.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>

-<head>

-<!--in head-->

-</head>

-<body>

-start of <script type="text/javascript">function testfun () {

-  var Jetzt = new Date();

-</script>body

-<!--a comment in the body-->

-<br/>

-normal&nbsp;normal <b>bold</b>

-<br/>

-end of body 3&#8364;&#160;&auml;&ouml;&uuml;

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testHtmlDecodingAnnotations.html b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testHtmlDecodingAnnotations.html
deleted file mode 100644
index aec79ff..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testHtmlDecodingAnnotations.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>

-<head>

-<!--in head-->

-</head>

-<body>

-start of <script type="text/javascript">function testfun () {

-  var Jetzt = new Date();

-</script>body

-<!--a comment in the body-->

-<br/>

-normal&nbsp;normal <b>bold</b>

-<br/>

-end of body 3&#8364;&#160;&auml;&ouml;&uuml; and <b>bold</b>.

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testUnix.html b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testUnix.html
deleted file mode 100644
index f0f2199..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testUnix.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>

-<head>

-<!--in head-->

-</head>

-<body>

-start of body

-<br/>

-normal <b>bold</b>

-<br/>

-end of body

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWin.html b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWin.html
deleted file mode 100644
index f0f2199..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWin.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>

-<head>

-<!--in head-->

-</head>

-<body>

-start of body

-<br/>

-normal <b>bold</b>

-<br/>

-end of body

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWithComments.html b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWithComments.html
deleted file mode 100644
index d313e5b..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWithComments.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>

-<head>

-<!--in head-->

-</head>

-<body>

-start of body

-<!--a comment in the body

-very 

-very 

-

-

-looooooooooooooooooooooooooooong 

-

-looooooooooooooooooooooooooooong looooooooooooooooooooooooooooong 

-

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-looooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooonglooooooooooooooooooooooooooooong

-

-a very looooooooooooooooooooooooooooong comment-->

-<br/>

-normal <b>bold</b>

-<br/>

-end of body

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWithCommentsAndScript.html b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWithCommentsAndScript.html
deleted file mode 100644
index d73f104..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/engine/testWithCommentsAndScript.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>

-<head>

-<!--in head-->

-</head>

-<body>

-start of <script type="text/javascript">function testfun () {

-  var Jetzt = new Date();

-</script>body

-<!--a comment in the body-->

-<br/>

-normal <b>bold</b>

-<br/>

-end of body

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/table2.csv b/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/table2.csv
deleted file mode 100644
index d7d0468..0000000
--- a/trunk/ruta-core/src/test/resources/org/apache/uima/ruta/table2.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-Peter Kluegl;UIMA Ruta

-Marshall Schor;UIMA Core

-Joern Kottmann;CAS Editor
\ No newline at end of file
diff --git a/trunk/ruta-docbook/pom.xml b/trunk/ruta-docbook/pom.xml
deleted file mode 100644
index 3951f25..0000000
--- a/trunk/ruta-docbook/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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.    

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-docbook</artifactId>

-  <packaging>pom</packaging>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <name>Apache UIMA Ruta Documentation</name>

-  <url>${uimaWebsiteUrl}</url>

-  <scm>

-  	<url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-docbook</url>

-  	<connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-docbook</connection>

-  	<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-docbook</developerConnection>

-  </scm>

-  <properties>

-  	<uimaScmProject>${project.artifactId}</uimaScmProject>

-  	<bookNameRoot>tools.ruta.book</bookNameRoot>

-  	<maven.deploy.skip>true</maven.deploy.skip>

-  </properties>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/common_book_info.xml b/trunk/ruta-docbook/src/docbook/common_book_info.xml
deleted file mode 100644
index 1e3d953..0000000
--- a/trunk/ruta-docbook/src/docbook/common_book_info.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">

-<!--

-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.

--->  

-<bookinfo>

-

-    <releaseinfo>Version <?eval ${project.version}?></releaseinfo>

-

-    <productname>UIMA Ruta</productname>

-

-    <authorgroup>

-      <corpauthor>Written and maintained by the Apache UIMA Development Community</corpauthor>

-    </authorgroup>

-

- <!--

-    <mediaobject>

-      <imageobject>

-        <imagedata fileref="images/UIMAlogoLarge.png"/>

-      </imageobject>

-    </mediaobject>

- -->

-    <legalnotice>

-      <para> </para>

-      <formalpara>

-        <title>License and Disclaimer</title>

-

-        <para>The ASF licenses this documentation

-           to you under the Apache License, Version 2.0 (the

-           "License"); you may not use this documentation except in compliance

-           with the License.  You may obtain a copy of the License at

-         

-         <blockquote>

-           <ulink url="http://www.apache.org/licenses/LICENSE-2.0"/>

-         </blockquote>

-         

-           Unless required by applicable law or agreed to in writing,

-           this documentation and its contents are distributed under the License 

-           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.

-         </para>

-      </formalpara>

-      <para> </para>

-      <para> </para>

-      <formalpara>

-        <title>Trademarks</title>

-        <para>All terms mentioned in the text that are known to be trademarks or 

-        service marks have been appropriately capitalized.  Use of such terms

-        in this book should not be regarded as affecting the validity of the

-        the trademark or service mark.

-        </para>

-      </formalpara>

-    </legalnotice>

-    <copyright>

-      <year><?eval ${project.inceptionYear}?></year>

-      <year><?eval ${project.properties.buildYear}?></year>

-      <holder>The Apache Software Foundation</holder>

-    </copyright>

-    <pubdate><?eval ${project.properties.buildMonth}?>, <?eval ${project.properties.buildYear}?></pubdate>

-  </bookinfo>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/language/basic_token/basic_token.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/language/basic_token/basic_token.png
deleted file mode 100644
index afc76ba..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/language/basic_token/basic_token.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/apply/apply.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/apply/apply.png
deleted file mode 100644
index 40286e8..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/apply/apply.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/cde.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/cde.png
deleted file mode 100644
index d687c07..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/cde.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/check/check.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/check/check.png
deleted file mode 100644
index ba9cf4e..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/check/check.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/create_tree_lists/create_tree_lists.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/create_tree_lists/create_tree_lists.png
deleted file mode 100644
index 35b195c..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/create_tree_lists/create_tree_lists.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/applied_rules_view.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/applied_rules_view.png
deleted file mode 100644
index 2a4aec1..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/applied_rules_view.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/created_by.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/created_by.png
deleted file mode 100644
index 2a58f1e..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/created_by.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/matched_and_failed.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/matched_and_failed.png
deleted file mode 100644
index eebd0c4..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/matched_and_failed.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/rule_elements.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/rule_elements.png
deleted file mode 100644
index 44a52e6..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/rule_elements.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/statistics.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/statistics.png
deleted file mode 100644
index fb4878d..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/explain/statistics.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/install/update.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/install/update.png
deleted file mode 100644
index 01e68cc..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/install/update.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/overview/screenshot_ruta_perspective_.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/overview/screenshot_ruta_perspective_.png
deleted file mode 100644
index 9205c8c..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/overview/screenshot_ruta_perspective_.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/test_project.PNG b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/test_project.PNG
deleted file mode 100644
index ea2b8c0..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/test_project.PNG
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/wizard1.PNG b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/wizard1.PNG
deleted file mode 100644
index 3e87d03..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/wizard1.PNG
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/wizard2.PNG b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/wizard2.PNG
deleted file mode 100644
index 6bdf3c9..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/projects/wizard2.PNG
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/query/Query2.2.0.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/query/Query2.2.0.png
deleted file mode 100644
index 898684e..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/query/Query2.2.0.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/ruta/AnnotationBrowser_2.2.0.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/ruta/AnnotationBrowser_2.2.0.png
deleted file mode 100644
index d47219a..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/ruta/AnnotationBrowser_2.2.0.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/ruta/selection.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/ruta/selection.png
deleted file mode 100644
index 88bd397..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/ruta/selection.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/annotation_test_initial_view_2_2_0.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/annotation_test_initial_view_2_2_0.png
deleted file mode 100644
index ff45f9e..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/annotation_test_initial_view_2_2_0.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/annotation_test_test_run_2_2_0.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/annotation_test_test_run_2_2_0.png
deleted file mode 100644
index 5f27199..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/annotation_test_test_run_2_2_0.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/excluded_types.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/excluded_types.png
deleted file mode 100644
index e7ee647..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/excluded_types.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/preference_2_2_0.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/preference_2_2_0.png
deleted file mode 100644
index 4db83eb..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/preference_2_2_0.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/script_explorer.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/script_explorer.png
deleted file mode 100644
index a2c8923..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/script_explorer.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/true_positive.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/true_positive.png
deleted file mode 100644
index 3088046..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/testing/true_positive.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler.png
deleted file mode 100644
index a25d4e8..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler_pref.png b/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler_pref.png
deleted file mode 100644
index a03e3fa..0000000
--- a/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler_pref.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.book.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.book.xml
deleted file mode 100644
index fb2d9c9..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.book.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">

-<!--

-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.

--->

-<book lang="en">

-  <title>Apache UIMA&#8482; Ruta Guide and Reference</title>

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="common_book_info.xml"/>

-    

-  <toc/>

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.overview.xml"/>

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.language.xml"/>

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.xml"/>

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.howtos.xml"/>

-  

-</book>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.howtos.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.howtos.xml
deleted file mode 100644
index 9a3b587..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.howtos.xml
+++ /dev/null
@@ -1,601 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[
-<!ENTITY imgroot "images/tools/tools.ruta/" >
-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  
-%uimaents;
-]>
-<!-- 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. -->
-<chapter id="ugr.tools.ruta.howtos">
-	<title>Apache UIMA Ruta HowTos</title>
-	<para>This chapter contains a selection of some use cases and HowTos
-		for UIMA Ruta.
-	</para>
-	<section id="ugr.tools.ruta.ae.basic.apply">
-		<title>Apply UIMA Ruta Analysis Engine in plain Java</title>
-		<para>
-			Let us assume that the reader wrote the UIMA Ruta rules using
-			the UIMA
-			Ruta Workbench, which already creates correctly configured
-			descriptors.
-			In this case, the following java code can be used to
-			apply the UIMA
-			Ruta script.
-		</para>
-		<programlisting><![CDATA[File specFile = new File("pathToMyWorkspace/MyProject/descriptor/"+
-    "my/package/MyScriptEngine.xml");
-XMLInputSource in = new XMLInputSource(specFile);
-ResourceSpecifier specifier = UIMAFramework.getXMLParser().
-    parseResourceSpecifier(in);
-// for import by name... set the datapath in the ResourceManager
-AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
-CAS cas = ae.newCAS();
-cas.setDocumentText("This is my document.");
-ae.process(cas);]]></programlisting>
-		<note>
-			<para>
-				The UIMA Ruta Analysis Engine utilizes type priorities. If the
-				CAS
-				object is
-				not created using the UIMA Ruta Analysis Engine
-				descriptor by other
-				means, then please
-				provide the necessary type
-				priorities for a valid execution of the UIMA
-				Ruta rules.
-			</para>
-		</note>
-		<para>
-			If the UIMA Ruta script was written, for example, with a common text
-			editor and no configured descriptors are yet available,
-			then the
-			following java code can be used, which, however, is only
-			applicable
-			for executing single script files that do not import
-			additional
-			components or scripts. In this case the other parameters,
-			e.g.,
-			<quote>additionalScripts</quote>
-			, need to be configured correctly.
-		</para>
-		<programlisting><![CDATA[URL aedesc = RutaEngine.class.getResource("BasicEngine.xml");
-XMLInputSource inae = new XMLInputSource(aedesc);
-ResourceSpecifier specifier = UIMAFramework.getXMLParser().
-    parseResourceSpecifier(inae);
-ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
-AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;
-TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().
-    getTypeSystem();
-
-Collection<TypeSystemDescription> tsds = 
-    new ArrayList<TypeSystemDescription>();
-tsds.add(basicTypeSystem);
-// add some other type system descriptors 
-// that are needed by your script file   
-TypeSystemDescription mergeTypeSystems = CasCreationUtils.
-    mergeTypeSystems(tsds);
-aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);
-aed.resolveImports(resMgr);
-        
-AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed, 
-    resMgr, null);
-File scriptFile = new File("path/to/file/MyScript.ruta");
-ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, 
-    new String[] { scriptFile.getParentFile().getAbsolutePath() });
-String name = scriptFile.getName().substring(0, 
-    scriptFile.getName().length() - 5);
-ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);
-ae.reconfigure();
-CAS cas = ae.newCAS();
-cas.setDocumentText("This is my document.");
-ae.process(cas);]]></programlisting>
-		<para>
-			There is also a convenience implementation for applying simple
-			scripts, which do not introduce new types. The following java code
-			applies a simple rule
-			<quote>T1 SW{-> MARK(T2)};</quote>
-			on the given CAS. Note that the types need to be already defined in
-			the type system of the CAS.
-		</para>
-		<programlisting><![CDATA[Ruta.apply(cas, "T1 SW{-> MARK(T2)};");]]></programlisting>
-	</section>
-	<section id="ugr.tools.ruta.integration">
-		<title>Integrating UIMA Ruta in an existing UIMA Annotator</title>
-		<para>This section provides a walk-through tutorial on integrating
-			Ruta in an existing UIMA annotator. In our artificial example
-			we will
-			use Ruta rules to post-process the output of a
-			Part-of-Speech tagger.
-			The POS tagger is a UIMA annotator that iterates over
-			sentences
-			and
-			tokens and updates the posTag field of each Token with a part of
-			speech. For example, given this text...
-		</para>
-		<programlisting>The quick brown fox receives many bets.
-The fox places many bets.
-The fox gets up early.
-The rabbit made up this story.</programlisting>
-		<para>...it assigns the posTag JJ (adjective) to the token
-			&quot;brown&quot; , the posTag NN (common noun) to the
-			token
-			&quot;fox&quot; and the tag VBZ (verb, 3rd person
-			singular present) to
-			the token &quot;receives&quot; in the first sentence.
-		</para>
-		<para>We have noticed that the tagger sometimens fails to disambiguate
-			NNS (common noun plural) and
-			VBZ tags, as in the second sentence. The
-			word &quot;up&quot; also seems
-			to confuse the tagger,
-			which always
-			assigns it an RB (adverb) tag, even when it is a particle
-			(RP)
-			following a verb, as in
-			the third and fourth sentences:
-		</para>
-		<programlisting>The|DT quick|JJ brown|JJ fox|NN receives|VBZ many|JJ bets|NNS .|.
-The|DT fox|NN places|NNS many|JJ bets|NNS .|.
-The|DT fox|NN gets|VBZ up|RB early|RB .|.
-The|DT rabbit|NN made|VBD up|RB this|DT story|NN .|.</programlisting>
-		<para>Let&apos;s imagine that after applying every possible approach
-			available in the POS tagging literature, our tagger still generates
-			these and some other errors. We decide to write a few Ruta
-			rules to
-			post-process the output of the tagger.
-		</para>
-		<section id="ugr.tools.ruta.ae.integration.mvn">
-			<title>Adding Ruta to our Annotator</title>
-			<para>The POS tagger is being developed as a Maven-based project.
-				Since Ruta maven artifacts are available on Maven Central, we
-				add the
-				following dependency to the project&apos;s pom.xml. The
-				functionalities described in this section
-				require a version of Ruta
-				equal to or greater than 2.1.0.
-			</para>
-			<programlisting>&lt;dependency&gt;
-  &lt;groupId&gt;org.apache.uima&lt;/groupId&gt;
-  &lt;artifactId&gt;ruta-core&lt;/artifactId&gt;
-  &lt;version&gt;[2.0.2,)&lt;/version&gt;
-&lt;/dependency&gt;</programlisting>
-			<para>We also take care that the Ruta basic typesystem is loaded when
-				our annotator is initialized. The Ruta typesystem descriptors are
-				available from
-				ruta-core/src/main/resources/org/apache/uima/ruta/engine/
-			</para>
-		</section>
-		<section id="ugr.tools.ruta.ae.integration.loading">
-			<title>Developing Ruta rules and applying them from inside Java code
-			</title>
-			<para>We are now ready to write some rules. The ones we develop for
-				fixing the two errors look like this:
-			</para>
-			<programlisting>Token.posTag =="NN" Token.posTag=="NNS"{-> Token.posTag="VBZ"}
-    Token.posTag=="JJ";
-Token{REGEXP(Token.posTag, "VB(.?)")} 
-    Token.posTag=="RB"{REGEXP("up")-> Token.posTag="RP"};  </programlisting>
-			<para>That
-				is, we change a Token's NNS tag to VBZ, if it is surrounded by a
-				Token tagged as NN and a Token tagged as JJ. We also change an RB
-				tag for an &quot;up&quot; token to RP, if &quot;up&quot; is preceded
-				by any verbal tag (VB, VBZ, etc.) matched with the help of the
-				<link linkend='ugr.tools.ruta.language.conditions.regexp'>REGEXP</link>
-				condition.
-			</para>
-			<para>We test our rules in the Ruta Workbench and see that they
-				indeed fix most of our problems. We save those and some more rules
-				in a text file
-				src/main/resources/ruta.txt.
-			</para>
-			<para>We declare the file with our rules as an external resource and
-				we load it during initialization.
-				Here's a way to do it using
-				uimaFIT:
-			</para>
-			<programlisting>/**
- * Ruta rules for post-processing the tagger's output
- */
-public static final String RUTA_RULES_PARA = "RutaRules";
-ExternalResource(key = RUTA_RULES_PARA, mandatory=false)
-...
-File rutaRulesF = new File((String) 
-    aContext.getConfigParameterValue(RUTA_RULES_PARA));
-</programlisting>
-			<para>After our CAS has been populated with posTag annotations from
-				the main algorithm, we post-process the CAS using
-				Ruta.apply():
-			</para>
-			<programlisting>String rutaRules = org.apache.commons.io.FileUtils.readFileToString(
-    rutaRulesF, "UTF-8");
-Ruta.apply(cas,  rutaRules);    
-</programlisting>
-			<para>We are now happy to see that the final output of our annotator
-				now
-				looks much better:
-			</para>
-			<programlisting>The|DT quick|JJ brown|JJ fox|NN receives|VBZ many|JJ bets|NNS .|.
-The|DT fox|NN places|VBZ many|JJ bets|NNS .|.
-The|DT fox|NN gets|VBZ up|RP early|RB .|.
-The|DT rabbit|NN made|VBD up|RP this|DT story|NN .|.</programlisting>
-		</section>
-	</section>
-
-
-	<section id="ugr.tools.ruta.maven">
-		<title>UIMA Ruta Maven Plugin</title>
-		<para>UIMA Ruta provides a maven plugin for building analysis engine
-			and type system descriptors for rule scripts.
-			Additionally, this maven plugin is able able to compile word list (gazetteers) to
-			the more efficient structures, tree word list and multi tree word
-			list. The usage and configuration is shortly summarized in the
-			following. An exemplary maven project for UIMA Ruta is given here:
-			<code>https://svn.apache.org/repos/asf/uima/ruta/trunk/example-projects/ruta-maven-example</code>
-		</para>
-		<section>
-		<title>generate goal</title>
-		<para>
-		The generate goal can be utilized to create xml descriptors for the UIMA Ruta script files. 
-		Its usage and configuration is summarized in the following example:
-		</para>
-		<programlisting><![CDATA[<plugin>
-<groupId>org.apache.uima</groupId>
-<artifactId>ruta-maven-plugin</artifactId>
-<version>2.3.0</version>
-<configuration>
-
- <!-- This is a exemplary configuration, which explicitly specifies the 
-  default configuration values if not mentioned otherwise. -->
-
- <!-- The directory where the generated type system descriptors will 
-  be written stored. -->
- <!-- default value: ${project.build.directory}/generated-sources/
-   ruta/descriptor -->
- <typeSystemOutputDirectory>${project.build.directory}/generated-sources/
-   ruta/descriptor</typeSystemOutputDirectory>
-
- <!-- The directory where the generated analysis engine descriptors will 
-  be stored. -->
- <!-- default value: ${project.build.directory}/generated-sources/ruta/
-   descriptor -->
- <analysisEngineOutputDirectory>${project.build.directory}/
-  generated-sources/ruta/descriptor</analysisEngineOutputDirectory>
-
- <!-- The template descriptor for the generated type system. By default the 
-   descriptor of the maven dependency is loaded. -->
- <!-- default value: none -->
- <!-- not used in this example <typeSystemTemplate>...
-   </typeSystemTemplate> -->
-
- <!-- The template descriptor for the generated analysis engine. 
-   By default the descriptor of the maven dependency is loaded. -->
- <!-- default value: none -->
- <!-- not used in this example <analysisEngineTemplate>...
-   </analysisEngineTemplate> -->
-
- <!-- Script paths of the generated analysis engine descriptor. -->
- <!-- default value: none -->
- <scriptPaths>
-  <scriptPath>${basedir}/src/main/ruta/</scriptPath>
- </scriptPaths>
-
- <!-- Descriptor paths of the generated analysis engine descriptor. -->
- <!-- default value: none -->
- <descriptorPaths>
-  <descriptorPath>${project.build.directory}/generated-sources/ruta/
-   descriptor</descriptorPath>
- </descriptorPaths>
-
- <!-- Resource paths of the generated analysis engine descriptor. -->
- <!-- default value: none -->
- <resourcePaths>
-  <resourcePath>${basedir}/src/main/resources/</resourcePath>
-  <resourcePath>${project.build.directory}/generated-sources/ruta/
-   resources/</resourcePath>
- </resourcePaths>
-
- <!-- Suffix used for the generated type system descriptors. -->
- <!-- default value: Engine -->
- <analysisEngineSuffix>Engine</analysisEngineSuffix>
-
- <!-- Suffix used for the generated analysis engine descriptors. -->
- <!-- default value: TypeSystem -->
- <typeSystemSuffix>TypeSystem</typeSystemSuffix>
-
- <!-- Source file encoding. -->
- <!-- default value: ${project.build.sourceEncoding} -->
- <encoding>UTF-8</encoding>
-
- <!-- Type of type system imports. false = import by location. -->
- <!-- default value: false -->
- <importByName>false</importByName>
-
- <!-- Option to resolve imports while building. -->
- <!-- default value: false -->
- <resolveImports>false</resolveImports>
-
- <!-- Amount of retries for building dependent descriptors. Default value 
-  -1 leads to three retires for each script. -->
-  <!-- default value: -1 -->
- <maxBuildRetries>-1</maxBuildRetries>
-
- <!-- List of packages with language extensions -->
- <!-- default value: none -->
- <extensionPackages>
-  <extensionPackage>org.apache.uima.ruta</extensionPackage>
- </extensionPackages>
-
- <!-- Add UIMA Ruta nature to .project -->
- <!-- default value: false -->
- <addRutaNature>true</addRutaNature>
-
-
- <!-- Buildpath of the UIMA Ruta Workbench (IDE) for this project -->
- <!-- default value: none -->
- <buildPaths>
-  <buildPath>script:src/main/ruta/</buildPath>
-  <buildPath>descriptor:target/generated-sources/ruta/descriptor/
-  </buildPath>
-  <buildPath>resources:src/main/resources/</buildPath>
- </buildPaths>
-
-</configuration>
-<executions>
- <execution>
-  <id>default</id>
-  <phase>process-classes</phase>
-  <goals>
-   <goal>generate</goal>
-  </goals>
- </execution>
-</executions>
-</plugin>
-]]>		</programlisting>
-    <para>The configuration parameters for this goal either define the build behavior, 
-    e.g., where the generated descriptor should be placed or which suffix the files should get,
-    or the configuration of the generated analysis engine descriptor, e.g., 
-    the values of the configuration parameter scriptPaths.
-    However, there are also other parameters: addRutaNature and buildPaths. 
-    Both can be utilzed to configure the current Eclipse project (due to the missing m2e connector).
-    This is required if the functionality of the UIMA Ruta Workbench, e.g., syntax checking or auto-completeion,
-     should be available in the maven project. If the parameter addRutaNature is set to true, then
-     the UIMA Ruta Workbench will recognize the project as a script project. Only then, 
-     the buildpath of the UIMA Ruta project can be configured using the buildPaths parameter, which specifies 
-     the three important source folders of the UIMA Ruta project. In normal UIMA Ruta Workbnech projects, 
-     these are script, descriptor and resources.
-    </para>
-		</section>
-		
-		<section>
-		<title>twl goal</title>
-    <para>
-    The twl goal can be utilized to create .twl files from .txt files.
-    Its usage and configuration is summarized in the following example:
-    </para>
-    <programlisting><![CDATA[<plugin>
-<groupId>org.apache.uima</groupId>
-<artifactId>ruta-maven-plugin</artifactId>
-<version>2.3.0</version>
-<configuration></configuration>
-<executions>
-<execution>
- <id>default</id>
- <phase>process-classes</phase>
- <goals>
-  <goal>twl</goal>
- </goals>
- <configuration>
-  <!-- This is a exemplary configuration, which explicitly specifies 
-   the default configuration values if not mentioned otherwise. -->
-
-  <!-- Compress resulting tree word list. -->
-  <!-- default value: true -->
-  <compress>true</compress>
-
-  <!-- The source files for the tree word list. -->
-  <!-- default value: none -->
-  <inputFiles>
-   <directory>${basedir}/src/main/resources</directory>
-   <includes>
-    <include>*.txt</include>
-   </includes>
-  </inputFiles>
-
-  <!-- The directory where the generated tree word lists will be 
-    written to.-->
-  <!-- default value: ${project.build.directory}/generated-sources/
-    ruta/resources/ -->
-  <outputDirectory>${project.build.directory}/generated-sources/ruta/
-    resources/</outputDirectory>
-
-  <!-- Source file encoding. -->
-  <!-- default value: ${project.build.sourceEncoding} -->
-  <encoding>UTF-8</encoding>
-
- </configuration>
-</execution>
-</executions>
-</plugin>
-    ]]>   </programlisting>
-		</section>
-		
-		<section>
-    <title>mtwl goal</title>
-    <para>
-    The mtwl goal can be utilized to create a .mtwl file from multiple .txt files.
-    Its usage and configuration is summarized in the following example:
-    </para>
-    <programlisting><![CDATA[<plugin>
-<groupId>org.apache.uima</groupId>
-<artifactId>ruta-maven-plugin</artifactId>
-<version>2.3.0</version>
-<configuration></configuration>
-<executions>
-<execution>
- <id>default</id>
- <phase>process-classes</phase>
- <goals>
-  <goal>mtwl</goal>
- </goals>
- <configuration>
-  <!-- This is a exemplary configuration, which explicitly specifies 
-   the default configuration values if not mentioned otherwise. -->
-
-  <!-- Compress resulting tree word list. -->
-  <!-- default value: true -->
-  <compress>true</compress>
-
-  <!-- The source files for the multi tree word list. -->
-  <!-- default value: none -->
-  <inputFiles>
-   <directory>${basedir}/src/main/resources</directory>
-   <includes>
-    <include>*.txt</include>
-   </includes>
-  </inputFiles>
-
-  <!-- The directory where the generated tree word list will be 
-    written to. -->
-  <!-- default value: ${project.build.directory}/generated-sources/ruta/
-    resources/generated.mtwl -->
-  <outputFile>${project.build.directory}/generated-sources/ruta/resources/
-    generated.mtwl</outputFile>
-
-  <!-- Source file encoding. -->
-  <!-- default value: ${project.build.sourceEncoding} -->
-  <encoding>UTF-8</encoding>
-  
- </configuration>
-</execution>
-</executions>
-</plugin>
-    ]]>   </programlisting>
-    </section>
-		
-	</section>
-
-  <section id="section.tools.ruta.workbench.textruler.example">
-   <title>Induce rules with the TextRuler framework</title>
-      <para> 
-      This section gives a short example how the TextRuler framework is applied in order to induce annotation rules. We refer to the screenshot in <xref linkend="figure.tools.ruta.workbench.textruler.main"/>
-      for the configuration and are using the exemplary UIMA Ruta project <quote>TextRulerExample</quote>, which is part of the source release of UIMA Ruta.
-      After importing the project into your workspace, please rebuild all UIMA Ruta scripts in order to create the descriptors, e.g., by cleaning the project.
-      </para>
-      <para> 
-        In this example, we are using the <quote>KEP</quote> algorithm for learning annotation rules for identifying Bibtex entries in the reference section of scientific publications:
-        <orderedlist>
-        <listitem>
-          <para>Select the folder <quote>single</quote> and drag and drop it to the <quote>Training Data</quote> text field. This folder contains one file with 
-          correct annotations and serves as gold standard data in our example.</para>
-        </listitem>
-        <listitem>
-          <para>Select the file <quote>Feature.ruta</quote> and drag and drop it to the <quote>Preprocess Script</quote> text field. This UIMA Ruta script knows all necessary types, especially the types
-          of the annotations we try the learn rules for, and additionally it contains rules that create useful annotations, which can be used by the algorithm in order to learn better rules.</para>
-        </listitem>
-        <listitem>
-          <para>Select the file <quote>InfoTypes.txt</quote> and drag and drop it to the <quote>Information Types</quote> list. This specifies the goal of the learning process, 
-          which types of annotations should be annotated by the induced rules, respectively.</para>
-        </listitem>
-        <listitem>
-          <para>Check the checkbox of the <quote>KEP</quote> algorithm and press the start button in the toolbar fo the view.</para>
-        </listitem>
-        <listitem>
-          <para>The algorithm now tries to induce rules for the targeted types. The current result is displayed in the view <quote>KEP Results</quote> in the right part of the perspective.</para>
-        </listitem>
-        <listitem>
-          <para>After the algorithms finished the learning process, create a new UIMA Ruta file in the <quote>uima.ruta.example</quote> package and copy the content of the result view
-          to the new file. Now, the induced rules can be applied as a normal UIMA Ruta script file.</para>
-        </listitem>
-      </orderedlist>
-      </para>
-    </section>
-    <section id="section.tools.ruta.howto.html">
-     <title>HTML annotations in plain text</title>
-      <para> 
-       The following script provides an example how to process HTML files with UIMA Ruta in order to get plain text documents 
-       that still contain information about the HTML tags in form of annotations. The analysis engine descriptor HtmlViewWriter is identical to the common ViewWriter, 
-       but additionally specifies a type system. More information about different options to configure the
-       conversion can be found in <link linkend='ugr.tools.ruta.ae.htmlconverter'>here</link>.
-      </para>
-          <programlisting><![CDATA[PACKAGE uima.ruta.example;
-
-ENGINE utils.HtmlAnnotator;
-ENGINE utils.HtmlConverter;
-ENGINE HtmlViewWriter;
-TYPESYSTEM utils.HtmlTypeSystem;
-TYPESYSTEM utils.SourceDocumentInformation;
-
-Document{-> RETAINTYPE(SPACE,BREAK)};
-Document{-> EXEC(HtmlAnnotator)};
-
-Document { -> CONFIGURE(HtmlConverter, "inputView" = "_InitialView", 
-    "outputView" = "plain"), 
-      EXEC(HtmlConverter)};
-
-Document{ -> CONFIGURE(ViewWriter, "inputView" = "plain", 
-    "outputView" = "_InitialView", "output" = "/../converted/"), 
-    EXEC(HtmlViewWriter)};
-    ]]>   </programlisting>
-    </section>
-    
-    <section id="section.tools.ruta.howto.sorter">
-     <title>Sorting files with UIMA Ruta</title>
-      <para> 
-       The following script provides an example how to utilize UIMA Ruta for sorting files.
-      </para>
-          <programlisting><![CDATA[ENGINE utils.XMIWriter;
-TYPESYSTEM utils.SourceDocumentInformation;
-
-DECLARE Pattern;
-
-// some rule-based pattern
-(NUM SPECIAL NUM SPECIAL NUM){-> Pattern};
-
-Document{CONTAINS(Pattern)->CONFIGURE(XMIWriter, 
-  "Output" = "../with/"), EXEC(XMIWriter)};
-Document{-CONTAINS(Pattern)->CONFIGURE(XMIWriter, 
-  "Output" = "../without/"), EXEC(XMIWriter)};
-    ]]>   </programlisting>
-    </section>
-    <section id="section.tools.ruta.howto.xml">
-     <title>Converting XML documents with UIMA Ruta</title>
-      <para> 
-       The following script provides an example how to process XML files in order to retain only the text content. the removed XML elements should, howver, be available as annotations. 
-       This script can therefore be applied to create xmiCAS files from text document annotated with XML tags. The analysis engine descriptor TEIViewWriter is identical to the common ViewWriter, 
-       but additionally specifies a type system.
-      </para>
-          <programlisting><![CDATA[ENGINE utils.HtmlAnnotator;
-TYPESYSTEM utils.HtmlTypeSystem;
-ENGINE utils.HtmlConverter;
-ENGINE TEIViewWriter;
-TYPESYSTEM utils.SourceDocumentInformation;
-
-DECLARE PersName, LastName, FirstName, AddName;
-
-Document{->EXEC(HtmlAnnotator, {TAG})};
-Document{-> RETAINTYPE(MARKUP,SPACE)};
-TAG.name=="PERSNAME"{-> PersName};
-TAG.name=="SURNAME"{-> LastName};
-TAG.name=="FORENAME"{-> FirstName};
-TAG.name=="ADDNAME"{-> AddName};
-Document{-> RETAINTYPE};
-
-Document { -> CONFIGURE(HtmlConverter, "inputView" = "_InitialView", 
-    "outputView" = "plain", "skipWhitespaces" = false), 
-      EXEC(HtmlConverter)};
-
-Document{ -> CONFIGURE(ViewWriter, "inputView" = "plain", "outputView" = 
-    "_InitialView", "output" = "/../converted/"), 
-    EXEC(TEIViewWriter)};
-    ]]>   </programlisting>
-    </section>
-</chapter>
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.actions.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.actions.xml
deleted file mode 100644
index 96c9a98..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.actions.xml
+++ /dev/null
@@ -1,1473 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/tools.ruta/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<section id="ugr.tools.ruta.language.actions">

-  <title>Actions</title>

-

-  <section id="ugr.tools.ruta.language.actions.add">

-    <title>ADD</title>

-    <para>

-      The ADD action adds all the elements of the passed

-      RutaExpressions to a given list. For example, this expressions

-      could be a string, an integer variable or a list. For a

-      complete overview on UIMA Ruta expressions see

-      <xref linkend='ugr.tools.ruta.language.expressions' />.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[ADD(ListVariable,(RutaExpression)+)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->ADD(list, var)};]]></programlisting>

-      </para>

-      <para>

-        In this example, the variable 'var' is added to the list

-        'list'.

-      </para>

-    </section>

-  </section>

-  

-  <section id="ugr.tools.ruta.language.actions.addfiltertype">

-    <title>ADDFILTERTYPE</title>

-    <para>

-      The ADDFILTERTYPE action adds its arguments to the list of filtered types, 

-      which restrict the visibility of the rules.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[ADDFILTERTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->ADDFILTERTYPE(CW)};]]></programlisting>

-      </para>

-      <para>

-        After applying this rule, capitalized words are invisible additionally to the previously filtered types.

-      </para>

-    </section>

-  </section>

-  

-    <section id="ugr.tools.ruta.language.actions.addretaintype">

-    <title>ADDRETAINTYPE</title>

-    <para>

-      The ADDFILTERTYPE action adds its arguments to the list of retained types, 

-      which extend the visibility of the rules.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[ADDRETAINTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->ADDRETAINTYPE(MARKUP)};]]></programlisting>

-      </para>

-      <para>

-        After applying this rule, markup is visible additionally to the previously retained types.

-      </para>

-    </section>

-  </section>

-  

-  

-  <section id="ugr.tools.ruta.language.actions.assign">

-    <title>ASSIGN</title>

-    <para>

-      The ASSIGN action assigns the value of the passed expression to

-      a variable of the same type.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[ASSIGN(BooleanVariable,BooleanExpression)]]></programlisting>

-      </para>

-      <para>

-        <programlisting><![CDATA[ASSIGN(NumberVariable,NumberExpression)]]></programlisting>

-      </para>

-      <para>

-        <programlisting><![CDATA[ASSIGN(StringVariable,StringExpression)]]></programlisting>

-      </para>

-      <para>

-        <programlisting><![CDATA[ASSIGN(TypeVariable,TypeExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->ASSIGN(amount, (amount/2))};]]></programlisting>

-      </para>

-      <para>

-        In this example, the value of the variable 'amount' is divided in half.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.call">

-    <title>CALL</title>

-    <para>

-      The CALL action initiates the execution of a different script

-      file or script block. Currently, only complete script files are

-      supported.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CALL(DifferentFile)]]></programlisting>

-      </para>

-      <para>

-        <programlisting><![CDATA[CALL(Block)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->CALL(NamedEntities)};]]></programlisting>

-      </para>

-      <para>

-        Here, a script 'NamedEntities' for named entity recognition is

-        executed.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.clear">

-    <title>CLEAR</title>

-    <para>

-      The CLEAR action removes all elements of the given list. If the list was initialized as it was declared, 

-      then it is reset to its initial value.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CLEAR(ListVariable)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->CLEAR(SomeList)};]]></programlisting>

-      </para>

-      <para>

-        This rule clears the list 'SomeList'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.color">

-    <title>COLOR</title>

-    <para>

-      The COLOR action sets the color of an annotation type in the

-      modified view, if the rule has fired. The background color is passed as

-      the second parameter. The font color can be changed by passing a

-      further color as a third parameter. The supported colors are: black, silver, gray,

-      white, maroon, red, purple, fuchsia, green, lime, olive, yellow,

-      navy, blue, aqua, lightblue, lightgreen, orange, pink, salmon, cyan,

-      violet, tan, brown, white and mediumpurple.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[COLOR(TypeExpression,StringExpression(, StringExpression

-          (, BooleanExpression)?)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->COLOR(Headline, "red", "green", true)};]]></programlisting>

-      </para>

-      <para>

-        This rule colors all Headline annotations in the modified view.

-        Thereby, the background color is set to red, font color is set to green

-        and all 'Headline' annotations are selected when opening the

-        modified view.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.configure">

-    <title>CONFIGURE</title>

-    <para>

-      The CONFIGURE action can be used to configure the analysis

-      engine of the given namespace (first parameter). The parameters that

-      should be configured with corresponding values are passed as

-      name-value

-      pairs.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CONFIGURE(AnalysisEngine(,StringExpression = Expression)+)]]></programlisting>

-      </para>

-    </section>

-     <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[ENGINE utils.HtmlAnnotator;

-Document{->CONFIGURE(HtmlAnnotator, "onlyContent" = false)};]]></programlisting>

-      </para>

-      <para>

-        The former rule changes the value of configuration parameter <quote>onlyContent</quote>

-        to false and reconfigure the analysis engine.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.create">

-    <title>CREATE</title>

-    <para>

-      The CREATE action is similar to the MARK action. It also

-      annotates the matched text fragments with a type annotation, but

-      additionally assigns values to a chosen subset of the type's feature

-      elements.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CREATE(TypeExpression(,NumberExpression)*

-                         (,StringExpression = Expression)+)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{COUNT(ANY,0,10000,cnt)->CREATE(Headline,"size" = cnt)};]]></programlisting>

-      </para>

-      <para>

-        This rule counts the number of tokens of type ANY in a

-        Paragraph annotation and assigns the counted value to the int

-        variable 'cnt'. If the counted number is between 0 and 10000, a

-        Headline annotation is created for this Paragraph. Moreover, the

-        feature named 'size' of Headline is set to the value of 'cnt'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.del">

-    <title>DEL</title>

-    <para>

-      The DEL action deletes the matched text fragments in the

-      modified

-      view.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[DEL]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Name{->DEL};]]></programlisting>

-      </para>

-      <para>

-        This rule deletes all text fragments that are annotated with a

-        Name annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.dynamicanchoring">

-    <title>DYNAMICANCHORING</title>

-    <para>

-      The DYNAMICANCHORING action turns dynamic anchoring on or off

-      (first parameter) and assigns the anchoring parameters penalty

-      (second parameter) and factor (third parameter).

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[DYNAMICANCHORING(BooleanExpression

-              (,NumberExpression(,NumberExpression)?)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->DYNAMICANCHORING(true)};]]></programlisting>

-      </para>

-      <para>

-        The above mentioned example activates dynamic anchoring.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.exec">

-    <title>EXEC</title>

-    <para>

-      The EXEC action initiates the execution of a different script

-      file or analysis engine on the complete input document, independent from

-      the matched text and the current filtering settings. If the imported component (DifferentFile)

-      refers to another script file, it is applied on a new representation of the document:

-      the complete text of the original CAS with the default filtering

-      settings of the UIMA Ruta analysis engine. If it refers to an 

-      external analysis engine, then it is applied on the complete document. 

-      The optional, first argument is is a string expression, which specifies the view the component should be applied on.

-      The optional, third argument is a list of types, which should be reindexed by Ruta (not UIMA itself).

-    </para>

-    <note>

-    <para>

-      Annotations created by the external analysis engine are not accessible for UIMA Ruta rules in the same script. 

-      The types of these annotations need to be provided in the second argument in order to be visible to the Ruta rules.

-    </para>

-    </note>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[EXEC((StringExpression,)? DifferentFile(, TypeListExpression)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[ENGINE NamedEntities;

-Document{->EXEC(NamedEntities, {Person, Location})};]]></programlisting>

-      </para>

-      <para>

-        Here, an analysis engine for named entity recognition is

-        executed once on the complete document and the annotations of the types Person and Location (and all subtypes) 

-        are reindexed in UIMA Ruta. Without this list of types, the annotations are added to the CAS, but cannot be accessed by Ruta rules.

-      </para>

-    </section>

-  </section>

-  <section id="ugr.tools.ruta.language.actions.fill">

-    <title>FILL</title>

-    <para>

-      The FILL action fills a chosen subset of the given type's

-      feature elements.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[FILL(TypeExpression(,StringExpression = Expression)+)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Headline{COUNT(ANY,0,10000,tokenCount)

-          ->FILL(Headline,"size" = tokenCount)};]]></programlisting>

-      </para>

-      <para>

-        Here, the number of tokens within an Headline annotation is

-        counted and stored in variable 'tokenCount'. If the number of tokens

-        is within the interval [0;10000], the FILL action fills the

-        Headline's feature 'size' with the value of 'tokenCount'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.filtertype">

-    <title>FILTERTYPE</title>

-    <para>

-      This action filters the given types of annotations. They are now

-      ignored by rules. Expressions are not yet supported. 

-      This action is related to RETAINTYPE (see <xref linkend='ugr.tools.ruta.language.actions.retaintype' />).

-    </para>

-    <note>    

-      <para>

-        The visibility of types is calculated using three lists: 

-        A list <quote>default</quote> for the initially filtered types, 

-        which is specified in the configuration parameters of the analysis engine, the list <quote>filtered</quote>, which is 

-        specified by the FILTERTYPE action, and the list <quote>retained</quote>, which is specified by the RETAINTYPE action.

-        For determining the actual visibility of types, list <quote>filtered</quote> is added to list <quote>default</quote> 

-        and then all elements of list <quote>retained</quote> are removed. The annotations of the types in the resulting list are not visible.

-        Please note that the actions FILTERTYPE and RETAINTYPE replace all elements of the respective lists and that RETAINTYPE 

-        overrides FILTERTYPE.

-      </para>

-    </note>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[FILTERTYPE((TypeExpression(,TypeExpression)*))?]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->FILTERTYPE(SW)};]]></programlisting>

-      </para>

-      <para>

-        This rule filters all small written words in the input

-        document. They are further ignored by every rule.

-      </para>

-      <para>

-        <programlisting><![CDATA[Document{->FILTERTYPE};]]></programlisting>

-      </para>

-      <para>

-        Here, the the action (without parentheses) specifies that no additional types should be filtered.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.gather">

-    <title>GATHER</title>

-    <para>

-      This action creates a complex structure: an annotation with

-      features. The optionally passed indexes (NumberExpressions after the

-      TypeExpression) can be used to create an annotation that spans the

-      matched information of several rule elements. The features are

-      collected using the indexes of the rule elements of the complete

-      rule.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[GATHER(TypeExpression(,NumberExpression)*

-          (,StringExpression = NumberExpression)+)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[DECLARE Annotation A;

-DECLARE Annotation B;

-DECLARE Annotation C(Annotation a, Annotation b);

-W{REGEXP("A")->MARK(A)};

-W{REGEXP("B")->MARK(B)};

-A B{-> GATHER(C, 1, 2, "a" = 1, "b" = 2)};]]></programlisting>

-      </para>

-      <para>

-        Two annotations A and B are declared and annotated. The last

-        rule creates an annotation C spanning the elements A (index 1 since

-        it is the first rule element) and B (index 2) with its features 'a'

-        set to annotation A (again index 1) and 'b' set to annotation B

-        (again index 2).

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.get">

-    <title>GET</title>

-    <para>

-      The GET action retrieves an element of the given list dependent on a

-      given strategy.

-      <table frame='all'>

-        <title>Currently supported strategies</title>

-        <tgroup cols='2' align='left' colsep='0.5' rowsep='0.5'>

-          <thead>

-            <row>

-              <entry>Strategy</entry>

-              <entry>Functionality</entry>

-            </row>

-          </thead>

-          <tbody>

-            <row>

-              <entry>dominant</entry>

-              <entry>finds the most occurring element</entry>

-            </row>

-          </tbody>

-        </tgroup>

-      </table>

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[GET(ListExpression, Variable, StringExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->GET(list, var, "dominant")};]]></programlisting>

-      </para>

-      <para>

-        In this example, the element of the list 'list' that occurs

-        most is stored in the variable 'var'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.getfeature">

-    <title>GETFEATURE</title>

-    <para>

-      The GETFEATURE action stores the value of the matched

-      annotation's feature (first paramter) in the given variable (second

-      parameter).

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[GETFEATURE(StringExpression, Variable)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->GETFEATURE("language", stringVar)};]]></programlisting>

-      </para>

-      <para>

-        In this example, variable 'stringVar' will contain the value of

-        the feature 'language'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.getlist">

-    <title>GETLIST</title>

-    <para>

-      This action retrieves a list of types dependent on a given strategy.

-      <table frame='all'>

-        <title>Currently supported strategies</title>

-        <tgroup cols='2' align='left' colsep='0.5' rowsep='0.5'>

-          <thead>

-            <row>

-              <entry>Strategy</entry>

-              <entry>Functionality</entry>

-            </row>

-          </thead>

-          <tbody>

-            <row>

-              <entry>Types</entry>

-              <entry>get all types within the matched annotation</entry>

-            </row>

-            <row>

-              <entry>Types:End</entry>

-              <entry>get all types that end at the same offset as the matched

-                annotation

-              </entry>

-            </row>

-            <row>

-              <entry>Types:Begin</entry>

-              <entry>get all types that start at the same offset as the

-                matched

-                annotation

-              </entry>

-            </row>

-          </tbody>

-        </tgroup>

-      </table>

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[GETLIST(ListVariable, StringExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->GETLIST(list, "Types")};]]></programlisting>

-      </para>

-      <para>

-        Here, a list of all types within the document is created and

-        assigned to list variable 'list'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.greedyanchoring">

-    <title>GREEDYANCHORING</title>

-    <para>

-      The GREEDYANCHORING action turns greedy anchoring on or off. 

-      If the first parameter is set to true, then start positions already matched by the same rule element will be ignored. This situation 

-      occurs mostly for rules that start with a quantifier. The second optional parameter activates greedy acnhoring for the complete rule.

-      Later rule matches are only possible after previous matches.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[GREEDYANCHORING(BooleanExpression(,BooleanExpression)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->GREEDYANCHORING(true, true)};

-        ANY+;

-        CW CW;]]></programlisting>

-      </para>

-      <para>

-        The above mentioned example activates dynamic anchoring and the second rule will then only match once 

-        since the next positions, e.g., the second token, are already covered by the first attempt.

-        The third rule will not match on capitalized word that have benn already considered by previous matches of the rule.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.log">

-    <title>LOG</title>

-    <para>

-      The LOG action writes a log message.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[LOG(StringExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->LOG("processed")};]]></programlisting>

-      </para>

-      <para>

-        This rule writes a log message with the string "processed".

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.mark">

-    <title>MARK</title>

-    <para>

-      The MARK action is the most important action in the UIMA Ruta

-      system. It creates a new annotation of the given type. The optionally

-      passed indexes (NumberExpressions after the TypeExpression) can be

-      used to create an annotation that spanns the matched information of

-      several rule elements.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MARK(TypeExpression(,NumberExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Freeline Paragraph{->MARK(ParagraphAfterFreeline,1,2)};]]></programlisting>

-      </para>

-      <para>

-        This rule matches on a free line followed by a Paragraph

-        annotation and annotates both in a single ParagraphAfterFreeline

-        annotation. The two numerical expressions at the end of the mark

-        action state that the matched text of the first and the second rule

-        elements are joined to create the boundaries of the new annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.markfast">

-    <title>MARKFAST</title>

-    <para>

-      The MARKFAST action creates annotations of the given type (first

-      parameter), if an element of the passed list (second parameter) occurs

-      within the window of the matched annotation. Thereby, the created

-      annotation does not cover the whole matched annotation. Instead, it

-      only covers the text of the found occurence. The third parameter is

-      optional. It defines, whether the MARKFAST action should ignore the case,

-      whereby its default value is false. The optional fourth parameter

-      specifies a character threshold for the ignorence of the case. It is

-      only relevant, if the ignore-case value is set to true. The last

-      parameter is set to true by default and specifies whether whitespaces

-      in the entries of the dictionary should be ignored. For more

-      information on lists see

-      <xref linkend='ugr.tools.ruta.language.declarations.ressource' />. 

-      Additionally to external word lists, string lists variables can be

-      used.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MARKFAST(TypeExpression,ListExpression(,BooleanExpression

-          (,NumberExpression,(BooleanExpression)?)?)?)]]></programlisting>

-        <programlisting><![CDATA[MARKFAST(TypeExpression,StringListExpression(,BooleanExpression

-          (,NumberExpression,(BooleanExpression)?)?)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[WORDLIST FirstNameList = 'FirstNames.txt';

-DECLARE FirstName;

-Document{-> MARKFAST(FirstName, FirstNameList, true, 2)};]]></programlisting>

-      </para>

-      <para>

-        This rule annotates all first names listed in the list

-        'FirstNameList' within the document and ignores the case, if the

-        length of the word

-        is greater than 2.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.markfirst">

-    <title>MARKFIRST</title>

-    <para>

-      The MARKFIRST action annotates the first token (basic annotation) of the matched

-      annotation with the given type.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MARKFIRST(TypeExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->MARKFIRST(First)};]]></programlisting>

-      </para>

-      <para>

-        This rule annotates the first token of the document with the

-        annotation First.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.marklast">

-    <title>MARKLAST</title>

-    <para>

-      The MARKLAST action annotates the last token of the matched

-      annotation with the given type.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MARKLAST(TypeExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->MARKLAST(Last)};]]></programlisting>

-      </para>

-      <para>

-        This rule annotates the last token of the document with the

-        annotation Last.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.markonce">

-    <title>MARKONCE</title>

-    <para>

-      The MARKONCE action has the same functionality as the MARK

-      action, but creates a new annotation only, 

-      if each part of the matched annotation is not yet part of the given type.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MARKONCE(NumberExpression,TypeExpression(,NumberExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Freeline Paragraph{->MARKONCE(ParagraphAfterFreeline,1,2)};]]></programlisting>

-      </para>

-      <para>

-        This rule matches on a free line followed by a Paragraph and

-        annotates both in a single ParagraphAfterFreeline annotation, if no part 

-        is not already annotated with ParagraphAfterFreeline annotation. The

-        two numerical expressions at the end of the MARKONCE action state

-        that the matched text of the first and the second rule elements are

-        joined to create the boundaries of the new annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.markscore">

-    <title>MARKSCORE</title>

-    <para>

-      The MARKSCORE action is similar to the MARK action. It also creates a

-      new annotation of the given type, but only if it is not yet existing.

-      The optionally passed indexes (parameters after the TypeExpression)

-      can be used to create an annotation that spanns the matched

-      information of several rule elements. Additionally, a score value

-      (first parameter) is added to the heuristic score value of the

-      annotation. For more information on heuristic scores see

-      <xref linkend='ugr.tools.ruta.language.score' />

-      .

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MARKSCORE(NumberExpression,TypeExpression(,NumberExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Freeline Paragraph{->MARKSCORE(10,ParagraphAfterFreeline,1,2)};]]></programlisting>

-      </para>

-      <para>

-        This rule matches on a free line followed by a paragraph and

-        annotates both in a single ParagraphAfterFreeline annotation. The

-        two number expressions at the end of the mark action indicate that

-        the matched text of the first and the second rule elements are

-        joined to create the boundaries of the new annotation. Additionally,

-        the score '10' is added to the heuristic threshold of this

-        annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.marktable">

-    <title>MARKTABLE</title>

-    <para>

-      The MARKTABLE action creates annotations of the given type (first

-      parameter), if an element of the given column (second parameter) of a

-      passed table (third parameter) occures within the window of the

-      matched annotation. Thereby, the created annotation does not cover the

-      whole matched annotation. Instead, it only covers the text of the

-      found occurence. Optionally the MARKTABLE action is able to assign

-      entries of the given table to features of the created annotation.

-      For

-      more information on tables see

-      <xref linkend='ugr.tools.ruta.language.declarations.ressource' />. Additionally, several configuration parameters are possible. (See example.)

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MARKTABLE(TypeExpression, NumberExpression, TableExpression 

-          (,BooleanExpression, NumberExpression, 

-          StringExpression, NumberExpression)? 

-          (,StringExpression = NumberExpression)+)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[WORDTABLE TestTable = 'TestTable.csv';

-DECLARE Annotation Struct(STRING first);

-Document{-> MARKTABLE(Struct, 1, TestTable, 

-    true, 4, ".,-", 2, "first" = 2)};]]></programlisting>

-      </para>

-      <para>

-        In this example, the whole document is searched for all

-        occurences of the entries of the first column of the given table

-        'TestTable'. For each occurence, an annotation of the type Struct is

-        created and its feature 'first' is filled with the entry of the

-        second column. Moreover, the case of the word is ignored if the

-        length of the word exceeds 4. Additionally, the chars '.', ',' and

-        '-' are ignored, but maximally two of them.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.matchedtext">

-    <title>MATCHEDTEXT</title>

-    <para>

-      The MATCHEDTEXT action saves the text of the matched annotation

-      in a passed String variable. The optionally passed indexes can be

-      used to match the text of several rule elements.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MATCHEDTEXT(StringVariable(,NumberExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Headline Paragraph{->MATCHEDTEXT(stringVariable,1,2)};]]></programlisting>

-      </para>

-      <para>

-        The text covered by the Headline (rule element 1) and the

-        Paragraph (rule element 2) annotation is saved in variable

-        'stringVariable'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.merge">

-    <title>MERGE</title>

-    <para>

-      The MERGE action merges a number of given lists. The first

-      parameter defines, if the merge is done as intersection (false) or as

-      union (true). The second parameter is the list variable that will

-      contain the result.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MERGE(BooleanExpression, ListVariable, ListExpression, (ListExpression)+)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->MERGE(false, listVar, list1, list2, list3)};]]></programlisting>

-      </para>

-      <para>

-        The elements that occur in all three lists will be placed in

-        the list 'listVar'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.remove">

-    <title>REMOVE</title>

-    <para>

-      The REMOVE action removes lists or single values from a given

-      list.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[REMOVE(ListVariable,(Argument)+)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->REMOVE(list, var)};]]></programlisting>

-      </para>

-      <para>

-        In this example, the variable 'var' is removed from the list

-        'list'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.removeduplicate">

-    <title>REMOVEDUPLICATE</title>

-    <para>

-      This action removes all duplicates within a given list.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[REMOVEDUPLICATE(ListVariable)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->REMOVEDUPLICATE(list)};]]></programlisting>

-      </para>

-      <para>

-        Here, all duplicates within the list 'list' are removed.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.removefiltertype">

-    <title>REMOVEFILTERTYPE</title>

-    <para>

-      The REMOVEFILTERTYPE action removes its arguments from the list of filtered types, 

-      which restrict the visibility of the rules.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[REMOVEFILTERTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->REMOVEFILTERTYPE(W)};]]></programlisting>

-      </para>

-      <para>

-        After applying this rule, words are possibly visible again depending on the current filtering settings.

-      </para>

-    </section>

-  </section>

-  

-    <section id="ugr.tools.ruta.language.actions.removeretaintype">

-    <title>REMOVERETAINTYPE</title>

-    <para>

-      The REMOVEFILTERTYPE action removes its arguments from the list of retained types, 

-      which extend the visibility of the rules.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[REMOVERETAINTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->REMOVERETAINTYPE(W)};]]></programlisting>

-      </para>

-      <para>

-        After applying this rule, words are possibly not visible anymore depending on the current filtering settings.

-      </para>

-    </section>

-  </section>

-

-

-  <section id="ugr.tools.ruta.language.actions.replace">

-    <title>REPLACE</title>

-    <para>

-      The REPLACE action replaces the text of all matched annotations with

-      the given StringExpression. It remembers the modification for the

-      matched annotations and shows them in the modified view (see

-      <xref linkend='ugr.tools.ruta.language.modification' />).

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[REPLACE(StringExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[FirstName{->REPLACE("first name")};]]></programlisting>

-      </para>

-      <para>

-        This rule replaces all first names with the string 'first

-        name'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.retaintype">

-    <title>RETAINTYPE</title>

-    <para>

-      The RETAINTYPE action retains the given types. This means that they

-      are now not ignored by rules. This action is related to

-      FILTERTYPE (see <xref linkend='ugr.tools.ruta.language.actions.filtertype' />).

-    </para>

-    <note>    

-      <para>

-        The visibility of types is calculated using three lists: 

-        A list <quote>default</quote> for the initially filtered types, 

-        which is specified in the configuration parameters of the analysis engine, the list <quote>filtered</quote>, which is 

-        specified by the FILTERTYPE action, and the list <quote>retained</quote>, which is specified by the RETAINTYPE action.

-        For determining the actual visibility of types, list <quote>filtered</quote> is added to list <quote>default</quote> 

-        and then all elements of list <quote>retained</quote> are removed. The annotations of the types in the resulting list are not visible.

-        Please note that the actions FILTERTYPE and RETAINTYPE replace all elements of the respective lists and that RETAINTYPE 

-        overrides FILTERTYPE.

-      </para>

-    </note>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[RETAINTYPE((TypeExpression(,TypeExpression)*))?]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->RETAINTYPE(SPACE)};]]></programlisting>

-      </para>

-      <para>

-        Here, all spaces are retained and can be matched by rules.

-      </para>

-      <para>

-        <programlisting><![CDATA[Document{->RETAINTYPE};]]></programlisting>

-      </para>

-      <para>

-        Here, the the action (without parentheses) specifies that no types should be retained.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.setfeature">

-    <title>SETFEATURE</title>

-    <para>

-      The SETFEATURE action sets the value of a feature of the

-      matched

-      complex structure.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[SETFEATURE(StringExpression,Expression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->SETFEATURE("language","en")};]]></programlisting>

-      </para>

-      <para>

-        Here, the feature 'language' of the input document is set to

-        English.

-      </para>

-    </section>

-  </section>

-

-    <section id="ugr.tools.ruta.language.actions.shift">

-      <title>SHIFT</title>

-      <para>

-        The SHIFT action can be used to change the offsets of an annotation. The optional number expressions,

-        which point the rule elements of the rule, specify the new offsets of the annotation. The annotations that

-        will be modified have to start or end at the match of the rule element of the action. This means that the action 

-        has to be placed at a matching condition, which will be used to specify the annotations to be changed.

-      </para>

-      <section>

-        <title>

-          <emphasis role="bold">Definition:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[SHIFT(TypeExpression(,NumberExpression)*)]]></programlisting>

-        </para>

-      </section>

-      <section>

-        <title>

-          <emphasis role="bold">Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[Author{-> SHIFT(Author,1,2)} PM;]]></programlisting>

-        </para>

-        <para>

-          In this example, an annotation of the type <quote>Author</quote> is expanded 

-          in order to cover the following punctation mark.

-        </para>

-        <para>

-          <programlisting><![CDATA[W{STARTSWITH(FS) -> SHIFT(FS, 1, 2)} W+ MARKUP;]]></programlisting>

-        </para>

-        <para>

-          In this example, an annotation of the type <quote>FS</quote> that consists mostly of words 

-          is shrinked by removing the last MARKUP annotation. 

-        </para>

-      </section>

-    </section>

-

-  <section id="ugr.tools.ruta.language.actions.transfer">

-    <title>TRANSFER</title>

-    <para>

-      The TRANSFER action creates a new feature structure and adds all

-      compatible features of the matched annotation.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[TRANSFER(TypeExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->TRANSFER(LanguageStorage)};]]></programlisting>

-      </para>

-      <para>

-        Here, a new feature structure <quote>LanguageStorage</quote> is created and

-        the compatible features of the Document annotation are copied. E.g.,

-        if LanguageStorage defined a feature named 'language', then the

-        feature value of the Document annotation is copied.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.trie">

-    <title>TRIE</title>

-    <para>

-      The TRIE action uses an external multi tree word list to

-      annotate the matched annotation and provides several configuration

-      parameters.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[TRIE((String = (TypeExpression|{TypeExpression,StringExpression,

-          Expression}))+,ListExpression,BooleanExpression,NumberExpression,

-          BooleanExpression,NumberExpression,StringExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{->TRIE("FirstNames.txt" = FirstName, "Companies.txt" = Company, 

-          'Dictionary.mtwl', true, 4, false, 0, ".,-/")};]]></programlisting>

-      </para>

-      <para>

-        Here, the dictionary 'Dictionary.mtwl' that contains word lists

-        for first names and companies is used to annotate the document. The

-        words previously contained in the file 'FirstNames.txt' are

-        annotated with the type FirstName and the words in the file

-        'Companies.txt' with the type Company. The case of the word is

-        ignored, if the length of the word exceeds 4. The edit distance is

-        deactivated. The cost of an edit operation can currently not be

-        configured by an argument. The last argument additionally defines

-        several chars that will be ignored.

-      </para>

-      <para>

-        <programlisting><![CDATA[Document{->TRIE("FirstNames.txt" = {A, "a", "first"}, "LastNames.txt" = 

-          {B, "b", true}, "CompleteNames.txt" = {C, "c", 6},

-          list1, true, 4, false, 0, ":")};]]></programlisting>

-      </para>

-      <para>

-        Here, the dictionary 'list1' is applied on the document. Matches originated in dictionary 'FirstNames.txt'

-        result in annotations of type A wheras their features 'a' are set to 'first'. The other two dictionaries 

-        create annotations of type 'B' and 'C' for the corresponding dictionaries with a boolean feature value 

-        and a integer feature value.

-      </para>

-    </section>

-  </section>

-

-<section id="ugr.tools.ruta.language.actions.trim">

-    <title>TRIM</title>

-    <para>

-      The TRIM action changes the offsets on the matched annotations by removing annotations, whose

-      types are specified by the given parameters.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[TRIE(TypeExpression ( , TypeExpression)*)]]></programlisting>

-        <programlisting><![CDATA[TRIE(TypeListExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Keyword{-> TRIM(SPACE)};]]></programlisting>

-      </para>

-      <para>

-        This rule removes all spaces at the beginning and at the end of Keyword annotations and

-        thus changes the offsets of the matched annotations.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.unmark">

-    <title>UNMARK</title>

-    <para>

-      The UNMARK action removes the annotation of the given type

-      overlapping the matched annotation. There are two additional configurations: If additional

-      indexes are given, then the span of the specified rule elements are applied, similar the the MARK action.

-      If instead a boolean is given as an additional argument, then all annotations of the given type are removed

-      that start at the matched position.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[UNMARK(TypeExpression)]]></programlisting>

-        <programlisting><![CDATA[UNMARK(TypeExpression (,NumberExpression)*)]]></programlisting>

-        <programlisting><![CDATA[UNMARK(TypeExpression, BooleanExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Headline{->UNMARK(Headline)};]]></programlisting>

-      </para>

-      <para>

-        Here, the Headline annotation is removed.

-      </para>

-      <para>

-        <programlisting><![CDATA[CW ANY+? QUESTION{->UNMARK(Headline,1,3)};]]></programlisting>

-      </para>

-      <para>

-        Here, all Headline annotations are removed that start with a capitalized word and end with a question mark.

-      </para>

-      <para>

-        <programlisting><![CDATA[CW{->UNMARK(Headline,true)};]]></programlisting>

-      </para>

-      <para>

-        Here, all Headline annotations are removed that start with a capitalized word.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.actions.unmarkall">

-    <title>UNMARKALL</title>

-    <para>

-      The UNMARKALL action removes all the annotations of the given

-      type and all of its descendants overlapping the matched annotation,

-      except the annotation is of at least one type in the passed list.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[UNMARKALL(TypeExpression, TypeListExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Annotation{->UNMARKALL(Annotation, {Headline})};]]></programlisting>

-      </para>

-      <para>

-        Here, all annotations except from headlines are removed.

-      </para>

-      

-    </section>

-  </section>

-

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.anchoring.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.anchoring.xml
deleted file mode 100644
index 5f524b3..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.anchoring.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/language/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="ugr.tools.ruta.language.anchoring">

-  <title>Rule elements and their matching order</title>

-  <para>

-    If not specified otherwise, then the UIMA Ruta rules normally start the matching 

-    process with their first rule element. The first rule element searches for possible positions for its matching

-    condition and then will advise the next rule element to continue the matching process.

-    For that reason, writing rules that contain a first rule element with an optional quantifier is discouraged 

-    and will result in ignoring the optional attribute of the quantifier.

-  </para>

-  <para>

-    The starting rule element can also be manually specified by adding <quote>@</quote> directly in front of the matching condition.

-    In the following example, the rule first searches for capitalized words (CW) and then checks whether 

-    there is a period in front of the matched word.

-    <programlisting><![CDATA[PERIOD @CW;]]></programlisting>

-    This functionality can also be used for rules that start with an optional rule element by manually specifying a later

-    rule element to start the matching process.

-  </para>

-  <para>

-    The choice of the starting rule element can greatly influence the performance speed of the rule execution. 

-    This circumstance is illustrated with the following example that contains two rules, whereas already an annotation 

-    of the type <quote>LastToken</quote> was added to the last token of the document:

-    <programlisting><![CDATA[ANY LastToken;

-ANY @LastToken;]]></programlisting>

-    The first rule matches on each token of the document and checks whether the next annotation is the last token of the document.

-    This will result in many index operations because all tokens of the document are considered. 

-    The second rule, however, matches on the last token and then checks if there is any token in front of it. This

-    rule, therefore, considers only one token. 

-  </para>

-  <para>

-    The UIMA Ruta language provides also a concept for automatically selecting the starting rule element called dynamic anchoring.

-    Here, a simple heuristic concerning the position of the rule element and the involved types is applied in order to identify

-    the favorable rule element. This functionality can be activated in the <link linkend="ugr.tools.ruta.ae.basic.parameter">configuration parameters</link> of the analysis engine or 

-    directly in the script file with the <link linkend="ugr.tools.ruta.language.actions.dynamicanchoring">DYNAMICANCHORING</link> action. 

-  </para>

-  

-  <para>

-    A list of rule elements normally specifies a sequential pattern. The rule is able to match if the first rule element successfully matches 

-    and then the following rule element at the position after the match of the first rule element, and so on. There are three language constructs that break up that

-    sequential matching: <quote><![CDATA[&]]></quote>, <quote>|</quote> and <quote>%</quote>. A composed rule element where all inner rule elements are linked by the symbol <quote><![CDATA[&]]></quote>

-    matches only if all inner rule elements successfully match at the given position. A composed rule element with inner rule elements linked by the 

-    symbol <quote>|</quote> matches if one of the inner rule element successfully matches. These composed rule elements therefore specify a conjunction (<quote>and</quote>) 

-    and a disjunction (<quote>or</quote>) of its rule element at the given position. The symbol <quote>%</quote> specifies a different use case.

-    Here, rules themselves are linked and they are only able to fire if each one of the linked rules successfully matched. In contrast to <quote><![CDATA[&]]></quote>, 

-    this linkage of rule elements does not introduce constraints for the matched positions. In the following, a few examples of these three language constructs are given.

-  </para>

-  <programlisting><![CDATA[(Token.posTag=="DET" & Lemma.value=="the");]]></programlisting>

-  <para>

-    This rule is fulfilled, if there is a token whose feature <quote>posTag</quote> has the value <quote>DET</quote> and an annotation of the type <quote>Lemma</quote> whose feature <quote>value</quote> 

-    has the value <quote>the</quote>. Both rule elements need to be fulfilled at the same position.

-  </para>

-  <programlisting><![CDATA[NUM (W{REGEXP("Peter") -> Name} & (ANY CW{PARTOF(Name)}));]]></programlisting>

-  <para>

-    This rule matches on a number and then validates if the next word is <quote>Peter</quote> and if next but one token is capitalized and part of an annotation of the type <quote>Name</quote>.

-    If all rule elements successfully matched, then a new annotation of the type <quote>Name</quote> will be created covering the largest match of the linked rule elements. In this example,

-    the new annotation covers also the token after the word <quote>Peter</quote> even if the actions was specified at the rule element with the smaller match.

-  </para>

-  <programlisting><![CDATA[((W{REGEXP("Peter")} CW) | ("Mr" PERIOD CW)){-> Name};]]></programlisting>

-  <para>

-    In this example, an annotation of the type <quote>Name</quote> will be created for the token <quote>Peter</quote> followed by a 

-    capitalized word or the word <quote>Mr</quote> followed by a period and a capitalized word.   

-  </para>

-  <programlisting><![CDATA[(Animal ((COMMA | "and") Animal)+){-> AnimalEnum};]]></programlisting>

-  <para>

-    This rule annotates enumerations of animal annotations whereas each animal annotation is separated by either a comma or the word <quote>and</quote>.

-  </para>

-  <programlisting><![CDATA[BLOCK(forEach) Sentence{}{

-  CW NUM % SW NUM{-> MARK(Found, 1, 2)};

-}]]></programlisting>

-  <para>

-    Here, annotations of the type <quote>Found</quote> are created if a sentence contains a capitalized word followed by a number and a small written word followed by a number 

-    regardless of where these annotations occur in the sentence.

-  </para>

-  

-  

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.basic_annotations.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.basic_annotations.xml
deleted file mode 100644
index 9a1bbf3..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.basic_annotations.xml
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/language/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="ugr.tools.ruta.language.seeding">

-  <title>Basic annotations and tokens</title>

-  <para>

-    The UIMA Ruta system uses a JFlex lexer to initially create a

-    seed of basic token annotations. These tokens build a hierarchy shown in <xref linkend='figure.ugr.tools.ruta.language.seeding.basic_token' />. The

-    <quote>ALL</quote> (green) annotation is the root of the hierarchy. ALL and the red

-    marked annotation types are abstract. This means that they are actually not

-    created by the lexer. An overview of these abstract types can

-    be found in <xref linkend='table.ugr.tools.ruta.language.seeding.basic_token.abstract' />. The leafs of the hierarchy (blue) are created by the lexer. Each

-    leaf is an own type, but also inherits the types of the abstract

-    annotation types further up in the hierarchy. The leaf types are

-    described in more detail in <xref linkend='table.ugr.tools.ruta.language.seeding.basic_token.created' />.

-    Each text unit within an input document belongs to exactly one of these

-    annotation types.

-  </para>

-  <para>

-    <figure id="figure.ugr.tools.ruta.language.seeding.basic_token">

-      <title>Basic token hierarchy

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="576px" format="PNG" align="center"

-            fileref="&imgroot;basic_token/basic_token.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="5.5in" format="PNG" align="center"

-            fileref="&imgroot;basic_token/basic_token.png" />

-        </imageobject>

-        <textobject>

-          <phrase>

-            Basic token hierarchy.

-          </phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  </para>

-  <para>

-    <table id="table.ugr.tools.ruta.language.seeding.basic_token.abstract"

-      frame="all">

-      <title>Abstract annotations</title>

-      <tgroup cols="3" colsep="1" rowsep="1">

-        <colspec colname="c1" colwidth="1*" />

-        <colspec colname="c2" colwidth="1*" />

-        <colspec colname="c3" colwidth="3*" />

-        <thead>

-          <row>

-            <entry align="center">Annotation</entry>

-            <entry align="center">Parent</entry>

-            <entry align="center">Description</entry>

-          </row>

-        </thead>

-        <tbody>

-          <row>

-            <entry>ALL</entry>

-            <entry>-</entry>

-            <entry>parent type of all tokens</entry>

-          </row>

-          <row>

-            <entry>ANY</entry>

-            <entry>ALL</entry>

-            <entry>all tokens except for markup</entry>

-          </row>

-          <row>

-            <entry>W</entry>

-            <entry>ANY</entry>

-            <entry>all kinds of words</entry>

-          </row>

-          <row>

-            <entry>PM</entry>

-            <entry>ANY</entry>

-            <entry>all kinds of punctuation marks</entry>

-          </row>

-          <row>

-            <entry>WS</entry>

-            <entry>ANY</entry>

-            <entry>all kinds of white spaces</entry>

-          </row>

-          <row>

-            <entry>SENTENCEEND</entry>

-            <entry>PM</entry>

-            <entry>all kinds of punctuation marks that indicate the end of a

-              sentence

-            </entry>

-          </row>

-        </tbody>

-      </tgroup>

-    </table>

-  </para>

-  <para>

-    <table id="table.ugr.tools.ruta.language.seeding.basic_token.created"

-      frame="all">

-      <title>Annotations created by lexer</title>

-      <tgroup cols="4" colsep="1" rowsep="1">

-        <colspec colname="c1" colwidth="1*" />

-        <colspec colname="c2" colwidth="1*" />

-        <colspec colname="c3" colwidth="1*" />

-        <colspec colname="c4" colwidth="1*" />

-

-        <thead>

-          <row>

-            <entry align="center">Annotation</entry>

-            <entry align="center">Parent</entry>

-            <entry align="center">Description</entry>

-            <entry align="center">Example</entry>

-          </row>

-        </thead>

-        <tbody>

-          <row>

-            <entry>MARKUP</entry>

-            <entry>ALL</entry>

-            <entry>HTML and XML elements</entry>

-            <entry><![CDATA[<p class="Headline">]]></entry>

-          </row>

-          <row>

-            <entry>NBSP</entry>

-            <entry>SPACE</entry>

-            <entry>non breaking space</entry>

-            <entry><![CDATA[" "]]></entry>

-          </row>

-          <row>

-            <entry>AMP</entry>

-            <entry>ANY</entry>

-            <entry>ampersand expression</entry>

-            <entry><![CDATA[&amp;]]></entry>

-          </row>

-          <row>

-            <entry>BREAK</entry>

-            <entry>WS</entry>

-            <entry>line break</entry>

-            <entry><![CDATA[\n]]></entry>

-          </row>

-          <row>

-            <entry>SPACE</entry>

-            <entry>WS</entry>

-            <entry>spaces</entry>

-            <entry><![CDATA[" "]]></entry>

-          </row>

-          <row>

-            <entry>COLON</entry>

-            <entry>PM</entry>

-            <entry>colon</entry>

-            <entry><![CDATA[:]]></entry>

-          </row>

-          <row>

-            <entry>COMMA</entry>

-            <entry>PM</entry>

-            <entry>comma</entry>

-            <entry><![CDATA[,]]></entry>

-          </row>

-          <row>

-            <entry>PERIOD</entry>

-            <entry>SENTENCEEND</entry>

-            <entry>period</entry>

-            <entry><![CDATA[.]]></entry>

-          </row>

-          <row>

-            <entry>EXCLAMATION</entry>

-            <entry>SENTENCEEND</entry>

-            <entry>exclamation mark</entry>

-            <entry><![CDATA[!]]></entry>

-          </row>

-          <row>

-            <entry>SEMICOLON</entry>

-            <entry>PM</entry>

-            <entry>semicolon</entry>

-            <entry><![CDATA[;]]></entry>

-          </row>

-          <row>

-            <entry>QUESTION</entry>

-            <entry>SENTENCEEND</entry>

-            <entry>question mark</entry>

-            <entry><![CDATA[?]]></entry>

-          </row>

-          <row>

-            <entry>SW</entry>

-            <entry>W</entry>

-            <entry>lower case work</entry>

-            <entry><![CDATA[annotation]]></entry>

-          </row>

-          <row>

-            <entry>CW</entry>

-            <entry>W</entry>

-            <entry>work starting with one capitalized letter</entry>

-            <entry><![CDATA[Annotation]]></entry>

-          </row>

-          <row>

-            <entry>CAP</entry>

-            <entry>W</entry>

-            <entry>word only containing capitalized letters</entry>

-            <entry><![CDATA[ANNOTATION]]></entry>

-          </row>

-          <row>

-            <entry>NUM</entry>

-            <entry>ANY</entry>

-            <entry>sequence of digits</entry>

-            <entry><![CDATA[0123]]></entry>

-          </row>

-          <row>

-            <entry>SPECIAL</entry>

-            <entry>ANY</entry>

-            <entry>all other tokens and symbols</entry>

-            <entry><![CDATA[/]]></entry>

-          </row>

-        </tbody>

-      </tgroup>

-    </table>

-  </para>

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.conditions.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.conditions.xml
deleted file mode 100644
index 99e8f33..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.conditions.xml
+++ /dev/null
@@ -1,939 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/tools.ruta/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="ugr.tools.ruta.language.conditions">

-  <title>Conditions</title>

-

-  <section id="ugr.tools.ruta.language.conditions.after">

-    <title>AFTER</title>

-    <para>

-      The AFTER condition evaluates true, if the matched annotation

-      starts after the beginning of an arbitrary annotation of the passed

-      type. If a list of types is passed, this has to be true for at least

-      one of them.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[AFTER(Type|TypeListExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CW{AFTER(SW)};]]></programlisting>

-      </para>

-      <para>

-        Here, the rule matches on a capitalized word, if there is any

-        small written word previously.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.and">

-    <title>AND</title>

-    <para>

-      The AND condition is a composed condition and evaluates true, if

-      all contained conditions evaluate true.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[AND(Condition1,...,ConditionN)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{AND(PARTOF(Headline),CONTAINS(Keyword))

-          ->MARK(ImportantHeadline)};]]></programlisting>

-      </para>

-      <para>

-        In this example, a paragraph is annotated with an

-        ImportantHeadline annotation, if it is part of a Headline and

-        contains a Keyword annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.before">

-    <title>BEFORE</title>

-    <para>

-      The BEFORE condition evaluates true, if the matched annotation

-      starts before the beginning of an arbitrary annotation of the passed

-      type. If a list of types is passed, this has to be true for at least

-      one of them.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[BEFORE(Type|TypeListExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CW{BEFORE(SW)};]]></programlisting>

-      </para>

-      <para>

-        Here, the rule matches on a capitalized word, if there is any

-        small written word afterwards.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.contains">

-    <title>CONTAINS</title>

-    <para>

-      The CONTAINS condition evaluates true on a matched annotation,

-      if

-      the frequency of the passed type lies within an optionally passed

-      interval. The limits of the passed interval are per default

-      interpreted as absolute numeral values. By passing a further boolean

-      parameter set to true the limits are interpreted as percental

-      values.

-      If no interval parameters are passed at all, then the condition

-      checks

-      whether the matched annotation contains at least one

-      occurrence of the

-      passed type.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CONTAINS(Type(,NumberExpression,NumberExpression(,BooleanExpression)?)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{CONTAINS(Keyword)->MARK(KeywordParagraph)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph is annotated with a KeywordParagraph annotation, if

-        it contains a Keyword annotation.

-      </para>

-      <para>

-        <programlisting><![CDATA[Paragraph{CONTAINS(Keyword,2,4)->MARK(KeywordParagraph)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph is annotated with a KeywordParagraph annotation, if

-        it contains between two and four Keyword annotations.

-      </para>

-      <para>

-        <programlisting><![CDATA[Paragraph{CONTAINS(Keyword,50,100,true)->MARK(KeywordParagraph)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph is annotated with a KeywordParagraph annotation, if it

-        contains between 50% and 100% Keyword annotations. This is

-        calculated based on the tokens of the Paragraph. If the Paragraph

-        contains six basic annotations (see

-        <xref linkend='ugr.tools.ruta.language.seeding' />), two of them are part of one Keyword annotation, and if one basic

-        annotation is also annotated with a Keyword annotation, then the

-        percentage of the contained Keywords is 50%.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.contextcount">

-    <title>CONTEXTCOUNT</title>

-    <para>

-      The CONTEXTCOUNT condition numbers all occurrences of the

-      matched type within the context of a passed type's annotation

-      consecutively, thus assigning an index to each occurrence.

-      Additionally it stores the index of the matched annotation in a

-      numerical variable if one is passed. The condition evaluates true if

-      the index of the matched annotation is within a passed interval. If

-      no interval is passed, the condition always evaluates true.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CONTEXTCOUNT(Type(,NumberExpression,NumberExpression)?(,Variable)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Keyword{CONTEXTCOUNT(Paragraph,2,3,var)

-          ->MARK(SecondOrThirdKeywordInParagraph)};]]></programlisting>

-      </para>

-      <para>

-        Here, the position of the matched Keyword annotation within a

-        Paragraph annotation is calculated and stored in the variable 'var'.

-        If the counted value lies within the interval [2,3], then the matched

-        Keyword is annotated with the SecondOrThirdKeywordInParagraph

-        annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.count">

-    <title>COUNT</title>

-    <para>

-      The COUNT condition can be used in two different ways. In the

-      first case (see first definition), it counts the number of

-      annotations of the passed type within the window of the matched

-      annotation and stores the amount in a numerical variable, if such a

-      variable is passed. The condition evaluates true if the counted

-      amount is within a specified interval. If no interval is passed, the

-      condition always evaluates true. In the second case (see second

-      definition), it counts the number of occurrences of the passed

-      VariableExpression (second parameter) within the passed list (first

-      parameter) and stores the amount in a numerical variable, if such a

-      variable is passed. Again, the condition evaluates true if the counted

-      amount is within a specified interval. If no interval is passed, the

-      condition always evaluates true.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[COUNT(Type(,NumberExpression,NumberExpression)?(,NumberVariable)?)]]></programlisting>

-      </para>

-      <para>

-        <programlisting><![CDATA[COUNT(ListExpression,VariableExpression

-          (,NumberExpression,NumberExpression)?(,NumberVariable)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{COUNT(Keyword,1,10,var)->MARK(KeywordParagraph)};]]></programlisting>

-      </para>

-      <para>

-        Here, the amount of Keyword annotations within a Paragraph is

-        calculated and stored in the variable 'var'. If one to ten Keywords

-        were counted, the paragraph is marked with a KeywordParagraph

-        annotation.

-      </para>

-      <para>

-        <programlisting><![CDATA[Paragraph{COUNT(list,"author",5,7,var)};]]></programlisting>

-      </para>

-      <para>

-        Here, the number of occurrences of STRING "author" within the

-        STRINGLIST 'list' is counted and stored in the variable 'var'. If

-        "author" occurs five to seven times within 'list', the condition

-        evaluates true.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.currentcount">

-    <title>CURRENTCOUNT</title>

-    <para>

-      The CURRENTCOUNT condition numbers all occurrences of the matched

-      type within the whole document consecutively, thus assigning an index

-      to each occurrence. Additionally, it stores the index of the matched

-      annotation in a numerical variable, if one is passed. The condition

-      evaluates true if the index of the matched annotation is within a

-      specified interval. If no interval is passed, the condition always

-      evaluates true.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[CURRENTCOUNT(Type(,NumberExpression,NumberExpression)?(,Variable)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{CURRENTCOUNT(Keyword,3,3,var)->MARK(ParagraphWithThirdKeyword)};]]></programlisting>

-      </para>

-      <para>

-        Here, the Paragraph, which contains the third Keyword of the

-        whole document, is annotated with the ParagraphWithThirdKeyword

-        annotation. The index is stored in the variable 'var'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.endswith">

-    <title>ENDSWITH</title>

-    <para>

-      The ENDSWITH condition evaluates true, if an annotation of the

-      given type ends exactly at the same position as the matched

-      annotation. If a list of types is passed, this has to be true for at

-      least one of them.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[ENDSWITH(Type|TypeListExpression) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{ENDSWITH(SW)};]]></programlisting>

-      </para>

-      <para>

-        Here, the rule matches on a Paragraph annotation, if it ends

-        with a small written word.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.feature">

-    <title>FEATURE</title>

-    <para>

-      The FEATURE condition compares a feature of the matched

-      annotation with the second argument.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[FEATURE(StringExpression,Expression) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{FEATURE("language",targetLanguage)}]]></programlisting>

-      </para>

-      <para>

-        This rule matches, if the feature named 'language' of the

-        document annotation equals the value of the variable

-        'targetLanguage'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.if">

-    <title>IF</title>

-    <para>

-      The IF condition evaluates true, if the contained boolean

-      expression evaluates true.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[IF(BooleanExpression) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{IF(keywordAmount > 5)->MARK(KeywordParagraph)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph annotation is annotated with a KeywordParagraph

-        annotation, if the value of the variable 'keywordAmount' is greater

-        than five.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.inlist">

-    <title>INLIST</title>

-    <para>

-      The INLIST condition is fulfilled, if the matched annotation is listed

-      in a given word or string list. If an optional agrument is given, then 

-      the value of the argument is used instead of the covered text of the matched annotation

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[INLIST(WordList(,StringExpression)?) ]]></programlisting>

-      </para>

-      <para>

-        <programlisting><![CDATA[INLIST(StringList(,StringExpression)?) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Keyword{INLIST(SpecialKeywordList)->MARK(SpecialKeyword)};]]></programlisting>

-      </para>

-      <para>

-        A Keyword is annotated with the type SpecialKeyword, if the text

-        of the Keyword annotation is listed in the word list or string list

-        SpecialKeywordList.

-      </para>

-      <para>

-        <programlisting><![CDATA[Token{INLIST(MyLemmaList, Token.lemma)->MARK(SpecialLemma)};]]></programlisting>

-      </para>

-      <para>

-        This rule creates an annotation of the type SpecialLemma for each token that provides a feature value 

-        of the feature "lemma" that is present in the string list or word list MyLemmaList.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.is">

-    <title>IS</title>

-    <para>

-      The IS condition evaluates true, if there is an annotation of the

-      given type with the same beginning and ending offsets as the

-      matched

-      annotation. If a list of types is given, the condition

-      evaluates true,

-      if at least one of them fulfills the former condition.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[IS(Type|TypeListExpression) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Author{IS(Englishman)->MARK(EnglishAuthor)};]]></programlisting>

-      </para>

-      <para>

-        If an Author annotation is also annotated with an Englishman

-        annotation, it is annotated with an EnglishAuthor annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.last">

-    <title>LAST</title>

-    <para>

-      The LAST condition evaluates true, if the type of the last token

-      within the window of the matched annotation is of the given type.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[LAST(TypeExpression) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{LAST(CW)};]]></programlisting>

-      </para>

-      <para>

-        This rule fires, if the last token of the document is a

-        capitalized word.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.mofn">

-    <title>MOFN</title>

-    <para>

-      The MOFN condition is a composed condition. It evaluates true if

-      the number of containing conditions evaluating true is within a given

-      interval.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MOFN(NumberExpression,NumberExpression,Condition1,...,ConditionN) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{MOFN(1,1,PARTOF(Headline),CONTAINS(Keyword))

-          ->MARK(HeadlineXORKeywords)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph is marked as a HeadlineXORKeywords, if the matched

-        text is either part of a Headline annotation or contains Keyword

-        annotations.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.near">

-    <title>NEAR</title>

-    <para>

-      The NEAR condition is fulfilled, if the distance of the matched

-      annotation to an annotation of the given type is within a given

-      interval. The direction is defined by a boolean parameter, whose

-      default value is set to true, therefore searching forward. By default this

-      condition works on an unfiltered index. An optional fifth boolean

-      parameter can be set to true to get the condition being evaluated on

-      a filtered index.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[NEAR(TypeExpression,NumberExpression,NumberExpression

-          (,BooleanExpression(,BooleanExpression)?)?) ]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{NEAR(Headline,0,10,false)->MARK(NoHeadline)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph that starts at most ten tokens after a Headline

-        annotation is annotated with the NoHeadline annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.not">

-    <title>NOT</title>

-    <para>

-      The NOT condition negates the result of its contained

-      condition.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA["-"Condition]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{-PARTOF(Headline)->MARK(Headline)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph that is not part of a Headline annotation so far is

-        annotated with a Headline annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.or">

-    <title>OR</title>

-    <para>

-      The OR Condition is a composed condition and evaluates true, if

-      at least one contained condition is evaluated true.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[OR(Condition1,...,ConditionN)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{OR(PARTOF(Headline),CONTAINS(Keyword))

-                                           ->MARK(ImportantParagraph)};]]></programlisting>

-      </para>

-      <para>

-        In this example a Paragraph is annotated with the

-        ImportantParagraph annotation, if it is a Headline or contains

-        Keyword annotations.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.parse">

-    <title>PARSE</title>

-    <para>

-      The PARSE condition is fulfilled, if the text covered by the

-      matched annotation can be transformed into a value of the given

-      variable's type. If this is possible, the parsed value is

-      additionally assigned to the passed variable.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[PARSE(variable)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[NUM{PARSE(var)};]]></programlisting>

-      </para>

-      <para>

-        If the variable 'var' is of an appropriate numeric type, the

-        value of NUM is parsed and subsequently stored in 'var'.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.partof">

-    <title>PARTOF</title>

-    <para>

-      The PARTOF condition is fulfilled, if the matched annotation is

-      part of an annotation of the given type. However, it is not necessary

-      that the matched annotation is smaller than the annotation of the

-      given type. Use the (much slower) PARTOFNEQ condition instead, if this

-      is needed. If a type list is given, the condition evaluates true, if

-      the former described condition for a single type is fulfilled for at

-      least one of the types in the list.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[PARTOF(Type|TypeListExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{PARTOF(Headline) -> MARK(ImportantParagraph)};]]></programlisting>

-      </para>

-      <para>

-        A Paragraph is an ImportantParagraph, if the matched text is

-        part of a Headline annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.partofneq">

-    <title>PARTOFNEQ</title>

-    <para>

-      The PARTOFNEQ condition is fulfilled if the matched annotation

-      is part of (smaller than and inside of) an annotation of the given

-      type. If also annotations of the same size should be acceptable, use

-      the PARTOF condition. If a type list is given, the condition

-      evaluates true if the former described condition is fulfilled for at

-      least one of the types in the list.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[PARTOFNEQ(Type|TypeListExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[W{PARTOFNEQ(Headline) -> MARK(ImportantWord)};]]></programlisting>

-      </para>

-      <para>

-        A word is an <quote>ImportantWord</quote>, if it is part of a headline.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.position">

-    <title>POSITION</title>

-    <para>

-      The POSITION condition is fulfilled, if the matched type is the

-      k-th occurence of this type within the window of an annotation of the

-      passed type, whereby k is defined by the value of the passed

-      NumberExpression. If the additional boolean paramter is set to false,

-      then k counts the occurences of of the minimal annotations.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[POSITION(Type,NumberExpression(,BooleanExpression)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Keyword{POSITION(Paragraph,2)->MARK(SecondKeyword)};]]></programlisting>

-      </para>

-      <para>

-        The second Keyword in a Paragraph is annotated with the type

-        SecondKeyword.

-      </para>

-      <para>

-        <programlisting><![CDATA[Keyword{POSITION(Paragraph,2,false)->MARK(SecondKeyword)};]]></programlisting>

-      </para>

-      <para>

-        A Keyword in a Paragraph is annotated with the type

-        SecondKeyword, if it starts at the same offset as the second

-        (visible) RutaBasic annotation, which normally corresponds to

-        the tokens.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.regexp">

-    <title>REGEXP</title>

-    <para>

-      The REGEXP condition is fulfilled, if the given pattern matches on the

-      matched annotation. However, if a string variable is given as the

-      first

-      argument, then the pattern is evaluated on the value of the

-      variable.

-      For more details on the syntax of regular

-      expressions, take a

-      look at

-      the

-      <ulink

-        url="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html">Java API</ulink>

-      . By default the REGEXP condition is case-sensitive. To change this,

-      add an optional boolean parameter, which is set to true. The regular expression is 

-      initialized with the flags DOTALL and MULTILINE, and if the optional parameter is set to true, 

-      then additionally with the flags CASE_INSENSITIVE and UNICODE_CASE.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[REGEXP((StringVariable,)? StringExpression(,BooleanExpression)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Keyword{REGEXP("..")->MARK(SmallKeyword)};]]></programlisting>

-      </para>

-      <para>

-        A Keyword that only consists of two chars is annotated with a

-        SmallKeyword annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.score">

-    <title>SCORE</title>

-    <para>

-      The SCORE condition evaluates the heuristic score of the matched

-      annotation. This score is set or changed by the MARK action.

-      The

-      condition is fulfilled, if the score of the matched annotation is

-      in a

-      given interval. Optionally, the score can be stored in a

-      variable.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[SCORE(NumberExpression,NumberExpression(,Variable)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[MaybeHeadline{SCORE(40,100)->MARK(Headline)};]]></programlisting>

-      </para>

-      <para>

-        An annotation of the type MaybeHeadline is annotated with

-        Headline, if its score is between 40 and 100.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.size">

-    <title>SIZE</title>

-    <para>

-      The SIZE contition counts the number of elements in the given

-      list. By default, this condition always evaluates true. When an interval

-      is passed, it evaluates true, if the counted number of list elements

-      is within the interval. The counted number can be stored in an

-      optionally passed numeral variable.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[SIZE(ListExpression(,NumberExpression,NumberExpression)?(,Variable)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Document{SIZE(list,4,10,var)};]]></programlisting>

-      </para>

-      <para>

-        This rule fires, if the given list contains between 4 and 10

-        elements. Additionally, the exact amount is stored in the variable

-        <quote>var</quote>.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.startswith">

-    <title>STARTSWITH</title>

-    <para>

-      The STARTSWITH condition evaluates true, if an annotation of the

-      given type starts exactly at the same position as the matched

-      annotation. If a type list is given, the condition evaluates true, if

-      the former is true for at least one of the given types in the list.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[STARTSWITH(Type|TypeListExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{STARTSWITH(SW)};]]></programlisting>

-      </para>

-      <para>

-        Here, the rule matches on a Paragraph annotation, if it starts

-        with small written word.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.totalcount">

-    <title>TOTALCOUNT</title>

-    <para>

-      The TOTALCOUNT condition counts the annotations of the passed

-      type within the whole document and stores the amount in an optionally

-      passed numerical variable. The condition evaluates true, if the

-      amount

-      is within the passed interval. If no interval is passed, the

-      condition always evaluates true.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[TOTALCOUNT(Type(,NumberExpression,NumberExpression(,Variable)?)?)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{TOTALCOUNT(Keyword,1,10,var)->MARK(KeywordParagraph)};]]></programlisting>

-      </para>

-      <para>

-        Here, the amount of Keyword annotations within the whole

-        document is calculated and stored in the variable 'var'. If one to

-        ten Keywords were counted, the Paragraph is marked with a

-        KeywordParagraph annotation.

-      </para>

-    </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.conditions.vote">

-    <title>VOTE</title>

-    <para>

-      The VOTE condition counts the annotations of the given two types

-      within the window of the matched annotation and evaluates true,

-      if it

-      finds more annotations of the first type.

-    </para>

-    <section>

-      <title>

-        <emphasis role="bold">Definition:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[VOTE(TypeExpression,TypeExpression)]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>

-        <emphasis role="bold">Example:</emphasis>

-      </title>

-      <para>

-        <programlisting><![CDATA[Paragraph{VOTE(FirstName,LastName)};]]></programlisting>

-      </para>

-      <para>

-        Here, this rule fires, if a paragraph contains more firstnames

-        than lastnames.

-      </para>

-    </section>

-  </section>

-

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.declarations.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.declarations.xml
deleted file mode 100644
index 38a896c..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.declarations.xml
+++ /dev/null
@@ -1,289 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/tools.ruta/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="ugr.tools.ruta.language.declarations">

-  <title>Declarations</title>

-  <para>

-    There are three different kinds of declarations in the UIMA Ruta system:

-    Declarations of types with optional feature definitions,

-    declarations of variables and declarations for importing

-    external resources, further UIMA Ruta scripts and UIMA components

-    such as type systems and analysis engines.

-  </para>

-  <section id="ugr.tools.ruta.language.declarations.type">

-    <title>Types</title>

-    <para>

-      Type declarations define new kinds of annotation types and

-      optionally their features.

-    </para>

-      <section>

-        <title>

-          <emphasis role="bold">Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[DECLARE SimpleType1, SimpleType2; // <- two new types with the parent 

-                                  // type "Annotation"

-DECLARE ParentType NewType (SomeType feature1, INT feature2); 

-  // a new type "NewType" with parent type "ParentType" and two features]]></programlisting>

-        </para>

-        <para>

-          Attention: Types with features need a parent type in their

-          declarations. If no special parent type is

-          requested, just use type Annotation as

-          default parent type.

-        </para>

-      </section>

-  </section>

-  <section id="ugr.tools.ruta.language.declarations.variable">

-    <title>Variables</title>

-    <para>

-      Variable declarations define new variables. There are 12 kinds of

-      variables:

-      <itemizedlist mark='opencircle'>

-        <listitem>

-          <para>

-            Type variable: A variable that represents an annotation

-            type.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Type list variable: A variable that represents a list of

-            annotation

-            types.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Integer variable: A variable that represents an integer.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Integer list variable: A variable that represents a list of

-            integers.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Float variable: A variable that represents a

-            floating-point

-            number.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Float list variable: A variable that represents a list of

-            floating-point numbers in single precision.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Double variable: A variable that represents a

-            floating-point

-            number.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Double list variable: A variable that represents a list

-            of

-            floating-point numbers in double precision.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            String variable: A variable that represents a string.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            String list: A variable that represents a list of strings.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Boolean

-            variable: A variable that represents a boolean.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Boolean list variable: A variable that represents a list of

-            booleans.

-          </para>

-        </listitem>

-      </itemizedlist>

-    </para>

-      <section>

-        <title>

-          <emphasis role="bold">Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[TYPE newTypeVariable;

-TYPELIST newTypeList;

-INT newIntegerVariable;

-INTLIST newIntList;

-FLOAT newFloatVariable;

-FLOATLIST newFloatList;

-DOUBLE newDoubleVariable;

-DOUBLELIST newDoubleList;

-STRING newStringVariable;

-STRINGLIST newStringList;

-BOOLEAN newBooleanVariable;

-BOOLEANLIST newBooleanList;]]></programlisting>

-        </para>

-      </section>

-  </section>

-  <section id="ugr.tools.ruta.language.declarations.ressource">

-    <title>Resources</title>

-    <para>

-      There are two kinds of resource declarations that make external

-      resources available in the UIMA Ruta system:

-      <itemizedlist mark='opencircle'>

-        <listitem>

-          <para>

-            List: A list

-            represents a normal text file with an entry per

-            line

-            or a compiled

-            tree of a word list.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Table: A table represents a comma separated

-            file.

-          </para>

-        </listitem>

-      </itemizedlist>

-    </para>

-      <section>

-        <title>

-          <emphasis role="bold">Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[WORDLIST listName = 'someWordList.txt';

-WORDTABLE tableName = 'someTable.csv';]]></programlisting>

-        </para>

-      </section>

-  </section>

-  <section id="ugr.tools.ruta.language.declarations.scripts">

-    <title>Scripts</title>

-    <para>

-      Additional scripts can be imported and reused with the CALL action.

-      The types of the imported rules are also available so that it

-      is not necessary to import the Type System of the additional rule

-      script.

-    </para>

-      <section>

-        <title>

-          <emphasis role="bold">Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[SCRIPT my.package.AnotherScript; // "AnotherScript.ruta" in the  

-                     //package "my.package"

-Document{->CALL(AnotherScript)}; // <- rule executes "AnotherScript.ruta"]]></programlisting>

-        </para>

-      </section>

-  </section>

-  <section id="ugr.tools.ruta.language.declarations.components">

-    <title>Components</title>

-    <para>

-      There are three kinds of UIMA components that can be imported in a

-      UIMA Ruta script:

-      <itemizedlist mark='opencircle'>

-        <listitem>

-          <para>

-            Type System (IMPORT or TYPESYSTEM): includes the types

-            defined in an external type system. You can select which

-            types or packages to import from a type system and how to

-            alias them. If use IMPORT statements, consider enabling

-            <link

-            linkend='ugr.tools.ruta.ae.basic.parameter.strictImports'>strictImports</link>.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Analysis Engine (ENGINE): loads the given descriptor and creates an external analysis

-            engine. The descriptor  must be located in the descriptor paths.

-            The type system needed for the analysis engine has

-            to be imported separately. Please mind the filtering setting when

-            calling an external analysis engine.

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Analysis Engine (UIMAFIT): loads the given class and creates an external analysis

-            engine. Please mind that the implementation of the analysis engine needs to be available. 

-            The type system needed for the analysis engine has

-            to be imported separately. Please mind the filtering setting when

-            calling an external analysis engine.

-          </para>

-        </listitem>

-      </itemizedlist>

-    </para>

-      <section>

-        <title>

-          <emphasis role="bold">Type System Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[// Imports all the types from "ExternalTypeSystem.xml"

-TYPESYSTEM my.package.ExternalTypeSystem;

-IMPORT * FROM my.package.ExternalTypeSystem;

-

-// Import my.package.SomeType from "ExternalTypeSystem.xml"

-IMPORT my.package.SomeType FROM my.package.ExternalTypeSystem;

-

-// Import my.package.SomeType from the typesystem available to

-// the CAS at runtime. This can be useful when typesystems are

-// loaded by uimaFIT

-IMPORT my.package.SomeType;

-

-// Import my.package.SomeType from "ExternalTypeSystem.xml" 

-// and alias it to T1

-IMPORT my.package.SomeType FROM my.package.ExternalTypeSystem AS T1;

-

-// Import all types in my.package from "ExternalTypeSystem.xml"

-IMPORT PACKAGE my.package FROM my.package.ExternalTypeSystem;

-

-// Import package my.package from "ExternalTypeSystem.xml" 

-// and alias it to p1 (p1.SomeType can now be used)

-IMPORT PACKAGE my.package FROM my.package.ExternalTypeSystem AS p1; 

-

-// Import all packages from "ExternalTypeSystem.xml" and alias them to p2

-IMPORT PACKAGE * FROM my.package.ExternalTypeSystem AS p2;]]></programlisting>

-        </para>

-      </section>

-

-      <section>

-        <title>

-          <emphasis role="bold">Analysis Engine Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[ENGINE my.package.ExternalEngine; // <- "ExternalEngine.xml" in the 

-// "my.package" package (in the descriptor folder)

-UIMAFIT my.implementation.AnotherEngine;

-

-Document{->RETAINTYPE(SPACE,BREAK),CALL(ExternalEngine)}; 

-// calls ExternalEngine, but retains white spaces

-Document{-> EXEC(AnotherEngine, {SomeType})};]]></programlisting>

-        </para>

-      </section>

-  </section>

-</section>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.expressions.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.expressions.xml
deleted file mode 100644
index 6a19cc5..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.expressions.xml
+++ /dev/null
@@ -1,325 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/tools.ruta/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="ugr.tools.ruta.language.expressions">

-  <title>Expressions</title>

-  <para>

-    UIMA Ruta provides five different kinds of expressions. These are

-    type expressions, number expressions, string expressions,

-    boolean expressions and list expressions.

-  </para>

-  <para>

-  <emphasis role="bold">Definition:</emphasis>

-<programlisting><![CDATA[RutaExpression  ->   TypeExpression | NumberExpression | 

-                           StringExpression | BooleanExpression

-                           | ListExpression]]></programlisting>

-  </para>

-  <section id="ugr.tools.ruta.language.expressions.type">

-    <title>Type Expressions</title>

-    <para>

-      UIMA Ruta provides two kinds of type expressions.

-      <orderedlist numeration="arabic">

-        <listitem>

-          Declared annotation types (see

-          <xref linkend='ugr.tools.ruta.language.declarations.type' />

-          ).

-        </listitem>

-        <listitem>

-          Type variables

-          (see

-          <xref linkend='ugr.tools.ruta.language.declarations.variable' />

-          ).

-        </listitem>

-      </orderedlist>

-      <section>

-        <title>

-          <emphasis role="bold">Definition:</emphasis>

-        </title>

-        <para>

-<programlisting><![CDATA[TypeExpression  ->  AnnotationType | TypeVariable]]></programlisting>

-        </para>

-      </section>

-      <section>

-        <title>

-          <emphasis role="bold">Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[DECLARE Author;  // Author defines a type, therefore it is 

-                 // a type expression

-TYPE typeVar;    // type variable typeVar is a type expression 

-Document{->ASSIGN(typeVar, Author)};]]></programlisting>

-        </para>

-      </section>

-    </para>

-  </section>

-

-  <section id="ugr.tools.ruta.language.expressions.number">

-    <title>Number Expressions</title>

-    <para>

-      UIMA Ruta provides several possibilities to define number

-      expressions. As expected, every number expression evaluates to a

-      number. UIMA Ruta supports integer and floating-point numbers. A

-      floating-point number can be in single or in double precision. To get

-      a complete overview, have a look at the following syntax definition

-      of number expressions.

-      </para>

-      <section>

-        <title>

-          <emphasis role="bold">Definition:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[NumberExpression         -> AdditiveExpression

-AdditiveExpression       -> MultiplicativeExpression ( ( "+" | "-" ) 

-                            MultiplicativeExpression )*

-MultiplicativeExpression -> SimpleNumberExpression ( ( "*" | "/" | "%" ) 

-                            SimpleNumberExpression )*

-                            | ( "EXP" | "LOGN" | "SIN" | "COS" | "TAN" ) 

-                            "(" NumberExpression ")"

-SimpleNumberExpression   -> "-"? ( DecimalLiteral | FloatingPointLiteral 

-                            | NumberVariable) | "(" NumberExpression ")"

-DecimalLiteral        -> ('0' | '1'..'9' Digit*) IntegerTypeSuffix?

-IntegerTypeSuffix     ->  ('l'|'L')

-FloatingPointLiteral  -> Digit+ '.' Digit* Exponent? FloatTypeSuffix?

-                         |   '.' Digit+ Exponent? FloatTypeSuffix?

-                         |   Digit+ Exponent FloatTypeSuffix?

-                         |   Digit+ Exponent? FloatTypeSuffix

-FloatTypeSuffix       ->  ('f'|'F'|'d'|'D')

-Exponent              -> ('e'|'E') ('+'|'-')? Digit+

-Digit                 -> ('0'..'9') ]]></programlisting>

-        </para>

-      </section>

-      <para>

-        For more information on number variables, see

-        <xref linkend='ugr.tools.ruta.language.declarations.variable' />

-        .

-      </para>

-      <section>

-        <title>

-          <emphasis role="bold">Examples:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[98     // a integer number literal

-104   // a integer number literal

-170.02   // a floating-point number literal

-1.0845 // a floating-point number literal]]></programlisting>

-        </para>

-        <para>

-          <programlisting><![CDATA[INT intVar1;

-INT intVar2;

-...

-Document{->ASSIGN(intVar1, 12 * intVar1 - SIN(intVar2))};]]></programlisting>

-        </para>

-      </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.expressions.string">

-    <title>String Expressions</title>

-    <para>

-      There are two kinds of string expressions in UIMA Ruta.

-       

-      <orderedlist numeration="arabic">

-        <listitem>

-         <para>

-          String literals: String literals are defined by any sequence of

-          characters within quotation marks.

-           </para>

-        </listitem>

-        <listitem>

-         <para>

-          String variables (see

-          <xref linkend='ugr.tools.ruta.language.declarations.variable' />

-          )

-         </para>

-        </listitem>

-      </orderedlist>

-      </para>

-      <section>

-        <title>

-          <emphasis role="bold">Definition:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[StringExpression   ->   SimpleStringExpression

-SimpleStringExpression  ->  StringLiteral ("+" StringExpression)* 

-                            | StringVariable]]></programlisting>

-        </para>

-      </section>

-      <section>

-        <title>

-          <emphasis role="bold">Example:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[STRING strVar; // define string variable

-// add prefix "strLiteral" to variable strVar

-Document{->ASSIGN(strVar, "strLiteral" + strVar)};]]></programlisting>

-        </para>

-      </section>

-  </section>

-

-  <section id="ugr.tools.ruta.language.expressions.boolean">

-    <title>Boolean Expressions</title>

-    <para>

-      UIMA Ruta provides several possibilities to define boolean

-      expressions. As expected, every boolean expression evaluates to

-      either

-      true or false. To get a complete overview, have a look at the

-      following syntax definition of boolean expressions.

-      </para>

-      <section>

-        <title>

-          <emphasis role="bold">Definition:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[BooleanExpression          ->  ComposedBooleanExpression 

-                               | SimpleBooleanExpression

-ComposedBooleanExpression  ->  BooleanCompare | BooleanTypeExpression 

-                               | BooleanNumberExpression | BooleanFunction

-SimpleBooleanExpression     ->  BooleanLiteral | BooleanVariable

-BooleanCompare           ->  SimpleBooleanExpression ( "==" | "!=" ) 

-                               BooleanExpression

-BooleanTypeExpression    ->  TypeExpression ( "==" | "!=" ) TypeExpression

-BooleanNumberExpression  ->  "(" NumberExpression ( "<" | "<=" | ">" 

-                               | ">=" | "==" | "!=" ) NumberExpression ")"

-BooleanFunction   ->  XOR "(" BooleanExpression "," BooleanExpression ")"

-BooleanLiteral    ->  "true" | "false"]]></programlisting>

-        </para>

-        <para>

-          Boolean variables are defined in

-          <xref linkend='ugr.tools.ruta.language.declarations.variable' />

-          .

-        </para>

-      </section>

-      <section>

-        <title>

-          <emphasis role="bold">Examples:</emphasis>

-        </title>

-        <para>

-          <programlisting><![CDATA[Document{->ASSIGN(boolVar, false)};]]></programlisting>

-        </para>

-        <para>

-          The boolean literal 'false' is assigned to boolean variable

-          boolVar.

-        </para>

-        <para>

-          <programlisting><![CDATA[Document{->ASSIGN(boolVar, typeVar == Author)};]]></programlisting>

-        </para>

-        <para>

-          If the type variable typeVar represents annotation type Author,

-          the

-          boolean

-          type expression evaluates to true, otherwise it evaluates

-          to

-          false. The result is assigned to boolean variable boolVar.

-        </para>

-        <para>

-          <programlisting><![CDATA[Document{->ASSIGN(boolVar, (intVar == 10))};]]></programlisting>

-        </para>

-        <para>

-          This rule shows a boolean number expression. If the value in

-          variable intVar is equal to 10, the boolean number expression

-          evaluates to true, otherwise it evaluates to

-          false. The result is

-          assigned to boolean variable boolVar. The brackets

-          surrounding the number expression are necessary.

-        </para>

-        <para>

-          <programlisting><![CDATA[Document{->ASSIGN(booleanVar1, booleanVar2 == (10 > intVar))};]]></programlisting>

-        </para>

-        <para>

-          This rule shows a more complex boolean expression. If the

-          value

-          in

-          variable intVar is equal to 10, the boolean number

-          expression

-          evaluates to true, otherwise it evaluates to

-          false. The

-          result of

-          this

-          evaluation is compared to booleanVar2. The end result

-          is

-          assigned to

-          boolean variable boolVar1. Realize that the syntax

-          definition defines

-          exactly this order. It is not possible to have

-          the

-          boolean number

-          expression on the left side of the complex number

-          expression.

-        </para>

-      </section>

-  </section>

-  

-

-<section id="ugr.tools.ruta.language.expressions.lists">

-    <title>List Expressions</title>

-    <para>

-      List expression are a rather simple kind of expression.

-      </para>

-      <section>

-        <title>

-          <emphasis role="bold">Definition:</emphasis>

-        </title>

-        <para>

-<programlisting><![CDATA[ListExpression  ->   WordListExpression | WordTableExpression |

-                     TypeListExpression | NumberListExpression |

-                     StringListExpression | BooleanListExpression

-WordListExpression     ->  RessourceLiteral | WordListVariable

-WordTableExpression    ->  RessourceLiteral | WordTableVariable

-TypeListExpression     ->  TypeListVariable

-                           | "{" TypeExpression ("," TypeExpression)* "}"

-NumberListExpression   ->  IntListVariable | FloatListVariable 

-                           | DoubleListVariable

-                           | "{" NumberExpression 

-                              ("," NumberExpression)* "}"

-StringListExpression   ->  StringListVariable

-                           | "{" StringExpression 

-                              ("," StringExpression)* "}"

-BooleanListExpression  ->  BooleanListVariable

-                           | "{" BooleanExpression 

-                              ("," BooleanExpression)* "}"

-]]></programlisting>

-    A ResourceLiteral is something

-    like 'folder/file.txt' (Attention: Use single quotes).

-        </para>

-        <para>

-          List variables are defined in

-          <xref linkend='ugr.tools.ruta.language.declarations.variable' />.

-        </para>

-      </section>

-  </section>

-  <section id="ugr.tools.ruta.language.expressions.features">

-    <title>Feature Expressions</title>

-    <para>

-     Feature expression can be used in different situations, e.g., for restricting the match of a rule element, 

-     as an implicit condition or as an implicit action.

-    <programlisting><![CDATA[FeatureExpression           -> TypeExpression "." DottedIdentifier

-FeatureMatchExpression      -> FeatureExpression 

-                               ("==" | "!=" | "<=" | "<" | ">=" | ">") 

-                               Expression

-FeatureAssignmentExpression -> FeatureExpression "=" Expression

-]]></programlisting>

-    </para>

-    <para>

-      The covered text of an annoation can be referred to with "coveredText" or "ct". 

-      The latter one is an abbreviation and returns the covered text of an annotation

-      only if the type of the annotation does not define a feature with the name "ct". 

-      The following example creates an annotation of the type TypeA for each word with the 

-      covered text "A".

-      <programlisting><![CDATA[W.ct == "A" {-> TypeA};]]></programlisting>

-    </para>

-  </section>

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.quantifier.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.quantifier.xml
deleted file mode 100644
index 7e40ac7..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.quantifier.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/tools.ruta/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="ugr.tools.ruta.language.quantifier">

-  <title>Quantifiers</title>

-  <para>

-  </para>

-  <section id="ugr.tools.ruta.language.quantifier.sg">

-    <title>* Star Greedy</title>

-    <para>

-      The Star Greedy quantifier matches on any amount of annotations and

-      evaluates always true. Please mind that a rule element with a Star

-      Greedy quantifier needs to match on different annotations as the

-      next rule element.

-

-      Examples:

-      <programlisting><![CDATA[Input:    small Big Big Big small

-Rule:     CW*

-Matched:  Big Big Big  

-Matched:  Big Big 

-Matched:  Big]]></programlisting>

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.quantifier.sr">

-    <title>*? Star Reluctant</title>

-    <para>

-      The Star Reluctant quantifier matches on any amount of annotations

-      and evaluates always true, but stops to match on new annotations,

-      when the next rule element matches and evaluates true on this

-      annotation.

-

-      Examples:

-      <programlisting><![CDATA[Input:    123 456 small small Big 

-Rule:     W*? CW

-Matched:  small small Big

-Matched:  small Big

-Matched:  Big]]></programlisting>

-    </para>

-    <para>

-     The last match <quote>Big</quote> can be problematic using different types 

-     if the rule starts matching with the first rule element.

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.quantifier.pg">

-    <title>+ Plus Greedy</title>

-    <para>

-      The Plus Greedy quantifier needs to match on at least one

-      annotation.

-      Please mind that a rule element after a rule element

-      with a Plus

-      Greedy quantifier matches and evaluates on different

-      conditions.

-

-      Examples:

-

-      <programlisting><![CDATA[Input:    123 456 small small Big 

-Rule:     SW+ 

-Matched:  small small

-Matched:  small]]></programlisting>

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.quantifier.pr">

-    <title>+? Plus Reluctant</title>

-    <para>

-      The Plus Reluctant quantifier has to match on at least one

-      annotation

-      in order to evaluate true, but stops when the next rule

-      element is

-      able to match on this annotation.

-

-      Examples:

-      <programlisting><![CDATA[Input:    123 456 small small Big 

-Rule:     W+? CW

-Matched:  small small Big

-Matched:  small Big]]></programlisting>

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.quantifier.qg">

-    <title>? Question Greedy</title>

-    <para>

-      The Question Greedy quantifier matches optionally on an annotation

-      and therefore always evaluates true.

-

-      Examples:

-      <programlisting><![CDATA[Input:    123 456 small Big small Big 

-Rule:     SW CW? SW

-Matched:  small Big small]]></programlisting>

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.quantifier.qr">

-    <title>?? Question Reluctant</title>

-    <para>

-      The Question Reluctant quantifier matches optionally on an

-      annotation,

-      if the next rule element does not match on the same

-      annotation and

-      therefore always evaluates true.

-

-      Examples:

-      <programlisting><![CDATA[Input:    123 456 small Big small Big 

-Rule:     SW CW?? SW

-Matched:  small Big small]]></programlisting>

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.quantifier.mmg">

-    <title>[x,y] Min Max Greedy</title>

-    <para>

-      The Min Max Greedy quantifier has to match at least x and at most y

-      annotations of its rule element to evaluate true.

-

-      Examples:

-      <programlisting><![CDATA[Input:    123 456 small Big small Big 

-Rule:     SW CW[1,2] SW

-Matched:  small Big small]]></programlisting>

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.quantifier.mmr">

-    <title>[x,y]? Min Max Reluctant</title>

-    <para>

-      The Min Max Greedy quantifier has to match at least x and at most y

-      annotations of its rule element to evaluate true, but stops to

-      match on additional annotations, if the next rule element is able to

-      match on this annotation.

-

-      Examples:

-      <programlisting><![CDATA[Input:    123 456 small Big Big Big small Big 

-Rule:     SW CW[2,100]? SW

-Matched:  small Big Big Big small]]></programlisting>

-    </para>

-  </section>

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.syntax.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.syntax.xml
deleted file mode 100644
index 5bf074a..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.syntax.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/tools.ruta/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="ugr.tools.ruta.language.syntax">

-  <title>Syntax</title>

-  <para>

-    UIMA Ruta defines its own language for writing rules and rule

-    scripts. This section gives a formal overview of its syntax.

-  </para>

-  <para>

-    Structure: The overall structure of a UIMA Ruta

-    script is defined by

-    the following syntax.

-    <programlisting><![CDATA[Script              -> PackageDeclaration? GlobalStatements Statements

-PackageDeclaration  -> "PACKAGE" DottedIdentifier ";"

-GlobalStatments     -> GlobalStatement*   

-GlobalStatment      -> ("SCRIPT" | "ENGINE" | "UIMAFIT") 

-                       DottedIdentifier2 ";"

-                       | ImportStatement

-Statements          -> Statement*

-Statement           -> Declaration | VariableDeclaration 

-                        | BlockDeclaration | SimpleStatement ";"]]></programlisting>

-    Comments are excluded from the syntax definition. Comments start with

-    "//" and always go to the end of the line.

-  </para>

-  <para>

-    Syntax of import statements:

-   

-    <programlisting><![CDATA[ImportStatement  -> (ImportType | ImportPackage | ImportTypeSystem) ";"

-ImportType       -> "IMPORT" Type ("FROM" Typesystem)? 

-                    ("AS" Alias)?

-ImportPackage    -> "IMPORT" "PAKAGE" Package ("FROM" Typesystem)? 

-                    ("AS" Alias)?

-ImportTypeSystem -> "IMPORT" "PACKAGE" "*" "FROM" TypeSystem ("AS" Alias)?

-                    | "IMPORT" "*" "FROM" Typesystem

-                    | "TYPESYSTEM" Typesystem

-Type             -> DottedIdentifier

-Package          -> DottedIdentifier

-TypeSystem       -> DottedIdentifier2

-Alias            -> Identifier]]></programlisting>

-

-    Example beginning of a UIMA Ruta file:

-    <programlisting><![CDATA[PACKAGE uima.ruta.example;

-

-// import the types of this type system 

-// (located in the descriptor folder -> types folder)

-IMPORT * FROM types.BibtexTypeSystem;

-

-SCRIPT uima.ruta.example.Author;

-SCRIPT uima.ruta.example.Title;

-SCRIPT uima.ruta.example.Year;

-]]></programlisting>

-

-    Syntax of declarations:

-    <programlisting><![CDATA[Declaration -> "DECLARE" (AnnotationType)? Identifier ("," Identifier )*

-               | "DECLARE" AnnotationType? Identifier ( "("

-               FeatureDeclaration ")" )?

-FeatureDeclaration  -> ( (AnnotationType | "STRING" | "INT" | "FLOAT"

-                       "DOUBLE" | "BOOLEAN") Identifier) )+

-VariableDeclaration -> (("TYPE" Identifier ("," Identifier)*

-                                                   ("=" AnnotationType)?)

-                     | ("STRING" Identifier ("," Identifier)*

-                                                 ("=" StringExpression)?)

-                     | (("INT" | "DOUBLE" | "FLOAT") Identifier

-                               ("," Identifier)* ("=" NumberExpression)?)

-                     | ("BOOLEAN" Identifier ("," Identifier)*

-                                                ("=" BooleanExpression)?)

-                     | ("WORDLIST" Identifier ("=" WordListExpression)?)

-                     | ("WORDTABLE" Identifier ("=" WordTableExpression)?)

-                     | ("TYPELIST" Identifier ("=" TypeListExpression)?)

-                     | ("STRINGLIST" Identifier

-                                             ("=" StringListExpression)?)

-                     | (("INTLIST" | "DOUBLELIST" | "FLOATLIST")

-                                  Identifier ("=" NumberListExpression)?)

-                     | ("BOOLEANLIST" Identifier

-                                           ("=" BooleanListExpression)?))

-AnnotationType      ->  BasicAnnotationType | declaredAnnotationType

-BasicAnnotationType ->  ('COLON'| 'SW' | 'MARKUP' | 'PERIOD' | 'CW'| 'NUM'

-                      | 'QUESTION' | 'SPECIAL' | 'CAP' | 'COMMA'

-                      | 'EXCLAMATION' | 'SEMICOLON' | 'NBSP'| 'AMP' | '_'

-                      | 'SENTENCEEND' | 'W' | 'PM' | 'ANY' | 'ALL'

-                      | 'SPACE' | 'BREAK')

-BlockDeclaration    -> "BLOCK" "(" Identifier ")" RuleElementWithCA

-                                                       "{" Statements "}"]]></programlisting>

-

-    Syntax of statements and rule elements:

-    <programlisting><![CDATA[SimpleStatement        -> SimpleRule | RegExpRule | ConjunctRules 

-                          | DocumentActionRule

-SimpleRule             -> RuleElements ";"

-RegExpRule             -> StringExpression "->" GroupAssignment 

-                          ("," GroupAssignment)* ";"

-ConjunctRules          -> RuleElements ("%" RuleElements)+ ";"

-DocumentActionRule     -> Actions ";"

-GroupAssignment        -> TypeExpression 

-                        | NumberEpxression "=" TypeExpression

-RuleElements           -> RuleElement+

-RuleElement            -> RuleElementType | RuleElementLiteral

-                        | RuleElementComposed | RuleElementWildCard

-RuleElementType        ->  MatchReference OptionalRuleElementPart

-RuleElementWithCA      ->  MatchReference ("{" Conditions?  Actions? "}")?

-MatchReference         -> TypeExpression | FeatureMatchExpression

-FeatureMatchExpression -> TypeExpression ( "." Feature)+ 

-                          ( Operator (Expression | "null"))?

-RuleElementLiteral     ->  SimpleStringExpression OptionalRuleElementPart

-RuleElementComposed    -> "(" RuleElement ("&" RuleElement)+ ")"

-                          | "(" RuleElement ("|" RuleElement)+ ")"

-                          | "(" RuleElements ")"

-                          OptionalRuleElementPart

-OptionalRuleElementPart-> QuantifierPart? ("{" Conditions?  Actions? "}")?

-                          InlinedRules?

-InlinedRules           ->  ("<-" "{" SimpleStatement+ "}")?

-                           ("->"  "{" SimpleStatement+ "}")?

-RuleElementWildCard    -> "#"("{" Conditions?  Actions? }")? InlinedRules?

-QuantifierPart         -> "*" | "*?" | "+" | "+?" | "?" | "??"

-                        | "[" NumberExpression "," NumberExpression "]"

-                        | "[" NumberExpression "," NumberExpression "]?"

-Conditions             -> Condition ( "," Condition )*

-Actions                -> "->" Action ( "," Action)*

-]]></programlisting>

-    Since each condition and each action has its own syntax, conditions

-    and actions are described in their own section. For conditions see

-    <xref linkend='ugr.tools.ruta.language.conditions' />

-    , for actions see

-    <xref linkend='ugr.tools.ruta.language.actions' />.

-    The syntax of expressions is explained in

-    <xref linkend='ugr.tools.ruta.language.expressions' />.

-  </para>

-  <para>

-    It is also possible to use specific expression as implicit conditions or action additionally to the set of available conditions and actions.

-        <programlisting><![CDATA[Condition -> BooleanExpression | FeatureMatchExpression

-Action    -> TypeExpression | FeatureAssignmentExpression 

-]]></programlisting>

-  

-

-  </para>

-  

-  

-  <para>

-    Identifier:

-    <programlisting><![CDATA[DottedIdentifier    ->  Identifier ("." Identifier)*

-DottedIdentifier2   ->  Identifier (("."|"-") Identifier)*

-Identifier          ->  letter (letter|digit)*

-]]></programlisting>

-  </para>

-</section>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml
deleted file mode 100644
index 22b372c..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml
+++ /dev/null
@@ -1,988 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/language/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<chapter id="ugr.tools.ruta.language.language">

-  <title>Apache UIMA Ruta Language</title>

-  <para>

-    This chapter provides a complete description of the Apache UIMA Ruta

-    language.

-  </para>

-

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.syntax.xml" />

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.anchoring.xml" />

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.basic_annotations.xml" />

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.quantifier.xml" />

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.declarations.xml" />

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.expressions.xml" />

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.conditions.xml" />

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"

-    href="tools.ruta.language.actions.xml" />

-

-

-  <section id="ugr.tools.ruta.language.filtering">

-    <title>Robust extraction using filtering</title>

-    <para>

-      Rule based or pattern based information extraction systems often

-      suffer from unimportant fill words, additional whitespace and

-      unexpected markup. The UIMA Ruta System enables the knowledge

-      engineer to filter and to hide all possible combinations of

-      predefined and new types of annotations. The

-      visibility of tokens and annotations is modified by the actions of

-      rule elements and can be conditioned using the complete

-      expressiveness of the language.

-      Therefore the UIMA Ruta system

-      supports a robust approach to

-      information extraction and simplifies

-      the creation of new rules since

-      the knowledge engineer can focus on

-      important textual features. 

-    </para>

-    <note>    

-      <para>

-        The visibility of types is calculated using three lists: 

-        A list <quote>default</quote> for the initially filtered types, 

-        which is specified in the configuration parameters of the analysis engine, the list <quote>filtered</quote>, which is 

-        specified by the FILTERTYPE action, and the list <quote>retained</quote>, which is specified by the RETAINTYPE action.

-        For determining the actual visibility of types, list <quote>filtered</quote> is added to list <quote>default</quote> 

-        and then all elements of list <quote>retained</quote> are removed. The annotations of the types in the resulting list are not visible.

-        Please note that the actions FILTERTYPE and RETAINTYPE replace all elements of the respective lists and that RETAINTYPE 

-        overrides FILTERTYPE.

-      </para>

-    </note>

-    <para>

-      If no rule action changed the

-      configuration of the filtering settings, then

-      the default filtering

-      configuration ignores whitespaces and markup.

-      Look at the following rule:

-      <programlisting><![CDATA["Dr" PERIOD CW CW;

-]]></programlisting>

-      Using the default

-      setting, this rule matches on all four lines

-      of this

-      input document:

-      <programlisting><![CDATA[Dr. Joachim Baumeister

-Dr . Joachim      Baumeister

-Dr. <b><i>Joachim</i> Baumeister</b>

-Dr.JoachimBaumeister

-]]></programlisting>

-    </para>

-    <para>

-      To change the default setting, use the

-      <quote>FILTERTYPE</quote>

-      or

-      <quote>RETAINTYPE</quote>

-      action. For example if markups should no longer be ignored, try

-      the following example on the above mentioned input document:

-      <programlisting><![CDATA[Document{->RETAINTYPE(MARKUP)};

-"Dr" PERIOD CW CW;

-]]></programlisting>

-      You will see that the third line of the previous input example

-      will  no longer be matched.

-    </para>

-    <para>

-      To filter types, try the following rules on the input document:

-      <programlisting><![CDATA[Document{->FILTERTYPE(PERIOD)};

-"Dr" CW CW;

-]]></programlisting>

-      Since periods are ignored here, the rule will match on all four

-      lines of the example.

-    </para>

-    <para>

-      Notice that using a filtered annotation type within a

-      rule prevents this rule from being executed. Try the following:

-      <programlisting><![CDATA[Document{->FILTERTYPE(PERIOD)};

-"Dr" PERIOD CW CW;

-]]></programlisting>

-      You will see that this matches on no line of the input document

-      since the second rule uses the filtered type PERIOD and is therefore not

-      executed.

-    </para>

-    

-  </section>

-  <section id="ugr.tools.ruta.language.blocks">

-    <title>Blocks</title>

-    <para>

-      Blocks combine some more complex control structures in the

-      UIMA Ruta

-      language:

-      <orderedlist numeration="arabic">

-        <listitem>

-          <para>

-            Conditioned statements

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            <quote>Foreach</quote>

-            -Loops

-          </para>

-        </listitem>

-        <listitem>

-          <para>

-            Procedures

-          </para>

-        </listitem>

-      </orderedlist>

-    </para>

-    <para>

-      Declaration of a block:

-      <programlisting><![CDATA[BlockDeclaration   -> "BLOCK" "(" Identifier ")" RuleElementWithCA

-                                            "{" Statements "}"

-RuleElementWithCA      ->  TypeExpression QuantifierPart?

-                                            "{" Conditions?  Actions? "}"]]></programlisting>

-      A block declaration always starts with the keyword

-      <quote>BLOCK</quote>, followed by the identifier of the block within parentheses. The

-      <quote>RuleElementType</quote>-element

-      is a UIMA Ruta rule that consists of exactly one rule

-      element. The rule element has to be a declared annotation type.

-      <note>

-        <para>

-          The rule element in the definition of a block has to define

-          a condition/action part, even if that part is empty (<quote>{}</quote>).

-        </para>

-      </note>

-    </para>

-    <para>

-      Through the rule element a new local document is defined, whose

-      scope

-      is the related block. So if you use

-      <literal>Document</literal>

-      within a block, this always refers to the locally limited

-      document.

-      <programlisting><![CDATA[BLOCK(ForEach) Paragraph{} {

-    Document{COUNT(CW)}; // Here "Document" is limited to a Paragraph;

-               // therefore the rule only counts the CW annotations

-               // within the Paragraph

-}

-]]></programlisting>

-    </para>

-    <para>

-      A block is always executed when the UIMA Ruta interpreter

-      reaches its

-      declaration. But a block may also be called from another

-      position of

-      the script. See

-      <xref linkend='ugr.tools.ruta.language.blocks.procedure' />

-    </para>

-    <section id="ugr.tools.ruta.language.blocks.condition">

-      <title>Conditioned statements</title>

-      <para>

-        A block can use common UIMA Ruta conditions to condition the

-        execution of its containing rules.

-      </para>

-      <para>

-        Examples:

-        <programlisting><![CDATA[DECLARE Month;

-

-BLOCK(EnglishDates) Document{FEATURE("language", "en")} {

-    Document{->MARKFAST(Month,'englishMonthNames.txt')};

-    //...

-}

-

-BLOCK(GermanDates) Document{FEATURE("language", "de")} {

-    Document{->MARKFAST(Month,'germanMonthNames.txt')};

-    //...

-}

-]]></programlisting>

-        The example is explained in detail in

-        <xref linkend='ugr.tools.ruta.overview.examples' />

-        .

-      </para>

-    </section>

-    <section id="ugr.tools.ruta.language.blocks.foreach">

-      <title>

-        <quote>Foreach</quote>

-        -Loops

-      </title>

-      <para>

-        A block can be used to execute the containing rules on a

-        sequence of

-        similar text passages, therefore representing a

-        <quote>foreach</quote>

-        like loop.

-      </para>

-      <para>

-        Examples:

-        <programlisting><![CDATA[DECLARE SentenceWithNoLeadingNP;

-BLOCK(ForEach) Sentence{} {

-    Document{-STARTSWITH(NP) -> MARK(SentenceWithNoLeadingNP)};

-}

-]]></programlisting>

-        The example is explained in detail in

-        <xref linkend='ugr.tools.ruta.overview.examples' />

-        .

-      </para>

-      <para>

-        This construction is especially useful, if you have a set of

-        rules,

-        which has to be executed continously on the same part of an input

-        document. Let us assume that you have already annotated your document

-        with

-        Paragraph annotations. Now you want to count the number of words

-        within each paragraph and, if the number of words exceeds 500,

-        annotate it as BigParagraph. Therefore, you wrote the following

-        rules:

-        <programlisting><![CDATA[DECLARE BigParagraph;

-INT numberOfWords;

-Paragraph{COUNT(W,numberOfWords)};

-Paragraph{IF(numberOfWords > 500) -> MARK(BigParagraph)};

-]]></programlisting>

-        This will not work. The reason for this is that the rule, which counts the

-        number of words within a Paragraph is executed on all Paragraphs

-        before the last rule which marks the Paragraph as BigParagraph

-        is

-        even executed once. When reaching the last rule in this

-        example, the variable

-        <literal>numberOfWords</literal>

-        holds the

-        number of words of the last Paragraph in the input

-        document,

-        thus, annotating all Paragraphs either as BigParagraph or

-        not.

-      </para>

-      <para>

-        To solve this problem, use a block to tie the

-        execution of this rules

-        together for each Paragraph:

-        <programlisting><![CDATA[DECLARE BigParagraph;

-INT numberOfWords;

-BLOCK(IsBig) Paragraph{} {

-  Document{COUNT(W,numberOfWords)};

-  Document{IF(numberOfWords > 500) -> MARK(BigParagraph)};

-}

-]]></programlisting>

-        Since the scope of the Document is limited to a Paragraph within

-        the

-        block, the rule, which counts the words is only executed once

-        before

-        the second rule decides, if the Paragraph is a BigParagraph.

-        Of course,

-        this is done for every Paragraph in the whole document.

-      </para>

-    </section>

-    <section id="ugr.tools.ruta.language.blocks.procedure">

-      <title>Procedures</title>

-      <para>

-        Blocks can be used to introduce procedures to the UIMA Ruta

-        scripts.

-        To do this, declare a block as before. Let us assume, you want to

-        simulate a procedure

-        <programlisting><![CDATA[public int countAmountOfTypesInDocument(Type type){

-    int amount = 0;

-    for(Token token : Document) {

-      if(token.isType(type)){

-        amount++;

-      }

-    }

-    return amount;

-} 

-

-public static void main() {

-  int amount = countAmountOfTypesInDocument(Paragraph));

-}            

-]]></programlisting>

-        which counts the number of the passed type within the document

-        and

-        returns the counted number. This can be done in the following

-        way:

-        <programlisting><![CDATA[BOOLEAN executeProcedure = false;

-TYPE type;

-INT amount;

-

-BLOCK(countNumberOfTypesInDocument) Document{IF(executeProcedure)} {

-    Document{COUNT(type, amount)};

-}

-

-Document{->ASSIGN(executeProcedure, true)};

-Document{->ASSIGN(type, Paragraph)};

-Document{->CALL(MyScript.countNumberOfTypesInDocument)};

-]]></programlisting>

-        The boolean variable

-        <literal>executeProcedure</literal>

-        is used to prohibit the execution of the block when the

-        interpreter

-        first reaches the block since this is no procedure call. The block

-        can be called

-        by referring to it with its name, preceded by the name

-        of the script

-        the

-        block is defined in. In this example, the script is

-        called MyScript.ruta.

-      </para>

-    </section>

-

-  </section>

-  

-  <section id="ugr.tools.ruta.language.inlined">

-    <title>Inlined rules</title>

-    <para>

-      A rule element can have a few optional parts, e.g., the quantifier or the curly brackets with conditions and actions.

-      After the part with the conditions and actions, the rule element can also contain an optional part with inlined rules.

-      These rules are applied in the context of the rule element similar to the rules within a block construct: The rules 

-      will try to match within the window specified by the current match of the rule element. There are two types of inlined rules.

-      If the curly brackets start with the symbol <quote>-></quote>, the inlined rules will only be applied for successful matches of the surrounding rule.

-      This behavior is very similar to the block construct. However, there are also some differences, e.g., inlined rules do not specify a 

-      namespace, may not contain declarations and cannot be called by other rules.

-      If the curly brackets start with the symbol <quote>&lt;-</quote>,

-      then the inlined rules are interpreted as some sort of condition. The surrounding rules will only match, if one of the inlined rules was successfully applied.

-      The functionality introduced by inlined rules is illustrated with a few examples:

-    </para>

-    <programlisting><![CDATA[Sentence{} -> {NUM{-> NumBeforeWord} W;};

-Sentence{-> SentenceWithNumBeforeWord} <- {NUM W;};

-]]></programlisting>

-    <para>

-      The first rule in this example matches on each <quote>Sentence</quote> annotation and applies the inlined rule within each matched sentence. The inlined rule 

-      matches on numbers followed by a word and annotates the number with an annotation of the type <quote>NumBeforeWord</quote>. The second rule matches on each sentence 

-      and applies the inlined rule within each sentence. Note that the inlined rule contains no actions. The rule matches only successfully on a sentence if one of the inlined rules was

-      successfully applied. In this case, the sentence is only annotated with an annotation of the type <quote>SentenceWithNumBeforeWord</quote>, if the 

-      sentence contains a number followed by a word.

-    </para>

-

-    <programlisting><![CDATA[Document.language == "en"{} -> {

-  PERIOD #{} <- {

-      COLON COLON % COMMA COMMA;

-    }

-    PERIOD{-> SpecialPeriod};

-}    

-]]></programlisting>

-    <para>

-      This examples combines both types of inlined rules. First, the rule matches on document annotations with the language feature set to <quote>en</quote>. Only for those documents,

-      the first inner rule is applied. The inner rule matches on everything between two period, but only if the text span between the period fulfills two conditions: There must be two 

-      successive colons and two successive commas within the window of the matched part of the wildcard. Only if these constraints are fulfilled, then the last period is annotated with the type 

-      <quote>SpecialPeriod</quote>.

-    </para>  

-  </section>

-  

-  <section id="ugr.tools.ruta.language.score">

-    <title>Heuristic extraction using scoring rules</title>

-    <para>

-      Diagnostic scores are a well known and successfully applied

-      knowledge

-      formalization pattern for diagnostic problems. Single known

-      findings

-      valuate a possible solution by adding or subtracting points

-      on an

-      account of that solution. If the sum exceeds a given threshold,

-      then

-      the solution is derived. One of the advantages of this pattern

-      is the

-      robustness against missing or false findings, since a high

-      number of

-      findings is used to derive a solution.

-

-      The UIMA Ruta system tries to

-      transfer this diagnostic problem

-      solution strategy to the

-      information

-      extraction problem. In addition to a

-      normal creation of a new

-      annotation, a MARKSCORE action can add positive

-      or negative scoring

-      points to the text fragments matched by the rule

-      elements. The current

-      value of heuristic points of an annotation can

-      be evaluated by the

-      SCORE condition, which can be used in an

-      additional rule to create

-      another annotation.

-      In the following, the heuristic extraction using

-      scoring rules is demonstrated by a short example:

-

-      <programlisting><![CDATA[Paragraph{CONTAINS(W,1,5)->MARKSCORE(5,Headline)};

-Paragraph{CONTAINS(W,6,10)->MARKSCORE(2,Headline)};

-Paragraph{CONTAINS(Emph,80,100,true)->MARKSCORE(7,Headline)};

-Paragraph{CONTAINS(Emph,30,80,true)->MARKSCORE(3,Headline)};

-Paragraph{CONTAINS(CW,50,100,true)->MARKSCORE(7,Headline)};

-Paragraph{CONTAINS(W,0,0)->MARKSCORE(-50,Headline)};

-Headline{SCORE(10)->MARK(Realhl)};

-Headline{SCORE(5,10)->LOG("Maybe a headline")};]]></programlisting>

-

-

-      In the first part of this rule set, annotations of the type

-      paragraph

-      receive scoring points for a headline annotation, if they

-      fulfill

-      certain CONTAINS conditions. The first condition, for

-      example,

-      evaluates to true, if the paragraph contains one word up to

-      five

-      words, whereas the fourth conditions is fulfilled, if the

-      paragraph

-      contains thirty up to eighty percent of emph annotations.

-      The last two

-      rules finally execute their actions, if the score of a

-      headline

-      annotation exceeds ten points, or lies in the interval of

-      five to ten

-      points, respectively.

-    </para>

-  </section>

-  <section id="ugr.tools.ruta.language.modification">

-    <title>Modification</title>

-    <para>

-      There are different actions that can modify the input document,

-      like DEL, COLOR and REPLACE. However, the input document itself can not be

-      modified directly. A separate engine, the Modifier.xml, has to be

-      called in order to create another CAS view with the (default) name "modified".

-      In that document, all modifications are executed.

-    </para>

-    <para>

-      The following example shows how to import and call the

-      Modifier.xml engine. The example is explained in detail in

-      <xref linkend='ugr.tools.ruta.overview.examples' />.

-    </para>

-    <programlisting><![CDATA[ENGINE utils.Modifier;

-Date{-> DEL};

-MoneyAmount{-> REPLACE("<MoneyAmount/>")};

-Document{-> COLOR(Headline, "green")};

-Document{-> EXEC(Modifier)};

-]]></programlisting>

-

-  </section>

-

-  <section id="ugr.tools.ruta.language.external_resources">

-    <title>External resources</title>

-    <para>

-      Imagine you have a set of documents containing many different

-      first names. (as example we use a short list, containing the first

-      names

-      <quote>Frank</quote>

-      ,

-      <quote>Peter</quote>

-      ,

-      <quote>Jochen</quote>

-      and

-      <quote>Martin</quote>

-      )

-      If you like to annotate all of them with a

-      <quote>FirstName</quote>

-      annotation, then you could write a script using the rule

-      <literal>("Frank" | "Peter" | "Jochen" |

-        "Martin"){->MARK(FirstName)};</literal>.

-      This does exactly what you want, but not very handy.

-      If you like to add new first names to the list of recognized first

-      names you have to change the rule itself every time. Moreover, writing

-      rules with possibly hundreds of first names

-      is not really practically realizable and definitely not efficient, if you have

-      the list of first names already as a simple text file. Using this text file directly

-      would reduce the effort.

-    </para>

-    <para>

-      UIMA Ruta provides, therefore, two kinds of external resources to

-      solve such tasks more easily: WORDLISTs and WORDTABLEs.

-    </para>

-    <section>

-      <title>WORDLISTs</title>

-      <para>

-        A WORDLIST is a list of text items. There are three

-        different possibilities of how to provide a WORDLIST to the UIMA Ruta system.

-      </para>

-      <para>

-        The first possibility is the use of simple text files, which

-        contain exactly one list item per line. For example, a list "FirstNames.txt"

-        of first names could look like this:

-        <programlisting><![CDATA[Frank

-Peter

-Jochen

-Martin

-]]></programlisting>

-        First names within a document containing any number of these

-        listed

-        names, could be annotated

-        by using

-        <literal>Document{->MARKFAST(FirstName, "FirstNames.txt")};</literal>, assuming

-        an already declared type FirstName. To make this rule

-        recognizing more first names, add

-        them to the external list.

-        You could also use a WORLIST variable to do the same thing as follows:

-        <programlisting><![CDATA[WORDLIST FirstNameList = 'FirstNames.txt';

-DECLARE FirstName;

-Document{->MARKFAST(FirstName, FirstNameList)};

-]]></programlisting>

-      </para>

-      <para>

-        Another possibility to provide WORDLISTs is the use of compiled

-        <quote>tree word list</quote>

-        s. The file ending for this is <quote>.twl</quote>

-        A tree word list is similar to a trie. It is a XML-file that contains

-        a tree-like structure with a node for each character. The nodes

-        themselves refer to child nodes that represent all characters that

-        succeed the character of the parent node. For single word entries the

-        resulting complexity is O(m*log(n)) instead of O(m*n) for simple text

-        files. Here m is the amount of basic annotations in the document and

-        n is the amount of entries in the dictionary. To generate a tree word

-        list, see <xref linkend='section.ugr.tools.ruta.workbench.create_dictionaries' />.

-        A tree word list is used in the same way as simple word lists,

-        for example <literal>Document{->MARKFAST(FirstName, "FirstNames.twl")};</literal>.

-      </para>

-      <para>

-        A third kind of usable WORDLISTs are <quote>multi tree word list</quote>s.

-        The file ending for this is <quote>.mtwl</quote>. It is generated from

-        several ordinary WORDLISTs given as simple text files. It contains special

-        nodes that provide additional information about the original file. These

-        kind of WORDLIST is useful, if several different WORDLISTs are used within

-        a UIMA Ruta script. Using five different lists results in five rules using

-        the MARKFAST action. The documents to annotate are thus searched five

-        times resulting in a complexity of 5*O(m*log(n)) With a multi tree

-        word list this can be reduced to about O(m*log(5*n)). To

-        generate a multi tree word list, see

-        <xref linkend='section.ugr.tools.ruta.workbench.create_dictionaries' />

-        To use a multi tree word list UIMA Ruta provides the action

-        TRIE. If for example two word lists

-        <quote>FirstNames.txt</quote>

-        and

-        <quote>LastNames.txt</quote>

-        have been merged in the multi tree word list

-        <quote>Names.mtwl</quote>, then the following rule annotates all

-        first names and last names in the whole document:

-        <programlisting><![CDATA[WORDLIST Names = 'Names.mtwl';

-Declare FirstName, LastName;

-Document{->TRIE("FirstNames.txt" = FirstName, "LastNames.txt" = LastName,

-                                          Names, false, 0, false, 0, "")};]]></programlisting>

-      </para>

-    </section>

-    <section>

-      <title>WORDTABLEs</title>

-      <para>

-        WORDLISTs have been used to annotate all occurrences of any list

-        item in a document with a certain type. Imagine now that each annotation

-        has features that should be filled with values dependent on the list item

-        that matched. This can be achieved with WORDTABLEs. Let us, for example,

-        assume we want to annotate all US presidents within a document.

-        Moreover, each annotation should contain the party of the president as well as the

-        year of his inauguration. Therefore we use an annotation type

-        <literal>DECLARE Annotation PresidentOfUSA(STRING party, INT

-          yearOfInauguration)</literal>. To achieve this, it is recommended to use WORDTABLEs.

-      </para>

-      <para>

-        A WORDTABLE is simply a comma-separated file (.csv), which actually uses semicolons for separation of the entries. 

-        For our example, such a file named

-        <quote>presidentsOfUSA.csv</quote>

-        could look like this:

-        <programlisting><![CDATA[Bill Clinton; democrats; 1993

-George W. Bush; republicans; 2001

-Barack Obama; democrats; 2009

-]]></programlisting>

-        To annotate our documents we could use the following set of

-        rules:

-        <programlisting><![CDATA[WORDTABLE presidentsOfUSA = 'presidentsOfUSA.csv';

-DECLARE Annotation PresidentOfUSA(STRING party, INT yearOfInauguration);

-Document{->MARKTABLE(PresidentOfUSA, 1, "party" = 2, 

-											 "yearOfInauguration" = 3)};]]></programlisting>

-      </para>

-    </section>

-  </section>

-  <section id="ugr.tools.ruta.language.regexprule">

-    <title>Simple Rules based on Regular Expressions</title>

-    <para>

-      The UIMA Ruta language includes, additionally to the normal rules, a simplified rule syntax for processing regular expressions.

-      These simple rules consist of two parts separated by <quote>-></quote>: The left part is the regular expression 

-      (flags: DOTALL and MULTILINE), which may contain capturing groups. The right part defines, which kind of annotations 

-      should be created for each match of the regular expression. If a type is given without a group index, then an annotation of that type is

-      created for the complete regular expression match, which corresponds to group 0. Each type can be extended with additional feature assignments, 

-      which store the value of the given expression in the feature specified by the given StringExpression. However, if the expression 

-      refers to a number (NumberExpression), then the match of the corresponding capturing group is applied. 

-      These simple rules can be restricted to match only within

-      certain annotations using the BLOCK construct, and ignore all filtering settings.

-    </para>

-    

-    <programlisting><![CDATA[

-RegExpRule        -> StringExpression "->" GroupAssignment 

-                     ("," GroupAssignment)* ";"

-GroupAssignment   -> TypeExpression FeatureAssignment?

-                     | NumberEpxression "=" TypeExpression FeatureAssignment?

-FeatureAssignment -> "(" StringExpression "=" Expression 

-                      ("," StringExpression "=" Expression)* ")"

-]]></programlisting>

-    

-    <para>

-      The following example contains a simple rule, which is able to create annotations of two different types. It creates an annotation 

-      of the type <quote>T1</quote> for each match of the complete regular expression and an annotation 

-      of the type <quote>T2</quote> for each match of the first capturing group.

-    </para>

-    

-    <programlisting><![CDATA["A(.*?)C" -> T1, 1 = T2;]]></programlisting>

-    

-    

-  </section>

-  <section id="ugr.tools.ruta.language.extensions">

-    <title>Language Extensions</title>

-    <para>

-      The UIMA Ruta language can be extended with external blocks, actions, conditions, 

-      type functions, boolean functions, string functions and number functions. 

-      The block constructs are able to introduce new rule matching paradigms. 

-      The other extensions provide atomic elements to the language, e.g., a condition that evaluates project-specific properties.

-      An exemplary implementation of each kind of extension can be found in the project

-      <quote>ruta-ep-example-extensions</quote> and a simple UIMA Ruta project, which uses these extensions, is located at 

-      <quote>ExtensionsExample</quote>. Both projects are part of the source release of UIMA ruta and are located in the <quote>example-projects</quote> folder.

-    </para>

-    <section id="ugr.tools.ruta.language.extensions.core-ext">

-	    <title>Provided Extensions</title>

-	    <para>

-	      The UIMA Ruta language already provides extensions besides the exemplary elements. 

-	      The projet ruta-core-ext contains the implementation for the analysis engine and the project

-	      ruta-ep-core-ext contains the integration in the UIMA Ruta Workbench.

-	    </para>

-	    <section id="ugr.tools.ruta.language.extensions.core-ext.onlyfirst">

-	    <title>ONLYFIRST</title>

-      <para>

-        This additional block construct applies the contained statements/rules only until 

-        the first one was successfully applied. The following example provides an overview of the syntax:

-      </para>

-      <programlisting><![CDATA[ONLYFIRST Document{}{

-  Document{CONTAINS(Keyword1) -> Doc1};

-  Document{CONTAINS(Keyword2) -> Doc2};

-  Document{CONTAINS(Keyword3) -> Doc3};

-}]]></programlisting>

-      <para>

-        The block contains three rules each evaluating if the document contains a specific annotation of the type Keyword1/2/3.

-        If the first rule is able to match, then the other two rules will not try to apply. Straightforwardly, if the first rule failed to match and 

-        the second rules is able to match, then the third rule will not try to be applied.

-      </para>

-	    </section>

-    </section>

-    <section id="ugr.tools.ruta.language.extensions.core-ext.onlyonce">

-      <title>ONLYONCE</title>

-      <para>

-        Rules within this block construct will stop after the first successful match.

-        The following example provides an overview of the syntax:

-      </para>

-      <programlisting><![CDATA[ONLYONCE Document{}{

-  CW{-> FirstCW};

-  NUM+{-> FirstNumList};

-}]]></programlisting>

-      <para>

-        The block contains two rules. 

-        The first rule will annotate the first capitalized word of the document with the type FirstCW.

-        All further possible matches will be skipped.

-        The second rule will annotate the first sequence of numbers with the type FirstNumList.

-        The greedy behavior of the quantifiers is not changed by the ONLYONCE block.

-       </para>

-    </section>

-        <section id="ugr.tools.ruta.language.extensions.core-ext.stringfunctions">

-      <title>Stringfunctions</title>

-      <para>

-        In order to manipulate Strings in variables a bunch of Stringfunctions

-        have been added.

-        They will all be presented with a short example demonstrating their use.

-      </para>

-      <section>

-        <title>firstCharToUpperCase(IStringExpression expr)</title>

-        <programlisting><![CDATA[STRING s;

-STRINGLIST sl;

-SW{-> MATCHEDTEXT(s), ADD(sl, firstCharToUpperCase(s))};

-CW{INLIST(sl) -> Test};]]></programlisting>

-        <para>

-          This example declares a STRING and a STRINGLIST. Afterwards for every

-          small-written word,

-          the according word with a capital first Character is added to the

-          STRINGLIST.

-          This might be helpful in german Named-Entity-Recognition where you will

-          encounter "der blonde Junge..." and "der Blonde",

-          both map to the same entity. Applied to the word "blonde" you can then

-          also track the second appearance of that Person.

-          In the last line a rule marks all words in the STRINGLIST as a Test

-          Annotation.

-        </para>

-      </section>

-      <section>

-        <title>replaceFirst(IStringExpression expr, IStringExpression

-          searchTerm,

-          IStringExpression replacement)

-        </title>

-        <programlisting><![CDATA[STRING s;

-STRINGLIST sl;

-CW{-> MATCHEDTEXT(s), ADD(sl, replaceFirst(s,"e","o"))};

-CW{INLIST(sl) -> Test};]]></programlisting>

-        <para>

-          This example declares a STRING and a STRINGLIST. Next every capital

-          Word CW is added

-          to the STRINGLIST, however the first "e" is going to be replaced by

-          "o". Afterwards all

-          instances of the STRINGLIST are matched with all present CWs and

-          annotated as a Test Annotation if a match occurs.

-        </para>

-      </section>

-      <section>

-        <title>replaceAll(IStringExpression expr, IStringExpression

-          searchTerm,

-          IStringExpression replacement)

-        </title>

-        <programlisting><![CDATA[STRING s;

-STRINGLIST sl;

-CW{-> MATCHEDTEXT(s), ADD(sl, replaceAll(s,"e","o"))};

-CW{INLIST(sl) -> Test};]]></programlisting>

-        <para>

-          This example declares a STRING and a STRINGLIST. Next every capital

-          Word CW is added

-          to the STRINGLIST, however similar to the above example at first

-          there is going to be a replacement.

-          This time all "e"`s are going to be replaced by "o"`s. Afterwards all

-          instances of the STRINGLIST are matched with all present CWs and

-          annotated as a Test Annotation if a match occurs.

-        </para>

-      </section>

-

-      <section>

-        <title>substring(IStringExpression expr, INumberExpression from,

-          INumberExpression to)

-        </title>

-        <programlisting><![CDATA[STRING s;

-STRINGLIST sl;

-CW{-> MATCHEDTEXT(s), ADD(sl, substring(s,0,8))};

-SW{INLIST(sl) -> Test};]]></programlisting>

-        <para>

-          This example declares a STRING and a STRINGLIST. Imagine you found the

-          word "Alexanderplatz" but

-          you only want to continue with the word "Alexander". This snippet

-          shows how this can be done by

-          using the Stringfunctions in RUTA. If a word has less character than

-          specified in the arguments,

-          nothing will be executed.

-

-        </para>

-      </section>

-

-      <section>

-        <title>toLowerCase(IStringExpression expr)</title>

-        <programlisting><![CDATA[STRING s;

-STRINGLIST sl;

-CW{-> MATCHEDTEXT(s), ADD(sl, toLowerCase(s))};

-SW{INLIST(sl) -> Test};]]></programlisting>

-        <para>

-          This example declares a STRING and a STRINGLIST. A problem you might

-          encounter is that you

-          want to know whether the first word of a sentence is really a

-          noun.(Again more or less german related)

-          By using this function you could add all words that start a

-          sentence(which usually means a capitalized word) to a list

-          as in this example. Then test if it also appears within the text but

-          this time as lowercase. As a result you could change its

-          POS-Tag.

-

-        </para>

-      </section>

-            <section>

-        <title>toUpperCase(IStringExpression expr)</title>

-        <programlisting><![CDATA[STRING s;

-STRINGLIST sl;

-CW{-> MATCHEDTEXT(s), ADD(sl, toUpperCase(s))};

-SW{INLIST(sl) -> T1};]]></programlisting>

-        <para>

-          This example declares a STRING and a STRINGLIST. A typical scenario for

-          its use might be

-          Named-Entity-Recognition. This time you want to find all organizations given an input

-          document.

-          At first you might track-down all fully capitalized words. As a

-          second step you can use this function

-          and iterate over all CW insances and compare the found instance with

-          all the uppercase organizations that were

-          found before.

-        </para>

-      </section>

-

-

-      <section>

-        <title>contains(IStringExpression expr,IStringExpression contains)

-        </title>

-        <programlisting><![CDATA[STRING s;

-BOOLEAN a ;

-BLOCK(forEACH) W{}{

-    W{->MATCHEDTEXT(s), ASSIGN(a,contains(s,"er"))};

-    W{a ->Test};

-}]]></programlisting>

-        <para>

-          If you want to find all words that contain a given charactersequence.

-          Assume again you are in a NER-Task

-          you found the token "Alexanderplatz" using this function you can track

-          down the names that are part of a given token.

-          This example uses a BLOCK to iterate over each word and then assigns

-          whether the text of that word contains the given char-sequence.

-          If so it is annotated as a Test annotation.

-        </para>

-      </section>

-

-      <section>

-        <title>endsWith(IStringExpression expr,IStringExpression expr)

-        </title>

-        <programlisting><![CDATA[STRING s;

-BOOLEAN a;

-BLOCK(forEACH) W{}{

-    W{->MATCHEDTEXT(s), ASSIGN(a,endsWith(s,"str."))};

-    W{a ->Test};

-}]]></programlisting>

-        <para>

-          Assume you found the suffix "str." as a strong indicator whether a given

-          token represents

-          location (a street) by using this function you can now easily identify all

-          of those words, given

-          a valid suffix.

-        </para>

-      </section>

-

-      <section>

-        <title>startsWith(IStringExpression expr,IStringExpression expr)

-        </title>

-        <programlisting><![CDATA[STRING s;

-BOOLEAN a ;

-BLOCK(forEACH) W{}{

-    W{->MATCHEDTEXT(s), ASSIGN(a,startsWith(s,"sprech"))};

-    W{a ->Test};

-}]]></programlisting>

-        <para>

-  Given a stem of a word you want to mark every instance that was possibly derived from that stem.

-  If you decide to use that function you can detect all those words in 1 line and in a next step mark all

-  of them as an Annotationtype of choice.

-  

-        </para>

-      </section>

-      

-            <section>

-        <title>equals(IStringExpression expr,IStringExpression expr) and equalsIgnoreCase(expr,expr)

-        </title>

-        <programlisting><![CDATA[STRING s;

-STRING s2 = "Kenny";

-BOOLEAN a;

-BLOCK(forEACH) W{}{

-    W{->MATCHEDTEXT(s), ASSIGN(a,equals(s,s2))};

-    W{->MATCHEDTEXT(s), ASSIGN(a,equalsIgnoreCase(s,s2))};

-    W{a ->Test};

-}]]></programlisting>

-        <para>

-  These functions check whether both arguments are equal in terms of the

-  text of the token that they contain.

-  

-  

-        </para>

-      </section>

-      

-                  <section>

-        <title>isEmpty(IStringExpression expr) and equalsIgnoreCase(expr,expr)

-        </title>

-        <programlisting><![CDATA[STRING s;

-BOOLEAN a;

-BLOCK(forEACH) W{}{

-    W{->MATCHEDTEXT(s), ASSIGN(a,isEmpty(s))};

-    W{a ->Test};

-}]]></programlisting>

-        <para>

-An equivalent function to the Java Stringlibrary. It checks whether or not a given variable contains

-an empty Stringliteral "" or not.

-  

-        </para>

-      </section>

-          </section>

-    <section id="ugr.tools.ruta.language.extensions.new">

-    <title>Adding new Language Elements</title>

-    <para>

-      The extension of the UIMA Ruta language is illustrated using an exmaple on how to add a new condition.

-      Other langauge elements can be specified straightforwardly by using the corresponding interfaces and extensions.

-    </para>

-    <para>

-      Three classes need to be implemented for adding a new condition that also is resolved in the UIMA Ruta Workbench:

-    </para>

-    <para>

-    <orderedlist numeration="arabic">

-    <listitem>

-	    <para>

-	      An implementation of the condition extending AbstractRutaCondition.

-	    </para>

-    </listitem>

-    <listitem>

-      <para>

-        An implementation of IRutaConditionExtension, which provides the condition implementation to the engine.

-      </para>

-    </listitem>

-    <listitem>

-      <para>

-        An implementation of IIDEConditionExtension, which provides the condition for the UIMA Ruta Workench.

-      </para>

-    </listitem>

-    </orderedlist>

-    </para>

-    <para>

-      The exemplary project provides implementation of all possible language elements. 

-      This project contains the implementations for the analysis engine and also the implementation 

-      for the UIMA Ruta Workbench, and is therefore an Eclipse plugin (mind the pom file).

-    </para>

-    <para>

-      Concerning the ExampleCondition condition extension, there are four important spots/classes:

-    </para>

-    <para>

-    <orderedlist numeration="arabic">

-    <listitem>

-      <para>

-        ExampleCondition.java provides the implementation of the new condition, which evaluates dates.

-      </para>

-    </listitem>

-    <listitem>

-      <para>

-        ExampleConditionExtension.java provides the extension for the analysis engine. 

-        It knows the name of the condition, its implementation, can create new instances 

-        of that condition, and is able to verbalize the condition for the explanation components.

-      </para>

-    </listitem>

-    <listitem>

-      <para>

-        ExampleConditionIDEExtension provides the syntax check for the editor and the keyword for syntax coloring.

-      </para>

-    </listitem>    

-    <listitem>

-      <para>

-        The plugin.xml defines the extension for the Workbench:

-      </para>

-    </listitem>

-    </orderedlist>

-    <programlisting><![CDATA[<extension point="org.apache.uima.ruta.ide.conditionExtension">

-  <condition

-    class="org.apache.uima.ruta.example.extensions.

-      ExampleConditionIDEExtension"

-    engine="org.apache.uima.ruta.example.extensions.

-      ExampleConditionExtension">

-  </condition>

-</extension>]]></programlisting>

-    </para>

-    <para>

-      If the UIMA Ruta Workbench is not used or the rules are only applied in UIMA pipelines, 

-      only the ExampleCondition and ExampleConditionExtension are needed, and org.apache.uima.ruta.example.extensions.ExampleConditionExtension 

-      needs to be added to the additionalExtensions parameter of your UIMA Ruta analysis engine (descriptor).

-    </para>

-    <para>

-      Adding new conditions using Java projects in the same workspace has not been tested yet, 

-      but at least the Workbench support will be missing due to the inclusion of extensions 

-      using the extension point mechanism of Eclipse.    

-    </para>

-    </section>

-  </section>

-</chapter>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml
deleted file mode 100644
index 718d631..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml
+++ /dev/null
@@ -1,1464 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/tools.ruta/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-<chapter id="ugr.tools.ruta.overview">

-  <title>Apache UIMA Ruta Overview</title>

-  <para>

-   

-  </para>

-  <section id="ugr.tools.ruta.overview.intro">

-    <title>What is Apache UIMA Ruta?</title>

-    <para>

-      Apache UIMA&#8482; Ruta is a rule-based script language supported by Eclipse-based tooling.

-      The language is designed to enable rapid development of text processing applications within UIMA. 

-      A special focus lies on the intuitive and flexible domain specific language for defining 

-      patterns of annotations. Writing rules for information extraction or other text processing 

-      applications is a tedious process. The Eclipse-based tooling for UIMA Ruta, called the Apache UIMA Ruta Workbench,

-      was created to support the user and to facilitate every step when writing UIMA Ruta rules. Both the 

-      Ruta rule language and the UIMA Ruta Workbench integrate smoothly with Apache UIMA.

-    </para>

-  </section>

-  

-  <section id="ugr.tools.ruta.overview.gettingstarted">

-    <title>Getting started</title>

-    <para>

-      This section gives a short roadmap how to read the documentation and gives some recommendations how to 

-      start developing UIMA Ruta-based applications. This documentation assumes that the reader knows about 

-      the core concepts of Apache UIMA. Knowledge of the meaning and usage of the terms <quote>CAS</quote>, 

-      <quote>Feature Structure</quote>, <quote>Annotation</quote>, <quote>Type</quote>, <quote>Type System</quote> 

-      and <quote>Analysis Engine</quote> is required. Please refer to the documentation of Apache UIMA for an introduction.

-    </para>

-    <para>  

-      Unexperienced users that want to learn about UIMA Ruta can start with the next two sections: 

-      <xref linkend="ugr.tools.ruta.overview.coreconcepts"/>

-      gives a short overview of the core ideas and features of the UIMA Ruta language and Workbench. 

-      This section introduces the main concepts of the UIMA Ruta language. It explains how UIMA Ruta rules 

-      are composed and applied, and discusses the advantages of the UIMA Ruta system.

-      The following <xref linkend="ugr.tools.ruta.overview.examples"/> approaches the UIMA Ruta language using a different

-      perspective. Here, the language is introduced by examples. The first example starts with explaining how a simple rule

-      looks like, and each following example extends the syntax or semantics of the UIMA Ruta language. 

-      After the consultation of these two sections, the reader is expected to have gained enough 

-      knowledge to start writing her first UIMA Ruta-based application.

-    </para>  

-    <para>

-      The UIMA Ruta Workbench was created to support the user and to facilitate the development process. It is strongly recommended to 

-      use this Eclipse-based IDE since it, for example, automatically configures the component descriptors and provides editing support like

-      syntax checking. <xref linkend="section.ugr.tools.ruta.workbench.install"/> describes how the UIMA Ruta Workbench is installed.

-      UIMA Ruta rules can also be applied on CAS without using the UIMA Ruta Workbench. 

-      <xref linkend="ugr.tools.ruta.ae.basic.apply"/> contains examples how to execute UIMA Ruta rules in plain java.

-      A good way to get started with UIMA Ruta is to play around with an exemplary UIMA Ruta project, e.g., 

-      <quote>ExampleProject</quote> in the example-projects of the UIMA Ruta source release.

-      This UIMA Ruta project contains some simple rules for processing citation metadata.

-    </para>  

-    <para>    

-      <xref linkend="ugr.tools.ruta.language.language"/> and <xref linkend="ugr.tools.ruta.workbench"/> provide 

-      more detailed descriptions and can be referred to in order to gain knowledge of specific parts 

-      of the UIMA Ruta language or the UIMA Ruta Workbench.    

-    </para>  

-  </section>

-  

-  <section id="ugr.tools.ruta.overview.coreconcepts">

-    <title>Core Concepts</title>

-    <para>

-      The UIMA Ruta language is an imperative rule language extended with scripting elements. A UIMA Ruta rule defines a

-      pattern of annotations with additional conditions. If this pattern applies, then the actions of the rule are performed 

-      on the matched annotations. A rule is composed of a sequence of rule elements and a rule element essentially consist of four parts: 

-      A matching condition, an optional quantifier, a list of conditions and a list of actions.

-      The matching condition is typically a type of an annotation by which the rule element matches on the covered text of one of those annotations.

-      The quantifier specifies, whether it is necessary that the rule element successfully matches and how often the rule element may match.

-      The list of conditions specifies additional constraints that the matched text or annotations need to fulfill. The list of actions defines

-      the consequences of the rule and often creates new annotations or modifies existing annotations. 

-      They are only applied if all rule elements of the rule have successfully matched. Examples for UIMA Ruta rules can be found in 

-      <xref linkend="ugr.tools.ruta.overview.examples"/>.

-    </para>

-    <para>

-      When UIMA Ruta rules are applied on a document, respectively on a CAS, then they are always grouped in a script file. However, a UIMA Ruta

-      script file does not only contain rules, but also other statements. First of all, each script file starts with a package declaration followed by

-      a list of optional imports. Then, common statements like rules, type declarations or blocks build the body and functionality of a script.

-      <xref linkend="ugr.tools.ruta.ae.basic.apply"/> gives an example, how UIMA Ruta scripts can be applied in plain Java.

-      UIMA Ruta script files are naturally organized in UIMA Ruta projects, which is a concept of the UIMA Ruta Workbench. 

-      The structure of a UIMA Ruta project is described in <xref linkend="section.ugr.tools.ruta.workbench.projects"/>

-    </para>

-    <para>

-      The inference of UIMA Ruta rules, that is the approach how the rules are applied, can be described as imperative depth-first matching.

-      In contrast to similar rule-based systems, UIMA Ruta rules are applied in the order they are defined in the script.

-      The imperative execution of the matching rules may have disadvantages, but also many advantages like an increased rate of development or 

-      an easier explanation. The second main property of the UIMA Ruta inference is the depth-first matching. When a rule matches on a pattern of annotations, then

-      an alternative is always tracked until it has matched or failed before the next alternative is considered. The behavior of a rule may change, if 

-      it has already matched on an early alternative and thus has performed an action, which influences some constraints of the rule.

-      Examples, how UIMA Ruta rules are applied, are given in <xref linkend="ugr.tools.ruta.overview.examples"/>.

-    </para>

-    <para>

-      The UIMA Ruta language provides the possibility to approach an annotation problem in different ways. Let us distinguish 

-      some approaches as an example.

-      It is common in the UIMA Ruta language to create many annotations of different types. These annotations are probably not the targeted annotation of the domain,

-      but can be helpful to incrementally approximate the annotation of interest. This enables the user to work <quote>bottom-up</quote> and <quote>top-down</quote>.

-      In the former approach, the rules add incrementally more complex annotations using simple ones until the target annotation can be created.

-      In the latter approach, the rules get more specific while partitioning the document in smaller segments, which result in the targeted annotation, eventually.

-      By using many <quote>helper</quote>-annotations, the engineering task becomes easier and more comprehensive.

-      The UIMA Ruta language provides distinctive language elements for different tasks. There are, for example, actions 

-      that are able to create new annotations, actions that are able to remove annotations and actions that are able to modify the

-      offsets of annotations. This enables, amongst other things, a transformation-based approach. The user starts by creating general rules that are able to

-      annotate most of the text fragments of interest. Then, instead of making these rules more complex by adding more conditions for situations where they fail,

-      additional rules are defined that correct the mistakes of the general rules, e.g., by deleting false positive annotations.

-      <xref linkend="ugr.tools.ruta.overview.examples"/> provides some examples how UIMA Ruta rules can be engineered.

-    </para>

-    <para>

-      To write rules manually is a tedious and error-prone process. The <link linkend="ugr.tools.ruta.workbench">UIMA Ruta Workbench</link>

-      was developed to facilitate writing rules by providing as much tooling support as possible. This includes, for example, syntax checking and auto completion, which

-      make the development less error-prone. The user can annotate documents and use these documents as unit tests for test-driven development or 

-      quality maintenance. Sometimes, it is necessary to debug the rules because they do not match as expected. In this case, the explanation perspective provides views

-      that explain every detail of the matching process. Finally, the UIMA Ruta language can also be used by the tooling, for example, by the <quote>Query</quote> view.

-      Here, UIMA Ruta rules can be used as query statements in order to investigate annotated documents.

-    </para>

-    <para>

-      UIMA Ruta smoothly integrates with Apache UIMA. First of all, the UIMA Ruta rules are applied using a generic Analysis Engine and thus UIMA Ruta scripts can 

-      easily be added to Apache UIMA pipelines. UIMA Ruta also provides the functionality to import and use other UIMA components like Analysis Engines and Type Systems.

-      UIMA Ruta rules can refer to every type defined in an imported type system, and the UIMA Ruta Workbench generates a type system descriptor file containing all 

-      types that were defined in a script file. Any Analysis Engine can be executed by rules as long as their implementation is available in the classpath. Therefore,

-      functionality outsourced in an arbitrary Analysis Engine can be added and used within UIMA Ruta.

-    </para>

-  </section>

-  

-  <section id="ugr.tools.ruta.overview.examples">

-    <title>Learning by Example</title>

-    <para>

-      This section gives an introduction to the UIMA Ruta language by explaining the rule syntax 

-      and inference with some simplified examples. It is recommended to use the UIMA Ruta Workbench to write UIMA Ruta rules

-      in order to gain advantages like syntax checking. A short description how to install the UIMA Ruta Workbench 

-      is given <link linkend="section.ugr.tools.ruta.workbench.install">here</link>. The following examples make use of the 

-      annotations added by the default seeding of the UIMA Ruta Analysis Engine. Their meaning is explained along with the examples. 

-    </para>

-    <para>

-      The first example consists of a declaration of a type followed by a simple rule. Type declarations always start with the keyword 

-      <quote>DECLARE</quote> followed by the short name of the new type. The namespace of the type is equal to the package declaration of the script file.

-      If there is no package declaration, then the types declared in the script file have no namespace.

-      There is also the possibility to create more complex types with features or specific parent types, but this will be neglected for now.

-      In the example, a simple annotation type with the short name <quote>Animal</quote> is defined.

-      After the declaration of the type, a rule with one rule element is given. 

-      UIMA Ruta rules in general can consist of a sequence of rule elements. Simple rule elements themselves consist of four parts: A matching condition,

-      an optional quantifier, an optional list of conditions and an optional list of actions. The rule element in the 

-      following example has a matching condition <quote>W</quote>, an annotation type standing for normal words. 

-      Statements like declarations and rules always end with a semicolon. 

-    </para>

-    

-    <programlisting><![CDATA[DECLARE Animal;

-W{REGEXP("dog") -> MARK(Animal)};]]></programlisting>

-

-    <para>

-      The rule element also contains one condition and one action, both surrounded by curly parentheses. In order to distinguish conditions from actions

-      they are separated by <quote>-></quote>. The condition <quote>REGEXP("dog")</quote> indicates that the matched 

-      word must match the regular expression <quote>dog</quote>. If the matching condition and the additional regular expression are fulfilled, then the action

-      is executed, which creates a new annotation of the type <quote>Animal</quote> with the same offsets as the matched token.

-      The default seeder does actually not add annotations of the type <quote>W</quote>, but annotations of the types <quote>SW</quote> and 

-      <quote>CW</quote> for small written words and capitalized words, which both have the parent type <quote>W</quote>.

-    </para>

-    

-    <para>

-      There is also the possibility to add implicit actions and conditions, which have no explicit name, but consist only of an expression.

-      In the part of the conditions, boolean expressions and feature match expression can be applied, and in the part of the actions,

-      type expressions and feature assignment expression can be added. The following example contains one implicit condition and one implicit action.

-      The additional condition is a boolean expression (boolean variable), which is set to <quote>true</quote>, and therefore is always fulfills the condition.

-      The <quote>MARK</quote> action was replaced by a type expression, which refer to the type <quote>Animal</quote>. The following rule shows, therefore,

-      the same behavior as the rule in the last example.

-    </para>

-    

-    <programlisting><![CDATA[DECLARE Animal;

-BOOLEAN active = true;

-W{REGEXP("dog"), active -> Animal};]]></programlisting>

-    

-    <para>

-      There is also a special kind of rules, which follow a different syntax and semantic, and enables a simplified creation of annotations based on regular expression.

-      The following rule, for example, creates an <quote>Animal</quote> annotation for each occurrence of <quote>dog</quote> or <quote>cat</quote>.

-    </para>

-    

-    <programlisting><![CDATA[DECLARE Animal;

-"dog|cat" -> Animal;]]></programlisting>

-    

-    <para>

-      Since it is tedious to create Animal annotations by matching on different regular expression, we apply an external dictionary in the next example.

-      The first line defines a word list named <quote>AnimalsList</quote>, which is located in the resource folder (the file <quote>Animals.txt</quote> 

-      contains one animal name in each line). After the declaration of the type, a rule uses this word list to find all occurrences of animals

-      in the complete document.

-    </para>

-

-    <programlisting><![CDATA[WORDLIST AnimalsList = 'Animals.txt;'

-DECLARE Animal;

-Document{-> MARKFAST(Animal, AnimalsList)};

-]]></programlisting>

-    

-    <para>

-      The matching condition of the rule element refers to the complete document, or more specific to the annotation of the type 

-      <quote>DocumentAnnotation</quote>, which covers the whole document.

-      The action <quote>MARKFAST</quote> of this rule element creates an annotation of the type <quote>Animal</quote> for each found

-      entry of the dictionary <quote>AnimalsList</quote>.

-    </para>

-    

-    <para>

-      The next example introduces rules with more than one rule element, whereby one of them is a composed rule element. The following rule tries to

-      annotate occurrences of animals separated by commas, e.g., <quote>dog, cat, bird</quote>. 

-    </para>

-    

-    <programlisting><![CDATA[DECLARE AnimalEnum;

-(Animal COMMA)+{-> MARK(AnimalEnum,1,2)} Animal;]]></programlisting>

-    

-    <para>

-      The rule consists of two rule elements, with <quote>(Animal COMMA)+{-> MARK(AnimalEnum,1,2)}</quote> being the first rule element and 

-      <quote>Animal</quote> the second one. Let us take a closer look at the first rule element. This rule element is actually composed of two normal rule elements, 

-      that are <quote>Animal</quote> and <quote>COMMA</quote>, and contains a greedy quantifier and one action. This rule element, therefore, matches on 

-      one Animal annotation and a following comma. This is repeated until one of the inner rule elements does not match anymore. Then, there has to be

-      another Animal annotation afterwards, specified by the second rule element of the rule. In this case, the rule matches and its action is executed:

-      The MARK action creates a new annotation of the type <quote>AnimalEnum</quote>. However, in contrast to the previous examples, this action also

-      contains two numbers. These numbers refer to the rule elements that should be used to calculate the span of the created annotation. The numbers 

-      <quote>1, 2</quote> state that the new annotation should start with the first rule element, the composed one, and should end with the second rule element.

-    </para>

-

-    <para>

-      Let us make the composed rule element more complex. The following rule also matches on lists of animals, which are

-      separated by semicolon. A disjunctive rule element is therefore added, indicated by the symbol <quote>|</quote>, which matches on

-      annotations of the type <quote>COMMA</quote> or <quote>SEMICOLON</quote>.

-    </para>

-    <programlisting><![CDATA[(Animal (COMMA | SEMICOLON))+{-> MARK(AnimalEnum,1,2)} Animal;]]></programlisting>

-

-    <para>

-      There two more special symbols that can be used to link rule elements. If the symbol <quote>|</quote> is replaced by the

-      symbol <quote><![CDATA[&]]></quote> in the last example, then the token after the animal need to be a comma and a semicolon, which is of course not possible.

-      Another symbol with a special meaning is <quote>%</quote>, which cannot only be used within a composed rule element (parentheses).

-      This symbol can be interpreted as a global <quote>and</quote>: It links several rules, which only fire, if all rules have successfully matched. 

-      In the following example, an annotation of the type <quote>FoundIt</quote> is created, if the document contains two periods in a row and two commas in a row:

-    </para>

-    

-    <programlisting><![CDATA[PERIOD PERIOD % COMMA COMMA{-> FoundIt};]]></programlisting>

-

-

-    <para>

-      There is a <quote>wild card</quote> rule element, which can be used to skip some text or annotations until the next rule element is able to match.

-    </para>

-    

-    <programlisting><![CDATA[DECLARE Sentence;

-PERIOD #{-> MARK(Sentence)} PERIOD;]]></programlisting>

-    

-    <para>

-      This rule annotates everything between two <quote>PERIOD</quote> annotations with the type <quote>Sentence</quote>. Please note that the resulting 

-      annotations is automatically trimmed using the current filtering settings.

-    </para>

-

-    <para>

-      Rule elements can contain more then one condition. The rule in the next example tries to identify headlines, which are bold, 

-      underlined and end with a colon.

-    </para>

-

-    <programlisting><![CDATA[DECLARE Headline;

-Paragraph{CONTAINS(Bold, 90, 100, true), 

-    CONTAINS(Underlined, 90, 100, true), ENDSWITH(COLON) 

-    -> MARK(Headline)};]]></programlisting>

-    

-    <para>

-      The matching condition of this rule element is given with the type <quote>Paragraph</quote>, thus the rule takes a look at all Paragraph annotations.

-      The rule matches only if the three conditions, separated by commas, are fulfilled. The first condition <quote>CONTAINS(Bold, 90, 100, true)</quote> states that

-      90%-100% of the matched paragraph annotation should also be annotated with annotations of the type <quote>Bold</quote>. The boolean parameter <quote>true</quote>

-      indicates that amount of Bold annotations should be calculated relatively to the matched annotation. The two numbers <quote>90,100</quote> are, therefore, interpreted as

-      percent amounts. The exact calculation of the coverage is dependent on the tokenization of the document and is neglected for now. The second condition 

-      <quote>CONTAINS(Underlined, 90, 100, true)</quote> consequently states that the paragraph should also contain at least 90% of annotations of the type <quote>underlined</quote>.

-      The third condition <quote>ENDSWITH(COLON)</quote> finally forces the Paragraph annotation to end with a colon. It is only fulfilled, if there is an annotation of the type

-      <quote>COLON</quote>, which has an end offset equal to the end offset of the matched Paragraph annotation.

-    </para>

-    

-    <para>

-      The readability and maintenance of rules does not increase, if more conditions are added.

-      One of the strengths of the UIMA Ruta language is that it provides different approaches to solve an annotation task. The next two examples 

-      introduce actions for transformation-based rules.  

-    </para>

-    

-    <programlisting><![CDATA[Headline{-CONTAINS(W) -> UNMARK(Headline)};]]></programlisting>

-    

-    <para>

-      This rule consists of one condition and one action. The condition <quote>-CONTAINS(W)</quote> is negated (indicated by the character <quote>-</quote>), 

-      and is therefore only fulfilled, if there are no annotations of the type <quote>W</quote> within the bound of the matched Headline annotation.

-      The action <quote>UNMARK(Headline)</quote> removes the matched Headline annotation. Put into simple words, headlines that contain no words at all are not headlines.

-    </para>

-    

-    <para>

-      The next rule does not remove an annotation, but changes its offsets dependent on the context.

-    </para>

-    

-    <programlisting><![CDATA[]]>Headline{-> SHIFT(Headline, 1, 2)} COLON;</programlisting>

-    

-    <para>

-      Here, the action <quote>SHIFT(Headline, 1, 2)</quote> expands the matched Headline annotation to the next colon, if that Headline annotation

-      is followed by a COLON annotation.

-    </para>

-    

-    <para>

-      UIMA Ruta rules can contain arbitrary conditions and actions, which is illustrated by the next example.

-    </para>

-    

-    <programlisting><![CDATA[DECLARE Month, Year, Date;

-ANY{INLIST(MonthsList) -> MARK(Month), MARK(Date,1,3)}

-    PERIOD? NUM{REGEXP(".{2,4}") -> MARK(Year))};]]></programlisting>

-

-    <para>

-      This rule consists of three rule elements. The first one matches on every token, which has a covered text that occurs in a word lists named <quote>MonthsList</quote>.

-      The second rule element is optional and does not need to be fulfilled, which is indicated by the quantifier <quote>?</quote>. The last rule element matches

-      on numbers that fulfill the regular expression <quote>REGEXP(".{2,4}"</quote> and are therefore at least two characters to a maximum of four characters long.

-      If this rule successfully matches on a text passage, then its three actions are executed: An annotation of the type <quote>Month</quote> is created for the first rule element,

-      an annotation of the type <quote>Year</quote> is created for the last rule element and an annotation of the type <quote>Date</quote> 

-      is created for the span of all three rule elements. If the word list contains the correct entries, then this rule matches on strings like 

-      <quote>Dec. 2004</quote>, <quote>July 85</quote> or <quote>11.2008</quote> and creates the corresponding annotations.

-    </para>

-

-    <para>

-      After introducing the composition of rule elements, the default matching strategy is examined. The two rules in the next example create an annotation

-      for a sequence of arbitrary tokens with the only difference of one condition.

-    </para>

-

-    <programlisting><![CDATA[DECLARE Text1, Text2;

-ANY+{ -> MARK(Text1)};

-ANY+{-PARTOF(Text2) -> MARK(Text2)};]]></programlisting>

-

-    <para>

-      The first rule matches on each occurrence of an arbitrary token and continues this until the end of the document is reached. 

-      This is caused by the greedy quantifier <quote>+</quote>. Note that this rule considers each occurrence of a token and is therefore

-      executed for each token resulting many overlapping annotations. This behavior is illustrated with an example:

-      When applied on the document <quote>Peter works for Frank</quote>, the rule creates four annotations with the covered texts 

-      <quote>Peter works for Frank</quote>, <quote>works for Frank</quote>, <quote>for Frank</quote> and <quote>Frank</quote>.

-      The rule first tries to match on the token <quote>Peter</quote> and continues its matching. Then, it tries to match on the token <quote>works</quote> and

-      continues its matching, and so on.

-    </para>

-    <para>

-      In this example, the second rule only returns one annotation, which covers the complete document. This is caused by the additional

-      condition <quote>-PARTOF(Text2)</quote>. The PARTOF condition is fulfilled, if the matched annotation is located within an annotation of the given type, or

-      put in simple words, if the matched annotation is part of an annotation of the type <quote>Text2</quote>. When applied on the 

-      document <quote>Peter works for Frank</quote>, the rule matches on the first token <quote>Peter</quote>, continues its match and 

-      creates an annotation of the type <quote>Text2</quote> for the complete document. Then it tries to match on the second token <quote>works</quote>, but fails, 

-      because this token is already part of an Text2 annotation.

-    </para>

-    

-    <para>

-      UIMA Ruta rules can not only be used to create or modify annotations, but also to create features for annotations. The next example defines 

-      and assigns a relation of employment, by storing the given annotations as feature values.

-    </para>

-    

-    <programlisting><![CDATA[DECLARE Annotation EmplRelation 

-    (Employee employeeRef, Employer employerRef);

-Sentence{CONTAINS(EmploymentIndicator) -> CREATE(EmplRelation,

-    "employeeRef" = Employee, "employerRef" = Employer)};]]></programlisting>

-

-    <para>

-      UIMA Ruta rules can not only be used to create or modify annotations, but also to create features for annotations. The next example defines 

-      and assigns a relation of employment, by storing the given annotations as feature values.

-    </para>

-

-    <para>

-      The first statement of this example is a declaration that defines a new type of annotation named <quote>EmplRelation</quote>. 

-      This annotation has two features: 

-      One feature with the name <quote>employeeRef</quote> of the type <quote>Employee</quote> and 

-      one feature with the name <quote>employerRef</quote> of the type <quote>Employer</quote>.

-      If the parent type is Annotation, then it can be omitted resulting in the following declaration:

-      <programlisting><![CDATA[DECLARE EmplRelation (Employee employeeRef, Employer employerRef);]]></programlisting>

-      The second statement of the example, which is a simple rule, creates one annotation of the type <quote>EmplRelation</quote> for

-      each Sentence annotation that contains at least one annotation of the type <quote>EmploymentIndicator</quote>. Additionally to creating an annotation,

-      the CREATE action also assigns an annotation of the <quote>Employee</quote>, which needs to be located within the span of the matched sentence, 

-      to the feature <quote>employeeRef</quote> and an Employer annotation to the feature <quote>employerRef</quote>. The annotations mentioned in this 

-      example need to be present in advance.

-    </para>

-

-    <para>

-      In the last example, the values of features were defined as annotation types. However, also primitive 

-      types can be used, as will be shown in the next example, together with a short introduction of variables.

-    </para>

-

-    <programlisting><![CDATA[DECLARE Annotation MoneyAmount(STRING currency, INT amount);

-INT moneyAmount;

-STRING moneyCurrency;

-NUM{PARSE(moneyAmount)} SPECIAL{REGEXP("€") -> MATCHEDTEXT(moneyCurrency),

-    CREATE(MoneyAmount, 1, 2, "amount" = moneyAmount,

-        "currency" = moneyCurrency)};]]></programlisting>

-    

-    <para>

-      First, a new annotation with the name <quote>MoneyAmount</quote> and two features are defined, one string feature and one integer feature.

-      Then, two UIMA Ruta variables are declared, one integer variable and one string variable. The rule matches on a number, whose value is stored 

-      in the variable <quote>moneyAmount</quote>, followed by a special token that needs to be equal to the string <quote>€</quote>. Then,

-      the covered text of the special annotation is stored in the string variable <quote>moneyCurrency</quote> and annotation of the

-      type <quote>MoneyAmount</quote> spanning over both rule elements is created. Additionally, the variables are assigned as feature values.

-    </para>

-

-    <para>

-      Using feature expression for conditions and action, can reduce the complexity of a rule. The first rule in the following example set the value of the feature

-      <quote>currency</quote> of the annotation of the type <quote>MoneyAmount</quote> to <quote>Euro</quote>, if it was <quote>€</quote> before.

-      The second rule creates an annotation of the type <quote>LessThan</quote> for all annotations of the type <quote>MoneyAmount</quote>, 

-      if their amount is less than 100 and the currency is <quote>Euro</quote>. 

-    </para>

-    

-    <programlisting><![CDATA[DECLARE LessThan;

-MoneyAmount.currency=="€"{-> MoneyAmount.currency="Euro"};

-MoneyAmount{(MoneyAmount.amount<=100), 

-    MoneyAmount.currency=="Euro" -> LessThan};]]></programlisting>

-

-    <para>

-      UIMA Ruta script files with many rules can quickly confuse the reader. The UIMA Ruta language, therefore, allows to import other script files in order to increase

-      the modularity of a project or to create rule libraries. The next example imports the rules together with all known types of another script file 

-      and executes that script file.

-    </para>

-

-    <programlisting><![CDATA[SCRIPT uima.ruta.example.SecondaryScript;

-Document{-> CALL(SecondaryScript)};]]></programlisting>

-

-    <para>

-      The script file with the name <quote>SecondaryScript.ruta</quote>, which is located in the package <quote>uima/ruta/example</quote>, is imported and executed

-      by the CALL action on the complete document. The script needs to be located in the folder specified by the parameter 

-      <link linkend="ugr.tools.ruta.ae.basic.parameter.scriptPaths">scriptPaths</link>, or in a coresponding packgae in the classpath. It is also possible to import script files of other UIMA Ruta projects, e.g.,

-      by adapting the configuration parameters of the UIMA Ruta Analysis Engine or 

-      by setting a project reference in the project properties of a UIMA Ruta project.

-    </para>

-

-    <para>

-      For simple rules that match on the complete document and only specify actions, a simplified syntax exists that omits the matching parts:

-    </para>

-    

-    <programlisting><![CDATA[SCRIPT uima.ruta.example.SecondaryScript;

-CALL(SecondaryScript);]]></programlisting>

-

-    <para>

-      The types of important annotations of the application are often defined in a separate type system. The next example shows how to import those types.

-    </para>

-

-    <programlisting><![CDATA[TYPESYSTEM my.package.NamedEntityTypeSystem;

-Person{PARTOF(Organization) -> UNMARK(Person)};

-]]></programlisting>

-

-    <para>

-      The type system descriptor file with the name <quote>NamedEntityTypeSystem.xml</quote> located in the package <quote>my/package</quote> is imported.

-      The descriptor needs to be located in a folder specified by the parameter 

-      <link linkend="ugr.tools.ruta.ae.basic.parameter.descriptorPaths">descriptorPaths</link>.

-    </para>

-

-

-    <para>

-      It is sometimes easier to express functionality with control structures known by programming languages rather than to engineer all functionality 

-      only with matching rules. The UIMA Ruta language provides the BLOCK element for some of these use cases. 

-      The UIMA Ruta BLOCK element starts with the keyword <quote>BLOCK</quote> followed by its name in parentheses. The name of a block has two purposes:

-      On the one hand, it is easier to distinguish the block, if they have different names, e.g., in the 

-      <link linkend="section.ugr.tools.ruta.workbench.explain_perspective">explain perspective</link> of the UIMA Ruta Workbench. On the other hand,

-      the name can be used to execute this block using the CALL action. Hereby, it is possible to access only specific sets of rules of other script files, 

-      or to implement a recursive call of rules. After the name of the block, a single rule element is given, which has curly parentheses, 

-      even if no conditions or actions are specified. Then, the body of the block is framed by curly brackets.

-    </para>

-

-    <programlisting><![CDATA[BLOCK(English) Document{FEATURE("language", "en")} {

-    // rules for english documents

-}

-BLOCK(German) Document{FEATURE("language", "de")} {

-    // rules for german documents

-}]]></programlisting>

-

-    <para>

-      This example contains two simple BLOCK statements. The rules defined within the block are only executed, if the condition in the head of the block is fulfilled.

-      The rules of the first block are only considered if the feature <quote>language</quote> of the document annotation has the value <quote>en</quote>.

-      Following this, the rules of the second block are only considered for German documents.

-    </para>

-

-    <para>

-      The rule element of the block definition can also refer to other annotation types than <quote>Document</quote>. While the last example implemented something similar 

-      to an if-statement, the next example provides a show case for something similar to a for-each-statement.

-    </para>

-

-    <programlisting><![CDATA[DECLARE SentenceWithNoLeadingNP;

-BLOCK(ForEach) Sentence{} {

-    Document{-STARTSWITH(NP) -> MARK(SentenceWithNoLeadingNP)};

-}

-]]></programlisting>

-    

-    <para>

-      Here, the rule in the block statement is performed for each occurrence of an annotation of the type <quote>Sentence</quote>. 

-      The rule within the block matches on the complete document, which is the current sentence in the context of the block statement. 

-      As a consequence, this example creates an annotation of the type <quote>SentenceWithNoLeadingNP</quote> for each sentence 

-      that does not start with a NP annotation.

-    </para>

-

-    <para>

-      There are two more language constructs (<quote><![CDATA[->]]></quote> and <quote><![CDATA[<-]]></quote>) that allow to apply rules within a certain context. These rules are added to an arbitrary rule element 

-      and are called inlined rules. The first example interprets the inlined rules as actions. They are executed if the surrounding rule was able to match, 

-      which makes this one very similar to the block statement.

-    </para>

-

-    <programlisting><![CDATA[DECLARE SentenceWithNoLeadingNP;

-Sentence{}->{

-    Document{-STARTSWITH(NP) -> SentenceWithNoLeadingNP};

-};

-]]></programlisting>

-

-    <para>

-      The second one (<quote><![CDATA[<-]]></quote>) interprets the inlined rules as conditions. The surrounding rule can only match if at least one inlined rule was successfully applied.

-      In the following example, a sentence is annotated with the type SentenceWithNPNP, if there are two successive NP annotations within this sentence.

-    </para>

-    <programlisting><![CDATA[DECLARE SentenceWithNPNP;

-Sentence{-> SentenceWithNPNP}<-{

-    NP NP;

-};

-]]></programlisting>

-    <para>

-      Let us take a closer look on what exactly the UIMA Ruta rules match. The following rule matches on a word followed by another word:

-    </para>

-    <programlisting><![CDATA[W W;]]></programlisting>

-    

-    <para>

-      To be more precise, this rule matches on all documents like <quote>Apache UIMA</quote>, <quote>Apache     UIMA</quote>, <quote>ApacheUIMA</quote>,

-      <quote><![CDATA[Apache <b>UIMA</b>]]></quote>. There are two main reasons for this: First of all, it depends on how the available annotations are defined. The default seeder

-      for the initial annotations creates an annotation for all characters until an upper case character occurs. Thus, the string <quote>ApacheUIMA</quote> consists of 

-      two tokens.

-      However, more important, the UIMA Ruta language provides a concept of visibility of the annotations. By default, all annotations of the types 

-      <quote>SPACE</quote>, <quote>NBSP</quote>, <quote>BREAK</quote> and <quote>MARKUP</quote> (whitespace and XML elements) are filtered and not visible. This holds of course for

-      their covered text, too. The rule elements skip all positions of the

-      document where those annotations occur. The rule in the last example matches on all examples. Without the default filtering settings, 

-      with all annotations set to visible, the rule matches only on the document <quote>ApacheUIMA</quote> since it is the only one that contains two word annotations without

-      any whitespace between them. 

-    </para>

-    

-    <para>

-      The filtering setting can also be modified by the UIMA Ruta rules themselves. The next example provides rules that extend and limit 

-      the amount of visible text of the document.

-    </para>

-    

-    <programlisting><![CDATA[Sentence;

-Document{-> RETAINTYPE(SPACE)};

-Sentence;

-Document{-> FILTERTYPE(CW)};

-Sentence;

-Document{-> RETAINTYPE, FILTERTYPE};]]></programlisting>

-

-    <para>

-      The first rule matches on sentences, which do not start with any filtered type. Sentences that start with whitespace or markup, 

-      for example, are not considered. 

-      The next rule retains all text that is covered by annotations of the type <quote>SPACE</quote> meaning 

-      that the rule elements are now sensible to whitespaces. The following rule will, therefore, match on sentences that start with whitespaces.

-      The third rule now filters the type <quote>CW</quote> with the consequence that all capitalized words are invisible.

-      If the following rule now wants to match on sentences, then this is only possible for Sentence annotations that do not start with a capitalized word.

-      The last rule finally resets the filtering setting to the default configuration in the UIMA Ruta Analysis Engine.

-    </para>

-    

-    <para>

-      The next example gives a showcase for importing external Analysis Engines and for modifying the documents by creating a new view called <quote>modified</quote>.

-      Additional Analysis Engines can be imported with the keyword <quote>ENGINE</quote> followed by the name of the descriptor. These imported Analysis Engines can be 

-      executed with the actions <quote>CALL</quote> or <quote>EXEC</quote>. If the executed Analysis Engine adds, removes or modifies annotations, then their types need 

-      to be mentioned when calling the descriptor, or else these annotations will not be correctly processed by the following UIMA Ruta rules.

-    </para>

-

-    <programlisting><![CDATA[ENGINE utils.Modifier;

-Date{-> DEL};

-MoneyAmount{-> REPLACE("<MoneyAmount/>")};

-Document{-> COLOR(Headline, "green")};

-Document{-> EXEC(Modifier)};

-]]></programlisting>

-

-  <para>

-    In this example, we first import an Analysis Engine defined by the descriptor <quote>Modifier.xml</quote> located in the folder <quote>utils</quote>. 

-    The descriptor needs to be located in the folder specified by the parameter <link linkend="ugr.tools.ruta.ae.basic.parameter.descriptorPaths">descriptorPaths</link>.

-    The first rule deletes all text covered by annotations of the type <quote>Date</quote>. The second rule replaces the text of all annotations of the type <quote>MoneyAmount</quote> 

-    with the string <quote><![CDATA[<MoneyAmount/>]]></quote>. The third rule remembers to set the background color of text in Headline annotation to green. The last rule

-    finally performs all of these changes in an additional view called <quote>modified</quote>, which is specified in the configuration parameters of the analysis engine.

-    <xref linkend="ugr.tools.ruta.ae.modifier"/> and <xref linkend="ugr.tools.ruta.language.modification"/> provide a more detailed description.

-  </para>

-  

-  <para>

-    In the last example, a descriptor file was loaded in order to import and apply an external analysis engine. Analysis engines can also be loaded using uimaFIT, 

-    whereas the given class name has to be present in the classpath. In the UIMA Ruta Workbench, you can add a dependency to a java project, which contains the 

-    implementation, to the UIMA Ruta project. If the UIMA Ruta script is applied in a UIMA Pipeline, then the configuration parameter 

-    <link linkend="ugr.tools.ruta.ae.basic.parameter.additionalUimafitEngines">additionalUimafitEngines</link> has to list the class of the analysis engine. 

-    The following example loads an analysis engine without an descriptor and applies it on the document. The additional list of types states that

-    the annotations of those types created by the analysis engine should be available to the following Ruta rules.

-    

-  </para>

-      <programlisting><![CDATA[UIMAFIT my.package.impl.MyAnalysisEngine;

-Document{-> EXEC(MyAnalysisEngine, {MyType1, MyType2})};

-]]></programlisting>

-  

-  </section>

-  

-  <section id="ugr.tools.ruta.ae">

-    <title>UIMA Analysis Engines</title>

-    <para>This section gives an overview of the UIMA Analysis Engines shipped with UIMA Ruta. The most 

-      important one is <quote>RutaEngine</quote>, a generic analysis engine, which is able to interpret 

-      and execute script files. The other analysis engines provide support for some additional functionality or

-      add certain types of annotations.

-    </para>

-    <section id="ugr.tools.ruta.ae.basic">

-      <title>Ruta Engine</title>

-      <para>

-         This generic Analysis Engine is the most important one for the UIMA Ruta language since it is

-         responsible for applying the UIMA Ruta rules on a CAS. Its functionality is configured by the configuration parameters, 

-         which, for example, specify the rule file that should be executed. In the UIMA Ruta Workbench, a basic template named <quote>BasicEngine.xml</quote>

-         is given in the descriptor folder of a UIMA Ruta project and correctly configured descriptors typically named <quote>MyScriptEngine.xml</quote>

-         are generated in the descriptor folder corresponding to the package namespace of the script file.

-         The available configuration parameters of the UIMA Ruta Analysis Engine are described in the following.   

-      </para>

-      

-      <section id="ugr.tools.ruta.ae.basic.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-          The configuration parameters of the UIMA Ruta Analysis Engine can be subdivided into three

-          different groups: parameters for the setup of the environment (<link linkend='ugr.tools.ruta.ae.basic.parameter.mainScript'>mainScript</link>

-          to <link linkend='ugr.tools.ruta.ae.basic.parameter.additionalExtensions'>additionalExtensions</link>), 

-          parameters that change the behavior of the analysis engine (<link linkend='ugr.tools.ruta.ae.basic.parameter.reloadScript'>reloadScript</link>

-          to <link linkend='ugr.tools.ruta.ae.basic.parameter.simpleGreedyForComposed'>simpleGreedyForComposed</link>) 

-          and parameters for creating additional information how the rules were executed 

-          (<link linkend='ugr.tools.ruta.ae.basic.parameter.debug'>debug</link>

-          to <link linkend='ugr.tools.ruta.ae.basic.parameter.createdBy'>createdBy</link>). First, a short overview of the configuration parameters is given in

-          <xref linkend='table.ugr.tools.ruta.ae.parameter' />. Afterwards, all parameters are described in detail with examples.

-        </para>

-        <para>

-          To change the value of any configuration parameter within a UIMA Ruta script, the CONFIGURE action (see <xref linkend='ugr.tools.ruta.language.actions.configure' />)

-          can be used. For changing behavior of <link linkend='ugr.tools.ruta.ae.basic.parameter.dynamicAnchoring'>dynamicAnchoring</link> the DYNAMICANCHORING action 

-          (see <xref linkend='ugr.tools.ruta.language.actions.dynamicanchoring' />) is recommended.

-        </para>

-        <para>

-          <table id="table.ugr.tools.ruta.ae.parameter" frame="all">

-            <title>Configuration parameters of the UIMA Ruta Analysis Engine   </title>

-            <tgroup cols="3" colsep="1" rowsep="1">

-              <colspec colname="c1" colwidth="1.2*" />

-              <colspec colname="c2" colwidth="2*" />

-              <colspec colname="c3" colwidth="0.8*" />

-              <thead>

-                <row>

-                  <entry align="center">Name</entry>

-                  <entry align="center">Short description</entry>

-                  <entry align="center">Type</entry>

-                </row>

-              </thead>

-              <tbody>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.mainScript'>mainScript</link>

-                  </entry>

-                  <entry>Name with complete namespace of the script which will be interpreted and

-                    executed by the analysis engine.

-                  </entry>

-                  <entry>Single String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.rules'>rules</link>

-                  </entry>

-                  <entry>Script (list of rules) to be applied.

-                  </entry>

-                  <entry>Single String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.scriptEncoding'>scriptEncoding</link>

-                  </entry>

-                  <entry>Encoding of all UIMA Ruta script files.</entry>

-                  <entry>Single String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.scriptPaths'>scriptPaths</link>

-                  </entry>

-                  <entry>List of absolute locations, which contain the necessary script files like

-                    the main script.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.descriptorPaths'>descriptorPaths</link>

-                  </entry>

-                  <entry>List of absolute locations, which contain the necessary descriptor files

-                    like type systems.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.resourcePaths'>resourcePaths</link>

-                  </entry>

-                  <entry>List of absolute locations, which contain the necessary resource files like

-                    word lists.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.additionalScripts'>additionalScripts</link>

-                  </entry>

-                  <entry>List of names with complete namespace of additional scripts, which can be

-                    referred to.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.additionalEngines'>additionalEngines</link>

-                  </entry>

-                  <entry>List of names with complete namespace of additional analysis engines, which

-                    can be called by UIMA Ruta rules.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.additionalUimafitEngines'>additionalUimafitEngines</link>

-                  </entry>

-                  <entry>List of class names with complete namespace of additional uimaFIT analysis engines, which

-                    can be called by UIMA Ruta rules.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.additionalEngineLoaders'>additionalEngineLoaders</link>

-                  </entry>

-                  <entry>List of class names of implementations that are able to perform additional

-                    task when loading external analysis engines.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.additionalExtensions'>additionalExtensions</link>

-                  </entry>

-                  <entry>List of factory classes for additional extensions of the UIMA Ruta language

-                    like proprietary conditions.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.reloadScript'>reloadScript</link>

-                  </entry>

-                  <entry>Option to initialize the rule script each time the analysis engine processes

-                    a CAS.

-                  </entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.seeders'>seeders</link>

-                  </entry>

-                  <entry>List of class names that provide additional annotations before the rules are

-                    executed.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.defaultFilteredTypes'>defaultFilteredTypes</link>

-                  </entry>

-                  <entry>List of complete type names of annotations that are invisible by default.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.removeBasics'>removeBasics</link>

-                  </entry>

-                  <entry>Option to remove all inference annotations after execution of the rule script.

-                  </entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.strictImports'>strictImports</link>

-                  </entry>

-                  <entry>Option to restrict short type names resolution to those in the declared typesystems.

-                  </entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.dynamicAnchoring'>dynamicAnchoring</link>

-                  </entry>

-                  <entry>Option to allow rule matches to start at any rule element.</entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.lowMemoryProfile'>lowMemoryProfile</link>

-                  </entry>

-                  <entry>Option to decrease the memory consumption when processing a large CAS.</entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.simpleGreedyForComposed'>simpleGreedyForComposed</link>

-                  </entry>

-                  <entry>Option to activate a different inferencer for composed rule elements.</entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.debug'>debug</link>

-                  </entry>

-                  <entry>Option to add debug information to the CAS.</entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.debugWithMatches'>debugWithMatches</link>

-                  </entry>

-                  <entry>Option to add information about the rule matches to the CAS.</entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.debugOnlyFor'>debugOnlyFor</link>

-                  </entry>

-                  <entry>List of rule ids. If provided, then debug information is only created for

-                    those rules.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.profile'>profile</link>

-                  </entry>

-                  <entry>Option to add profile information to the CAS.</entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.statistics'>statistics</link>

-                  </entry>

-                  <entry>Option to add statistics of conditions and actions to the CAS.</entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.createdBy'>createdBy</link>

-                  </entry>

-                  <entry>Option to add additional information, which rule created an annotation.

-                  </entry>

-                  <entry>Single Boolean</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.varNames'>varNames</link>

-                  </entry>

-                  <entry>String array with names of variables. Is used in combination with varValues.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-                <row>

-                  <entry>

-                    <link linkend='ugr.tools.ruta.ae.basic.parameter.varValues'>varValues</link>

-                  </entry>

-                  <entry>String array with values of variables. Is used in combination with varNames.

-                  </entry>

-                  <entry>Multi String</entry>

-                </row>

-              </tbody>

-            </tgroup>

-          </table>

-        </para>

-        <section id="ugr.tools.ruta.ae.basic.parameter.mainScript">

-          <title>mainScript</title>

-          <para>

-            This parameter specifies the rule file that will be executed by the analysis engine and is,

-            therefore, one of the most important ones. The exact name of the script is given by the complete namespace of the file, which corresponds to its location

-            relative to the given parameter <link linkend='ugr.tools.ruta.ae.basic.parameter.scriptPaths'>scriptPaths</link>.

-            The single names of packages (or folders) are separated by periods. An exemplary value for this parameter could be "org.apache.uima.Main", 

-            whereas "Main" specifies the file containing the rules and "org.apache.uima" its package.

-            In this case, the analysis engine loads the script file "Main.ruta", which is located in the folder structure "org/apache/uima/".

-            This parameter has no default value and has to be provided, although it is not specified as mandatory.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.rules">

-          <title>rules</title>

-          <para>

-          A String parameter representing the rule that should be applied by the analysis engine.

-          If set, it replaces the content of file specified by the <link linkend='ugr.tools.ruta.ae.basic.parameter.mainScript'>mainScript</link> parameter.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.scriptEncoding">

-          <title>scriptEncoding</title>

-          <para>

-            This parameter specifies the encoding of the rule files. Its default value is "UTF-8".

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.scriptPaths">

-          <title>scriptPaths</title>

-          <para>

-            The parameter scriptPaths refers to a list of String values, which specify the possible locations of script files. 

-            The given locations are absolute paths. A typical value for this parameter is, for example, "C:/Ruta/MyProject/script/".

-            If the parameter <link linkend='ugr.tools.ruta.ae.basic.parameter.mainScript'>mainScript</link> is set to org.apache.uima.Main, 

-            then the absolute path of the script file has to be "C:/Ruta/MyProject/script/org/apache/uima/Main.ruta". 

-            This parameter can contain multiple values, as the main script can refer to multiple projects similar to a class path in Java.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.descriptorPaths">

-          <title>descriptorPaths</title>

-          <para>

-            This parameter specifies the possible locations for descriptors like analysis engines or type systems, similar to the parameter

-            <link linkend='ugr.tools.ruta.ae.basic.parameter.scriptPaths'>scriptPaths</link> for the script files. A typical value for this parameter 

-            is for example "C:/Ruta/MyProject/descriptor/".

-            The relative values of the parameter <link linkend='ugr.tools.ruta.ae.basic.parameter.additionalEngines'>additionalEngines</link> are

-            resolved to these absolute locations.

-            This parameter can contain multiple values, as the main script can refer to multiple projects similar to a class path in Java.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.resourcePaths">

-          <title>resourcePaths</title>

-          <para>

-            This parameter specifies the possible locations of additional resources like word lists or CSV tables. The string values have to contain absolute

-            locations, for example, "C:/Ruta/MyProject/resources/".

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.additionalScripts">

-          <title>additionalScripts</title>

-          <para>

-            The parameter additionalScripts is defined as a list of string values and contains script files, which are additionally loaded by the analysis engine. These script files are specified by their 

-            complete namespace, exactly like the value of the parameter <link linkend='ugr.tools.ruta.ae.basic.parameter.mainScript'>mainScript</link> 

-            and can be refered to by language elements, e.g., by executing the containing rules. An exemplary value of this parameter is "org.apache.uima.SecondaryScript". In this example, the main script could import 

-            this script file by the declaration "SCRIPT org.apache.uima.SecondaryScript;" and then could execute it with the rule 

-            "Document{-> CALL(SecondaryScript)};". 

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.additionalEngines">

-          <title>additionalEngines</title>

-          <para>

-            This parameter contains a list of additional analysis engines, which can be executed by the UIMA Ruta rules. The single values

-            are given by the name of the analysis engine with their complete namespace and have to be located relative to one value of the parameter

-            <link linkend='ugr.tools.ruta.ae.basic.parameter.descriptorPaths'>descriptorPaths</link>, the location where the analysis engine searches for the descriptor file.

-            An example for one value of the parameter is "utils.HtmlAnnotator", which points to the descriptor "HtmlAnnotator.xml" in the folder "utils".

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.additionalEngineLoaders">

-          <title>additionalEngineLoaders</title>

-          <para>

-            The parameter "additionalEngineLoaders" specifies a list of optional implementations of the interface 

-            "org.apache.uima.ruta.extensions.IEngineLoader", which can be used to application-specific configurations of

-            additional analysis engines.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.additionalUimafitEngines">

-          <title>additionalUimafitEngines</title>

-          <para>

-            This parameter contains a list of additional analysis engines, which can be executed by the UIMA Ruta rules. The single values

-            are given by the name of the implementation with the complete namespace and have to be present int he classpath of the application.

-            An example for one value of the parameter is "org.apache.uima.ruta.engine.HtmlAnnotator", which points to the "HtmlAnnotator" class.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.additionalExtensions">

-          <title>additionalExtensions</title>

-          <para>

-            This parameter specifies optional extensions of the UIMA Ruta language. The elements of the string list have to implement the interface 

-            "org.apache.uima.ruta.extensions.IRutaExtension". With these extensions, application-specific conditions and actions can be

-            added to the set of provided ones.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.reloadScript">

-          <title>reloadScript</title>

-          <para>

-            This boolean parameter indicates whether the script or resource files should be reloaded when processing a CAS. The default value is set to false. 

-            In this case, the script files are loaded when the analysis engine is initialized. If script files or resource files are extended, e.g., a dictionary is filled

-            yet when a collection of documents are processed, then the parameter is needed to be set to true in order to include the changes.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.seeders">

-          <title>seeders</title>

-          <para>

-            This list of string values refers to implementations of the interface "org.apache.uima.ruta.seed.RutaAnnotationSeeder", 

-            which can be used to automatically add annotations to the CAS. The default value of the parameter is a single seeder, namely "org.apache.uima.ruta.seed.DefaultSeeder"

-            that adds annotations for token classes like CW, MARKUP or SEMICOLON. Remember that additional annotations can also be added with 

-            an additional engine that is executed by a UIMA Ruta rule.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.defaultFilteredTypes">

-          <title>defaultFilteredTypes</title>

-          <para>

-            This parameter specifies a list of types, which are filtered by default when executing a script file. Using the default values of this parameter,

-            whitespaces, line breaks and markup elements are not visible to Ruta rules. The visibility of annotations and, therefore, the covered text can be changed

-            using the actions <link linkend='ugr.tools.ruta.language.actions.filtertype'>FILTERTYPE</link> and 

-            <link linkend='ugr.tools.ruta.language.actions.retaintype'>RETAINTYPE</link>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.removeBasics">

-          <title>removeBasics</title>

-          <para>

-            This parameter specifies whether the inference annotations created by the analysis engine should be removed after processing the CAS.

-            The default value is set to true.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.strictImports">

-          <title>strictImports</title>

-          <para>

-            This parameter specifies whether short type names should be resolved against the typesystems declared in the script (true) or at runtime in the CAS typesystem (false).

-            The default value is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.dynamicAnchoring">

-          <title>dynamicAnchoring</title>

-          <para>

-            If this parameter is set to true, then the Ruta rules are not forced to start to match with the first rule element. 

-            Rather, the rule element referring to the most rare type is chosen. This option can be utilized to optimize the performance.

-            Please mind that the matching result can vary in some cases when greedy rule elements are applied.

-            The default value is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.lowMemoryProfile">

-          <title>lowMemoryProfile</title>

-          <para>

-            This parameter specifies whether the memory consumption should be reduced. This parameter should be set to true for 

-            very large CAS documents (e.g., > 500k tokens), but it also reduces the performance. The default value is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.simpleGreedyForComposed">

-          <title>simpleGreedyForComposed</title>

-          <para>

-            This parameter specifies whether a different inference strategy for composed rule elements should be applied. This option is only necessary 

-            when the composed rule element is expected to match very often, e.g., a rule element like (ANY ANY)+.

-            The default value of this parameter is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.debug">

-          <title>debug</title>

-          <para>

-            If this parameter is set to true, then additional information about the execution of a rule script is added to the CAS.

-            The actual information is specified by the following parameters.

-            The default value of this parameter is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.debugWithMatches">

-          <title>debugWithMatches</title>

-          <para>

-            This parameter specifies whether the match information (covered text) of the rules should be stored in the CAS.

-            The default value of this parameter is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.debugOnlyFor">

-          <title>debugOnlyFor</title>

-          <para>

-            This parameter specifies a list of rule-ids that enumerate the rule for which debug information should be created. 

-            No specific ids are given by default.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.profile">

-          <title>profile</title>

-          <para>

-            If this parameter is set to true, then additional information about the runtime of applied rules is added to the CAS.

-            The default value of this parameter is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.statistics">

-          <title>statistics</title>

-          <para>

-            If this parameter is set to true, then additional information about the runtime of UIMA Ruta language elements like conditions and actions

-            is added to the CAS.

-            The default value of this parameter is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.createdBy">

-          <title>createdBy</title>

-          <para>

-            If this parameter is set to true, then additional information about what annotation was created by which rule is added to the CAS.

-            The default value of this parameter is set to false.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.varNames">

-          <title>varNames</title>

-          <para>

-            This parameter specifies the names of variables and is used in combination with the parameter

-				    varValues, which contains the values of the corresponding variables. The n-th entry of this

-				    string array specifies the variable of the n-th entry of the string array of the parameter

-				    varValues. If the variables is defined in the root of a script, then the name of the variable

-				    suffices. If the variable is defined in a BLOCK or imported script, then the the name must

-				    contain the namespaces of the blocks as a prefix, e.g., InnerBlock.varName or OtherScript.SomeBlock.varName.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.basic.parameter.varValues">

-          <title>varValues</title>

-          <para>

-            This parameter specifies the values of variables as string values in an string array. It is

-				    used in combination with the parameter varNames, which contains the names of the corresponding

-				    variables. The n-th entry of this string array specifies the value of the n-th entry of the

-				    string array of the parameter varNames. Only value of the kinds string, boolean, int, double

-				    and float are allowed.

-          </para>

-        </section>

-      </section>

-    </section>

-    <section id="ugr.tools.ruta.ae.annotationwriter">

-      <title>Annotation Writer</title>

-      <para>

-        This Analysis Engine can be utilized to write the covered text of annotations in a text file, whereas each covered text is put into a new line.

-        If the Analyis engine, for example, is configured for the type <quote>uima.example.Person</quote>, then all covered texts of all Person annotations are stored

-        in a text file, one person in each line.

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

-      </para>

-      <section id="ugr.tools.ruta.ae.annotationwriter.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.annotationwriter.parameter.output">

-          <title>Output</title>

-          <para>

-            This string parameter specifies the absolute path of the resulting file named <quote>output.txt</quote>. However, if an annotation of the 

-            type <quote>org.apache.uima.examples.SourceDocumentInformation</quote> is given, then the value of this parameter is interpreted to be relative

-            to the URI stored in the annotation and the name of the file will be adapted to the name of the source file. If this functionality is activated in the preferences, 

-            then the UIMA Ruta Workbench adds

-            the SourceDocumentInformation annotation when the user launches a script file.

-             The default value of this parameter is <quote>/../output/</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.annotationwriter.parameter.encoding">

-          <title>Encoding</title>

-          <para>

-           This string parameter specifies the encoding of the resulting file. The default value of this parameter is <quote>UTF-8</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.annotationwriter.parameter.type">

-          <title>Type</title>

-          <para>

-            Only the covered texts of annotations of the type specified with this parameter are stored in the resulting file.

-            The default value of this parameter is <quote>uima.tcas.DocumentAnnotation</quote>, which will store the complete document in a new file.

-          </para>

-        </section>

-      </section>

-    </section>

-    <section id="ugr.tools.ruta.ae.plaintext">

-      <title>Plain Text Annotator</title>

-      <para>

-        This Analysis Engines adds annotations for lines and paragraphs.

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project. There are no configuration parameters.

-      </para>

-    </section>

-    <section id="ugr.tools.ruta.ae.modifier">

-      <title>Modifier</title>

-      <para>

-        The Modifier Analysis Engine can be used to create an additional view, which contains all textual modifications and HTML highlightings that

-        were specified by the executed rules. This Analysis Engine can be applied, e.g., 

-        for anonymization where all annotations of persons are replaced by the string <quote>Person</quote>. 

-        Furthermore, the content of the new view can optionally be stored in a new HTML file.

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

-      </para>

-      <section id="ugr.tools.ruta.ae.modifier.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.modifier.parameter.styleMap">

-          <title>styleMap</title>

-          <para>

-            This string parameter specifies the name of the style map file created by the Style Map Creator Analysis Engine, which stores the colors for

-            additional highlightings in the modified view.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.modifier.parameter.descriptorPaths">

-          <title>descriptorPaths</title>

-          <para>

-            This parameter can contain multiple string values and specifies the absolute paths where the style map file can be found.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.modifier.parameter.outputLocation">

-          <title>outputLocation</title>

-          <para>

-            This optional string parameter specifies the absolute path of the resulting file named <quote>output.modified.html</quote>. However, if an annotation of the 

-            type <quote>org.apache.uima.examples.SourceDocumentInformation</quote> is given, then the value of this parameter is interpreted to be relative

-            to the URI stored in the annotation and the name of the file will be adapted to the name of the source file. If this functionality is activated in the preferences, 

-            then the UIMA Ruta Workbench adds

-            the SourceDocumentInformation annotation when the user launches a script file.

-            The default value of this parameter is empty. 

-            In this case no additional html file will be created.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.modifier.parameter.outputView">

-          <title>outputView</title>

-          <para>

-            This string parameter specifies the name of the view, which will contain the modified document. A view of this name must not yet exist.

-            The default value of this parameter is <quote>modified</quote>.

-          </para>

-        </section>

-      </section>

-    </section>

-    <section id="ugr.tools.ruta.ae.html">

-      <title>HTML Annotator</title>

-      <para>

-        This Analysis Engine provides support for HTML files by adding annotations for the HTML elements. Using the default values, the HTML Annotator creates annotations

-        for each HTML element spanning the content of the element, whereas the most common elements are represented by own types. 

-        The document <quote><![CDATA[This text is <b>bold</b>.]]></quote>, for example, would be annotated with an annotation of the type 

-        <quote>org.apache.uima.ruta.type.html.B</quote> for the word <quote>bold</quote>. The HTML annotator can be configured 

-        in order to include the start and end elements in the created annotations. 

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

-      </para>

-      <section id="ugr.tools.ruta.ae.html.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.html.parameter.onlyContent">

-          <title>onlyContent</title>

-          <para>

-            This parameter specifies whether created annotations should cover only the content of the HTML elements or also their start and end elements. 

-            The default value is <quote>true</quote>.

-          </para>

-        </section>

-      </section>

-    </section>

-    <section id="ugr.tools.ruta.ae.htmlconverter">

-      <title>HTML Converter</title>

-      <para>

-        This Analysis Engine is able to convert html content from a source view into a plain string representation stored in an output view. 

-        Especially, the Analysis Engine transfers annotations under consideration of the changed document text and annotation offsets in the new view. 

-        The copy process also sets features, however, features of type annotation are currently not supported. 

-        Note that if an annotation would have the same start and end positions in the new view, i.e., 

-        if it would be mapped to an annotation of length 0, it is not moved to the new view.

-        

-        The HTML Converter also supports heuristic and explicit conversion patterns which default to html4 decoding, 

-        e.g., "<![CDATA[&nbsp;]]>", "<![CDATA[&lt;]]>", etc. Concepts like tables or lists are not supported.

-        

-        Note that in general it is suggested to run an html cleaner before any further processing to avoid problems with malformed html. 

-        

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

-      </para>

-      <section id="ugr.tools.ruta.ae.htmlconverter.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.outputView">

-          <title>outputView</title>

-          <para>

-            This string parameter specifies the name of the new view. 

-            The default value is <quote>plaintext</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.inputView">

-          <title>inputView</title>

-          <para>

-            This string parameter can optionally be set to specify the name of the input view.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.newlineInducingTags">

-          <title>newlineInducingTags</title>

-          <para>

-            This string array parameter sets the names of the html tags that create linebreaks in the output view.

-            The default is <quote>br, p, div, ul, ol, dl, li, h1, ..., h6, blockquote</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.replaceLinebreaks">

-          <title>replaceLinebreaks</title>

-          <para>

-            This boolean parameter determines if linebreaks inside the text nodes are kept or removed.

-            The default behavior is <quote>true</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.linebreakReplacement">

-          <title>replaceLinebreaks</title>

-          <para>

-            This string parameter determines the character sequence that replaces a linebreak.

-            The default behavior is the empty string.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.conversionPolicy">

-          <title>conversionPolicy</title>

-          <para>

-            This string parameter determines the conversion policy used, either "heuristic", "explicit", or "none". 

-            When the value is "explicit", the parameters <quote>conversionPatterns</quote> and optionally <quote>conversionReplacements</quote> are considered.

-            The "heuristic" conversion policy uses simple regular expressions to decode html4 entities such as "<![CDATA[&nbsp;]]>".

-            The default behavior is "heuristic".

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.conversionPatterns">

-          <title>conversionPatterns</title>

-          <para>

-            This string array parameter can be used to apply custom conversions.

-            It defaults to a list of commonly used codes, e.g., <![CDATA[&nbsp;]]>, 

-            which are converted using html 4 entity unescaping. 

-            However, explicit conversion strings can also be passed via the parameter <quote>conversionReplacements</quote>.

-            Remember to enable explicit conversion via <quote>conversionPolicy</quote> first.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.conversionReplacements">

-          <title>conversionReplacements</title>

-          <para>

-            This string array parameter corresponds to <quote>conversionPatterns</quote> 

-            such that <quote>conversionPatterns[i]</quote> will be replaced by <quote>conversionReplacements[i]</quote>; 

-            replacements should be shorter than the source pattern.

-            Per default, the replacement strings are computed using Html4 decoding.

-            Remember to enable explicit conversion via <quote>conversionPolicy</quote> first.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.skipWhitespaces">

-          <title>skipWhitespaces</title>

-          <para>

-            This boolean parameter determines if the converter should skip whitespaces. 

-            Html documents often contains whitespaces for indentation and formatting, 

-            which should not be reproduced in the converted plain text document.

-            If the parameter is set to false, then the whitespces are not removed. 

-            This behavior is useful, if not Html documents are converted, but XMl files.

-            The default value is true.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.processAll">

-          <title>processAll</title>

-          <para>

-            If this boolean parameter is set to true, then the tags of the complete document is processed

-            and not only those within the body tag.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.newlineInducingTagRegExp">

-          <title>newlineInducingTagRegExp</title>

-          <para>

-            This string parameter contains a regular expression for HTML/XML elements. If the pattern

-    matches, then the element will introduce a new line break similar to the element of the

-    parameter <quote>newlineInducingTags</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.gapInducingTags">

-          <title>gapInducingTags</title>

-          <para>

-            This string array parameter sets the names of the html tags that create additional text in the

-   output view. The acutal string of the gap is defined by the parameter <quote>gapText</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.gapText">

-          <title>gapText</title>

-          <para>

-           This string parameter determines the character sequence that is introduced by the html tags

-    specified in the <quote>gapInducingTags</quote>.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.htmlconverter.parameter.useSpaceGap">

-          <title>useSpaceGap</title>

-          <para>

-          This boolean parameter sets the value of the parameter <quote>gapText</quote> to a single space..

-          </para>

-        </section>

-      </section>

-    </section><section id="ugr.tools.ruta.ae.stylemap">

-      <title>Style Map Creator</title>

-      <para>

-        This Analysis Engine can be utilized to create style map information, which is needed by the Modifier Analysis Engine in order to create

-        highlightings for some annotations.

-        Style map information can be created using the <link linkend='ugr.tools.ruta.language.actions.color'>COLOR</link> action.

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

-      </para>

-      <section id="ugr.tools.ruta.ae.stylemap.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.stylemap.parameter.styleMap">

-          <title>styleMap</title>

-          <para>

-            This string parameter specifies the name of the style map file created by the Style Map Creator Analysis Engine, which stores the colors for

-            additional highlightings in the modified view.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.stylemap.parameter.descriptorPaths">

-          <title>descriptorPaths</title>

-          <para>

-            This parameter can contain multiple string values and specifies the absolute paths where the style map can be found.

-          </para>

-        </section>

-      </section>

-    </section>

-    <section id="ugr.tools.ruta.ae.cutter">

-      <title>Cutter</title>

-      <para>

-        This Analysis Engine is able to cut the document of the CAS. Only the text covered by annotations of the specified type will be retained and all other parts of the documents will be removed.

-        The offsets of annotations in the index will be updated, but not feature structures nested as feature values.

-      </para>

-      <section id="ugr.tools.ruta.ae.cutter.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.cutter.parameter.keep">

-          <title>keep</title>

-          <para>

-            This string parameter specifies the complete name of a type. Only the text covered by annotations of this type will be retained and all other parts of the documents will be removed.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.cutter.parameter.inputView">

-          <title>inputView</title>

-          <para>

-            The name of the view that should be processed.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.cutter.parameter.outputView">

-          <title>outputView</title>

-          <para>

-            The name of the view, which will contain the modified CAS. 

-          </para>

-        </section>

-      </section>

-    </section>

-    <section id="ugr.tools.ruta.ae.view">

-      <title>View Writer</title>

-      <para>

-        This Analysis Engine is able to serialize the processed CAS to an XMI file whereas the the source and destination view can be specified 

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

-      </para>

-      <section id="ugr.tools.ruta.ae.view.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.view.parameter.output">

-          <title>output</title>

-          <para>

-            This string parameter specifies the absolute path of the resulting file named <quote>output.xmi</quote>. However, if an annotation of the 

-            type <quote>org.apache.uima.examples.SourceDocumentInformation</quote> is given, then the value of this parameter is interpreted to be relative

-            to the URI stored in the annotation and the name of the file will be adapted to the name of the source file. If this functionality is activated in the preferences, 

-            then the UIMA Ruta Workbench adds

-            the SourceDocumentInformation annotation when the user launches a script file.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.view.parameter.inputView">

-          <title>inputView</title>

-          <para>

-            The name of the view that should be stored in a file.

-          </para>

-        </section>

-        <section id="ugr.tools.ruta.ae.view.parameter.outputView">

-          <title>outputView</title>

-          <para>

-            The name, which should be used, to store the view in the file. 

-          </para>

-        </section>

-      </section>

-    </section>

-    <section id="ugr.tools.ruta.ae.xmi">

-      <title>XMI Writer</title>

-      <para>

-        This Analysis Engine is able to serialize the processed CAS to an XMI file. One use case for the XMI Writer is, for example, a rule-based sort,

-        which stores the processed XMI files in different folder, dependent on the execution of the rules, e.g., whether a pattern of annotations occurs or not.

-        A descriptor file for this Analysis Engine is located in the folder <quote>descriptor/utils</quote> of a UIMA Ruta project.

-      </para>

-      <section id="ugr.tools.ruta.ae.xmi.parameter">

-        <title>Configuration Parameters</title>

-        <para>

-        </para>

-        <section id="ugr.tools.ruta.ae.xmi.parameter.output">

-          <title>Output</title>

-          <para>

-            This string parameter specifies the absolute path of the resulting file named <quote>output.xmi</quote>. However, if an annotation of the 

-            type <quote>org.apache.uima.examples.SourceDocumentInformation</quote> is given, then the value of this parameter is interpreted to be relative

-            to the URI stored in the annotation and the name of the file will be adapted to the name of the source file. If this functionality is activated in the preferences, 

-            then the UIMA Ruta Workbench adds

-            the SourceDocumentInformation annotation when the user launches a script file.

-            The default value is <quote>/../output/</quote>

-          </para>

-        </section>

-      </section>

-    </section>

-    

-  </section>

-</chapter>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml
deleted file mode 100644
index 2f8e168..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<section id="section.tools.ruta.workbench.cde">

-  <title>UIMA Ruta CDE perspective</title>

-  <para>

-    The UIMA Ruta CDE (Constraint-Driven Evaluation) provides some views and functionality to investigate and evaluate a set

-    of annotated documents using domain and background knowledge formalized as constraints and UIMA Ruta rules. 

-    <xref linkend="figure.tools.ruta.workbench.cde"/> provides an overview of the perspective. Its views are described in the following.

-  </para>

-  <figure id="figure.tools.ruta.workbench.cde">

-      <title>The UIMA Ruta cde framework

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="776px" format="PNG" align="center"

-            fileref="&imgroot;cde/cde.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="5.4in" format="PNG" align="center"

-            fileref="&imgroot;cde/cde.png" />

-        </imageobject>

-        <textobject>

-          <phrase>UIMA Ruta CDE perspective</phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  <section id="section.tools.ruta.workbench.cde.documents">

-  <title>CDE Documents view</title>

-  <para>

-  This view provides the general functionality to specify, which set of documents should be evaluated.  The green start button in the toolbar 

-  starts the evaluation process with the given configuration specified in the different views.

-  The text field <quote>Documents</quote> specifies the set of documents that have been annotated by an arbitrary model or set of rules. 

-  These xmiCAS documents can contain additional annotations, which are used by the simple rule-based constraints. The text field <quote>Test Data</quote>

-  specifies an optional folder with gold standard documents. These documents can be applied for comparing the resulting CDE value to an F1 score.

-  The text field <quote>Type System</quote> refers to a type system descriptor, which defines all types that are needed for the evaluation.

-  Each text field is sensitive to drag and drop. The use can select a folder in the script explorer and drag and drop it on the text field.

-  Directly below the text fields, the values of different evaluation measures are given comparing the resulting CDE value to the F1 score. 

-  These values are of course only available, if annotated gold standard data is specified in the text field <quote>Test Data</quote>.

-  </para>

-  <para>

-    The table at the bottom of the view contains all documents that are inspected. 

-    The intervals specifying the color of the icon of each documents dependent of the CDE result can be set in the preference page.

-    If the evaluation has finished, then the CDE value is displayed and additionally the F1 score, if available. The table is sortable.

-    A double-click on a documents opens it in the CAS Editor.

-  </para>

-  </section>

-  <section id="section.tools.ruta.workbench.cde.constraints">

-  <title>CDE Constraints view</title>

-  <para>This view specifies the currently applied constraints and their weights. This list is used to calculate the overall CDE value

-  of one document: the average of the weighted sum. The buttons in the toolbar of the view export and import the constraint using a simple xml format.

-  The buttons in the right part of the view can modify the list of the constraints. Currently, three types of constraints are supported: 

-  Simple UIMA Ruta rules, a list of simple UIMA Ruta rules and word distribution constraints. All constraints return a value between 0 and 1. 

-  The constraints based on UIMA Ruta rules return the ratio how often the rule was applied to how often the rules tried to apply. The rule

-  <quote>Author{STARTSWITH(Reference)};</quote>, for example, returns 1, if all author annotations start with a reference annotation. The word distribution 

-  constraints refer to a txt file in which each line has the format <quote>"Proceedings":Booktitle 0.95, Journal 0.05</quote> specifying

-  the distribution of the word proceedings concerning the interesting annotations. If no quotes are given for the first term, then the term is interpreted as an annotation type.

-  The result value is currently calculated by using the cosine similarity of the expected and observed frequencies.

-  </para>

-  </section>

-  <section id="section.tools.ruta.workbench.cde.result">

-  <title>CDE Result view</title>

-  <para>

-    The result view displays the result values of each constraint for the document that is selected in the CDE Documents view.

-  </para>

-  </section>

-</section>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.check.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.check.xml
deleted file mode 100644
index 44c15b2..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.check.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<section id="section.tools.ruta.workbench.check">

-  <title>Check Annotations view</title>

-  <para>

-    The Check Annotations view provides functionality to quickly validate a set of annotations in different documents. 

-    The user can specify two folders with xmiCAS files: One folder contains the documents with annotations that should be validated. 

-    The other folder is used to store the validated annotations. The view enables a rapid navigation between the documents and their annotations 

-    of the selected types can easily be accepted or rejected.

-    <xref linkend="figure.tools.ruta.workbench.check"/> provides an screenshot of the view. Its parts are described in the following.

-  </para>

-  <figure id="figure.tools.ruta.workbench.check">

-      <title>Check Annotations view (right part)

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="776px" format="PNG" align="center"

-            fileref="&imgroot;check/check.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="5.4in" format="PNG" align="center"

-            fileref="&imgroot;check/check.png" />

-        </imageobject>

-        <textobject>

-          <phrase>Check Annotations view</phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  <para>

-    The view provides three text fields: the absolute location of the folder with the source documents, which contain the annotations to be validated, 

-    the absolute location of the gold folder, where the accepted annotations will be stored, and the absolute location of the type system that contains 

-    all necessary types. The toolbar of the view provides seven buttons: the first one updates the set of documents and 

-    their annotations in the main part of the view. This is necessary, e.g., if the selected types change or if the annotations in the documents change.

-    The second button opens a dialog for choosing the types that need to be checked. Only annotations of those types will be displayed and can be accepted or rejected.

-    If features need to be checked together with the annotations of a type, these features have to be selected in this dialog too. Features are shown as sub-nodes of the

-    annotation nodes. By default, only annotations that have been checked are transferred from the original document to the according gold document. To also transfer 

-    annotations of some type unchecked, these types have to be chosen in another dialog, which is opened with the third button.

-    The fourth and fifth button accept/reject the currently selected annotation. Only accepted annotations will be stored in the gold folder. An annotation can also 

-    be accepted with the key binding <quote>ctrl+4</quote> and rejected with the key binding <quote>ctrl+5</quote>. If an annotation is processed, 

-    then the next annotation is automatically selected and a new CAS Editor is opened if necessary. 

-    The sixth button adds the currently accepted

-    annotations, as well as the annotations of a type selected in the unchecked dialog, to the corresponding file in the gold folder and additionally extends an file

-    <quote>data.xml</quote>, which remembers what types have already been checked in each documents.

-    Annotations of these types will not show up again in the main part of the view. With the last button, the user can select the annotation mode of the CAS editor.

-    The choice is restricted to the currently selected types. If an annotation is missing in the source documents, then the user can manually add this annotation

-    in the CAS Editor. The new annotation will be added as accepted to the list of annotations in the main part of the view.

-    By right-clicking on an annotation node in the view's tree viewer, a dialog opens to change the type of an annotation. Right-clicking on a feature node opens another

-    dialog to change the feature's value.

-  </para>

-    

-</section>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.create_dictionaries.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.create_dictionaries.xml
deleted file mode 100644
index 641b743..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.create_dictionaries.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<section id="section.ugr.tools.ruta.workbench.create_dictionaries">

-  <title>Creation of Tree Word Lists</title>

-  <para>

-    Tree word lists are external resources, which can be used

-    to annotate all occurrences of list items in a document

-    with a given annotation type, very fast. For more details

-    on their use, see <xref linkend='ugr.tools.ruta.language.external_resources' />. 

-    Since simple tree and multi tree word lists have to be compiled

-    the UIMA Ruta Workbench provides an easy way to compile

-    them from ordinary text files. These text files have to

-    containing one item per line, for example, like in the

-    following list of first names: 

-    <programlisting><![CDATA[Frank

-Peter

-Jochen

-Martin

-]]></programlisting>

-  </para>

-  <para>

-    To compile a simple tree word list from a text file,

-    right-click on the text file in UIMA Ruta script

-    explorer. The resulting menu is shown in

-    <xref linkend='figure.ugr.tools.ruta.workbench.create_dictionaries_1' />.

-

-    <figure id="figure.ugr.tools.ruta.workbench.create_dictionaries_1">

-      <title>Create a simple tree word list

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="250px" format="PNG" align="center"

-            fileref="&imgroot;create_tree_lists/create_tree_lists.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="3.5in" format="PNG" align="center"

-            fileref="&imgroot;create_tree_lists/create_tree_lists.png" />

-        </imageobject>

-        <textobject>

-          <phrase>

-            Create a simple tree word list.

-          </phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  </para>

-  <para>

-    When hovering over UIMA Ruta item you can choose

-    <quote>Convert to TWL</quote>.

-    Click on it and a tree word list with the same name as the original

-    file is generated in the same folder.

-  </para>

-  <para>

-    You can also generate several tree word lists at once. To do so,

-    just select

-    multiple files and then right-click and do the same like for a single

-    list. You will get one tree word list for every selected file.

-  </para>

-  <para>

-    To generate a multi tree work list, select all files, which should be

-    generated

-    into the multi tree word list. Again right-click and select

-    <quote>Convert to Multi TWL</quote>

-    under item UIMA Ruta. A multi tree word list

-    named

-    <quote>generated.mtwl</quote>

-    will be created.

-  </para>

-

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.explain_perspective.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.explain_perspective.xml
deleted file mode 100644
index 6594e6a..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.explain_perspective.xml
+++ /dev/null
@@ -1,357 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="section.ugr.tools.ruta.workbench.explain_perspective">

-  <title>UIMA Ruta Explain Perspective</title>

-  <para>

-    Writing new rules is laborious, especially if the newly written

-    rules do not behave as expected. The UIMA Ruta system is able to

-    record the application of each single rule and block in order to

-    provide an explanation of the rule inference and a

-    minimal debugging functionality. The information about the application of the rules

-    itself is stored in the resulting xmiCAS output file, if the parameters

-    of the executed engine are configured correctly. The simplest way to

-    generate these explanation information is to click on the common 'Debug' button (looks like a green bug)

-    while having the UIMA Ruta script file you want to debug active in

-    your editor. The current UIMA Ruta file will then be executed on the text files in the input

-    directory and xmiCAS are created in the output directory containing the

-    additional UIMA feature structures describing the

-    rule inference. To show the newly created execution information, you can either open the

-    Explain perspective or open the necessary views separately and arrange

-    them as you like. There are eight views that display information about

-    the execution of the rules: Applied Rules, Covering Rules, Created By,

-    Failed Rules, Matched Rules, Rule Elements, Rule List

-    and Statistics. All of theses views are further explained in detail, using the

-    UIMA Ruta example project for examples.

-  </para>

-

-  <para>

-    To make it possible to reproduce all of the examples used below,

-    switch to the UIMA Ruta Explain perspective within your Eclipse

-    workbench.

-    Import the UIMA Ruta example project and open the main

-    Ruta script file 'Main.ruta'. Now press the 'Debug' button

-    and wait

-    for the end of execution. Open the resulting xmiCAS file

-    'Test1.txt.xmi', which you can find in the output folder.

-  </para>

-

-  <section

-    id="section.ugr.tools.ruta.workbench.explain_perspective.applied_rules">

-    <title>Applied Rules</title>

-    <para>

-      The Applied Rules view displays structured information about all

-      rules that tried to apply to the input documents.

-    </para>

-    <para>

-      The structure is as follows: if BLOCK constructs were used in the

-      executed Ruta file, the rules contained in that block will be

-      represented as child node in the tree of the view. Each Ruta

-      file is a BLOCK construct itself and named after the file. The

-      root node of the view is, therefore, always a BLOCK containing the rules of the

-      executed UIMA Ruta script. Additionally, if a rule calls a different

-      Ruta file, then the root block of that file is the child of the

-      calling rule.

-    </para>

-    <para>

-      If you double-click on one of the rules, the related script file

-      is opened within the editor and the rule itself is selected.

-    </para>

-    <para>

-      <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective' />

-      shows the whole rule hierarchy resulting from the UIMA Ruta example

-      project. The root of the whole hierarchy is the BLOCK associated to

-      the 'Main.ruta' script. On the next level, the rules called by the

-      'Main.ruta' script are listed. Since there is a call to each of the

-      script files 'Year.ruta',

-      'Author.ruta' and 'Title.ruta', these are included

-      into the hierarchy, each forming their own block.

-    </para>

-    <para>

-      The following image shows the UIMA Ruta Applied Rules view.

-      <figure

-        id="figure.ugr.tools.ruta.workbench.explain_perspective.applied_rules">

-        <title> Applied Rules view

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="576px" format="PNG" align="center"

-              fileref="&imgroot;explain/applied_rules_view.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="5.5in" format="PNG" align="center"

-              fileref="&imgroot;explain/applied_rules_view.png" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              Applied Rules view.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      Besides the hierarchy, the view shows how often a rule tried to match

-      in total and how often it succeeded. This is shown in brackets at the

-      beginning of each rule entry. The Applied Rules view tells us

-      that the rule

-      <literal>NUM{REGEXP("19..|20..") -> MARK(Year)};</literal>

-      within script 'Year.ruta' tried to match twice but only succeeded once.

-    </para>

-    <para>

-      After this information, the rule itself is given. Notice that

-      each rule is given with all the parameters it has been executed.

-      Have a look at rule entry

-      <literal>[1/1]Document{->MARKFAST(FirstName,FirstNameList,false,0,true)}

-      </literal> within BLOCK Author. The rule obviously has been executed with five

-      parameters. If you double-click on this rule, you will get to the

-      rule in the script file 'Author.ruta'. It shows the rule as follows:

-      <literal>Document{-> MARKFAST(FirstName, FirstNameList)};</literal>. This means the last three parameters have been default values used

-      to execute the rule.

-    </para>

-    <para>

-      Additionally, some profiling information, giving details about

-      the absolute time and the percentage of total execution time the rule

-      needed, is added at the end of each rule entry.

-    </para>

-    <para>

-      The selection (single-click) of a rule in this view will

-      directly change the information visualized in the views Failed Rules

-      and Matched Rules.

-    </para>

-  </section>

-

-  <section

-    id="section.ugr.tools.ruta.workbench.explain_perspective.matched_and_failed_rules">

-    <title>Matched Rules and Failed Rules</title>

-    <para>

-      If a rule is selected (single-click) in the Applied Rules view,

-      then the Matched Rules view displays all instances (text passages) on

-      which the rule matched. On the contrary, the Failed Rules view shows

-      the instances on which the rule tried but failed to match.

-    </para>

-    <para>

-      Select rule <literal>[2/3]Name{-PARTOF(NameListPart)} NameLinker[1,2]{->

-        MARK(NameListPart,1,2)};</literal> within BLOCK Author.

-      <xref

-        linkend='figure.ugr.tools.ruta.workbench.explain_perspective.matched_and_failed_rules' />

-      shows the text passages this rule tried to match on. One did not

-      succeed. It is displayed within the Failed Rules view. Two

-      succeeded and are shown in the Matched Rules view.

-    </para>

-    <para>

-      The following image shows the UIMA Ruta Applied Rules view.

-      <figure

-        id="figure.ugr.tools.ruta.workbench.explain_perspective.matched_and_failed_rules">

-        <title> The views Matched Rules and Failed Rules

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="576px" format="PNG" align="center"

-              fileref="&imgroot;explain/matched_and_failed.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="5.5in" format="PNG" align="center"

-              fileref="&imgroot;explain/matched_and_failed.png" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              The views Matched Rules and Failed Rules.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      The selection (single-click) of one of the text passages in

-      either Matched Rules view or Failed Rules view will directly change

-      the information visualized in the Rule Elements view.

-    </para>

-  </section>

-

-  <section

-    id="section.ugr.tools.ruta.workbench.explain_perspective.rule_elements">

-    <title>Rule Elements</title>

-    <para>

-      If you select one of the listed instances in the Matched or

-      Failed Rules view, then the Rule Elements view contains a listing

-      of the rule elements and their conditions belonging to the related rule

-      used on the specific text passage. There is detailed

-      information available on what text passage each rule element did or

-      did not match and which condition did or did not evaluate true.

-    </para>

-    <para>

-      Within the Rule Elements view, each rule element generates its

-      own explanation hierarchy. On the root level, the rule element itself

-      is given. An apostrophe at the beginning of the rule element

-      indicates that this rule was the anchor for the rule execution. On

-      the next level, the text passage on which the rule element tried to

-      match on is given. The last level explains, why the rule element

-      did or did not match. The first entry on this level tells, if the text

-      passage is of the requested annotation type. If it is, a green hook

-      is shown in front of the requested type. Otherwise, a red cross is

-      shown. In the following the rule conditions and their evaluation on

-      the given text passage are shown.

-    </para>

-    <para>

-      In the previous example, select the listed instance

-      <literal>Bethard, S.</literal>. The Rule Elements view shows the related explanation displayed

-      in <xref linkend='figure.ugr.tools.ruta.workbench.explain_perspective.rule_elements' />.

-    </para>

-    <para>

-      The following image shows the UIMA Ruta Rule Elements view.

-      <figure

-        id="figure.ugr.tools.ruta.workbench.explain_perspective.rule_elements">

-        <title> The views Matched Rules and Failed Rules

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="250px" format="PNG" align="center"

-              fileref="&imgroot;explain/rule_elements.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="3.5in" format="PNG" align="center"

-              fileref="&imgroot;explain/rule_elements.png" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              The Rule Elements view.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      As you can see, the first rule element <literal>Name{-PARTOF(NameListPart)}</literal>

-      matched on the text passage <literal>Bethard, S.</literal>

-      since it is firstly annotated with a <quote>Name</quote> annotation and secondly it is not part of an annotation

-      <quote>NameListPart</quote>. However, as this first text passage is not followed by a

-      <quote>NameLinker</quote> annotation the whole rule fails.

-    </para>

-  </section>

-

-  <section

-    id="section.ugr.tools.ruta.workbench.explain_perspective.covering_rules">

-    <title>Covering Rules</title>

-    <para>

-      This views is very similar to the Applied Rules view, but

-      displays only rules and blocks under a given selection. If the user

-      clicks on any position in the xmiCAS document, a Covering Rules view

-      is generated containing only rule elements that affect that position

-      in the document. The Matched Rules,

-      Failed Rules and Rule Elements

-      views only contain match

-      information of that position.

-    </para>

-  </section>

-

-  <section id="section.ugr.tools.ruta.workbench.explain_perspective.rule_list">

-    <title>Rule List</title>

-    <para>

-      This views is very similar to the Applied Rules view and the

-      Covering Rules view, but displays only rules and NO blocks under a

-      given selection. If the user clicks on any position in the xmiCAS

-      document, a list of rules that matched or tried to match on that

-      position in the document is generated within the Rule List view. The

-      Matched Rules, Failed Rules and Rule Elements views only contain

-      match information of that position. Additionally, this view provides

-      a text field for filtering the rules. Only those rules remain that

-      contain the entered text.

-    </para>

-  </section>

-

-  <section

-    id="section.ugr.tools.ruta.workbench.explain_perspective.created_by">

-    <title>Created By</title>

-    <para>

-      The Created By view tells you which rule created a specific

-      annotation. To get this information, select an annotation in the

-      Annotation Browser. After doing this, the Created By view shows the

-      related information.

-    </para>

-    <para>

-      To see how this works, use the example project and go to the

-      Annotation view. Select the

-      <quote>d.u.e.Year</quote>

-      annotation <quote>(2008)</quote>. The Created By view displays the information, shown in

-      <xref linkend='figure.ugr.tools.ruta.workbench.explain_perspective.created_by' />. 

-      You can double-click on the shown rule to jump to the related

-      document <quote>Year.ruta</quote>.

-    </para>

-    <para>

-      The following image shows the UIMA Ruta Created By view.

-      <figure

-        id="figure.ugr.tools.ruta.workbench.explain_perspective.created_by">

-        <title> The Created By view

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="560px" format="PNG" align="center"

-              fileref="&imgroot;explain/created_by.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="5.5in" format="PNG" align="center"

-              fileref="&imgroot;explain/created_by.png" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              The Created By view.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-  </section>

-

-  <section

-    id="section.ugr.tools.ruta.workbench.explain_perspective.statistics">

-    <title>Statistics</title>

-    <para>

-      The Statistics view displays profiling information for the used

-      conditions and actions of the UIMA Ruta language. Three

-      numbers are

-      given for each element: The total time of execution, the amount of

-      executions and the average time per execution.

-    </para>

-    <para>

-      The following image shows the UIMA Ruta Statistics view generated

-      form the UIMA Ruta example project.

-      <figure

-        id="figure.ugr.tools.ruta.workbench.explain_perspective.statistics">

-        <title> The Statistics view

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="300px" format="PNG" align="center"

-              fileref="&imgroot;explain/statistics.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="4.0in" format="PNG" align="center"

-              fileref="&imgroot;explain/statistics.png" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              The Statistics view.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-  </section>

-

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml
deleted file mode 100644
index d2f4fe8..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-<section id="section.ugr.tools.ruta.workbench.install">

-  <title>Installation</title>

-  <para>

-

-    Do the installation of the UIMA Ruta Workbench as follows:

-    <orderedlist numeration="arabic">

-      <listitem>

-        <para>

-          Download, install and start Eclipse 3.7., 3.8 or 4.2. Eclipse 3.7 can, for example, can be obtained

-          from the <ulink url="http://www.eclipse.org/downloads/packages/release/indigo/sr2">eclipse.org</ulink> download site.

-        </para>

-      </listitem>

-      <listitem>

-        <para>

-          Add the Apache UIMA update site (

-          <ulink url="http://www.apache.org/dist/uima/eclipse-update-site/">http://www.apache.org/dist/uima/eclipse-update-site/

-          </ulink>) to the available

-          software sites in your Eclipse installation.

-          Click on <quote>Help &rarr; Install New Software</quote>. This opens the install wizard, which can be

-          seen in <xref linkend='figure.ugr.tools.ruta.workbench.install.update' />

-        </para>

-      </listitem>

-      <listitem>

-        <para>

-          Select or enter the Apache UIMA update site (<ulink url="http://www.apache.org/dist/uima/eclipse-update-site/">http://www.apache.org/dist/uima/eclipse-update-site/

-          </ulink>)in field

-          <quote>Work with:</quote>

-          and press <quote>Enter</quote>.

-        </para>

-      </listitem>

-      <listitem>

-        <para>

-          Select <quote>Apache UIMA Ruta</quote> and (if not yet installed) <quote>Apache UIMA Eclipse tooling and runtime support</quote>

-          by clicking into the related checkbox.

-        </para>

-      </listitem>

-      <listitem>

-        <para>

-          Also select

-          <quote>Contact all update

-            sites during install to find required software

-          </quote>

-          and click on

-          <quote>Next</quote>.

-        </para>

-      </listitem>

-      <listitem>

-        <para>

-          On the next page, click <quote>Next</quote>

-          again. Now, the license

-          agreement site is displayed. To install UIMA Ruta read the license and

-          choose

-          <quote>I accept the ...</quote>

-          if you agree to it. Then,

-          click on <quote>Finish</quote>

-        </para>

-      </listitem>

-    </orderedlist>

-  </para>

-  <para>

-    <figure id="figure.ugr.tools.ruta.workbench.install.update">

-      <title> Eclipse update site

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="500px" format="PNG" align="center"

-            fileref="&imgroot;install/update.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="5.0in" format="PNG" align="center"

-            fileref="&imgroot;install/update.png" />

-        </imageobject>

-        <textobject>

-          <phrase>

-            Eclipse update site.

-          </phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  </para>

-  <para>

-    Now, UIMA Ruta is going to be installed.

-    After the successful

-    installation, switch to the UIMA Ruta

-    perspective. To get an overview, see

-    <xref linkend='section.ugr.tools.ruta.workbench.overview' />.

-  </para>

-  <note>

-    <para>

-      It is sometimes necessary to increase to available PermGenSpace by adding 

-      <quote>-XX:PermSize=64M -XX:MaxPermSize=228M</quote> to the config.ini file of your Eclipse installation.

-    </para>

-  </note>

-  <para>

-    Several times within this chapter we use a UIMA Ruta example

-    project

-    to illustrate the use of the UIMA Ruta Workbench.

-    The <quote>ExampleProject</quote> project is part of the source release of UIMA Ruta (example-projects folder).

-  </para>

-  <para>

-    To import this project into the workbench do

-    <quote>File &rarr;

-      Import...

-    </quote>

-    . Select

-    <quote>Existing Projects into Workspace</quote>

-    under

-    <quote>General</quote>

-    . Select the

-    <quote>ExampleProject</quote>

-    directory

-    in your file system as root directory and click on

-    <quote>Finish</quote>

-    . The

-    example project is now available in your workspace.

-  </para>

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.overview.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.overview.xml
deleted file mode 100644
index 8dd1908..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.overview.xml
+++ /dev/null
@@ -1,222 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="section.ugr.tools.ruta.workbench.overview">

-  <title>UIMA Ruta Workbench Overview</title>

-  <para>

-    The UIMA Ruta Workbench provides two main perspectives.

-    <orderedlist numeration="arabic">

-      <listitem>

-        <para>

-          The

-          <quote>UIMA Ruta perspective</quote>, which provides the main functionality for working on UIMA Ruta projects. See

-          <xref linkend='section.ugr.tools.ruta.workbench.ruta_perspective' />.

-        </para>

-      </listitem>

-      <listitem>

-        <para>

-          The

-          <quote>Explain perspective</quote>, which provides functionality primarily used to explain how a set of rules

-          are executed on input documents. See

-          <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective' />.

-        </para>

-      </listitem>

-    </orderedlist>

-  </para>

-  <para>

-    The following image shows the UIMA Ruta perspective.

-    <figure id="figure.ugr.tools.ruta.workbench.overview.ruta_perspective">

-      <title> The UIMA Ruta perspective.

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="576px" format="PNG" align="center"

-            fileref="&imgroot;overview/screenshot_ruta_perspective_.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="5.5in" format="PNG" align="center"

-            fileref="&imgroot;overview/screenshot_ruta_perspective_.png" />

-        </imageobject>

-        <textobject>

-          <phrase>

-            The UIMA Ruta perspective.

-          </phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-    As you can see, the UIMA Ruta perspective provides an editor for editing documents, e.g.,

-    UIMA Ruta scripts, and several views for different other tasks. The Script Explorer, for

-    example, helps to manage your UIMA Ruta projects.

-  </para>

-  <para>

-    The following

-    <xref linkend='table.ugr.tools.ruta.workbench.overview.views' />

-    lists all available UIMA Ruta views:

-    <table id="table.ugr.tools.ruta.workbench.overview.views" frame="all">

-      <title>UIMA Ruta views</title>

-      <tgroup cols="2" colsep="1" rowsep="1">

-        <colspec colname="c1" colwidth="1*" />

-        <colspec colname="c2" colwidth="1*" />

-        <thead>

-          <row>

-            <entry align="center">View</entry>

-            <entry align="center">Detailed description</entry>

-          </row>

-        </thead>

-        <tbody>

-          <row>

-            <entry>Annotation Test</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.testing.usage' />

-            </entry>

-          </row>

-          <row>

-            <entry>Applied Rules</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective.applied_rules' />

-            </entry>

-          </row>

-          <row>

-            <entry>Check Annotations</entry>

-            <entry>

-              See

-              <xref linkend='section.tools.ruta.workbench.check' />

-            </entry>

-          </row>

-          <row>

-            <entry>Covering Rules</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective.covering_rules' />

-            </entry>

-          </row>

-          <row>

-            <entry>Created By</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective.created_by' />

-            </entry>

-          </row>

-          <row>

-            <entry>Failed Rules</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective.matched_and_failed_rules' />

-            </entry>

-          </row>

-          <row>

-            <entry>False Negative</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.testing.usage' />

-            </entry>

-          </row>

-          <row>

-            <entry>False Positive</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.testing.usage' />

-            </entry>

-          </row>

-          <row>

-            <entry>Matched Rules</entry>

-            <entry>

-              See

-              <xref linkend='figure.ugr.tools.ruta.workbench.explain_perspective.matched_and_failed_rules' />

-            </entry>

-          </row>

-          <row>

-            <entry>Rule Elements</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective.rule_elements' />

-            </entry>

-          </row>

-          <row>

-            <entry>Rule List</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective.rule_list' />

-            </entry>

-          </row>

-          <row>

-            <entry>Statistics</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.explain_perspective.statistics' />

-            </entry>

-          </row>

-          <row>

-            <entry>Ruta Query</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.ruta_query' />

-            </entry>

-          </row>

-          <row>

-            <entry>TextRuler</entry>

-            <entry>

-              See

-              <xref linkend='section.tools.ruta.workbench.textruler' />

-            </entry>

-          </row>

-          <row>

-            <entry>TextRuler Results</entry>

-            <entry>

-              See

-              <xref linkend='section.tools.ruta.workbench.textruler' />

-            </entry>

-          </row>

-          <row>

-            <entry>True Positive</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.testing.usage' />

-            </entry>

-          </row>

-        </tbody>

-      </tgroup>

-    </table>

-  </para>

-  <para>

-    The following

-    <xref linkend='table.ugr.tools.ruta.workbench.overview.wizards' />

-    lists all UIMA Ruta wizards:

-    <table id="table.ugr.tools.ruta.workbench.overview.wizards" frame="all">

-      <title>UIMA Ruta wizards</title>

-      <tgroup cols="2" colsep="1" rowsep="1">

-        <colspec colname="c1" colwidth="1*" />

-        <colspec colname="c2" colwidth="1*" />

-        <thead>

-          <row>

-            <entry align="center">Wizard</entry>

-            <entry align="center">Detailed description</entry>

-          </row>

-        </thead>

-        <tbody>

-          <row>

-            <entry>Create UIMA Ruta project</entry>

-            <entry>

-              See

-              <xref linkend='section.ugr.tools.ruta.workbench.projects.create_projects' />

-            </entry>

-          </row>

-        </tbody>

-      </tgroup>

-    </table>

-  </para>

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.projects.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.projects.xml
deleted file mode 100644
index 1d245f5..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.projects.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-

-<section id="section.ugr.tools.ruta.workbench.projects">

-  <title>UIMA Ruta Projects</title>

-  <para>

-    UIMA Ruta projects used within the UIMA Ruta Workbench need to have

-    a certain folder structure. The parts of this folder structure are

-    explained in

-    <xref linkend='table.ugr.tools.ruta.workbench.create_project.folder_strucutre' />. To create a UIMA Ruta project it is recommended to use the provided

-    wizard, explained in

-    <xref linkend='section.ugr.tools.ruta.workbench.projects.create_projects' />. If this wizard is used, the required folder structure is

-    automatically created.

-  </para>

-

-  <para>

-    <table id="table.ugr.tools.ruta.workbench.create_project.folder_strucutre"

-      frame="all">

-      <title>Project folder structure</title>

-      <tgroup cols="2" colsep="1" rowsep="1">

-        <colspec colname="c1" colwidth="1*" />

-        <colspec colname="c2" colwidth="4*" />

-        <thead>

-          <row>

-            <entry align="center">Folder</entry>

-            <entry align="center">Description</entry>

-          </row>

-        </thead>

-        <tbody>

-          <row>

-            <entry>script</entry>

-            <entry>

-              Source folder for UIMA Ruta scripts and packages.

-            </entry>

-          </row>

-          <row>

-            <entry>descriptor</entry>

-            <entry>

-              Build folder for UIMA components. Analysis engines and type

-              systems

-              are created automatically from the related script files.

-            </entry>

-          </row>

-          <row>

-            <entry>input</entry>

-            <entry>

-              Folder that contains the files that will be processed when

-              launching a

-              UIMA Ruta script. Such input files could be plain

-              text,

-              HTML or xmiCAS files.

-            </entry>

-          </row>

-          <row>

-            <entry>output</entry>

-            <entry>

-              Folder that contains the resulting xmiCAS files. One xmiCAS

-              file is generated for each associated document in the input

-              folder.

-            </entry>

-          </row>

-          <row>

-            <entry>resources</entry>

-            <entry>

-              Default folder for word lists, dictionaries and tables.

-            </entry>

-          </row>

-          <row>

-            <entry>test</entry>

-            <entry>

-              Folder for test-driven development.

-            </entry>

-          </row>

-        </tbody>

-      </tgroup>

-    </table>

-  </para>

-  <para>

-    <xref linkend='figure.ugr.tools.ruta.workbench.projects.test_project' />

-    shows a project, newly created with the wizard.

-

-    <figure id="figure.ugr.tools.ruta.workbench.projects.test_project">

-      <title>A newly created UIMA Ruta project</title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="300px" format="PNG" align="center"

-            fileref="&imgroot;projects/test_project.PNG" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="3.5in" format="PNG" align="center"

-            fileref="&imgroot;projects/test_project.PNG" />

-        </imageobject>

-        <textobject>

-          <phrase>

-            A newly created UIMA Ruta project.

-          </phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  </para>

-

-  <section id="section.ugr.tools.ruta.workbench.projects.create_projects">

-    <title>UIMA Ruta create project wizard</title>

-    <para>

-      To create a new UIMA Ruta project, switch to UIMA Ruta perspective

-      and click <quote>File &rarr; New &rarr; UIMA Ruta Project</quote>. This opens the corresponding wizard.

-    </para>

-

-    <para>

-      <xref

-        linkend='figure.ugr.tools.ruta.workbench.projects.create_projects.wizard1' />

-      shows the start page of the wizard.

-      <figure

-        id="figure.ugr.tools.ruta.workbench.projects.create_projects.wizard1">

-        <title>Wizard start page</title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="450px" format="PNG" align="center"

-              fileref="&imgroot;projects/wizard1.PNG" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="4.5in" format="PNG" align="center"

-              fileref="&imgroot;projects/wizard1.PNG" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              Wizard start page.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      To create a simple UIMA Ruta project, enter a project name for

-      your project and click

-      <quote>Finish</quote>. This will create everything you need to start.

-    </para>

-    <para>

-      Other possible settings on this page are the desired location of

-      the project,

-      the interpreter to use and the working set you wish to

-      work on, all of them are self-explaining.

-    </para>

-    <!-- 

-    <para>

-      On the second page of the wizard, you can mainly configure the

-      needed build path. This is necessary if you like to use external

-      source

-      folders or if the project to create will be dependent on other

-      projects or if external libraries have to be found. Add the desired

-      configuration in the related tab.

-    </para>

-     -->

-    <para>

-      <xref

-        linkend='figure.ugr.tools.ruta.workbench.projects.create_projects.wizard2' />

-      shows the second page of the wizard.

-      <figure

-        id="figure.ugr.tools.ruta.workbench.projects.create_projects.wizard2">

-        <title>Wizard second page</title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="450px" format="PNG" align="center"

-              fileref="&imgroot;projects/wizard2.PNG" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="4.5in" format="PNG" align="center"

-              fileref="&imgroot;projects/wizard2.PNG" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              Wizard second page.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-

-  </section>

-

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.query.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.query.xml
deleted file mode 100644
index a86e522..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.query.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<section id="section.ugr.tools.ruta.workbench.ruta_query">

-  <title>Ruta Query View</title>

-  <para> With the Query View, the UIMA Ruta language can be used to write queries on a set of

-    documents. A query is simply a set of UIMA Ruta rules. Each query returns a list of all text

-    passages the query applies to. For example, if you have a set of annotated documents containing

-    a number of Author annotations, you could use the Query View to get a list of all the author

-    names associated with these annotations.

-    The set of relevant files can be restricted by a regular expression over the file names, e.g., "files_0[0-9]\\.xmi".

-  </para>

-  <para>

-    <figure id="figure.ugr.tools.ruta.workbench.ruta_query.query_view">

-      <title>The Query View.

-        <emphasis role="bold">(1)</emphasis>

-        Start Button;

-        <emphasis role="bold">(2)</emphasis>

-        Export Button</title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="576px" format="PNG" align="center"

-            fileref="&imgroot;query/Query2.2.0.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="3.0in" format="PNG" align="center"

-            fileref="&imgroot;query/Query2.2.0.png" />

-        </imageobject>

-        <textobject>

-          <phrase>Query View</phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  </para>

-  <para>

-    Use the Query view as follows:

-    <orderedlist numeration="arabic">

-      <listitem>

-        <para>

-          The field

-          <quote>Query Data</quote>

-          specifies the folder containing the documents on which the query should be executed. You

-          can either click on the button next to the field to specify the folder by browsing through

-          the file system or you can drag and drop a folder directly into the field. If the

-          checkbox is activated, all subfolders are included.

-        </para>

-      </listitem>

-      <listitem>

-        <para>

-          The field

-          <quote>Type System</quote>

-          has to contain a type system or a UIMA Ruta script that specifies all types that are used

-          in the query. You can either click on the button next to the field to specify the type

-          system by browsing through the file system or you can drag and drop a type system

-          directly into the field.

-        </para>

-      </listitem>

-      <listitem>

-        <para> The query in form of one or more UIMA Ruta rules is specified in the text field in

-          the middle of the view.</para>

-      </listitem>

-      <listitem>

-        <para> After pressing the start button, the query is started. The results are subsequently

-          displayed in the bottom text field.</para>

-      </listitem>

-    </orderedlist>

-  </para>

-  <para> The resulting list consists of all text passages the query applied to. Above the text

-    field, information about the entire number of matches and the number of different documents the

-    query applied to is given. Each item in the list shows both the matched text passage and in

-    brackets the document related to the text passage. By double-clicking on one of the listed

-    items, the related document is opened in the editor and the matched text passage is selected. If

-    the related document is already open you can jump to another matched text passage within the the

-    same document with one click on the listed item. Of course, this text passage is selected. 

-    By clicking on the export button, a list of all matched text passaged is showed in a

-    separate window. For further usage, e.g. as a list of authors in another UIMA Ruta project,

-    copy the content of this window to another text file.

-  </para>

-  <para> The screenshot shows an example where a rule is used to find occurrences of years within

-    brackets in the input file of the UIMA Ruta example. After pressing the run button the result

-    list contains all occurrences. Recognize that the rule does not create any annotation. The list

-    lists all rule matches, not the created annotations.

-  </para>

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.ruta_perspective.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.ruta_perspective.xml
deleted file mode 100644
index ccc52ec..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.ruta_perspective.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!-- 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. -->

-

-<section id="section.ugr.tools.ruta.workbench.ruta_perspective">

-  <title>UIMA Ruta Perspective</title>

-  <para>

-    The UIMA Ruta perspective is the main view to manage UIMA Ruta

-    projects. There are several views associated with the UIMA Ruta

-    perspective: Annotation Test, Annotation Browser, Selection,

-    TextRuler and Ruta Query. Since Annotation Test, TextRuler and

-    Ruta Query have a stand-alone functionality. They are explained

-    in separate sections.

-  </para>

-

-  <para>

-    To make it possible to reproduce all of the examples used below,

-    switch to the UIMA Ruta Explain perspective within your Eclipse

-    workbench.

-    Import the UIMA Ruta example project and open the main

-    UIMA Ruta script file 'Main.ruta'. Now press the 'Run' button (green

-    arrow) and wait for the end of execution. Open the resulting xmiCAS

-    file 'Test1.txt.xmi', which you can find in the output folder.

-  </para>

-

-  <section

-    id="section.ugr.tools.ruta.workbench.ruta_perspective.annotation_browser">

-    <title>Annotation Browser</title>

-    <para>

-      The Annotation Browser can be used to view the annotations

-      created by the execution of a UIMA Ruta project. If an xmiCAS file

-      is opened and active in the editor, the related annotations are shown

-      in this view.

-    </para>

-    <para>

-      The result of the execution of the UIMA Ruta example project is

-      shown in <xref linkend='figure.ugr.tools.ruta.workbench.ruta_perspective.annotation_browser' />.

-      You can see that there are 5 annotations of 5 different types in the document. 

-      Highlighting of certain types can be controlled by the checkboxes in the tree view. 

-      The names of the types are abbreviated by their package constituents. Full type names are provided by tooltips

-      and can be copied into the clipboard by hitting 'ctrl + c'. 

-      This can be especially useful to paste a type name into the Query View.    

-    </para>

-    <para>

-      <figure

-        id="figure.ugr.tools.ruta.workbench.ruta_perspective.annotation_browser">

-        <title> Annotation Browser view

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="300px" format="PNG" align="center"

-              fileref="&imgroot;ruta/AnnotationBrowser_2.2.0.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="3.0in" format="PNG" align="center"

-              fileref="&imgroot;ruta/AnnotationBrowser_2.2.0.png" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              Annotation Browser view.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      Moreover, this view has two possible filters. Using the

-      <quote>Only types with...</quote>-filter leads to a list containing only those types that contain

-      the entered text. 

-      The <quote>Only annotations with...</quote>-filter leads to an analogous list. 

-      Both list filters can be quickly activated by hitting the return key. 

-    </para>

-	<para>

-		Type highlighting can be reset by the action represented by a

-		switched-off light bulb at the top of the view. 

-		The light bulb that is turned on sets all types visible in the tree view of the page highlighted in the CAS editor.   

-	</para>

-    <para>

-      The user can choose whether parent types are displayed using the preference page <quote>UIMA Cas Editor -> Cas Editor Views</quote>.

-    </para>

-  </section>

-

-  <section id="section.ugr.tools.ruta.workbench.ruta_perspective.selection">

-    <title>Selection</title>

-    <para>

-      The Selection view is very similar to the Annotation Browser

-      view, but only shows annotations that affect a specific text passage.

-      To get such a list, click on any position in the opened xmiCAS

-      document or select a certain text passage.

-    </para>

-    <para>

-      If you select the text passage

-      <literal>2008</literal>, the Selection view will be generated as shown in

-      <xref linkend='figure.ugr.tools.ruta.workbench.ruta_perspective.annotation_browser' />.

-    </para>

-    <para>

-      <figure id="figure.ugr.tools.ruta.workbench.ruta_perspective.selection">

-        <title> Selection view

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="560px" format="PNG" align="center"

-              fileref="&imgroot;ruta/selection.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="5.5in" format="PNG" align="center"

-              fileref="&imgroot;ruta/selection.png" />

-          </imageobject>

-          <textobject>

-            <phrase>

-              Selection view.

-            </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      The Selection view has the same filtering possibilities as

-      described in Annotation Browser view.

-    </para>

-  </section>

-

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.testing.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.testing.xml
deleted file mode 100644
index 726e7f4..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.testing.xml
+++ /dev/null
@@ -1,333 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<section id="section.ugr.tools.ruta.workbench.testing">

-  <title>Testing</title>

-  <para> The UIMA Ruta Workbench comes bundled with its own testing environment that allows you to

-    test and evaluate UIMA Ruta scripts. It provides full back-end testing capabilities and allows

-    you to examine test results in detail.

-  </para>

-  <para> To test the quality of a written UIMA Ruta script, the testing procedure compares a

-    previously annotated gold standard file with the resulting xmiCAS file created by the selected

-    UIMA Ruta script. As a product of the testing operation a new xmiCAS file will be created,

-    containing detailed information about the test results. The evaluators compare the offsets of

-    annotations and, depending on the selected evaluator, add true positive, false positive or false

-    negative annotations for each tested annotation to the resulting xmiCAS file. Afterwards

-    precision, recall and f1-score are calculated for each test file and each type in the test file.

-    The f1-score is also calculated for the whole test set. The testing environment consists of four

-    views: Annotation Test, True Positive, False Positive and False Negative. The Annotation Test

-    view is by default associated with the UIMA Ruta perspective.

-  </para>

-  <note><para>

-    There are two options for choosing the types that should be evaluated, which is specified by the preference <quote>Use all types</quote>.

-    If this preference is activated (by default), then the user has to selected the types using the toolbar in the view. 

-    There are button for selecting the included and excluded types. If this preference is deactivated, 

-    then only the types present in the current test document are evaluated. This can result in missing false positive, if 

-    the an annotation of a specific type was created by the rules and no annotation of this type is present in the test document.

-  </para></note>

-  <para>

-    <xref linkend='figure.ugr.tools.ruta.workbench.testing.script_explorer' />

-    shows the script explorer. Every UIMA Ruta project contains a folder called

-    <quote>test</quote>. This folder is the default location for the test-files. In the folder each script file has its

-    own subfolder with a relative path equal to the scripts package path in the

-    <quote>script</quote> folder. This folder contains the test files. In every scripts test folder, you will also find a

-    result folder where the results of the tests are saved. If you like to use test files from

-    another location in the file system, the results will be saved in the

-    <quote>temp</quote> subfolder of the project's test folder. All files in the temp folder will be deleted once

-    Eclipse is closed.

-  </para>

-  <para>

-    <figure id="figure.ugr.tools.ruta.workbench.testing.script_explorer">

-      <title>Test folder structure. </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata format="PNG" align="center"

-            fileref="&imgroot;testing/script_explorer.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata  format="PNG" align="center"

-            fileref="&imgroot;testing/script_explorer.png" />

-        </imageobject>

-        <textobject>

-          <phrase> The test folder structure.     </phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-  </para>

-  <section id="section.ugr.tools.ruta.workbench.testing.usage">

-    <title>Usage</title>

-    <para> This section describes the general proceeding when using the testing environment. </para>

-    <para>

-      Currently, the testing environment has no own perspective associated to it. It is recommended

-      to start within the UIMA Ruta perspective. There, the Annotation Test view is open by

-      default. The True Positive, False Positive and False Negative views have to be opened

-      manually:

-      <quote>Window -> Show View -> True Positive/False Positive/False Negative </quote>.

-    </para>

-    <para> To explain the usage of the UIMA Ruta testing environment, the UIMA Ruta example project

-      is used again. Open this project. 

-      Firstly, one has to select a script for testing: UIMA Ruta will always test the script, that

-      is currently open and active in the script editor. So, open the

-      <quote>Main.ruta</quote>

-      script file of the UIMA Ruta example project.

-      The next <link linkend='figure.ugr.tools.ruta.workbench.testing.annotation_test_initial_view'>figure</link>.

-      shows the Annotation Test view after doing this.

-    </para>

-    <para>

-      <figure id="figure.ugr.tools.ruta.workbench.testing.annotation_test_initial_view">

-        <title>

-          The Annotation Test view. Button from left to right:

-          Start Test; Select excluded type; Select included type; Select evaluator/preferences; Export to CSV; Extend Classpath

-        </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="576px" format="PNG" align="center"

-              fileref="&imgroot;testing/annotation_test_initial_view_2_2_0.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="5.5in" format="PNG" align="center"

-              fileref="&imgroot;testing/annotation_test_initial_view_2_2_0.png" />

-          </imageobject>

-          <textobject>

-            <phrase> The Annotation Test view.       </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para> All control elements that are needed for the interaction with the testing environment

-      are located here. At the top right, there is the buttons bar. At the top left

-      of the view the name of the script that is going to be tested is shown. It is

-      always equal to the script active in the editor. Below this, the test list is

-      located. This list contains the different files for testing. Right next to the name of the script

-      file you can select the desired view. Right to this you get statistics

-      over all ran tests: the number of all true positives (TP), false positives (FP) and false

-      negatives (FN). In the field below, you will find a table with statistic

-      information for a single selected test file. To change this view, select a file in the test

-      list field. The table shows a total TP, FP and FN information, as well as precision, recall

-      and f1-score for every type as well as for the whole file.

-    </para>

-    <para>

-      There is also an experimental feature to extend the classpath during testing, which allows to 

-      evaluate scripts that call analysis engines in the same workspace.

-      Therefore, you have to toggle the button in the toolbar of the view. 

-    </para>

-    <para>

-      Next, you have to add test files to your project. A test file is a previously annotated xmiCAS

-      file that can be used as a golden standard for the test. You can use any xmiCAS file. The

-      UIMA Ruta example project already contains such test files. These files are listed

-      in the Annotation Test view. Try do delete these files by selecting them and clicking on

-      <literal>Del</literal>. Add these files again by simply dragging them from the Script Explorer into the test file

-      list. A different way to add test-files is to use the

-      <quote>Load all test files from selected folder</quote>

-      button (green plus). It can be used to add all xmiCAS files from a selected folder.

-    </para>

-    <para>

-      Sometimes it is necessary to create some annotations manually: To create annotations manually,

-      use the

-      <quote>Cas Editor</quote>

-      perspective delivered with the UIMA workbench.

-    </para>

-    <para>

-      The testing environment supports different evaluators that allow a

-      sophisticated analysis of the behavior of a UIMA Ruta script. The evaluator can be chosen in

-      the testing environment's preference page. The preference page can be opened either through

-      the menu or by clicking on the

-      <quote>Select evaluator</quote>

-      button (blue gear wheels) in the testing view's toolbar. Clicking the button will open a

-      filtered version of the UIMA Ruta preference page. The default evaluator is the "Exact CAS

-      Evaluator", which compares the offsets of the annotations between the test file and the file

-      annotated by the tested script. To get an overview of all available evaluators, see

-      <xref linkend='section.ugr.tools.ruta.workbench.testing.evaluators' />

-    </para>

-    <para>

-      This preference page (see <xref linkend='figure.ugr.tools.ruta.workbench.testing.preference' />) 

-      offers a few options that will modify the plug-ins general behavior. For example, the

-      preloading of previously collected result data can be turned off. An important option in the

-      preference page is the evaluator you can select. On default the "exact evaluator" is selected,

-      which compares the offsets of the annotations, that are contained in the file produced by the

-      selected script with the annotations in the test file. Other evaluators will compare

-      annotations in a different way.

-    </para>

-    <para>

-      <figure id="figure.ugr.tools.ruta.workbench.testing.preference">

-        <title>The testing preference page view   </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="476px" format="PNG" align="center" fileref="&imgroot;testing/preference_2_2_0.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="4in" format="PNG" align="center" fileref="&imgroot;testing/preference_2_2_0.png" />

-          </imageobject>

-          <textobject>

-            <phrase> The testing preference page view.       </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      During a test-run it might be convenient to disable testing for specific

-      types like punctuation or tags. The

-      <quote>Select excluded types</quote>

-      button (white exclamation in a red disk) will open a dialog (see <xref linkend='figure.ugr.tools.ruta.workbench.testing.excluded_types' />) 

-      where all types can be selected that should not be considered in the test.

-    </para>

-    <para>

-      <figure id="figure.ugr.tools.ruta.workbench.testing.excluded_types">

-        <title>Excluded types window   </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata format="PNG" align="center"

-              fileref="&imgroot;testing/excluded_types.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata format="PNG" align="center"

-              fileref="&imgroot;testing/excluded_types.png" />

-          </imageobject>

-          <textobject>

-            <phrase> Excluded types window.       </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>

-      A test-run can be started by clicking on the start button. Do this for the

-      UIMA Ruta example project.

-      <xref linkend='figure.ugr.tools.ruta.workbench.testing.annotation_test_test_run' />

-      shows the results.

-    </para>

-    <para>

-      <figure id="figure.ugr.tools.ruta.workbench.testing.annotation_test_test_run">

-        <title>The Annotation Test view.   </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata width="576px" format="PNG" align="center"

-              fileref="&imgroot;testing/annotation_test_test_run_2_2_0.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata width="5.5in" format="PNG" align="center"

-              fileref="&imgroot;testing/annotation_test_test_run_2_2_0.png" />

-          </imageobject>

-          <textobject>

-            <phrase> The Annotation Test view.       </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-    <para>The testing main view displays some information on how well the script

-      did after every test run. It will display an overall number of true positive, false positive

-      and false negatives annotations of all result files as well as an overall f1-score.

-      Furthermore, a table will be displayed that contains the overall statistics of the selected

-      test file as well as statistics for every single type in the test file. The information

-      displayed are true positives, false positives, false negatives, precision, recall and

-      f1-measure. </para>

-    <para>

-      The testing environment also supports the export of the overall data in form of a

-      comma-separated table. Clicking the

-      <quote>export data</quote>

-      button will open a dialog window that contains this table. The text in this table can be

-      copied and easily imported into other applications.

-    </para>

-    <para>

-      When running a test, the evaluator will create a new result xmiCAS file and will

-      add new true positive, false positive and false negative annotations. By clicking on a file in

-      the test-file list, you can open the corresponding result xmiCAS file in the CAS

-      Editor. While displaying the result xmiCAS file in the CAS Editor, the True Positive, False

-      Positive and False Negative views allow easy navigation through the new tp, fp and fn

-      annotations. The corresponding annotations are displayed in a hierarchic tree structure. This

-      allows an easy tracing of the results within the testing document. Clicking on one of the

-      annotations in those views will highlight the annotation in the CAS Editor. Opening

-      <quote>test1.result.xmi</quote>

-      in the UIMA Ruta example project changes the True Positive view as shown in

-      <xref linkend='figure.ugr.tools.ruta.workbench.testing.true_positive' />.

-      Notice that the type system, which will be used by the CAS Editor to open the evaluated file, 

-      can only be resolved for the tested script, if the test files are located in the associated

-      folder structure that is the folder with the name of the script. If the files are located 

-      in the temp folder, for example by adding the files to the list of test cases by drag and drop,

-      other strategies to find the correct type system will be applied. For UIMA Ruta projects, 

-      for example, this will be the type system of the last launched script in this project. 

-    </para>

-    <para>

-      <figure id="figure.ugr.tools.ruta.workbench.testing.true_positive">

-        <title>The True Positive view.   </title>

-        <mediaobject>

-          <imageobject role="html">

-            <imagedata format="PNG" align="center"

-              fileref="&imgroot;testing/true_positive.png" />

-          </imageobject>

-          <imageobject role="fo">

-            <imagedata format="PNG" align="center"

-              fileref="&imgroot;testing/true_positive.png" />

-          </imageobject>

-          <textobject>

-            <phrase> The True Positive view.       </phrase>

-          </textobject>

-        </mediaobject>

-      </figure>

-    </para>

-  </section>

-  <section id="section.ugr.tools.ruta.workbench.testing.evaluators">

-    <title>Evaluators</title>

-    <para> When testing a CAS file, the system compared the offsets of the annotations of a

-      previously annotated gold standard file with the offsets of the annotations of the result file

-      the script produced. Responsible for comparing annotations in the two CAS files are

-      evaluators. These evaluators have different methods and strategies implemented for comparing the

-      annotations. Also, an extension point is provided that allows easy implementation

-      of new evaluators. </para>

-    <para> Exact Match Evaluator: The Exact Match Evaluator compares the offsets of the annotations

-      in the result and the golden standard file. Any difference will be marked with either a false

-      positive or false negative annotations. </para>

-    <para> Partial Match Evaluator: The Partial Match Evaluator compares the offsets of the

-      annotations in the result and golden standard file. It will allow differences in the beginning

-      or the end of an annotation. For example, "corresponding" and "corresponding " will not be

-      annotated as an error. </para>

-    <para> Core Match Evaluator: The Core Match Evaluator accepts annotations that share a core

-      expression. In this context, a core expression is at least four digits long and starts with a

-      capitalized letter. For example, the two annotations "L404-123-421" and "L404-321-412" would be

-      considered a true positive match, because "L404" is considered a core expression that is

-      contained in both annotations. </para>

-    <para> Word Accuracy Evaluator: Compares the labels of all words/numbers in an annotation,

-      whereas the label equals the type of the annotation. This has the consequence, for example,

-      that each word or number that is not part of the annotation is counted as a single false

-      negative. For example in the sentence: "Christmas is on the 24.12 every year." The script

-      labels "Christmas is on the 12" as a single sentence, while the test file labels the sentence

-      correctly with a single sentence annotation. While, for example, the Exact CAS Evaluator is

-      only assigning a single False Negative annotation, Word Accuracy Evaluator will mark every word

-      or number as a single false negative. </para>

-    <para> Template Only Evaluator: This Evaluator compares the offsets of the annotations and the

-      features, that have been created by the script. For example, the text "Alan Mathison Turing" is

-      marked with the author annotation and "author" contains 2 features: "FirstName" and

-      "LastName". If the script now creates an author annotation with only one feature, the

-      annotation will be marked as a false positive. </para>

-    <para> Template on Word Level Evaluator: The Template On Word Evaluator compares the offsets of

-      the annotations. In addition, it also compares the features and feature structures and the

-      values stored in the features. For example, the annotation "author" might have features like

-      "FirstName" and "LastName". The authors name is "Alan Mathison Turing" and the script correctly

-      assigns the author annotation. The feature assigned by the script are "Firstname : Alan",

-      "LastName : Mathison", while the correct feature values are "FirstName Alan" and "LastName

-      Turing". In this case, the Template Only Evaluator will mark an annotation as a false positive,

-      since the feature values differ. </para>

-  </section>

-</section>
\ No newline at end of file
diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml
deleted file mode 100644
index 466b489..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml
+++ /dev/null
@@ -1,254 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-

-<section id="section.tools.ruta.workbench.textruler">

-  <title>TextRuler</title>

-  <para>

-    Apache UIMA Ruta TextRuler is a framework for supervised rule induction included in the UIMA Ruta Workbench. 

-    It provides several configurable algorithms, which are able to learn new rules based on given labeled data.

-    The framework was created in order to support the user by suggesting new rules for the given task. 

-    The user selects a suitable learning algorithm and adapts its configuration parameters. Furthermore, 

-    the user engineers a set of annotation-based features, which enable the algorithms to form efficient, effective and comprehensive rules.

-    The rule learning algorithms present their suggested rules in a new view, in which the user can either copy 

-    the complete script or single rules to a new script file, where the rules can be further refined.

-  </para>

-  <para>

-    This section gives a short introduction about the included features and learners, and how to use the framework to learn UIMA Ruta rules. First, the 

-    available rule learning algorithms are introduced in <xref linkend="section.tools.ruta.workbench.textruler.learner"/>. Then, 

-    the user interface and the usage is explained in <xref linkend="section.tools.ruta.workbench.textruler.ui"/> and 

-    <xref linkend="section.tools.ruta.workbench.textruler.example"/> illustrates the usage with an exemplary UIMA Ruta project.

-  </para>

-   <section id="section.tools.ruta.workbench.textruler.learner">

-    <title>Included rule learning algorithms</title>

-    <para>

-      This section gives a short description of the rule learning algorithms,

-      which are provided in the UIMA Ruta TextRuler framework.

-      </para>

-      <section id="section.tools.ruta.workbench.textruler.lp2">

-      <title>LP2</title>

-      <note>

-      <para>

-        This rule learner is an experimental implementation of the ideas and algorithms published in:

-        F. Ciravegna. (LP)2, Rule Induction for Information Extraction Using Linguistic

-        Constraints. Technical Report CS-03-07, Department of Computer Science, University of

-        Sheffield, Sheffield, 2003.

-      </para>

-      </note>

-      <para>This algorithms learns separate rules for

-        the beginning and the end of a single slot, which are later combined 

-        in order to identify the targeted annotation. The learning strategy is a bottom-up covering

-        algorithm. It starts by creating a specific seed instance with a window of w tokens to the

-        left and right of the target boundary and searches for the best generalization. Additional context rules are

-        induced in order to identify missing boundaries. The current implementation does not support correction rules.

-        The TextRuler framework provides two versions of this algorithm: LP2 (naive) is a straightforward implementation

-        with limited expressiveness concerning the resulting Ruta rules. LP2 (optimized) is an improved 

-        version with a dynamic programming approach and is providing better results in general.

-        The following parameters are available. For a more detailed description of the parameters, 

-        please refer to the implementation and the publication.

-      </para>

-      <para>

-      <itemizedlist>

-        <listitem>

-          <para>Context Window Size (to the left and right)</para>

-        </listitem>

-        <listitem>

-          <para>Best Rules List Size</para>

-        </listitem>

-        <listitem>

-          <para>Minimum Covered Positives per Rule</para>

-        </listitem>

-        <listitem>

-          <para>Maximum Error Threshold</para>

-        </listitem>

-        <listitem>

-          <para>Contextual Rules List Size</para>

-        </listitem>

-      </itemizedlist>

-      </para>

-    </section>

-    

-    <section id="section.tools.ruta.workbench.textruler.whisk">

-      <title>WHISK</title>

-      <note>

-      <para>

-        This rule learner is an experimental implementation of the ideas and algorithms published in:

-        Stephen Soderland, Claire Cardie, and Raymond Mooney. Learning Information

-        Extraction Rules for Semi-Structured and Free Text. In Machine Learning, volume 34,

-        pages 233-272, 1999.

-      </para>

-      </note>

-      <para>WHISK is a multi-slot method that operates on all three kinds of documents and learns

-        single- or multi-slot rules looking similar to regular expressions. However, the current implementation only support single slot rules.

-        The top-down covering algorithm begins with the most general rule and specializes it by adding single rule terms

-        until the rule does not make errors anymore on the training set. The TextRuler framework provides two versions of this algorithm:

-        WHISK (token) is a naive token-based implementation. WHISK (generic) is an optimized and improved implementation, 

-        which is able to refer to arbitrary annotations and also supports primitive features. The following parameters are available. For a more detailed description of the parameters, 

-        please refer to the implementation and the publication.

-        </para>

-      <para>

-      <itemizedlist>

-        <listitem>

-          <para>Parameters Window Size</para>

-        </listitem>

-        <listitem>

-          <para>Maximum Error Threshold</para>

-        </listitem>

-        <listitem>

-          <para>PosTag Root Type</para>

-        </listitem>

-        <listitem>

-          <para>Considered Features (comma-separated) - only WHISK (generic)</para>

-        </listitem>

-      </itemizedlist>

-      </para>

-    </section>  

-    <section id="section.tools.ruta.workbench.textruler.trabal">

-      <title>TraBaL</title>

-      <note>

-      <para>

-        This rule learner is an implementation of the ideas and algorithms published in:

-        Benjamin Eckstein, Peter Kluegl, and Frank Puppe. Towards Learning Error-Driven 

-        Transformations for Information Extraction. Workshop Notes of the LWA 2011 - 

-        Learning, Knowledge, Adaptation, 2011.

-      </para>

-      </note>

-      <para>

-        The TraBal rule learner induces rules that try to correct annotations error and relies on two set of documents. A set of 

-        documents with gold standard annotation and an additional set of annotated documents with the same text that possibly contain erroneous

-        annotations, for which correction rules should be learnt. First, the algorithm compares the two sets of documents and 

-        identifies the present errors. Then, rules for each error are induced and extended. This process can be iterated in order 

-        to incrementally remove all errors. The following parameters are available. For a more detailed description of the parameters, 

-        please refer to the implementation and the publication.

-      </para>

-      <para>

-      <itemizedlist>

-        <listitem>

-          <para>Number of times, the algorithm iterates.</para>

-        </listitem>

-        <listitem>

-          <para>Number of basic rules to be created for one example.</para>

-        </listitem>

-        <listitem>

-          <para>Number of optimized rules to be created for one example.</para>

-        </listitem>

-        <listitem>

-          <para>Maximum number of iterations, when optimizing rules.</para>

-        </listitem>

-        <listitem>

-          <para>Maximum allowed error rate.</para>

-        </listitem>

-        <listitem>

-          <para>Correct features in rules and conditions. (not yet available)</para>

-        </listitem>

-      </itemizedlist>

-      </para>

-    </section>

-        <section id="section.tools.ruta.workbench.textruler.kep">

-      <title>KEP</title>

-      <!-- 

-      <note>

-      <para>

-      </para>

-      </note>

-       -->

-      <para>

-        The name of the rule learner KEP (knowledge engineering patterns) is derived from the idea that humans use different engineering patterns 

-        to write annotation rules. This algorithms implements simple rule induction methods for some patterns, such as boundary detection 

-        or annotation-based restriction of the window. The results are then combined in order to take advantage of the combination of 

-        the different kinds of induced rules. Since the single rules are constructed according to how humans engineer the annotations rules, 

-        the resulting rule set should resemble more a handcrafted rule set. Furthermore, by exploiting the synergy of the patterns, solutions for 

-        some annotation are much simpler. The following parameters are available. For a more detailed description of the parameters, 

-        please refer to the implementation.

-      </para>

-      <para>

-      <itemizedlist>

-        <listitem>

-          <para>Maximum number of <quote>Expand Rules</quote></para>

-        </listitem>

-        <listitem>

-          <para>Maximum number of <quote>Infiller Rules</quote></para>

-        </listitem>

-      </itemizedlist>

-      </para>

-    </section>

-  </section>  

-   <section id="section.tools.ruta.workbench.textruler.ui">

-   <title>The TextRuler view</title>

-      <para> 

-        The TextRuler view is normally located in the lower center of the UIMA Ruta perspective and is the main

-        user interface to configure and start the rule learning algorithms. The view consists of four parts (cf. <xref linkend="figure.tools.ruta.workbench.textruler.main"/>): 

-        The toolbar contains buttons for starting (green button) and stopping (red button) the learning process, 

-        and one button that opening the preference page (blue gears) for configuring the rule induction algorithms cf. <xref linkend="figure.tools.ruta.workbench.textruler.pref"/>.

-        The upper part of the view contains text fields for defining the set of utilized documents. <quote>Training Data</quote>

-        points to the absolute location of the folder containing the gold standard documents. <quote>Additional Data</quote> points

-        to the absolute location of documents that can be additionally used by the algorithms. These documents are currently only needed

-        by the TraBal algorithm, which tries to learn correction rules for the error in those documents. <quote>Test Data</quote> is not yet available.

-        Finally, <quote>Preprocess Script</quote> points to the absolute location of a UIMA Ruta script, which contains all necessary types and can be applied

-        on the documents before the algorithms start in order to add additional annotations as learning features. The preprocessing can be skipped.

-        All text fields support drag and drop: the user can drag a file in the script explorer and drop it in the respective text field.

-        In the center of the view, the target types, for which rule should be induced, can be specified in the <quote>Information Types</quote> list.

-        The list <quote>Featured Feature Types</quote> specify the filtering settings, but it is discourage to change these settings. The user is able to drop

-        a simple text file, which contains a type with complete namespace in each line, to the <quote>Information Types</quote> list in order to add all those types.

-        The lower part of the view contains the list of available algorithms. All checked algorithms will be started, if the start button in the toolbar of the view is pressed.

-        When the algorithms are started, they display their current action after their name, and a result view with the currently induced rules is displayed 

-        in the right part of the perspective.

-      </para>

-      <figure id="figure.tools.ruta.workbench.textruler.main">

-      <title>The UIMA Ruta TextRuler framework

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="776px" format="PNG" align="center"

-            fileref="&imgroot;textruler/textruler.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="5.4in" format="PNG" align="center"

-            fileref="&imgroot;textruler/textruler.png" />

-        </imageobject>

-        <textobject>

-          <phrase>UIMA Ruta TextRuler framework</phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-    <figure id="figure.tools.ruta.workbench.textruler.pref">

-      <title>The UIMA Ruta TextRuler Preferences

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="576px" format="PNG" align="center"

-            fileref="&imgroot;textruler/textruler_pref.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="3.3in" format="PNG" align="center"

-            fileref="&imgroot;textruler/textruler_pref.png" />

-        </imageobject>

-        <textobject>

-          <phrase>UIMA Ruta TextRuler Preferences</phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-   </section>

-</section>

diff --git a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.xml b/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.xml
deleted file mode 100644
index fc5e9a9..0000000
--- a/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"

-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"[

-<!ENTITY imgroot "images/tools/ruta/workbench/" >

-<!ENTITY % uimaents SYSTEM "../../target/docbook-shared/entities.ent" >  

-%uimaents;

-]>

-<!--

-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.

--->

-  

-<chapter id="ugr.tools.ruta.workbench">

-  <title>Apache UIMA Ruta Workbench</title>

-  <para>

-  The Apache UIMA Ruta Workbench, which is made available as an Eclipse-plugin, offers a powerful environment for creating and working on UIMA Ruta projects. It provides two main

-  perspectives and several views to develop, run, debug, test and evaluate UIMA Ruta

-  rules in a comfortable way, supporting many of the known Eclipse features, e.g., auto-completion.

-  Moreover, it makes the creation of dictionaries like tree word lists easy and supports machine

-  learning methods, which can be used within a knowledge engineering process. The following chapter

-  starts with the installation of the workbench, followed by a description of all its features.

-  </para>

-

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.install.xml" />

-

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.overview.xml" />

-

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.projects.xml" />

-

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.ruta_perspective.xml" />

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.explain_perspective.xml" />

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.cde.xml" />

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.query.xml" />

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.testing.xml" />

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.textruler.xml" />

-

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.check.xml" />

-  

-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tools.ruta.workbench.create_dictionaries.xml" />

-  

-  <section id="ugr.tools.ruta.workbench.apply">

-    <title>Apply a UIMA Ruta script to a folder</title>

-    <para>

-      The UIMA Ruta Workbench makes it possible to apply a UIMA Ruta script to any folder of the workspace. 

-      Select a folder in the script explorer, right-click to open the context menu and select the menu entry UIMA Ruta.

-      There are three options to apply a UIMA Ruta script to the files of the selected folder, 

-      cf. <xref linkend='figure.ugr.tools.ruta.workbench.apply' />.

-    </para>

-    <para>

-      <orderedlist numeration="arabic">

-        <listitem>

-        <para>

-          <emphasis role="bold">Quick Ruta</emphasis> applies the UIMA Ruta script that is currently opened and focused

-          in the UIMA Ruta editor to all suitable files in the selected folder. Files of the type <quote>xmi</quote> will be adapted 

-          and a new xmi-file will be created for other files like txt-files.

-        </para>

-        </listitem>

-        <listitem>

-        <para>

-          <emphasis role="bold">Quick Ruta (remove basics)</emphasis> is very similar to the previous menu entry,

-           but removes the annotations of the type <quote>RutaBasic</quote> after processing a CAS.

-        </para>

-        </listitem>

-        <listitem>

-        <para>

-          <emphasis role="bold">Quick Ruta (no xmi)</emphasis> applies the UIMA Ruta script, but does not change

-           nor create an xmi-file. This menu entry can, for example, be used in combination with an imported XMIWriter Analysis Engine, which 

-           stores the result of the script in a different folder depending on the execution of the rules.

-        </para>

-        </listitem>

-      </orderedlist>

-    </para>

-    <para>

-    <figure id="figure.ugr.tools.ruta.workbench.apply">

-      <title>Remove Ruta basics

-      </title>

-      <mediaobject>

-        <imageobject role="html">

-          <imagedata width="250px" format="PNG" align="center"

-            fileref="&imgroot;apply/apply.png" />

-        </imageobject>

-        <imageobject role="fo">

-          <imagedata width="3.5in" format="PNG" align="center"

-            fileref="&imgroot;apply/apply.png" />

-        </imageobject>

-        <textobject>

-          <phrase>

-            Apply a UIMA Ruta script directly on a folder.

-          </phrase>

-        </textobject>

-      </mediaobject>

-    </figure>

-    </para>

-    

-  </section>

- 

-</chapter>
\ No newline at end of file
diff --git a/trunk/ruta-eclipse-feature/build.properties b/trunk/ruta-eclipse-feature/build.properties
deleted file mode 100644
index 5ea99d2..0000000
--- a/trunk/ruta-eclipse-feature/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#	 ***************************************************************

-#	 * 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.

-#	 ***************************************************************

-bin.includes = feature.xml

diff --git a/trunk/ruta-eclipse-feature/feature.properties b/trunk/ruta-eclipse-feature/feature.properties
deleted file mode 100644
index 631d28c..0000000
--- a/trunk/ruta-eclipse-feature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-#	 ***************************************************************

-#	 * 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.

-#	 ***************************************************************

-

-# do not delete this file - it is required for optimized site generation

-# feature.properties

-# contains externalized strings for feature.xml

-# "%foo" in feature.xml corresponds to the key "foo" in this file

-# java.io.Properties file (ISO 8859-1 with "\" escapes)

-# This file should be translated.

-

-# "licenseURL" property - URL of the "Feature License"

-# do not translate value - just change to point to a locale-specific HTML page

-licenseURL=uima-eclipse-user-agreement.html

-

-# "license" property - text of the "Feature Update License"

-# should be plain text version of license agreement pointed to be "licenseURL"

-license=\

-Apache UIMA (TM) Software User Agreement for Eclipse Features and Plugins\n\

-February 4, 2013\n\

-\n\

-Usage Of Content\n\

-\n\

-THE APACHE SOFTWARE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS\n\

-(COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND\n\

-CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE\n\

-OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR\n\

-NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND\n\

-CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\

-\n\

-\n\

-Applicable Licenses\n\

-\n\

-Unless otherwise indicated, all Content made available by the Apache Software Foundation is provided \n\

-tto you under the terms and conditions of the Apache Software License Version 2.0\n\

-("ASL").  A copy of the ASL is provided with this Content and is also available at \n\

-http://www.apache.org/licenses/LICENSE-2.0.html.\n\

-For purposes of the ASL, "Program" will mean the Content.\n\

-\n\

-Content includes, but is not limited to, source code, object code, documentation and other files maintained in the \n\

-Apache Software Foundation source code repository ("Repository") in software modules ("Modules") \n\

-and made available as downloadable archives ("Downloads").\n\

-\n\

- - Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  \n\

-   Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").\n\

- \n\

- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java (TM) ARchive) in a directory named "plugins".\n\

- \n\

- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  \n\

-   Each Feature may be packaged as a sub-directory in a directory named "features".  \n\

-   Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins\n\

-   and/or Fragments associated with that Feature.\n\

-      \n\

- - Features may also include other Features ("Included Features"). \n\

-   Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\

-\n\

-\n\

-The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts") or "LICENSE" ("Licenses"). \n\

-The terms and conditions governing Features and Included Features should be contained in files named "LICENSE" ("Feature Licenses").  \n\

-Abouts, Licenses and Feature Licenses may be located in any directory of a Download or Module including, but not limited to the following locations:\n\

-\n\

- - The top-level (root) directory\n\

- \n\

- - Plug-in and Fragment directories\n\

-\n\

- - Inside Plug-ins and Fragments packaged as JARs\n\

-\n\

- - Sub-directories of the directory named "src" of certain Plug-ins\n\

-\n\

- - Feature directories\n\

-\n\

-\n\

-Note: if a Feature made available by the Apache Software Foundation is installed using the Provisioning Technology (as defined below), \n\

-you must agree to a license ("Feature Update License") during the installation process.  \n\

-If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions \n\

-governing the Included Features or inform you where you can locate them.  \n\

-Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.\n\

-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions \n\

-(or references to such terms and conditions) that govern your use of the associated Content in that directory.\n\

-\n\

-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE ASL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\

-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\

-\n\

-  - Eclipse Public License Version 1.0 (available at http://www.eclipse.org/legal/epl-v10.html)\n\

-  - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\

-  - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\

-  - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\

-  - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\

-  \n\

-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please\n\

-contact the Apache Software Foundation to determine what terms and conditions govern that particular Content.\n\

-\n\

-\n\

-Use of Provisioning Technology\n\

-\n\

-The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse\n\

-   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or\n\

-   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to\n\

-   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at \n\

-   http://eclipse.org/equinox/p2/repository_packaging.html\n\

-   ("Specification").\n\

-\n\

-You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the\n\

-   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\

-   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the\n\

-   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:\n\

-\n\

-  1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology\n\

-     on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based\n\

-     product.\n\

-  2. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be\n\

-     accessed and copied to the Target Machine.\n\

-  3. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable\n\

-     Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target\n\

-     Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern\n\

-     the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\

-     indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.\n\

-\n\

-\n\

-Cryptography\n\

-\n\

-Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to\n\

-another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,\n\

-possession, or use, and re-export of encryption software, to see if this is permitted.\n\

-\n\

-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n\

-Apache UIMA is a trademark of the Apache Software Foundation in the United States, other countries, or both.\n\

- 

-  

-########### end of license property ##########################################

diff --git a/trunk/ruta-eclipse-feature/marker-file-identifying-eclipse-feature b/trunk/ruta-eclipse-feature/marker-file-identifying-eclipse-feature
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-eclipse-feature/marker-file-identifying-eclipse-feature
+++ /dev/null
diff --git a/trunk/ruta-eclipse-feature/pom.xml b/trunk/ruta-eclipse-feature/pom.xml
deleted file mode 100644
index 89e665f..0000000
--- a/trunk/ruta-eclipse-feature/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.    

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-    

-  <artifactId>ruta-eclipse-feature</artifactId>

-  

-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <description>UIMA Eclipse Plugin Feature that

-    contains the UIMA Ruta engine and IDE</description>

-  <url>${uimaWebsiteUrl}</url>

-

-  <!-- Special inheritance note

-       even though the <scm> element that follows is exactly the 

-       same as those in super poms, it cannot be inherited because 

-       there is some special code that computes the connection elements

-       from the chain of parent poms, if this is omitted. 

-       

-       Keeping this a bit factored allows cutting/pasting the <scm>

-       element, and just changing the following two properties -->  

-  <scm>

-    <connection>

-      scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-eclipse-feature

-    </connection>

-    <developerConnection>

-      scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-eclipse-feature

-    </developerConnection>

-    <url>

-      http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-eclipse-feature

-    </url>

-  </scm>

-  

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-    <postNoticeText>${uniWueNoticeText}</postNoticeText>

-  </properties>

-

-  <build>

-    <!-- parsedVersion set in parent-pom by builder-helper -->

-    <finalName>${project.artifactId}_${parsedVersion.osgiVersion}</finalName>

-    <!-- turn on filtering for these resources -->         

-    <resources>

-      <resource>

-        <directory>${basedir}</directory>

-        <includes>

-          <include>feature.properties</include>

-          <include>feature.xml</include>

-          <include>uima-eclipse-user-agreement.html</include>

-        </includes>

-        <filtering>true</filtering>

-      </resource>

-    </resources>

-    

-    <plugins>

-      <!-- filter the feature.xml to have the right version info 

-           for Eclipse at the top level-->

-      <plugin>

-        <artifactId>maven-resources-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>filter feature.xml</id>

-            <!-- run before process-resources, which uses this result -->

-            <phase>generate-resources</phase>

-            <goals><goal>copy-resources</goal></goals>

-            <configuration>

-              <outputDirectory>${basedir}</outputDirectory>

-              <resources>

-                <resource>

-                  <directory>src/main/resources</directory>

-                  <includes><include>feature.xml</include></includes>

-                  <filtering>true</filtering>

-                </resource>

-              </resources> 

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-eclipse-feature/src/main/resources/feature.xml b/trunk/ruta-eclipse-feature/src/main/resources/feature.xml
deleted file mode 100644
index 191753e..0000000
--- a/trunk/ruta-eclipse-feature/src/main/resources/feature.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?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.    
--->

-<feature

-      id="org.apache.uima.ruta.feature"

-      label="UIMA Ruta Workbench"

-      version="${parsedVersion.osgiVersion}"

-      provider-name="Apache Software Foundation">

-

-   <description url="http://uima.apache.org">

-      This feature packages the Apache UIMA Ruta Workbench

-   </description>

-

-   <copyright url="http://www.apache.org/licenses/LICENSE-2.0">

-      Copyright the Apache Software Foundation and others; see License
-and NOTICE files

-   </copyright>

-

-   <license url="%licenseURL">

-      %license

-   </license>

-

-   <url>

-      <discovery label="UIMA Eclipse Plugins update site" url="http://www.apache.org/dist/uima/eclipse-update-site/"/>

-   </url>

-

-   <requires>

-      <import feature="org.apache.uima.tools" version="2.4.1" match="greaterOrEqual"/>

-      <import feature="org.eclipse.dltk.core" version="3.0.0" match="greaterOrEqual"/>

-   </requires>

-

-   <plugin

-         id="org.apache.uima.ruta.addons"

-         download-size="0"

-         install-size="0"

-         version="${parsedVersion.osgiVersion}"

-         unpack="false"/>

-

-   <plugin

-         id="org.apache.uima.ruta.caseditor"

-         download-size="0"

-         install-size="0"

-         version="${parsedVersion.osgiVersion}"

-         unpack="false"/>

-

-   <plugin

-         id="org.apache.uima.ruta.engine"

-         download-size="0"

-         install-size="0"

-         version="${parsedVersion.osgiVersion}"

-         unpack="false"/>

-

-   <plugin

-         id="org.apache.uima.ruta.ide"

-         download-size="0"

-         install-size="0"

-         version="${parsedVersion.osgiVersion}"

-         unpack="false"/>

-

-   <plugin

-         id="org.apache.uima.ruta.ide.ui"

-         download-size="0"

-         install-size="0"

-         version="${parsedVersion.osgiVersion}"

-         unpack="false"/>

-

-   <plugin

-         id="org.apache.uima.ruta.textruler"

-         download-size="0"

-         install-size="0"

-         version="${parsedVersion.osgiVersion}"

-         unpack="false"/>

-         

-   <plugin

-         id="org.apache.uima.ruta.core.ext"

-         download-size="0"

-         install-size="0"

-         version="${parsedVersion.osgiVersion}"

-         unpack="false"/>

-

-</feature>

diff --git a/trunk/ruta-eclipse-feature/uima-eclipse-user-agreement.html b/trunk/ruta-eclipse-feature/uima-eclipse-user-agreement.html
deleted file mode 100644
index 0021f21..0000000
--- a/trunk/ruta-eclipse-feature/uima-eclipse-user-agreement.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

-<html xmlns="http://www.w3.org/1999/xhtml">

-<head>

-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

-<title>Apache UIMA Software User Agreement for Eclipse Features and Plugins</title>

-</head>

-

-<body lang="EN-US">

-<h2>Apache UIMA&trade; Software User Agreement for Eclipse Features and Plugins</h2>

-<p>February 4, 2013</p>

-

-<h3>Usage Of Content</h3>

-

-<p>

-THE APACHE SOFTWARE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS

-(COLLECTIVELY &quot;CONTENT&quot;).  

-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND

-   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE

-   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR

-   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND

-   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

-</p>

-

-<h3>Applicable Licenses</h3>

-

-<p>Unless otherwise indicated, all Content made available by the Apache Software Foundation is provided 

-to you under the terms and conditions of the Apache Software License Version 2.0

-(&quot;ASL&quot;).  A copy of the ASL is provided with this Content and is also available at 

-<a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>.

-For purposes of the ASL, &quot;Program&quot; will mean the Content.</p>

-

-<p>Content includes, but is not limited to, source code, object code, 

-documentation and other files maintained in the Apache Software Foundation source code

-repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) 

-and made available as downloadable archives (&quot;Downloads&quot;).</p>

-

-<ul>

-       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  

-       Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features 

-       (&quot;Features&quot;).</li>

-       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named 

-       &quot;plugins&quot;.</li>

-       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  

-       Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;.  

-       Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins

-       and/or Fragments associated with that Feature.</li>

-       <li>Features may also include other Features (&quot;Included Features&quot;). 

-       Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>

-</ul>

-

-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;) or 

-&quot;LICENSE&quot; (&quot;Licenses&quot;). The terms and conditions governing Features and

-Included Features should be contained in files named &quot;LICENSE&quot; (&quot;Feature Licenses&quot;).  

-Abouts, Licenses and Feature Licenses may be located in any directory of a Download or Module

-including, but not limited to the following locations:</p>

-

-<ul>

-       <li>The top-level (root) directory</li>

-       <li>Plug-in and Fragment directories</li>

-       <li>Inside Plug-ins and Fragments packaged as JARs</li>

-       <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>

-       <li>Feature directories</li>

-</ul>

-

-<p>Note: if a Feature made available by the Apache Software Foundation is installed using the Provisioning Technology (as defined below), 

-you must agree to a license (&quot;Feature Update License&quot;) during the

-installation process.  

-If the Feature contains Included Features, the Feature Update License should either 

-provide you with the terms and conditions governing the Included Features or

-inform you where you can locate them.  Feature Update Licenses may be found in the &quot;license&quot; property 

-of files named &quot;feature.properties&quot; found within a Feature.

-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions 

-(or references to such terms and conditions) that govern your use of the associated Content in

-that directory.</p>

-

-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE ASL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.

-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>

-

-<ul>

-       <li>Eclipse Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></li>

-       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>

-       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>

-       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>

-       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>

-</ul>

- 

-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please

-contact the Apache Software Foundation to determine what terms and conditions govern that particular Content.</p>

-

-<h3>Use of Provisioning Technology</h3>

-

-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse

-   Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or

-   other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to

-   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a

-       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>

-   (&quot;Specification&quot;).</p>

-

-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the

-   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology

-   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the

-   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>

-

-<ol>

-       <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology

-       on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based

-       product.</li>

-       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be

-       accessed and copied to the Target Machine.</li>

-       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable

-       Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target

-       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern

-       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such

-       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>

-</ol>

-

-<h3>Cryptography</h3>

-

-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to

-   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,

-   possession, or use, and re-export of encryption software, to see if this is permitted.</p>

-

-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

-Apache UIMA is a trademark of the Apache Software Foundation in the United States, other countries, or both.</small></p>

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/ruta-eclipse-update-site/marker-file-identifying-eclipse-update-site b/trunk/ruta-eclipse-update-site/marker-file-identifying-eclipse-update-site
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-eclipse-update-site/marker-file-identifying-eclipse-update-site
+++ /dev/null
diff --git a/trunk/ruta-eclipse-update-site/pom.xml b/trunk/ruta-eclipse-update-site/pom.xml
deleted file mode 100644
index 3d9550b..0000000
--- a/trunk/ruta-eclipse-update-site/pom.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?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.    

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-	<modelVersion>4.0.0</modelVersion>

-  

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>parent-pom</artifactId>

-    <version>10</version>

-    <relativePath />

-  </parent>

-  

-	<artifactId>ruta-eclipse-update-site</artifactId>

-	<packaging>pom</packaging>

-	<version>2.3.0</version>

-  

-	<name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <description>The UIMA Ruta Eclipse update site</description>

-  <url>${uimaWebsiteUrl}</url>

-

-  <scm>

-    <connection>

-      scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-eclipse-update-site

-    </connection>

-    <developerConnection>

-      scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-eclipse-update-site

-    </developerConnection>

-    <url>

-      http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-eclipse-update-site

-    </url>

-  </scm>

-  

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-    <eclipseUpdateSiteComponent>ruta</eclipseUpdateSiteComponent>

-    <eclipseUpdateSubSite>${project.build.directory}/eclipse-update-site/${eclipseUpdateSiteComponent}</eclipseUpdateSubSite>

-    <item-maven-release-version>2.3.0</item-maven-release-version>

-    <item-eclipse-release-version>2.3.0</item-eclipse-release-version>

-  </properties>

-	<build>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>marker-file-identifying-eclipse-update-site</exclude> <!-- marker file -->

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-		<plugins>

-			<plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-dependency-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>copy-new-plugins</id>

-            <goals><goal>copy</goal></goals>

-            <configuration>

-              <!-- ===================================================================

-                                       the PLUGINS 

-                ======================================================================= -->

-              <artifactItems>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-addons</artifactId>         <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.addons_${item-eclipse-release-version}.jar   </destFileName></artifactItem>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-caseditor</artifactId>      <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.caseditor_${item-eclipse-release-version}.jar</destFileName></artifactItem>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-engine</artifactId>         <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.engine_${item-eclipse-release-version}.jar   </destFileName></artifactItem>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-ide</artifactId>            <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.ide_${item-eclipse-release-version}.jar      </destFileName></artifactItem>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-ide-ui</artifactId>         <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.ide.ui_${item-eclipse-release-version}.jar   </destFileName></artifactItem>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-textruler</artifactId>      <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.textruler_${item-eclipse-release-version}.jar</destFileName></artifactItem>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-core-ext</artifactId>      <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.core.ext_${item-eclipse-release-version}.jar</destFileName></artifactItem>

-              </artifactItems>            

-              <outputDirectory>${toBePacked}</outputDirectory>              

-            </configuration>

-          </execution>

-          <execution>

-            <id>copy-features</id>

-            <goals>

-              <goal>copy</goal>

-            </goals>

-            <configuration>

-              <!-- ===================================================================

-                                         the FEATURES

-                ======================================================================= -->

-              <artifactItems>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-eclipse-feature</artifactId><version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.feature_${item-eclipse-release-version}.jar</destFileName></artifactItem>

-              </artifactItems>

-              <outputDirectory>${project.build.directory}/eus-work/features</outputDirectory>   

-            </configuration>

-          </execution>

-        </executions>

-			</plugin>

-      <plugin>

-        <!-- Override v 6 parent pom incorrect use of apacheRelease ant property

-             See https://issues.apache.org/jira/browse/UIMA-3080 -->

-        <artifactId>maven-antrun-plugin</artifactId>

-        <executions>       

-          <execution>

-            <id>BuildUpdateSite-pack-svnget-buildMetadata-commit-to-dev</id>

-            <configuration>

-              <target>

-                <condition />  <!-- don't add anything to the 1st condition element -->

-                <condition />  <!-- don't add anything to the 2nd condition element -->

-                              <!-- insert this as the 3rd condition element -->

-                <condition property="apacheRelease">

-                  <equals arg1="${isApacheRelease}" arg2="true" />

-                </condition>

-              </target>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-		</plugins>

-	</build>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-eclipse-update-site/src/main/resources/category.xml b/trunk/ruta-eclipse-update-site/src/main/resources/category.xml
deleted file mode 100644
index f858a70..0000000
--- a/trunk/ruta-eclipse-update-site/src/main/resources/category.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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.

-   ***************************************************************

-   -->

-<site>

-   <feature url="features/org.apache.uima.ruta.feature_${parsedVersion.osgiVersion}.jar" id="org.apache.uima.ruta.feature" version="${parsedVersion.osgiVersion}">

-      <category name="apache-uima-ruta"/>

-   </feature>

-   <category-def name="apache-uima-ruta" label="Apache UIMA Ruta">

-      <description>

-         Apache UIMA Ruta

-      </description>

-   </category-def>

-</site>

diff --git a/trunk/ruta-ep-addons/icons/10224.folder.gif b/trunk/ruta-ep-addons/icons/10224.folder.gif
deleted file mode 100755
index 42e027c..0000000
--- a/trunk/ruta-ep-addons/icons/10224.folder.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/10386.add_correction.gif b/trunk/ruta-ep-addons/icons/10386.add_correction.gif
deleted file mode 100755
index ee809ad..0000000
--- a/trunk/ruta-ep-addons/icons/10386.add_correction.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/10439.output_folder_attrib.gif b/trunk/ruta-ep-addons/icons/10439.output_folder_attrib.gif
deleted file mode 100755
index 4b39f0a..0000000
--- a/trunk/ruta-ep-addons/icons/10439.output_folder_attrib.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/10551.add_exc.gif b/trunk/ruta-ep-addons/icons/10551.add_exc.gif
deleted file mode 100755
index 252d7eb..0000000
--- a/trunk/ruta-ep-addons/icons/10551.add_exc.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/10563.add_as_source_folder.gif b/trunk/ruta-ep-addons/icons/10563.add_as_source_folder.gif
deleted file mode 100755
index 3900d88..0000000
--- a/trunk/ruta-ep-addons/icons/10563.add_as_source_folder.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/10731.groupsheader.gif b/trunk/ruta-ep-addons/icons/10731.groupsheader.gif
deleted file mode 100755
index 7ca11cd..0000000
--- a/trunk/ruta-ep-addons/icons/10731.groupsheader.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/10761.go-into.gif b/trunk/ruta-ep-addons/icons/10761.go-into.gif
deleted file mode 100755
index 98d316d..0000000
--- a/trunk/ruta-ep-addons/icons/10761.go-into.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/10892.resource_persp.gif b/trunk/ruta-ep-addons/icons/10892.resource_persp.gif
deleted file mode 100755
index 1b8fe00..0000000
--- a/trunk/ruta-ep-addons/icons/10892.resource_persp.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/13103.profile_exc.gif b/trunk/ruta-ep-addons/icons/13103.profile_exc.gif
deleted file mode 100755
index b7f03d5..0000000
--- a/trunk/ruta-ep-addons/icons/13103.profile_exc.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/13212.runjunit.gif b/trunk/ruta-ep-addons/icons/13212.runjunit.gif
deleted file mode 100755
index 03ede22..0000000
--- a/trunk/ruta-ep-addons/icons/13212.runjunit.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/13258.relaunch.gif b/trunk/ruta-ep-addons/icons/13258.relaunch.gif
deleted file mode 100755
index afb6fa9..0000000
--- a/trunk/ruta-ep-addons/icons/13258.relaunch.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/13555.actionengine_play.gif b/trunk/ruta-ep-addons/icons/13555.actionengine_play.gif
deleted file mode 100755
index b88fb72..0000000
--- a/trunk/ruta-ep-addons/icons/13555.actionengine_play.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/13929.category-new.gif b/trunk/ruta-ep-addons/icons/13929.category-new.gif
deleted file mode 100755
index d3f43d9..0000000
--- a/trunk/ruta-ep-addons/icons/13929.category-new.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/14276.newfolder_wiz.gif b/trunk/ruta-ep-addons/icons/14276.newfolder_wiz.gif
deleted file mode 100755
index 310eb18..0000000
--- a/trunk/ruta-ep-addons/icons/14276.newfolder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/17235.resume_co.png b/trunk/ruta-ep-addons/icons/17235.resume_co.png
deleted file mode 100755
index 114193f..0000000
--- a/trunk/ruta-ep-addons/icons/17235.resume_co.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/17533.css_propertyvalue_function.gif b/trunk/ruta-ep-addons/icons/17533.css_propertyvalue_function.gif
deleted file mode 100755
index 6cd12da..0000000
--- a/trunk/ruta-ep-addons/icons/17533.css_propertyvalue_function.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/accept.png b/trunk/ruta-ep-addons/icons/accept.png
deleted file mode 100755
index 89c8129..0000000
--- a/trunk/ruta-ep-addons/icons/accept.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/add.gif b/trunk/ruta-ep-addons/icons/add.gif
deleted file mode 100755
index 252d7eb..0000000
--- a/trunk/ruta-ep-addons/icons/add.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/add.png b/trunk/ruta-ep-addons/icons/add.png
deleted file mode 100644
index 6332fef..0000000
--- a/trunk/ruta-ep-addons/icons/add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_branch.png b/trunk/ruta-ep-addons/icons/arrow_branch.png
deleted file mode 100755
index 7542db1..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_branch.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_divide.png b/trunk/ruta-ep-addons/icons/arrow_divide.png
deleted file mode 100755
index 61a7b1d..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_divide.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_down.png b/trunk/ruta-ep-addons/icons/arrow_down.png
deleted file mode 100755
index 2c4e279..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_in.png b/trunk/ruta-ep-addons/icons/arrow_in.png
deleted file mode 100755
index 745c651..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_in.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_inout.png b/trunk/ruta-ep-addons/icons/arrow_inout.png
deleted file mode 100755
index 1b76367..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_inout.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_join.png b/trunk/ruta-ep-addons/icons/arrow_join.png
deleted file mode 100755
index a128413..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_join.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_left.png b/trunk/ruta-ep-addons/icons/arrow_left.png
deleted file mode 100755
index 5dc6967..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_left.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_merge.png b/trunk/ruta-ep-addons/icons/arrow_merge.png
deleted file mode 100755
index 7502dbb..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_merge.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_out.png b/trunk/ruta-ep-addons/icons/arrow_out.png
deleted file mode 100755
index 2e9bc42..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_out.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_redo.png b/trunk/ruta-ep-addons/icons/arrow_redo.png
deleted file mode 100755
index fdc394c..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_redo.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_refresh.png b/trunk/ruta-ep-addons/icons/arrow_refresh.png
deleted file mode 100755
index 0de2656..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_refresh.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_refresh_small.png b/trunk/ruta-ep-addons/icons/arrow_refresh_small.png
deleted file mode 100755
index d3087df..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_refresh_small.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_right.png b/trunk/ruta-ep-addons/icons/arrow_right.png
deleted file mode 100755
index b1a1819..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_right.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_rotate_anticlockwise.png b/trunk/ruta-ep-addons/icons/arrow_rotate_anticlockwise.png
deleted file mode 100755
index 46c75aa..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_rotate_anticlockwise.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_rotate_clockwise.png b/trunk/ruta-ep-addons/icons/arrow_rotate_clockwise.png
deleted file mode 100755
index aa65210..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_rotate_clockwise.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_switch.png b/trunk/ruta-ep-addons/icons/arrow_switch.png
deleted file mode 100755
index 258c16c..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_switch.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_turn_left.png b/trunk/ruta-ep-addons/icons/arrow_turn_left.png
deleted file mode 100755
index a3d6c9e..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_turn_left.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_turn_right.png b/trunk/ruta-ep-addons/icons/arrow_turn_right.png
deleted file mode 100755
index 629f20d..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_turn_right.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_undo.png b/trunk/ruta-ep-addons/icons/arrow_undo.png
deleted file mode 100755
index 6972c5e..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_undo.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/arrow_up.png b/trunk/ruta-ep-addons/icons/arrow_up.png
deleted file mode 100755
index 1ebb193..0000000
--- a/trunk/ruta-ep-addons/icons/arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/back.gif b/trunk/ruta-ep-addons/icons/back.gif
deleted file mode 100755
index 4fb4150..0000000
--- a/trunk/ruta-ep-addons/icons/back.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/basket_edit.png b/trunk/ruta-ep-addons/icons/basket_edit.png
deleted file mode 100755
index 8138bbd..0000000
--- a/trunk/ruta-ep-addons/icons/basket_edit.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bug.png b/trunk/ruta-ep-addons/icons/bug.png
deleted file mode 100755
index 2d5fb90..0000000
--- a/trunk/ruta-ep-addons/icons/bug.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bug_edit.png b/trunk/ruta-ep-addons/icons/bug_edit.png
deleted file mode 100755
index e5c7dc0..0000000
--- a/trunk/ruta-ep-addons/icons/bug_edit.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bullet_black.png b/trunk/ruta-ep-addons/icons/bullet_black.png
deleted file mode 100755
index 5761970..0000000
--- a/trunk/ruta-ep-addons/icons/bullet_black.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bullet_blue.png b/trunk/ruta-ep-addons/icons/bullet_blue.png
deleted file mode 100755
index a7651ec..0000000
--- a/trunk/ruta-ep-addons/icons/bullet_blue.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bullet_green.png b/trunk/ruta-ep-addons/icons/bullet_green.png
deleted file mode 100755
index 058ad26..0000000
--- a/trunk/ruta-ep-addons/icons/bullet_green.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bullet_orange.png b/trunk/ruta-ep-addons/icons/bullet_orange.png
deleted file mode 100755
index fa63024..0000000
--- a/trunk/ruta-ep-addons/icons/bullet_orange.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bullet_pink.png b/trunk/ruta-ep-addons/icons/bullet_pink.png
deleted file mode 100755
index 0c9f73e..0000000
--- a/trunk/ruta-ep-addons/icons/bullet_pink.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bullet_red.png b/trunk/ruta-ep-addons/icons/bullet_red.png
deleted file mode 100755
index 0cd8031..0000000
--- a/trunk/ruta-ep-addons/icons/bullet_red.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/bullet_yellow.png b/trunk/ruta-ep-addons/icons/bullet_yellow.png
deleted file mode 100755
index 6469cea..0000000
--- a/trunk/ruta-ep-addons/icons/bullet_yellow.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/cancel.png b/trunk/ruta-ep-addons/icons/cancel.png
deleted file mode 100755
index c149c2b..0000000
--- a/trunk/ruta-ep-addons/icons/cancel.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/cev.png b/trunk/ruta-ep-addons/icons/cev.png
deleted file mode 100755
index 9757fc6..0000000
--- a/trunk/ruta-ep-addons/icons/cev.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/chart_organisation.png b/trunk/ruta-ep-addons/icons/chart_organisation.png
deleted file mode 100755
index c32d25c..0000000
--- a/trunk/ruta-ep-addons/icons/chart_organisation.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/chart_organisation_add.png b/trunk/ruta-ep-addons/icons/chart_organisation_add.png
deleted file mode 100755
index f0dba4a..0000000
--- a/trunk/ruta-ep-addons/icons/chart_organisation_add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/chart_organisation_delete.png b/trunk/ruta-ep-addons/icons/chart_organisation_delete.png
deleted file mode 100755
index 7dc8dca..0000000
--- a/trunk/ruta-ep-addons/icons/chart_organisation_delete.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/clear.gif b/trunk/ruta-ep-addons/icons/clear.gif
deleted file mode 100755
index af30a42..0000000
--- a/trunk/ruta-ep-addons/icons/clear.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/cup_add.png b/trunk/ruta-ep-addons/icons/cup_add.png
deleted file mode 100644
index 4ecaece..0000000
--- a/trunk/ruta-ep-addons/icons/cup_add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/delete.png b/trunk/ruta-ep-addons/icons/delete.png
deleted file mode 100644
index 08f2493..0000000
--- a/trunk/ruta-ep-addons/icons/delete.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/disk.png b/trunk/ruta-ep-addons/icons/disk.png
deleted file mode 100644
index 99d532e..0000000
--- a/trunk/ruta-ep-addons/icons/disk.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/error_ovr.gif b/trunk/ruta-ep-addons/icons/error_ovr.gif
deleted file mode 100755
index c112416..0000000
--- a/trunk/ruta-ep-addons/icons/error_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/evaluator.gif b/trunk/ruta-ep-addons/icons/evaluator.gif
deleted file mode 100755
index 6cd12da..0000000
--- a/trunk/ruta-ep-addons/icons/evaluator.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/exclamation.png b/trunk/ruta-ep-addons/icons/exclamation.png
deleted file mode 100755
index c37bd06..0000000
--- a/trunk/ruta-ep-addons/icons/exclamation.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/explain.png b/trunk/ruta-ep-addons/icons/explain.png
deleted file mode 100644
index 47b75a4..0000000
--- a/trunk/ruta-ep-addons/icons/explain.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/failed_ovr.gif b/trunk/ruta-ep-addons/icons/failed_ovr.gif
deleted file mode 100755
index 8f12861..0000000
--- a/trunk/ruta-ep-addons/icons/failed_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/folder.png b/trunk/ruta-ep-addons/icons/folder.png
deleted file mode 100755
index 784e8fa..0000000
--- a/trunk/ruta-ep-addons/icons/folder.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/folder_edit.png b/trunk/ruta-ep-addons/icons/folder_edit.png
deleted file mode 100755
index ad669cc..0000000
--- a/trunk/ruta-ep-addons/icons/folder_edit.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/folder_page.png b/trunk/ruta-ep-addons/icons/folder_page.png
deleted file mode 100644
index 1ef6e11..0000000
--- a/trunk/ruta-ep-addons/icons/folder_page.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/font_add.png b/trunk/ruta-ep-addons/icons/font_add.png
deleted file mode 100755
index b709eba..0000000
--- a/trunk/ruta-ep-addons/icons/font_add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/font_delete.png b/trunk/ruta-ep-addons/icons/font_delete.png
deleted file mode 100755
index 1d6124d..0000000
--- a/trunk/ruta-ep-addons/icons/font_delete.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/forward.gif b/trunk/ruta-ep-addons/icons/forward.gif
deleted file mode 100755
index e2f8c3e..0000000
--- a/trunk/ruta-ep-addons/icons/forward.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/help.png b/trunk/ruta-ep-addons/icons/help.png
deleted file mode 100644
index 5c87017..0000000
--- a/trunk/ruta-ep-addons/icons/help.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/run.gif b/trunk/ruta-ep-addons/icons/run.gif
deleted file mode 100755
index 57f4102..0000000
--- a/trunk/ruta-ep-addons/icons/run.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/ruta_obj.png b/trunk/ruta-ep-addons/icons/ruta_obj.png
deleted file mode 100755
index 0bfecd5..0000000
--- a/trunk/ruta-ep-addons/icons/ruta_obj.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/ruta_obj_add.png b/trunk/ruta-ep-addons/icons/ruta_obj_add.png
deleted file mode 100644
index 075e75a..0000000
--- a/trunk/ruta-ep-addons/icons/ruta_obj_add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/sample.gif b/trunk/ruta-ep-addons/icons/sample.gif
deleted file mode 100755
index 34fb3c9..0000000
--- a/trunk/ruta-ep-addons/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/script_add.png b/trunk/ruta-ep-addons/icons/script_add.png
deleted file mode 100644
index d650552..0000000
--- a/trunk/ruta-ep-addons/icons/script_add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/start.png b/trunk/ruta-ep-addons/icons/start.png
deleted file mode 100755
index 967cf0f..0000000
--- a/trunk/ruta-ep-addons/icons/start.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/statistics.png b/trunk/ruta-ep-addons/icons/statistics.png
deleted file mode 100755
index bd07673..0000000
--- a/trunk/ruta-ep-addons/icons/statistics.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/stop.gif b/trunk/ruta-ep-addons/icons/stop.gif
deleted file mode 100755
index fbf1686..0000000
--- a/trunk/ruta-ep-addons/icons/stop.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/tag_orange.png b/trunk/ruta-ep-addons/icons/tag_orange.png
deleted file mode 100755
index 454a59f..0000000
--- a/trunk/ruta-ep-addons/icons/tag_orange.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/text_list_numbers.png b/trunk/ruta-ep-addons/icons/text_list_numbers.png
deleted file mode 100755
index 33b0b8d..0000000
--- a/trunk/ruta-ep-addons/icons/text_list_numbers.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/text_signature.png b/trunk/ruta-ep-addons/icons/text_signature.png
deleted file mode 100755
index c72fd80..0000000
--- a/trunk/ruta-ep-addons/icons/text_signature.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/thumb_down.png b/trunk/ruta-ep-addons/icons/thumb_down.png
deleted file mode 100644
index 3c832d4..0000000
--- a/trunk/ruta-ep-addons/icons/thumb_down.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/thumb_up.png b/trunk/ruta-ep-addons/icons/thumb_up.png
deleted file mode 100644
index 2bd16cc..0000000
--- a/trunk/ruta-ep-addons/icons/thumb_up.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/icons/views.png b/trunk/ruta-ep-addons/icons/views.png
deleted file mode 100755
index 9757fc6..0000000
--- a/trunk/ruta-ep-addons/icons/views.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-addons/marker-file-identifying-eclipse-plugin b/trunk/ruta-ep-addons/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-ep-addons/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/ruta-ep-addons/plugin.xml b/trunk/ruta-ep-addons/plugin.xml
deleted file mode 100755
index 2a9f3de..0000000
--- a/trunk/ruta-ep-addons/plugin.xml
+++ /dev/null
@@ -1,921 +0,0 @@
-<?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.

--->

-<?eclipse version="3.4"?>

-<plugin>

-<extension-point id="evaluators" name="CAS Evaluator" schema="schema/evaluators.exsd"/>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            allowMultiple="false"

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.query.ui.QueryView"

-            icon="icons/basket_edit.png"

-            id="org.apache.uima.ruta.query.ui.ScriptQueryView"

-            name="Ruta Query"

-            restorable="true">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.testing.ui.views.fp.FalsePositiveView"

-            icon="icons/bug.png"

-            id="org.apache.uima.ruta.testing.falsePositive"

-            name="False Positive">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.testing.ui.views.fn.FalseNegativeView"

-            icon="icons/bug.png"

-            id="org.apache.uima.ruta.testing.falseNegative"

-            name="False Negative">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.testing.ui.views.TestPageBookView"

-            icon="icons/bug_edit.png"

-            id="org.apache.uima.ruta.testing.TestingView"

-            name="Annotation Test"

-            restorable="true">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.testing.ui.views.tp.TruePositiveView"

-            icon="icons/bug.png"

-            id="org.apache.uima.ruta.testing.truePositive"

-            name="True Positive">

-      </view>

-   </extension> <extension

-         point="org.eclipse.ui.commands">

-      <command

-            defaultHandler="org.apache.uima.ruta.query.ui.QueryActionHandler"

-            id="org.apache.uima.ruta.query.command"

-            name="Query Command">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.query.ui.ExportActionHandler"

-            id="org.apache.uima.ruta.query.export"

-            name="Export List">

-      </command>

-   </extension>   <extension

-         point="org.eclipse.ui.menus">

-      <menuContribution

-            locationURI="toolbar:org.apache.uima.ruta.query.ui.ScriptQueryView?after=additions">

-         <command

-               commandId="org.apache.uima.ruta.query.command"

-               icon="icons/13555.actionengine_play.gif"

-               label="Query"

-               style="push">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.query.export"

-               icon="icons/10892.resource_persp.gif"

-               label="Export List"

-               style="push">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="toolbar:org.eclipse.ui.main.toolbar">

-         <toolbar

-               id="org.apache.uima.ruta.utils.query.queryToolbar">

-         </toolbar>

-      </menuContribution>

-   </extension> <extension

-         point="org.eclipse.ui.menus">

-      <menuContribution

-            locationURI="toolbar:org.apache.uima.ruta.testing.TestingView?after=additions">

-         <command

-               commandId="org.apache.uima.ruta.testing.rerun"

-               icon="icons/13555.actionengine_play.gif"

-               label="Rerun Tests"

-               style="push"

-               tooltip="Rerun Tests">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.testing.excludeTypes"

-               icon="icons/thumb_down.png"

-               label="Select excluded types"

-               style="push"

-               tooltip="Select excluded types">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.testing.includeTypes"

-               icon="icons/thumb_up.png"

-               label="Select included types"

-               style="push"

-               tooltip="Select included types">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.testing.selectEvaluator"

-               icon="icons/evaluator.gif"

-               label="Select Evaluator"

-               style="push"

-               tooltip="Select evaluator">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.testing.ExportTabel"

-               icon="icons/10892.resource_persp.gif"

-               label="to CSV"

-               style="push">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.testing.extendClasspath"

-               icon="icons/arrow_out.png"

-               style="toggle"

-               tooltip="If checked, the classpath will be extended so that java analysis engines can be executed.">

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="toolbar:org.eclipse.ui.main.toolbar">

-         <toolbar

-               id="org.apache.uima.ruta.testing.annotationTestToolbar">

-         </toolbar>

-      </menuContribution>

-   </extension>   <extension

-         point="org.eclipse.ui.commands">

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.RemoveTestsHandler"

-            id="org.apache.uima.ruta.testing.removeTests"

-            name="Remove Resource">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.RerunActionHandler"

-            id="org.apache.uima.ruta.testing.rerun"

-            name="Rerun Command">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.LoadFilesFromFolderHandler"

-            id="org.apache.uima.ruta.testing.LoadFolderCommand"

-            name="LoadFolderCommand">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.SelectedExcludedTypesHandler"

-            id="org.apache.uima.ruta.testing.excludeTypes"

-            name="Select excluded types">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.SelectedIncludedTypesHandler"

-            id="org.apache.uima.ruta.testing.includeTypes"

-            name="Select included types">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.SelectEvaluatorHandler"

-            id="org.apache.uima.ruta.testing.selectEvaluator"

-            name="Select Evaluator">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.ExportTabelHandler"

-            id="org.apache.uima.ruta.testing.ExportTabel"

-            name="Export Table">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.testing.ui.handlers.ExtendClasspathHandler"

-            id="org.apache.uima.ruta.testing.extendClasspath"

-            name="Extend Classpath">

-         <state

-               class="org.eclipse.jface.commands.ToggleState"

-               id="org.apache.uima.ruta.testing.extendClasspath.state">

-         </state>

-      </command>

-      </extension>

-      <extension

-         point="org.apache.uima.ruta.addons.evaluators">

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.PartialMatchCasEvaluatorFacotry"

-            id="org.apache.uima.ruta.testing.partialmatchevaluator"

-            name="Partial Match">

-      </evaluator>

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.ExactCasEvaluatorFactory"

-            id="org.apache.uima.ruta.testing.exactCasEvaluator"

-            name="Exact Match">

-      </evaluator>

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.CoreMatchCasEvaluatorFactory"

-            id="org.apache.uima.ruta.testing.corematchevaluator"

-            name="Core Term Match">

-      </evaluator>

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.WordAccuracyCasEvaluatorFactory"

-            id="org.apache.uima.ruta.testing.wordAccurecyCasEvaluator"

-            name="Word Accuracy">

-      </evaluator>

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.TemplateCasEvaluatorFactory"

-            id="org.apache.uima.ruta.testing.templateCasEvaluator"

-            name="Template only">

-      </evaluator>

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.WordTemplateCasEvaluatorFactory"

-            id="org.apache.uima.ruta.testing.wordTemplateCasEvaluator"

-            name="Template on word level">

-      </evaluator>

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.FeatureCasEvaluatorFactory"

-            id="org.apache.uima.ruta.testing.featureCasEvaluator"

-            name="Features: Annotations and Strings">

-      </evaluator>

-      <evaluator

-            factory="org.apache.uima.ruta.testing.evaluator.StringFeatureCasEvaluatorFactory"

-            id="org.apache.uima.ruta.testing.stringFeature"

-            name="Annotations with String features">

-      </evaluator>

-   </extension>   <extension

-         point="org.eclipse.core.runtime.preferences">

-      <initializer

-            class="org.apache.uima.ruta.testing.preferences.TestingPreferenceInitializer">

-      </initializer>

-   </extension>   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.ide.preferences"

-            class="org.apache.uima.ruta.testing.preferences.TestingPreferencePage"

-            id="org.apache.uima.ruta.testing.preferences"

-            name="Testing">

-      </page>

-   </extension>

-   <extension

-         point="org.eclipse.ui.commands">

-      <command

-            defaultHandler="org.apache.uima.ruta.utils.twl.TWLConverterHandler"

-            description="TWLConvertCommand"

-            id="org.apache.uima.ruta.utils.twl.command"

-            name="Convert to TWL">

-         <defaultHandler

-               class="org.apache.uima.ruta.utils.twl.TWLConverterHandler">

-         </defaultHandler>

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.utils.twl.MultiTWLConverterHandler"

-            description="MultiTWLConvertCommand"

-            id="org.apache.uima.ruta.utils.mtwl.command"

-            name="Convert to Multi TWL">

-         <defaultHandler

-               class="org.apache.uima.ruta.utils.twl.MultiTWLConverterHandler">

-         </defaultHandler>

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.utils.apply.ApplyScriptRemoveBasicsHandler"

-            id="org.apache.uima.ruta.utils.apply.script"

-            name="ApplyScriptCommand">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.utils.apply.ApplyScriptKeepBasicsHandler"

-            id="org.apache.uima.ruta.utils.apply.script.basics"

-            name="ApplyScriptBasicsCommand">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.utils.apply.ApplyScriptNoXMIHandler"

-            id="org.apache.uima.ruta.utils.apply.script.noxmi"

-            name="ApplyScriptNoXMICommand">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.utils.update.UpdateProjectHandler"

-            id="org.apache.uima.ruta.utils.update"

-            name="Update Project">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.utils.update.ConvertProjectHandler"

-            id="org.apache.uima.ruta.utils.convert"

-            name="Convert to UIMA Ruta project">

-      </command>

-   </extension>   <extension

-         point="org.eclipse.ui.menus">

-      <menuContribution

-            locationURI="popup:org.eclipse.dltk.ui.ScriptExplorer?after=additions">

-         <menu

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.popup.submenu"

-               label="UIMA Ruta">

-         </menu>

-      </menuContribution>

-      <menuContribution

-            locationURI="popup:org.apache.uima.ruta.utils.popup.submenu">

-         <command

-               commandId="org.apache.uima.ruta.utils.apply.script.basics"

-               disabledIcon="icons/ruta_obj.png"

-               hoverIcon="icons/ruta_obj.png"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.apply.script.basics.popup"

-               label="Quick Ruta"

-               style="push"

-               tooltip="Apply current Ruta script on folder and keep basics">

-            <visibleWhen

-                  checkEnabled="true">

-               <and>

-                  <with

-                        variable="activeEditorId">

-                     <equals

-                           value="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-                     </equals>

-                  </with>

-               </and>

-            </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="popup:org.apache.uima.ruta.utils.popup.submenu">

-         <command

-               commandId="org.apache.uima.ruta.utils.apply.script"

-               disabledIcon="icons/ruta_obj.png"

-               hoverIcon="icons/ruta_obj.png"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.apply.script.popup"

-               label="Quick Ruta (remove basics)"

-               style="push"

-               tooltip="Apply current Ruta script on folder">

-            <visibleWhen

-                  checkEnabled="true">

-               <and>

-                  <with

-                        variable="activeEditorId">

-                     <equals

-                           value="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-                     </equals>

-                  </with>

-               </and>

-            </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="popup:org.apache.uima.ruta.utils.popup.submenu">

-         <command

-               commandId="org.apache.uima.ruta.utils.apply.script.noxmi"

-               disabledIcon="icons/ruta_obj.png"

-               hoverIcon="icons/ruta_obj.png"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.apply.script.noxmi.popup"

-               label="Quick Ruta (no xmi)"

-               style="push"

-               tooltip="Apply current Ruta script on folder">

-            <visibleWhen

-                  checkEnabled="true">

-               <and>

-                  <with

-                        variable="activeEditorId">

-                     <equals

-                           value="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-                     </equals>

-                  </with>

-               </and>

-            </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="popup:org.apache.uima.ruta.utils.popup.submenu">

-         <command

-               commandId="org.apache.uima.ruta.utils.twl.command"

-               disabledIcon="icons/ruta_obj.png"

-               hoverIcon="icons/ruta_obj.png"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.twl.popup"

-               label="Convert to TWL"

-               style="push"

-               tooltip="Convert the word list to a tree">

-            <visibleWhen

-                  checkEnabled="true">

-               <reference

-                     definitionId="org.apache.uima.ruta.utils.twl.definition">

-               </reference>

-            </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="popup:org.apache.uima.ruta.utils.popup.submenu">

-         <command

-               commandId="org.apache.uima.ruta.utils.mtwl.command"

-               disabledIcon="icons/ruta_obj.png"

-               hoverIcon="icons/ruta_obj.png"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.mtwl.popup"

-               label="Convert to Multi TWL"

-               style="push"

-               tooltip="Convert several word lists to a tree">

-            <visibleWhen

-                  checkEnabled="true">

-               <reference

-                     definitionId="org.apache.uima.ruta.utils.mtwl.definition">

-               </reference>

-            </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="popup:org.apache.uima.ruta.utils.popup.submenu">

-         <command

-               commandId="org.apache.uima.ruta.utils.update"

-               disabledIcon="icons/ruta_obj.png"

-               hoverIcon="icons/ruta_obj.png"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.update.popup"

-               label="Update Project"

-               style="push"

-               tooltip="Update basic templates for descriptors">

-              <visibleWhen

-                    checkEnabled="true">

-                 <reference

-                       definitionId="org.apache.uima.ruta.utils.update.definition">

-                 </reference>

-              </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="popup:org.apache.uima.ruta.utils.popup.submenu">

-         <command

-               commandId="org.apache.uima.ruta.utils.convert"

-               disabledIcon="icons/ruta_obj.png"

-               hoverIcon="icons/ruta_obj.png"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.utils.convert.popup"

-               label="Convert to UIMA Ruta project"

-               style="push"

-               tooltip="Convert to UIMA Ruta project">

-            <visibleWhen

-                  checkEnabled="true">

-               <reference

-                     definitionId="org.apache.uima.ruta.utils.convert.definition">

-               </reference>

-            </visibleWhen>

-         </command>

-      </menuContribution>

-   </extension>   <extension

-         point="org.eclipse.core.expressions.definitions">

-      <definition

-            id="org.apache.uima.ruta.utils.twl.definition">

-         <with

-               variable="selection">

-            <iterate

-                  ifEmpty="false"

-                  operator="and">

-               <test

-                     property="org.eclipse.core.resources.extension"

-                     value="txt">

-               </test>

-            </iterate>

-         </with>

-      </definition>

-      <definition

-            id="org.apache.uima.ruta.utils.mtwl.definition">

-         <with

-               variable="selection">

-            <iterate

-                  ifEmpty="true">

-               <or>

-                  <test

-                        property="org.eclipse.core.resources.extension"

-                        value="txt">

-                  </test>

-               </or>

-            </iterate>

-         </with>

-      </definition>

-      <definition

-            id="org.apache.uima.ruta.utils.apply.script.definition">

-         <adapt

-               type="org.eclipse.core.resources.IResource">

-            <test

-                  property="org.eclipse.core.resources.extension"

-                  value="ruta">

-            </test>

-         </adapt>

-      </definition>

-      <definition

-            id="org.apache.uima.ruta.utils.update.definition">

-         <with

-               variable="selection">

-            <iterate

-                  ifEmpty="true">

-               <or>

-                  <instanceof

-                        value="org.eclipse.dltk.core.IScriptProject ">

-                  </instanceof>

-                  <instanceof

-                        value="org.eclipse.core.resources.IProject ">

-                  </instanceof>

-               </or>

-            </iterate>

-         </with>

-      </definition>

-      <definition

-            id="org.apache.uima.ruta.utils.convert.definition">

-         <with

-               variable="selection">

-            <iterate

-                  ifEmpty="true">

-               <or>

-                  <instanceof

-                        value="org.eclipse.dltk.core.IScriptProject ">

-                  </instanceof>

-                  <instanceof

-                        value="org.eclipse.core.resources.IProject ">

-                  </instanceof>

-               </or>

-            </iterate>

-         </with>

-      </definition>

-   </extension>   <extension

-         point="org.eclipse.ui.bindings">

-      <key

-            commandId="org.apache.uima.ruta.utils.apply.script"

-            contextId="org.eclipse.ui.contexts.window"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M1+M3+T">

-      </key>

-      <key

-            commandId="org.apache.uima.ruta.utils.apply.script.basics"

-            contextId="org.eclipse.ui.contexts.window"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M1+T">

-      </key>

-      <key

-            commandId="org.apache.uima.ruta.utils.apply.script.noxmi"

-            contextId="org.eclipse.ui.contexts.window"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M1+M2+M3+T">

-      </key>

-      <key

-            commandId="org.apache.uima.ruta.utils.twl.command"

-            contextId="org.eclipse.ui.contexts.window"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M1+J">

-      </key>

-      <key

-            commandId="org.apache.uima.ruta.utils.mtwl.command"

-            contextId="org.eclipse.ui.contexts.window"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M1+M2+J">

-      </key>

-   </extension>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.explain.apply.ApplyView"

-            icon="icons/chart_organisation.png"

-            id="org.apache.uima.ruta.explain.apply"

-            name="Applied Rules">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.explain.matched.MatchedView"

-            icon="icons/accept.png"

-            id="org.apache.uima.ruta.explain.matched"

-            name="Matched Rules"

-            restorable="true">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.explain.failed.FailedView"

-            icon="icons/cancel.png"

-            id="org.apache.uima.ruta.explain.failed"

-            name="Failed Rules">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.explain.element.ElementView"

-            icon="icons/chart_organisation.png"

-            id="org.apache.uima.ruta.explain.element"

-            name="Rule Elements">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.statistics.StatisticsView"

-            icon="icons/statistics.png"

-            id="org.apache.uima.ruta.statistics"

-            name="Statistics">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.explain.selection.ExplainSelectionView"

-            icon="icons/chart_organisation.png"

-            id="org.apache.uima.ruta.explain.selection"

-            name="Covering Rules">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.explain.rulelist.RuleListView"

-            icon="icons/chart_organisation.png"

-            id="org.apache.uima.ruta.explain.rulelist"

-            name="Rule List">

-      </view>

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.explain.createdBy.CreatedByView"

-            icon="icons/font_add.png"

-            id="org.apache.uima.ruta.explain.createdBy"

-            name="Created By"

-            restorable="true">

-      </view>

-   </extension>

-   <extension

-         point="org.apache.uima.caseditor.ide.searchstrategy">

-      <searchStrategy

-            class="org.apache.uima.ruta.searchStrategy.LastLaunchSearchStrategy"

-            description="Use the type system of the last launched Ruta script in the same project"

-            id="org.apache.uima.ruta.searchstrategy.lastlaunch"

-            priority="10">

-      </searchStrategy>

-      <searchStrategy

-            class="org.apache.uima.ruta.searchStrategy.DescriptorFolderSearchStrategy"

-            description="Pick one type system from the Ruta project descriptor folder"

-            id="org.apache.uima.ruta.searchstrategy.descriptorfolder"

-            priority="500">

-      </searchStrategy>

-      <searchStrategy

-            class="org.apache.uima.ruta.testing.searchStrategy.TestingSearchStrategy"

-            description="Use the type system of the tested Ruta script when opening a evaluated CAS"

-            id="org.apache.uima.ruta.searchstrategy.testing"

-            priority="5">

-      </searchStrategy>

-   </extension>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            allowMultiple="false"

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.cde.ui.DocumentView"

-            icon="icons/chart_organisation.png"

-            id="org.apache.uima.ruta.cde.ui.DocumentView"

-            name="CDE Documents"

-            restorable="true">

-      </view>

-      <view

-            allowMultiple="false"

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.cde.ui.ConstraintSelectView"

-            icon="icons/bullet_blue.png"

-            id="org.apache.uima.ruta.cde.ui.ConstraintSelectView"

-            name="CDE Constraints"

-            restorable="true">

-      </view>

-      <view

-            allowMultiple="false"

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.cde.ui.ResultView"

-            icon="icons/failed_ovr.gif"

-            id="org.apache.uima.ruta.cde.ui.ResultView"

-            name="CDE Result"

-            restorable="true">

-      </view>

-   </extension>

-   <extension

-         point="org.eclipse.ui.menus">

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.cde.ui.DocumentView">

-         <command

-               commandId="org.apache.uima.ruta.cde.ui.DocumentView.run"

-               icon="icons/run.gif"

-               id="org.apache.uima.ruta.cde.ui.DocumentView.toolbar.run"

-               label="run"

-               style="push">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.cde.ui.ConstraintSelectView">

-         <command

-               commandId="toolbar:org.apache.uima.ruta.cde.ui.ConstraintSelectView.exportall"

-               icon="icons/disk.png"

-               id="toolbar:org.apache.uima.ruta.cde.ui.ConstraintSelectView.toolbar.exportall"

-               label="Export all Constraints"

-               style="push">

-         </command>

-         <command

-               commandId="toolbar:org.apache.uima.ruta.cde.ui.ConstraintSelectView.importall"

-               icon="icons/folder_page.png"

-               label="Import Constraints"

-               style="push">

-         </command>

-      </menuContribution>

-   </extension>

-   <extension

-         point="org.eclipse.ui.perspectives">

-      <perspective

-            class="org.apache.uima.ruta.cde.ui.CDEPerspectiveFactory"

-            icon="icons/explain.png"

-            id="org.apache.uima.ruta.cde.perspective"

-            name="UIMA Ruta CDE">

-      </perspective>

-   </extension>

-   <extension

-         point="org.eclipse.ui.commands">

-      <command

-            defaultHandler="org.apache.uima.ruta.cde.ui.DocumentViewRunHandler"

-            id="org.apache.uima.ruta.cde.ui.DocumentView.run"

-            name="RunFromDocumentView">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.cde.ui.ExportConstraintsHandler"

-            id="toolbar:org.apache.uima.ruta.cde.ui.ConstraintSelectView.exportall"

-            name="ExportAllConstraints">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.cde.ui.ImportConstraintsHandler"

-            id="toolbar:org.apache.uima.ruta.cde.ui.ConstraintSelectView.importall"

-            name="ImportConstraints">

-      </command>

-   </extension>

-   <extension

-         point="org.eclipse.ui.editors">

-      <editor

-            default="false"

-            icon="icons/bullet_pink.png"

-            id="org.apache.uima.ruta.cde.constrainteditor"

-            name="CDE Editor">

-      </editor>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.ide.preferences"

-            class="org.apache.uima.ruta.cde.ui.CDEPreferencePage"

-            id="org.apache.uima.ruta.cde.preferences"

-            name="CDE">

-      </page>

-   </extension>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.check.AnnotationCheckView"

-            icon="icons/views.png"

-            id="org.apache.uima.ruta.check"

-            name="Check Annotations"

-            restorable="true">

-      </view>

-   </extension>

-   <extension

-         point="org.eclipse.ui.commands">

-      <command

-            defaultHandler="org.apache.uima.ruta.check.UpdateTaskHandler"

-            id="org.apache.uima.ruta.check.update"

-            name="Update">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.check.SelectCheckedTypesHandler"

-            id="org.apache.uima.ruta.check.selectTypes"

-            name="Select checked types and features">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.check.SelectUncheckedTypesHandler"

-            id="org.apache.uima.ruta.check.selectUncheckedTypes"

-            name="Select unchecked types">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.check.AcceptHandler"

-            id="org.apache.uima.ruta.check.accept"

-            name="Accept">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.check.RejectHandler"

-            id="org.apache.uima.ruta.check.reject"

-            name="Reject">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.check.SaveHandler"

-            id="org.apache.uima.ruta.check.save"

-            name="Save">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.check.SetAnnotationModeHandler"

-            id="org.apache.uima.ruta.check.mode"

-            name="Mode">

-         <commandParameter

-               id="org.apache.uima.ruta.check.mode.type"

-               name="type"

-               optional="false">

-         </commandParameter>

-      </command>

-   </extension>

-   <extension

-         point="org.eclipse.ui.menus">

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.check">

-         <command

-               commandId="org.apache.uima.ruta.check.update"

-               icon="icons/arrow_refresh_small.png"

-               id="org.apache.uima.ruta.check.toolbar.update"

-               label="Update"

-               style="push"

-               tooltip="Update">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.check">

-         <command

-               commandId="org.apache.uima.ruta.check.selectTypes"

-               icon="icons/ruta_obj.png"

-               id="org.apache.uima.ruta.check.toolbar.selectTypes"

-               label="Select types"

-               style="push"

-               tooltip="Select checked types and features">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.check">

-         <command

-               commandId="org.apache.uima.ruta.check.selectUncheckedTypes"

-               icon="icons/thumb_up.png"

-               id="org.apache.uima.ruta.check.toolbar.selectUncheckedTypes"

-               label="Select unchecked types"

-               style="push"

-               tooltip="Select unchecked types">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.check">

-         <command

-               commandId="org.apache.uima.ruta.check.accept"

-               icon="icons/accept.png"

-               id="org.apache.uima.ruta.check.toolbar.accept"

-               label="Accept"

-               style="push"

-               tooltip="Accept">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.check">

-         <command

-               commandId="org.apache.uima.ruta.check.reject"

-               icon="icons/delete.png"

-               id="org.apache.uima.ruta.check.toolbar.reject"

-               label="Reject"

-               style="push"

-               tooltip="Reject">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.check">

-         <command

-               commandId="org.apache.uima.ruta.check.save"

-               icon="icons/disk.png"

-               id="org.apache.uima.ruta.check.toolbar.save"

-               label="Save"

-               style="push"

-               tooltip="Save">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="toolbar:org.apache.uima.ruta.check">

-         <command

-               commandId="org.apache.uima.ruta.check.mode"

-               icon="icons/font_add.png"

-               id="org.apache.uima.ruta.check.toolbar.mode"

-               mode="FORCE_TEXT"

-               style="pulldown"

-               tooltip="Set Annotation mode">

-            <parameter

-                  name="org.apache.uima.ruta.check.mode.type">

-            </parameter>

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            class="org.apache.uima.ruta.check.SetAnnotationModeContributionFactory"

-            locationURI="menu:org.apache.uima.ruta.check.toolbar.mode">

-      </menuContribution>

-   </extension>
-</plugin>

diff --git a/trunk/ruta-ep-addons/pom.xml b/trunk/ruta-ep-addons/pom.xml
deleted file mode 100644
index 0a4860d..0000000
--- a/trunk/ruta-ep-addons/pom.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?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.    

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-ep-addons</artifactId>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-  </properties>

-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <url>${uimaWebsiteUrl}</url>

-  <description>Provides addons for the UIMA Ruta Workbench in Eclipse</description>

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimaj-core</artifactId>

-      <version>${uimaVersion}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-caseditor</artifactId>

-      <version>${project.parent.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimaj-ep-cas-editor-ide</artifactId>

-      <version>${uimaVersion}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimaj-ep-cas-editor</artifactId>

-      <version>${uimaVersion}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide</artifactId>

-      <version>${project.parent.version}</version>

-    </dependency>

-        <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide-ui</artifactId>

-      <version>${project.parent.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>app</artifactId>

-      <version>[1.3.0,2.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.swt.win32.win32</groupId>

-      <artifactId>x86</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>ide</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>resources</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui.workbench</groupId>

-      <artifactId>texteditor</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>jobs</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>debug</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.emf</groupId>

-      <artifactId>ecore</artifactId>

-      <version>[2.7.0,3.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.emf.ecore</groupId>

-      <artifactId>xmi</artifactId>

-      <version>[2.7.0,3.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jface</groupId>

-      <artifactId>text</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>preferences</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.debug</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

-    </dependency>

-  </dependencies>

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-ep-addons</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-addons</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-addons</developerConnection>

-  </scm>

-  <build>

-    <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

-    <finalName>org.apache.uima.ruta.addons_${parsedVersion.osgiVersion}</finalName>

-    <resources>

-      <resource>

-        <directory>.</directory>

-        <includes>

-          <include>plugin.xml</include>

-          <include>icons/**/*.*</include>

-        </includes>

-      </resource>

-      <resource>

-        <directory>src/main/resources</directory>

-      </resource>

-      <resource>

-        <directory>src/main/readme_src</directory>

-      </resource>

-    </resources>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>release.properties</exclude> <!-- release generated artifact -->

-                  <exclude>src/test/resources/ManualTests/*</exclude> <!-- test data -->

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>issuesFixed/**</exclude>

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-

-    <plugins>

-      <plugin>

-        <groupId>org.apache.felix</groupId>

-        <artifactId>maven-bundle-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>uima-bundle</id>

-            <configuration>

-              <instructions>

-                <Bundle-SymbolicName>org.apache.uima.ruta.addons;singleton:=true</Bundle-SymbolicName>

-                <Bundle-Activator>org.apache.uima.ruta.addons.RutaAddonsPlugin</Bundle-Activator>

-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>

-                <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>

-                <_nouses>true</_nouses>

-                <Export-Package>

-                  org.apache.uima.ruta.*

-                </Export-Package>

-                <Require-Bundle>

-                  org.eclipse.ui,

-                  org.eclipse.core.runtime,

-                  org.apache.uima.runtime,

-                  org.apache.uima.ruta.engine,

-                  org.eclipse.core.resources,

-                  org.apache.uima.ruta.ide,

-                  org.apache.uima.ruta.ide.ui,

-                  org.eclipse.ui.ide,

-                  org.eclipse.dltk.core,

-                  org.eclipse.jface.text,

-                  org.eclipse.dltk.ui,

-                  org.eclipse.ui.editors,

-                  org.eclipse.dltk.launching,

-                  org.eclipse.debug.ui,

-                  org.apache.uima.caseditor,

-                  org.apache.uima.ruta.caseditor,

-                  org.apache.uima.caseditor.ide

-                </Require-Bundle>

-                <Import-Package>

-                </Import-Package>

-              </instructions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

-    </plugins>

-  </build>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-ep-addons/schema/evaluators.exsd b/trunk/ruta-ep-addons/schema/evaluators.exsd
deleted file mode 100755
index bc3b218..0000000
--- a/trunk/ruta-ep-addons/schema/evaluators.exsd
+++ /dev/null
@@ -1,134 +0,0 @@
-<?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.
--->
-
-<schema targetNamespace="org.apache.uima.ruta.addons" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
-      <appInfo>
-         <meta.schema plugin="org.apache.uima.ruta.addons" id="evaluators" name="CAS Evaluator"/>
-      </appInfo>
-      <documentation>
-         [Enter description of this extension point.]
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <annotation>
-         <appInfo>
-            <meta.element />
-         </appInfo>
-      </annotation>
-      <complexType>
-         <sequence minOccurs="1" maxOccurs="unbounded">
-            <element ref="evaluator"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appInfo>
-                  <meta.attribute translatable="true"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="evaluator">
-      <complexType>
-         <attribute name="id" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="factory" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appInfo>
-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.testing.evaluator.ICasEvaluatorFactory"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="since"/>
-      </appInfo>
-      <documentation>
-         [Enter the first release in which this extension point appears.]
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="examples"/>
-      </appInfo>
-      <documentation>
-         [Enter extension point usage example here.]
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="apiinfo"/>
-      </appInfo>
-      <documentation>
-         [Enter API information here.]
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         [Enter information about supplied implementation of this extension point.]
-      </documentation>
-   </annotation>
-
-
-</schema>
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/addons/RutaAddonsPlugin.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/addons/RutaAddonsPlugin.java
deleted file mode 100644
index 681af35..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/addons/RutaAddonsPlugin.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*

- * 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.ruta.addons;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.testing.evaluator.ICasEvaluatorFactory;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IConfigurationElement;

-import org.eclipse.core.runtime.IExtension;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.ui.plugin.AbstractUIPlugin;

-import org.osgi.framework.BundleContext;

-

-/**

- * The activator class controls the plug-in life cycle

- */

-public class RutaAddonsPlugin extends AbstractUIPlugin {

-

-  // The plug-in ID

-  public static final String PLUGIN_ID = "org.apache.uima.ruta.addons"; //$NON-NLS-1$

-

-  public static final String ATT_FACTORY = "factory";

-

-  // The shared instance

-  private static RutaAddonsPlugin plugin;

-

-  /**

-   * The constructor

-   */

-  public RutaAddonsPlugin() {

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

-   */

-  @Override

-  public void start(BundleContext context) throws Exception {

-    super.start(context);

-    plugin = this;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

-   */

-  @Override

-  public void stop(BundleContext context) throws Exception {

-    plugin = null;

-    super.stop(context);

-  }

-

-  /**

-   * Returns the shared instance

-   * 

-   * @return the shared instance

-   */

-  public static RutaAddonsPlugin getDefault() {

-    return plugin;

-  }

-

-  /**

-   * Returns an image descriptor for the image file at the given plug-in relative path

-   * 

-   * @param path

-   *          the path

-   * @return the image descriptor

-   */

-  public static ImageDescriptor getImageDescriptor(String path) {

-    return imageDescriptorFromPlugin(PLUGIN_ID, path);

-  }

-

-  public static List<ICasEvaluatorFactory> getCasEvaluators() {

-    List<ICasEvaluatorFactory> result = new ArrayList<ICasEvaluatorFactory>();

-    IExtension[] evalExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaAddonsPlugin.PLUGIN_ID, "evaluators").getExtensions();

-    for (IExtension extension : evalExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object factoryObject = null;

-        try {

-          factoryObject = configurationElement.createExecutableExtension(ATT_FACTORY);

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (factoryObject instanceof ICasEvaluatorFactory) {

-          ICasEvaluatorFactory evalFactory = (ICasEvaluatorFactory) factoryObject;

-          result.add(evalFactory);

-        }

-      }

-    }

-    return result;

-  }

-

-  public static ICasEvaluatorFactory getCasEvaluatorFactoryById(String id) {

-    IExtension[] evalExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaAddonsPlugin.PLUGIN_ID, "evaluators").getExtensions();

-    for (IExtension extension : evalExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        String elementId = configurationElement.getAttribute("id");

-        if (elementId.equals(id)) {

-          try {

-            Object factoryObject = configurationElement.createExecutableExtension(ATT_FACTORY);

-            if (factoryObject instanceof ICasEvaluatorFactory) {

-              return ((ICasEvaluatorFactory) factoryObject);

-

-            }

-          } catch (CoreException e) {

-            e.printStackTrace();

-          }

-        }

-

-      }

-    }

-    return null;

-  }

-

-  public static void error(Throwable t) {

-    plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, t.getMessage(), t));

-  }

-

-  public static IFile getIFile(String location) {

-    IPath s = Path.fromOSString(location);

-    IWorkspace workspace = ResourcesPlugin.getWorkspace();

-    IFile ifile = workspace.getRoot().getFileForLocation(s);

-    return ifile;

-  }

-  

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/IRutaConstraint.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/IRutaConstraint.java
deleted file mode 100644
index b336757..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/IRutaConstraint.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * 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.ruta.cde;

-

-import org.apache.uima.cas.CAS;

-

-public interface IRutaConstraint {

-

-  Double processConstraint(CAS input) throws Exception;

-

-  String getDescription();

-

-  void setDescription(String description);

-

-  String getData();

-

-  void setData(String data);

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/IRutaRuleConstraint.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/IRutaRuleConstraint.java
deleted file mode 100644
index e2aaab3..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/IRutaRuleConstraint.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.cde;

-

-public interface IRutaRuleConstraint extends IRutaConstraint {

-

-  public String getDescription();

-

-  public void setDescription(String s);

-

-  public String getTypeSystemLocation();

-

-  public void setTypeSystemLocation(String s);

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaConstraintFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaConstraintFactory.java
deleted file mode 100644
index b86f5f0..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaConstraintFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.cde;

-

-public class RutaConstraintFactory {

-

-  public static IRutaConstraint createConstraint(String type) {

-    if (type.equals("SimpleRutaRuleConstraint")) {

-      return new SimpleRutaRuleConstraint("", "");

-    } else if (type.equals("RutaRuleListConstraint")) {

-      return new RutaRuleListConstraint("", "");

-    } else if (type.equals("RutaGEConstraint")) {

-      return new RutaGEConstraint("", "");

-    }

-    return null;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaGEConstraint.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaGEConstraint.java
deleted file mode 100644
index 204bc05..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaGEConstraint.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*

- * 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.ruta.cde;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.Map.Entry;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.ruta.cde.utils.EvaluationMeasures;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.runtime.Path;

-

-public class RutaGEConstraint implements IRutaConstraint {

-

-  private String constraintText;

-

-  private String description;

-

-  private AnalysisEngine ae;

-

-  private boolean initalized = false;

-

-  private HashMap<String, Double> rulesMap;;

-

-  public RutaGEConstraint(String constraintText, String description) {

-    this.constraintText = constraintText;

-    this.description = description;

-  }

-

-  public void initialize() throws Exception {

-    // Constraint Format: "Peter":Author 0.44, Editor 0.50

-

-    rulesMap = createRuleSet();

-

-    Iterator<Entry<String, Double>> rulesIterator = rulesMap.entrySet().iterator();

-    StringBuilder sb = new StringBuilder();

-    sb.append("PACKAGE org.apache.uima.ruta;\n\n");

-    int counter = 0;

-    while (rulesIterator.hasNext()) {

-

-      Entry<String, Double> entry = rulesIterator.next();

-      String rule = entry.getKey();

-      // Double ratioInConstraint = (Double) entry.getValue();

-

-      // if (!rule.endsWith(";")) {

-      // rule = rule + ";";

-      // }

-      sb.append(rule);

-      sb.append("\n");

-      counter++;

-      if (counter % 100 == 0) {

-        sb.append("Document{-> LOG(\"" + counter + "/" + rulesMap.size() + "\")};");

-      }

-

-    }

-    URL aedesc = RutaEngine.class.getResource("BasicEngine.xml");

-    XMLInputSource inae = new XMLInputSource(aedesc);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(inae);

-    ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-

-    ae = UIMAFramework.produceAnalysisEngine(aed, resMgr, null);

-    File tempFile = File.createTempFile("RutaCDE", RutaEngine.SCRIPT_FILE_EXTENSION);

-    tempFile.deleteOnExit();

-    FileUtils.saveString2File(sb.toString(), tempFile, "UTF-8");

-    String portableString = Path.fromOSString(tempFile.getParentFile().getPath())

-            .toPortableString();

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { portableString });

-    String name = tempFile.getName().substring(0, tempFile.getName().length() - 5);

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-

-    ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG, true);

-    ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG_WITH_MATCHES, true);

-    ae.setConfigParameterValue(RutaEngine.PARAM_PROFILE, false);

-    ae.setConfigParameterValue(RutaEngine.PARAM_STATISTICS, false);

-    ae.reconfigure();

-  }

-

-  public Double processConstraint(CAS cas) throws Exception {

-    if (!initalized) {

-      initialize();

-    }

-    int runCount = 0;

-    int printCount = 0;

-    ArrayList<Double[]> results = new ArrayList<Double[]>();

-    Type matchedType = cas.getTypeSystem().getType(

-            "org.apache.uima.ruta.type.DebugMatchedRuleMatch");

-    Type ruleApplyType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.DebugRuleApply");

-    Type blockApplyType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.DebugBlockApply");

-

-    removeDebugAnnotations(cas, matchedType, ruleApplyType, blockApplyType);

-    double applyAmount = 0;

-    double triedAmount = 0;

-    ae.process(cas);

-    Feature innerApplyFeature = blockApplyType.getFeatureByBaseName("innerApply");

-    Feature appliedFeature = ruleApplyType.getFeatureByBaseName("applied");

-    Feature triedFeature = ruleApplyType.getFeatureByBaseName("tried");

-    Feature elementFeature = ruleApplyType.getFeatureByBaseName("element");

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(blockApplyType).iterator();

-    if (iterator.isValid()) {

-      AnnotationFS fs = iterator.get();

-      if (fs.getType().equals(blockApplyType)) {

-        FeatureStructure featureValue = fs.getFeatureValue(innerApplyFeature);

-        FSArray array = (FSArray) featureValue;

-

-        FeatureStructure[] fsArray = array.toArray();

-        for (FeatureStructure featureStructure : fsArray) {

-          AnnotationFS ruleApply = (AnnotationFS) featureStructure;

-          if (ruleApply.getType().equals(ruleApplyType)) {

-            applyAmount = ruleApply.getIntValue(appliedFeature);

-            triedAmount = ruleApply.getIntValue(triedFeature);

-            String ruleString = ruleApply.getStringValue(elementFeature);

-

-            if (triedAmount == 0) {

-            } else {

-              double ratioInDocument = applyAmount / triedAmount;

-              String key = ruleString.trim() + ";";

-              Double ratioInConstraint = rulesMap.get(key);

-              if (ratioInConstraint != null) {

-                results.add(new Double[] { ratioInConstraint, ratioInDocument });

-              } else {

-                System.out.println("rule not found!!!: " + key);

-              }

-            }

-          }

-

-        }

-

-      }

-    }

-

-    removeDebugAnnotations(cas, matchedType, ruleApplyType, blockApplyType);

-    ae.destroy();

-

-    runCount++;

-    printCount++;

-    if (printCount == 10) {

-      System.out.println(runCount);

-      System.out.println("time: " + System.currentTimeMillis());

-      printCount = 0;

-    }

-

-    // calculate cosinus similarity for result values:

-    return EvaluationMeasures.cosine(results);

-  }

-

-  private void removeDebugAnnotations(CAS cas, Type matchedType, Type ruleApplyType,

-          Type blockApplyType) {

-    Collection<AnnotationFS> toRemove = new ArrayList<AnnotationFS>();

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(blockApplyType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    annotationIndex = cas.getAnnotationIndex(ruleApplyType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    annotationIndex = cas.getAnnotationIndex(matchedType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    for (AnnotationFS annotationFS : toRemove) {

-      cas.removeFsFromIndexes(annotationFS);

-    }

-  }

-

-  public String getDescription() {

-    return this.description;

-  }

-

-  public void setDescription(String description) {

-    this.description = description;

-  }

-

-  public HashMap<String, Double> createRuleSet() {

-    HashMap<String, Double> rulesMap = new HashMap<String, Double>();

-    try {

-      String content = FileUtils.file2String(new File(constraintText));

-

-      String[] constraintTextArray = content.split("\n");

-      for (String constraintLine : constraintTextArray) {

-

-        String[] patternAndEstimates = constraintLine.split(":");

-        if (patternAndEstimates.length < 2) {

-          continue;

-        }

-        String pattern = patternAndEstimates[0];

-        pattern = pattern.trim();

-        String estimates = patternAndEstimates[1];

-        String[] singleEstimates = estimates.split(",");

-

-        for (String singleEstimate : singleEstimates) {

-          singleEstimate = singleEstimate.trim();

-          String[] typeAndRatio = singleEstimate.split("\\s+");

-          String typeName = typeAndRatio[0];

-          String ratio = typeAndRatio[1];

-          ratio = ratio.trim();

-          String rule = "";

-

-          if (pattern.startsWith("\"")) {

-            rule = pattern + "{PARTOF(" + typeName + ")};";

-          } else {

-            rule = pattern + "{PARTOF(" + typeName + ")};";

-          }

-          rulesMap.put(rule, Double.valueOf(ratio));

-        }

-      }

-    } catch (IOException e) {

-      e.printStackTrace();

-    }

-    return rulesMap;

-  }

-

-  public String getData() {

-    return constraintText;

-  }

-

-  public void setData(String data) {

-    this.constraintText = data;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaRuleListConstraint.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaRuleListConstraint.java
deleted file mode 100644
index 20973d6..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/RutaRuleListConstraint.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*

- * 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.ruta.cde;

-

-import java.io.File;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-

-public class RutaRuleListConstraint implements IRutaRuleConstraint {

-

-  private String rules;

-

-  private String description;

-

-  private String typeSystemLocation;

-

-  private AnalysisEngine ae;

-

-  private boolean initalized = false;

-

-  public RutaRuleListConstraint(String rules, String description) {

-    this.rules = rules;

-    this.description = description;

-    this.typeSystemLocation = "";

-  }

-

-  public void initialize() throws Exception {

-    String script = "PACKAGE org.apache.uima.ruta;\n\n";

-    if (!rules.endsWith(";")) {

-      rules = rules + ";";

-    }

-    script += rules;

-    URL aedesc = RutaEngine.class.getResource("BasicEngine.xml");

-    XMLInputSource inae = new XMLInputSource(aedesc);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(inae);

-    ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-    if (!typeSystemLocation.equals("")) {

-      String tsLocation = typeSystemLocation;

-      Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-      tsds.add(basicTypeSystem);

-      if (typeSystemLocation.endsWith(".ruta")) {

-        IFile iFile = RutaAddonsPlugin.getIFile(typeSystemLocation);

-        IPath scriptPath = iFile.getLocation();

-        IProject project = iFile.getProject();

-        IPath descriptorRootPath = RutaProjectUtils.getDescriptorRootPath(project);

-        resMgr.setDataPath(descriptorRootPath.toPortableString());

-        IPath path = RutaProjectUtils.getTypeSystemDescriptorPath(scriptPath, project);

-        tsLocation = path.toPortableString();

-      }

-      File tsFile = new File(tsLocation);

-      XMLInputSource ints = new XMLInputSource(tsFile);

-      TypeSystemDescription importTSD = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-              ints);

-      importTSD.resolveImports(resMgr);

-      tsds.add(importTSD);

-      TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-      aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-    }

-    aed.resolveImports(resMgr);

-    ae = UIMAFramework.produceAnalysisEngine(aed, resMgr, null);

-    File tempFile = File.createTempFile("RutaCDE", RutaEngine.SCRIPT_FILE_EXTENSION);

-    tempFile.deleteOnExit();

-    FileUtils.saveString2File(script, tempFile, "UTF-8");

-    String portableString = Path.fromOSString(tempFile.getParentFile().getPath())

-            .toPortableString();

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { portableString });

-    String name = tempFile.getName().substring(0, tempFile.getName().length() - 5);

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-

-    ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG, true);

-    ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG_WITH_MATCHES, true);

-    ae.setConfigParameterValue(RutaEngine.PARAM_PROFILE, false);

-    ae.setConfigParameterValue(RutaEngine.PARAM_STATISTICS, false);

-    ae.reconfigure();

-  }

-

-  public Double processConstraint(CAS cas) throws Exception {

-    if (!initalized) {

-      initialize();

-    }

-

-    Type matchedType = cas.getTypeSystem().getType(

-            "org.apache.uima.ruta.type.DebugMatchedRuleMatch");

-    Type ruleApplyType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.DebugRuleApply");

-    Type blockApplyType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.DebugBlockApply");

-

-    removeDebugAnnotations(cas, matchedType, ruleApplyType, blockApplyType);

-

-    double applyAmount = 0;

-    double triedAmount = 0;

-    ae.process(cas);

-

-    Feature innerApplyFeature = blockApplyType.getFeatureByBaseName("innerApply");

-    Feature appliedFeature = blockApplyType.getFeatureByBaseName("applied");

-    Feature triedFeature = blockApplyType.getFeatureByBaseName("tried");

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(blockApplyType).iterator();

-

-    while (iterator.isValid()) {

-      // Hier Schleife

-      AnnotationFS fs = iterator.get();

-      if (fs.getType().equals(blockApplyType)) {

-        FeatureStructure featureValue = fs.getFeatureValue(innerApplyFeature);

-        FSArray array = (FSArray) featureValue;

-

-        // Schleife

-        // AnnotationFS ruleApply = (AnnotationFS) array.get(0);

-        for (int i = 0; i < array.size(); i++) {

-

-          AnnotationFS ruleApply = (AnnotationFS) array.get(i);

-

-          if (ruleApply.getType().equals(ruleApplyType)) {

-            applyAmount += ruleApply.getIntValue(appliedFeature);

-

-            triedAmount += ruleApply.getIntValue(triedFeature);

-

-          }

-        }

-      }

-      iterator.moveToNext();

-    }

-

-    removeDebugAnnotations(cas, matchedType, ruleApplyType, blockApplyType);

-    ae.destroy();

-

-    if (triedAmount == 0) {

-      return null;

-    }

-    return applyAmount / triedAmount;

-  }

-

-  private void removeDebugAnnotations(CAS cas, Type matchedType, Type ruleApplyType,

-          Type blockApplyType) {

-    Collection<AnnotationFS> toRemove = new ArrayList<AnnotationFS>();

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(blockApplyType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    annotationIndex = cas.getAnnotationIndex(ruleApplyType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    annotationIndex = cas.getAnnotationIndex(matchedType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    for (AnnotationFS annotationFS : toRemove) {

-      cas.removeFsFromIndexes(annotationFS);

-    }

-  }

-

-  public String getDescription() {

-    return description;

-  }

-

-  public void setDescription(String description) {

-    this.description = description;

-  }

-

-  public void setTypeSystemLocation(String location) {

-    typeSystemLocation = location;

-  }

-

-  public String getTypeSystemLocation() {

-    return typeSystemLocation;

-  }

-

-  public String getData() {

-    return rules;

-  }

-

-  public void setData(String data) {

-    this.rules = data;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/SimpleRutaRuleConstraint.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/SimpleRutaRuleConstraint.java
deleted file mode 100644
index ab1f7c7..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/SimpleRutaRuleConstraint.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*

- * 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.ruta.cde;

-

-import java.io.File;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-

-public class SimpleRutaRuleConstraint implements IRutaRuleConstraint {

-

-  private String rule;

-

-  private String description;

-

-  private String typeSystemLocation;

-

-  private AnalysisEngine ae;

-

-  private boolean initalized = false;

-

-  public SimpleRutaRuleConstraint(String rule, String description) {

-    this.rule = rule;

-    this.description = description;

-  }

-

-  public void initialize() throws Exception {

-

-    String script = "PACKAGE org.apache.uima.ruta;\n\n";

-    if (!rule.endsWith(";")) {

-      rule = rule + ";";

-    }

-    script += rule;

-    URL aedesc = RutaEngine.class.getResource("BasicEngine.xml");

-    XMLInputSource inae = new XMLInputSource(aedesc);

-    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(inae);

-    ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

-    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-    if (!typeSystemLocation.equals("")) {

-      String tsLocation = typeSystemLocation;

-      Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-      tsds.add(basicTypeSystem);

-      if (typeSystemLocation.endsWith(".ruta")) {

-        IFile iFile = RutaAddonsPlugin.getIFile(typeSystemLocation);

-        IPath scriptPath = iFile.getLocation();

-        IProject project = iFile.getProject();

-        IPath descriptorRootPath = RutaProjectUtils.getDescriptorRootPath(project);

-        resMgr.setDataPath(descriptorRootPath.toPortableString());

-        IPath path = RutaProjectUtils.getTypeSystemDescriptorPath(scriptPath, project);

-        tsLocation = path.toPortableString();

-      }

-      File tsFile = new File(tsLocation);

-      XMLInputSource ints = new XMLInputSource(tsFile);

-      TypeSystemDescription importTSD = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-              ints);

-      importTSD.resolveImports(resMgr);

-      tsds.add(importTSD);

-      TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-      aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-    }

-    aed.resolveImports(resMgr);

-    ae = UIMAFramework.produceAnalysisEngine(aed, resMgr, null);

-    File tempFile = File.createTempFile("RutaRuta", RutaEngine.SCRIPT_FILE_EXTENSION);

-    tempFile.deleteOnExit();

-    FileUtils.saveString2File(script, tempFile, "UTF-8");

-    String portableString = Path.fromOSString(tempFile.getParentFile().getPath())

-            .toPortableString();

-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { portableString });

-    String name = tempFile.getName().substring(0, tempFile.getName().length() - 5);

-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-

-    ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG, true);

-    ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG_WITH_MATCHES, true);

-    ae.setConfigParameterValue(RutaEngine.PARAM_PROFILE, false);

-    ae.setConfigParameterValue(RutaEngine.PARAM_STATISTICS, false);

-    ae.reconfigure();

-

-  }

-

-  public Double processConstraint(CAS cas) throws Exception {

-

-    if (!initalized) {

-      initialize();

-    }

-

-    Type matchedType = cas.getTypeSystem().getType(

-            "org.apache.uima.ruta.type.DebugMatchedRuleMatch");

-    Type ruleApplyType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.DebugRuleApply");

-    Type blockApplyType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.DebugBlockApply");

-    removeDebugAnnotations(cas, matchedType, ruleApplyType, blockApplyType);

-    double applyAmount = 0;

-    double triedAmount = 0;

-    ae.process(cas);

-    Feature innerApplyFeature = blockApplyType.getFeatureByBaseName("innerApply");

-    Feature appliedFeature = blockApplyType.getFeatureByBaseName("applied");

-    Feature triedFeature = blockApplyType.getFeatureByBaseName("tried");

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(blockApplyType).iterator();

-    if (iterator.isValid()) {

-      AnnotationFS fs = iterator.get();

-      if (fs.getType().equals(blockApplyType)) {

-        FeatureStructure featureValue = fs.getFeatureValue(innerApplyFeature);

-        FSArray array = (FSArray) featureValue;

-        AnnotationFS ruleApply = (AnnotationFS) array.get(0);

-

-        if (ruleApply.getType().equals(ruleApplyType)) {

-          applyAmount = ruleApply.getIntValue(appliedFeature);

-          triedAmount = ruleApply.getIntValue(triedFeature);

-        }

-      }

-    }

-

-    removeDebugAnnotations(cas, matchedType, ruleApplyType, blockApplyType);

-    ae.destroy();

-

-    if (triedAmount == 0) {

-      return null;

-    }

-    return applyAmount / triedAmount;

-  }

-

-  private void removeDebugAnnotations(CAS cas, Type matchedType, Type ruleApplyType,

-          Type blockApplyType) {

-    Collection<AnnotationFS> toRemove = new ArrayList<AnnotationFS>();

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(blockApplyType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    annotationIndex = cas.getAnnotationIndex(ruleApplyType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    annotationIndex = cas.getAnnotationIndex(matchedType);

-    for (AnnotationFS annotationFS : annotationIndex) {

-      toRemove.add(annotationFS);

-    }

-    for (AnnotationFS annotationFS : toRemove) {

-      cas.removeFsFromIndexes(annotationFS);

-    }

-  }

-

-  public String getDescription() {

-    return StringUtils.isBlank(description) ? rule : description;

-  }

-

-  public void setDescription(String description) {

-    this.description = description;

-  }

-

-  public void setTypeSystemLocation(String location) {

-    typeSystemLocation = location;

-  }

-

-  public String getTypeSystemLocation() {

-    return typeSystemLocation;

-  }

-

-  public String getData() {

-    return rule;

-  }

-

-  public void setData(String data) {

-    this.rule = data;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPerspectiveFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPerspectiveFactory.java
deleted file mode 100644
index ddbcc8f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPerspectiveFactory.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import org.apache.uima.ruta.ide.ui.wizards.RutaFileCreationWizard;

-import org.apache.uima.ruta.ide.ui.wizards.RutaPackageCreationWizard;

-import org.apache.uima.ruta.ide.ui.wizards.RutaProjectCreationWizard;

-import org.eclipse.ui.IFolderLayout;

-import org.eclipse.ui.IPageLayout;

-import org.eclipse.ui.IPerspectiveFactory;

-import org.eclipse.ui.console.IConsoleConstants;

-import org.eclipse.ui.progress.IProgressConstants;

-

-public class CDEPerspectiveFactory implements IPerspectiveFactory {

-

-  public static final String TYPE_BROWSER = "org.apache.uima.caseditor.browser";

-

-  public static final String SELECTION_VIEW = "org.apache.uima.caseditor.selection";

-

-  public static final String ANNOTATION_TESTING = "org.apache.uima.ruta.testing.TestingView";

-

-  public static final String QUERY = "org.apache.uima.ruta.query.ui.ScriptQueryView";

-

-  public static final String TEXTRULER = "org.apache.uima.ruta.ml.MainView";

-

-  public static final String SCRIPT_EXPLORER = "org.eclipse.dltk.ui.ScriptExplorer";

-

-  public static final String NEW_FOLDER_WIZARD = "org.eclipse.ui.wizards.new.folder"; //$NON-NLS-1$ 

-

-  public static final String NEW_FILE_WIZARD = "org.eclipse.ui.wizards.new.file"; //$NON-NLS-1$

-

-  public static final String NEW_UNTITLED_TEXT_FILE_WIZARD = "org.eclipse.ui.editors.wizards.UntitledTextFileWizard"; //$NON-NLS-1$

-

-  public static final String ID_NEW_SOURCE_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.NewSourceFolderCreationWizard";

-

-  public static final String ID_NEW_PACKAGE_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.NewPackageCreationWizard";

-

-  public static final String CONSTRAINTSELECT = "org.apache.uima.ruta.cde.ui.ConstraintSelectView";

-

-  public static final String DOCUMENTSELECT = "org.apache.uima.ruta.cde.ui.DocumentView";

-

-  public static final String RESULTVIEW = "org.apache.uima.ruta.cde.ui.ResultView";

-

-  protected void addNewWizardShortcuts(IPageLayout layout) {

-    layout.addNewWizardShortcut(RutaProjectCreationWizard.ID_WIZARD);

-    layout.addNewWizardShortcut(RutaFileCreationWizard.ID_WIZARD);

-

-    layout.addNewWizardShortcut(ID_NEW_SOURCE_WIZARD);

-    layout.addNewWizardShortcut(RutaPackageCreationWizard.ID_WIZARD);

-

-    layout.addNewWizardShortcut(NEW_FOLDER_WIZARD);

-    layout.addNewWizardShortcut(NEW_FILE_WIZARD);

-    layout.addNewWizardShortcut(NEW_UNTITLED_TEXT_FILE_WIZARD);

-  }

-

-  protected void addShowViewShortcuts(IPageLayout layout) {

-    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);

-    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);

-    layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);

-

-    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

-    layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);

-

-    layout.addShowViewShortcut(SCRIPT_EXPLORER);

-    layout.addShowViewShortcut(TYPE_BROWSER);

-    layout.addShowViewShortcut(SELECTION_VIEW);

-    layout.addShowViewShortcut(TEXTRULER);

-    layout.addShowViewShortcut(ANNOTATION_TESTING);

-    layout.addShowViewShortcut(QUERY);

-    layout.addShowViewShortcut(DOCUMENTSELECT);

-    layout.addShowViewShortcut(CONSTRAINTSELECT);

-    layout.addShowViewShortcut(RESULTVIEW);

-

-  }

-

-  protected void addActionSets(IPageLayout layout) {

-

-  }

-

-  public void createFolders(IPageLayout layout) {

-    final String editorArea = layout.getEditorArea();

-

-    IFolderLayout rightFolder = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.8,

-            editorArea);

-    rightFolder.addView(DOCUMENTSELECT);

-    rightFolder.addView(IPageLayout.ID_OUTLINE);

-    rightFolder.addView(TYPE_BROWSER);

-

-    // Folder

-    IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.2, editorArea); //$NON-NLS-1$		

-

-    folder.addView(SCRIPT_EXPLORER);

-    folder.addPlaceholder(IPageLayout.ID_BOOKMARKS);

-

-    // Output folder

-    IFolderLayout outputFolder = layout.createFolder(

-            "bottom", IPageLayout.BOTTOM, (float) 0.68, editorArea); //$NON-NLS-1$

-

-    outputFolder.addView(CONSTRAINTSELECT);

-    outputFolder.addView(IPageLayout.ID_PROBLEM_VIEW);

-    outputFolder.addView(IPageLayout.ID_TASK_LIST);

-    outputFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);

-    outputFolder.addView(SELECTION_VIEW);

-    outputFolder.addView(TEXTRULER);

-    outputFolder.addView(ANNOTATION_TESTING);

-    outputFolder.addView(QUERY);

-

-    IFolderLayout resultFolder = layout.createFolder("bottom-right", IPageLayout.BOTTOM,

-            (float) 0.6, "right");

-    resultFolder.addView(RESULTVIEW);

-

-    outputFolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);

-    outputFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);

-    outputFolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);

-  }

-

-  protected void addPerspectiveShotcuts(IPageLayout layout) {

-    layout.addPerspectiveShortcut("org.apache.uima.ruta.ide.ui.explainPerspective");

-  }

-

-  public void createInitialLayout(IPageLayout layout) {

-    createFolders(layout);

-    addActionSets(layout);

-    addShowViewShortcuts(layout);

-    addNewWizardShortcuts(layout);

-    addPerspectiveShotcuts(layout);

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPreferenceConstants.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPreferenceConstants.java
deleted file mode 100644
index 0094749..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPreferenceConstants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-public class CDEPreferenceConstants {

-

-  public static final String GOOD_RESULT_THRESHOLD = "GOOD_RESULT_THRESHOLD";

-

-  public static final String AVERAGE_RESULT_THRESHOLD = "AVERAGE_RESULT_THRESHOLD";

-

-  public static final String BAD_RESULT_THRESHOLD = "BAD_RESULT_THRESHOLD";

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPreferencePage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPreferencePage.java
deleted file mode 100644
index 7229de6..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/CDEPreferencePage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.IntegerFieldEditor;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class CDEPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {

-

-  private IntegerFieldEditor editor1;

-

-  private IntegerFieldEditor editor2;

-

-  public CDEPreferencePage() {

-    IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  public CDEPreferencePage(String title) {

-    super(title);

-    // TODO Auto-generated constructor stub

-  }

-

-  public CDEPreferencePage(String title, ImageDescriptor image) {

-    super(title, image);

-    // TODO Auto-generated constructor stub

-  }

-

-  public void init(IWorkbench arg0) {

-

-  }

-

-  @Override

-  protected Control createContents(Composite parent) {

-    Composite top = new Composite(parent, SWT.LEFT);

-    top.setLayout(new GridLayout());

-    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-

-    editor1 = new IntegerFieldEditor(CDEPreferenceConstants.GOOD_RESULT_THRESHOLD,

-            "Good result threshold", top);

-    editor1.setPage(this);

-    editor1.setPreferenceStore(getPreferenceStore());

-    editor1.load();

-

-    editor2 = new IntegerFieldEditor(CDEPreferenceConstants.AVERAGE_RESULT_THRESHOLD,

-            "Average result threshold", top);

-    editor2.setPage(this);

-    editor2.setPreferenceStore(getPreferenceStore());

-    editor2.load();

-

-    return top;

-  }

-

-  public boolean performOk() {

-    editor1.store();

-    editor2.store();

-    return super.performOk();

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintDialog.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintDialog.java
deleted file mode 100644
index c254ebd..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintDialog.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.ruta.cde.RutaGEConstraint;

-import org.apache.uima.ruta.cde.RutaRuleListConstraint;

-import org.apache.uima.ruta.cde.SimpleRutaRuleConstraint;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.resource.JFaceResources;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Text;

-

-public class ConstraintDialog extends Dialog {

-

-  private Text ruleText;

-

-  private Text descriptionText;

-

-  private String rule;

-

-  private String description;

-

-  public ConstraintDialog(Shell parent) {

-    super(parent);

-  }

-

-  public void create() {

-    super.create();

-  }

-

-  public void create(SimpleRutaRuleConstraint constraint) {

-    super.create();

-    rule = constraint.getData();

-    description = constraint.getDescription();

-

-    ruleText.setText(rule);

-    descriptionText.setText(description);

-  }

-

-  public void create(RutaRuleListConstraint constraint) {

-    super.create();

-    rule = constraint.getData();

-    description = constraint.getDescription();

-

-    ruleText.setText(rule);

-    descriptionText.setText(description);

-  }

-

-  public void create(RutaGEConstraint constraint) {

-    super.create();

-    rule = constraint.getData();

-    description = constraint.getDescription();

-

-    ruleText.setText(rule);

-    descriptionText.setText(description);

-  }

-

-  protected Control createDialogArea(Composite parent) {

-

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 3;

-    parent.setLayout(layout);

-

-    Label label1 = new Label(parent, SWT.FILL);

-    label1.setText("Constraint Rule :");

-

-    GridData labelGridData = new GridData();

-    labelGridData.grabExcessVerticalSpace = true;

-    labelGridData.horizontalAlignment = GridData.FILL;

-    labelGridData.verticalAlignment = GridData.FILL;

-    labelGridData.horizontalSpan = 3;

-    label1.setLayoutData(labelGridData);

-

-    GridData TextGridData = new GridData();

-    TextGridData.grabExcessHorizontalSpace = true;

-    TextGridData.grabExcessVerticalSpace = true;

-    TextGridData.horizontalAlignment = GridData.FILL;

-    TextGridData.verticalAlignment = GridData.FILL;

-    TextGridData.horizontalSpan = 3;

-    TextGridData.minimumHeight = 100;

-    TextGridData.minimumWidth = 400;

-    ruleText = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);

-    ruleText.setLayoutData(TextGridData);

-

-    Label label2 = new Label(parent, SWT.FILL);

-    label2.setText("Constraint Description :");

-

-    label2.setLayoutData(labelGridData);

-

-    descriptionText = new Text(parent, SWT.SINGLE | SWT.BORDER);

-    descriptionText.setLayoutData(TextGridData);

-    return parent;

-  }

-

-  private boolean isValidInput() {

-    return !StringUtils.isBlank(ruleText.getText());

-  }

-

-  protected boolean isResizable() {

-    return true;

-  }

-

-  private void saveInput() {

-    this.rule = ruleText.getText();

-    this.description = descriptionText.getText();

-  }

-

-  @Override

-  protected void okPressed() {

-    saveInput();

-    super.okPressed();

-  }

-

-  public String getRule() {

-    return rule;

-  }

-

-  public String getDescription() {

-    return description;

-  }

-

-  protected void createButtonsForButtonBar(Composite parent) {

-    GridData gridData = new GridData();

-    gridData.verticalAlignment = GridData.FILL;

-    gridData.horizontalSpan = 3;

-    gridData.grabExcessHorizontalSpace = true;

-    gridData.grabExcessVerticalSpace = true;

-    gridData.horizontalAlignment = SWT.CENTER;

-

-    parent.setLayoutData(gridData);

-    createButton(parent, OK, "Ok", true);

-    Button cancelButton = createButton(parent, CANCEL, "Cancel", false);

-    cancelButton.addSelectionListener(new SelectionAdapter() {

-      public void widgetSelected(SelectionEvent e) {

-        setReturnCode(CANCEL);

-        close();

-      }

-    });

-  }

-

-  protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {

-    // increment the number of columns in the button bar

-    ((GridLayout) parent.getLayout()).numColumns++;

-    Button button = new Button(parent, SWT.PUSH);

-    button.setText(label);

-    button.setFont(JFaceResources.getDialogFont());

-    button.setData(new Integer(id));

-    button.addSelectionListener(new SelectionAdapter() {

-      public void widgetSelected(SelectionEvent event) {

-        if (isValidInput()) {

-          okPressed();

-        }

-      }

-    });

-    if (defaultButton) {

-      Shell shell = parent.getShell();

-      if (shell != null) {

-        shell.setDefaultButton(button);

-      }

-    }

-    setButtonLayoutData(button);

-    return button;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectComposite.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectComposite.java
deleted file mode 100644
index df3058a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectComposite.java
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.ruta.cde.IRutaConstraint;
-import org.apache.uima.ruta.cde.RutaGEConstraint;
-import org.apache.uima.ruta.cde.RutaRuleListConstraint;
-import org.apache.uima.ruta.cde.SimpleRutaRuleConstraint;
-import org.apache.uima.ruta.cde.utils.CDEComparatorFactory;
-import org.apache.uima.ruta.cde.utils.ConstraintData;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.IMemento;
-
-public class ConstraintSelectComposite extends Composite implements ISelectionChangedListener {
-
-  private Clipboard clipboard;
-
-  private Button constraintButtonRuta;
-
-  private Button constraintButtonRutaList;
-
-  private Button constraintButconJava;
-
-  private Button constraintRemoveButton;
-
-  private Button constraintButtonTMComplex;
-
-  private Button exportConstraintsButton;
-
-  private ConstraintSelectTableLabelProvider labelProvider;
-
-  private ConstraintSelectTableContentProvider contentProvider;
-
-  private HashMap<String, Image> images;
-
-  private Table table;
-
-  private TableColumn tc0;
-
-  private TableColumn tc1;
-
-  private TableColumn tc2;
-
-  private TableViewer tableViewer;
-
-  private TableEditor editor;
-
-  private List<ConstraintData> constraintList;
-
-  private int EDITABLECOLUMN = 1;
-
-  private CDEComparatorFactory comparatorFactory;
-
-  public ConstraintSelectComposite(Composite parent, int style) {
-    super(parent, style);
-    initGui();
-    clipboard = new Clipboard(parent.getDisplay());
-    comparatorFactory = new CDEComparatorFactory();
-  }
-
-  public void initGui() {
-    constraintList = new ArrayList<ConstraintData>();
-    this.setLayout(new FormLayout());
-
-    // Simple Constraint Button
-    constraintButtonRuta = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData ConstraintButtonTMData = new FormData();
-    ConstraintButtonTMData.width = 25;
-    ConstraintButtonTMData.height = 25;
-    ConstraintButtonTMData.top = new FormAttachment(0, 10);
-    ConstraintButtonTMData.right = new FormAttachment(100, -5);
-    constraintButtonRuta.setLayoutData(ConstraintButtonTMData);
-    Image folderIcon = getImage("add");
-    constraintButtonRuta.setImage(folderIcon);
-    constraintButtonRuta.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-
-        ConstraintDialog cdialog = new ConstraintDialog(getShell());
-        cdialog.create();
-        if (cdialog.open() == Window.OK) {
-          SimpleRutaRuleConstraint newConstraint = new SimpleRutaRuleConstraint(cdialog.getRule(),
-                  cdialog.getDescription());
-          ConstraintData newConstraintData = new ConstraintData(newConstraint);
-          constraintList.add(newConstraintData);
-          tableViewer.setInput(constraintList);
-          tableViewer.refresh();
-        }
-      }
-    });
-
-    // ListConstraint Button
-    constraintButtonRutaList = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData ConstraintButtonTMListData = new FormData();
-    ConstraintButtonTMListData.width = 25;
-    ConstraintButtonTMListData.height = 25;
-    ConstraintButtonTMListData.top = new FormAttachment(constraintButtonRuta, 10);
-    ConstraintButtonTMListData.right = new FormAttachment(100, -5);
-    constraintButtonRutaList.setLayoutData(ConstraintButtonTMListData);
-    Image addListIcon = getImage("scriptAdd");
-    constraintButtonRutaList.setImage(addListIcon);
-    constraintButtonRutaList.setToolTipText("Add a list of SimpleRutaConstraints");
-    constraintButtonRutaList.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-
-        ConstraintDialog cdialog = new ConstraintDialog(getShell());
-        cdialog.create();
-        if (cdialog.open() == Window.OK) {
-          RutaRuleListConstraint newConstraint = new RutaRuleListConstraint(cdialog.getRule(),
-                  cdialog.getDescription());
-          ConstraintData newConstraintData = new ConstraintData(newConstraint);
-          constraintList.add(newConstraintData);
-          tableViewer.setInput(constraintList);
-          tableViewer.refresh();
-        }
-      }
-    });
-
-    // Complex Constraint Button now used for GEConstraints
-
-    constraintButtonTMComplex = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData ConstraintButtonTMComplexData = new FormData();
-    ConstraintButtonTMComplexData.width = 25;
-    ConstraintButtonTMComplexData.height = 25;
-    ConstraintButtonTMComplexData.top = new FormAttachment(constraintButtonRutaList, 10);
-    ConstraintButtonTMComplexData.right = new FormAttachment(100, -5);
-    constraintButtonTMComplex.setLayoutData(ConstraintButtonTMComplexData);
-    Image addTableIcon = getImage("tmAdd");
-    constraintButtonTMComplex.setImage(addTableIcon);
-    constraintButtonTMComplex.setToolTipText("Add an Annotation-Distribution Constraint");
-    constraintButtonTMComplex.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ConstraintDialog cdialog = new ConstraintDialog(getShell());
-        cdialog.create();
-        if (cdialog.open() == Window.OK) {
-          RutaGEConstraint newConstraint = new RutaGEConstraint(cdialog.getRule(), cdialog
-                  .getDescription());
-          ConstraintData newConstraintData = new ConstraintData(newConstraint);
-          constraintList.add(newConstraintData);
-          tableViewer.setInput(constraintList);
-          tableViewer.refresh();
-        }
-      }
-    });
-
-    // Constraint Edit Button
-
-    constraintButconJava = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData ConstraintButtonJavaData = new FormData();
-    ConstraintButtonJavaData.width = 25;
-    ConstraintButtonJavaData.height = 25;
-    ConstraintButtonJavaData.top = new FormAttachment(constraintButtonTMComplex, 10);
-    ConstraintButtonJavaData.right = new FormAttachment(100, -5);
-    constraintButconJava.setLayoutData(ConstraintButtonJavaData);
-    Image addJavaIcon = getImage("cupAdd");
-    constraintButconJava.setImage(addJavaIcon);
-    constraintButconJava.setToolTipText("Add Java Constraint");
-
-    constraintRemoveButton = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData ConstraintRemoveData = new FormData();
-    ConstraintRemoveData.width = 25;
-    ConstraintRemoveData.height = 25;
-    ConstraintRemoveData.top = new FormAttachment(constraintButconJava, 10);
-    ConstraintRemoveData.right = new FormAttachment(100, -5);
-    constraintRemoveButton.setLayoutData(ConstraintRemoveData);
-    Image addRemoveIcon = getImage("delete");
-    constraintRemoveButton.setImage(addRemoveIcon);
-    constraintRemoveButton.setToolTipText("Remove Selected Constraints");
-    constraintRemoveButton.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        int[] indices = table.getSelectionIndices();
-        for (int i = indices.length - 1; i >= 0; i--) {
-          constraintList.remove(indices[i]);
-        }
-        tableViewer.setSelection(new StructuredSelection());
-        editor.getEditor().dispose();
-        tableViewer.setInput(constraintList);
-        tableViewer.refresh();
-      }
-    });
-
-    tableViewer = new TableViewer(this, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
-            | SWT.FULL_SELECTION);
-    contentProvider = new ConstraintSelectTableContentProvider();
-    labelProvider = new ConstraintSelectTableLabelProvider();
-
-    tableViewer.setContentProvider(contentProvider);
-    tableViewer.setLabelProvider(labelProvider);
-    table = tableViewer.getTable();
-    FormData tableFormData = new FormData();
-    tableFormData.top = new FormAttachment(0, 10);
-    tableFormData.left = new FormAttachment(0, 10);
-    tableFormData.right = new FormAttachment(constraintButtonRuta, -10);
-    tableFormData.bottom = new FormAttachment(100, 0);
-    table.setLayoutData(tableFormData);
-
-    table.addKeyListener(new KeyListener() {
-
-      public void keyPressed(KeyEvent e) {
-        // if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {
-        // String output = "";
-        // TableItem[] items = table.getSelection();
-        // for (TableItem item : items) {
-        // ConstraintData data = (ConstraintData) item.getData();
-        // output = output + data.getConstraint().getData() + "\n";
-        // }
-        // clipboard.setContents(new Object[] { output },
-        // new Transfer[] { TextTransfer.getInstance() });
-        // }
-      }
-
-      public void keyReleased(KeyEvent arg0) {
-      }
-    });
-
-    tableViewer.addDoubleClickListener(new IDoubleClickListener() {
-      public void doubleClick(DoubleClickEvent event) {
-        IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
-        if (selection.isEmpty()) {
-          return;
-        }
-        Object element = selection.getFirstElement();
-        if (element instanceof ConstraintData) {
-          ConstraintData data = (ConstraintData) element;
-          IRutaConstraint constraint = data.getConstraint();
-          if (constraint instanceof SimpleRutaRuleConstraint) {
-            ConstraintDialog cdialog = new ConstraintDialog(getShell());
-            cdialog.create((SimpleRutaRuleConstraint) constraint);
-            if (cdialog.open() == Window.OK) {
-              SimpleRutaRuleConstraint newConstraint = new SimpleRutaRuleConstraint(cdialog
-                      .getRule(), cdialog.getDescription());
-              data.setConstraint(newConstraint);
-              tableViewer.setInput(constraintList);
-              tableViewer.refresh();
-            }
-          }
-
-          if (constraint instanceof RutaRuleListConstraint) {
-            ConstraintDialog cdialog = new ConstraintDialog(getShell());
-            cdialog.create((RutaRuleListConstraint) constraint);
-            if (cdialog.open() == Window.OK) {
-              RutaRuleListConstraint newConstraint = new RutaRuleListConstraint(cdialog.getRule(),
-                      cdialog.getDescription());
-              data.setConstraint(newConstraint);
-              tableViewer.setInput(constraintList);
-              tableViewer.refresh();
-            }
-          }
-
-          if (constraint instanceof RutaGEConstraint) {
-            ConstraintDialog cdialog = new ConstraintDialog(getShell());
-            cdialog.create((RutaGEConstraint) constraint);
-            if (cdialog.open() == Window.OK) {
-
-              RutaGEConstraint newConstraint = new RutaGEConstraint(cdialog.getRule(), cdialog
-                      .getDescription());
-              data.setConstraint(newConstraint);
-              tableViewer.setInput(constraintList);
-              tableViewer.refresh();
-            }
-          }
-        }
-
-        // /...
-      }
-
-    });
-
-    tc1 = new TableColumn(table, SWT.LEFT);
-    tc1.setText("Constraint");
-    tc1.setWidth(300);
-    tc1.addSelectionListener(new SelectionAdapter() {
-      public void widgetSelected(SelectionEvent event) {
-        Comparator comparator = comparatorFactory.getComparator(tc1);
-        Collections.sort(constraintList, comparator);
-        if (editor.getEditor() != null) {
-          editor.getEditor().dispose();
-        }
-        tableViewer.setInput(constraintList);
-        tableViewer.refresh();
-      }
-    });
-
-    tc2 = new TableColumn(table, SWT.LEFT);
-    tc2.setText("Weight");
-    tc2.setWidth(50);
-    tc2.addSelectionListener(new SelectionAdapter() {
-      public void widgetSelected(SelectionEvent event) {
-        Comparator comparator = comparatorFactory.getComparator(tc2);
-        Collections.sort(constraintList, comparator);
-        if (editor.getEditor() != null) {
-          editor.getEditor().dispose();
-        }
-        tableViewer.setInput(constraintList);
-        tableViewer.refresh();
-      }
-    });
-
-    editor = new TableEditor(table);
-    // The editor must have the same size as the cell and must
-    // not be any smaller than 50 pixels.
-    editor.horizontalAlignment = SWT.LEFT;
-    editor.grabHorizontal = true;
-    editor.minimumWidth = 50;
-    table.addSelectionListener(new SelectionAdapter() {
-      public void widgetSelected(SelectionEvent e) {
-        // Clean up any previous editor control
-        Control oldEditor = editor.getEditor();
-
-        if (oldEditor != null)
-          oldEditor.dispose();
-
-        // Identify the selected row
-        TableItem item = (TableItem) e.item;
-        if (item == null)
-          return;
-
-        // The control that will be the editor must be a child of the
-        // Table
-        Spinner newEditor = new Spinner(table, SWT.NONE);
-
-        if (item.getData() instanceof ConstraintData) {
-          ConstraintData data = (ConstraintData) item.getData();
-          newEditor.setSelection(data.getWeight());
-        }
-
-        newEditor.addModifyListener(new ModifyListener() {
-          public void modifyText(ModifyEvent e) {
-            if (editor.getItem().isDisposed()) {
-              return;
-            }
-            Spinner spinner = (Spinner) editor.getEditor();
-            int newWeight = spinner.getSelection();
-            TableItem item = editor.getItem();
-            if (item.getData() instanceof ConstraintData) {
-              ConstraintData data = (ConstraintData) item.getData();
-              data.setWeight(newWeight);
-            }
-            tableViewer.refresh();
-          }
-        });
-        newEditor.setFocus();
-        editor.setEditor(newEditor, item, EDITABLECOLUMN);
-      }
-    });
-    // Resize columns to match input
-    // for (int i = 0, n = table.getColumnCount(); i < n; i++) {
-    // table.getColumn(i).pack();
-    // }
-
-    table.setHeaderVisible(true);
-    table.setLinesVisible(true);
-    tableViewer.refresh();
-    this.layout();
-
-  }
-
-  public void selectionChanged(SelectionChangedEvent arg0) {
-    // TODO Auto-generated method stub
-
-  }
-
-  private void initImages() {
-    images = new HashMap<String, Image>();
-    ImageDescriptor desc;
-    Image image;
-    String name;
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/10563.add_as_source_folder.gif");
-    image = desc.createImage();
-    name = "addAsSourceFolder";
-    images.put(name, image);
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/cup_add.png");
-    image = desc.createImage();
-    name = "cupAdd";
-    images.put(name, image);
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/delete.png");
-    image = desc.createImage();
-    name = "delete";
-    images.put(name, image);
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/script_add.png");
-    image = desc.createImage();
-    name = "scriptAdd";
-    images.put(name, image);
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/ruta_obj_add.png");
-    image = desc.createImage();
-    name = "tmAdd";
-    images.put(name, image);
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/add.png");
-    image = desc.createImage();
-    name = "add";
-    images.put(name, image);
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/folder_page.png");
-    image = desc.createImage();
-    name = "export";
-    images.put(name, image);
-
-  }
-
-  public Image getImage(String name) {
-    if (images == null) {
-      initImages();
-    }
-    return images.get(name);
-  }
-
-  public List<ConstraintData> getConstraintList() {
-    return this.constraintList;
-  }
-
-  public TableViewer getViewer() {
-    return tableViewer;
-  }
-
-  public void saveState(IMemento memento) {
-    for (ConstraintData constraintData : constraintList) {
-      if (constraintData.getConstraint() instanceof SimpleRutaRuleConstraint) {
-        IMemento currentMemento = memento.createChild("constraint", "SimpleRutaConstraint");
-        SimpleRutaRuleConstraint constraint = (SimpleRutaRuleConstraint) constraintData
-                .getConstraint();
-        currentMemento.createChild("Data", constraint.getData());
-        currentMemento.createChild("Description", constraint.getDescription());
-        currentMemento.createChild("Weight", "" + constraintData.getWeight());
-      }
-
-      if (constraintData.getConstraint() instanceof RutaRuleListConstraint) {
-        IMemento currentMemento = memento.createChild("constraint", "ListRutaConstraint");
-        RutaRuleListConstraint constraint = (RutaRuleListConstraint) constraintData.getConstraint();
-        currentMemento.createChild("Data", constraint.getData());
-        currentMemento.createChild("Description", constraint.getDescription());
-        currentMemento.createChild("Weight", "" + constraintData.getWeight());
-      }
-
-      if (constraintData.getConstraint() instanceof RutaGEConstraint) {
-        IMemento currentMemento = memento.createChild("constraint", "GEConstraint");
-        RutaGEConstraint constraint = (RutaGEConstraint) constraintData.getConstraint();
-        currentMemento.createChild("Data", constraint.getData());
-        currentMemento.createChild("Description", constraint.getDescription());
-        currentMemento.createChild("Weight", "" + constraintData.getWeight());
-      }
-    }
-  }
-
-  public void restoreState(IMemento memento) {
-    for (IMemento constraintMemento : memento.getChildren("constraint")) {
-      if (constraintMemento.getID().equals("SimpleRutaConstraint")) {
-        String rule = constraintMemento.getChild("Data").getID();
-        String description = constraintMemento.getChild("Description").getID();
-        SimpleRutaRuleConstraint constraint = new SimpleRutaRuleConstraint(rule, description);
-        ConstraintData data = new ConstraintData(constraint);
-        String weightString = constraintMemento.getChild("Weight").getID();
-        if (!StringUtils.isBlank(weightString)) {
-          data.setWeight(Integer.parseInt(weightString));
-        }
-        constraintList.add(data);
-      }
-      if (constraintMemento.getID().equals("ListRutaConstraint")) {
-        String rule = constraintMemento.getChild("Data").getID();
-        String description = constraintMemento.getChild("Description").getID();
-        RutaRuleListConstraint constraint = new RutaRuleListConstraint(rule, description);
-        ConstraintData data = new ConstraintData(constraint);
-        String weightString = constraintMemento.getChild("Weight").getID();
-        if (!StringUtils.isBlank(weightString)) {
-          data.setWeight(Integer.parseInt(weightString));
-        }
-        constraintList.add(data);
-      }
-      if (constraintMemento.getID().equals("GEConstraint")) {
-        String rule = constraintMemento.getChild("Data").getID();
-        String description = constraintMemento.getChild("Description").getID();
-        RutaGEConstraint constraint = new RutaGEConstraint(rule, description);
-        ConstraintData data = new ConstraintData(constraint);
-        String weightString = constraintMemento.getChild("Weight").getID();
-        if (!StringUtils.isBlank(weightString)) {
-          data.setWeight(Integer.parseInt(weightString));
-        }
-        constraintList.add(data);
-      }
-    }
-    tableViewer.setInput(constraintList);
-    tableViewer.refresh();
-  }
-
-  public static Image createImage(String path) {
-    return RutaAddonsPlugin.getImageDescriptor(path).createImage();
-  }
-
-  public void setConstraints(List<ConstraintData> constraints) {
-    this.constraintList = constraints;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectTableContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectTableContentProvider.java
deleted file mode 100644
index 6818f1a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectTableContentProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class ConstraintSelectTableContentProvider implements IStructuredContentProvider {
-
-  public void dispose() {
-  }
-
-  public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
-  }
-
-  public Object[] getElements(Object inputElement) {
-    Object[] o = new Object[0];
-    if (inputElement instanceof ArrayList) {
-      return ((ArrayList<?>) inputElement).toArray();
-    }
-    return o;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectTableLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectTableLabelProvider.java
deleted file mode 100644
index 6fc7e0b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectTableLabelProvider.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.ruta.cde.SimpleRutaRuleConstraint;
-import org.apache.uima.ruta.cde.utils.ConstraintData;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class ConstraintSelectTableLabelProvider implements ITableLabelProvider {
-
-  public void addListener(ILabelProviderListener arg0) {
-  }
-
-  public void dispose() {
-  }
-
-  public boolean isLabelProperty(Object arg0, String arg1) {
-    return false;
-  }
-
-  public void removeListener(ILabelProviderListener arg0) {
-  }
-
-  public Image getColumnImage(Object element, int columnIndex) {
-    return null;
-  }
-
-  public String getColumnText(Object element, int columnIndex) {
-    if (element instanceof ConstraintData) {
-      ConstraintData data = (ConstraintData) element;
-      if (columnIndex == 0) {
-        if (StringUtils.isBlank(data.getDescription())
-                && data.getConstraint() instanceof SimpleRutaRuleConstraint) {
-          SimpleRutaRuleConstraint c = (SimpleRutaRuleConstraint) data.getConstraint();
-          return c.getData();
-        } else {
-          return data.getDescription();
-        }
-      } else if (columnIndex == 1) {
-        return String.valueOf(data.getWeight());
-      }
-    }
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectView.java
deleted file mode 100644
index c609c03..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectView.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-
-public class ConstraintSelectView extends ViewPart {
-
-  private ConstraintSelectComposite consSelectComp;
-
-  private IMemento memento;
-
-  public ConstraintSelectView() {
-    super();
-  }
-
-  @Override
-  public void createPartControl(Composite parent) {
-    consSelectComp = new ConstraintSelectComposite(parent, SWT.FILL);
-    if (memento != null) {
-      consSelectComp.restoreState(memento);
-      memento = null;
-    }
-  }
-
-  @Override
-  public void setFocus() {
-    // TODO Auto-generated method stub
-    this.consSelectComp.setFocus();
-  }
-
-  public ConstraintSelectComposite getComposite() {
-    return consSelectComp;
-  }
-
-  public void saveState(IMemento memento) {
-    consSelectComp.saveState(memento);
-  }
-
-  public void init(IViewSite site, IMemento memento) throws PartInitException {
-    this.memento = memento;
-    super.init(site, memento);
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java
deleted file mode 100644
index 183e3b7..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.ruta.cde.utils.CDEComparatorFactory;
-import org.apache.uima.ruta.cde.utils.DocumentData;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.internal.Workbench;
-import org.eclipse.ui.part.FileEditorInput;
-
-public class DocumentSelectComposite extends Composite {
-
-  private Clipboard clipboard;
-
-  private Table table;
-
-  private TableViewer tableViewer;
-
-  private DocumentTableLabelProvider labelProvider;
-
-  private DocumentTableContentProvider contentProvider;
-
-  private ArrayList<DocumentData> documentList;
-
-  private HashMap<String, Image> images;
-
-  private Label directoryLabel;
-
-  private Label typeSystemLabel;
-
-  private Text inputDirectoryText;
-
-  private Label testDataLabel;
-
-  private Text testDirectoryText;
-
-  private Button testDataButton;
-
-  private Button dirButton;
-
-  private Button delButton;
-
-  private Button tsButton;
-
-  private Text tsLocationText;
-
-  private TableColumn tc0;
-
-  private TableColumn tc1;
-
-  private TableColumn tc2;
-
-  private TableColumn tc3;
-
-  private Text measuresText;
-
-  private CDEComparatorFactory compareFactory;
-
-  public DocumentSelectComposite(Composite parent, int style) {
-    super(parent, style);
-    initGui();
-    clipboard = new Clipboard(parent.getDisplay());
-    compareFactory = new CDEComparatorFactory();
-  }
-
-  public void initGui() {
-    documentList = new ArrayList<DocumentData>();
-
-    this.setLayout(new FormLayout());
-    this.setSize(600, 380);
-    directoryLabel = new Label(this, SWT.NONE);
-    FormData label1LData = new FormData();
-    label1LData.left = new FormAttachment(0, 10);
-    label1LData.top = new FormAttachment(0, 10);
-    label1LData.width = 80;
-    directoryLabel.setLayoutData(label1LData);
-    directoryLabel.setText("Documents:");
-
-    delButton = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData delButtonData = new FormData();
-    delButtonData.width = 25;
-    delButtonData.height = 25;
-    delButtonData.top = new FormAttachment(directoryLabel, 0, SWT.CENTER);
-    delButtonData.right = new FormAttachment(100, -10);
-    delButton.setLayoutData(delButtonData);
-    Image folderIcon = getImage("delete");
-    delButton.setImage(folderIcon);
-    delButton.setToolTipText("Remove selected documents");
-    delButton.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        int[] indices = table.getSelectionIndices();
-
-        for (int i = indices.length - 1; i >= 0; i--) {
-          documentList.remove(indices[i]);
-        }
-
-        tableViewer.setInput(documentList);
-        tableViewer.refresh();
-      }
-    });
-
-    dirButton = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData dirButtonData = new FormData();
-    dirButtonData.width = 25;
-    dirButtonData.height = 25;
-    dirButtonData.top = new FormAttachment(directoryLabel, 0, SWT.CENTER);
-    // dirButtonData.left = new FormAttachment(inputDirectoryText, 10);
-    dirButtonData.right = new FormAttachment(delButton, -10);
-    dirButton.setLayoutData(dirButtonData);
-    folderIcon = getImage("folder");
-    dirButton.setImage(folderIcon);
-    dirButton.setToolTipText("Select document Folder");
-    dirButton.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        DirectoryDialog dlg = new DirectoryDialog(getShell());
-        dlg.setFilterPath(inputDirectoryText.getText());
-        dlg.setText("Input Directory");
-        dlg.setMessage("Select a directory with input document files.");
-        String dir = dlg.open();
-        if (dir != null) {
-          documentList = new ArrayList<DocumentData>();
-          File directory = new File(dir);
-
-          String[] files = directory.list();
-
-          for (String filePath : files) {
-            DocumentData documentData = new DocumentData(new File(directory
-                    + System.getProperty("file.separator") + filePath));
-            documentList.add(documentData);
-          }
-          inputDirectoryText.setText(dir);
-          tableViewer.setInput(documentList);
-          tableViewer.refresh();
-        }
-      }
-    });
-
-    inputDirectoryText = new Text(this, SWT.SINGLE | SWT.BORDER);
-    FormData inputDirectoryTextData = new FormData();
-    // inputDirectoryTextData.width = 150;
-    inputDirectoryTextData.left = new FormAttachment(directoryLabel, 10);
-    inputDirectoryTextData.top = new FormAttachment(directoryLabel, 0, SWT.CENTER);
-    inputDirectoryTextData.right = new FormAttachment(dirButton, -12);
-    inputDirectoryText.setLayoutData(inputDirectoryTextData);
-    inputDirectoryText.setText("");
-
-    inputDirectoryText.addModifyListener(new ModifyListener() {
-      public void modifyText(ModifyEvent e) {
-        // without that listener, the text fields forget the
-        // last change when leaving with tab! don't know why!
-        // we also MUST call getText() otherwise the changes in
-        // the field are lost (what is this???!!)
-        Text t = (Text) e.widget;
-        t.getText();
-        // updateViewer(t.getText());
-      }
-    });
-
-    // GUI Definitions for Test Data Selection Components
-
-    testDataLabel = new Label(this, SWT.NONE);
-    FormData testDataLabelData = new FormData();
-    testDataLabelData.left = new FormAttachment(0, 10);
-    // testDataLabelData.right = new FormAttachment(100, -12);
-    testDataLabelData.top = new FormAttachment(directoryLabel, 15);
-    testDataLabel.setLayoutData(testDataLabelData);
-    testDataLabel.setText("Test Data:");
-
-    testDataButton = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData testDataButtonData = new FormData();
-    testDataButtonData.width = 25;
-    testDataButtonData.height = 25;
-    testDataButtonData.top = new FormAttachment(testDataLabel, 0, SWT.CENTER);
-    testDataButtonData.right = new FormAttachment(100, -10);
-    testDataButton.setLayoutData(testDataButtonData);
-    folderIcon = getImage("folder");
-    testDataButton.setImage(folderIcon);
-    testDataButton.setToolTipText("Select the folder containing the test files");
-
-    testDataButton.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        DirectoryDialog dlg2 = new DirectoryDialog(getShell());
-        dlg2.setFilterPath(testDirectoryText.getText());
-        dlg2.setText("Location of the test files");
-        String dir = dlg2.open();
-        if (dir != null) {
-          testDirectoryText.setText(dir);
-        }
-      }
-    });
-
-    testDirectoryText = new Text(this, SWT.SINGLE | SWT.BORDER);
-    FormData testDirectoryTextData = new FormData();
-    testDirectoryTextData.top = new FormAttachment(testDataLabel, 0, SWT.CENTER);
-    testDirectoryTextData.left = new FormAttachment(directoryLabel, 10);
-    testDirectoryTextData.right = new FormAttachment(testDataButton, -10);
-    testDirectoryText.setLayoutData(testDirectoryTextData);
-    testDirectoryText.setText("");
-
-    testDirectoryText.addModifyListener(new ModifyListener() {
-      public void modifyText(ModifyEvent e) {
-        // without that listener, the text fields forget the
-        // last change when leaving with tab! don't know why!
-        // we also MUST call getText() otherwise the changes in
-        // the field are lost (what is this???!!)
-        Text t = (Text) e.widget;
-        t.getText();
-        // updateViewer(t.getText());
-      }
-    });
-
-    // GUI Code for TypeSystem Selection
-
-    this.typeSystemLabel = new Label(this, SWT.NONE);
-    FormData tSLabelData = new FormData();
-    tSLabelData.left = new FormAttachment(0, 10);
-    tSLabelData.top = new FormAttachment(testDataLabel, 15);
-    tSLabelData.width = 80;
-    typeSystemLabel.setLayoutData(tSLabelData);
-    typeSystemLabel.setText("Type System:");
-
-    tsButton = new Button(this, SWT.PUSH | SWT.CENTER);
-    FormData tsButtonData = new FormData();
-    tsButtonData.width = 25;
-    tsButtonData.height = 25;
-    tsButtonData.top = new FormAttachment(typeSystemLabel, 0, SWT.CENTER);
-    tsButtonData.right = new FormAttachment(100, -10);
-    tsButton.setLayoutData(tsButtonData);
-    folderIcon = getImage("folder");
-    tsButton.setImage(folderIcon);
-    tsButton.setToolTipText("Select the Type System");
-    tsButton.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        FileDialog dlg = new FileDialog(getShell());
-        dlg.setFilterPath(tsLocationText.getText());
-        dlg.setText("Type System Location");
-        String dir = dlg.open();
-        if (dir != null) {
-          tsLocationText.setText(dir);
-        }
-      }
-    });
-
-    tsLocationText = new Text(this, SWT.SINGLE | SWT.BORDER);
-    FormData tsLocationTextData = new FormData();
-    tsLocationTextData.left = new FormAttachment(typeSystemLabel, 10);
-    tsLocationTextData.top = new FormAttachment(typeSystemLabel, 0, SWT.CENTER);
-    tsLocationTextData.right = new FormAttachment(tsButton, -10);
-    tsLocationText.setLayoutData(tsLocationTextData);
-    tsLocationText.setText("");
-
-    tsLocationText.addModifyListener(new ModifyListener() {
-      public void modifyText(ModifyEvent e) {
-        // without that listener, the text fields forget the
-        // last change when leaving with tab! don't know why!
-        // we also MUST call getText() otherwise the changes in
-        // the field are lost (what is this???!!)
-        Text t = (Text) e.widget;
-        t.getText();
-      }
-    });
-
-    measuresText = new Text(this, SWT.READ_ONLY);
-    FormData cNrTextData = new FormData();
-    cNrTextData.left = new FormAttachment(0, 10);
-    cNrTextData.top = new FormAttachment(typeSystemLabel, 15);
-    cNrTextData.right = new FormAttachment(100, -10);
-    // cNrLabelData.width = 30;
-    measuresText.setLayoutData(cNrTextData);
-    measuresText.setText("... no measures available yet");
-
-    tableViewer = new TableViewer(this, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
-            | SWT.FULL_SELECTION);
-
-    labelProvider = new DocumentTableLabelProvider();
-    tableViewer.setLabelProvider(labelProvider);
-    contentProvider = new DocumentTableContentProvider();
-    tableViewer.setContentProvider(contentProvider);
-
-    tableViewer.addDoubleClickListener(new IDoubleClickListener() {
-      public void doubleClick(DoubleClickEvent event) {
-        if (event.getSelection() instanceof IStructuredSelection) {
-          IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
-          Object object = selection.getFirstElement();
-          if (object instanceof DocumentData) {
-            DocumentData data = (DocumentData) object;
-            Path path = new Path(data.getDocument().getAbsolutePath());
-
-            IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
-            // IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-
-            IWorkbenchPage page = Workbench.getInstance().getActiveWorkbenchWindow()
-                    .getActivePage();
-            try {
-              page.openEditor(new FileEditorInput(file), "org.apache.uima.caseditor.editor");
-            } catch (PartInitException e) {
-              // TODO Auto-generated catch block
-              e.printStackTrace();
-            }
-          }
-        }
-      }
-    });
-
-    this.table = tableViewer.getTable();
-    FormData tableFormData = new FormData();
-    tableFormData.top = new FormAttachment(measuresText, 15);
-    tableFormData.bottom = new FormAttachment(100, 0);
-    tableFormData.left = new FormAttachment(0, 0);
-    tableFormData.right = new FormAttachment(100, 0);
-    table.setLayoutData(tableFormData);
-    table.addKeyListener(new KeyListener() {
-
-      public void keyPressed(KeyEvent e) {
-        if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {
-          String output = "";
-          TableItem[] items = table.getSelection();
-          for (TableItem item : items) {
-            DocumentData data = (DocumentData) item.getData();
-            output = output + data.getDocument().getName() + ", " + data.getAugmentedResult()
-                    + ", " + data.getFMeasure() + ", \n";
-          }
-          clipboard.setContents(new Object[] { output },
-                  new Transfer[] { TextTransfer.getInstance() });
-        }
-      }
-
-      public void keyReleased(KeyEvent arg0) {
-      }
-    });
-
-    tc0 = new TableColumn(table, SWT.LEFT);
-    tc0.setText("  ");
-    tc0.setWidth(25);
-
-    tc1 = new TableColumn(table, SWT.LEFT);
-    tc1.setText("Document");
-    tc1.setWidth(160);
-    tc1.addSelectionListener(new SelectionAdapter() {
-      public void widgetSelected(SelectionEvent event) {
-        Comparator comparator = compareFactory.getComparator(tc1);
-        Collections.sort(documentList, comparator);
-        tableViewer.setInput(documentList);
-        tableViewer.refresh();
-      }
-    });
-
-    tc2 = new TableColumn(table, SWT.RIGHT);
-    tc2.setText("CDE");
-    tc2.setWidth(45);
-    tc2.addSelectionListener(new SelectionAdapter() {
-      public void widgetSelected(SelectionEvent event) {
-        Comparator comparator = compareFactory.getComparator(tc2);
-        Collections.sort(documentList, comparator);
-        tableViewer.setInput(documentList);
-        tableViewer.refresh();
-      }
-    });
-
-    tc3 = new TableColumn(table, SWT.RIGHT);
-    tc3.setText("F1");
-    tc3.setWidth(45);
-    tc3.addSelectionListener(new SelectionAdapter() {
-      public void widgetSelected(SelectionEvent event) {
-        Comparator comparator = compareFactory.getComparator(tc3);
-        Collections.sort(documentList, comparator);
-        tableViewer.setInput(documentList);
-        tableViewer.refresh();
-      }
-    });
-
-    DropTarget dt = new DropTarget(table, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList != null && fileList.length > 0) {
-          for (int i = 0; i < fileList.length; i++) {
-            File file = new File(fileList[i]);
-            if (file.isDirectory()) {
-
-            } else {
-              DocumentData newDocument = new DocumentData(file);
-              documentList.add(newDocument);
-              tableViewer.setInput(documentList);
-              tableViewer.refresh();
-            }
-          }
-        }
-      }
-    });
-
-    DropTarget dt2 = new DropTarget(inputDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt2.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt2.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList != null && fileList.length == 1) {
-          String string = fileList[0];
-          inputDirectoryText.setText(string);
-          setDocumentsByDir();
-        }
-      }
-    });
-
-    DropTarget dt3 = new DropTarget(testDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt3.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt3.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList != null && fileList.length == 1) {
-          String string = fileList[0];
-          testDirectoryText.setText(string);
-        }
-      }
-    });
-
-    DropTarget dt4 = new DropTarget(tsLocationText, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt4.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt4.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList != null && fileList.length == 1) {
-          String string = fileList[0];
-          File file = new File(string);
-          if (file.isFile()) {
-            if (file.getName().endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {
-              String typeSystemDescriptorLocation = "";
-              try {
-                typeSystemDescriptorLocation = RutaProjectUtils.getTypeSystemDescriptorPath(string)
-                        .toPortableString();
-              } catch (CoreException e) {
-                RutaAddonsPlugin.error(e);
-              }
-              tsLocationText.setText(typeSystemDescriptorLocation);
-            } else if (file.getName().endsWith(".xml")) {
-              tsLocationText.setText(string);
-            }
-          }
-
-        }
-      }
-    });
-
-    table.setHeaderVisible(true);
-    table.setLinesVisible(true);
-    tableViewer.refresh();
-    this.layout();
-
-  }
-
-  private void initImages() {
-    images = new HashMap<String, Image>();
-    ImageDescriptor desc;
-    Image image;
-    String name;
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/delete.png");
-    image = desc.createImage();
-    name = "delete";
-    images.put(name, image);
-
-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/folder.png");
-    image = desc.createImage();
-    name = "folder";
-    images.put(name, image);
-
-  }
-
-  public Image getImage(String name) {
-    if (images == null) {
-      initImages();
-    }
-    return images.get(name);
-  }
-
-  public void updateViewer(String documentPath) {
-    File folder = new File(documentPath);
-    File[] documents = folder.listFiles();
-    tableViewer.setInput(documents);
-
-  }
-
-  public TableViewer getViewer() {
-    return this.tableViewer;
-  }
-
-  public ArrayList<DocumentData> getDocumentList() {
-    return this.documentList;
-  }
-
-  public File getTypeSystem() {
-    return new File(tsLocationText.getText());
-  }
-
-  public void saveState(IMemento memento) {
-    memento.createChild("inputDirectory", inputDirectoryText.getText());
-    memento.createChild("testDirectory", testDirectoryText.getText());
-    memento.createChild("tsLocation", tsLocationText.getText());
-    memento.createChild("documents");
-    for (DocumentData documentData : documentList) {
-      String docPath = documentData.getDocument().getAbsolutePath();
-      String docName = "document";
-      IMemento documentMemento = memento.getChild("documents");
-      documentMemento.createChild(docName, docPath);
-    }
-  }
-
-  public void restoreState(IMemento memento) {
-    if (memento == null) {
-      return;
-    }
-    IMemento inputDirectory = memento.getChild("inputDirectory");
-    if (inputDirectory != null) {
-      inputDirectoryText.setText(inputDirectory.getID());
-    }
-    IMemento testDirectory = memento.getChild("testDirectory");
-    if (testDirectory != null) {
-      testDirectoryText.setText(testDirectory.getID());
-    }
-    IMemento tsLocation = memento.getChild("tsLocation");
-    if (tsLocation != null) {
-      tsLocationText.setText(tsLocation.getID());
-    }
-    IMemento documents = memento.getChild("documents");
-    if (documents != null) {
-      for (IMemento document : documents.getChildren("document")) {
-        DocumentData docData = new DocumentData(new File(document.getID()));
-        documentList.add(docData);
-      }
-      tableViewer.setInput(documentList);
-      tableViewer.refresh();
-    }
-
-  }
-
-  public String getTestDataPath() {
-    return testDirectoryText.getText();
-  }
-
-  public String getDocumentFolderPath() {
-    return inputDirectoryText.getText();
-  }
-
-  public void updateMeasureReport(String measureReport) {
-    measuresText.setText(measureReport);
-    measuresText.redraw();
-  }
-
-  public void setDocumentsByDir(File dir) {
-    documentList = new ArrayList<DocumentData>();
-    Iterator<File> iterateFiles = FileUtils.iterateFiles(dir, new String[] { "xmi" }, true);
-    while (iterateFiles.hasNext()) {
-      File file = (File) iterateFiles.next();
-      DocumentData documentData = new DocumentData(file);
-      documentList.add(documentData);
-    }
-    tableViewer.setInput(documentList);
-    tableViewer.refresh();
-  }
-
-  public void setDocumentsByDir() {
-    File file = new File(inputDirectoryText.getText());
-    setDocumentsByDir(file);
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentTableContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentTableContentProvider.java
deleted file mode 100644
index 48138be..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentTableContentProvider.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.apache.uima.ruta.cde.utils.DocumentData;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class DocumentTableContentProvider implements IStructuredContentProvider {
-
-  public void dispose() {
-  }
-
-  public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
-  }
-
-  public Object[] getElements(Object inputElement) {
-    Object[] o = new Object[0];
-    if (inputElement instanceof ArrayList) {
-      ArrayList<DocumentData> documentList = (ArrayList<DocumentData>) inputElement;
-      return documentList.toArray();
-    }
-    /*
-     * TODO Not sure if the following code will be needed in future. Keep it for now, delete once
-     * it's clear if DocumentData will be used
-     */
-    if (inputElement instanceof File[]) {
-      return (Object[]) inputElement;
-    }
-
-    return o;
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentTableLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentTableLabelProvider.java
deleted file mode 100644
index 984732a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentTableLabelProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.ruta.cde.utils.DocumentData;
-import org.apache.uima.ruta.cde.utils.EvaluationMeasures;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class DocumentTableLabelProvider implements ITableLabelProvider {
-
-  private final Image green = ConstraintSelectComposite.createImage("/icons/bullet_green.png");
-
-  private final Image yellow = ConstraintSelectComposite.createImage("/icons/bullet_yellow.png");
-
-  private final Image red = ConstraintSelectComposite.createImage("/icons/bullet_red.png");
-
-  public void addListener(ILabelProviderListener arg0) {
-  }
-
-  public void dispose() {
-  }
-
-  public boolean isLabelProperty(Object arg0, String arg1) {
-    return false;
-  }
-
-  public void removeListener(ILabelProviderListener arg0) {
-  }
-
-  public Image getColumnImage(Object element, int columnIndex) {
-    if (element instanceof DocumentData && columnIndex == 0) {
-      DocumentData data = (DocumentData) element;
-      Image image = red;
-
-      if (data.getAugmentedResult() * 100 > RutaAddonsPlugin.getDefault().getPreferenceStore()
-              .getInt(CDEPreferenceConstants.AVERAGE_RESULT_THRESHOLD)) {
-        image = yellow;
-      }
-      if (data.getAugmentedResult() * 100 > RutaAddonsPlugin.getDefault().getPreferenceStore()
-              .getInt(CDEPreferenceConstants.GOOD_RESULT_THRESHOLD)) {
-        image = green;
-      }
-      return image;
-    }
-    return null;
-  }
-
-  public String getColumnText(Object element, int columnIndex) {
-    if (element instanceof DocumentData) {
-      DocumentData data = (DocumentData) element;
-      switch (columnIndex) {
-        case 0:
-          return null;
-        case 1:
-          return data.getDocument().getName();
-        case 2:
-          return String.valueOf(EvaluationMeasures.round(data.getAugmentedResult()));
-        case 3:
-          return String.valueOf(EvaluationMeasures.round(data.getFMeasure()));
-      }
-    }
-    return "failure";
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentView.java
deleted file mode 100644
index e463c8a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentView.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.ruta.cde.ui;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-
-public class DocumentView extends ViewPart {
-  private DocumentSelectComposite docComposite;
-
-  private IMemento memento;
-
-  public DocumentView() {
-    super();
-  }
-
-  public void createPartControl(Composite parent) {
-    this.docComposite = new DocumentSelectComposite(parent, SWT.FILL);
-    getSite().setSelectionProvider(docComposite.getViewer());
-    if (memento != null) {
-      docComposite.restoreState(memento);
-      memento = null;
-    }
-  }
-
-  public void dispose() {
-    super.dispose();
-  }
-
-  @Override
-  public void setFocus() {
-    docComposite.setFocus();
-  }
-
-  public DocumentSelectComposite getDocComposite() {
-    return docComposite;
-  }
-
-  public void saveState(IMemento memento) {
-    docComposite.saveState(memento);
-  }
-
-  public void init(IViewSite site, IMemento memento) throws PartInitException {
-    this.memento = memento;
-    super.init(site, memento);
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentViewRunHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentViewRunHandler.java
deleted file mode 100644
index 398ecec..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentViewRunHandler.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.resource.metadata.FsIndexDescription;

-import org.apache.uima.resource.metadata.TypePriorities;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.cde.IRutaConstraint;

-import org.apache.uima.ruta.cde.IRutaRuleConstraint;

-import org.apache.uima.ruta.cde.utils.ConstraintData;

-import org.apache.uima.ruta.cde.utils.DocumentData;

-import org.apache.uima.ruta.cde.utils.EvaluationMeasures;

-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;

-import org.apache.uima.ruta.testing.preferences.TestingPreferenceConstants;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.IJobChangeEvent;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.core.runtime.jobs.JobChangeAdapter;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class DocumentViewRunHandler implements IHandler {

-

-  private class DocumentViewRunJobChangeAdapter extends JobChangeAdapter {

-

-    // Composite of the ConstraintSelectView

-    private DocumentSelectComposite composite;

-

-    DocumentViewRunJobChangeAdapter(DocumentSelectComposite composite) {

-      super();

-      this.composite = composite;

-    }

-

-    @Override

-    public void done(IJobChangeEvent event) {

-      if (event.getResult().isOK()) {

-        updateUI(composite);

-      }

-    }

-

-  }

-

-  private void updateUI(final DocumentSelectComposite composite) {

-    composite.getDisplay().asyncExec(new Runnable() {

-      public void run() {

-        try {

-          composite.getViewer().refresh();

-          ArrayList<Double[]> results = new ArrayList<Double[]>();

-          if (composite.getTestDataPath() != null) {

-            for (DocumentData data : composite.getDocumentList()) {

-              double result = data.getAugmentedResult();

-              double score = data.getFMeasure();

-              results.add(new Double[] { result, score });

-            }

-          }

-          composite.updateMeasureReport("" + EvaluationMeasures.getMeasureReport(results));

-        } catch (Exception e) {

-          RutaAddonsPlugin.error(e);

-        }

-        composite.getViewer().refresh();

-        composite.update();

-      }

-    });

-  }

-

-  private class DocumentViewRunHandlerJob extends Job {

-

-    private List<ConstraintData> constraints;

-

-    private List<DocumentData> documents;

-

-    private File typeSystem;

-

-    private String testDataPath;

-

-    private final DocumentSelectComposite composite;

-

-    DocumentViewRunHandlerJob(ExecutionEvent event, List<ConstraintData> constraints,

-            ArrayList<DocumentData> documents, File typeSystem, String testDataPath,

-            DocumentSelectComposite composite) {

-      super("UIMA Ruta CDE");

-      this.constraints = constraints;

-      this.documents = documents;

-      this.typeSystem = typeSystem;

-      this.testDataPath = testDataPath;

-      this.composite = composite;

-    }

-

-    public IStatus run(IProgressMonitor monitor) {

-

-      monitor.beginTask("UIMA Ruta CDE", constraints.size() * documents.size());

-      CAS inputCAS = null;

-      CAS testCas = null;

-      try {

-        URL tpUrl = this.getClass().getResource("/org/apache/uima/ruta/engine/TypePriorities.xml");

-        TypePriorities typePriorities = UIMAFramework.getXMLParser().parseTypePriorities(

-                new XMLInputSource(tpUrl));

-        TypeSystemDescription descriptor = (TypeSystemDescription) UIMAFramework.getXMLParser()

-                .parse(new XMLInputSource(typeSystem));

-        inputCAS = CasCreationUtils

-                .createCas(descriptor, typePriorities, new FsIndexDescription[0]);

-        testCas = CasCreationUtils.createCas(descriptor, null, new FsIndexDescription[0]);

-      } catch (Exception e) {

-        RutaAddonsPlugin.error(e);

-      }

-      for (DocumentData document : documents) {

-        if (monitor.isCanceled()) {

-          return Status.CANCEL_STATUS;

-        }

-        double count = 0;

-        double augResult = 0;

-        document.setResults(new ArrayList<String[]>());

-        if (constraints.size() > 0) {

-          monitor.setTaskName("UIMA Ruta CDE: " + document.getDocument().getName());

-          try {

-            inputCAS.reset();

-            XmiCasDeserializer.deserialize(new FileInputStream(document.getDocument()), inputCAS,

-                    true);

-            for (ConstraintData constraintData : constraints) {

-              if (monitor.isCanceled()) {

-                return Status.CANCEL_STATUS;

-              }

-              String[] partialResult = new String[2];

-              IRutaConstraint constraint = constraintData.getConstraint();

-              if (constraint instanceof IRutaRuleConstraint) {

-                ((IRutaRuleConstraint) constraint).setTypeSystemLocation(typeSystem

-                        .getAbsolutePath());

-              }

-              // Calculating and adding results to the

-              // documentData object

-              Double partResult = constraint.processConstraint(inputCAS);

-              if (partResult != null) {

-                partialResult[0] = constraint.getDescription();

-                partialResult[1] = String.valueOf(partResult);

-                int weight = constraintData.getWeight();

-                count += weight;

-                double weightedResult = partResult * weight;

-                augResult += weightedResult;

-                // inputCAS.release();

-                document.getResults().add(partialResult);

-              }

-

-              monitor.worked(1);

-            }

-

-            if (testDataPath != null) {

-              // Hashmap to save all the FileNames without

-              // fileExtension and FullPath, both as

-              // strings

-              HashMap<String, String> testFilesMap = createFileMap(testDataPath);

-              String documentFileName = getFileNameWithoutExtensions(document.getDocument()

-                      .getAbsolutePath());

-              if (testFilesMap.get(documentFileName) != null) {

-                File testFile = new File(testFilesMap.get(documentFileName));

-                testCas.reset();

-                XmiCasDeserializer.deserialize(new FileInputStream(testFile), testCas, true);

-                IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();

-                String factoryName = store.getString(TestingPreferenceConstants.EVALUATOR_FACTORY);

-                boolean includeSubtypes = store.getBoolean(TestingPreferenceConstants.INCLUDE_SUBTYPES);

-                boolean useAllTypes = store.getBoolean(TestingPreferenceConstants.ALL_TYPES);

-                

-                ICasEvaluator evaluator = RutaAddonsPlugin.getCasEvaluatorFactoryById(factoryName)

-                        .createEvaluator();

-                ArrayList<String> excludedTypes = new ArrayList<String>();

-                CAS resultCas = evaluator.evaluate(testCas, inputCAS, excludedTypes, includeSubtypes, useAllTypes);

-                document.setFMeasure(calculateF1(resultCas));

-              }

-            }

-          } catch (Exception e) {

-            RutaAddonsPlugin.error(e);

-          }

-        }

-        if (count != 0) {

-          augResult = augResult / count;

-        }

-        document.setAugmentedResult(augResult);

-        updateUI(composite);

-      }

-      inputCAS.release();

-      testCas.release();

-      monitor.done();

-      return Status.OK_STATUS;

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    ConstraintSelectView constraintView;

-    try {

-      constraintView = (ConstraintSelectView) HandlerUtil.getActiveWorkbenchWindow(event)

-              .getWorkbench().getActiveWorkbenchWindow().getActivePage()

-              .showView("org.apache.uima.ruta.cde.ui.ConstraintSelectView");

-      ConstraintSelectComposite composite = (ConstraintSelectComposite) constraintView

-              .getComposite();

-      List<ConstraintData> constraintList = composite.getConstraintList();

-      DocumentView docView = (DocumentView) HandlerUtil.getActiveWorkbenchWindow(event)

-              .getWorkbench().getActiveWorkbenchWindow().getActivePage()

-              .showView("org.apache.uima.ruta.cde.ui.DocumentView");

-      DocumentSelectComposite docComposite = docView.getDocComposite();

-      ArrayList<DocumentData> documents = docComposite.getDocumentList();

-      if (documents.isEmpty()) {

-        docComposite.setDocumentsByDir();

-      }

-      File typeSystem = docComposite.getTypeSystem();

-      DocumentViewRunHandlerJob job = new DocumentViewRunHandlerJob(event, constraintList,

-              documents, typeSystem, docComposite.getTestDataPath(), docComposite);

-      job.addJobChangeListener(new DocumentViewRunJobChangeAdapter(docComposite));

-      job.schedule();

-    } catch (PartInitException e) {

-      RutaAddonsPlugin.error(e);

-    }

-

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  private double calculateF1(CAS resultCas) {

-    TypeSystem ts = resultCas.getTypeSystem();

-

-    Type falsePositiveType = ts.getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = ts.getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositiveType = ts.getType(ICasEvaluator.TRUE_POSITIVE);

-

-    int falsePositiveCount = resultCas.getAnnotationIndex(falsePositiveType).size();

-    int falseNegativeCount = resultCas.getAnnotationIndex(falseNegativeType).size();

-    int truePositiveCount = resultCas.getAnnotationIndex(truePositiveType).size();

-

-    double a = falsePositiveCount;

-    double b = falseNegativeCount;

-    double c = truePositiveCount;

-

-    double precision = c / (c + a);

-    double recall = c / (c + b);

-    double fMeasure = 2 * (precision * recall) / (precision + recall);

-

-    fMeasure = fMeasure * 10000;

-    fMeasure = Math.round(fMeasure);

-    fMeasure = fMeasure / 10000;

-

-    return fMeasure;

-  }

-

-  public HashMap<String, String> createFileMap(String directoryFolderPath) {

-    HashMap<String, String> filesMap = new HashMap<String, String>();

-    File folder = new File(directoryFolderPath);

-    if (folder.isDirectory()) {

-      String[] files = folder.list(null);

-      for (String fileName : files) {

-        String fullPath = folder + System.getProperty("file.separator") + fileName;

-        String fileNameWithoutExtension = getFileNameWithoutExtensions(fullPath);

-        if (!StringUtils.isBlank(fileNameWithoutExtension)) {

-          filesMap.put(fileNameWithoutExtension, fullPath);

-        }

-      }

-    }

-    return filesMap;

-  }

-

-  public String getFileNameWithoutExtensions(String path) {

-    File f = new File(path);

-    String fileNameNoExtension = "";

-    // Check if the file for the given Path exists on the systems filesystem

-    // and

-    // if it is a file

-    if (f.exists() && f.isFile()) {

-      // get the filename between the last separator and the file

-      // extension

-      if (path.contains(".")) {

-        int beginOfFileName = path.lastIndexOf(System.getProperty("file.separator")) + 1;

-        int endOfFileName = path.indexOf(".");

-

-        fileNameNoExtension = path.substring(beginOfFileName, endOfFileName);

-      }

-      // if there is no file extension

-      else {

-        int beginOfFileName = path.lastIndexOf(System.getProperty("file.separator"));

-        fileNameNoExtension = path.substring(beginOfFileName);

-      }

-    }

-    return fileNameNoExtension;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ExportConstraintsHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ExportConstraintsHandler.java
deleted file mode 100644
index d03e96c..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ExportConstraintsHandler.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import java.util.List;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.cde.utils.ConstraintData;

-import org.apache.uima.ruta.cde.utils.ConstraintXMLUtils;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.FileDialog;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class ExportConstraintsHandler implements IHandler {

-

-  private class ExportAllConstraintsJob extends Job {

-

-    private String outputLocation;

-

-    private List<ConstraintData> constraints;

-

-    ExportAllConstraintsJob(String outputLocation, List<ConstraintData> constraints) {

-      super("Exporting constraints");

-      this.outputLocation = outputLocation;

-      this.constraints = constraints;

-    }

-

-    public IStatus run(IProgressMonitor monitor) {

-      try {

-        ConstraintXMLUtils.writeConstraints(outputLocation, constraints);

-        IPath path = Path.fromPortableString(outputLocation);

-        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();

-        IFile ifile = root.getFileForLocation(path);

-        if (ifile != null) {

-          ifile.getParent().refreshLocal(IResource.DEPTH_INFINITE, monitor);

-        }

-      } catch (Exception e) {

-        RutaAddonsPlugin.error(e);

-      }

-      return Status.OK_STATUS;

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener arg0) {

-  }

-

-  public void dispose() {

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-

-    FileDialog dlg = new FileDialog(HandlerUtil.getActiveShell(event), SWT.SAVE);

-    String[] extensions = new String[] { "*.xml" };

-    dlg.setFilterExtensions(extensions);

-    String s = dlg.open();

-    if (s == null) {

-      return Status.CANCEL_STATUS;

-    }

-    ConstraintSelectView constraintView;

-

-    try {

-      constraintView = (ConstraintSelectView) HandlerUtil.getActiveWorkbenchWindow(event)

-              .getWorkbench().getActiveWorkbenchWindow().getActivePage()

-              .showView("org.apache.uima.ruta.cde.ui.ConstraintSelectView");

-      ConstraintSelectComposite composite = (ConstraintSelectComposite) constraintView

-              .getComposite();

-      List<ConstraintData> constraintList = composite.getConstraintList();

-      ExportAllConstraintsJob job = new ExportAllConstraintsJob(s, constraintList);

-      job.schedule();

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-    }

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ImportConstraintsHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ImportConstraintsHandler.java
deleted file mode 100644
index 8187465..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ImportConstraintsHandler.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import java.util.List;

-

-import org.apache.uima.ruta.cde.utils.ConstraintData;

-import org.apache.uima.ruta.cde.utils.ConstraintXMLUtils;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.FileDialog;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class ImportConstraintsHandler implements IHandler {

-

-  private class ImportJob extends Job {

-

-    String inputLocation;

-

-    ConstraintSelectComposite composite;

-

-    public ImportJob(ExecutionEvent event, ConstraintSelectComposite composite, String inputLocation) {

-      super("Importing constraints");

-      this.inputLocation = inputLocation;

-      this.composite = composite;

-    }

-

-    protected IStatus run(IProgressMonitor monitor) {

-      try {

-        final List<ConstraintData> constraints = ConstraintXMLUtils.readConstraints(inputLocation);

-        composite.getDisplay().asyncExec(new Runnable() {

-          public void run() {

-            composite.getConstraintList().addAll(constraints);

-            composite.getViewer().setInput(composite.getConstraintList());

-            composite.getViewer().refresh();

-            composite.update();

-          }

-        });

-

-      } catch (Exception e) {

-        e.printStackTrace();

-      }

-      return Status.OK_STATUS;

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener arg0) {

-  }

-

-  public void dispose() {

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    ConstraintSelectView constraintView;

-    try {

-      constraintView = (ConstraintSelectView) HandlerUtil.getActiveWorkbenchWindow(event)

-              .getWorkbench().getActiveWorkbenchWindow().getActivePage()

-              .showView("org.apache.uima.ruta.cde.ui.ConstraintSelectView");

-      ConstraintSelectComposite composite = (ConstraintSelectComposite) constraintView

-              .getComposite();

-      FileDialog dlg = new FileDialog(HandlerUtil.getActiveShell(event), SWT.OPEN);

-      String[] extensions = { "*.xml" };

-      dlg.setFilterExtensions(extensions);

-      String s = dlg.open();

-      if (s != null) {

-        ImportJob job = new ImportJob(event, composite, s);

-        job.schedule();

-      } else {

-        return Status.CANCEL_STATUS;

-      }

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-    return Status.OK_STATUS;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultView.java
deleted file mode 100644
index 0fd44e6..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultView.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.part.ViewPart;

-

-public class ResultView extends ViewPart {

-

-  private ResultViewComposite resultViewComposite;

-

-  @Override

-  public void createPartControl(Composite parent) {

-    this.resultViewComposite = new ResultViewComposite(parent, SWT.FILL);

-    getSite().getPage().addSelectionListener((ISelectionListener) resultViewComposite);

-  }

-

-  public ResultViewComposite getResultComposite() {

-    return this.resultViewComposite;

-  }

-

-  @Override

-  public void setFocus() {

-    this.resultViewComposite.setFocus();

-

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewComposite.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewComposite.java
deleted file mode 100644
index 69798e3..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewComposite.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.Comparator;

-import java.util.Iterator;

-

-import org.apache.uima.ruta.cde.utils.CDEComparatorFactory;

-import org.apache.uima.ruta.cde.utils.DocumentData;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.TableViewer;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.dnd.Clipboard;

-import org.eclipse.swt.dnd.TextTransfer;

-import org.eclipse.swt.dnd.Transfer;

-import org.eclipse.swt.events.KeyEvent;

-import org.eclipse.swt.events.KeyListener;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.layout.FormAttachment;

-import org.eclipse.swt.layout.FormData;

-import org.eclipse.swt.layout.FormLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Table;

-import org.eclipse.swt.widgets.TableColumn;

-import org.eclipse.swt.widgets.TableItem;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-

-public class ResultViewComposite extends Composite implements ISelectionListener {

-

-  private Clipboard clipboard;

-

-  private TableViewer tableViewer;

-

-  private Table table;

-

-  private TableColumn tc1;

-

-  private TableColumn tc2;

-

-  private CDEComparatorFactory comparatorFactory;

-

-  public ResultViewComposite(Composite parent, int style) {

-    super(parent, style);

-    initGui();

-    comparatorFactory = new CDEComparatorFactory();

-    clipboard = new Clipboard(parent.getDisplay());

-  }

-

-  public void initGui() {

-    this.setLayout(new FormLayout());

-    tableViewer = new TableViewer(this, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL

-            | SWT.FULL_SELECTION);

-    tableViewer.setContentProvider(new ResultViewContentProvder());

-    tableViewer.setLabelProvider(new ResultViewLabelProvider());

-    table = tableViewer.getTable();

-

-    FormData tableFormData = new FormData();

-    tableFormData.top = new FormAttachment(0, 5);

-    tableFormData.left = new FormAttachment(0, 5);

-    tableFormData.bottom = new FormAttachment(100, -5);

-    tableFormData.right = new FormAttachment(100, -5);

-    table.setLayoutData(tableFormData);

-

-    table.addKeyListener(new KeyListener() {

-      public void keyPressed(KeyEvent e) {

-        if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {

-          String output = "";

-          TableItem[] items = table.getSelection();

-          for (TableItem item : items) {

-            String[] data = (String[]) item.getData();

-            output = output + data[0] + ", " + data[1] + ", \n";

-          }

-          clipboard.setContents(new Object[] { output },

-                  new Transfer[] { TextTransfer.getInstance() });

-        }

-      }

-

-      public void keyReleased(KeyEvent arg0) {

-        // TODO Auto-generated method stub

-      }

-    });

-

-    tc1 = new TableColumn(table, SWT.LEFT);

-    tc1.setText("Constraint ");

-    tc1.setWidth(160);

-    tc1.addSelectionListener(new SelectionAdapter() {

-      public void widgetSelected(SelectionEvent event) {

-        ArrayList<String[]> data = (ArrayList<String[]>) tableViewer.getInput();

-        Comparator comparator = comparatorFactory.getComparator(tc1);

-        Collections.sort(data, comparator);

-        tableViewer.refresh();

-      }

-    });

-

-    tc2 = new TableColumn(table, SWT.LEFT);

-    tc2.setText("Result");

-    tc2.setWidth(120);

-    tc2.addSelectionListener(new SelectionAdapter() {

-      public void widgetSelected(SelectionEvent event) {

-        ArrayList<String[]> data = (ArrayList<String[]>) tableViewer.getInput();

-        Comparator comparator = comparatorFactory.getComparator(tc2);

-        Collections.sort(data, comparator);

-        tableViewer.refresh();

-      }

-    });

-

-    tableViewer.refresh();

-    table.setHeaderVisible(true);

-    table.setLinesVisible(true);

-

-  }

-

-  public void updateInput(Object input) {

-    tableViewer.setInput(input);

-    tableViewer.refresh();

-  }

-

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof IStructuredSelection) {

-      IStructuredSelection strucSel = (IStructuredSelection) selection;

-      Iterator<?> iter = strucSel.iterator();

-      if (iter.hasNext()) {

-        Object o = iter.next();

-        if (o instanceof DocumentData) {

-          DocumentData data = (DocumentData) o;

-          ArrayList<String[]> results = data.getResults();

-          tableViewer.setInput(results);

-          tableViewer.refresh();

-        }

-      }

-    }

-  }

-

-  public TableViewer getViewer() {

-    return tableViewer;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewContentProvder.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewContentProvder.java
deleted file mode 100644
index 3f1bf9c..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewContentProvder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import java.util.ArrayList;

-

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-public class ResultViewContentProvder implements IStructuredContentProvider {

-

-  public void dispose() {

-  }

-

-  public void inputChanged(Viewer arg0, Object arg1, Object arg2) {

-  }

-

-  public Object[] getElements(Object input) {

-    if (input instanceof ArrayList) {

-      return ((ArrayList<?>) input).toArray();

-    }

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewLabelProvider.java
deleted file mode 100644
index a562212..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultViewLabelProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * 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.ruta.cde.ui;

-

-import org.eclipse.jface.viewers.ILabelProviderListener;

-import org.eclipse.jface.viewers.ITableLabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-public class ResultViewLabelProvider implements ITableLabelProvider {

-

-  public void addListener(ILabelProviderListener arg0) {

-  }

-

-  public void dispose() {

-  }

-

-  public boolean isLabelProperty(Object arg0, String arg1) {

-    return false;

-  }

-

-  public void removeListener(ILabelProviderListener arg0) {

-

-  }

-

-  public Image getColumnImage(Object arg0, int arg1) {

-    return null;

-  }

-

-  public String getColumnText(Object input, int column) {

-    if (input instanceof String[]) {

-      String[] results = (String[]) input;

-      switch (column) {

-        case 0:

-          return results[0];

-        case 1:

-          return results[1];

-      }

-    }

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/CDEComparatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/CDEComparatorFactory.java
deleted file mode 100644
index 2863a75..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/CDEComparatorFactory.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*

- * 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.ruta.cde.utils;

-

-import java.text.Collator;

-import java.util.Comparator;

-import java.util.Locale;

-

-import org.eclipse.swt.widgets.TableColumn;

-

-public class CDEComparatorFactory {

-

-  private int updown;

-

-  public CDEComparatorFactory() {

-    updown = 1;

-  }

-

-  private Comparator<DocumentData> stringDocumentComparator = new Comparator<DocumentData>() {

-

-    public int compare(DocumentData object1, DocumentData object2) {

-      Collator collator = Collator.getInstance();

-

-      String docName1 = object1.getDocument().getName();

-      String docName2 = object2.getDocument().getName();

-

-      int result = collator.compare(docName1, docName2) * updown;

-      return result;

-    }

-  };

-

-  private Comparator<DocumentData> resultComparator = new Comparator<DocumentData>() {

-

-    public int compare(DocumentData object1, DocumentData object2) {

-

-      double augment1 = object1.getAugmentedResult();

-      double augment2 = object2.getAugmentedResult();

-

-      if (augment1 <= augment2) {

-        return 1 * updown;

-      } else {

-        return -1 * updown;

-      }

-

-    }

-  };

-

-  private Comparator<DocumentData> f1ScoreComparator = new Comparator<DocumentData>() {

-

-    public int compare(DocumentData object1, DocumentData object2) {

-

-      double augment1 = object1.getFMeasure();

-      double augment2 = object2.getFMeasure();

-

-      if (augment1 <= augment2) {

-        return 1 * updown;

-      } else {

-        return -1 * updown;

-      }

-

-    }

-  };

-

-  private Comparator<ConstraintData> stringConstraintComparator = new Comparator<ConstraintData>() {

-

-    public int compare(ConstraintData object1, ConstraintData object2) {

-      Collator collator = Collator.getInstance();

-

-      String constraintName1 = object1.getDescription();

-      String constraintName2 = object2.getDescription();

-

-      int result = collator.compare(constraintName1, constraintName2) * updown;

-      return result;

-    }

-

-  };

-

-  private Comparator<ConstraintData> intConstraintComparator = new Comparator<ConstraintData>() {

-

-    public int compare(ConstraintData object1, ConstraintData object2) {

-      ;

-

-      int weight1 = object1.getWeight();

-      int weight2 = object2.getWeight();

-

-      return (weight1 - weight2) * updown;

-    }

-

-  };

-

-  private Comparator<String[]> resultNameComparator = new Comparator<String[]>() {

-    public int compare(String[] object1, String[] object2) {

-

-      Collator collator = Collator.getInstance(Locale.getDefault());

-      int result = collator.compare(object1[0], object2[0]) * updown;

-      return result;

-    }

-  };

-

-  private Comparator<String[]> resultValueComparator = new Comparator<String[]>() {

-    public int compare(String[] object1, String[] object2) {

-      double result1 = Double.valueOf(object1[1]);

-      double result2 = Double.valueOf(object2[1]);

-      if (result1 >= result2)

-        return 1 * updown;

-      else {

-        return -1 * updown;

-      }

-    }

-  };

-

-  public Comparator getComparator(TableColumn tc) {

-    this.updown = updown * (-1);

-    String columnName = tc.getText();

-

-    if (columnName.equals("CDE")) {

-      return resultComparator;

-    }

-    if (columnName.equals("F1")) {

-      return f1ScoreComparator;

-    } else if (columnName.equals("Document")) {

-      return stringDocumentComparator;

-    } else if (columnName.equals("Constraint")) {

-      return stringConstraintComparator;

-    } else if (columnName.equals("Weight")) {

-      return intConstraintComparator;

-    } else if (columnName.equals("Constraint ")) {

-      return resultNameComparator;

-    } else if (columnName.equals("Result")) {

-      return resultValueComparator;

-    }

-    return Collator.getInstance();

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintContentHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintContentHandler.java
deleted file mode 100644
index 757c5ae..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintContentHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.cde.utils;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.cde.IRutaConstraint;

-import org.apache.uima.ruta.cde.RutaConstraintFactory;

-import org.xml.sax.Attributes;

-import org.xml.sax.helpers.DefaultHandler;

-

-public class ConstraintContentHandler extends DefaultHandler {

-

-  private List<ConstraintData> constraints = new ArrayList<ConstraintData>();

-

-  private ConstraintData current = null;

-

-  private String currentString;

-

-  public void startElement(String uri, String localName, String qName, Attributes attributes) {

-    if (localName.equals("constraint")) {

-      String type = attributes.getValue("type");

-      String weight = attributes.getValue("weight");

-      IRutaConstraint c = RutaConstraintFactory.createConstraint(type);

-      current = new ConstraintData(c);

-      current.setWeight(Integer.valueOf(weight));

-    } 

-  }

-

-  public void characters(char[] ch, int start, int length) {

-    currentString = new String(ch, start, length);

-  }

-

-  public void endElement(String uri, String localName, String qName) {

-    if (localName.equals("constraint")) {

-      constraints.add(current);

-    } else if (localName.equals("data")) {

-      current.getConstraint().setData(currentString);

-    } else if (localName.equals("description")) {

-      current.getConstraint().setDescription(currentString);

-    }

-  }

-

-  public List<ConstraintData> getConstraints() {

-    return constraints;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintData.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintData.java
deleted file mode 100644
index c17a62f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintData.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.ruta.cde.utils;
-
-import org.apache.uima.ruta.cde.IRutaConstraint;
-
-public class ConstraintData {
-
-  private IRutaConstraint constraint;
-
-  private int weight;
-
-  public ConstraintData(IRutaConstraint constraint) {
-    this.constraint = constraint;
-    weight = 1;
-  }
-
-  public int getWeight() {
-    return weight;
-  }
-
-  public void setWeight(int weight) {
-    this.weight = weight;
-  }
-
-  public IRutaConstraint getConstraint() {
-    return constraint;
-  }
-
-  public void setConstraint(IRutaConstraint constraint) {
-    this.constraint = constraint;
-  }
-
-  public String getDescription() {
-    return constraint.getDescription();
-  }
-
-  public String toXML() {
-    StringBuilder sb = new StringBuilder();
-    sb.append("<constraint type=\"" + constraint.getClass().getSimpleName() + "\" weight=\""+weight+"\">");
-    sb.append("\n");
-    sb.append("<data>");
-    sb.append("<![CDATA[");
-    sb.append(constraint.getData());
-    sb.append("]]>");
-    sb.append("</data>");
-    sb.append("\n");
-    sb.append("<description>");
-    sb.append("<![CDATA[");
-    sb.append(getDescription());
-    sb.append("]]>");
-    sb.append("</description>");
-    sb.append("\n");
-    sb.append("</constraint>");
-    return sb.toString();
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintXMLUtils.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintXMLUtils.java
deleted file mode 100644
index 95156b4..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/ConstraintXMLUtils.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta.cde.utils;

-

-import java.io.File;

-import java.io.FileReader;

-import java.util.List;

-

-import org.apache.commons.io.FileUtils;

-import org.xml.sax.InputSource;

-import org.xml.sax.XMLReader;

-import org.xml.sax.helpers.XMLReaderFactory;

-

-public class ConstraintXMLUtils {

-

-  public static void writeConstraints(String location, List<ConstraintData> constraints)

-          throws Exception {

-    StringBuilder sb = new StringBuilder();

-    sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

-    sb.append("\n");

-    sb.append("<constraints>");

-    sb.append("\n");

-    for (ConstraintData eachConstraint : constraints) {

-      sb.append(eachConstraint.toXML());

-      sb.append("\n");

-    }

-    sb.append("</constraints>");

-    FileUtils.writeStringToFile(new File(location), sb.toString(), "UTF-8");

-  }

-

-  public static List<ConstraintData> readConstraints(String location) throws Exception {

-    XMLReader xmlReader = XMLReaderFactory.createXMLReader();

-    FileReader reader = new FileReader(location);

-    InputSource inputSource = new InputSource(reader);

-    ConstraintContentHandler handler = new ConstraintContentHandler();

-    xmlReader.setContentHandler(handler);

-    xmlReader.parse(inputSource);

-    return handler.getConstraints();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/DocumentData.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/DocumentData.java
deleted file mode 100644
index 29ac686..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/DocumentData.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.ruta.cde.utils;
-
-import java.io.File;
-import java.util.ArrayList;
-
-public class DocumentData {
-
-	private File document;
-	
-	private double augmentedResult;
-	
-	private double fMeasure;
-	
-	private ArrayList<String[]> results;
-	
-	public DocumentData(File document) {
-	  this.document = document;
-	  this.augmentedResult = 0;
-	  this.fMeasure = 0;
-	  this.results = new ArrayList<String[]>();
-	}
-	
-	public void setDocument(File document) {
-		this.document = document;
-	}
-	
-	public void setAugmentedResult (double result) {
-		this.augmentedResult = result;
-	}
-	
-	public File getDocument() {
-		return this.document;
-	}
-	
-	public double getAugmentedResult () {
-		return this.augmentedResult;
-	}
-
-  public ArrayList<String[]> getResults() {
-    return results;
-  }
-
-  public void setResults(ArrayList<String[]> results) {
-    this.results = results;
-  }
-  
-  public void setFMeasure(double fMeasure) {
-    this.fMeasure = fMeasure;
-  }
-  
-  public double getFMeasure() {
-    return this.fMeasure;
-  }
-  
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/EvaluationMeasures.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/EvaluationMeasures.java
deleted file mode 100644
index fee519d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/utils/EvaluationMeasures.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*

- * 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.ruta.cde.utils;

-

-import java.text.DecimalFormat;

-import java.util.ArrayList;

-import java.util.Locale;

-

-import org.apache.commons.math3.linear.ArrayRealVector;

-import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;

-import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;

-

-public class EvaluationMeasures {

-

-  public static String getMeasureReport(ArrayList<Double[]> results) {

-    double[] x = new double[results.size()];

-    double[] y = new double[results.size()];

-    int index = 0;

-    for (Double[] resultPair : results) {

-      x[index] = resultPair[0];

-      y[index] = resultPair[1];

-      index++;

-    }

-    double mse = meanSquareError(x, y);

-    double spearmans = new SpearmansCorrelation().correlation(x, y);

-    double pearsons = new PearsonsCorrelation().correlation(x, y);

-    double cosine = cosine(x, y);

-    mse = round(mse);

-    spearmans = round(spearmans);

-    pearsons = round(pearsons);

-    cosine = round(cosine);

-

-    String report = "mse=" + mse + "  spearmans=" + spearmans + "  pearsons=" + pearsons + "  cosine="

-            + cosine;

-    return report;

-  }

-

-  public static double round(double d) {

-    DecimalFormat instance = (DecimalFormat) DecimalFormat.getInstance(Locale.US);

-    instance.applyPattern("#.####");

-    String format = instance.format(d);

-    try {

-      return Double.valueOf(format);

-    } catch (Exception e) {

-    }

-    return d;

-  }

-

-  public static double cosine(double[] a1, double[] a2) {

-    ArrayRealVector v1 = new ArrayRealVector(a1);

-    ArrayRealVector v2 = new ArrayRealVector(a2);

-    return v1.dotProduct(v2) / (v1.getNorm() * v2.getNorm());

-  }

-

-  public static double cosine(ArrayList<Double[]> results) {

-    double[] x = new double[results.size()];

-    double[] y = new double[results.size()];

-    int index = 0;

-    for (Double[] resultPair : results) {

-      x[index] = resultPair[0];

-      y[index] = resultPair[1];

-      index++;

-    }

-    return cosine(x, y);

-  }

-

-  public static double meanSquareError(double[] x, double[] y) {

-    double sum = 0;

-    for (int i = 0; i < x.length; i++) {

-      double xi = x[i];

-      double yi = y[i];

-      double diff = xi - yi;

-      sum += (diff * diff);

-    }

-    return sum / x.length;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AcceptHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AcceptHandler.java
deleted file mode 100644
index 9cc99f4..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AcceptHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.check;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class AcceptHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    AnnotationCheckView acView;

-    try {

-      acView = (AnnotationCheckView) HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench()

-              .getActiveWorkbenchWindow().getActivePage().showView(AnnotationCheckView.ID);

-      AnnotationCheckComposite composite = (AnnotationCheckComposite) acView.getComposite();

-      composite.accept();

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-      return Status.CANCEL_STATUS;

-    }

-    return Status.OK_STATUS;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckComposite.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckComposite.java
deleted file mode 100644
index 20f83e9..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckComposite.java
+++ /dev/null
@@ -1,820 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileNotFoundException;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.metadata.FsIndexDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.jface.dialogs.IInputValidator;

-import org.eclipse.jface.dialogs.InputDialog;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.ISelectionChangedListener;

-import org.eclipse.jface.viewers.SelectionChangedEvent;

-import org.eclipse.jface.viewers.TreePath;

-import org.eclipse.jface.viewers.TreeSelection;

-import org.eclipse.jface.viewers.TreeViewer;

-import org.eclipse.jface.window.Window;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.dnd.DND;

-import org.eclipse.swt.dnd.DropTarget;

-import org.eclipse.swt.dnd.DropTargetAdapter;

-import org.eclipse.swt.dnd.DropTargetEvent;

-import org.eclipse.swt.dnd.FileTransfer;

-import org.eclipse.swt.dnd.Transfer;

-import org.eclipse.swt.events.KeyAdapter;

-import org.eclipse.swt.events.KeyEvent;

-import org.eclipse.swt.events.MouseAdapter;

-import org.eclipse.swt.events.MouseEvent;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.layout.FillLayout;

-import org.eclipse.swt.layout.FormAttachment;

-import org.eclipse.swt.layout.FormData;

-import org.eclipse.swt.layout.FormLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.swt.widgets.Tree;

-import org.eclipse.ui.IMemento;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.part.FileEditorInput;

-import org.eclipse.ui.part.ViewPart;

-import org.xml.sax.SAXException;

-

-public class AnnotationCheckComposite extends Composite implements ISelectionChangedListener,

-        ISelectionListener {

-

-  private CheckAnnotationDocumentListener annotationListener;

-

-  private AnnotationCheckTreeNodeComparator comparator = new AnnotationCheckTreeNodeComparator();

-

-  private AnnotationCheckLabelProvider lableProvider;

-

-  private TreeViewer treeView;

-

-  private Text documentSource;

-

-  private ViewPart viewPart;

-

-  private Text pathToTypeSystem;

-

-  private HashMap<String, Image> images;

-

-  private Text documentSink;

-

-  private Map<String, Set<String>> typesToCheck;

-

-  private Set<String> typesToTransferUnchecked;

-

-  private CheckDocument currentDocument = null;

-

-  private String annotationMode;

-

-  private AnnotationEditor casEditor;

-

-  private List<CheckDocument> oldDocs;

-

-  private TypeSystemDescription tsd;

-

-  public AnnotationCheckComposite(Composite parent, int style, ViewPart viewPart) {

-    super(parent, style);

-    this.viewPart = viewPart;

-    typesToCheck = new HashMap<String, Set<String>>();

-    typesToTransferUnchecked = new HashSet<String>();

-    initGui();

-    annotationListener = new CheckAnnotationDocumentListener(this);

-  }

-

-  private void initGui() {

-    this.setLayout(new FormLayout());

-    this.setSize(400, 800);

-    initDocumentSourceTextField();

-    initDocumentSinkTextField();

-    initTypeSystemPathTextField();

-    initTreeViewer();

-    viewPart.getSite().getPage().addSelectionListener(this);

-    viewPart.getSite().setSelectionProvider(treeView);

-  }

-

-  private void initTreeViewer() {

-    FormData fdata3 = new FormData();

-    fdata3.left = new FormAttachment(0, 1000, 3);

-    fdata3.top = new FormAttachment(0, 1000, 81);

-    fdata3.right = new FormAttachment(1000, 1000, -3);

-    fdata3.bottom = new FormAttachment(1000, 1000, -3);

-    Composite comp = new Composite(this, SWT.CENTER);

-    comp.setLayoutData(fdata3);

-    comp.setLayout(new FillLayout());

-    treeView = new TreeViewer(comp, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

-    AnnotationCheckContentProvider provider = new AnnotationCheckContentProvider();

-    treeView.setContentProvider(provider);

-    treeView.getControl().addKeyListener(new KeyAdapter() {

-      @Override

-      public void keyPressed(KeyEvent e) {

-        char c = e.character;

-        if (c == '4' || c == '5') {

-          if (c == '4') {

-            accept();

-          } else if (c == '5') {

-            reject(true);

-          }

-        }

-      }

-    });

-    treeView.setComparator(new FeatureCheckTreeNodeComparator());

-    treeView.getTree().addMouseListener(new MouseAdapter() {

-      @Override

-      public void mouseDown(MouseEvent e) {

-        Object source = e.getSource();

-        if (source instanceof Tree && e.button == 3) {

-          Tree tree = (Tree) source;

-          Composite composite = tree.getParent().getParent();

-          TreeSelection teeSelection = (TreeSelection) treeView.getSelection();

-          Object node = teeSelection.getFirstElement();

-          Display display = Display.getDefault();

-          Shell shell = new Shell(display, SWT.RESIZE | SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);

-          if (node instanceof AnnotationCheckTreeNode && !(node instanceof FeatureCheckTreeNode)) {

-            changeType(shell, composite, node);

-          }

-          if (node instanceof AnnotationCheckTreeNode && node instanceof FeatureCheckTreeNode) {

-            changeFeature(shell, node);

-          }

-        }

-      }

-    });

-    lableProvider = new AnnotationCheckLabelProvider(this);

-    treeView.setLabelProvider(lableProvider);

-  }

-

-  private void initTypeSystemPathTextField() {

-    pathToTypeSystem = new Text(this, SWT.SINGLE | SWT.BORDER);

-    FormData fdata2 = new FormData();

-    fdata2.width = 200;

-    fdata2.left = new FormAttachment(0, 1000, 5);

-    fdata2.top = new FormAttachment(0, 1000, 55);

-    fdata2.right = new FormAttachment(1000, 1000, -5);

-    pathToTypeSystem.setLayoutData(fdata2);

-    pathToTypeSystem.setToolTipText("Type System...");

-    pathToTypeSystem.setMessage("Type System...");

-    DropTarget dt1 = new DropTarget(pathToTypeSystem, DND.DROP_DEFAULT | DND.DROP_MOVE);

-    dt1.setTransfer(new Transfer[] { FileTransfer.getInstance() });

-    dt1.addDropListener(new DropTargetAdapter() {

-      @Override

-      public void drop(DropTargetEvent event) {

-        String fileList[] = null;

-        FileTransfer ft = FileTransfer.getInstance();

-        if (ft.isSupportedType(event.currentDataType)) {

-          fileList = (String[]) event.data;

-        }

-        if (fileList != null && fileList.length > 0) {

-          String fileString = fileList[0];

-          pathToTypeSystem.setText(fileString);

-        }

-      }

-    });

-  }

-

-  private void initDocumentSinkTextField() {

-    documentSink = new Text(this, SWT.SINGLE | SWT.BORDER);

-    FormData fdatag = new FormData();

-    fdatag.width = 200;

-    fdatag.left = new FormAttachment(0, 1000, 5);

-    fdatag.top = new FormAttachment(0, 1000, 30);

-    fdatag.right = new FormAttachment(1000, 1000, -5);

-    documentSink.setLayoutData(fdatag);

-    documentSink.setToolTipText("Document gold output folder...");

-    documentSink.setMessage("Document gold output folder...");

-    DropTarget dtg = new DropTarget(documentSink, DND.DROP_DEFAULT | DND.DROP_MOVE);

-    dtg.setTransfer(new Transfer[] { FileTransfer.getInstance() });

-    dtg.addDropListener(new DropTargetAdapter() {

-      @Override

-      public void drop(DropTargetEvent event) {

-        String fileList[] = null;

-        FileTransfer ft = FileTransfer.getInstance();

-        if (ft.isSupportedType(event.currentDataType)) {

-          fileList = (String[]) event.data;

-        }

-        if (fileList != null && fileList.length > 0) {

-          String fileString = fileList[0];

-          documentSink.setText(fileString);

-        }

-      }

-    });

-  }

-

-  private void initDocumentSourceTextField() {

-    documentSource = new Text(this, SWT.SINGLE | SWT.BORDER);

-    FormData fdata1 = new FormData();

-    fdata1.width = 200;

-    fdata1.left = new FormAttachment(0, 1000, 5);

-    fdata1.top = new FormAttachment(0, 1000, 5);

-    fdata1.right = new FormAttachment(1000, 1000, -5);

-    documentSource.setLayoutData(fdata1);

-    documentSource.setToolTipText("Document source folder...");

-    documentSource.setMessage("Document source folder...");

-    DropTarget dt = new DropTarget(documentSource, DND.DROP_DEFAULT | DND.DROP_MOVE);

-    dt.setTransfer(new Transfer[] { FileTransfer.getInstance() });

-    dt.addDropListener(new DropTargetAdapter() {

-      @Override

-      public void drop(DropTargetEvent event) {

-        String fileList[] = null;

-        FileTransfer ft = FileTransfer.getInstance();

-        if (ft.isSupportedType(event.currentDataType)) {

-          fileList = (String[]) event.data;

-        }

-        if (fileList != null && fileList.length > 0) {

-          String fileString = fileList[0];

-          documentSource.setText(fileString);

-        }

-      }

-    });

-  }

-

-  private void changeType(Shell shell, Composite composite, Object node) {

-    AnnotationCheckComposite annotCheckCompo = null;

-    if (!(composite instanceof AnnotationCheckComposite)) {

-      return;

-    }

-    annotCheckCompo = (AnnotationCheckComposite) composite;

-    shell.setText("Change annotation type");

-    TypeSystemDescription tsd = annotCheckCompo.getTypeSystemDescription();

-    SelectTypesDialogCheck dialog = new SelectTypesDialogCheck(shell, tsd, null, false, SWT.SINGLE,

-            false);

-    String newTypeName = null;

-    if (dialog.open() == Window.OK) {

-      newTypeName = dialog.getChoosenType();

-    }

-    if (newTypeName != null) {

-      AnnotationCheckTreeNode annotCheckTreeNode = (AnnotationCheckTreeNode) node;

-      CheckAnnotation checkAnnot = (CheckAnnotation) annotCheckTreeNode.getElement();

-      checkAnnot.setTypeName(newTypeName);

-      String[] split = newTypeName.split("\\.");

-      String shortTypeName = split[split.length - 1];

-      checkAnnot.setShortType(shortTypeName);

-      treeView.refresh();

-      return;

-    }

-  }

-

-  private void changeFeature(Shell shell, Object node) {

-    FeatureCheckTreeNode featTreeNode = (FeatureCheckTreeNode) node;

-    shell.setText("Change value of feature");

-    Type range = featTreeNode.getFeature().getRange();

-    IInputValidator validator = new ChangeFeatureValidator(range);

-    InputDialog dialog = new InputDialog(getShell(), "Define new feature value",

-            "New feature value:", "", validator);

-    if (dialog.open() == Window.OK) {

-      featTreeNode.setValue(dialog.getValue());

-      treeView.refresh();

-      return;

-    }

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.part.Page#dispose()

-   */

-  @Override

-  public void dispose() {

-    super.dispose();

-    viewPart.getSite().getPage().removeSelectionListener(this);

-    Collection<Image> values = images.values();

-    for (Image image : values) {

-      image.dispose();

-    }

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/accept.png");

-    image = desc.createImage();

-    name = "accept";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/delete.png");

-    image = desc.createImage();

-    name = "delete";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/help.png");

-    image = desc.createImage();

-    name = "help";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/bullet_blue.png");

-    image = desc.createImage();

-    name = "feature";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/folder_page.png");

-    image = desc.createImage();

-    name = "folder";

-    images.put(name, image);

-  }

-

-  @Override

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (part instanceof AnnotationCheckView) {

-      if (selection instanceof TreeSelection) {

-        TreeSelection ts = (TreeSelection) selection;

-        if (ts.getFirstElement() instanceof FeatureCheckTreeNode) {

-          return;

-        }

-        if (ts.getFirstElement() instanceof AnnotationCheckTreeNode) {

-          AnnotationCheckTreeNode firstElement = (AnnotationCheckTreeNode) ts.getFirstElement();

-          CheckElement element = firstElement.getElement();

-          int begin = 0;

-          int end = 0;

-          CheckDocument newDoc = null;

-          if (element instanceof CheckAnnotation) {

-            begin = ((CheckAnnotation) element).getBegin();

-            end = ((CheckAnnotation) element).getEnd();

-            newDoc = ((CheckDocument) firstElement.getParent().getElement());

-          } else if (element instanceof CheckDocument) {

-            newDoc = ((CheckDocument) element);

-          } else {

-            return;

-          }

-          if (casEditor != null && casEditor.getDocumentProvider() != null

-                  && casEditor.getDocument() != null) {

-            IFile file = ((FileEditorInput) casEditor.getEditorInput()).getFile();

-            if (!newDoc.source.equals(file.getLocation().toOSString())) {

-              casEditor.getDocument().removeChangeListener(annotationListener);

-              casEditor = CheckAnnotationUtils.openInCasEditor(new File(newDoc.source), begin, end);

-              casEditor.getDocument().addChangeListener(annotationListener);

-            } else {

-              casEditor.selectAndReveal(begin, end - begin);

-            }

-          } else {

-            casEditor = CheckAnnotationUtils.openInCasEditor(new File(newDoc.source), begin, end);

-            casEditor.getDocument().addChangeListener(annotationListener);

-          }

-          setAnnotationMode(annotationMode);

-          Iterator<Type> typeIterator = casEditor.getDocument().getCAS().getTypeSystem()

-                  .getTypeIterator();

-          while (typeIterator.hasNext()) {

-            Type type = typeIterator.next();

-            boolean contains = typesToCheck.containsKey(type.getName());

-            casEditor.setShownAnnotationType(type, contains);

-          }

-          currentDocument = newDoc;

-          treeView.getControl().setFocus();

-        }

-      }

-    }

-  }

-

-  @Override

-  public void selectionChanged(SelectionChangedEvent arg0) {

-  }

-

-  public void restoreState(IMemento memento) {

-    if (memento == null)

-      return;

-

-    IMemento dir = memento.getChild("documentSource");

-    if (dir != null) {

-      String id = dir.getID();

-      documentSource.setText(id);

-    }

-

-    IMemento dir2 = memento.getChild("documentSink");

-    if (dir2 != null) {

-      String id = dir2.getID();

-      documentSink.setText(id);

-    }

-

-    IMemento tsName = memento.getChild("typeSystem");

-    if (tsName != null) {

-      String id = tsName.getID();

-      pathToTypeSystem.setText(id);

-    }

-

-    IMemento selectedTypes = memento.getChild("typesToCheck");

-    if (selectedTypes != null) {

-      typesToCheck = new HashMap<String, Set<String>>();

-      for (IMemento mementoTypesToCheck : selectedTypes.getChildren(selectedTypes.getID())) {

-        String typeName = mementoTypesToCheck.getID();

-        Set<String> features = new HashSet<String>();

-        for (IMemento mementoFeature : mementoTypesToCheck.getChildren("feature")) {

-          features.add(mementoFeature.getID());

-        }

-        typesToCheck.put(typeName, features);

-      }

-    }

-    IMemento uncheckedTypes = memento.getChild("typesToTransferUnchecked");

-    if (uncheckedTypes != null) {

-      typesToTransferUnchecked = new HashSet<String>();

-      for (IMemento mementoUnchecked : uncheckedTypes.getChildren(uncheckedTypes.getID())) {

-        String typeName = mementoUnchecked.getID();

-        typesToTransferUnchecked.add(typeName);

-      }

-    }

-

-  }

-

-  public void saveState(IMemento memento) {

-    memento.createChild("documentSource", documentSource.getText());

-    memento.createChild("documentSink", documentSink.getText());

-    memento.createChild("typeSystem", pathToTypeSystem.getText());

-

-    IMemento selectedTypesMemento = memento.createChild("typesToCheck", "type");

-    for (Entry<String, Set<String>> checkedTypeEntry : typesToCheck.entrySet()) {

-      IMemento selectedTypeMemento = selectedTypesMemento.createChild("type",

-              checkedTypeEntry.getKey());

-      for (String feature : checkedTypeEntry.getValue()) {

-        selectedTypeMemento.createChild("feature", feature);

-      }

-    }

-

-    IMemento uncheckTypesMemento = memento.createChild("typesToTransferUnchecked", "unchecked");

-    for (String uncheckedTypeName : typesToTransferUnchecked) {

-      uncheckTypesMemento.createChild("unchecked", uncheckedTypeName);

-    }

-

-  }

-

-  public TreeViewer getTreeViewer() {

-    return treeView;

-  }

-

-  public String getDocumentSource() {

-    return documentSource.getText();

-  }

-

-  public String getDocumentSink() {

-    return documentSink.getText();

-  }

-

-  public String getPathToTypeSystem() {

-    return pathToTypeSystem.getText();

-  }

-

-  public Map<String, Set<String>> getCheckedTypes() {

-    return typesToCheck;

-  }

-

-  public void setTypesToCheck(Map<String, Set<String>> typesToCheck) {

-    this.typesToCheck = typesToCheck;

-  }

-

-  public void reject(boolean doMove) {

-    TreeSelection selection = (TreeSelection) treeView.getSelection();

-    AnnotationCheckTreeNode firstElement = (AnnotationCheckTreeNode) selection.getFirstElement();

-    if (firstElement == null) {

-      return;

-    }

-    firstElement.getElement().checked = true;

-    firstElement.getElement().keep = false;

-    if (doMove) {

-      moveToNext();

-    }

-    treeView.refresh();

-  }

-

-  public void accept() {

-    TreeSelection selection = (TreeSelection) treeView.getSelection();

-    AnnotationCheckTreeNode firstElement = (AnnotationCheckTreeNode) selection.getFirstElement();

-    if (firstElement == null) {

-      return;

-    }

-    firstElement.getElement().checked = true;

-    firstElement.getElement().keep = true;

-    List<AnnotationCheckTreeNode> siblings = Arrays.asList(firstElement.getParent().getChildren());

-    int indexOfFirstElement = siblings.indexOf(firstElement);

-    CheckAnnotation firstElementAnnotation = (CheckAnnotation) firstElement.getElement();

-    moveToNext();

-    for (int i = indexOfFirstElement + 1; i < siblings.size(); i++) {

-      CheckElement nextSiblingCE = siblings.get(i).getElement();

-      if (nextSiblingCE instanceof CheckAnnotation) {

-        CheckAnnotation nextSibling = (CheckAnnotation) nextSiblingCE;

-        if (nextSibling.getBegin() == firstElementAnnotation.getBegin()

-                && nextSibling.getEnd() == firstElementAnnotation.getEnd()) {

-          reject(true);

-        } else {

-          break;

-        }

-        if (i == siblings.size() - 1) {

-          IAnnotationCheckTreeNode parent = siblings.get(0).getParent();

-          parent.getElement().checked = true;

-          parent.getElement().keep = true;

-        }

-      }

-    }

-    treeView.refresh();

-  }

-

-  public void moveToNext() {

-    TreeSelection selection = (TreeSelection) treeView.getSelection();

-    IAnnotationCheckTreeNode parent = null;

-    AnnotationCheckTreeNode firstElement = null;

-    if (selection.getFirstElement() instanceof FeatureCheckTreeNode) {

-      return;

-    }

-    firstElement = (AnnotationCheckTreeNode) selection.getFirstElement();

-    parent = firstElement.getParent();

-    IAnnotationCheckTreeNode[] children = parent.getChildren();

-    List<IAnnotationCheckTreeNode> list = Arrays.asList(children);

-    int indexOf = list.indexOf(firstElement);

-    IAnnotationCheckTreeNode brother = null;

-    IAnnotationCheckTreeNode uncle = parent;

-    if (list == null || list.isEmpty()) {

-

-    } else if (indexOf == -1) {

-      brother = list.get(0);

-    } else if (firstElement.getElement() instanceof CheckDocument && indexOf < list.size() - 1) {

-      uncle = list.get(indexOf + 1);

-      if (uncle.getChildren().length > 0) {

-        brother = uncle.getChildren()[0];

-      }

-    } else if (indexOf < list.size() - 1) {

-      brother = list.get(indexOf + 1);

-    } else if (firstElement.getElement() instanceof CheckAnnotation) {

-      brother = null;

-      IAnnotationCheckTreeNode[] children2 = parent.getParent().getChildren();

-      List<IAnnotationCheckTreeNode> list2 = Arrays.asList(children2);

-      int indexOf2 = list2.indexOf(parent);

-      if (list2 == null || list2.isEmpty()) {

-

-      } else if (indexOf2 == -1) {

-        uncle = list2.get(0);

-      } else if (indexOf2 < list2.size() - 1) {

-        uncle = list2.get(indexOf2 + 1);

-        if (uncle.getChildren().length != 0) {

-          brother = uncle.getChildren()[0];

-        }

-      }

-    }

-    TreePath treePath = null;

-    if (brother == null) {

-      treePath = new TreePath(new Object[] { treeView.getInput(), uncle });

-    } else {

-      treePath = new TreePath(new Object[] { treeView.getInput(), uncle, brother });

-

-    }

-    final TreeSelection newSelection = new TreeSelection(treePath);

-    treeView.setSelection(newSelection, true);

-    treeView.expandToLevel(((AnnotationCheckTreeNode) newSelection.getFirstElement()).getParent(),

-            TreeViewer.ALL_LEVELS);

-

-    if (firstElement.getElement() instanceof CheckAnnotation) {

-      boolean allChecked = true;

-      boolean oneKeep = false;

-      for (IAnnotationCheckTreeNode each : list) {

-        CheckElement element = each.getElement();

-        allChecked &= element.checked;

-        oneKeep |= element.keep;

-      }

-      parent.getElement().checked = allChecked;

-      parent.getElement().keep = oneKeep;

-    }

-

-  }

-

-  public void save() {

-    AnnotationCheckTreeNode root = (AnnotationCheckTreeNode) treeView.getInput();

-    AnnotationCheckTreeNode[] children = root.getChildren();

-    List<CheckDocument> docs = new ArrayList<CheckDocument>(oldDocs);

-    TypeSystemDescription tsd = getTypeSystemDescription();

-    CAS casSource = null;

-    CAS cas = null;

-    try {

-      cas = CasCreationUtils.createCas(tsd, null, new FsIndexDescription[0]);

-      casSource = CasCreationUtils.createCas(tsd, null, new FsIndexDescription[0]);

-    } catch (ResourceInitializationException e) {

-      RutaAddonsPlugin.error(e);

-    }

-    for (AnnotationCheckTreeNode each : children) {

-      CheckDocument cd = (CheckDocument) each.getElement();

-      if (cd.checked && cd.keep) {

-        cas.reset();

-        File oldFile = new File(cd.source);

-        File goldFile = new File(documentSink.getText(), oldFile.getName());

-        try {

-          if (goldFile.exists()) {

-            XmiCasDeserializer.deserialize(new FileInputStream(goldFile), cas, false);

-          } else {

-            XmiCasDeserializer.deserialize(new FileInputStream(oldFile), cas, true);

-          }

-        } catch (FileNotFoundException e) {

-          RutaAddonsPlugin.error(e);

-        } catch (SAXException e) {

-          RutaAddonsPlugin.error(e);

-        } catch (IOException e) {

-          RutaAddonsPlugin.error(e);

-        }

-        String documentText = cas.getDocumentText();

-        cas.reset();

-        cas.setDocumentText(documentText);

-        try {

-          XmiCasDeserializer.deserialize(new FileInputStream(oldFile), casSource, true);

-        } catch (FileNotFoundException e) {

-          RutaAddonsPlugin.error(e);

-        } catch (SAXException e) {

-          RutaAddonsPlugin.error(e);

-        } catch (IOException e) {

-          RutaAddonsPlugin.error(e);

-        }

-        for (String uncheckedTypeName : typesToTransferUnchecked) {

-          Type type = cas.getTypeSystem().getType(uncheckedTypeName);

-          if (type != null) {

-            for (AnnotationFS annot : casSource.getAnnotationIndex(type)) {

-              cas.addFsToIndexes(cas.createAnnotation(type, annot.getBegin(), annot.getEnd()));

-            }

-          }

-        }

-        AnnotationCheckTreeNode[] annotationNodes = each.getChildren();

-        for (AnnotationCheckTreeNode eachAN : annotationNodes) {

-          CheckAnnotation ca = (CheckAnnotation) eachAN.getElement();

-          if (ca.checked && ca.keep) {

-            TypeSystem ts = casEditor.getDocument().getCAS().getTypeSystem();

-            Type type = ts.getType(ca.getTypeName());

-            if (type != null) {

-              AnnotationFS annotFS = ca.toAnnotationFS(cas, type);

-              if (eachAN.hasChildren()) {

-                FeatureCheckTreeNode[] featureNodes = (FeatureCheckTreeNode[]) eachAN.getChildren();

-                for (FeatureCheckTreeNode featureNode : featureNodes) {

-                  Feature feature = featureNode.getFeature();

-                  try {

-                    annotFS.setFeatureValueFromString(feature, featureNode.getValue());

-                  } catch (Exception e) {

-                    continue;

-                  }

-                }

-              }

-              cas.addFsToIndexes(annotFS);

-            }

-          }

-        }

-        try {

-          CheckAnnotationUtils.writeXmi(cas, goldFile);

-        } catch (Exception e) {

-          RutaAddonsPlugin.error(e);

-        }

-        cd.checkedTypes.addAll(typesToCheck.keySet());

-        if (!docs.contains(cd)) {

-          docs.add(cd);

-        }

-      }

-      File dataFile = new File(documentSink.getText(), "data.xml");

-      try {

-        XMLUtils.write(docs, dataFile);

-      } catch (IOException e) {

-        RutaAddonsPlugin.error(e);

-      }

-    }

-  }

-

-  public void setAnnotationMode(String typeString) {

-    this.annotationMode = typeString;

-    if (casEditor != null && casEditor.getDocument() != null && typeString != null) {

-      Type type = casEditor.getDocument().getCAS().getTypeSystem().getType(typeString);

-      casEditor.setAnnotationMode(type);

-    }

-  }

-

-  public void addAnnotations(Collection<AnnotationFS> annotations) {

-    AnnotationCheckRootNode root = (AnnotationCheckRootNode) treeView.getInput();

-    AnnotationCheckTreeNode[] children = root.getChildren();

-    for (AnnotationCheckTreeNode docNode : children) {

-      if (docNode.getElement().equals(currentDocument)) {

-        List<AnnotationCheckTreeNode> annotationList = new ArrayList<AnnotationCheckTreeNode>(

-                Arrays.asList(docNode.getChildren()));

-        for (AnnotationFS eachAnnotation : annotations) {

-          CheckElement ac = new CheckAnnotation(eachAnnotation);

-          ac.checked = true;

-          ac.keep = true;

-          AnnotationCheckTreeNode anode = new AnnotationCheckTreeNode(docNode, ac);

-          annotationList.add(anode);

-        }

-        Collections.sort(annotationList, comparator);

-        docNode.setChildren(annotationList);

-        treeView.refresh(docNode);

-        break;

-      }

-    }

-  }

-

-  public void removeAnnotations(Collection<AnnotationFS> annotations) {

-    AnnotationCheckRootNode root = (AnnotationCheckRootNode) treeView.getInput();

-    AnnotationCheckTreeNode[] children = root.getChildren();

-    for (AnnotationCheckTreeNode docNode : children) {

-      if (docNode.getElement().equals(currentDocument)) {

-        AnnotationCheckTreeNode[] achildren = docNode.getChildren();

-        for (AnnotationCheckTreeNode anode : achildren) {

-          CheckAnnotation checkAnnotation = (CheckAnnotation) anode.getElement();

-          for (AnnotationFS eachAnnotation : annotations) {

-            if (eachAnnotation.getBegin() == checkAnnotation.getBegin()

-                    && eachAnnotation.getEnd() == checkAnnotation.getBegin()

-                    && eachAnnotation.getType().getName().equals(checkAnnotation.getTypeName())) {

-              checkAnnotation.checked = true;

-              checkAnnotation.keep = false;

-            }

-          }

-        }

-        treeView.refresh(docNode);

-        break;

-      }

-    }

-  }

-

-  public void updateAnnotations(Collection<AnnotationFS> annotations) {

-  }

-

-  public void setOldDocs(List<CheckDocument> docs) {

-    this.oldDocs = docs;

-

-  }

-

-  public TypeSystemDescription getTypeSystemDescription() {

-    refreshTypeSystem();

-    return tsd;

-  }

-

-  public void refreshTypeSystem() {

-    try {

-      String typeSystem = getPathToTypeSystem();

-      TypeSystemDescription tsd = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-              new XMLInputSource(new File(typeSystem)));

-      tsd.resolveImports();

-      this.tsd = tsd;

-    } catch (InvalidXMLException e) {

-      e.printStackTrace();

-    } catch (IOException e) {

-      e.printStackTrace();

-    }

-  }

-

-  public Map<String, Set<String>> getUncheckedTypes() {

-    Map<String, Set<String>> map = new HashMap<String, Set<String>>();

-    for (String entry : typesToTransferUnchecked) {

-      map.put(entry, null);

-    }

-    return map;

-  }

-

-  public void setUncheckedTypes(Set<String> typesToTransferUnchecked) {

-    this.typesToTransferUnchecked = typesToTransferUnchecked;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckContentProvider.java
deleted file mode 100644
index 55fbd48..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckContentProvider.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.jface.viewers.ITreeContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-public class AnnotationCheckContentProvider  implements ITreeContentProvider {

-

-  public AnnotationCheckContentProvider() {

-    super();

-  }

-

-  public void dispose() {

-

-  }

-

-  public void inputChanged(Viewer arg0, Object arg1, Object arg2) {

-

-  }

-

-  public Object[] getChildren(Object node) {

-    if (node instanceof IAnnotationCheckTreeNode) {

-      List<Object> result = new ArrayList<Object>();

-      IAnnotationCheckTreeNode n = (IAnnotationCheckTreeNode) node;

-      AnnotationCheckTreeNode[] children = n.getChildren();

-      for (AnnotationCheckTreeNode each : children) {

-        if (!(each instanceof AnnotationCheckRootNode)) {

-          result.add(each);

-        }

-      }

-      return result.toArray();

-    }

-    return null;

-  }

-

-  public Object[] getElements(Object node) {

-    return getChildren(node);

-  }

-

-  public Object getParent(Object node) {

-    if(node instanceof IAnnotationCheckTreeNode) {

-      IAnnotationCheckTreeNode n = (IAnnotationCheckTreeNode) node;

-      return n.getParent();

-    }

-    return null;

-  }

-

-  public boolean hasChildren(Object node) {

-    if(node instanceof IAnnotationCheckTreeNode) {

-      IAnnotationCheckTreeNode n = (IAnnotationCheckTreeNode) node;

-      return n.hasChildren();

-    }

-    return false;

-  }

-

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckLabelProvider.java
deleted file mode 100644
index 844a40b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckLabelProvider.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.io.File;

-

-import org.apache.commons.lang3.StringUtils;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-public class AnnotationCheckLabelProvider extends LabelProvider implements ILabelProvider {

-

-  private AnnotationCheckComposite composite;

-

-  public AnnotationCheckLabelProvider(AnnotationCheckComposite composite) {

-    this.composite = composite;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)

-   */

-  @Override

-  public Image getImage(Object element) {

-    if (element instanceof FeatureCheckTreeNode) {

-      return composite.getImage("feature");

-    }

-    if (element instanceof IAnnotationCheckTreeNode) {

-      return getAnnotationCheckTreeNodeImage(element);

-    }

-    return null;

-  }

-

-  private Image getAnnotationCheckTreeNodeImage(Object element) {

-    IAnnotationCheckTreeNode node = (IAnnotationCheckTreeNode) element;

-    CheckElement e = node.getElement();

-    if (!e.checked) {

-      return composite.getImage("help");

-    } else {

-      if (e.keep) {

-        return composite.getImage("accept");

-      } else {

-        return composite.getImage("delete");

-      }

-    }

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)

-   */

-  @Override

-  public String getText(Object element) {

-    if (element instanceof FeatureCheckTreeNode) {

-      FeatureCheckTreeNode featureNode = (FeatureCheckTreeNode) element;

-      return "[" + featureNode.getFeature().getShortName() + "]: " + featureNode.getValue();

-    }

-    if (element instanceof AnnotationCheckTreeNode) {

-      AnnotationCheckTreeNode node = (AnnotationCheckTreeNode) element;

-      CheckElement ce = node.getElement();

-      if (ce instanceof CheckAnnotation) {

-        CheckAnnotation ca = (CheckAnnotation) ce;

-        String normalizeSpace = StringUtils.normalizeSpace(ca.getCoveredText());

-        return "[" + ca.getShortType() + "]: " + normalizeSpace;

-      } else if (ce instanceof CheckDocument) {

-        CheckDocument cd = (CheckDocument) ce;

-        String name = new File(cd.source).getName();

-        return name;

-      }

-    }

-    return element.toString();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckRootNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckRootNode.java
deleted file mode 100644
index 102dff8..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckRootNode.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * 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.ruta.check;

-

-

-public class AnnotationCheckRootNode extends AnnotationCheckTreeNode {

-

-  public AnnotationCheckRootNode() {

-    super(null, null);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckTreeNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckTreeNode.java
deleted file mode 100644
index d93e6cf..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckTreeNode.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.ruta.caseditor.view.tree.TypeTreeNode;

-

-public class AnnotationCheckTreeNode implements IAnnotationCheckTreeNode {

-

-  protected List<AnnotationCheckTreeNode> children;

-

-  private IAnnotationCheckTreeNode parent;

-

-  private CheckElement element;

-

-  private LinkedList<TypeTreeNode> typeTreeNodes;

-

-  public AnnotationCheckTreeNode(IAnnotationCheckTreeNode parent, CheckElement element) {

-    super();

-    this.parent = parent;

-    this.children = new ArrayList<AnnotationCheckTreeNode>();

-    this.element = element;

-    this.typeTreeNodes = new LinkedList<TypeTreeNode>();

-  }

-

-  @Override

-  public void addChild(AnnotationCheckTreeNode child) {

-    children.add(child);

-  }

-

-  @Override

-  public AnnotationCheckTreeNode[] getChildren() {

-    if (children.isEmpty()) {

-      return new FeatureCheckTreeNode[0];

-    }

-    if (children.get(0) instanceof FeatureCheckTreeNode) {

-      return children.toArray(new FeatureCheckTreeNode[0]);

-    }

-    return children.toArray(new AnnotationCheckTreeNode[0]);

-  }

-

-  @Override

-  public Iterator<AnnotationCheckTreeNode> getChildrenIterator() {

-    return children.iterator();

-  }

-

-  @Override

-  public String getName() {

-    return "AbstractAnnotationCheckTreeNode";

-  }

-

-  @Override

-  public IAnnotationCheckTreeNode getParent() {

-    return parent;

-  }

-

-  @Override

-  public CheckElement getElement() {

-    return element;

-  }

-

-  @Override

-  public boolean hasChildren() {

-    return !children.isEmpty();

-  }

-

-  public void setChildren(List<AnnotationCheckTreeNode> children) {

-    this.children = children;

-  }

-

-  public void swapChilds(AnnotationCheckTreeNode child1, AnnotationCheckTreeNode child2) {

-    int index1 = children.indexOf(child1);

-    int index2 = children.indexOf(child2);

-    if (index1 > -1 && index2 > -1) {

-      children.set(index1, child2);

-      children.set(index2, child1);

-    }

-  }

-

-  public void addTypeChildNode(TypeTreeNode typeTreeNode) {

-    if (!typeTreeNodes.contains(typeTreeNode)) {

-      typeTreeNodes.add(typeTreeNode);

-    }

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckTreeNodeComparator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckTreeNodeComparator.java
deleted file mode 100644
index d06dd4b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckTreeNodeComparator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.Comparator;

-

-public class AnnotationCheckTreeNodeComparator implements Comparator<AnnotationCheckTreeNode> {

-

-  @Override

-  public int compare(AnnotationCheckTreeNode o1, AnnotationCheckTreeNode o2) {

-    if (o1.getElement() instanceof CheckAnnotation && o1.getElement() instanceof CheckAnnotation) {

-      CheckAnnotation ca1 = (CheckAnnotation) o1.getElement();

-      CheckAnnotation ca2 = (CheckAnnotation) o2.getElement();

-      if (ca1.getBegin() < ca2.getBegin()) {

-        return -1;

-      } else if (ca1.getBegin() > ca2.getBegin()) {

-        return 1;

-      } else if (ca1.getEnd() > ca2.getEnd()) {

-        return -1;

-      } else if (ca1.getEnd() < ca2.getEnd()) {

-        return 1;

-      } else {

-        boolean equals = o1.equals(o2);

-        if (equals) {

-          return 0;

-        } else {

-          int compareTo = ca1.getTypeName().compareTo(ca2.getTypeName());

-          if (compareTo == 0) {

-            return 1;

-          } else {

-            return compareTo;

-          }

-        }

-      }

-    }

-    return 0;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckView.java
deleted file mode 100644
index 4283172..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckView.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*

- * 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.ruta.check;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.ui.IMemento;

-import org.eclipse.ui.IViewSite;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.part.ViewPart;

-

-public class AnnotationCheckView extends ViewPart {

-  public static final String ID = "org.apache.uima.ruta.check";

-

-  private AnnotationCheckComposite checkComp;

-

-  private IMemento memento;

-

-  public AnnotationCheckView() {

-    super();

-  }

-

-  @Override

-  public void createPartControl(Composite parent) {

-    checkComp = new AnnotationCheckComposite(parent, SWT.NULL, this);

-    if (memento != null) {

-      checkComp.restoreState(memento);

-      memento = null;

-    }

-    checkComp.refreshTypeSystem();

-  }

-

-  @Override

-  public void setFocus() {

-    this.checkComp.setFocus();

-  }

-

-  public AnnotationCheckComposite getComposite() {

-    return checkComp;

-  }

-

-  @Override

-  public void saveState(IMemento memento) {

-    checkComp.saveState(memento);

-  }

-

-  @Override

-  public void init(IViewSite site, IMemento memento) throws PartInitException {

-    this.memento = memento;

-    super.init(site, memento);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/ChangeFeatureValidator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/ChangeFeatureValidator.java
deleted file mode 100644
index 5322e64..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/ChangeFeatureValidator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.ruta.check;
-
-import org.apache.uima.cas.Type;
-import org.eclipse.jface.dialogs.IInputValidator;
-
-public class ChangeFeatureValidator implements IInputValidator {
-
-  private Type range;
-
-  public ChangeFeatureValidator(Type range) {
-    this.range = range;
-  }
-
-  @Override
-  public String isValid(String input) {
-    String rangeType = range.getShortName();
-    if (input != null && !input.equalsIgnoreCase("")) {
-      if (rangeType.equals("String")) {
-        return null;
-      }
-      if (rangeType.equals("Integer")) {
-        try {
-          Integer.parseInt(input);
-          return null;
-        } catch (NumberFormatException e) {
-          return "Input must be an integer value!";
-        }
-      }
-      if (rangeType.equals("Float")) {
-        try {
-          Float.parseFloat(input);
-          return null;
-        } catch (NumberFormatException e) {
-          return "Input must be a floating point value!";
-        }
-      }
-      if (rangeType.equals("Double")) {
-        try {
-          Double.parseDouble(input);
-          return null;
-        } catch (NumberFormatException e) {
-          return "Input must be a double value!";
-        }
-      }
-    }
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotation.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotation.java
deleted file mode 100644
index dfeb0e0..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotation.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.HashMap;

-import java.util.Map;

-import java.util.Map.Entry;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-

-public class CheckAnnotation extends CheckElement {

-

-  private int begin;

-

-  private int end;

-

-  private String typeName;

-

-  private String coveredText;

-

-  private String shortTypeName;

-

-  private Map<Feature, String> features;

-

-  public CheckAnnotation(AnnotationFS afs) {

-    super();

-    begin = afs.getBegin();

-    end = afs.getEnd();

-    typeName = afs.getType().getName();

-    shortTypeName = afs.getType().getShortName();

-    coveredText = afs.getCoveredText();

-    features = new HashMap<Feature, String>();

-    for (Feature feat : afs.getType().getFeatures()) {

-      try {

-        features.put(feat, afs.getFeatureValueAsString(feat));

-      } catch (Exception e) {

-        continue;

-      }

-    }

-  }

-

-  public AnnotationFS toAnnotationFS(CAS cas, Type type) {

-    AnnotationFS afs = cas.createAnnotation(type, begin, end);

-    for (Entry<Feature, String> entry : features.entrySet()) {

-      afs.setFeatureValueFromString(entry.getKey(), entry.getValue());

-    }

-    return afs;

-  }

-

-  public String getTypeName() {

-    return typeName;

-  }

-

-  public void setTypeName(String type) {

-    this.typeName = type;

-  }

-

-  public int getBegin() {

-    return begin;

-  }

-

-  public void setBegin(int begin) {

-    this.begin = begin;

-  }

-

-  public int getEnd() {

-    return end;

-  }

-

-  public void setEnd(int end) {

-    this.end = end;

-  }

-

-  public String getCoveredText() {

-    return coveredText;

-  }

-

-  public void setCoveredText(String coveredText) {

-    this.coveredText = coveredText;

-  }

-

-  public String getShortType() {

-    return shortTypeName;

-  }

-

-  public void setShortType(String shortType) {

-    this.shortTypeName = shortType;

-  }

-

-  public Map<Feature, String> getFeatures() {

-    return features;

-  }

-

-  public void setFeatures(Map<Feature, String> features) {

-    this.features = features;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotationDocumentListener.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotationDocumentListener.java
deleted file mode 100644
index efd959e..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotationDocumentListener.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.Collection;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.caseditor.editor.AbstractAnnotationDocumentListener;

-

-public class CheckAnnotationDocumentListener extends AbstractAnnotationDocumentListener {

-

-  private AnnotationCheckComposite composite;

-  

-  public CheckAnnotationDocumentListener(AnnotationCheckComposite composite) {

-    super();

-    this.composite = composite;

-  }

-

-  @Override

-  protected void addedAnnotation(Collection<AnnotationFS> annotations) {

-    composite.addAnnotations(annotations);

-  }

-

-  @Override

-  protected void removedAnnotation(Collection<AnnotationFS> annotations) {

-    composite.removeAnnotations(annotations);

-  }

-

-  @Override

-  protected void updatedAnnotation(Collection<AnnotationFS> annotations) {

-    composite.updateAnnotations(annotations);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotationUtils.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotationUtils.java
deleted file mode 100644
index 6d48a33..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckAnnotationUtils.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.io.File;

-import java.io.FileOutputStream;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.impl.XmiCasSerializer;

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.util.XMLSerializer;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.ui.IWorkbenchPage;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.part.FileEditorInput;

-

-public class CheckAnnotationUtils {

-  public static AnnotationEditor openInCasEditor(File file, int begin, int end) {

-    if (file == null) {

-      return null;

-    }

-    String absolutePath = file.getAbsolutePath();

-    try {

-      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();

-      IFile ifile = getIFile(absolutePath);

-      AnnotationEditor editor = (AnnotationEditor) page.openEditor(new FileEditorInput(ifile),

-              "org.apache.uima.caseditor.editor");

-      editor.selectAndReveal(begin, end - begin);

-      return editor;

-    } catch (PartInitException e) {

-      RutaAddonsPlugin.error(e);

-    }

-    return null;

-  }

-

-  public static IFile getIFile(String location) {

-    IPath s = Path.fromOSString(location);

-    IWorkspace workspace = ResourcesPlugin.getWorkspace();

-    IFile ifile = workspace.getRoot().getFileForLocation(s);

-    return ifile;

-  }

-  

-  public static void writeXmi(CAS aCas, File name) throws Exception {

-    FileOutputStream out = null;

-

-    try {

-      // write XMI

-      out = new FileOutputStream(name);

-      XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());

-      XMLSerializer xmlSer = new XMLSerializer(out, false);

-      ser.serialize(aCas, xmlSer.getContentHandler());

-    } catch (Exception e) {

-      throw e;

-    } finally {

-      if (out != null) {

-        out.close();

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckDocument.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckDocument.java
deleted file mode 100644
index c0ec415..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckDocument.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.Collection;

-import java.util.TreeSet;

-

-public class CheckDocument extends CheckElement {

-

-  public String source;

-

-  public final Collection<String> checkedTypes = new TreeSet<String>();

-  

-  public CheckDocument(String source) {

-    super();

-    this.source = source;

-  }

-

-  public String toXML() {

-    StringBuilder sb = new StringBuilder();

-    sb.append("<document source=\"");

-    sb.append(source);

-    sb.append("\" >");

-    sb.append("\n");

-    for (String each : checkedTypes) {

-      sb.append("<type>");

-      sb.append(each);

-      sb.append("</type>");

-      sb.append("\n");

-    }

-    sb.append("</document>");

-    sb.append("\n");

-    return sb.toString();

-  }

-  

-  

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckDocumentsContentHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckDocumentsContentHandler.java
deleted file mode 100644
index b9e2fcc..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckDocumentsContentHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.xml.sax.Attributes;

-import org.xml.sax.helpers.DefaultHandler;

-

-public class CheckDocumentsContentHandler extends DefaultHandler {

-

-  private List<CheckDocument> checkDocuments = new ArrayList<CheckDocument>();

-  

-

-  private CheckDocument current = null;

-

-  private String currentString;

-

-  public void startElement(String uri, String localName, String qName, Attributes attributes) {

-    if (localName.equals("document")) {

-      String source = attributes.getValue("source");

-      current = new CheckDocument(source);

-    } 

-  }

-

-  public void characters(char[] ch, int start, int length) {

-    currentString = new String(ch, start, length);

-  }

-

-  public void endElement(String uri, String localName, String qName) {

-    if (localName.equals("document")) {

-      checkDocuments.add(current);

-    } else if (localName.equals("type")) {

-      current.checkedTypes.add(currentString);

-    }

-  }

-  

-  public List<CheckDocument> getCheckDocuments() {

-    return checkDocuments;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckElement.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckElement.java
deleted file mode 100644
index 4c8f5ee..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/CheckElement.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * 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.ruta.check;

-

-

-public class CheckElement {

-

-  public boolean checked = false;

-

-  public boolean keep = true;

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/FeatureCheckTreeNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/FeatureCheckTreeNode.java
deleted file mode 100644
index 2fbf6c9..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/FeatureCheckTreeNode.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.ruta.check;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-
-public class FeatureCheckTreeNode extends AnnotationCheckTreeNode {
-
-  private Feature feature;
-
-  private String value;
-
-  public FeatureCheckTreeNode(IAnnotationCheckTreeNode parent, Feature feat, String value) {
-    super(parent, null);
-    this.feature = feat;
-    this.value = value;
-  }
-
-  @Override
-  public String getName() {
-    return feature.getShortName() + ": " + value;
-  }
-
-  public Type getRange() {
-    return feature.getRange();
-  }
-
-  public Feature getFeature() {
-    return feature;
-  }
-
-  public String getValue() {
-    return value;
-  }
-
-  public void setValue(String value) {
-    this.value = value;
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/FeatureCheckTreeNodeComparator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/FeatureCheckTreeNodeComparator.java
deleted file mode 100644
index 4f00d6f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/FeatureCheckTreeNodeComparator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.ruta.check;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-
-public class FeatureCheckTreeNodeComparator extends ViewerComparator {
-
-  private AnnotationCheckTreeNodeComparator annotCheckTreeNodeComp;
-
-  public FeatureCheckTreeNodeComparator() {
-    super();
-    this.annotCheckTreeNodeComp = new AnnotationCheckTreeNodeComparator();
-  }
-
-  @Override
-  public int compare(Viewer v, Object o1, Object o2) {
-    int category1 = category(o1);
-    int category2 = category(o2);
-    if (category1 == 1 && category1 == category2) {
-      FeatureCheckTreeNode featTreeNode1 = (FeatureCheckTreeNode) o1;
-      FeatureCheckTreeNode featTreeNode2 = (FeatureCheckTreeNode) o2;
-      return featTreeNode1.getFeature().getShortName()
-              .compareToIgnoreCase(featTreeNode2.getFeature().getShortName());
-    }
-    if (category1 == 2 && category1 == category2) {
-      AnnotationCheckTreeNode annotCheckTreeNode1 = (AnnotationCheckTreeNode) o1;
-      AnnotationCheckTreeNode annotCheckTreeNode2 = (AnnotationCheckTreeNode) o2;
-      return annotCheckTreeNodeComp.compare(annotCheckTreeNode1, annotCheckTreeNode2);
-    }
-    return o1.toString().compareToIgnoreCase(o2.toString());
-  }
-
-  @Override
-  public int category(Object element) {
-    if (element == null) {
-      return -1;
-    }
-    if (element instanceof FeatureCheckTreeNode) {
-      return 1;
-    }
-    if (element instanceof AnnotationCheckTreeNode) {
-      return 2;
-    }
-    return -1;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/IAnnotationCheckTreeNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/IAnnotationCheckTreeNode.java
deleted file mode 100644
index 168e1f6..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/IAnnotationCheckTreeNode.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.Iterator;

-

-interface IAnnotationCheckTreeNode {

-

-  void addChild(AnnotationCheckTreeNode child);

-

-  AnnotationCheckTreeNode[] getChildren();

-

-  Iterator<AnnotationCheckTreeNode> getChildrenIterator();

-

-  String getName();

-

-  IAnnotationCheckTreeNode getParent();

-

-  boolean hasChildren();

-

-  CheckElement getElement();

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/RejectHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/RejectHandler.java
deleted file mode 100644
index 6a064fc..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/RejectHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*

- * 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.ruta.check;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class RejectHandler implements IHandler {

-

-  @Override

-  public void addHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  @Override

-  public void dispose() {

-

-  }

-

-  @Override

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    AnnotationCheckView acView;

-    try {

-      acView = (AnnotationCheckView) HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench()

-              .getActiveWorkbenchWindow().getActivePage().showView(AnnotationCheckView.ID);

-      AnnotationCheckComposite composite = acView.getComposite();

-      composite.reject(true);

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-      return Status.CANCEL_STATUS;

-    }

-    return Status.OK_STATUS;

-  }

-

-  @Override

-  public boolean isEnabled() {

-    return true;

-  }

-

-  @Override

-  public boolean isHandled() {

-    return true;

-  }

-

-  @Override

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SaveHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SaveHandler.java
deleted file mode 100644
index 4a3d925..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SaveHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.check;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class SaveHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    AnnotationCheckView acView;

-    try {

-      acView = (AnnotationCheckView) HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench()

-              .getActiveWorkbenchWindow().getActivePage().showView(AnnotationCheckView.ID);

-      AnnotationCheckComposite composite = (AnnotationCheckComposite) acView.getComposite();

-      composite.save();

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-      return Status.CANCEL_STATUS;

-    }

-    return Status.OK_STATUS;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectCheckedTypesHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectCheckedTypesHandler.java
deleted file mode 100644
index c6de58e..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectCheckedTypesHandler.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.ruta.check;
-
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.util.InvalidXMLException;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class SelectCheckedTypesHandler implements IHandler {
-
-	public void addHandlerListener(IHandlerListener arg0) {
-
-	}
-
-	public void dispose() {
-
-	}
-
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		AnnotationCheckView acView;
-		try {
-			acView = (AnnotationCheckView) HandlerUtil
-					.getActiveWorkbenchWindow(event).getWorkbench()
-					.getActiveWorkbenchWindow().getActivePage()
-					.showView(AnnotationCheckView.ID);
-			AnnotationCheckComposite composite = (AnnotationCheckComposite) acView
-					.getComposite();
-			TypeSystemDescription tsd = composite.getTypeSystemDescription();
-			tsd.resolveImports();
-			Display display = Display.getDefault();
-			Shell shell = new Shell(display, SWT.RESIZE | SWT.APPLICATION_MODAL
-					| SWT.DIALOG_TRIM);
-			shell.setText("Checked Types");
-			SelectTypesDialogCheck dialog = new SelectTypesDialogCheck(shell,
-					tsd, composite.getCheckedTypes(), true, SWT.MULTI, true);
-			if (dialog.open() == Window.OK) {
-				composite.setTypesToCheck(dialog.getSelectedTypes());
-			}
-		} catch (InvalidXMLException e) {
-			RutaAddonsPlugin.error(e);
-			return Status.CANCEL_STATUS;
-		} catch (PartInitException e) {
-			RutaAddonsPlugin.error(e);
-			return Status.CANCEL_STATUS;
-		}
-		return Status.OK_STATUS;
-	}
-
-	public boolean isEnabled() {
-		return true;
-	}
-
-	public boolean isHandled() {
-		return true;
-	}
-
-	public void removeHandlerListener(IHandlerListener arg0) {
-
-	}
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectTypesDialogCheck.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectTypesDialogCheck.java
deleted file mode 100644
index 6fefeeb..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectTypesDialogCheck.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * 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.ruta.check;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.resource.metadata.FeatureDescription;
-import org.apache.uima.resource.metadata.TypeDescription;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-public class SelectTypesDialogCheck extends TitleAreaDialog implements Listener {
-
-  private boolean featureMode;
-
-  private Text typeNameUI;
-
-  public Tree tree;
-
-  public String typeName = "error-TypeName-never-set";
-
-  private List<String> allTypes;
-
-  private Map<String, List<String>> allTypesMapping;
-
-  private Map<String, Set<String>> selectedTypes;
-
-  private int swtTreeModeFlag;
-
-  private boolean check;
-
-  private String choosenType;
-
-  public SelectTypesDialogCheck(Shell shell, TypeSystemDescription tsd,
-          Map<String, Set<String>> selectedTypes, boolean featureMode, int swtTreeModeFlag,
-          boolean check) {
-    super(shell);
-    this.check = check;
-    this.swtTreeModeFlag = swtTreeModeFlag;
-    allTypes = new LinkedList<String>();
-    allTypesMapping = new HashMap<String, List<String>>();
-    TypeDescription[] systemTypes = tsd.getTypes();
-    for (TypeDescription typeDescription : systemTypes) {
-      List<String> typeFeatures = new LinkedList<String>();
-      for (FeatureDescription fd : typeDescription.getFeatures()) {
-        typeFeatures.add(fd.getName());
-      }
-      String supertypeName = typeDescription.getSupertypeName();
-      if (supertypeName != null) {
-        TypeDescription superTypeDesc = tsd.getType(supertypeName);
-        if (superTypeDesc != null) {
-          for (FeatureDescription fd : superTypeDesc.getFeatures()) {
-            typeFeatures.add(fd.getName());
-          }
-        }
-      }
-      String name = typeDescription.getName();
-      allTypes.add(name);
-      allTypesMapping.put(name, typeFeatures);
-    }
-    if (selectedTypes != null) {
-      this.selectedTypes = selectedTypes;
-    } else {
-      this.selectedTypes = new HashMap<String, Set<String>>();
-    }
-    this.featureMode = featureMode;
-  }
-
-  @Override
-  protected Control createContents(Composite parent) {
-    Control contents = super.createContents(parent);
-    if (!check) {
-      setMessage("Please select the new type:");
-      setTitle("Type selection dialog!");
-    } else if (!featureMode) {
-      setMessage("Select the types that should be copied unchecked:");
-      setTitle("Type selection dialog!");
-    } else {
-      setMessage("Select the types and features that you want to check:");
-      setTitle("Type and feature selection dialog");
-    }
-    return contents;
-  }
-
-  @Override
-  protected Control createDialogArea(Composite parent) {
-    Composite composite = (Composite) super.createDialogArea(parent);
-    typeNameUI = newText(composite, SWT.SINGLE, "Specify the type name");
-    typeNameUI.addListener(SWT.Modify, this);
-    createWideLabel(composite, "  Matching Types:");
-    if (check) {
-      tree = newTree(composite, SWT.CHECK);
-    } else {
-      tree = newTree(composite, SWT.NONE);
-    }
-    tree.setBounds(10, 10, 50, 50);
-    displayFilteredTypes("");
-    return composite;
-  }
-
-  @Override
-  public void handleEvent(Event event) {
-    if (event.widget == typeNameUI && event.type == SWT.Modify) {
-      displayFilteredTypes(typeNameUI.getText());
-    } else if (event.widget == tree) {
-      Widget item = event.item;
-      if (item instanceof TreeItem) {
-        TreeItem ti = (TreeItem) item;
-        this.choosenType = ti.getText();
-        int level = getLevel(ti);
-        TreeItem[] selection = tree.getSelection();
-        String text = ti.getText();
-        if (level == 1) {
-          for (TreeItem treeItem : selection) {
-            if (treeItem != ti) {
-              if (ti.getChecked()) {
-                treeItem.setChecked(true);
-                selectedTypes.put(treeItem.getText(), null);
-              } else {
-                selectedTypes.remove(treeItem.getText());
-                treeItem.setChecked(false);
-              }
-            }
-          }
-          if (ti.getChecked()) {
-            selectedTypes.put(text, new HashSet<String>());
-          } else {
-            selectedTypes.remove(text);
-          }
-        }
-        if (level == 2) {
-          TreeItem parentItem = ti.getParentItem();
-          String parentName = parentItem.getText();
-          if (!selectedTypes.keySet().contains(parentName)) {
-            selectedTypes.put(parentName, new HashSet<String>());
-          }
-          Set<String> set = selectedTypes.get(parentName);
-          if (set == null) {
-            set = new HashSet<String>();
-            selectedTypes.put(parentName, set);
-          }
-          if (ti.getChecked()) {
-            if (!set.contains(text)) {
-              set.add(text);
-            }
-            parentItem.setChecked(true);
-          } else {
-            set.remove(text);
-          }
-        }
-      }
-    }
-
-  }
-
-  private int getLevel(TreeItem ti) {
-    int level = 1;
-    TreeItem parent = ti.getParentItem();
-    while (parent != null) {
-      parent = parent.getParentItem();
-      level++;
-    }
-    return level;
-  }
-
-  protected Label createWideLabel(Composite parent, String message) {
-    Label label = null;
-    label = new Label(parent, SWT.WRAP);
-    label.setText(null != message ? message : "");
-    GridData data = new GridData(GridData.FILL_HORIZONTAL);
-    data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
-    data.verticalAlignment = SWT.CENTER;
-    label.setLayoutData(data);
-    return label;
-  }
-
-  protected Text newText(Composite parent, int style, String tip) {
-    Text t = new Text(parent, style | SWT.BORDER);
-    t.setToolTipText(tip);
-    t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    t.addListener(SWT.KeyUp, this);
-    t.addListener(SWT.MouseUp, this);
-    return t;
-  }
-
-  protected Tree newTree(Composite parent, int style) {
-    Tree tree = new Tree(parent, style | SWT.BORDER | swtTreeModeFlag);
-    GridData gd = new GridData(GridData.FILL_BOTH);
-    tree.setLayoutData(gd);
-    tree.addListener(SWT.Selection, this);
-    tree.addListener(SWT.KeyUp, this);
-    tree.addListener(SWT.MouseDown, this);
-    return tree;
-  }
-
-  public boolean isValid() {
-    return true;
-  }
-
-  @Override
-  protected boolean isResizable() {
-    return true;
-  }
-
-  @Override
-  protected Point getInitialSize() {
-    return new Point(450, 450);
-  }
-
-  public Map<String, Set<String>> getSelectedTypes() {
-    return selectedTypes;
-  }
-
-  public Set<String> getSelectedTypesSet() {
-    return selectedTypes.keySet();
-  }
-
-  public void setSelectedTypes(Map<String, Set<String>> selectedTypes) {
-    this.selectedTypes = selectedTypes;
-  }
-
-  private void displayFilteredTypes(String aTypeName) {
-    tree.setRedraw(false);
-    tree.removeAll();
-    String topEntry = "";
-    aTypeName = aTypeName.toLowerCase();
-    for (String type : allTypes) {
-
-      String candidateTypeName = type.toLowerCase();
-      if (StringUtils.isBlank(aTypeName)
-              || candidateTypeName.toLowerCase().indexOf(aTypeName.toLowerCase()) != -1) {
-
-        if (StringUtils.isEmpty(topEntry)) {
-          topEntry = type;
-        }
-        TreeItem item = new TreeItem(tree, SWT.NULL);
-        item.setText(type);
-        if (selectedTypes.keySet().contains(item.getText())) {
-          item.setChecked(true);
-        }
-        if (featureMode) {
-          List<String> featuresType = allTypesMapping.get(type);
-          Set<String> selectedFeaturesType = selectedTypes.get(type);
-          for (String feature : featuresType) {
-            TreeItem itemFeat = new TreeItem(item, SWT.NULL);
-            itemFeat.setText(feature);
-            if (selectedFeaturesType != null) {
-              if (selectedFeaturesType.contains(feature)) {
-                itemFeat.setChecked(true);
-              }
-            }
-          }
-        }
-      }
-    }
-    tree.setRedraw(true);
-  }
-
-  public String getChoosenType() {
-    return this.choosenType;
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectUncheckedTypesHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectUncheckedTypesHandler.java
deleted file mode 100644
index 1201785..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SelectUncheckedTypesHandler.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.ruta.check;
-
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.util.InvalidXMLException;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class SelectUncheckedTypesHandler implements IHandler {
-
-  public void addHandlerListener(IHandlerListener e) {
-    return;
-  }
-
-  public void dispose() {
-    return;
-  }
-
-  public Object execute(ExecutionEvent event) throws ExecutionException {
-    AnnotationCheckView acView;
-    try {
-      acView = (AnnotationCheckView) HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench()
-              .getActiveWorkbenchWindow().getActivePage().showView(AnnotationCheckView.ID);
-      AnnotationCheckComposite composite = (AnnotationCheckComposite) acView.getComposite();
-      TypeSystemDescription tsd = composite.getTypeSystemDescription();
-      tsd.resolveImports();
-      Display display = Display.getDefault();
-      Shell shell = new Shell(display);
-      shell.setText("Unchecked Types");
-      SelectTypesDialogCheck dialog = new SelectTypesDialogCheck(shell, tsd,
-              composite.getUncheckedTypes(), false, SWT.MULTI, true);
-      if (dialog.open() == Window.OK) {
-        composite.setUncheckedTypes(dialog.getSelectedTypesSet());
-      }
-    } catch (InvalidXMLException e) {
-      RutaAddonsPlugin.error(e);
-      return Status.CANCEL_STATUS;
-    } catch (PartInitException e) {
-      RutaAddonsPlugin.error(e);
-      return Status.CANCEL_STATUS;
-    }
-    return Status.OK_STATUS;
-  }
-
-  public boolean isEnabled() {
-    return true;
-  }
-
-  public boolean isHandled() {
-    return true;
-  }
-
-  public void removeHandlerListener(IHandlerListener arg0) {
-    return;
-  }
-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SetAnnotationModeContributionFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SetAnnotationModeContributionFactory.java
deleted file mode 100644
index c2135dc..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SetAnnotationModeContributionFactory.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.HashMap;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.eclipse.swt.SWT;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.internal.Workbench;

-import org.eclipse.ui.menus.CommandContributionItem;

-import org.eclipse.ui.menus.CommandContributionItemParameter;

-import org.eclipse.ui.menus.ExtensionContributionFactory;

-import org.eclipse.ui.menus.IContributionRoot;

-import org.eclipse.ui.services.IServiceLocator;

-

-public class SetAnnotationModeContributionFactory extends ExtensionContributionFactory {

-

-  public SetAnnotationModeContributionFactory() {

-    super();

-  }

-

-  @Override

-  public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) {

-    AnnotationCheckView acView;

-    try {

-      acView = (AnnotationCheckView) Workbench.getInstance().getActiveWorkbenchWindow()

-              .getActivePage().showView(AnnotationCheckView.ID);

-      AnnotationCheckComposite composite = acView.getComposite();

-      List<String> typesToCheck = new LinkedList<String>(composite.getCheckedTypes().keySet());

-      CommandContributionItemParameter pd = new CommandContributionItemParameter(serviceLocator,

-              "", SetAnnotationModeHandler.MODE, SWT.PUSH);

-      HashMap<String, String> mapd = new HashMap<String, String>();

-      pd.label = "uima.tcas.Annotation";

-      mapd.put(SetAnnotationModeHandler.TYPE, pd.label);

-      pd.parameters = mapd;

-      pd.icon = RutaAddonsPlugin.getImageDescriptor("icons/font_add.png");

-      CommandContributionItem itemp = new CommandContributionItem(pd);

-      itemp.setVisible(true);

-      additions.addContributionItem(itemp, null);

-      for (String each : typesToCheck) {

-        CommandContributionItemParameter p = new CommandContributionItemParameter(serviceLocator,

-                "", SetAnnotationModeHandler.MODE, SWT.PUSH);

-        p.label = each;

-        p.icon = RutaAddonsPlugin.getImageDescriptor("icons/font_add.png");

-        HashMap<String, String> map = new HashMap<String, String>();

-        map.put(SetAnnotationModeHandler.TYPE, p.label);

-        p.parameters = map;

-        CommandContributionItem item = new CommandContributionItem(p);

-        item.setVisible(true);

-        additions.addContributionItem(item, null);

-      }

-    } catch (PartInitException e) {

-      RutaAddonsPlugin.error(e);

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SetAnnotationModeHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SetAnnotationModeHandler.java
deleted file mode 100644
index 6769ce0..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/SetAnnotationModeHandler.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.util.Map;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.ui.IWorkbenchWindow;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.commands.ICommandService;

-import org.eclipse.ui.commands.IElementUpdater;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.eclipse.ui.menus.UIElement;

-

-public class SetAnnotationModeHandler implements IHandler, IElementUpdater {

-

-  public static final String TYPE = SetAnnotationModeHandler.MODE + ".type";

-

-  public static final String MODE = "org.apache.uima.ruta.check.mode";

-

-  private String mode = "Annotation";

-

-  public void addHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    String typeString = event.getParameter(TYPE);

-    if (typeString != null) {

-

-      AnnotationCheckView acView;

-      try {

-        IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);

-        acView = (AnnotationCheckView) window.getActivePage().showView(AnnotationCheckView.ID);

-

-        AnnotationCheckComposite composite = (AnnotationCheckComposite) acView.getComposite();

-        composite.setAnnotationMode(typeString);

-        String[] split = typeString.split("[.]");

-        mode = split[split.length - 1];

-        ICommandService commandService = (ICommandService) window.getService(ICommandService.class);

-        if (commandService != null) {

-          commandService.refreshElements("org.apache.uima.ruta.check.mode", null);

-        }

-      } catch (PartInitException e) {

-        RutaAddonsPlugin.error(e);

-        return Status.CANCEL_STATUS;

-      }

-    }

-    return Status.OK_STATUS;

-  }

-

-  public void updateElement(UIElement element, @SuppressWarnings("rawtypes")

-  Map parameters) {

-    if (parameters.get(TYPE) == null) {

-      element.setText(mode);

-    }

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/UpdateTaskHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/UpdateTaskHandler.java
deleted file mode 100644
index b989606..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/UpdateTaskHandler.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileNotFoundException;

-import java.io.FilenameFilter;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.LinkedList;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.caseditor.ide.TypeSystemLocationPropertyPage;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.metadata.FsIndexDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.jface.viewers.TreePath;

-import org.eclipse.jface.viewers.TreeSelection;

-import org.eclipse.jface.viewers.TreeViewer;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.xml.sax.SAXException;

-

-public class UpdateTaskHandler implements IHandler {

-

-  private class CheckAnnotationUpdateTaskJob extends Job {

-

-    private String documentSource;

-

-    private String typeSystem;

-

-    private AnnotationCheckComposite composite;

-

-    private String documentSink;

-

-    private AnnotationCheckTreeNode previousSelection;

-

-    CheckAnnotationUpdateTaskJob(String documentSource, String documentSink, String typeSystem,

-            AnnotationCheckComposite composite, AnnotationCheckTreeNode previousSelection) {

-      super("Update annotation check task...");

-      this.documentSource = documentSource;

-      this.documentSink = documentSink;

-      this.typeSystem = typeSystem;

-      this.composite = composite;

-      this.previousSelection = previousSelection;

-    }

-

-    CheckAnnotationUpdateTaskJob(AnnotationCheckComposite composite,

-            AnnotationCheckTreeNode previousSelection) {

-      this(composite.getDocumentSource(), composite.getDocumentSink(), composite.getPathToTypeSystem(),

-              composite, previousSelection);

-    }

-

-    @Override

-    public IStatus run(IProgressMonitor monitor) {

-      Map<String, Set<String>> typesToCheck = composite.getCheckedTypes();

-

-      File dir = new File(documentSource);

-      File[] listFiles = dir.listFiles(new FilenameFilter() {

-        @Override

-        public boolean accept(File file, String string) {

-          return string.endsWith(".xmi");

-        }

-      });

-      if (listFiles == null) {

-        return Status.CANCEL_STATUS;

-      }

-

-      File dataFile = new File(documentSink, "data.xml");

-      List<CheckDocument> docs = new ArrayList<CheckDocument>();

-      try {

-        docs = XMLUtils.read(dataFile);

-      } catch (SAXException e) {

-        RutaAddonsPlugin.error(e);

-      } catch (IOException e) {

-        RutaAddonsPlugin.error(e);

-      }

-      setDefaultTypeSystem(documentSource, typeSystem);

-      TypeSystemDescription tsd = null;

-      try {

-        tsd = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-                new XMLInputSource(typeSystem));

-        tsd.resolveImports();

-      } catch (InvalidXMLException e) {

-        RutaAddonsPlugin.error(e);

-      } catch (IOException e) {

-        RutaAddonsPlugin.error(e);

-      }

-      CAS cas = null;

-      try {

-        cas = CasCreationUtils.createCas(tsd, null, new FsIndexDescription[0]);

-      } catch (ResourceInitializationException e) {

-        RutaAddonsPlugin.error(e);

-      }

-

-      if (tsd == null || cas == null) {

-        return Status.CANCEL_STATUS;

-      }

-      TreePath treePath = null;

-      final IAnnotationCheckTreeNode root = new AnnotationCheckRootNode();

-      for (File file : listFiles) {

-        cas.reset();

-        try {

-          XmiCasDeserializer.deserialize(new FileInputStream(file), cas, true);

-        } catch (FileNotFoundException e) {

-          RutaAddonsPlugin.error(e);

-        } catch (SAXException e) {

-          RutaAddonsPlugin.error(e);

-        } catch (IOException e) {

-          RutaAddonsPlugin.error(e);

-        }

-        CheckDocument element = getCheckDocument(docs, file.getAbsolutePath());

-        boolean documentAlreadyDone = documentAlreadyDoneforTypes(element, new LinkedList<String>(

-                typesToCheck.keySet()));

-        if (!documentAlreadyDone) {

-          AnnotationCheckTreeNode node = new AnnotationCheckTreeNode(root, element);

-          root.addChild(node);

-          AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex();

-          for (AnnotationFS each : annotationIndex) {

-            boolean annotationAlreadyDoneforTypes = annotationAlreadyDoneforTypes(each,

-                    typesToCheck.keySet(), element.checkedTypes);

-            if (!annotationAlreadyDoneforTypes) {

-              CheckElement ac = new CheckAnnotation(each);

-              AnnotationCheckTreeNode anode = new AnnotationCheckTreeNode(node, ac);

-              for (String feature : typesToCheck.get(each.getType().getName())) {

-                anode.addChild(new FeatureCheckTreeNode(anode, each.getType().getFeatureByBaseName(

-                        feature), each.getFeatureValueAsString(each.getType().getFeatureByBaseName(

-                        feature))));

-              }

-              if (treePath == null) {

-                treePath = new TreePath(new Object[] { root, node, anode });

-              }

-              node.addChild(anode);

-            }

-          }

-          if (treePath == null) {

-            treePath = new TreePath(new Object[] { root, node });

-          }

-        }

-      }

-      if (root.getChildren().length == 0) {

-        return Status.OK_STATUS;

-      }

-      if (previousSelection != null) {

-        CheckElement element = previousSelection.getElement();

-        TreePath oldPath = getPathTo(element, root);

-        if (oldPath != null) {

-          treePath = oldPath;

-        }

-      }

-      final TreeSelection firstSelection = new TreeSelection(treePath);

-

-      cas.release();

-      composite.setOldDocs(docs);

-      composite.getDisplay().asyncExec(new Runnable() {

-        @Override

-        public void run() {

-          TreeViewer treeView = composite.getTreeViewer();

-          treeView.setInput(root);

-          treeView.setSelection(firstSelection, true);

-          treeView.expandToLevel(

-                  ((AnnotationCheckTreeNode) firstSelection.getFirstElement()).getParent(),

-                  TreeViewer.ALL_LEVELS);

-        }

-      });

-

-      return Status.OK_STATUS;

-    }

-

-    private TreePath getPathTo(CheckElement element, IAnnotationCheckTreeNode root) {

-      AnnotationCheckTreeNode[] children = root.getChildren();

-      for (AnnotationCheckTreeNode eachDocNode : children) {

-        if (element instanceof CheckAnnotation) {

-          AnnotationCheckTreeNode[] children2 = eachDocNode.getChildren();

-          for (AnnotationCheckTreeNode eachANode : children2) {

-            if (isSameElement(eachANode.getElement(), element)) {

-              return new TreePath(new Object[] { root, eachDocNode, eachANode });

-            }

-          }

-        } else {

-          if (isSameElement(eachDocNode.getElement(), element)) {

-            return new TreePath(new Object[] { root, eachDocNode });

-          }

-        }

-

-      }

-      return null;

-    }

-

-    private boolean isSameElement(CheckElement e1, CheckElement e2) {

-      if (e1 == null || e2 == null) {

-        return false;

-      }

-      if (e1 instanceof CheckAnnotation && e2 instanceof CheckAnnotation) {

-        CheckAnnotation ca1 = (CheckAnnotation) e1;

-        CheckAnnotation ca2 = (CheckAnnotation) e2;

-        return ca1.getBegin() == ca2.getBegin() && ca1.getEnd() == ca2.getEnd()

-                && ca1.getTypeName().equals(ca2.getTypeName());

-      }

-      if (e1 instanceof CheckDocument && e2 instanceof CheckDocument) {

-        CheckDocument cd1 = (CheckDocument) e1;

-        CheckDocument cd2 = (CheckDocument) e2;

-        return cd1.source.equals(cd2.source);

-      }

-      return false;

-    }

-

-    private boolean documentAlreadyDoneforTypes(CheckDocument element, List<String> typesToCheck) {

-      if (element.checkedTypes.isEmpty() && !typesToCheck.isEmpty()) {

-        return false;

-      }

-

-      boolean allCovered = true;

-      for (String each : typesToCheck) {

-        allCovered &= element.checkedTypes.contains(each);

-      }

-      return allCovered;

-    }

-

-    private boolean annotationAlreadyDoneforTypes(AnnotationFS each,

-            Collection<String> typesToCheck, Collection<String> alreadyDone) {

-      String name = each.getType().getName();

-      if (alreadyDone.contains(name)) {

-        return true;

-      }

-      return !typesToCheck.contains(name);

-    }

-

-    private CheckDocument getCheckDocument(List<CheckDocument> docs, String absolutePath) {

-      for (CheckDocument checkDocument : docs) {

-        if (checkDocument.source.equals(absolutePath)) {

-          return checkDocument;

-        }

-      }

-      return new CheckDocument(absolutePath);

-    }

-

-    public void setDefaultTypeSystem(String documentSource, String typeSystemLocation) {

-      IFile dsFile = CheckAnnotationUtils.getIFile(documentSource);

-      IFile tsFile = CheckAnnotationUtils.getIFile(typeSystemLocation);

-      IProject project = dsFile.getProject();

-      String portableString = tsFile.getFullPath().toPortableString();

-      TypeSystemLocationPropertyPage.setTypeSystemLocation(project, portableString);

-    }

-

-  }

-

-  @Override

-  public void addHandlerListener(IHandlerListener arg0) {

-  }

-

-  @Override

-  public void dispose() {

-  }

-

-  @Override

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    AnnotationCheckView acView;

-    try {

-      acView = (AnnotationCheckView) HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench()

-              .getActiveWorkbenchWindow().getActivePage().showView(AnnotationCheckView.ID);

-      AnnotationCheckComposite composite = acView.getComposite();

-      TreeSelection selection = (TreeSelection) composite.getTreeViewer().getSelection();

-      AnnotationCheckTreeNode previousSelection = (AnnotationCheckTreeNode) selection

-              .getFirstElement();

-      CheckAnnotationUpdateTaskJob job = new CheckAnnotationUpdateTaskJob(composite,

-              previousSelection);

-      job.schedule();

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-      return Status.CANCEL_STATUS;

-    }

-    return Status.OK_STATUS;

-  }

-

-  @Override

-  public boolean isEnabled() {

-    return true;

-  }

-

-  @Override

-  public boolean isHandled() {

-    return true;

-  }

-

-  @Override

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/XMLUtils.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/XMLUtils.java
deleted file mode 100644
index ec15b6b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/XMLUtils.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- * 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.ruta.check;

-

-import java.io.File;

-import java.io.FileReader;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.util.FileUtils;

-import org.xml.sax.InputSource;

-import org.xml.sax.SAXException;

-import org.xml.sax.XMLReader;

-import org.xml.sax.helpers.XMLReaderFactory;

-

-public class XMLUtils {

-

-  public static void write(List<CheckDocument> docs, File file) throws IOException  {

-    StringBuilder sb = new StringBuilder();

-    sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

-    sb.append("\n");

-    sb.append("<documents>");

-    sb.append("\n");

-    for (CheckDocument checkDocument : docs) {

-      sb.append(checkDocument.toXML());

-    }

-    sb.append("</documents>");

-    FileUtils.saveString2File(sb.toString(), file, "UTF-8");

-  }

-  

-  public static List<CheckDocument> read(File file) throws SAXException, IOException  {

-    if(file == null || !file.exists()) {

-      return new ArrayList<CheckDocument>();

-    }

-    XMLReader xmlReader = XMLReaderFactory.createXMLReader();

-    FileReader reader = new FileReader(file);

-    InputSource inputSource = new InputSource(reader);

-    CheckDocumentsContentHandler handler = new CheckDocumentsContentHandler();

-    xmlReader.setContentHandler(handler);

-    xmlReader.parse(inputSource);

-    return handler.getCheckDocuments();

-  }

-  

-  

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/ExplainConstants.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/ExplainConstants.java
deleted file mode 100755
index 3a416d6..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/ExplainConstants.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * 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.ruta.explain;

-

-import org.apache.uima.ruta.engine.RutaEngine;

-

-public class ExplainConstants {

-  public static final String BASIC_TYPE = RutaEngine.BASIC_TYPE;

-

-  public static final String SCRIPT_APPLY_TYPE = "org.apache.uima.ruta.type.DebugScriptApply";

-

-  public static final String BLOCK_APPLY_TYPE = "org.apache.uima.ruta.type.DebugBlockApply";

-

-  public static final String RULE_APPLY_TYPE = "org.apache.uima.ruta.type.DebugRuleApply";

-

-  public static final String RULE_MATCH_TYPE = "org.apache.uima.ruta.type.DebugRuleMatch";

-

-  public static final String MATCHED_RULE_MATCH_TYPE = "org.apache.uima.ruta.type.DebugMatchedRuleMatch";

-

-  public static final String FAILED_RULE_MATCH_TYPE = "org.apache.uima.ruta.type.DebugFailedRuleMatch";

-

-  public static final String RULE_ELEMENT_MATCH_TYPE = "org.apache.uima.ruta.type.DebugRuleElementMatch";

-

-  public static final String RULE_ELEMENT_MATCHES_TYPE = "org.apache.uima.ruta.type.DebugRuleElementMatches";

-

-  public static final String EVAL_CONDITION_TYPE = "org.apache.uima.ruta.type.DebugEvaluatedCondition";

-

-  public static final String BASE_CONDITION = "baseCondition";

-

-  public static final String MATCHES = "matches";

-

-  public static final String ELEMENTS = "elements";

-

-  public static final String MATCHED = "matched";

-

-  public static final String DELEGATES = "delegates";

-

-  public static final String RULES = "rules";

-

-  public static final String INNER_APPLY = "innerApply";

-

-  public static final String CONDITIONS = "conditions";

-

-  public static final String VALUE = "value";

-

-  public static final String APPLIED = "applied";

-

-  public static final String TRIED = "tried";

-

-  public static final String ELEMENT = "element";

-

-  public static final String RULE_ANCHOR = "ruleAnchor";

-

-  public static final String TIME = "time";

-  

-  public static final String ID = "id";

-  

-  public static final String SCRIPT = "script";

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/ExplainUtils.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/ExplainUtils.java
deleted file mode 100644
index f97f5b1..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/ExplainUtils.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta.explain;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.ui.editor.RutaEditor;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.IWorkbenchPage;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.part.FileEditorInput;

-

-public class ExplainUtils {

-

-  public static void openInRutaEditor(IPath resultPath, int id) {

-    if (resultPath == null) {

-      return;

-    }

-    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();

-    IWorkspace workspace = ResourcesPlugin.getWorkspace();

-    IFile file = workspace.getRoot().getFileForLocation(resultPath);

-    try {

-      IEditorPart openEditor = page.openEditor(new FileEditorInput(file), "org.apache.uima.ruta.ide.ui.editor.RutaEditor");

-      RutaEditor tme = (RutaEditor) openEditor;

-      tme.highlightElement(id);

-    } catch (PartInitException e) {

-      RutaAddonsPlugin.error(e);

-    }

-  }

-  

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyTreeContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyTreeContentProvider.java
deleted file mode 100755
index 8f4b627..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyTreeContentProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*

- * 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.ruta.explain.apply;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.explain.tree.ExplainRootNode;

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.eclipse.jface.viewers.ITreeContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-public class ApplyTreeContentProvider implements ITreeContentProvider {

-

-  public Object[] getChildren(Object parentElement) {

-    if (parentElement instanceof IExplainTreeNode) {

-      List<Object> result = new ArrayList<Object>();

-      IExplainTreeNode debugNode = (IExplainTreeNode) parentElement;

-      for (IExplainTreeNode each : debugNode.getChildren()) {

-        if (!(each instanceof ExplainRootNode)) {

-          result.add(each);

-        }

-      }

-      return result.toArray();

-    }

-    return null;

-  }

-

-  public Object getParent(Object element) {

-    if (element instanceof IExplainTreeNode) {

-      return ((IExplainTreeNode) element).getParent();

-    }

-    return null;

-  }

-

-  public Object[] getElements(Object parentElement) {

-    return getChildren(parentElement);

-  }

-

-  public boolean hasChildren(Object parentElement) {

-    if (parentElement instanceof IExplainTreeNode) {

-      IExplainTreeNode debugNode = (IExplainTreeNode) parentElement;

-      for (Object each : debugNode.getChildren()) {

-        if (!(each instanceof ExplainRootNode)) {

-          return true;

-        }

-      }

-    }

-    return false;

-  }

-

-  public void dispose() {

-  }

-

-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyTreeLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyTreeLabelProvider.java
deleted file mode 100755
index bf579f2..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyTreeLabelProvider.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*

- * 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.ruta.explain.apply;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.ruta.explain.ExplainConstants;

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-public class ApplyTreeLabelProvider extends LabelProvider implements ILabelProvider {

-

-  private ApplyViewPage owner;

-

-  ImageDescriptor blockApply;

-

-  public ApplyTreeLabelProvider(ApplyViewPage owner) {

-    super();

-    this.owner = owner;

-  }

-

-  @Override

-  public Image getImage(Object element) {

-    if (element instanceof IExplainTreeNode) {

-      IExplainTreeNode debugNode = (IExplainTreeNode) element;

-      FeatureStructure fs = debugNode.getFeatureStructure();

-      if (fs != null) {

-        String name = fs.getType().getName();

-        if (name.equals(ExplainConstants.RULE_APPLY_TYPE)) {

-          if (debugNode.getChildren().size() >= 3) {

-            name += "Delegate";

-          }

-        }

-        return owner.getImage(name);

-      }

-    }

-    return null;

-  }

-

-  @Override

-  public String getText(Object element) {

-

-    String result = "error";

-    if (element instanceof IExplainTreeNode) {

-      IExplainTreeNode debugNode = (IExplainTreeNode) element;

-      TypeSystem ts = debugNode.getTypeSystem();

-

-      Type ruleType = ts.getType(ExplainConstants.RULE_APPLY_TYPE);

-      FeatureStructure fs = debugNode.getFeatureStructure();

-      if (fs != null && ts.subsumes(ruleType, fs.getType())) {

-        Feature f1 = ruleType.getFeatureByBaseName(ExplainConstants.APPLIED);

-        int v1 = fs.getIntValue(f1);

-        Feature f2 = ruleType.getFeatureByBaseName(ExplainConstants.TRIED);

-        int v2 = fs.getIntValue(f2);

-        Feature f3 = ruleType.getFeatureByBaseName(ExplainConstants.ELEMENT);

-        String v3 = fs.getStringValue(f3);

-        v3 = v3.replaceAll("[\\n\\r]", "");

-        Feature f4 = ruleType.getFeatureByBaseName(ExplainConstants.TIME);

-        long v4 = fs.getLongValue(f4);

-        String time = "";

-        if (v4 > 0.0) {

-          double took = v4 / 1000.0;

-          time = " [" + took + "s";

-          IExplainTreeNode parentNode = debugNode.getParent();

-          if (parentNode != null) {

-            FeatureStructure parent = parentNode.getFeatureStructure();

-            if (parent != null) {

-              long parentTime = parent.getLongValue(f4);

-              double percent = (took / (parentTime / 1000.0)) * 100.0;

-              percent = Math.round(percent * 100.0) / 100.0;

-              time += "|" + percent + "%]";

-            } else {

-              time += "]";

-            }

-          } else {

-            time += "]";

-          }

-

-        }

-        result = "[" + v1 + "/" + v2 + "] " + v3 + time;

-      }

-    }

-    return result;

-

-  }

-

-  public static String escape(String str) {

-    String result = str.replaceAll("\\\\", "\\\\\\\\");

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyView.java
deleted file mode 100755
index 3480745..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyView.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.explain.apply;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class ApplyView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.apply";

-

-  public ApplyView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      ApplyViewPage page = new ApplyViewPage((AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyViewPage.java
deleted file mode 100755
index a5f6a81..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyViewPage.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*

- * 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.ruta.explain.apply;

-

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.ICasDocument;

-import org.apache.uima.caseditor.editor.ICasDocumentListener;

-import org.apache.uima.caseditor.editor.ICasEditorInputListener;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.explain.ExplainConstants;

-import org.apache.uima.ruta.explain.ExplainUtils;

-import org.apache.uima.ruta.explain.tree.ExplainTree;

-import org.apache.uima.ruta.explain.tree.RuleApplyNode;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.DoubleClickEvent;

-import org.eclipse.jface.viewers.IDoubleClickListener;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.TreeSelection;

-import org.eclipse.jface.viewers.TreeViewer;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.MouseEvent;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.ui.IEditorInput;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.part.FileEditorInput;

-import org.eclipse.ui.part.IPageSite;

-import org.eclipse.ui.part.Page;

-

-public class ApplyViewPage extends Page implements ISelectionListener, ICasEditorInputListener,

-        IDoubleClickListener, ICasDocumentListener {

-

-  protected TreeViewer viewer;

-

-  protected int current = 0;

-

-  protected Map<String, Image> images;

-

-  protected AnnotationEditor editor;

-

-  protected ICasDocument document;

-

-  public ApplyViewPage(AnnotationEditor editor) {

-    super();

-    this.editor = editor;

-    this.document = editor.getDocument();

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/arrow_refresh.png");

-    image = desc.createImage();

-    name = ExplainConstants.BLOCK_APPLY_TYPE;

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/arrow_right.png");

-    image = desc.createImage();

-    name = ExplainConstants.RULE_APPLY_TYPE;

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/arrow_branch.png");

-    image = desc.createImage();

-    name = ExplainConstants.RULE_APPLY_TYPE + "Delegate";

-    images.put(name, image);

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  @Override

-  public Control getControl() {

-    return viewer.getControl();

-  }

-

-  @Override

-  public void setFocus() {

-    viewer.getControl().setFocus();

-  }

-

-  @Override

-  public void init(IPageSite pageSite) {

-    super.init(pageSite);

-  }

-

-  public TreeViewer getTreeViewer() {

-    return viewer;

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    viewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);

-    viewer.setContentProvider(new ApplyTreeContentProvider());

-    viewer.setLabelProvider(new ApplyTreeLabelProvider(this));

-

-    document.addChangeListener(this);

-

-    ExplainTree tree = new ExplainTree(document.getCAS());

-    viewer.setAutoExpandLevel(2);

-    viewer.setInput(tree.getRoot());

-    viewer.addDoubleClickListener(this);

-    getSite().setSelectionProvider(viewer);

-    getSite().getPage().addSelectionListener(this);

-    editor.addCasEditorInputListener(this);

-    viewer.refresh();

-  }

-

-  public void doubleClick(DoubleClickEvent event) {

-    ISelection selection = event.getSelection();

-    if (!selection.isEmpty() && selection instanceof TreeSelection) {

-      TreeSelection s = (TreeSelection) selection;

-      Object firstElement = s.getFirstElement();

-      if (firstElement instanceof RuleApplyNode) {

-        RuleApplyNode node = (RuleApplyNode) firstElement;

-        FeatureStructure fs = node.getFeatureStructure();

-        if (fs.getType().getName().equals(ExplainConstants.RULE_APPLY_TYPE)) {

-          Type t = fs.getType();

-          Feature featureId = t.getFeatureByBaseName(ExplainConstants.ID);

-          Feature featureScript = t.getFeatureByBaseName(ExplainConstants.SCRIPT);

-          int id = fs.getIntValue(featureId);

-          String script = fs.getStringValue(featureScript);

-          IEditorInput editorInput = editor.getEditorInput();

-          if (editorInput instanceof FileEditorInput) {

-            FileEditorInput fei = (FileEditorInput) editorInput;

-            IPath path = fei.getPath();

-            IWorkspace workspace = ResourcesPlugin.getWorkspace();

-            IWorkspaceRoot workspaceRoot = workspace.getRoot();

-            IFile iFile = workspaceRoot.getFileForLocation(path);

-            if (iFile != null) {

-              IProject project = iFile.getProject();

-              IScriptProject scriptProject = DLTKCore.create(project);

-              List<IFolder> allScriptFolders;

-              try {

-                allScriptFolders = RutaProjectUtils.getAllScriptFolders(scriptProject);

-                List<String> folders = RutaProjectUtils.getFolderLocations(allScriptFolders);

-                String locate = RutaEngine.locate(script, folders.toArray(new String[0]),

-                        RutaEngine.SCRIPT_FILE_EXTENSION);

-                IPath locatedPath = new Path(locate);

-                ExplainUtils.openInRutaEditor(locatedPath, id);

-              } catch (CoreException e) {

-                RutaAddonsPlugin.error(e);

-              }

-            }

-          }

-        }

-      }

-    }

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    getSite().getPage().removeSelectionListener(this);

-    editor.removeCasEditorInputListener(this);

-    if (images != null) {

-      for (Image each : images.values()) {

-        each.dispose();

-      }

-    }

-  }

-

-  public void mouseDown(final MouseEvent event) {

-

-  }

-

-  public void mouseUp(final MouseEvent event) {

-

-  }

-

-  public void mouseDoubleClick(final MouseEvent event) {

-

-  }

-

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-

-  }

-

-  public void casDocumentChanged(IEditorInput oldInput, ICasDocument oldDocument,

-          IEditorInput newInput, ICasDocument newDocument) {

-    // editor.removeCasEditorInputListener(this);

-    // document = newDocument;

-    // editor.addCasEditorInputListener(this);

-    // ExplainTree tree = new ExplainTree(document.getCAS());

-    // viewer.setInput(tree.getRoot());

-    // viewer.refresh();

-

-  }

-

-  public void added(FeatureStructure newFeatureStructure) {

-

-  }

-

-  public void added(Collection<FeatureStructure> newFeatureStructure) {

-

-  }

-

-  public void removed(FeatureStructure deletedFeatureStructure) {

-

-  }

-

-  public void removed(Collection<FeatureStructure> deletedFeatureStructure) {

-

-  }

-

-  public void updated(FeatureStructure featureStructure) {

-

-  }

-

-  public void updated(Collection<FeatureStructure> featureStructure) {

-

-  }

-

-  public void changed() {

-    Display.getDefault().syncExec(new Runnable() {

-      public void run() {

-        reloadTree();

-      }

-

-    });

-  }

-

-  private void reloadTree() {

-    ExplainTree tree = new ExplainTree(document.getCAS());

-    viewer.setInput(tree.getRoot());

-  }

-

-  public void viewChanged(String oldViewName, String newViewName) {

-    changed();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByContentProvider.java
deleted file mode 100644
index 1725a5a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByContentProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.explain.createdBy;

-

-import org.eclipse.jface.viewers.ITreeContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-public class CreatedByContentProvider implements ITreeContentProvider {

-

-  public void dispose() {

-

-  }

-

-  public void inputChanged(Viewer arg0, Object arg1, Object arg2) {

-

-  }

-

-  public Object[] getChildren(Object arg0) {

-    return new Object[0];

-  }

-

-  public Object[] getElements(Object arg0) {

-    return new Object[]{arg0};

-  }

-

-  public Object getParent(Object arg0) {

-    return null;

-  }

-

-  public boolean hasChildren(Object arg0) {

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByLabelProvider.java
deleted file mode 100644
index e51b652..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByLabelProvider.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * 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.ruta.explain.createdBy;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.ruta.visitor.CreatedByVisitor;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-public class CreatedByLabelProvider extends LabelProvider implements ILabelProvider {

-

-  private CreatedByViewPage owner;

-

-  public CreatedByLabelProvider(CreatedByViewPage owner) {

-    super();

-    this.owner = owner;

-  }

-

-  @Override

-  public Image getImage(Object element) {

-    return owner.getImage(CreatedByViewPage.RUTA_RULE);

-  }

-

-  @Override

-  public String getText(Object element) {

-    if (element instanceof FeatureStructure) {

-      FeatureStructure fs = (FeatureStructure) element;

-      CAS cas = fs.getCAS();

-      Type t = cas.getTypeSystem().getType(CreatedByVisitor.TYPE);

-      Feature featureRule = t.getFeatureByBaseName(CreatedByVisitor.FEATURE_RULE);

-      Feature featureScript = t.getFeatureByBaseName(CreatedByVisitor.FEATURE_SCRIPT);

-      String rule = fs.getStringValue(featureRule);

-      String script = fs.getStringValue(featureScript);

-      String result = rule ;

-      if(!StringUtils.isEmpty(script)){

-        result += " (in " + script + ")";

-      }

-      return result;

-    }

-    return element.toString();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByView.java
deleted file mode 100644
index f56f198..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByView.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.explain.createdBy;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class CreatedByView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.createdBy";

-

-  public CreatedByView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      CreatedByViewPage page = new CreatedByViewPage((AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByViewPage.java
deleted file mode 100644
index 4ecc3c6..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByViewPage.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*

- * 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.ruta.explain.createdBy;

-

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.FeatureStructureSelection;

-import org.apache.uima.caseditor.editor.ICasDocument;

-import org.apache.uima.caseditor.editor.ICasEditorInputListener;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.explain.ExplainUtils;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.visitor.CreatedByVisitor;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.DoubleClickEvent;

-import org.eclipse.jface.viewers.IDoubleClickListener;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.TreeSelection;

-import org.eclipse.jface.viewers.TreeViewer;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.MouseEvent;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IEditorInput;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.part.FileEditorInput;

-import org.eclipse.ui.part.IPageSite;

-import org.eclipse.ui.part.Page;

-

-public class CreatedByViewPage extends Page implements ISelectionListener, ICasEditorInputListener,

-        IDoubleClickListener {

-

-  public static final String RUTA_RULE = "RutaRule";

-

-  protected TreeViewer viewer;

-

-  protected int current = 0;

-

-  protected Map<String, Image> images;

-

-  protected AnnotationEditor editor;

-

-  protected ICasDocument document;

-

-  public CreatedByViewPage(AnnotationEditor editor) {

-    super();

-    this.editor = editor;

-    this.document = editor.getDocument();

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/ruta_obj.png");

-    image = desc.createImage();

-    name = RUTA_RULE;

-    images.put(name, image);

-

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  @Override

-  public Control getControl() {

-    return viewer.getControl();

-  }

-

-  @Override

-  public void setFocus() {

-    viewer.getControl().setFocus();

-  }

-

-  @Override

-  public void init(IPageSite pageSite) {

-    super.init(pageSite);

-  }

-

-  public TreeViewer getTreeViewer() {

-    return viewer;

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    viewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);

-    viewer.setLabelProvider(new CreatedByLabelProvider(this));

-    viewer.setContentProvider(new CreatedByContentProvider());

-    viewer.setInput(null);

-    viewer.addDoubleClickListener(this);

-    getSite().setSelectionProvider(viewer);

-    getSite().getPage().addSelectionListener(this);

-    editor.addCasEditorInputListener(this);

-    viewer.refresh();

-  }

-

-  public void doubleClick(DoubleClickEvent event) {

-    ISelection selection = event.getSelection();

-    if (!selection.isEmpty() && selection instanceof TreeSelection) {

-      TreeSelection s = (TreeSelection) selection;

-      FeatureStructure fs = (FeatureStructure) s.getFirstElement();

-      Type t = fs.getType();

-      Feature featureId = t.getFeatureByBaseName(CreatedByVisitor.FEATURE_ID);

-      Feature featureScript = t.getFeatureByBaseName(CreatedByVisitor.FEATURE_SCRIPT);

-      int id = fs.getIntValue(featureId);

-      String script = fs.getStringValue(featureScript);

-      IEditorInput editorInput = editor.getEditorInput();

-      if (editorInput instanceof FileEditorInput) {

-        FileEditorInput fei = (FileEditorInput) editorInput;

-        IPath path = fei.getPath();

-        IWorkspace workspace = ResourcesPlugin.getWorkspace();

-        IWorkspaceRoot workspaceRoot = workspace.getRoot();

-        IFile iFile = workspaceRoot.getFileForLocation(path);

-        IProject project = iFile.getProject();

-        if (iFile != null) {

-          IScriptProject scriptProject = DLTKCore.create(project);

-          List<IFolder> allScriptFolders;

-          try {

-            allScriptFolders = RutaProjectUtils.getAllScriptFolders(scriptProject);

-            List<String> folders = RutaProjectUtils.getFolderLocations(allScriptFolders);

-            String locate = RutaEngine.locate(script, folders.toArray(new String[0]),

-                    RutaEngine.SCRIPT_FILE_EXTENSION);

-            if (locate != null) {

-              IPath locatedPath = new Path(locate);

-              ExplainUtils.openInRutaEditor(locatedPath, id);

-            } else {

-              RutaAddonsPlugin.error(new IllegalArgumentException("Not able to locate script: "

-                      + script));

-            }

-          } catch (CoreException e) {

-            RutaAddonsPlugin.error(e);

-          }

-        }

-      }

-    }

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    getSite().getPage().removeSelectionListener(this);

-    editor.removeCasEditorInputListener(this);

-    if (images != null) {

-      for (Image each : images.values()) {

-        each.dispose();

-      }

-    }

-  }

-

-  public void mouseDown(final MouseEvent event) {

-

-  }

-

-  public void mouseUp(final MouseEvent event) {

-

-  }

-

-  public void mouseDoubleClick(final MouseEvent event) {

-

-  }

-

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof IStructuredSelection) {

-      FeatureStructureSelection fsSelection = new FeatureStructureSelection(

-              (IStructuredSelection) selection);

-      if (fsSelection.isEmpty()) {

-        return;

-      }

-      FeatureStructure featureStructure = fsSelection.toList().get(0);

-      if (featureStructure instanceof AnnotationFS) {

-        CAS cas = document.getCAS();

-        Type t = cas.getTypeSystem().getType(CreatedByVisitor.TYPE);

-        Feature featureAnnotation = t.getFeatureByBaseName(CreatedByVisitor.FEATURE_ANNOTATION);

-        FSIterator<FeatureStructure> iterator = cas.getIndexRepository().getAllIndexedFS(t);

-        while (iterator.hasNext()) {

-          FeatureStructure fs = (FeatureStructure) iterator.next();

-          AnnotationFS afs = (AnnotationFS) fs.getFeatureValue(featureAnnotation);

-          if (afs.equals(featureStructure)) {

-            viewer.setInput(fs);

-            return;

-          }

-        }

-        viewer.setInput(null);

-      }

-    }

-  }

-

-  public void casDocumentChanged(IEditorInput oldInput, ICasDocument oldDocument,

-          IEditorInput newInput, ICasDocument newDocument) {

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementTreeContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementTreeContentProvider.java
deleted file mode 100755
index b4e982b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementTreeContentProvider.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- * 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.ruta.explain.element;

-

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.eclipse.jface.viewers.ITreeContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-

-public class ElementTreeContentProvider implements ITreeContentProvider {

-

-  public Object[] getChildren(Object parentElement) {

-    if (parentElement instanceof IExplainTreeNode) {

-      IExplainTreeNode debugNode = (IExplainTreeNode) parentElement;

-      return debugNode.getChildren().toArray();

-    }

-    return null;

-  }

-

-  public Object getParent(Object element) {

-    if (element instanceof IExplainTreeNode) {

-      return ((IExplainTreeNode) element).getParent();

-    }

-    return null;

-

-  }

-

-  public Object[] getElements(Object element) {

-    return getChildren(element);

-  }

-

-  public boolean hasChildren(Object parentElement) {

-    if (parentElement instanceof IExplainTreeNode) {

-      IExplainTreeNode debugNode = (IExplainTreeNode) parentElement;

-      return debugNode.hasChildren();

-    }

-    return false;

-  }

-

-  public void dispose() {

-  }

-

-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementTreeLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementTreeLabelProvider.java
deleted file mode 100755
index 0e197f7..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementTreeLabelProvider.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * 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.ruta.explain.element;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.explain.ExplainConstants;

-import org.apache.uima.ruta.explain.tree.ConditionNode;

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.apache.uima.ruta.explain.tree.RuleElementMatchNode;

-import org.apache.uima.ruta.explain.tree.RuleElementMatchesNode;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-public class ElementTreeLabelProvider extends LabelProvider implements ILabelProvider {

-

-  private ElementViewPage owner;

-

-  public ElementTreeLabelProvider(ElementViewPage owner) {

-    super();

-    this.owner = owner;

-  }

-

-  @Override

-  public Image getImage(Object element) {

-    if (element instanceof RuleElementMatchNode) {

-      RuleElementMatchNode rem = (RuleElementMatchNode) element;

-      boolean matched = rem.matched();

-      return owner.getImage(ExplainConstants.RULE_ELEMENT_MATCH_TYPE + matched);

-    } else if (element instanceof RuleElementMatchesNode) {

-      RuleElementMatchesNode rems = (RuleElementMatchesNode) element;

-      boolean matched = rems.matched();

-      return owner.getImage(ExplainConstants.RULE_ELEMENT_MATCHES_TYPE + matched);

-    } else if (element instanceof ConditionNode) {

-      ConditionNode rems = (ConditionNode) element;

-      boolean matched = rems.matched();

-      return owner.getImage(ExplainConstants.EVAL_CONDITION_TYPE + matched);

-    }

-    return owner.getImage("element");

-  }

-

-  @Override

-  public String getText(Object element) {

-    if (element instanceof IExplainTreeNode) {

-      IExplainTreeNode debugNode = (IExplainTreeNode) element;

-      TypeSystem ts = debugNode.getTypeSystem();

-

-      if (element instanceof RuleElementMatchesNode) {

-        Type type = ts.getType(ExplainConstants.RULE_ELEMENT_MATCHES_TYPE);

-        FeatureStructure fs = debugNode.getFeatureStructure();

-        Feature f = type.getFeatureByBaseName(ExplainConstants.ELEMENT);

-        Feature fanchor = type.getFeatureByBaseName(ExplainConstants.RULE_ANCHOR);

-        if (f != null && fanchor != null) {

-          String v = fs.getStringValue(f);

-          return v;

-        }

-      } else if (element instanceof RuleElementMatchNode) {

-        FeatureStructure fs = debugNode.getFeatureStructure();

-        if (fs instanceof AnnotationFS) {

-          String s = ((AnnotationFS) fs).getCoveredText();

-          s = s.replaceAll("[\\n\\r]", "");

-

-          return s;

-        }

-      } else if (element instanceof ConditionNode) {

-        Type type = ts.getType(ExplainConstants.EVAL_CONDITION_TYPE);

-        FeatureStructure fs = debugNode.getFeatureStructure();

-        Feature f = type.getFeatureByBaseName(ExplainConstants.ELEMENT);

-        if (f != null) {

-          String v = fs.getStringValue(f);

-          return v;

-        }

-      }

-    }

-    return element.toString();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementView.java
deleted file mode 100755
index 0b104b9..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementView.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.explain.element;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class ElementView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.element";

-

-  public ElementView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      ElementViewPage page = new ElementViewPage((AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementViewPage.java
deleted file mode 100755
index 2b1e129..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementViewPage.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*

- * 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.ruta.explain.element;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.ICasDocument;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.explain.ExplainConstants;

-import org.apache.uima.ruta.explain.failed.FailedView;

-import org.apache.uima.ruta.explain.matched.MatchedView;

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.apache.uima.ruta.explain.tree.RuleElementRootNode;

-import org.apache.uima.ruta.explain.tree.RuleMatchNode;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.TreeSelection;

-import org.eclipse.jface.viewers.TreeViewer;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.part.Page;

-

-public class ElementViewPage extends Page implements ISelectionListener {

-

-  private TreeViewer treeView;

-

-  private Map<String, Image> images;

-

-  private AnnotationEditor editor;

-

-  private ICasDocument document;

-

-  public ElementViewPage(AnnotationEditor editor) {

-    super();

-    this.editor = editor;

-    this.document = editor.getDocument();

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    getSite().getPage().removeSelectionListener(this);

-    if (images != null) {

-      for (Image each : images.values()) {

-        each.dispose();

-      }

-    }

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/chart_organisation_add.png");

-    image = desc.createImage();

-    name = ExplainConstants.RULE_ELEMENT_MATCHES_TYPE + "true";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/chart_organisation_delete.png");

-    image = desc.createImage();

-    name = ExplainConstants.RULE_ELEMENT_MATCHES_TYPE + "false";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/chart_organisation_delete.png");

-    image = desc.createImage();

-    name = "element";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/font_add.png");

-    image = desc.createImage();

-    name = ExplainConstants.RULE_ELEMENT_MATCH_TYPE + "true";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/font_delete.png");

-    image = desc.createImage();

-    name = ExplainConstants.RULE_ELEMENT_MATCH_TYPE + "false";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/accept.png");

-    image = desc.createImage();

-    name = ExplainConstants.EVAL_CONDITION_TYPE + "true";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/cancel.png");

-    image = desc.createImage();

-    name = ExplainConstants.EVAL_CONDITION_TYPE + "false";

-    images.put(name, image);

-

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    // treeView = new CheckboxTreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL

-    // | SWT.V_SCROLL);

-    treeView = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);

-    treeView.setContentProvider(new ElementTreeContentProvider());

-    treeView.setLabelProvider(new ElementTreeLabelProvider(this));

-    treeView.setInput(null);

-    // treeView.addCheckStateListener(getCurrentCEVData());

-    getSite().setSelectionProvider(treeView);

-    getSite().getPage().addSelectionListener(this);

-  }

-

-  @Override

-  public Control getControl() {

-    return treeView.getControl();

-  }

-

-  @Override

-  public void setFocus() {

-    treeView.getControl().setFocus();

-  }

-

-  public void inputChange(Object newInput) {

-    if (treeView == null) {

-      return;

-    }

-    Object oldInput = treeView.getInput();

-    if ((oldInput == null && newInput == null) || (oldInput != null && oldInput.equals(newInput)))

-      return;

-

-    if (newInput != null && newInput instanceof RuleElementRootNode) {

-      treeView.setInput(newInput);

-      treeView.expandAll();

-      treeView.refresh();

-    } else {

-      treeView.setInput(null);

-    }

-  }

-

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof TreeSelection

-            && (part instanceof MatchedView || part instanceof FailedView)) {

-      TreeSelection ts = (TreeSelection) selection;

-      Object firstElement = ts.getFirstElement();

-

-      if (firstElement instanceof RuleMatchNode) {

-        RuleMatchNode match = (RuleMatchNode) firstElement;

-        if (match.hasChildren()) {

-          inputChange(match.getChildren().get(0));

-        }

-      }

-

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedTreeContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedTreeContentProvider.java
deleted file mode 100755
index 98ed974..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedTreeContentProvider.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * 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.ruta.explain.failed;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.apache.uima.ruta.explain.tree.RuleMatchNode;

-import org.eclipse.jface.viewers.ITreeContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-

-public class FailedTreeContentProvider implements ITreeContentProvider {

-

-  public Object[] getChildren(Object parentElement) {

-    if (parentElement instanceof IExplainTreeNode) {

-      List<Object> result = new ArrayList<Object>();

-      IExplainTreeNode debugNode = (IExplainTreeNode) parentElement;

-      for (IExplainTreeNode each : debugNode.getChildren()) {

-        if (each instanceof RuleMatchNode) {

-          result.add(each);

-        }

-      }

-      return result.toArray();

-    }

-    return null;

-  }

-

-  public Object getParent(Object element) {

-    if (element instanceof IExplainTreeNode) {

-      return ((IExplainTreeNode) element).getParent();

-    }

-    return null;

-

-  }

-

-  public Object[] getElements(Object element) {

-    return getChildren(element);

-  }

-

-  public boolean hasChildren(Object parentElement) {

-    return false;

-  }

-

-  public void dispose() {

-  }

-

-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedTreeLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedTreeLabelProvider.java
deleted file mode 100755
index 5710b3f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedTreeLabelProvider.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.explain.failed;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.explain.tree.RuleMatchNode;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-

-public class FailedTreeLabelProvider extends LabelProvider implements ILabelProvider {

-

-  private FailedViewPage owner;

-

-  public FailedTreeLabelProvider(FailedViewPage owner) {

-    super();

-    this.owner = owner;

-  }

-

-  @Override

-  public Image getImage(Object element) {

-    if (element instanceof RuleMatchNode) {

-      RuleMatchNode ruleMatchNode = (RuleMatchNode) element;

-      FeatureStructure fs = ruleMatchNode.getFeatureStructure();

-      if (fs != null) {

-        String name = fs.getType().getName();

-        return owner.getImage(name);

-      }

-    }

-    return null;

-  }

-

-  @Override

-  public String getText(Object element) {

-    if (element instanceof RuleMatchNode) {

-      RuleMatchNode debugNode = (RuleMatchNode) element;

-      FeatureStructure fs = debugNode.getFeatureStructure();

-      if (fs != null) {

-        String s = ((AnnotationFS) fs).getCoveredText();

-        s = s.replaceAll("[\\n\\r]", "");

-        return s;

-      }

-    }

-

-    return element.toString();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedView.java
deleted file mode 100755
index eaf3c86..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedView.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.explain.failed;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class FailedView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.failed";

-

-  public FailedView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      FailedViewPage page = new FailedViewPage((AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedViewPage.java
deleted file mode 100755
index a7a6235..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedViewPage.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*

- * 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.ruta.explain.failed;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.explain.ExplainConstants;

-import org.apache.uima.ruta.explain.apply.ApplyView;

-import org.apache.uima.ruta.explain.rulelist.RuleListView;

-import org.apache.uima.ruta.explain.selection.ExplainSelectionView;

-import org.apache.uima.ruta.explain.tree.BlockApplyNode;

-import org.apache.uima.ruta.explain.tree.FailedRootNode;

-import org.apache.uima.ruta.explain.tree.RuleApplyNode;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.CheckboxTreeViewer;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.TreeSelection;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.part.Page;

-

-public class FailedViewPage extends Page implements ISelectionListener {

-

-  private CheckboxTreeViewer treeView;

-

-  private Map<String, Image> images;

-

-  public FailedViewPage(AnnotationEditor editor) {

-    super();

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    getSite().getPage().removeSelectionListener(this);

-    if (images != null) {

-      for (Image each : images.values()) {

-        each.dispose();

-      }

-    }

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/accept.png");

-    image = desc.createImage();

-    name = "matched";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/cancel.png");

-    image = desc.createImage();

-    name = "failed";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/font_add.png");

-    image = desc.createImage();

-    name = ExplainConstants.MATCHED_RULE_MATCH_TYPE;

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/font_delete.png");

-    image = desc.createImage();

-    name = ExplainConstants.FAILED_RULE_MATCH_TYPE;

-    images.put(name, image);

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    treeView = new CheckboxTreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);

-    treeView.setContentProvider(new FailedTreeContentProvider());

-    treeView.setLabelProvider(new FailedTreeLabelProvider(this));

-    treeView.setInput(null);

-    getSite().setSelectionProvider(treeView);

-    getSite().getPage().addSelectionListener(this);

-  }

-

-  @Override

-  public Control getControl() {

-    return treeView.getControl();

-  }

-

-  @Override

-  public void setFocus() {

-    treeView.getControl().setFocus();

-  }

-

-  public void inputChange(Object newInput) {

-    if (newInput != null && newInput instanceof FailedRootNode && treeView != null

-            && newInput != treeView.getInput()) {

-      this.treeView.setInput(newInput);

-      this.treeView.refresh();

-    }

-  }

-

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof TreeSelection

-            && (part instanceof ApplyView || part instanceof RuleListView || part instanceof ExplainSelectionView)) {

-      TreeSelection ts = (TreeSelection) selection;

-      Object firstElement = ts.getFirstElement();

-

-      if (firstElement instanceof BlockApplyNode) {

-        BlockApplyNode block = (BlockApplyNode) firstElement;

-        inputChange(block.getBlockRuleNode().getFailedNode());

-      } else if (firstElement instanceof RuleApplyNode) {

-        RuleApplyNode rule = (RuleApplyNode) firstElement;

-        inputChange(rule.getFailedNode());

-      }

-

-    }

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedTreeContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedTreeContentProvider.java
deleted file mode 100755
index cddae0b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedTreeContentProvider.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * 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.ruta.explain.matched;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.apache.uima.ruta.explain.tree.RuleMatchNode;

-import org.eclipse.jface.viewers.ITreeContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-

-public class MatchedTreeContentProvider implements ITreeContentProvider {

-

-  public Object[] getChildren(Object parentElement) {

-    if (parentElement instanceof IExplainTreeNode) {

-      List<Object> result = new ArrayList<Object>();

-      IExplainTreeNode debugNode = (IExplainTreeNode) parentElement;

-      for (IExplainTreeNode each : debugNode.getChildren()) {

-        if (each instanceof RuleMatchNode) {

-          result.add(each);

-        }

-      }

-      return result.toArray();

-    }

-    return null;

-  }

-

-  public Object getParent(Object element) {

-    if (element instanceof IExplainTreeNode) {

-      return ((IExplainTreeNode) element).getParent();

-    }

-    return null;

-

-  }

-

-  public Object[] getElements(Object element) {

-    return getChildren(element);

-  }

-

-  public boolean hasChildren(Object parentElement) {

-

-    // if (parentElement instanceof IExplainTreeNode) {

-    // IExplainTreeNode debugNode = (IExplainTreeNode) parentElement;

-    // for (Object each : debugNode.getChildren()) {

-    // if(!(each instanceof ExplainRootNode)) {

-    // return true;

-    // }

-    // }

-    // }

-    return false;

-  }

-

-  public void dispose() {

-  }

-

-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedTreeLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedTreeLabelProvider.java
deleted file mode 100755
index 4e5a8bf..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedTreeLabelProvider.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.explain.matched;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.explain.tree.RuleMatchNode;

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-

-public class MatchedTreeLabelProvider extends LabelProvider implements ILabelProvider {

-

-  private MatchedViewPage owner;

-

-  public MatchedTreeLabelProvider(MatchedViewPage owner) {

-    super();

-    this.owner = owner;

-  }

-

-  @Override

-  public Image getImage(Object element) {

-    if (element instanceof RuleMatchNode) {

-      RuleMatchNode ruleMatchNode = (RuleMatchNode) element;

-      FeatureStructure fs = ruleMatchNode.getFeatureStructure();

-      if (fs != null) {

-        String name = fs.getType().getName();

-        return owner.getImage(name);

-      }

-    }

-    return null;

-  }

-

-  @Override

-  public String getText(Object element) {

-    if (element instanceof RuleMatchNode) {

-      RuleMatchNode debugNode = (RuleMatchNode) element;

-      FeatureStructure fs = debugNode.getFeatureStructure();

-      if (fs != null) {

-        String s = ((AnnotationFS) fs).getCoveredText();

-        s = s.replaceAll("[\\n\\r]", "");

-        return s;

-      }

-    }

-

-    return element.toString();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedView.java
deleted file mode 100755
index 52d387a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedView.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.explain.matched;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class MatchedView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.matched";

-

-  public MatchedView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      MatchedViewPage page = new MatchedViewPage((AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedViewPage.java
deleted file mode 100755
index 61d0345..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedViewPage.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*

- * 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.ruta.explain.matched;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.explain.ExplainConstants;

-import org.apache.uima.ruta.explain.apply.ApplyView;

-import org.apache.uima.ruta.explain.rulelist.RuleListView;

-import org.apache.uima.ruta.explain.selection.ExplainSelectionView;

-import org.apache.uima.ruta.explain.tree.BlockApplyNode;

-import org.apache.uima.ruta.explain.tree.MatchedRootNode;

-import org.apache.uima.ruta.explain.tree.RuleApplyNode;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.CheckboxTreeViewer;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.TreeSelection;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.part.Page;

-

-public class MatchedViewPage extends Page implements ISelectionListener {

-

-  private CheckboxTreeViewer treeView;

-

-  private Map<String, Image> images;

-

-  public MatchedViewPage(AnnotationEditor editor) {

-    super();

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    getSite().getPage().removeSelectionListener(this);

-    if (images != null) {

-      for (Image each : images.values()) {

-        each.dispose();

-      }

-    }

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/accept.png");

-    image = desc.createImage();

-    name = "matched";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/cancel.png");

-    image = desc.createImage();

-    name = "failed";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/font_add.png");

-    image = desc.createImage();

-    name = ExplainConstants.MATCHED_RULE_MATCH_TYPE;

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/font_delete.png");

-    image = desc.createImage();

-    name = ExplainConstants.FAILED_RULE_MATCH_TYPE;

-    images.put(name, image);

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    treeView = new CheckboxTreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);

-    treeView.setContentProvider(new MatchedTreeContentProvider());

-    treeView.setLabelProvider(new MatchedTreeLabelProvider(this));

-    treeView.setInput(null);

-    getSite().setSelectionProvider(treeView);

-    getSite().getPage().addSelectionListener(this);

-  }

-

-  @Override

-  public Control getControl() {

-    return treeView.getControl();

-  }

-

-  @Override

-  public void setFocus() {

-    treeView.getControl().setFocus();

-  }

-

-  public void inputChange(Object newInput) {

-    if (newInput != null && newInput instanceof MatchedRootNode && treeView != null

-            && newInput != treeView.getInput()) {

-      this.treeView.setInput(newInput);

-      this.treeView.refresh();

-    }

-  }

-

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof TreeSelection

-            && (part instanceof ApplyView || part instanceof RuleListView || part instanceof ExplainSelectionView)) {

-      TreeSelection ts = (TreeSelection) selection;

-      Object firstElement = ts.getFirstElement();

-

-      if (firstElement instanceof BlockApplyNode) {

-        BlockApplyNode block = (BlockApplyNode) firstElement;

-        inputChange(block.getBlockRuleNode().getMatchedChild());

-      } else if (firstElement instanceof RuleApplyNode) {

-        RuleApplyNode rule = (RuleApplyNode) firstElement;

-        inputChange(rule.getMatchedChild());

-      }

-

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListView.java
deleted file mode 100755
index 32b8463..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListView.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.explain.rulelist;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class RuleListView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.rulelist";

-

-  public RuleListView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      RuleListViewPage page = new RuleListViewPage((AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListViewPage.java
deleted file mode 100755
index aeaff5d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListViewPage.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*

- * 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.ruta.explain.rulelist;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.ruta.explain.ExplainConstants;

-import org.apache.uima.ruta.explain.apply.ApplyTreeContentProvider;

-import org.apache.uima.ruta.explain.apply.ApplyTreeLabelProvider;

-import org.apache.uima.ruta.explain.apply.ApplyViewPage;

-import org.apache.uima.ruta.explain.tree.ApplyRootNode;

-import org.apache.uima.ruta.explain.tree.ExplainTree;

-import org.apache.uima.ruta.explain.tree.IExplainTreeNode;

-import org.apache.uima.ruta.explain.tree.RuleApplyNode;

-import org.eclipse.jface.viewers.CheckboxTreeViewer;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Event;

-import org.eclipse.swt.widgets.Listener;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.ui.IWorkbenchPart;

-

-public class RuleListViewPage extends ApplyViewPage implements Listener {

-

-  protected Text filterTextField;

-

-  protected String manualFilter = "";

-

-  private Composite overlay;

-

-  private int offset = -1;

-

-  public RuleListViewPage(AnnotationEditor editor) {

-    super(editor);

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    this.overlay = new Composite(parent, SWT.NONE);

-    GridLayout layout = new GridLayout();

-    layout.horizontalSpacing = 0;

-    layout.verticalSpacing = 0;

-    layout.marginWidth = 0;

-    layout.marginHeight = 0;

-    // FillLayout layout = new FillLayout(SWT.VERTICAL);

-    overlay.setLayout(layout);

-

-    filterTextField = new Text(overlay, SWT.SINGLE | SWT.BORDER);

-    GridData gd = new GridData();

-    gd.grabExcessHorizontalSpace = true;

-    gd.horizontalAlignment = GridData.FILL;

-    gd.horizontalSpan = 1;

-    filterTextField.setLayoutData(gd);

-    filterTextField.setToolTipText("Retain types that contain...");

-    filterTextField.addListener(SWT.KeyUp, this);

-    filterTextField.addListener(SWT.MouseUp, this);

-    filterTextField.addListener(SWT.Modify, this);

-    filterTextField.setMessage("Only rules with...");

-

-    viewer = new CheckboxTreeViewer(overlay, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

-    gd = new GridData(GridData.FILL_BOTH);

-    viewer.getTree().setLayoutData(gd);

-    viewer.setContentProvider(new ApplyTreeContentProvider());

-    viewer.setLabelProvider(new ApplyTreeLabelProvider(this));

-    viewer.setInput(new ApplyRootNode(null, document.getCAS().getTypeSystem()));

-

-    getSite().setSelectionProvider(viewer);

-    getSite().getPage().addSelectionListener(this);

-

-  }

-

-  private void filterTree(ExplainTree tree) {

-    Type ruleType = document.getCAS().getTypeSystem().getType(ExplainConstants.RULE_APPLY_TYPE);

-    IExplainTreeNode root = tree.getRoot();

-    List<IExplainTreeNode> children = new ArrayList<IExplainTreeNode>(root.getChildren());

-    for (IExplainTreeNode each : children) {

-      if (each instanceof RuleApplyNode) {

-        RuleApplyNode ran = (RuleApplyNode) each;

-        Feature f = ruleType.getFeatureByBaseName(ExplainConstants.ELEMENT);

-        if (f != null) {

-          String v = ran.getFeatureStructure().getStringValue(f);

-          if (!StringUtils.isEmpty(manualFilter) && v.indexOf(manualFilter) == -1) {

-            root.removeChild(ran);

-          }

-        }

-      }

-    }

-  }

-

-  public void handleEvent(Event event) {

-    if (event.widget == filterTextField && event.type == SWT.Modify) {

-      manualFilter = filterTextField.getText();

-      reloadTree();

-    }

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.part.Page#dispose()

-   */

-  @Override

-  public void dispose() {

-    super.dispose();

-    overlay.dispose();

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.part.Page#getControl()

-   */

-  @Override

-  public Control getControl() {

-    return overlay;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.part.Page#setFocus()

-   */

-  @Override

-  public void setFocus() {

-    overlay.setFocus();

-  }

-

-  @Override

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof StructuredSelection && part instanceof AnnotationEditor) {

-      offset = editor.getCaretOffset();

-      if (offset >= 0) {

-        reloadTree();

-      }

-    }

-  }

-

-  private void reloadTree() {

-    ExplainTree tree = new ExplainTree(document.getCAS(), offset, true);

-    filterTree(tree);

-    viewer.setInput(tree.getRoot());

-    viewer.refresh();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionView.java
deleted file mode 100755
index eb9b587..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionView.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.explain.selection;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class ExplainSelectionView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.selection";

-

-  public ExplainSelectionView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      ExplainSelectionViewPage page = new ExplainSelectionViewPage((AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionViewPage.java
deleted file mode 100755
index f7160d4..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionViewPage.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.explain.selection;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.ruta.explain.apply.ApplyTreeContentProvider;

-import org.apache.uima.ruta.explain.apply.ApplyTreeLabelProvider;

-import org.apache.uima.ruta.explain.apply.ApplyViewPage;

-import org.apache.uima.ruta.explain.tree.ApplyRootNode;

-import org.apache.uima.ruta.explain.tree.ExplainTree;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.jface.viewers.TreeViewer;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.ui.IWorkbenchPart;

-

-public class ExplainSelectionViewPage extends ApplyViewPage {

-

-  private int offset = -1;

-

-  public ExplainSelectionViewPage(AnnotationEditor editor) {

-    super(editor);

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    viewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);

-    viewer.setContentProvider(new ApplyTreeContentProvider());

-    viewer.setLabelProvider(new ApplyTreeLabelProvider(this));

-

-    viewer.setInput(new ApplyRootNode(null, document.getCAS().getTypeSystem()));

-

-    getSite().setSelectionProvider(viewer);

-    getSite().getPage().addSelectionListener(this);

-  }

-

-  @Override

-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof StructuredSelection && part instanceof AnnotationEditor) {

-      offset = editor.getCaretOffset();

-      if (offset >= 0) {

-        ExplainTree tree = new ExplainTree(document.getCAS(), offset);

-        viewer.setInput(tree.getRoot());

-        viewer.refresh();

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ApplyRootNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ApplyRootNode.java
deleted file mode 100755
index 62c15d5..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ApplyRootNode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.TypeSystem;

-

-public class ApplyRootNode extends ExplainAbstractTreeNode implements ExplainRootNode {

-

-  public ApplyRootNode(IExplainTreeNode parent, TypeSystem typeSystem) {

-    super(parent, null, typeSystem);

-  }

-

-  @Override

-  public String toString() {

-    return "Applied";

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/BlockApplyNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/BlockApplyNode.java
deleted file mode 100755
index 960a51b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/BlockApplyNode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-

-public class BlockApplyNode extends ExplainAbstractTreeNode {

-

-  private RuleApplyNode blockRuleNode;

-

-  public RuleApplyNode getBlockRuleNode() {

-    return blockRuleNode;

-  }

-

-  public BlockApplyNode(IExplainTreeNode parent, FeatureStructure fs, TypeSystem ts) {

-    super(parent, fs, ts);

-  }

-

-  public void setBlockRuleApply(RuleApplyNode ruleNode) {

-    this.blockRuleNode = ruleNode;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ConditionNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ConditionNode.java
deleted file mode 100755
index 51976e9..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ConditionNode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.ruta.explain.ExplainConstants;

-

-public class ConditionNode extends ExplainAbstractTreeNode implements IEvaluatedNode {

-

-  private boolean matched;

-

-  public ConditionNode(IExplainTreeNode parent, FeatureStructure fs, TypeSystem ts) {

-    super(parent, fs, ts);

-    Feature f = fs.getType().getFeatureByBaseName(ExplainConstants.VALUE);

-    matched = fs.getBooleanValue(f);

-  }

-

-  public boolean matched() {

-    return matched;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainAbstractTreeNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainAbstractTreeNode.java
deleted file mode 100755
index dad78aa..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainAbstractTreeNode.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.eclipse.core.runtime.IAdaptable;

-

-public abstract class ExplainAbstractTreeNode implements IExplainTreeNode, IAdaptable {

-

-  private IExplainTreeNode parent;

-

-  private List<IExplainTreeNode> children;

-

-  private FeatureStructure fs;

-

-  private TypeSystem ts;

-

-  public ExplainAbstractTreeNode(IExplainTreeNode parent, FeatureStructure fs, TypeSystem ts) {

-    this.parent = parent;

-    this.children = new ArrayList<IExplainTreeNode>();

-    this.fs = fs;

-    this.ts = ts;

-  }

-

-  public IExplainTreeNode getParent() {

-    return parent;

-  }

-

-  public List<IExplainTreeNode> getChildren() {

-    return children;

-  }

-

-  public boolean hasChildren() {

-    if (children.size() > 0) {

-      return true;

-    }

-    return false;

-  }

-

-  public void addChild(IExplainTreeNode child) {

-    children.add(child);

-  }

-

-  public boolean removeChild(IExplainTreeNode child) {

-    return children.remove(child);

-  }

-

-  public FeatureStructure getFeatureStructure() {

-    return fs;

-  }

-

-  public TypeSystem getTypeSystem() {

-    return ts;

-  }

-

-  @Override

-  public String toString() {

-    return fs.toString();

-  }

-

-  public Object getAdapter(Class adapter) {

-

-    if (FeatureStructure.class.equals(adapter)) {

-      return getFeatureStructure();

-    } else if (AnnotationFS.class.equals(adapter) && getFeatureStructure() instanceof AnnotationFS) {

-      return getFeatureStructure();

-    }

-

-    return null;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainRootNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainRootNode.java
deleted file mode 100755
index 7331823..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainRootNode.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-public interface ExplainRootNode {

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
deleted file mode 100755
index 570271d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.ArrayFS;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.explain.ExplainConstants;

-

-public class ExplainTree {

-

-  private IExplainTreeNode root;

-

-  private Type ruleMatchType;

-

-  private Type blockApplyType;

-

-  private Type ruleApplyType;

-

-  private Type ruleElementMatchType;

-

-  private Type ruleElementMatchesType;

-

-  private Type evaluatedConditionType;

-

-  private Type matchedRuleMatchType;

-

-  private Type failedRuleMatchType;

-

-  public ExplainTree(CAS cas) {

-    this(cas, -1);

-  }

-

-  public ExplainTree(CAS cas, int offset) {

-    this(cas, offset, false);

-    if (offset >= 0) {

-      prune(root);

-    }

-  }

-

-  public ExplainTree(CAS cas, int offset, boolean onlyRules) {

-    createTree(cas, offset, onlyRules);

-  }

-

-  public IExplainTreeNode getRoot() {

-    return root;

-  }

-

-  private void createTree(CAS cas, int offset, boolean onlyRules) {

-    TypeSystem ts = cas.getTypeSystem();

-    Type scriptApply = ts.getType(ExplainConstants.SCRIPT_APPLY_TYPE);

-

-    blockApplyType = ts.getType(ExplainConstants.BLOCK_APPLY_TYPE);

-    ruleApplyType = ts.getType(ExplainConstants.RULE_APPLY_TYPE);

-    ruleMatchType = ts.getType(ExplainConstants.RULE_MATCH_TYPE);

-    matchedRuleMatchType = ts.getType(ExplainConstants.MATCHED_RULE_MATCH_TYPE);

-    failedRuleMatchType = ts.getType(ExplainConstants.FAILED_RULE_MATCH_TYPE);

-    ruleElementMatchType = ts.getType(ExplainConstants.RULE_ELEMENT_MATCH_TYPE);

-    ruleElementMatchesType = ts.getType(ExplainConstants.RULE_ELEMENT_MATCHES_TYPE);

-    evaluatedConditionType = ts.getType(ExplainConstants.EVAL_CONDITION_TYPE);

-

-    if (scriptApply == null)

-      return;

-    FSIterator<AnnotationFS> it = cas.getAnnotationIndex(scriptApply).iterator();

-    root = new ApplyRootNode(null, ts);

-

-    if (it.isValid()) {

-      it.moveToFirst();

-      while (it.isValid()) {

-        AnnotationFS fs = it.get();

-        buildTree(fs, root, ts, offset, onlyRules);

-        it.moveToNext();

-      }

-    }

-

-  }

-

-  private void buildTree(FeatureStructure fs, IExplainTreeNode parent, TypeSystem ts, int offset,

-          boolean onlyRules) {

-    if (blockApplyType != null && blockApplyType.equals(fs.getType())) {

-      processBlockApply((AnnotationFS) fs, parent, ts, offset, onlyRules);

-    } else if (ruleApplyType != null && ruleApplyType.equals(fs.getType())) {

-      processRuleApply((AnnotationFS) fs, parent, ts, offset, onlyRules);

-    } else if ((matchedRuleMatchType != null && matchedRuleMatchType.equals(fs.getType()))

-            || (failedRuleMatchType != null && failedRuleMatchType.equals(fs.getType()))) {

-      processRuleMatch((AnnotationFS) fs, parent, ts, offset, onlyRules);

-    } else if (ruleElementMatchesType != null && ruleElementMatchesType.equals(fs.getType())) {

-      processRuleElementMatches(fs, parent, ts, offset, onlyRules);

-    } else if (ruleElementMatchType != null && ruleElementMatchType.equals(fs.getType())) {

-      processRuleElementMatch((AnnotationFS) fs, parent, ts, offset, onlyRules);

-    } else if (evaluatedConditionType != null && evaluatedConditionType.equals(fs.getType())) {

-      processEvaluatedCondition(fs, parent, ts, offset, onlyRules);

-    }

-  }

-

-  private void processBlockApply(AnnotationFS fs, IExplainTreeNode parent, TypeSystem ts,

-          int offset, boolean onlyRules) {

-    if (offset >= 0 && (fs.getBegin() >= offset || fs.getEnd() <= offset)) {

-      return;

-    }

-    BlockApplyNode blockNode = null;

-    if (!onlyRules) {

-      blockNode = new BlockApplyNode(parent, fs, ts);

-      parent.addChild(blockNode);

-      processBlockRuleApply(fs, blockNode, ts, offset, onlyRules);

-    }

-    Feature feature = blockApplyType.getFeatureByBaseName(ExplainConstants.INNER_APPLY);

-    FeatureStructure featureValue = fs.getFeatureValue(feature);

-    ArrayFS value = (ArrayFS) featureValue;

-    FeatureStructure[] fsarray = value.toArray();

-    for (FeatureStructure each : fsarray) {

-      if (!onlyRules) {

-        buildTree(each, blockNode, ts, offset, onlyRules);

-      } else {

-        buildTree(each, parent, ts, offset, onlyRules);

-      }

-

-    }

-  }

-

-  private void processBlockRuleApply(AnnotationFS fs, BlockApplyNode parent, TypeSystem ts,

-          int offset, boolean onlyRules) {

-    if (offset >= 0 && (fs.getBegin() >= offset || fs.getEnd() <= offset)) {

-      return;

-    }

-    RuleApplyNode ruleNode = new RuleApplyNode(parent, fs, ts);

-    parent.setBlockRuleApply(ruleNode);

-

-    Feature feature = ruleApplyType.getFeatureByBaseName(ExplainConstants.RULES);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(feature);

-    if (value == null)

-      return;

-    FeatureStructure[] fsarray = value.toArray();

-

-    MatchedRootNode matched = new MatchedRootNode(ruleNode, ts);

-    FailedRootNode failed = new FailedRootNode(ruleNode, ts);

-    ruleNode.addChild(matched);

-    ruleNode.addChild(failed);

-

-    for (FeatureStructure eachRuleMatch : fsarray) {

-      Feature f = eachRuleMatch.getType().getFeatureByBaseName(ExplainConstants.MATCHED);

-      boolean matchedValue = eachRuleMatch.getBooleanValue(f);

-      if (matchedValue) {

-        buildTree(eachRuleMatch, matched, ts, offset, onlyRules);

-      } else {

-        buildTree(eachRuleMatch, failed, ts, offset, onlyRules);

-      }

-

-      Feature df = eachRuleMatch.getType().getFeatureByBaseName(ExplainConstants.DELEGATES);

-      if (df != null) {

-        ArrayFS dv = (ArrayFS) eachRuleMatch.getFeatureValue(df);

-        if (dv != null) {

-          FeatureStructure[] da = dv.toArray();

-          for (FeatureStructure delegateFS : da) {

-            buildTree(delegateFS, ruleNode, ts, offset, onlyRules);

-          }

-        }

-      }

-

-    }

-  }

-

-  private void processRuleApply(AnnotationFS fs, IExplainTreeNode parent, TypeSystem ts,

-          int offset, boolean onlyRules) {

-    if (offset >= 0 && (fs.getBegin() >= offset || fs.getEnd() <= offset)) {

-      return;

-    }

-    RuleApplyNode ruleNode = new RuleApplyNode(parent, fs, ts);

-    parent.addChild(ruleNode);

-

-    Feature feature = ruleApplyType.getFeatureByBaseName(ExplainConstants.RULES);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(feature);

-    FeatureStructure[] fsarray = value.toArray();

-

-    MatchedRootNode matched = new MatchedRootNode(ruleNode, ts);

-    FailedRootNode failed = new FailedRootNode(ruleNode, ts);

-    ruleNode.addChild(matched);

-    ruleNode.addChild(failed);

-

-    for (FeatureStructure eachRuleMatch : fsarray) {

-      Feature f = eachRuleMatch.getType().getFeatureByBaseName(ExplainConstants.MATCHED);

-      boolean matchedValue = eachRuleMatch.getBooleanValue(f);

-      if (matchedValue) {

-        buildTree(eachRuleMatch, matched, ts, offset, onlyRules);

-      } else {

-        buildTree(eachRuleMatch, failed, ts, offset, onlyRules);

-      }

-

-      Feature df = eachRuleMatch.getType().getFeatureByBaseName(ExplainConstants.DELEGATES);

-      if (df != null) {

-        ArrayFS dv = (ArrayFS) eachRuleMatch.getFeatureValue(df);

-        if (dv != null) {

-          FeatureStructure[] da = dv.toArray();

-          for (FeatureStructure delegateFS : da) {

-            buildTree(delegateFS, ruleNode, ts, offset, onlyRules);

-          }

-        }

-      }

-

-    }

-  }

-

-  private void processRuleMatch(AnnotationFS fs, IExplainTreeNode parent, TypeSystem ts,

-          int offset, boolean onlyRules) {

-    if (offset >= 0 && (fs.getBegin() >= offset || fs.getEnd() <= offset)) {

-      return;

-    }

-    RuleMatchNode matchNode = new RuleMatchNode(parent, fs, ts);

-    parent.addChild(matchNode);

-

-    RuleElementRootNode remRoot = new RuleElementRootNode(matchNode, ts);

-    matchNode.addChild(remRoot);

-

-    Feature feature = ruleMatchType.getFeatureByBaseName(ExplainConstants.ELEMENTS);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(feature);

-    if (value != null) {

-      FeatureStructure[] fsarray = value.toArray();

-      for (FeatureStructure each : fsarray) {

-        buildTree(each, remRoot, ts, offset, onlyRules);

-      }

-    }

-  }

-

-  private void processRuleElementMatches(FeatureStructure fs, IExplainTreeNode parent,

-          TypeSystem ts, int offset, boolean onlyRules) {

-    RuleElementMatchesNode remsNode = new RuleElementMatchesNode(parent, fs, ts);

-    parent.addChild(remsNode);

-

-    Feature feature = ruleElementMatchesType.getFeatureByBaseName(ExplainConstants.MATCHES);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(feature);

-    FeatureStructure[] fsarray = value.toArray();

-    for (FeatureStructure each : fsarray) {

-      buildTree(each, remsNode, ts, offset, onlyRules);

-    }

-  }

-

-  private void processRuleElementMatch(AnnotationFS fs, IExplainTreeNode parent, TypeSystem ts,

-          int offset, boolean onlyRules) {

-    if (offset >= 0 && (fs.getBegin() >= offset || fs.getEnd() <= offset)) {

-      return;

-    }

-    RuleElementMatchNode remNode = new RuleElementMatchNode(parent, fs, ts);

-    parent.addChild(remNode);

-

-    Feature feature = ruleElementMatchType.getFeatureByBaseName(ExplainConstants.BASE_CONDITION);

-    FeatureStructure base = fs.getFeatureValue(feature);

-    buildTree(base, remNode, ts, offset, onlyRules);

-

-    feature = ruleElementMatchType.getFeatureByBaseName(ExplainConstants.CONDITIONS);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(feature);

-    if (value != null) {

-      FeatureStructure[] fsarray = value.toArray();

-      for (FeatureStructure each : fsarray) {

-        buildTree(each, remNode, ts, offset, onlyRules);

-      }

-    }

-    feature = fs.getType().getFeatureByBaseName(ExplainConstants.ELEMENTS);

-    value = (ArrayFS) fs.getFeatureValue(feature);

-    if (value != null) {

-      FeatureStructure[] fsarray = value.toArray();

-      for (FeatureStructure each : fsarray) {

-        buildTree(each, remNode, ts, offset, onlyRules);

-      }

-    }

-  }

-

-  private void processEvaluatedCondition(FeatureStructure fs, IExplainTreeNode parent,

-          TypeSystem ts, int offset, boolean onlyRules) {

-    ConditionNode condNode = new ConditionNode(parent, fs, ts);

-    parent.addChild(condNode);

-

-    Feature feature = evaluatedConditionType.getFeatureByBaseName(ExplainConstants.CONDITIONS);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(feature);

-    if (value != null) {

-      FeatureStructure[] fsarray = value.toArray();

-      for (FeatureStructure each : fsarray) {

-        buildTree(each, condNode, ts, offset, onlyRules);

-      }

-    }

-  }

-

-  private void prune(IExplainTreeNode node) {

-    List<IExplainTreeNode> children = node.getChildren();

-    IExplainTreeNode parent = node.getParent();

-    for (IExplainTreeNode each : new ArrayList<IExplainTreeNode>(children)) {

-      prune(each);

-    }

-    if (node instanceof ApplyRootNode) {

-    } else if (node instanceof BlockApplyNode) {

-    } else if (node instanceof ConditionNode) {

-    } else if (node instanceof FailedRootNode) {

-      if (!node.hasChildren()) {

-        parent.removeChild(node);

-      }

-    } else if (node instanceof MatchedRootNode) {

-      if (!node.hasChildren()) {

-        parent.removeChild(node);

-      }

-    } else if (node instanceof RuleApplyNode) {

-      if (!node.hasChildren()) {

-        parent.removeChild(node);

-      }

-    } else if (node instanceof RuleElementMatchesNode) {

-    } else if (node instanceof RuleElementMatchNode) {

-    } else if (node instanceof RuleElementRootNode) {

-    } else if (node instanceof RuleMatchNode) {

-    }

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/FailedRootNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/FailedRootNode.java
deleted file mode 100755
index 282122f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/FailedRootNode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.TypeSystem;

-

-public class FailedRootNode extends ExplainAbstractTreeNode implements ExplainRootNode {

-

-  public FailedRootNode(IExplainTreeNode parent, TypeSystem ts) {

-    super(parent, null, ts);

-  }

-

-  @Override

-  public String toString() {

-    return "Failed";

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/IEvaluatedNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/IEvaluatedNode.java
deleted file mode 100755
index 3a07281..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/IEvaluatedNode.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-public interface IEvaluatedNode {

-

-  boolean matched();

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/IExplainTreeNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/IExplainTreeNode.java
deleted file mode 100755
index 96872f7..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/IExplainTreeNode.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import java.util.List;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-

-public interface IExplainTreeNode {

-

-  IExplainTreeNode getParent();

-

-  List<IExplainTreeNode> getChildren();

-

-  boolean hasChildren();

-

-  void addChild(IExplainTreeNode node);

-

-  boolean removeChild(IExplainTreeNode node);

-

-  FeatureStructure getFeatureStructure();

-

-  TypeSystem getTypeSystem();

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/MatchedRootNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/MatchedRootNode.java
deleted file mode 100755
index 125f664..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/MatchedRootNode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.TypeSystem;

-

-public class MatchedRootNode extends ExplainAbstractTreeNode implements ExplainRootNode {

-

-  public MatchedRootNode(IExplainTreeNode parent, TypeSystem ts) {

-    super(parent, null, ts);

-  }

-

-  @Override

-  public String toString() {

-    return "Matched";

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleApplyNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleApplyNode.java
deleted file mode 100755
index c1b62e1..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleApplyNode.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-

-public class RuleApplyNode extends ExplainAbstractTreeNode {

-

-  private FailedRootNode failedNode;

-

-  private MatchedRootNode matchedNode;

-

-  public RuleApplyNode(IExplainTreeNode parent, FeatureStructure fs, TypeSystem ts) {

-    super(parent, fs, ts);

-  }

-

-  @Override

-  public void addChild(IExplainTreeNode node) {

-    super.addChild(node);

-    if (node instanceof FailedRootNode) {

-      failedNode = (FailedRootNode) node;

-    } else if (node instanceof MatchedRootNode) {

-      matchedNode = (MatchedRootNode) node;

-    }

-  }

-

-  public FailedRootNode getFailedNode() {

-    return failedNode;

-  }

-

-  public MatchedRootNode getMatchedChild() {

-    return matchedNode;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
deleted file mode 100755
index 2ef1a35..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.ArrayFS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.caseditor.view.tree.IAnnotationNode;

-import org.apache.uima.ruta.explain.ExplainConstants;

-

-public class RuleElementMatchNode extends ExplainAbstractTreeNode implements IEvaluatedNode,

-        IAnnotationNode {

-

-  private boolean matched;

-

-  public RuleElementMatchNode(IExplainTreeNode parent, FeatureStructure fs, TypeSystem ts) {

-    super(parent, fs, ts);

-    Feature f = fs.getType().getFeatureByBaseName(ExplainConstants.BASE_CONDITION);

-    FeatureStructure baseFS = fs.getFeatureValue(f);

-    Feature baseFeat = baseFS.getType().getFeatureByBaseName(ExplainConstants.VALUE);

-    matched = baseFS.getBooleanValue(baseFeat);

-

-    f = fs.getType().getFeatureByBaseName(ExplainConstants.CONDITIONS);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(f);

-    if (value != null) {

-      FeatureStructure[] fsarray = value.toArray();

-      for (FeatureStructure each : fsarray) {

-        Feature eachFeat = each.getType().getFeatureByBaseName(ExplainConstants.VALUE);

-        boolean eachValue = each.getBooleanValue(eachFeat);

-        matched &= eachValue;

-      }

-    }

-  }

-

-  public boolean matched() {

-    return matched;

-  }

-

-  public AnnotationFS getAnnotation() {

-    FeatureStructure fs = getFeatureStructure();

-    if (fs instanceof AnnotationFS) {

-      return (AnnotationFS) fs;

-    }

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchesNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchesNode.java
deleted file mode 100755
index 2bc5e6d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchesNode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-

-public class RuleElementMatchesNode extends ExplainAbstractTreeNode implements IEvaluatedNode {

-

-  public RuleElementMatchesNode(IExplainTreeNode parent, FeatureStructure fs, TypeSystem ts) {

-    super(parent, fs, ts);

-  }

-

-  public boolean matched() {

-    boolean result = true;

-    for (IExplainTreeNode each : getChildren()) {

-      if (each instanceof IEvaluatedNode) {

-        result &= ((IEvaluatedNode) each).matched();

-      }

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementRootNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementRootNode.java
deleted file mode 100755
index 6c266eb..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementRootNode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.TypeSystem;

-

-public class RuleElementRootNode extends ExplainAbstractTreeNode implements ExplainRootNode {

-

-  public RuleElementRootNode(IExplainTreeNode parent, TypeSystem ts) {

-    super(parent, null, ts);

-  }

-

-  @Override

-  public String toString() {

-    return "Element";

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleMatchNode.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleMatchNode.java
deleted file mode 100755
index 4ae2b0d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleMatchNode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.explain.tree;

-

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.caseditor.view.tree.IAnnotationNode;

-

-public class RuleMatchNode extends ExplainAbstractTreeNode implements IAnnotationNode {

-

-  public RuleMatchNode(IExplainTreeNode parent, FeatureStructure fs, TypeSystem ts) {

-    super(parent, fs, ts);

-  }

-

-  public AnnotationFS getAnnotation() {

-    FeatureStructure fs = getFeatureStructure();

-    if (fs instanceof AnnotationFS) {

-      return (AnnotationFS) fs;

-    }

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/ExportActionHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/ExportActionHandler.java
deleted file mode 100755
index 0b47b1c..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/ExportActionHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*

- * 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.ruta.query.ui;

-

-import java.util.List;

-

-import org.eclipse.core.commands.AbstractHandler;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.jface.viewers.TableViewer;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class ExportActionHandler extends AbstractHandler {

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    QueryView view = (QueryView) HandlerUtil.getActivePart(event);

-    QueryComposite composite = view.getComposite();

-

-    TableViewer viewer = composite.getResultViewer();

-    Shell shell = HandlerUtil.getActiveShell(event);

-

-    StringBuilder sb = new StringBuilder();

-

-    List<QueryResult> dataList = (List<QueryResult>) viewer.getInput();

-

-    for (QueryResult entry : dataList) {

-      String text = entry.getText();

-      text = text.replaceAll("[\\n\\r]", " ").replaceAll("[\\s]+", " ");

-      sb.append(text);

-      sb.append("\n");

-    }

-

-    ResultListDialog dialog = new ResultListDialog(shell, sb.toString());

-    dialog.open();

-

-    // MessageDialog.openConfirm(shell, "Evaluation Data", text);

-

-    return null;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryActionHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryActionHandler.java
deleted file mode 100755
index 0802700..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryActionHandler.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*

- * 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.ruta.query.ui;

-

-import java.io.File;

-import java.io.FileFilter;

-import java.io.FileInputStream;

-import java.io.IOException;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-import java.util.regex.Pattern;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.cas.FSArray;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.extensions.IRutaActionExtension;

-import org.apache.uima.ruta.extensions.IRutaBlockExtension;

-import org.apache.uima.ruta.extensions.IRutaBooleanFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaConditionExtension;

-import org.apache.uima.ruta.extensions.IRutaNumberFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaStringFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaTypeFunctionExtension;

-import org.apache.uima.ruta.ide.core.RutaExtensionManager;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.IJobChangeEvent;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.core.runtime.jobs.JobChangeAdapter;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class QueryActionHandler implements IHandler {

-

-  private class QueryJobChangeAdapter extends JobChangeAdapter {

-

-    private QueryComposite composite;

-

-    QueryJobChangeAdapter(QueryComposite composite) {

-      super();

-      this.composite = composite;

-    }

-

-    @Override

-    public void done(IJobChangeEvent event) {

-      if (event.getResult().isOK()) {

-        composite.getDisplay().asyncExec(new Runnable() {

-          public void run() {

-            composite.update();

-          }

-        });

-      }

-    }

-  }

-

-  private class QueryHandlerJob extends Job {

-    ExecutionEvent event;

-

-    private boolean recursive;

-

-    private String rules;

-

-    private String typeSystemLocation;

-

-    private String dataLocation;

-

-    private final String fileNameFilter;

-

-    QueryHandlerJob(ExecutionEvent event, String dir, String fileNameFilter, String typeSystem,

-            String rules, boolean recurive) {

-      super(String.format("Query in \"%s\" [filter: \"%s\"] ...", dir, fileNameFilter));

-      this.event = event;

-      this.dataLocation = dir;

-      this.fileNameFilter = fileNameFilter;

-      this.typeSystemLocation = typeSystem;

-      this.rules = rules;

-      this.recursive = recurive;

-      setUser(true);

-    }

-

-    private String getText(File each) {

-      try {

-        return FileUtils.file2String(each, "UTF-8");

-      } catch (IOException e) {

-        DLTKCore.error(e.getMessage(), e);

-      }

-      return "";

-    }

-

-    @Override

-    public IStatus run(IProgressMonitor monitor) {

-      final QueryView queryView = (QueryView) HandlerUtil.getActivePart(event);

-      final QueryComposite queryComposite = queryView.getComposite();

-      // queryView.saveState();

-      queryView.showBusy(true);

-      monitor.beginTask("Initializing analysis engine...", 1);

-      queryComposite.getDisplay().asyncExec(new Runnable() {

-        public void run() {

-          queryComposite.setResult(null);

-        }

-      });

-

-      int files = 0;

-      int found = 0;

-

-      if (monitor.isCanceled())

-        return Status.CANCEL_STATUS;

-

-      final List<QueryResult> result = new ArrayList<QueryResult>();

-      String script = "PACKAGE query;\n\n";

-      // script += "TYPESYSTEM " + typeSystemFileText.getText();

-      script += rules;

-      try {

-        URL aedesc = RutaEngine.class.getResource("BasicEngine.xml");

-        XMLInputSource inae = new XMLInputSource(aedesc);

-        ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(inae);

-        ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

-        AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

-        TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();

-

-        if (!StringUtils.isEmpty(typeSystemLocation)) {

-          // TODO check on valid input and extend for scr

-          String tsLocation = typeSystemLocation;

-          Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();

-          tsds.add(basicTypeSystem);

-          if (typeSystemLocation.endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {

-            IFile iFile = QueryComposite.getIFile(typeSystemLocation);

-            IPath scriptPath = iFile.getLocation();

-            IProject project = iFile.getProject();

-            IPath descriptorRootPath = RutaProjectUtils.getDescriptorRootPath(project);

-            resMgr.setDataPath(descriptorRootPath.toPortableString());

-            IPath path = RutaProjectUtils.getTypeSystemDescriptorPath(scriptPath, project);

-            tsLocation = path.toPortableString();

-          }

-          File tsFile = new File(tsLocation);

-          XMLInputSource ints = new XMLInputSource(tsFile);

-          TypeSystemDescription importTSD = UIMAFramework.getXMLParser()

-                  .parseTypeSystemDescription(ints);

-          importTSD.resolveImports(resMgr);

-          tsds.add(importTSD);

-          TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);

-          aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);

-        }

-        aed.resolveImports(resMgr);

-        AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed, resMgr, null);

-        File tempFile = File.createTempFile("RutaQuery", RutaEngine.SCRIPT_FILE_EXTENSION);

-        tempFile.deleteOnExit();

-        FileUtils.saveString2File(script, tempFile, "UTF-8");

-        String portableString = Path.fromOSString(tempFile.getParentFile().getPath())

-                .toPortableString();

-        ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { portableString });

-        String name = tempFile.getName().substring(0, tempFile.getName().length() - 5);

-        ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, name);

-

-        ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG, true);

-        ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG_WITH_MATCHES, true);

-        ae.setConfigParameterValue(RutaEngine.PARAM_PROFILE, false);

-        ae.setConfigParameterValue(RutaEngine.PARAM_STATISTICS, false);

-

-        IRutaConditionExtension[] conditionExtensions = RutaExtensionManager.getDefault()

-                .getRutaConditionExtensions();

-        IRutaActionExtension[] actionExtensions = RutaExtensionManager.getDefault()

-                .getRutaActionExtensions();

-        IRutaBooleanFunctionExtension[] booleanFunctionExtensions = RutaExtensionManager

-                .getDefault().getRutaBooleanFunctionExtensions();

-        IRutaNumberFunctionExtension[] numberFunctionExtensions = RutaExtensionManager.getDefault()

-                .getRutaNumberFunctionExtensions();

-        IRutaStringFunctionExtension[] stringFunctionExtensions = RutaExtensionManager.getDefault()

-                .getRutaStringFunctionExtensions();

-        IRutaTypeFunctionExtension[] typeFunctionExtensions = RutaExtensionManager.getDefault()

-                .getRutaTypeFunctionExtensions();

-        IRutaBlockExtension[] blockExtensions = RutaExtensionManager.getDefault()

-                .getRutaBlockExtensions();

-

-        List<String> languageExtensions = new ArrayList<String>();

-

-        for (IRutaConditionExtension each : conditionExtensions) {

-          languageExtensions.add(each.getClass().getName());

-        }

-        for (IRutaActionExtension each : actionExtensions) {

-          languageExtensions.add(each.getClass().getName());

-        }

-        for (IRutaBooleanFunctionExtension each : booleanFunctionExtensions) {

-          languageExtensions.add(each.getClass().getName());

-        }

-        for (IRutaNumberFunctionExtension each : numberFunctionExtensions) {

-          languageExtensions.add(each.getClass().getName());

-        }

-        for (IRutaStringFunctionExtension each : stringFunctionExtensions) {

-          languageExtensions.add(each.getClass().getName());

-        }

-        for (IRutaTypeFunctionExtension each : typeFunctionExtensions) {

-          languageExtensions.add(each.getClass().getName());

-        }

-        for (IRutaBlockExtension each : blockExtensions) {

-          languageExtensions.add(each.getClass().getName());

-        }

-        ae.setConfigParameterValue(RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,

-                languageExtensions.toArray(new String[0]));

-

-        ae.reconfigure();

-        CAS cas = ae.newCAS();

-

-        monitor.worked(1);

-

-        if (monitor.isCanceled()) {

-          if (ae != null) {

-            ae.destroy();

-          }

-          if (cas != null) {

-            cas.release();

-          }

-          return Status.CANCEL_STATUS;

-        }

-

-        File dir = new File(dataLocation);

-        List<File> inputFiles = getFiles(dir, recursive);

-        monitor.beginTask("Query in " + dir.getName() + "...", inputFiles.size());

-

-        for (File each : inputFiles) {

-

-          monitor.setTaskName("Query in " + each.getName() + "...");

-

-          if (monitor.isCanceled()) {

-            if (ae != null) {

-              ae.destroy();

-            }

-            if (cas != null) {

-              cas.release();

-            }

-            return Status.CANCEL_STATUS;

-          }

-

-          cas.reset();

-          if (each.getName().endsWith("xmi")) {

-            XmiCasDeserializer.deserialize(new FileInputStream(each), cas, true);

-          } else {

-            cas.setDocumentText(getText(each));

-          }

-

-          Type matchedType = cas.getTypeSystem().getType(

-                  "org.apache.uima.ruta.type.DebugMatchedRuleMatch");

-          Type ruleApplyType = cas.getTypeSystem().getType(

-                  "org.apache.uima.ruta.type.DebugRuleApply");

-          Type blockApplyType = cas.getTypeSystem().getType(

-                  "org.apache.uima.ruta.type.DebugBlockApply");

-

-          removeDebugAnnotations(cas, matchedType, ruleApplyType, blockApplyType);

-

-          ae.process(cas);

-

-          Feature innerApplyFeature = blockApplyType.getFeatureByBaseName("innerApply");

-          Feature ruleApplyFeature = blockApplyType.getFeatureByBaseName("rules");

-          FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(blockApplyType).iterator();

-          boolean foundOne = false;

-          while (iterator.isValid()) {

-            if (monitor.isCanceled()) {

-              if (ae != null) {

-                ae.destroy();

-              }

-              if (cas != null) {

-                cas.release();

-              }

-              return Status.CANCEL_STATUS;

-            }

-            AnnotationFS fs = iterator.get();

-            int find = findRuleMatches(result, fs, each, queryComposite, matchedType,

-                    ruleApplyType, blockApplyType, innerApplyFeature, ruleApplyFeature);

-            iterator.moveToNext();

-            found += find;

-            if (!foundOne && find > 0) {

-              foundOne = true;

-              files++;

-            }

-

-            final int constFound = found;

-            final int constFiles = files;

-            queryComposite.getDisplay().syncExec(new Runnable() {

-              public void run() {

-                queryComposite.setResult(result);

-                queryComposite.setResultInfo(constFound, constFiles);

-              }

-            });

-

-          }

-

-          monitor.worked(1);

-        }

-        cas.release();

-        ae.destroy();

-        monitor.done();

-      } catch (Exception e) {

-        // report error in query view:

-        queryComposite.getDisplay().syncExec(new Runnable() {

-          public void run() {

-            queryComposite.setRutaQuerySyntaxError(true);

-          }

-        });

-        RutaAddonsPlugin.error(e);

-      }

-

-      return Status.OK_STATUS;

-

-    }

-

-    public List<File> getFiles(File dir, boolean recusive) {

-      List<File> result = new ArrayList<File>();

-      if (fileNameFilter == null) {

-        return result;

-      }

-      FileFilter fileFilter = new FileFilter() {

-

-        public boolean accept(File pathname) {

-          if (Pattern.matches(fileNameFilter, pathname.getName())) {

-            return true;

-          }

-          return false;

-        }

-      };

-      for (File each : dir.listFiles(fileFilter)) {

-        result.add(each);

-      }

-      if (recusive) {

-        for (File subdir : dir.listFiles(new FileFilter() {

-

-          public boolean accept(File pathname) {

-            return pathname.isDirectory();

-          }

-        })) {

-          result.addAll(getFiles(subdir, recusive));

-        }

-      }

-      return result;

-    }

-

-    private void removeDebugAnnotations(CAS cas, Type matchedType, Type ruleApplyType,

-            Type blockApplyType) {

-      Collection<AnnotationFS> toRemove = new ArrayList<AnnotationFS>();

-      AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(blockApplyType);

-      for (AnnotationFS annotationFS : annotationIndex) {

-        toRemove.add(annotationFS);

-      }

-      annotationIndex = cas.getAnnotationIndex(ruleApplyType);

-      for (AnnotationFS annotationFS : annotationIndex) {

-        toRemove.add(annotationFS);

-      }

-      annotationIndex = cas.getAnnotationIndex(matchedType);

-      for (AnnotationFS annotationFS : annotationIndex) {

-        toRemove.add(annotationFS);

-      }

-      for (AnnotationFS annotationFS : toRemove) {

-        cas.removeFsFromIndexes(annotationFS);

-      }

-    }

-

-    public int findRuleMatches(final List<QueryResult> result, AnnotationFS fs, File file,

-            final QueryComposite queryComposite, Type matchedType, Type ruleApplyType,

-            Type blockApplyType, Feature innerApplyFeature, Feature ruleApplyFeature) {

-      int ret = 0;

-      if (fs.getType().equals(blockApplyType)) {

-        FeatureStructure featureValue = fs.getFeatureValue(innerApplyFeature);

-        FSArray array = (FSArray) featureValue;

-        for (int i = 0; i < array.size(); i++) {

-          AnnotationFS eachApply = (AnnotationFS) array.get(i);

-          ret += findRuleMatches(result, eachApply, file, queryComposite, matchedType,

-                  ruleApplyType, blockApplyType, innerApplyFeature, ruleApplyFeature);

-        }

-      } else if (fs.getType().equals(ruleApplyType)) {

-        FeatureStructure featureValue = fs.getFeatureValue(ruleApplyFeature);

-        FSArray array = (FSArray) featureValue;

-        for (int i = 0; i < array.size(); i++) {

-          AnnotationFS eachApply = (AnnotationFS) array.get(i);

-          ret += findRuleMatches(result, eachApply, file, queryComposite, matchedType,

-                  ruleApplyType, blockApplyType, innerApplyFeature, ruleApplyFeature);

-        }

-      } else if (fs.getType().equals(matchedType)) {

-        result.add(new QueryResult(fs.getBegin(), fs.getEnd(), fs.getCoveredText(), file));

-        ret += 1;

-

-      }

-      return ret;

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-

-    QueryView queryView = (QueryView) HandlerUtil.getActivePart(event);

-    QueryComposite queryComposite = queryView.getComposite();

-

-    String dir = queryComposite.getDataDirectory();

-    String fileNameFilter = queryComposite.getFileFilter();

-    String typesystem = queryComposite.getTypeSystem();

-    String script = queryComposite.getScript();

-    boolean recurive = queryComposite.isRecursive();

-    QueryHandlerJob job = new QueryHandlerJob(event, dir, fileNameFilter, typesystem, script,

-            recurive);

-

-    job.addJobChangeListener(new QueryJobChangeAdapter(queryComposite) {

-    });

-

-    job.schedule();

-

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryComposite.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryComposite.java
deleted file mode 100755
index 5d74c28..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryComposite.java
+++ /dev/null
@@ -1,665 +0,0 @@
-/*

- * 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.ruta.query.ui;

-

-import java.io.File;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.regex.Pattern;

-import java.util.regex.PatternSyntaxException;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.core.RutaLanguageToolkit;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer;

-import org.eclipse.dltk.ui.DLTKUILanguageManager;

-import org.eclipse.dltk.ui.IDLTKUILanguageToolkit;

-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;

-import org.eclipse.dltk.ui.text.ScriptTextTools;

-import org.eclipse.jface.fieldassist.ControlDecoration;

-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.text.Document;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.ITextListener;

-import org.eclipse.jface.text.TextEvent;

-import org.eclipse.jface.viewers.DoubleClickEvent;

-import org.eclipse.jface.viewers.IDoubleClickListener;

-import org.eclipse.jface.viewers.ISelectionChangedListener;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.SelectionChangedEvent;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.jface.viewers.TableViewer;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.custom.ScrolledComposite;

-import org.eclipse.swt.dnd.Clipboard;

-import org.eclipse.swt.dnd.DND;

-import org.eclipse.swt.dnd.DropTarget;

-import org.eclipse.swt.dnd.DropTargetAdapter;

-import org.eclipse.swt.dnd.DropTargetEvent;

-import org.eclipse.swt.dnd.FileTransfer;

-import org.eclipse.swt.dnd.TextTransfer;

-import org.eclipse.swt.dnd.Transfer;

-import org.eclipse.swt.events.KeyEvent;

-import org.eclipse.swt.events.KeyListener;

-import org.eclipse.swt.events.ModifyEvent;

-import org.eclipse.swt.events.ModifyListener;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.layout.FillLayout;

-import org.eclipse.swt.layout.FormAttachment;

-import org.eclipse.swt.layout.FormData;

-import org.eclipse.swt.layout.FormLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.DirectoryDialog;

-import org.eclipse.swt.widgets.FileDialog;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.TableItem;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.ui.IEditorInput;

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.IMemento;

-import org.eclipse.ui.IWorkbenchPage;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.part.FileEditorInput;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class QueryComposite extends org.eclipse.swt.widgets.Composite implements

-        ISelectionChangedListener {

-  protected ScriptSourceViewer viewer;

-

-  private HashMap<String, Image> images;

-

-  private Button dirButton;

-

-  private Text inputDirectoryText;

-

-  private Label label1;

-

-  private Label labelTypeSystem;

-

-  private Text typeSystemFileText;

-

-  private Button fileChooseButton;

-

-  private Button recursiveButton;

-

-  // private Button startButton;

-

-  private TableViewer resultViewer;

-

-  private Label resultLabel;

-

-  private Label labelFileFilter;

-

-  private Text inputPatternText;

-

-  private ControlDecoration decoFileFilterPattern;

-

-  private ControlDecoration decoQueryRules;

-

-  private Clipboard clipboard;

-

-  public QueryComposite(Composite parent, int style) {

-    super(parent, style);

-    // initImages();

-    clipboard = new Clipboard(parent.getDisplay());

-    initGUI();

-

-    ScrolledComposite sComp = new ScrolledComposite(parent, SWT.BORDER | SWT.V_SCROLL

-            | SWT.H_SCROLL);

-    this.setParent(sComp);

-    sComp.setMinSize(this.getSize());

-    sComp.setContent(this);

-    sComp.setExpandHorizontal(true);

-    sComp.setExpandVertical(true);

-  }

-

-  private void initGUI() {

-    try {

-      this.setLayout(new FormLayout());

-      this.setSize(600, 380);

-

-      // first row

-

-      label1 = new Label(this, SWT.NONE);

-      FormData label1LData = new FormData();

-      label1LData.left = new FormAttachment(0, 1000, 12);

-      label1LData.top = new FormAttachment(0, 1000, 10);

-      label1LData.width = 70;

-      label1.setLayoutData(label1LData);

-      label1.setText("Query Data:");

-

-      inputDirectoryText = new Text(this, SWT.SINGLE | SWT.BORDER);

-      FormData inputDirectoryTexLData = new FormData();

-      inputDirectoryTexLData.width = 150;

-      inputDirectoryTexLData.left = new FormAttachment(label1, 10);

-      inputDirectoryTexLData.top = new FormAttachment(0, 1000, 10);

-      inputDirectoryTexLData.right = new FormAttachment(1000, 1000, -65);

-      inputDirectoryText.setLayoutData(inputDirectoryTexLData);

-      inputDirectoryText.setText("");

-      inputDirectoryText.addModifyListener(new ModifyListener() {

-        public void modifyText(ModifyEvent e) {

-          // without that listener, the text fields forget the

-          // last change when leaving with tab! don't know why!

-          // we also MUST call getText() otherwise the changes in

-          // the field are lost (what is this???!!)

-          Text t = (Text) e.widget;

-          t.getText();

-        }

-      });

-

-      dirButton = new Button(this, SWT.PUSH | SWT.CENTER);

-      FormData dirButtoLData = new FormData();

-      dirButtoLData.width = 25;

-      dirButtoLData.height = 25;

-      dirButtoLData.top = new FormAttachment(0, 1000, 8);

-      dirButtoLData.right = new FormAttachment(1000, 1000, -35);

-      dirButton.setLayoutData(dirButtoLData);

-      Image folderIcon = getImage("folder");

-      dirButton.setImage(folderIcon);

-      dirButton.addSelectionListener(new SelectionAdapter() {

-        @Override

-        public void widgetSelected(SelectionEvent event) {

-          DirectoryDialog dlg = new DirectoryDialog(getShell());

-          dlg.setFilterPath(inputDirectoryText.getText());

-          dlg.setText("Input Directory");

-          dlg.setMessage("Select a directory with input XMI files.");

-          String dir = dlg.open();

-          if (dir != null) {

-            inputDirectoryText.setText(dir);

-          }

-        }

-      });

-

-      recursiveButton = new Button(this, SWT.CHECK | SWT.LEFT);

-      FormData recuriveButtonLData = new FormData();

-      recuriveButtonLData.width = 20;

-      recuriveButtonLData.height = 18;

-      recuriveButtonLData.top = new FormAttachment(0, 1000, 10);

-      recuriveButtonLData.right = new FormAttachment(1000, 1000, -10);

-      recursiveButton.setLayoutData(recuriveButtonLData);

-      recursiveButton.setSelection(true);

-

-      // next row

-

-      FormAttachment top2 = new FormAttachment(label1, 10);

-      labelFileFilter = new Label(this, SWT.NONE);

-      FormData label2LData = new FormData();

-      label2LData.left = new FormAttachment(0, 1000, 12);

-      label2LData.top = top2; // new FormAttachment(0, 1000, 34);

-      label2LData.width = 70;

-      labelFileFilter.setLayoutData(label2LData);

-      labelFileFilter.setText("File Filter:");

-

-      inputPatternText = new Text(this, SWT.SINGLE | SWT.BORDER);

-      FormData inputPatternTextData = new FormData();

-      inputPatternTextData.width = 150;

-      inputPatternTextData.left = new FormAttachment(labelFileFilter, 10);

-      inputPatternTextData.top = top2;

-      inputPatternTextData.right = new FormAttachment(1000, 1000, -65);

-      inputPatternText.setLayoutData(inputPatternTextData);

-      inputPatternText.setText(".+\\.xmi");

-

-      decoFileFilterPattern = new ControlDecoration(this.inputPatternText, SWT.TOP | SWT.LEFT);

-      Image imageError = FieldDecorationRegistry.getDefault()

-              .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage();

-      decoFileFilterPattern

-              .setDescriptionText("PatternSyntaxException for this regular expression.");

-      decoFileFilterPattern.setImage(imageError);

-      decoFileFilterPattern.hide();

-      inputPatternText.addModifyListener(new ModifyListener() {

-        public void modifyText(ModifyEvent e) {

-          // without that listener, the text fields forget the

-          // last change when leaving with tab! don't know why!

-          // we also MUST call getText() otherwise the changes in

-          // the field are lost (what is this???!!)

-          Text t = (Text) e.widget;

-          decoFileFilterPattern.hide();

-        }

-      });

-

-      // next row

-

-      FormAttachment top3 = new FormAttachment(labelFileFilter, 10);

-      labelTypeSystem = new Label(this, SWT.NONE);

-      FormData label3LData = new FormData();

-      label3LData.width = 70;

-      label3LData.left = new FormAttachment(0, 1000, 12);

-      label3LData.top = top3;

-      labelTypeSystem.setLayoutData(label3LData);

-      labelTypeSystem.setText("Type System:");

-

-      typeSystemFileText = new Text(this, SWT.SINGLE | SWT.BORDER);

-      FormData preFileTexLData = new FormData();

-      preFileTexLData.width = 150;

-      preFileTexLData.left = new FormAttachment(labelTypeSystem, 10);

-      preFileTexLData.top = top3;

-      preFileTexLData.right = new FormAttachment(1000, 1000, -65);

-      typeSystemFileText.setLayoutData(preFileTexLData);

-      typeSystemFileText.setText("");

-      typeSystemFileText.addModifyListener(new ModifyListener() {

-        public void modifyText(ModifyEvent e) {

-          // without that listener, the text fields forget the

-          // last change when leaving with tab! don't know why!

-          // we also MUST call getText() otherwise the changes in

-          // the field are lost (what is this???!!)

-          Text t = (Text) e.widget;

-          t.getText();

-        }

-      });

-

-      fileChooseButton = new Button(this, SWT.PUSH | SWT.CENTER);

-      FormData fileChooseButtoLData = new FormData();

-      fileChooseButtoLData.width = 25;

-      fileChooseButtoLData.height = 25;

-      fileChooseButtoLData.top = top3;

-      fileChooseButtoLData.right = new FormAttachment(1000, 1000, -35);

-      fileChooseButton.setLayoutData(fileChooseButtoLData);

-      Image icon = getImage("prepFolder");

-      fileChooseButton.setImage(icon);

-      fileChooseButton.addSelectionListener(new SelectionAdapter() {

-        @Override

-        public void widgetSelected(SelectionEvent event) {

-          FileDialog fd = new FileDialog(getShell(), SWT.OPEN);

-          fd.setText("Choose Type System Descriptor or Ruta Script");

-          String[] filterExt = { "*.ruta", "*.*" };

-          fd.setFilterExtensions(filterExt);

-          String file = fd.open();

-          if (file != null) {

-            typeSystemFileText.setText(file);

-          }

-        }

-      });

-

-      // next row: query rules

-

-      FormAttachment top4 = new FormAttachment(labelTypeSystem, 10);

-      Composite compositeQueryRules = new Composite(this, SWT.NULL);

-      FormData compData = new FormData();

-      compData.height = 100;

-      compData.left = new FormAttachment(0, 1000, 10);

-      compData.top = top4;

-      compData.right = new FormAttachment(1000, 1000, -10);

-      compositeQueryRules.setLayoutData(compData);

-      compositeQueryRules.setLayout(new FillLayout());

-      IDLTKUILanguageToolkit toolkit = DLTKUILanguageManager.getLanguageToolkit(RutaLanguageToolkit

-              .getDefault().getNatureId());

-      final ScriptTextTools textTools = toolkit.getTextTools();

-      IPreferenceStore store = toolkit.getCombinedPreferenceStore();

-      viewer = new ScriptSourceViewer(compositeQueryRules, null, null, false, SWT.H_SCROLL

-              | SWT.V_SCROLL | SWT.BORDER, store);

-

-      ScriptSourceViewerConfiguration configuration = textTools.createSourceViewerConfiguraton(

-              store, (ITextEditor) null);

-      viewer.configure(configuration);

-      setInformation("");

-      compositeQueryRules.layout();

-

-      viewer.addTextListener(new ITextListener() {

-

-        public void textChanged(TextEvent arg0) {

-          setRutaQuerySyntaxError(false);

-        }

-      });

-

-      decoQueryRules = new ControlDecoration(compositeQueryRules, SWT.TOP | SWT.LEFT);

-      decoQueryRules.setDescriptionText("Could not run query, maybe illegal Ruta rule syntax.");

-      decoQueryRules.setImage(imageError);

-      decoQueryRules.hide();

-      // TODO

-      // inputPatternText.addModifyListener(new ModifyListener() {

-      // public void modifyText(ModifyEvent e) {

-      // // without that listener, the text fields forget the

-      // // last change when leaving with tab! don't know why!

-      // // we also MUST call getText() otherwise the changes in

-      // // the field are lost (what is this???!!)

-      // Text t = (Text) e.widget;

-      // decoPattern.hide();

-      // }

-      // });

-

-      // next row: query results

-

-      FormAttachment top5 = new FormAttachment(compositeQueryRules, 10);

-

-      resultLabel = new Label(this, SWT.NONE);

-      FormData resultLabelData = new FormData();

-      resultLabelData.left = new FormAttachment(0, 1000, 12);

-      resultLabelData.top = top5;

-      resultLabelData.width = 300;

-      resultLabel.setLayoutData(resultLabelData);

-      resultLabel.setText("Result:");

-

-      Composite composite2 = new Composite(this, SWT.NONE);

-      FormData comp2Data = new FormData();

-      // comp2Data.width = 300;

-      // comp2Data.height = 200;

-      comp2Data.left = new FormAttachment(0, 1000, 10);

-      comp2Data.top = new FormAttachment(resultLabel, 10);

-      comp2Data.right = new FormAttachment(1000, 1000, -10);

-      comp2Data.bottom = new FormAttachment(1000, 1000, -10);

-      // compData.left = new FormAttachment(0, 1000, 12);

-      // compData.top = new FormAttachment(0, 1000, 70);

-      // compData.bottom = new FormAttachment(0, 1000, -10);

-      // compData.right = new FormAttachment(1000, 1000, -10);

-      // compData.width = 109;

-      // composite2.setSize(500, 500);

-      // composite.setBackground(new Color(getDisplay(), 128, 0, 0));

-      composite2.setLayoutData(comp2Data);

-      composite2.setLayout(new FillLayout());

-

-      resultViewer = new TableViewer(composite2, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER

-              | SWT.MULTI);

-      final QueryResultLabelProvider queryResultLabelProvider = new QueryResultLabelProvider();

-      resultViewer.setLabelProvider(queryResultLabelProvider);

-      resultViewer.setContentProvider(new QueryResultContentProvider());

-      resultViewer.addSelectionChangedListener(this);

-      resultViewer.getTable().addKeyListener(new KeyListener() {

-

-        public void keyPressed(KeyEvent e) {

-          if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {

-            String output = "";

-            TableItem[] items = resultViewer.getTable().getSelection();

-            for (TableItem item : items) {

-              QueryResult data = (QueryResult) item.getData();

-              if (output.length() != 0) {

-                output += System.getProperty("line.separator");

-              }

-              output += queryResultLabelProvider.getText(data);

-            }

-            clipboard.setContents(new Object[] { output },

-                    new Transfer[] { TextTransfer.getInstance() });

-          }

-        }

-

-        public void keyReleased(KeyEvent arg0) {

-        }

-      });

-      resultViewer.addDoubleClickListener(new IDoubleClickListener() {

-        public void doubleClick(DoubleClickEvent event) {

-          Object obj = event.getSelection();

-          if (obj instanceof IStructuredSelection) {

-            StructuredSelection selection = (StructuredSelection) obj;

-            Iterator<?> iterator = selection.iterator();

-            while (iterator.hasNext()) {

-              Object element = iterator.next();

-              if (element instanceof QueryResult) {

-                QueryResult data = (QueryResult) element;

-                if (data.getFile() != null) {

-                  openInCasEditor(data.getFile(), data.getBegin(), data.getEnd());

-                }

-              }

-            }

-          }

-

-        }

-      });

-      composite2.layout();

-

-      this.layout();

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-    }

-

-    DropTarget dt = new DropTarget(inputDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);

-    dt.setTransfer(new Transfer[] { FileTransfer.getInstance() });

-    dt.addDropListener(new DropTargetAdapter() {

-      @Override

-      public void drop(DropTargetEvent event) {

-        String fileList[] = null;

-        FileTransfer ft = FileTransfer.getInstance();

-        if (ft.isSupportedType(event.currentDataType)) {

-          fileList = (String[]) event.data;

-        }

-        if (fileList != null && fileList.length > 0)

-          inputDirectoryText.setText(fileList[0]);

-      }

-    });

-

-    DropTarget dt2 = new DropTarget(typeSystemFileText, DND.DROP_DEFAULT | DND.DROP_MOVE);

-    dt2.setTransfer(new Transfer[] { FileTransfer.getInstance() });

-    dt2.addDropListener(new DropTargetAdapter() {

-      @Override

-      public void drop(DropTargetEvent event) {

-        String fileList[] = null;

-        FileTransfer ft = FileTransfer.getInstance();

-        if (ft.isSupportedType(event.currentDataType)) {

-          fileList = (String[]) event.data;

-        }

-        if (fileList != null && fileList.length > 0)

-          typeSystemFileText.setText(fileList[0]);

-      }

-    });

-

-  }

-

-  public void setResultInfo(int found, int files) {

-    resultLabel.setText("Result: found " + found + " matches in " + files + " documents");

-  }

-

-  public void saveState(IMemento memento) {

-

-    memento.createChild("inputDirectory", inputDirectoryText.getText());

-    memento.createChild("fileFilter", inputPatternText.getText());

-    memento.createChild("typeSystemLocation", typeSystemFileText.getText());

-    memento.createChild("query", viewer.getDocument().get());

-    memento.createChild("recursive", Boolean.toString(recursiveButton.getSelection()));

-  }

-

-  public void restoreState(IMemento memento) {

-    if (memento == null)

-      return;

-

-    IMemento tsName = memento.getChild("typeSystemLocation");

-    if (tsName != null) {

-      typeSystemFileText.setText(tsName.getID());

-    }

-

-    IMemento dir = memento.getChild("inputDirectory");

-    if (dir != null) {

-      inputDirectoryText.setText(dir.getID());

-    }

-

-    IMemento fileFilterMemento = memento.getChild("fileFilter");

-    if (fileFilterMemento != null) {

-      inputPatternText.setText(fileFilterMemento.getID());

-    }

-

-    IMemento query = memento.getChild("query");

-    if (query != null) {

-      setInformation(query.getID());

-    }

-

-    IMemento recursive = memento.getChild("recursive");

-    if (recursive != null) {

-      boolean isRecursive = recursive.getID().equals("true");

-      recursiveButton.setSelection(isRecursive);

-    }

-  }

-

-  protected void openInCasEditor(File file, int begin, int end) {

-    if (file == null) {

-      return;

-    }

-    String absolutePath = file.getAbsolutePath();

-    try {

-      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();

-      IFile ifile = getIFile(absolutePath);

-      AnnotationEditor editor = (AnnotationEditor) page.openEditor(new FileEditorInput(ifile),

-              "org.apache.uima.caseditor.editor");

-      editor.selectAndReveal(begin, end - begin);

-    } catch (PartInitException e) {

-      RutaAddonsPlugin.error(e);

-    }

-  }

-

-  public static IFile getIFile(String location) {

-    IPath s = Path.fromOSString(location);

-    IWorkspace workspace = ResourcesPlugin.getWorkspace();

-    IFile ifile = workspace.getRoot().getFileForLocation(s);

-    return ifile;

-  }

-

-  public void setInformation(String content) {

-    if (content == null) {

-      viewer.setInput(null);

-      return;

-    }

-    IDocument doc = new Document(content);

-    IDLTKUILanguageToolkit uiToolkit = DLTKUILanguageManager.getLanguageToolkit(RutaLanguageToolkit

-            .getDefault().getNatureId());

-    ScriptTextTools textTools = uiToolkit.getTextTools();

-    if (textTools != null) {

-      textTools.setupDocumentPartitioner(doc, uiToolkit.getPartitioningId());

-    }

-    viewer.setInput(doc);

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/folder_edit.png");

-    image = desc.createImage();

-    name = "prepFolder";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/folder.png");

-    image = desc.createImage();

-    name = "folder";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/start.png");

-    image = desc.createImage();

-    name = "start";

-    images.put(name, image);

-

-    desc = RutaAddonsPlugin.getImageDescriptor("/icons/stop.gif");

-    image = desc.createImage();

-    name = "stop";

-    images.put(name, image);

-

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    if (images != null) {

-      for (Image each : images.values()) {

-        each.dispose();

-      }

-    }

-  }

-

-  public String getDataDirectory() {

-    return inputDirectoryText.getText().trim();

-  }

-

-  public String getFileFilter() {

-    String string = inputPatternText.getText().trim();

-    try {

-      Pattern.compile(string);

-      this.decoFileFilterPattern.hide();

-      return string;

-    } catch (PatternSyntaxException e) {

-      this.decoFileFilterPattern.show();

-      return "";

-    }

-  }

-

-  public String getTypeSystem() {

-    return typeSystemFileText.getText().trim();

-  }

-

-  public String getScript() {

-    return viewer.getDocument().get();

-  }

-

-  public boolean isRecursive() {

-    return recursiveButton.getSelection();

-  }

-

-  public void setResult(Object object) {

-    resultViewer.setInput(object);

-    resultViewer.refresh();

-  }

-

-  public TableViewer getResultViewer() {

-    return resultViewer;

-  }

-

-  public void selectionChanged(SelectionChangedEvent event) {

-    if (event.getSelectionProvider().equals(resultViewer)) {

-      StructuredSelection selection = (StructuredSelection) event.getSelection();

-      QueryResult data = (QueryResult) selection.getFirstElement();

-      IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();

-      IEditorPart activeEditor = page.getActiveEditor();

-      if (activeEditor instanceof AnnotationEditor) {

-        AnnotationEditor ae = (AnnotationEditor) activeEditor;

-        IEditorInput editorInput = ae.getEditorInput();

-        if (editorInput instanceof FileEditorInput) {

-          FileEditorInput fei = (FileEditorInput) editorInput;

-          IFile file = fei.getFile();

-          if (data != null && file.getLocationURI().equals(data.getFile().toURI())) {

-            int begin = data.getBegin();

-            int end = data.getEnd();

-            ae.selectAndReveal(begin, end - begin);

-          }

-        }

-      }

-    }

-  }

-

-  public void setInputDirectory(String absolutePath) {

-    inputDirectoryText.setText(absolutePath);

-  }

-

-  public void setTypeSystem(String typeSystemLocation) {

-    typeSystemFileText.setText(typeSystemLocation);

-  }

-

-  public void setRutaQuerySyntaxError(boolean hasError) {

-    if (hasError) {

-      this.decoQueryRules.show();

-    } else {

-      this.decoQueryRules.hide();

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResult.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResult.java
deleted file mode 100755
index 1d3f923..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResult.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*

- * 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.ruta.query.ui;

-

-import java.io.File;

-

-public class QueryResult {

-

-  private final int begin;

-

-  private final int end;

-

-  private final File file;

-

-  private final String text;

-

-  public QueryResult(int begin, int end, String text, File file) {

-    super();

-    this.begin = begin;

-    this.end = end;

-    this.text = text;

-    this.file = file;

-  }

-

-  public File getFile() {

-    return file;

-  }

-

-  public int getEnd() {

-    return end;

-  }

-

-  public int getBegin() {

-    return begin;

-  }

-

-  public String getText() {

-    return text;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResultContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResultContentProvider.java
deleted file mode 100755
index f457604..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResultContentProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.query.ui;

-

-import java.util.ArrayList;

-

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-public class QueryResultContentProvider implements IStructuredContentProvider {

-

-  public void dispose() {

-

-  }

-

-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-

-  }

-

-  public Object[] getElements(Object inputElement) {

-    return ((ArrayList<?>) inputElement).toArray();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResultLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResultLabelProvider.java
deleted file mode 100755
index a2e2e4c..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryResultLabelProvider.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*

- * 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.ruta.query.ui;

-

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.ILabelProviderListener;

-import org.eclipse.swt.graphics.Image;

-

-public class QueryResultLabelProvider implements ILabelProvider {

-  public Image getImage(Object element) {

-    return null;

-  }

-

-  public String getText(Object element) {

-    if (element instanceof QueryResult) {

-      QueryResult qr = (QueryResult) element;

-      String text = qr.getText();

-      // if (text.length() > 100) {

-      // text = text.substring(0, 100) + "...";

-      // }

-      text += " (in " + qr.getFile().getName() + ")";

-      return text;

-    }

-    return "error";

-  }

-

-  public void addListener(ILabelProviderListener listener) {

-

-  }

-

-  public void dispose() {

-  }

-

-  public boolean isLabelProperty(Object element, String property) {

-    return false;

-  }

-

-  public void removeListener(ILabelProviderListener listener) {

-

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryView.java
deleted file mode 100755
index e2c1592..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryView.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.ruta.query.ui;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-
-public class QueryView extends ViewPart {
-
-  public static final String ID = "org.apache.uima.ruta.query.ui.ScriptQueryView";
-
-  private QueryComposite viewContent;
-
-  private IMemento memento;
-
-  public QueryView() {
-    super();
-  }
-
-  @Override
-  public void createPartControl(Composite parent) {
-    viewContent = new QueryComposite(parent, SWT.NULL);
-    if (memento != null) {
-      viewContent.restoreState(memento);
-      memento = null;
-    }
-  }
-
-  public void setViewTitle(String title) {
-    setPartName(title);
-  }
-
-  @Override
-  public void setFocus() {
-    viewContent.setFocus();
-  }
-
-  @Override
-  public void saveState(IMemento memento) {
-    viewContent.saveState(memento);
-  }
-
-  @Override
-  public void init(IViewSite site, IMemento memento) throws PartInitException {
-    this.memento = memento;
-    super.init(site, memento);
-  }
-
-  public QueryComposite getComposite() {
-    return viewContent;
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/ResultListDialog.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/ResultListDialog.java
deleted file mode 100755
index 3c198e9..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/ResultListDialog.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.ruta.query.ui;
-
-import org.eclipse.jface.window.ApplicationWindow;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-public class ResultListDialog extends ApplicationWindow {
-
-  Composite overlay;
-
-  String data;
-
-  public ResultListDialog(Shell parentShell, String data) {
-    super(parentShell);
-    this.data = data;
-  }
-
-  @Override
-  protected Control createContents(Composite parent) {
-    GridLayout layout = new GridLayout();
-    parent.setLayout(layout);
-    parent.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-    Text text = new Text(parent, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
-    text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
-    text.setText("No data aviable");
-    text.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-    if (text != null) {
-      text.setText(data);
-    }
-    return parent;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/searchStrategy/DescriptorFolderSearchStrategy.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/searchStrategy/DescriptorFolderSearchStrategy.java
deleted file mode 100755
index 253c231..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/searchStrategy/DescriptorFolderSearchStrategy.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*

- * 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.ruta.searchStrategy;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-import java.util.Set;

-import java.util.TreeSet;

-

-import org.apache.uima.caseditor.ide.TypeSystemLocationPropertyPage;

-import org.apache.uima.caseditor.ide.searchstrategy.ITypeSystemSearchStrategy;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IProjectNature;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.jface.viewers.Viewer;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.ui.dialogs.ListDialog;

-

-public class DescriptorFolderSearchStrategy implements ITypeSystemSearchStrategy {

-

-  private List<IFile> collectTypeSystems(IFolder folder) throws CoreException {

-    List<IFile> result = new ArrayList<IFile>();

-    for (IResource each : folder.members()) {

-      if (each instanceof IFolder) {

-        result.addAll(collectTypeSystems((IFolder) each));

-      } else if (each instanceof IFile && each.getFileExtension() != null

-              && each.getFileExtension().equals("xml")) {

-        result.add((IFile) each);

-      }

-    }

-    return result;

-  }

-

-  public IFile findTypeSystem(IFile casFile) {

-    IProject project = casFile.getProject();

-

-    IFile typeSystemLocation = TypeSystemLocationPropertyPage.getTypeSystemLocation(project);

-    if (typeSystemLocation != null && !typeSystemLocation.getName().equals("TypeSystem.xml")) {

-      // do not override the properties!

-      return null;

-    }

-

-    try {

-      IProjectNature nature = project.getNature(RutaNature.NATURE_ID);

-      if (!(nature instanceof RutaNature)) {

-        return null;

-      }

-    } catch (CoreException e) {

-      return null;

-    }

-

-    try {

-      Set<IFile> set = new TreeSet<>();

-      List<IFolder> descriptorFolders = RutaProjectUtils.getDescriptorFolders(project);

-      for (IFolder folder : descriptorFolders) {

-        set.addAll(collectTypeSystems(folder));

-

-      }

-

-      ListDialog ld = new ListDialog(Display.getCurrent().getActiveShell());

-      ld.setContentProvider(new IStructuredContentProvider() {

-

-        public void dispose() {

-

-        }

-

-        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-

-        }

-

-        public Object[] getElements(Object inputElement) {

-          return ((Collection<?>) inputElement).toArray();

-        }

-

-      });

-      ld.setLabelProvider(new LabelProvider() {

-        @Override

-        public String getText(Object element) {

-          return ((IFile) element).getName();

-        }

-      });

-      if (set == null || set.isEmpty()) {

-        return null;

-      }

-

-      ld.setTitle("Select Type System Descriptor");

-      ld.setInput(set);

-      ld.open();

-

-      if (ld.getResult() != null) {

-        return (IFile) ld.getResult()[0];

-      } else {

-        return null;

-      }

-    } catch (Exception e) {

-      return null;

-    }

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/searchStrategy/LastLaunchSearchStrategy.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/searchStrategy/LastLaunchSearchStrategy.java
deleted file mode 100755
index 62fdaf4..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/searchStrategy/LastLaunchSearchStrategy.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*

- * 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.ruta.searchStrategy;

-

-import org.apache.uima.caseditor.ide.TypeSystemLocationPropertyPage;

-import org.apache.uima.caseditor.ide.searchstrategy.ITypeSystemSearchStrategy;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.eclipse.core.filesystem.URIUtil;

-import org.eclipse.core.internal.resources.Workspace;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IProjectNature;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.ui.DebugUITools;

-import org.eclipse.dltk.internal.launching.LaunchConfigurationUtils;

-import org.eclipse.dltk.launching.ScriptLaunchConfigurationConstants;

-import org.eclipse.ui.internal.Workbench;

-

-public class LastLaunchSearchStrategy implements ITypeSystemSearchStrategy {

-

-  public IFile findTypeSystem(IFile casFile) {

-    IProject project = casFile.getProject();

-    IFile typeSystemLocation = TypeSystemLocationPropertyPage.getTypeSystemLocation(project);

-    if (typeSystemLocation != null && !typeSystemLocation.getName().equals("TypeSystem.xml")) {

-      // do not override the properties!

-      return null;

-    }

-    try {

-      IProjectNature nature = project.getNature(RutaNature.NATURE_ID);

-      if (!(nature instanceof RutaNature)) {

-        return null;

-      }

-    } catch (CoreException e) {

-      return null;

-    }

-    ILaunchConfiguration lastRun = DebugUITools

-            .getLastLaunch("org.eclipse.debug.ui.launchGroup.run");

-    String scriptName = LaunchConfigurationUtils.getString(lastRun,

-            ScriptLaunchConfigurationConstants.ATTR_MAIN_SCRIPT_NAME, "");

-    if (scriptName != null && scriptName.length() != 0 && new Path(scriptName).segmentCount() > 0

-            && Path.ROOT.isValidPath(scriptName)) {

-      final IFile scriptFile = project.getFile(scriptName);

-      if (scriptFile.exists()) {

-        IPath path = null;

-        try {

-          path = RutaProjectUtils.getTypeSystemDescriptorPath(scriptFile.getLocation(),

-                  project);

-        } catch (CoreException e) {

-          RutaAddonsPlugin.error(e);

-        }

-        if (path != null) {

-          

-          IWorkspace workspace= ResourcesPlugin.getWorkspace();    

-          IPath location= Path.fromOSString(path.toFile().getAbsolutePath()); 

-          IFile ts= workspace.getRoot().getFileForLocation(location);

-          if (ts != null && ts.exists()) {

-            return ts;

-          }

-        }

-      }

-    }

-    return null;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/EntryComparator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/EntryComparator.java
deleted file mode 100755
index eddf56f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/EntryComparator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.statistics;

-

-import java.util.Comparator;

-

-public class EntryComparator implements Comparator<StatisticsEntry> {

-

-  private int index;

-

-  private boolean inverted;

-

-  public EntryComparator(int index, boolean inverted) {

-    super();

-    this.index = index;

-    this.inverted = inverted;

-  }

-

-  public int compare(StatisticsEntry e1, StatisticsEntry e2) {

-    int result = 0;

-    switch (index) {

-      case 0:

-        result = e1.getName().compareTo(e2.getName());

-        break;

-      case 1:

-        result = ((Double) e1.getTotal()).compareTo(e2.getTotal());

-        break;

-      case 2:

-        result = ((Integer) e1.getAmount()).compareTo(e2.getAmount());

-        break;

-      case 3:

-        result = ((Double) e1.getPart()).compareTo(e2.getPart());

-        break;

-      default:

-        result = 0;

-    }

-    if (inverted) {

-      result = (int) -Math.signum(result);

-    }

-    return result;

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsContentProvider.java
deleted file mode 100755
index 73f1924..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsContentProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.statistics;

-

-import java.util.List;

-

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-public class StatisticsContentProvider implements IStructuredContentProvider {

-

-  public void dispose() {

-  }

-

-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-  }

-

-  public Object[] getElements(Object inputElement) {

-    @SuppressWarnings("unchecked")

-    List<StatisticsEntry> entries = (List<StatisticsEntry>) inputElement;

-    return entries.toArray();

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsEntry.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsEntry.java
deleted file mode 100755
index f1d50b8..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsEntry.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*

- * 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.ruta.statistics;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.impl.DoubleArrayFSImpl;

-import org.apache.uima.cas.impl.IntArrayFSImpl;

-import org.apache.uima.cas.impl.StringArrayFSImpl;

-

-public class StatisticsEntry {

-  private static final String PARTS = "part";

-

-  private static final String AMOUNTS = "amount";

-

-  private static final String TOTALS = "total";

-

-  private static final String NAMES = "name";

-

-  private static final String TYPE = "org.apache.uima.ruta.type.Statistics";

-

-  private final String name;

-

-  private final double total;

-

-  private final int amount;

-

-  private final double part;

-

-  public StatisticsEntry(String name, double total, int amount, double part) {

-    super();

-    this.name = name;

-    this.total = total;

-    this.amount = amount;

-    this.part = part;

-

-  }

-

-  public static List<StatisticsEntry> createEntries(FeatureStructure fs) {

-    List<StatisticsEntry> result = new ArrayList<StatisticsEntry>();

-    Type type = fs.getCAS().getTypeSystem().getType(TYPE);

-    Feature fname = type.getFeatureByBaseName(NAMES);

-    Feature ftotal = type.getFeatureByBaseName(TOTALS);

-    Feature famount = type.getFeatureByBaseName(AMOUNTS);

-    Feature fparts = type.getFeatureByBaseName(PARTS);

-    StringArrayFSImpl vname = (StringArrayFSImpl) fs.getFeatureValue(fname);

-    DoubleArrayFSImpl vtotal = (DoubleArrayFSImpl) fs.getFeatureValue(ftotal);

-    IntArrayFSImpl vamount = (IntArrayFSImpl) fs.getFeatureValue(famount);

-    DoubleArrayFSImpl vpart = (DoubleArrayFSImpl) fs.getFeatureValue(fparts);

-

-    String[] narray = new String[0];

-    if(vname != null) {

-      narray = vname.toArray();

-    }

-    double[] tarray = vtotal.toArray();

-    int[] aarray = vamount.toArray();

-    double[] parray = vpart.toArray();

-

-    int i = 0;

-    for (String each : narray) {

-      result.add(new StatisticsEntry(each, tarray[i], aarray[i], parray[i]));

-      i++;

-    }

-

-    return result;

-  }

-

-  public double getPart() {

-    return part;

-  }

-

-  public int getAmount() {

-    return amount;

-  }

-

-  public double getTotal() {

-    return total;

-  }

-

-  public String getName() {

-    return name;

-  }

-

-  @Override

-  public String toString() {

-    return getName() + " : " + getTotal() + " : " + getAmount() + " : " + getPart();

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsLabelProvider.java
deleted file mode 100755
index fbe4a97..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsLabelProvider.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * 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.ruta.statistics;

-

-import org.eclipse.jface.viewers.ITableLabelProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.swt.graphics.Image;

-

-public class StatisticsLabelProvider extends LabelProvider implements ITableLabelProvider {

-

-  private StatisticsViewPage owner;

-

-  public StatisticsLabelProvider(StatisticsViewPage owner) {

-    super();

-    this.owner = owner;

-  }

-

-  public Image getColumnImage(Object element, int columnIndex) {

-    return null;

-  }

-

-  public String getColumnText(Object element, int columnIndex) {

-    StatisticsEntry entry = (StatisticsEntry) element;

-    switch (columnIndex) {

-      case 0:

-        return entry.getName();

-      case 1:

-        return entry.getTotal() + "ms";

-      case 2:

-        return entry.getAmount() + "";

-      case 3:

-        return entry.getPart() + "ms";

-      default:

-        throw new RuntimeException("Should not happen");

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsView.java
deleted file mode 100755
index 282ab46..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsView.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.statistics;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class StatisticsView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.explain.apply";

-

-  public StatisticsView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      StatisticsViewPage page = new StatisticsViewPage((AnnotationEditor) editor);

-      initPage(page);

-      page.createControl(getPageBook());

-      result = page;

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsViewPage.java
deleted file mode 100755
index ff3e732..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsViewPage.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*

- * 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.ruta.statistics;

-

-import java.util.Arrays;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.ICasDocument;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.DoubleClickEvent;

-import org.eclipse.jface.viewers.IDoubleClickListener;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.ISelectionChangedListener;

-import org.eclipse.jface.viewers.SelectionChangedEvent;

-import org.eclipse.jface.viewers.TableViewer;

-import org.eclipse.jface.viewers.TableViewerColumn;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Event;

-import org.eclipse.swt.widgets.Listener;

-import org.eclipse.swt.widgets.Table;

-import org.eclipse.swt.widgets.TableColumn;

-import org.eclipse.ui.ISelectionListener;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.part.Page;

-

-public class StatisticsViewPage extends Page implements IDoubleClickListener,

-        ISelectionChangedListener, ISelectionListener {

-

-  private static final String TYPE = "org.apache.uima.ruta.type.Statistics";

-

-  private int current;

-

-  private Map<String, Image> images;

-

-  private TableViewer viewer;

-

-  private AnnotationEditor editor;

-

-  private ICasDocument document;

-

-  public StatisticsViewPage(AnnotationEditor editor) {

-    super();

-    this.editor = editor;

-    this.document = editor.getDocument();

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    if (images != null) {

-      for (Image each : images.values()) {

-        each.dispose();

-      }

-    }

-  }

-

-  private void initImages() {

-    images = new HashMap<String, Image>();

-    ImageDescriptor desc;

-    Image image;

-    String name;

-

-    // desc = RutaCEVPlugin.getImageDescriptor("/icons/accept.png");

-    // image = desc.createImage();

-    // name = "matched";

-    // images.put(name, image);

-  }

-

-  public Image getImage(String name) {

-    if (images == null) {

-      initImages();

-    }

-    return images.get(name);

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    createViewer(parent);

-    CAS cas = document.getCAS();

-    Type type = cas.getTypeSystem().getType(TYPE);

-    

-    getSite().setSelectionProvider(viewer);

-    getSite().getPage().addSelectionListener(this);

-    if (type != null) {

-      FSIterator<FeatureStructure> allIndexedFS = cas.getIndexRepository().getAllIndexedFS(type);

-      if (allIndexedFS.isValid()) {

-        inputChange(allIndexedFS.get());

-      }

-    }

-    viewer.refresh();

-

-  }

-

-  private void createViewer(Composite parent) {

-    viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);

-    createColumns(viewer);

-    viewer.setContentProvider(new StatisticsContentProvider());

-    viewer.setLabelProvider(new StatisticsLabelProvider(this));

-  }

-

-  // This will create the columns for the table

-  private void createColumns(final TableViewer viewer) {

-    Listener sortListener = new Listener() {

-

-      public void handleEvent(Event e) {

-        // determine new sort column and direction

-        TableColumn sortColumn = viewer.getTable().getSortColumn();

-        TableColumn currentColumn = (TableColumn) e.widget;

-        int dir = viewer.getTable().getSortDirection();

-        if (sortColumn == currentColumn) {

-          dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;

-        } else {

-          viewer.getTable().setSortColumn(currentColumn);

-          dir = SWT.UP;

-        }

-        // sort the data based on column and direction

-        final int index = Arrays.asList(viewer.getTable().getColumns()).indexOf(currentColumn);

-        @SuppressWarnings("unchecked")

-        List<StatisticsEntry> input = (List<StatisticsEntry>) viewer.getInput();

-        Collections.sort(input, new EntryComparator(index, dir == SWT.UP));

-        viewer.getTable().setSortDirection(dir);

-        viewer.getTable().clearAll();

-        viewer.setInput(input);

-      }

-    };

-

-    String[] titles = { "Name", "Total", "Amount", "Each" };

-    int[] bounds = { 100, 100, 75, 100 };

-    TableViewerColumn column = null;

-    for (int i = 0; i < titles.length; i++) {

-      column = new TableViewerColumn(viewer, SWT.NONE);

-      TableColumn tc = column.getColumn();

-      tc.setText(titles[i]);

-      tc.setWidth(bounds[i]);

-      tc.setResizable(true);

-      tc.setMoveable(true);

-      tc.addListener(SWT.Selection, sortListener);

-    }

-    Table table = viewer.getTable();

-    table.setHeaderVisible(true);

-    table.setLinesVisible(true);

-    table.setSortColumn(column.getColumn());

-    table.setSortDirection(SWT.UP);

-  }

-

-  /**

-   * Passing the focus request to the viewer's control.

-   */

-  @Override

-  public void setFocus() {

-    viewer.getControl().setFocus();

-  }

-

-  @Override

-  public Control getControl() {

-    return viewer.getControl();

-  }

-

-  public void doubleClick(DoubleClickEvent event) {

-  }

-

-  public void inputChange(Object newInput) {

-    if (newInput instanceof FeatureStructure) {

-      viewer.setInput(StatisticsEntry.createEntries((FeatureStructure) newInput));

-    }

-  }

-

-  public void selectionChanged(SelectionChangedEvent event) {

-

-  }

-

-  public void selectionChanged(IWorkbenchPart arg0, ISelection arg1) {

-    // TODO Auto-generated method stub

-    

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/AbstractCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/AbstractCasEvaluator.java
deleted file mode 100644
index 15c9cf3..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/AbstractCasEvaluator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-

-public abstract class AbstractCasEvaluator implements ICasEvaluator {

-

-  protected List<AnnotationFS> getAnnotations(List<Type> types, CAS cas, boolean includeSubtypes) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    TypeSystem typeSystem = cas.getTypeSystem();

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex();

-    for (AnnotationFS each : annotationIndex) {

-      Type type = each.getType();

-      for (Type eachType : types) {

-        if (includeSubtypes && typeSystem.subsumes(eachType, type)) {

-          result.add(each);

-          break;

-        } else if (eachType.getName().equals(type.getName())) {

-          result.add(each);

-          break;

-        }

-      }

-    }

-    return result;

-  }

-

-  protected boolean match(AnnotationFS a1, AnnotationFS a2) {

-    if (a1 != null && a2 != null) {

-      if (a1.getBegin() == a2.getBegin() && a1.getEnd() == a2.getEnd()

-              && a1.getType().getName().equals(a2.getType().getName()))

-        return true;

-    }

-    return false;

-  }

-

-  protected List<Type> getTypes(CAS test, Collection<String> excludedTypes, Type annotationType,

-          boolean useAllTypes) {

-    List<Type> allTypes = test.getTypeSystem().getProperlySubsumedTypes(annotationType);

-    List<Type> types = new ArrayList<Type>();

-    for (Type eachType : allTypes) {

-      int size = test.getAnnotationIndex(eachType).size();

-      if (!excludedTypes.contains(eachType.getName()) && (size > 0 || useAllTypes)

-              && !eachType.equals(test.getDocumentAnnotation().getType())) {

-        types.add(eachType);

-      }

-    }

-    return types;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/CoreMatchCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/CoreMatchCasEvaluator.java
deleted file mode 100755
index 973be91..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/CoreMatchCasEvaluator.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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.ruta.testing.evaluator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.CASException;
-import org.apache.uima.cas.CASRuntimeException;
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-
-public class CoreMatchCasEvaluator extends AbstractCasEvaluator {
-
-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes)
-          throws CASRuntimeException, CASException {
-    Type annotationType = test.getAnnotationType();
-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);
-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);
-    Type truePositveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);
-
-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);
-    List<Type> types = getTypes(test, excludedTypes, annotationType, useAllTypes);
-
-    List<AnnotationFS> testAnnotations = getAnnotations(types, test, includeSubtypes);
-    List<AnnotationFS> runAnnotations = getAnnotations(types, run, includeSubtypes);
-
-    Collection<AnnotationFS> matched = new HashSet<AnnotationFS>();
-    List<AnnotationFS> fp = new ArrayList<AnnotationFS>();
-    List<AnnotationFS> fn = new ArrayList<AnnotationFS>();
-    List<AnnotationFS> tp = new ArrayList<AnnotationFS>();
-
-    for (AnnotationFS eachTest : testAnnotations) {
-      boolean found = false;
-      for (AnnotationFS eachRun : runAnnotations) {
-        if (matchCore(eachTest, eachRun)) {
-          matched.add(eachRun);
-          found = true;
-          break;
-        }
-      }
-      if (!found) {
-        AnnotationFS createAnnotation = run.createAnnotation(falseNegativeType,
-                eachTest.getBegin(), eachTest.getEnd());
-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());
-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());
-        createAnnotation.setFeatureValue(feature, original);
-        fn.add(createAnnotation);
-      } else {
-        AnnotationFS createAnnotation = run.createAnnotation(truePositveType, eachTest.getBegin(),
-                eachTest.getEnd());
-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());
-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());
-        createAnnotation.setFeatureValue(feature, original);
-        tp.add(createAnnotation);
-      }
-
-    }
-
-    for (AnnotationFS each : runAnnotations) {
-      if (!matched.contains(each)) {
-        AnnotationFS createAnnotation = run.createAnnotation(falsePositiveType, each.getBegin(),
-                each.getEnd());
-        Type type = run.getTypeSystem().getType(each.getType().getName());
-        AnnotationFS original = run.createAnnotation(type, each.getBegin(), each.getEnd());
-        createAnnotation.setFeatureValue(feature, original);
-        fp.add(createAnnotation);
-      }
-    }
-
-    for (AnnotationFS annotationFS : fn) {
-      run.addFsToIndexes(annotationFS);
-    }
-    for (AnnotationFS annotationFS : fp) {
-      run.addFsToIndexes(annotationFS);
-    }
-    for (AnnotationFS annotationFS : tp) {
-      run.addFsToIndexes(annotationFS);
-    }
-    return run;
-  }
-
-  private boolean matchCore(AnnotationFS a1, AnnotationFS a2) {
-
-    String coreTerm = null;
-    StringTokenizer tokenizer = new StringTokenizer(a1.getCoveredText());
-    while (tokenizer.hasMoreTokens()) {
-      String token = tokenizer.nextToken();
-      if (Character.isUpperCase(token.charAt(0)) && token.length() > 3) {
-        coreTerm = token;
-      }
-    }
-
-    // check, if coreTerm is contained in a2
-    if (coreTerm != null && a2.getCoveredText().indexOf(coreTerm) != -1)
-      return true;
-
-    return false;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/CoreMatchCasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/CoreMatchCasEvaluatorFactory.java
deleted file mode 100755
index 8c3c0be..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/CoreMatchCasEvaluatorFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.ruta.testing.evaluator;
-
-public class CoreMatchCasEvaluatorFactory implements ICasEvaluatorFactory {
-  public ICasEvaluator createEvaluator() {
-    return new CoreMatchCasEvaluator();
-  }
-
-  public String getDescription() {
-    return "Compares the offsets of two annotations, allowes partial matching, defines core terms and checks if at least these match (partially) with the other annotation";
-    
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ExactCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ExactCasEvaluator.java
deleted file mode 100755
index f371e82..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ExactCasEvaluator.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.CASRuntimeException;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-

-public class ExactCasEvaluator extends AbstractCasEvaluator {

-

-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes)

-          throws CASRuntimeException, CASException {

-    Type annotationType = test.getAnnotationType();

-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);

-

-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);

-    List<Type> types = getTypes(test, excludedTypes, annotationType, useAllTypes);

-

-    List<AnnotationFS> testAnnotations = getAnnotations(types, test, includeSubtypes);

-    List<AnnotationFS> runAnnotations = getAnnotations(types, run, includeSubtypes);

-

-    Collection<AnnotationFS> matched = new HashSet<AnnotationFS>();

-    List<AnnotationFS> fp = new ArrayList<AnnotationFS>();

-    List<AnnotationFS> fn = new ArrayList<AnnotationFS>();

-    List<AnnotationFS> tp = new ArrayList<AnnotationFS>();

-

-    for (AnnotationFS eachTest : testAnnotations) {

-      boolean found = false;

-      for (AnnotationFS eachRun : runAnnotations) {

-        if (match(eachTest, eachRun)) {

-          matched.add(eachRun);

-          found = true;

-          break;

-        }

-      }

-      if (!found) {

-        AnnotationFS createAnnotation = run.createAnnotation(falseNegativeType,

-                eachTest.getBegin(), eachTest.getEnd());

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());

-        createAnnotation.setFeatureValue(feature, original);

-        fn.add(createAnnotation);

-      } else {

-        AnnotationFS createAnnotation = run.createAnnotation(truePositveType, eachTest.getBegin(),

-                eachTest.getEnd());

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());

-        createAnnotation.setFeatureValue(feature, original);

-        tp.add(createAnnotation);

-      }

-

-    }

-

-    for (AnnotationFS each : runAnnotations) {

-      if (!matched.contains(each)) {

-        AnnotationFS createAnnotation = run.createAnnotation(falsePositiveType, each.getBegin(),

-                each.getEnd());

-        Type type = run.getTypeSystem().getType(each.getType().getName());

-        AnnotationFS original = run.createAnnotation(type, each.getBegin(), each.getEnd());

-        createAnnotation.setFeatureValue(feature, original);

-        fp.add(createAnnotation);

-      }

-    }

-

-    for (AnnotationFS annotationFS : fn) {

-      run.addFsToIndexes(annotationFS);

-    }

-    for (AnnotationFS annotationFS : fp) {

-      run.addFsToIndexes(annotationFS);

-    }

-    for (AnnotationFS annotationFS : tp) {

-      run.addFsToIndexes(annotationFS);

-    }

-    return run;

-  }

-

-  

-

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ExactCasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ExactCasEvaluatorFactory.java
deleted file mode 100755
index 9c1dc67..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ExactCasEvaluatorFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-public class ExactCasEvaluatorFactory implements ICasEvaluatorFactory {

-

-  public ICasEvaluator createEvaluator() {

-    return new ExactCasEvaluator();

-  }

-

-  public String getDescription() {

-    return "Compare the offsets of the given annotations.";

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/FeatureCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/FeatureCasEvaluator.java
deleted file mode 100755
index c917cb2..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/FeatureCasEvaluator.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.CASRuntimeException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.engine.RutaEngine;

-

-public class FeatureCasEvaluator extends AbstractCasEvaluator {

-

-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes,

-          boolean useAllTypes) throws CASRuntimeException, CASException {

-

-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositiveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);

-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);

-    Type annotationType = test.getAnnotationType();

-    Type stringType = run.getTypeSystem().getType(UIMAConstants.TYPE_STRING);

-    Type basicType = run.getTypeSystem().getType(RutaEngine.BASIC_TYPE);

-    List<Type> allTypes = test.getTypeSystem().getProperlySubsumedTypes(annotationType);

-    List<Type> types = new ArrayList<Type>();

-    TypeSystem typeSystem = test.getTypeSystem();

-    for (Type eachType : allTypes) {

-      if (!excludedTypes.contains(eachType.getName())) {

-        List<Feature> features = eachType.getFeatures();

-        for (Feature f : features) {

-          Type range = f.getRange();

-          if (typeSystem.subsumes(annotationType, range) || typeSystem.subsumes(stringType, range)) {

-            if (!eachType.getName().startsWith("org.apache.uima.ruta.type")

-                    && !typeSystem.subsumes(basicType, eachType)) {

-              types.add(eachType);

-              break;

-            }

-          }

-        }

-      }

-    }

-

-    // Here it is possible to select the relevant types from a file instead of using the HMI again

-    // to filter out irrelevant types …

-

-    Collection<FeatureStructure> runFSs = getFeatureStructures(types, run);

-    Collection<FeatureStructure> testFSs = getFeatureStructures(types, test);

-    Collection<FeatureStructure> matched = new HashSet<FeatureStructure>();

-    List<FeatureStructure> fp = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> fn = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> tp = new ArrayList<FeatureStructure>();

-    for (FeatureStructure eachTest : testFSs) {

-      boolean found = false;

-      for (FeatureStructure eachRun : runFSs) {

-        if (match(eachTest, eachRun)) {

-          matched.add(eachRun);

-

-          found = true;

-

-          break;

-

-        }

-

-      }

-

-      if (!found) {

-

-        FeatureStructure createFS = run.createFS(falseNegativeType);

-

-        fillFS(eachTest, createFS, false);

-

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-

-        FeatureStructure original = run.createFS(type);

-

-        fillFS(eachTest, original, true);

-

-        createFS.setFeatureValue(feature, original);

-

-        fn.add(createFS);

-

-      } else {

-

-        FeatureStructure createFS = run.createFS(truePositiveType);

-

-        fillFS(eachTest, createFS, false);

-

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-

-        FeatureStructure original = run.createFS(type);

-

-        fillFS(eachTest, original, true);

-

-        createFS.setFeatureValue(feature, original);

-

-        tp.add(createFS);

-

-      }

-

-    }

-

-    for (FeatureStructure each : runFSs) {

-

-      if (!matched.contains(each)) {

-

-        FeatureStructure createFS = run.createFS(falsePositiveType);

-

-        fillFS(each, createFS, false);

-

-        Type type = run.getTypeSystem().getType(each.getType().getName());

-

-        FeatureStructure original = run.createFS(type);

-

-        fillFS(each, original, true);

-

-        createFS.setFeatureValue(feature, original);

-

-        fp.add(createFS);

-

-      }

-

-    }

-

-    for (FeatureStructure fs : fn) {

-

-      run.addFsToIndexes(fs);

-

-    }

-

-    for (FeatureStructure fs : fp) {

-

-      run.addFsToIndexes(fs);

-

-    }

-

-    for (FeatureStructure fs : tp) {

-

-      run.addFsToIndexes(fs);

-

-    }

-

-    return run;

-

-  }

-

-  private void fillFS(FeatureStructure fs, FeatureStructure newFS, boolean withFeatures) {

-

-    if (fs instanceof AnnotationFS) {

-

-      Annotation a = (Annotation) newFS;

-

-      a.setBegin(((AnnotationFS) fs).getBegin());

-

-      a.setEnd(((AnnotationFS) fs).getEnd());

-

-    }

-

-    if (withFeatures) {

-

-      CAS testCas = fs.getCAS();

-

-      CAS runCas = newFS.getCAS();

-      TypeSystem testTS = testCas.getTypeSystem();

-      TypeSystem runTS = runCas.getTypeSystem();

-      Type annotationType = testCas.getAnnotationType();

-      List<Feature> features = fs.getType().getFeatures();

-      for (Feature feature : features) {

-        Type range = feature.getRange();

-        if (testTS.subsumes(annotationType, range)) {

-          FeatureStructure valueTest = fs.getFeatureValue(feature);

-          if (valueTest instanceof AnnotationFS) {

-            AnnotationFS a1 = (AnnotationFS) valueTest;

-            Feature feature2 = newFS.getType().getFeatureByBaseName(feature.getShortName());

-            if (feature2 != null) {

-              Type range2 = runTS.getType(range.getName());

-              AnnotationFS createAnnotation = runCas.createAnnotation(range2, a1.getBegin(),

-                      a1.getEnd());

-              newFS.setFeatureValue(feature2, createAnnotation);

-            }

-          }

-        }

-

-        if (UIMAConstants.TYPE_STRING.equals(range.getName())) {

-          String valueTest = fs.getFeatureValueAsString(feature);

-          if (valueTest != null) {

-            Feature feature2 = newFS.getType().getFeatureByBaseName(feature.getShortName());

-            newFS.setFeatureValueFromString(feature2, valueTest);

-          }

-        }

-      }

-

-    }

-

-  }

-

-  private Collection<FeatureStructure> getFeatureStructures(List<Type> types, CAS cas) {

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Type annotationType = cas.getAnnotationType();

-    // Type annotationBaseType = typeSystem.getType("uima.cas.AnnotationBase");

-    Collection<FeatureStructure> result = new HashSet<FeatureStructure>();

-    for (Type type : types) {

-      // if ((type != null) && !typeSystem.subsumes(cas.getAnnotationType(), type) &&

-      // !typeSystem.subsumes(annotationBaseType, type)

-      if (type != null) {

-        FSIterator<FeatureStructure> iterator = cas.getIndexRepository().getAllIndexedFS(type);

-        try {

-          iterator = cas.getView("_InitialView").getJCas().getIndexRepository()

-                  .getAllIndexedFS(type);

-        } catch (CASException e) {

-          // TODO Auto-generated catch block

-          e.printStackTrace();

-        }

-        // FSIterator<FeatureStructure> iterator=cas.getIndexRepository().getAllIndexedFS(type);;

-        while (iterator.isValid()) { // hasNext()

-          FeatureStructure fs = iterator.get();

-          List<Feature> features = fs.getType().getFeatures();

-          for (Feature feature : features) {

-            Type range = feature.getRange();

-            if (typeSystem.subsumes(annotationType, range)

-                    || UIMAConstants.TYPE_STRING.equals(range.getName())) {

-              result.add(fs);

-              break;

-            }

-          }

-          iterator.moveToNext();

-        }

-      }

-    }

-

-    return result;

-

-  }

-

-  private boolean match(FeatureStructure a1, FeatureStructure a2) {

-    Type type1 = a1.getType();

-    Type type2 = a2.getType();

-    if (!type1.getName().equals(type2.getName())) {

-      return false;

-    }

-    if (a1 instanceof AnnotationFS && a2 instanceof AnnotationFS) {

-      AnnotationFS a11 = (AnnotationFS) a1;

-      AnnotationFS a22 = (AnnotationFS) a2;

-      if (!contains(a11, a22) || !overlap(a11, a22)) {

-        // if (!(a11.getBegin() == a22.getBegin() && a11.getEnd() == a22.getEnd())) {

-        return false;

-      }

-    }

-

-    CAS cas = a1.getCAS();

-

-    TypeSystem typeSystem = cas.getTypeSystem();

-

-    Type annotationType = cas.getAnnotationType();

-

-    List<Feature> features1 = type1.getFeatures();

-

-    boolean result = true;

-

-    boolean allEmpty1 = true;

-

-    boolean allEmpty2 = true;

-

-    for (Feature eachFeature1 : features1) {

-

-      Type range = eachFeature1.getRange();

-

-      if (typeSystem.subsumes(annotationType, range)) {

-

-        String name = eachFeature1.getShortName();

-

-        Feature eachFeature2 = type2.getFeatureByBaseName(name);

-

-        FeatureStructure featureValue1 = a1.getFeatureValue(eachFeature1);

-

-        FeatureStructure featureValue2 = a2.getFeatureValue(eachFeature2);

-

-        allEmpty1 &= featureValue1 == null;

-

-        allEmpty2 &= featureValue2 == null;

-

-        if (featureValue1 instanceof AnnotationFS && featureValue2 instanceof AnnotationFS) {

-

-          result &= matchAnnotations((AnnotationFS) featureValue1, (AnnotationFS) featureValue2);

-

-        } else if (featureValue1 == null) {

-

-          // nothing to do

-

-        } else if (featureValue1 != null || featureValue2 != null) {

-

-          return false;

-

-        }

-

-      }

-

-      if (UIMAConstants.TYPE_STRING.equals(range.getName())) {

-        String name = eachFeature1.getShortName();

-        Feature eachFeature2 = type2.getFeatureByBaseName(name);

-        String featureValue1 = a1.getFeatureValueAsString(eachFeature1);

-        String featureValue2 = a2.getFeatureValueAsString(eachFeature2);

-        

-        if ((StringUtils.isBlank(featureValue2)) && StringUtils.isBlank(featureValue1)) {

-          // nothing to do

-        }

-        else if (featureValue1 != null || featureValue2 != null) {

-          // the unrelated values are put in uppercase

-          String f1 =  featureValue1 == null ? "null" : featureValue1.toUpperCase();

-          String f2 =  featureValue2 == null ? "null" : featureValue2.toUpperCase();

-          a1.setFeatureValueFromString(eachFeature1, f1);

-          a2.setFeatureValueFromString(eachFeature2, f2);

-          return false;

-        }

-        else if (featureValue2.trim().toLowerCase().contains(featureValue1.trim().toLowerCase())) {

-          result &= true;

-        }

-      }

-    }

-    return result && (allEmpty1 == allEmpty2);

-  }

-

-  private boolean matchAnnotations(AnnotationFS a1, AnnotationFS a2) {

-    if (a1 != null && a2 != null) {

-      // if (a1.getBegin() == a2.getBegin() && a1.getEnd() == a2.getEnd()

-      if ((contains(a1, a2) || overlap(a1, a2))

-      && a1.getType().getName().equals(a2.getType().getName())) {

-        return true;

-      }

-    }

-    return false;

-

-  }

-

-  private boolean overlap(AnnotationFS a1, AnnotationFS a2) {

-    if (a1 != null && a2 != null) {

-      if ((a1.getBegin() <= a2.getBegin() && a1.getEnd() >= a2.getBegin())

-      || (a1.getBegin() >= a2.getBegin() && a1.getBegin() <= a2.getEnd()))

-        return true;

-    }

-    return false;

-

-  }

-

-  private boolean contains(AnnotationFS a1, AnnotationFS a2) {

-

-    if (a1 != null && a2 != null) {

-

-      if ((a1.getBegin() <= a2.getBegin() && a1.getEnd() >= a2.getEnd())

-

-      || (a1.getBegin() >= a2.getBegin() && a1.getEnd() <= a2.getEnd()))

-

-        return true;

-

-    }

-

-    return false;

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/FeatureCasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/FeatureCasEvaluatorFactory.java
deleted file mode 100755
index 37cf412..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/FeatureCasEvaluatorFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-public class FeatureCasEvaluatorFactory implements ICasEvaluatorFactory {

-

-  public ICasEvaluator createEvaluator() {

-    return new FeatureCasEvaluator();

-  }

-

-  public String getDescription() {

-    return "Complex feature structures are compared. A feature structure is a true positive if all annotation and string feature values are correct.";

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ICasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ICasEvaluator.java
deleted file mode 100755
index 5754b77..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ICasEvaluator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.Collection;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.CASRuntimeException;

-

-public interface ICasEvaluator {

-

-  public static final String FALSE_NEGATIVE = "org.apache.uima.ruta.type.FalseNegative";

-

-  public static final String FALSE_POSITIVE = "org.apache.uima.ruta.type.FalsePositive";

-

-  public static final String TRUE_POSITIVE = "org.apache.uima.ruta.type.TruePositive";

-

-  public static final String ORIGINAL = "original";

-

-  CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes) throws CASRuntimeException,

-          CASException;

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ICasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ICasEvaluatorFactory.java
deleted file mode 100755
index a0e9012..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/ICasEvaluatorFactory.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-public interface ICasEvaluatorFactory {

-

-  ICasEvaluator createEvaluator();

-

-  String getDescription();

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/PartialMatchCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/PartialMatchCasEvaluator.java
deleted file mode 100755
index 351dc0d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/PartialMatchCasEvaluator.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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.ruta.testing.evaluator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.CASException;
-import org.apache.uima.cas.CASRuntimeException;
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-
-public class PartialMatchCasEvaluator extends AbstractCasEvaluator {
-
-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes)
-          throws CASRuntimeException, CASException {
-    Type annotationType = test.getAnnotationType();
-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);
-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);
-    Type truePositveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);
-
-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);
-    List<Type> types = getTypes(test, excludedTypes, annotationType, useAllTypes);
-
-    List<AnnotationFS> testAnnotations = getAnnotations(types, test, includeSubtypes);
-    List<AnnotationFS> runAnnotations = getAnnotations(types, run, includeSubtypes);
-
-    Collection<AnnotationFS> matched = new HashSet<AnnotationFS>();
-    List<AnnotationFS> fp = new ArrayList<AnnotationFS>();
-    List<AnnotationFS> fn = new ArrayList<AnnotationFS>();
-    List<AnnotationFS> tp = new ArrayList<AnnotationFS>();
-
-    for (AnnotationFS eachTest : testAnnotations) {
-      boolean found = false;
-      for (AnnotationFS eachRun : runAnnotations) {
-        if (contains(eachTest, eachRun) || overlap(eachTest, eachRun)) {
-          matched.add(eachRun);
-          found = true;
-          break;
-        }
-      }
-      if (!found) {
-        AnnotationFS createAnnotation = run.createAnnotation(falseNegativeType,
-                eachTest.getBegin(), eachTest.getEnd());
-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());
-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());
-        createAnnotation.setFeatureValue(feature, original);
-        fn.add(createAnnotation);
-      } else {
-        AnnotationFS createAnnotation = run.createAnnotation(truePositveType, eachTest.getBegin(),
-                eachTest.getEnd());
-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());
-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());
-        createAnnotation.setFeatureValue(feature, original);
-        tp.add(createAnnotation);
-      }
-
-    }
-
-    for (AnnotationFS each : runAnnotations) {
-      if (!matched.contains(each)) {
-        AnnotationFS createAnnotation = run.createAnnotation(falsePositiveType, each.getBegin(),
-                each.getEnd());
-        Type type = run.getTypeSystem().getType(each.getType().getName());
-        AnnotationFS original = run.createAnnotation(type, each.getBegin(), each.getEnd());
-        createAnnotation.setFeatureValue(feature, original);
-        fp.add(createAnnotation);
-      }
-    }
-
-    for (AnnotationFS annotationFS : fn) {
-      run.addFsToIndexes(annotationFS);
-    }
-    for (AnnotationFS annotationFS : fp) {
-      run.addFsToIndexes(annotationFS);
-    }
-    for (AnnotationFS annotationFS : tp) {
-      run.addFsToIndexes(annotationFS);
-    }
-    return run;
-  }
-
-  private boolean overlap(AnnotationFS a1, AnnotationFS a2) {
-    if (a1 != null && a2 != null) {
-      if ((a1.getBegin() <= a2.getBegin() && a1.getEnd() >= a2.getBegin())
-              || (a1.getBegin() >= a2.getBegin() && a1.getBegin() <= a2.getEnd()))
-        return true;
-    }
-    return false;
-  }
-
-  private boolean contains(AnnotationFS a1, AnnotationFS a2) {
-    if (a1 != null && a2 != null) {
-      if (a1.getBegin() <= a2.getBegin() && a1.getEnd() >= a2.getEnd())
-        return true;
-    }
-    return false;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/PartialMatchCasEvaluatorFacotry.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/PartialMatchCasEvaluatorFacotry.java
deleted file mode 100755
index 2a52a49..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/PartialMatchCasEvaluatorFacotry.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.ruta.testing.evaluator;
-
-public class PartialMatchCasEvaluatorFacotry implements ICasEvaluatorFactory {
-
-  public ICasEvaluator createEvaluator() {
-    
-    return new PartialMatchCasEvaluator();
-  }
-
-  public String getDescription() {
-    return "Compares the offsets of the given annotations.\n" +
-    "Allows partial matching if the begin or end\n" + 
-    "character sequenze of the annotations match.";
-    
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/StringFeatureCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/StringFeatureCasEvaluator.java
deleted file mode 100755
index b2b4c8d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/StringFeatureCasEvaluator.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.CASRuntimeException;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.UIMAConstants;

-import org.apache.uima.ruta.engine.RutaEngine;

-

-public class StringFeatureCasEvaluator extends AbstractCasEvaluator {

-  

-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes)

-          throws CASRuntimeException, CASException {

-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);

-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);

-    List<Type> allTypes = test.getTypeSystem().getProperlySubsumedTypes(

-            test.getTypeSystem().getTopType());

-    List<Type> types = new ArrayList<Type>();

-    Type stringType = run.getTypeSystem().getType(UIMAConstants.TYPE_STRING);

-    Type basicType = run.getTypeSystem().getType(RutaEngine.BASIC_TYPE);

-

-    TypeSystem typeSystem = test.getTypeSystem();

-    Type annotationType = test.getAnnotationType();

-    for (Type eachType : allTypes) {

-      if (!excludedTypes.contains(eachType.getName())

-              && !eachType.getName().equals(test.getDocumentAnnotation().getType().getName())) {

-        List<Feature> features = eachType.getFeatures();

-        for (Feature f : features) {

-          Type range = f.getRange();

-          if (typeSystem.subsumes(annotationType, range) || typeSystem.subsumes(stringType, range)) {

-            if (!eachType.getName().startsWith("org.apache.uima.ruta.type")

-                    && !typeSystem.subsumes(basicType, eachType)) {

-              types.add(eachType);

-              break;

-            }

-          }

-        }

-      }

-    }

-

-    Collection<FeatureStructure> testFSs = getFeatureStructures(types, test);

-    Collection<FeatureStructure> runFSs = getFeatureStructures(types, run);

-

-    Collection<FeatureStructure> matched = new HashSet<FeatureStructure>();

-    List<FeatureStructure> fp = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> fn = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> tp = new ArrayList<FeatureStructure>();

-

-    for (FeatureStructure eachTest : testFSs) {

-      boolean found = false;

-      for (FeatureStructure eachRun : runFSs) {

-        if (match(eachTest, eachRun)) {

-          matched.add(eachRun);

-          found = true;

-          break;

-        }

-      }

-      if (!found) {

-        FeatureStructure createFS = run.createFS(falseNegativeType);

-        fillFS(eachTest, createFS, false);

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(eachTest, original, true);

-        createFS.setFeatureValue(feature, original);

-        fn.add(createFS);

-      } else {

-        FeatureStructure createFS = run.createFS(truePositveType);

-        fillFS(eachTest, createFS, false);

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(eachTest, original, true);

-        createFS.setFeatureValue(feature, original);

-        tp.add(createFS);

-      }

-    }

-

-    for (FeatureStructure each : runFSs) {

-      if (!matched.contains(each)) {

-        FeatureStructure createFS = run.createFS(falsePositiveType);

-        fillFS(each, createFS, false);

-        Type type = run.getTypeSystem().getType(each.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(each, original, true);

-        createFS.setFeatureValue(feature, original);

-        fp.add(createFS);

-      }

-    }

-

-    for (FeatureStructure fs : fn) {

-      run.addFsToIndexes(fs);

-    }

-    for (FeatureStructure fs : fp) {

-      run.addFsToIndexes(fs);

-    }

-    for (FeatureStructure fs : tp) {

-      run.addFsToIndexes(fs);

-    }

-    return run;

-  }

-

-  private void fillFS(FeatureStructure fs, FeatureStructure newFS, boolean withFeatures) {

-    if (fs instanceof AnnotationFS) {

-      Annotation a = (Annotation) newFS;

-      a.setBegin(((AnnotationFS) fs).getBegin());

-      a.setEnd(((AnnotationFS) fs).getEnd());

-    }

-    if (withFeatures) {

-      CAS testCas = fs.getCAS();

-//      CAS runCas = newFS.getCAS();

-      TypeSystem testTS = testCas.getTypeSystem();

-//      TypeSystem runTS = runCas.getTypeSystem();

-      Type stringType = testTS.getType(UIMAConstants.TYPE_STRING);

-      List<Feature> features = fs.getType().getFeatures();

-      for (Feature feature : features) {

-        Type range = feature.getRange();

-        if (testTS.subsumes(stringType, range)) {

-          String valueTest = fs.getStringValue(feature);

-          Feature feature2 = newFS.getType().getFeatureByBaseName(feature.getShortName());

-          newFS.setStringValue(feature2, valueTest);

-        }

-      }

-    }

-  }

-

-  private Collection<FeatureStructure> getFeatureStructures(List<Type> types, CAS cas) {

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Type stringType = typeSystem.getType(UIMAConstants.TYPE_STRING);

-    Collection<FeatureStructure> result = new HashSet<FeatureStructure>();

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex();

-    for (AnnotationFS each : annotationIndex) {

-      Type type = each.getType();

-      for (Type eachType : types) {

-        if(typeSystem.subsumes(eachType, type)) {

-          List<Feature> features = each.getType().getFeatures();

-          for (Feature feature : features) {

-            Type range = feature.getRange();

-            if (typeSystem.subsumes(stringType, range)) {

-              result.add(each);

-              break;

-            }

-          }

-        }

-      }

-    }

-    return result;

-  }

-

-  

-  private boolean match(FeatureStructure a1, FeatureStructure a2) {

-    Type type1 = a1.getType();

-    Type type2 = a2.getType();

-    if (!type1.getName().equals(type2.getName())) {

-      return false;

-    }

-

-    if (a1 instanceof AnnotationFS && a2 instanceof AnnotationFS) {

-      AnnotationFS a11 = (AnnotationFS) a1;

-      AnnotationFS a22 = (AnnotationFS) a2;

-      if (!(a11.getBegin() == a22.getBegin() && a11.getEnd() == a22.getEnd())) {

-        return false;

-      }

-    }

-    CAS cas = a1.getCAS();

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Type stringType = typeSystem.getType(UIMAConstants.TYPE_STRING);

-    List<Feature> features1 = type1.getFeatures();

-    boolean result = true;

-    boolean allEmpty1 = true;

-    boolean allEmpty2 = true;

-    for (Feature eachFeature1 : features1) {

-      Type range = eachFeature1.getRange();

-      if (typeSystem.subsumes(stringType, range)) {

-        String name = eachFeature1.getShortName();

-        Feature eachFeature2 = type2.getFeatureByBaseName(name);

-        String featureValue1 = a1.getStringValue(eachFeature1);

-        String featureValue2 = a2.getStringValue(eachFeature2);

-        allEmpty1 &= featureValue1 == null;

-        allEmpty2 &= featureValue2 == null;

-        if (featureValue1 != null) {

-          featureValue1 = featureValue1.replaceAll("\\d", "").replaceAll("\\W", "");

-        }

-        if (featureValue2 != null) {

-          featureValue2 = featureValue2.replaceAll("\\d", "").replaceAll("\\W", "");

-        }

-        result &= (featureValue1 == null && featureValue2 == null)

-                || featureValue1.equals(featureValue2);

-

-      }

-    }

-    return result && (allEmpty1 == allEmpty2);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/StringFeatureCasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/StringFeatureCasEvaluatorFactory.java
deleted file mode 100755
index 55be5ce..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/StringFeatureCasEvaluatorFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-public class StringFeatureCasEvaluatorFactory implements ICasEvaluatorFactory {

-

-  public ICasEvaluator createEvaluator() {

-    return new StringFeatureCasEvaluator();

-  }

-

-  public String getDescription() {

-    return "Annotations with at least one feature of the type string are compared. An annotation is a true positive if the offsets are correct and the string-based feature values are identical.";

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/TemplateCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/TemplateCasEvaluator.java
deleted file mode 100755
index fcd09c8..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/TemplateCasEvaluator.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.CASRuntimeException;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.tcas.Annotation;

-

-public class TemplateCasEvaluator implements ICasEvaluator {

-

-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes)

-          throws CASRuntimeException, CASException {

-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);

-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);

-    List<Type> allTypes = test.getTypeSystem().getProperlySubsumedTypes(

-            test.getTypeSystem().getTopType());

-    List<Type> types = new ArrayList<Type>();

-

-    TypeSystem typeSystem = test.getTypeSystem();

-    Type annotationType = test.getAnnotationType();

-    for (Type eachType : allTypes) {

-      if (!excludedTypes.contains(eachType.getName())) {

-        List<Feature> features = eachType.getFeatures();

-        for (Feature f : features) {

-          Type range = f.getRange();

-          if (typeSystem.subsumes(annotationType, range)) {

-            if (!eachType.getName().startsWith("org.apache.uima.ruta.type")) {

-              types.add(eachType);

-              break;

-            }

-          }

-        }

-      }

-    }

-

-    Collection<FeatureStructure> testFSs = getFeatureStructures(types, test);

-    Collection<FeatureStructure> runFSs = getFeatureStructures(types, run);

-

-    Collection<FeatureStructure> matched = new HashSet<FeatureStructure>();

-    List<FeatureStructure> fp = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> fn = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> tp = new ArrayList<FeatureStructure>();

-

-    for (FeatureStructure eachTest : testFSs) {

-      boolean found = false;

-      for (FeatureStructure eachRun : runFSs) {

-        if (match(eachTest, eachRun)) {

-          matched.add(eachRun);

-          found = true;

-          break;

-        }

-      }

-      if (!found) {

-        FeatureStructure createFS = run.createFS(falseNegativeType);

-        fillFS(eachTest, createFS, false);

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(eachTest, original, true);

-        createFS.setFeatureValue(feature, original);

-        fn.add(createFS);

-      } else {

-        FeatureStructure createFS = run.createFS(truePositveType);

-        fillFS(eachTest, createFS, false);

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(eachTest, original, true);

-        createFS.setFeatureValue(feature, original);

-        tp.add(createFS);

-      }

-    }

-

-    for (FeatureStructure each : runFSs) {

-      if (!matched.contains(each)) {

-        FeatureStructure createFS = run.createFS(falsePositiveType);

-        fillFS(each, createFS, false);

-        Type type = run.getTypeSystem().getType(each.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(each, original, true);

-        createFS.setFeatureValue(feature, original);

-        fp.add(createFS);

-      }

-    }

-

-    for (FeatureStructure fs : fn) {

-      run.addFsToIndexes(fs);

-    }

-    for (FeatureStructure fs : fp) {

-      run.addFsToIndexes(fs);

-    }

-    for (FeatureStructure fs : tp) {

-      run.addFsToIndexes(fs);

-    }

-    return run;

-  }

-

-  private void fillFS(FeatureStructure fs, FeatureStructure newFS, boolean withFeatures) {

-    if (fs instanceof AnnotationFS) {

-      Annotation a = (Annotation) newFS;

-      a.setBegin(((AnnotationFS) fs).getBegin());

-      a.setEnd(((AnnotationFS) fs).getEnd());

-    }

-    if (withFeatures) {

-      CAS testCas = fs.getCAS();

-      CAS runCas = newFS.getCAS();

-      TypeSystem testTS = testCas.getTypeSystem();

-      TypeSystem runTS = runCas.getTypeSystem();

-      Type annotationType = testCas.getAnnotationType();

-      List<Feature> features = fs.getType().getFeatures();

-      for (Feature feature : features) {

-        Type range = feature.getRange();

-        if (testTS.subsumes(annotationType, range)) {

-          FeatureStructure valueTest = fs.getFeatureValue(feature);

-          if (valueTest instanceof AnnotationFS) {

-            AnnotationFS a1 = (AnnotationFS) valueTest;

-            Feature feature2 = newFS.getType().getFeatureByBaseName(feature.getShortName());

-            if (feature2 != null) {

-              Type range2 = runTS.getType(range.getName());

-              AnnotationFS createAnnotation = runCas.createAnnotation(range2, a1.getBegin(),

-                      a1.getEnd());

-              newFS.setFeatureValue(feature2, createAnnotation);

-            }

-          }

-        }

-      }

-    }

-  }

-

-  

-  private Collection<FeatureStructure> getFeatureStructures(List<Type> types, CAS cas) {

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Type annotationType = cas.getAnnotationType();

-    Collection<FeatureStructure> result = new HashSet<FeatureStructure>();

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex();

-    for (AnnotationFS each : annotationIndex) {

-      Type type = each.getType();

-      for (Type eachType : types) {

-        if(typeSystem.subsumes(eachType, type)) {

-          List<Feature> features = each.getType().getFeatures();

-          for (Feature feature : features) {

-            Type range = feature.getRange();

-            if (typeSystem.subsumes(annotationType, range)) {

-              result.add(each);

-              break;

-            }

-          }

-        }

-      }

-    }

-    return result;

-  }

-  

-  

-  private boolean match(FeatureStructure a1, FeatureStructure a2) {

-    Type type1 = a1.getType();

-    Type type2 = a2.getType();

-    if (!type1.getName().equals(type2.getName())) {

-      return false;

-    }

-

-    if (a1 instanceof AnnotationFS && a2 instanceof AnnotationFS) {

-      AnnotationFS a11 = (AnnotationFS) a1;

-      AnnotationFS a22 = (AnnotationFS) a2;

-      if (!(a11.getBegin() == a22.getBegin() && a11.getEnd() == a22.getEnd())) {

-        return false;

-      }

-    }

-    CAS cas = a1.getCAS();

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Type annotationType = cas.getAnnotationType();

-    List<Feature> features1 = type1.getFeatures();

-    boolean result = true;

-    boolean allEmpty1 = true;

-    boolean allEmpty2 = true;

-    for (Feature eachFeature1 : features1) {

-      Type range = eachFeature1.getRange();

-      if (typeSystem.subsumes(annotationType, range)) {

-        String name = eachFeature1.getShortName();

-        Feature eachFeature2 = type2.getFeatureByBaseName(name);

-        FeatureStructure featureValue1 = a1.getFeatureValue(eachFeature1);

-        FeatureStructure featureValue2 = a2.getFeatureValue(eachFeature2);

-        allEmpty1 &= featureValue1 == null;

-        allEmpty2 &= featureValue2 == null;

-        if (featureValue1 instanceof AnnotationFS && featureValue2 instanceof AnnotationFS) {

-          result &= matchAnnotations((AnnotationFS) featureValue1, (AnnotationFS) featureValue2);

-        } else if (featureValue1 == null) {

-          // nothing to do

-        } else if (featureValue1 != null || featureValue2 != null) {

-          return false;

-        }

-      }

-    }

-    return result && (allEmpty1 == allEmpty2);

-  }

-

-  private boolean matchAnnotations(AnnotationFS a1, AnnotationFS a2) {

-    if (a1 != null && a2 != null) {

-      if (a1.getBegin() == a2.getBegin() && a1.getEnd() == a2.getEnd()

-              && a1.getType().getName().equals(a2.getType().getName())) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/TemplateCasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/TemplateCasEvaluatorFactory.java
deleted file mode 100755
index 9f3d753..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/TemplateCasEvaluatorFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-public class TemplateCasEvaluatorFactory implements ICasEvaluatorFactory {

-

-  public ICasEvaluator createEvaluator() {

-    return new TemplateCasEvaluator();

-  }

-

-  public String getDescription() {

-    return "Complex feature structures that provide at least one annotation as a feature value are compared. A template feature structure is a true positive if all all feature values are correct.";

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordAccuracyCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordAccuracyCasEvaluator.java
deleted file mode 100755
index e85591d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordAccuracyCasEvaluator.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.CASRuntimeException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.seed.DefaultSeeder;

-

-public class WordAccuracyCasEvaluator extends AbstractCasEvaluator {

-

-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes)

-          throws CASRuntimeException, CASException {

-    Type annotationType = test.getAnnotationType();

-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);

-

-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);

-    List<Type> types = getTypes(test, excludedTypes, annotationType, useAllTypes);

-

-    List<AnnotationFS> testAnnotations = getAnnotations(types, test, includeSubtypes);

-    List<AnnotationFS> runAnnotations = getAnnotations(types, run, includeSubtypes);

-

-    Collection<AnnotationFS> matched = new HashSet<AnnotationFS>();

-    List<AnnotationFS> fp = new ArrayList<AnnotationFS>();

-    List<AnnotationFS> fn = new ArrayList<AnnotationFS>();

-    List<AnnotationFS> tp = new ArrayList<AnnotationFS>();

-

-    // need basics in this test cas too:

-    final DefaultSeeder scanner = new DefaultSeeder();

-    scanner.seed(test.getDocumentText(), test);

-    testAnnotations = expand(testAnnotations, test, getWordTypes(test));

-    runAnnotations = expand(runAnnotations, run, getWordTypes(run));

-

-    for (AnnotationFS eachTest : testAnnotations) {

-      boolean found = false;

-      for (AnnotationFS eachRun : runAnnotations) {

-        if (match(eachTest, eachRun)) {

-          matched.add(eachRun);

-          found = true;

-          break;

-        }

-      }

-      if (!found) {

-        AnnotationFS createAnnotation = run.createAnnotation(falseNegativeType,

-                eachTest.getBegin(), eachTest.getEnd());

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());

-        createAnnotation.setFeatureValue(feature, original);

-        fn.add(createAnnotation);

-      } else {

-        AnnotationFS createAnnotation = run.createAnnotation(truePositveType, eachTest.getBegin(),

-                eachTest.getEnd());

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        AnnotationFS original = run.createAnnotation(type, eachTest.getBegin(), eachTest.getEnd());

-        createAnnotation.setFeatureValue(feature, original);

-        tp.add(createAnnotation);

-      }

-    }

-

-    for (AnnotationFS each : runAnnotations) {

-      if (!matched.contains(each)) {

-        AnnotationFS createAnnotation = run.createAnnotation(falsePositiveType, each.getBegin(),

-                each.getEnd());

-        Type type = run.getTypeSystem().getType(each.getType().getName());

-        AnnotationFS original = run.createAnnotation(type, each.getBegin(), each.getEnd());

-        createAnnotation.setFeatureValue(feature, original);

-        fp.add(createAnnotation);

-      }

-    }

-

-    for (AnnotationFS annotationFS : fn) {

-      run.addFsToIndexes(annotationFS);

-    }

-    for (AnnotationFS annotationFS : fp) {

-      run.addFsToIndexes(annotationFS);

-    }

-    for (AnnotationFS annotationFS : tp) {

-      run.addFsToIndexes(annotationFS);

-    }

-    return run;

-  }

-

-  private List<Type> getWordTypes(CAS test) {

-    List<Type> result = new ArrayList<Type>();

-    result.add(test.getTypeSystem().getType("org.apache.uima.ruta.type.W"));

-    result.add(test.getTypeSystem().getType("org.apache.uima.ruta.type.NUM"));

-    return result;

-  }

-

-  private List<AnnotationFS> expand(List<AnnotationFS> list, CAS cas, List<Type> basicTypes) {

-    List<AnnotationFS> result = new LinkedList<AnnotationFS>();

-    for (Type basicType : basicTypes) {

-      for (AnnotationFS each : list) {

-        AnnotationFS window = cas.createAnnotation(basicType, each.getBegin(), each.getEnd());

-        FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(basicType).subiterator(window);

-        while (iterator.isValid()) {

-          AnnotationFS basic = iterator.get();

-          if (cas.getTypeSystem().subsumes(basicType, basic.getType())

-                  && basic.getBegin() >= each.getBegin() && basic.getEnd() <= each.getEnd()) {

-            result.add(cas.createAnnotation(each.getType(), basic.getBegin(), basic.getEnd()));

-          }

-          iterator.moveToNext();

-        }

-      }

-    }

-    return result;

-  }

-  

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordAccuracyCasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordAccuracyCasEvaluatorFactory.java
deleted file mode 100755
index 617f18a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordAccuracyCasEvaluatorFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-public class WordAccuracyCasEvaluatorFactory implements ICasEvaluatorFactory {

-

-  public ICasEvaluator createEvaluator() {

-    return new WordAccuracyCasEvaluator();

-  }

-

-  public String getDescription() {

-    return "Compare the 'labels' of all words/numbers in an annotation, whereas the label equals the type of the annoation. This has the consequence, for example, that each word or number that is not part of the annotation is counted as a single false negative.";

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordTemplateCasEvaluator.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordTemplateCasEvaluator.java
deleted file mode 100755
index 2592c31..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordTemplateCasEvaluator.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.CASRuntimeException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.ruta.seed.DefaultSeeder;

-

-public class WordTemplateCasEvaluator extends AbstractCasEvaluator {

-

-  public CAS evaluate(CAS test, CAS run, Collection<String> excludedTypes, boolean includeSubtypes, boolean useAllTypes)

-          throws CASRuntimeException, CASException {

-    Type falsePositiveType = run.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = run.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositveType = run.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);

-    Feature feature = falsePositiveType.getFeatureByBaseName(ICasEvaluator.ORIGINAL);

-    List<Type> allTypes = test.getTypeSystem().getProperlySubsumedTypes(

-            test.getTypeSystem().getTopType());

-    List<Type> types = new ArrayList<Type>();

-

-    TypeSystem typeSystem = test.getTypeSystem();

-    Type annotationType = test.getAnnotationType();

-    for (Type eachType : allTypes) {

-      if (!excludedTypes.contains(eachType.getName())) {

-        List<Feature> features = eachType.getFeatures();

-        for (Feature f : features) {

-          Type range = f.getRange();

-          if (typeSystem.subsumes(annotationType, range)) {

-            if (!eachType.getName().startsWith("org.apache.uima.ruta.type")) {

-              types.add(eachType);

-              break;

-            }

-          }

-        }

-      }

-    }

-

-    List<Type> wordTypes = getWordTypes(run);

-    Collection<FeatureStructure> testFSs = getFeatureStructures(types, test);

-    Collection<FeatureStructure> runFSs = getFeatureStructures(types, run);

-

-    Collection<FeatureStructure> matched = new HashSet<FeatureStructure>();

-    List<FeatureStructure> fp = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> fn = new ArrayList<FeatureStructure>();

-    List<FeatureStructure> tp = new ArrayList<FeatureStructure>();

-

-    if (test.getAnnotationIndex(

-            test.getTypeSystem().getType("org.apache.uima.ruta.type.RutaBasic")).size() == 0) {

-      // need basics in this test cas too:

-      final DefaultSeeder scanner = new DefaultSeeder();

-      scanner.seed(test.getDocumentText(), test);

-    }

-    for (FeatureStructure eachTest : testFSs) {

-      boolean found = false;

-      for (FeatureStructure eachRun : runFSs) {

-        if (match(eachTest, eachRun, wordTypes)) {

-          matched.add(eachRun);

-          found = true;

-          break;

-        }

-      }

-      if (!found) {

-        FeatureStructure createFS = run.createFS(falseNegativeType);

-        fillFS(eachTest, createFS, false);

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(eachTest, original, true);

-        createFS.setFeatureValue(feature, original);

-        fn.add(createFS);

-      } else {

-        FeatureStructure createFS = run.createFS(truePositveType);

-        fillFS(eachTest, createFS, false);

-        Type type = run.getTypeSystem().getType(eachTest.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(eachTest, original, true);

-        createFS.setFeatureValue(feature, original);

-        tp.add(createFS);

-      }

-    }

-

-    for (FeatureStructure each : runFSs) {

-      if (!matched.contains(each)) {

-        FeatureStructure createFS = run.createFS(falsePositiveType);

-        fillFS(each, createFS, false);

-        Type type = run.getTypeSystem().getType(each.getType().getName());

-        FeatureStructure original = run.createFS(type);

-        fillFS(each, original, true);

-        createFS.setFeatureValue(feature, original);

-        fp.add(createFS);

-      }

-    }

-

-    for (FeatureStructure fs : fn) {

-      run.addFsToIndexes(fs);

-    }

-    for (FeatureStructure fs : fp) {

-      run.addFsToIndexes(fs);

-    }

-    for (FeatureStructure fs : tp) {

-      run.addFsToIndexes(fs);

-    }

-    return run;

-  }

-

-  private List<Type> getWordTypes(CAS test) {

-    List<Type> result = new ArrayList<Type>();

-    result.add(test.getTypeSystem().getType("org.apache.uima.ruta.type.W"));

-    result.add(test.getTypeSystem().getType("org.apache.uima.ruta.type.NUM"));

-    return result;

-  }

-

-  private void fillFS(FeatureStructure fs, FeatureStructure newFS, boolean withFeatures) {

-    if (fs instanceof AnnotationFS) {

-      Annotation a = (Annotation) newFS;

-      a.setBegin(((AnnotationFS) fs).getBegin());

-      a.setEnd(((AnnotationFS) fs).getEnd());

-    }

-    if (withFeatures) {

-      CAS testCas = fs.getCAS();

-      CAS runCas = newFS.getCAS();

-      TypeSystem testTS = testCas.getTypeSystem();

-      TypeSystem runTS = runCas.getTypeSystem();

-      Type annotationType = testCas.getAnnotationType();

-      List<Feature> features = fs.getType().getFeatures();

-      for (Feature feature : features) {

-        Type range = feature.getRange();

-        if (testTS.subsumes(annotationType, range)) {

-          FeatureStructure valueTest = fs.getFeatureValue(feature);

-          if (valueTest instanceof AnnotationFS) {

-            AnnotationFS a1 = (AnnotationFS) valueTest;

-            Feature feature2 = newFS.getType().getFeatureByBaseName(feature.getShortName());

-            if (feature2 != null) {

-              Type range2 = runTS.getType(range.getName());

-              AnnotationFS createAnnotation = runCas.createAnnotation(range2, a1.getBegin(),

-                      a1.getEnd());

-              newFS.setFeatureValue(feature2, createAnnotation);

-            }

-          }

-        }

-      }

-    }

-  }

-  

-  private Collection<FeatureStructure> getFeatureStructures(List<Type> types, CAS cas) {

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Type annotationType = cas.getAnnotationType();

-    Collection<FeatureStructure> result = new HashSet<FeatureStructure>();

-    AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex();

-    for (AnnotationFS each : annotationIndex) {

-      Type type = each.getType();

-      for (Type eachType : types) {

-        if(typeSystem.subsumes(eachType, type)) {

-          List<Feature> features = each.getType().getFeatures();

-          for (Feature feature : features) {

-            Type range = feature.getRange();

-            if (typeSystem.subsumes(annotationType, range)) {

-              result.add(each);

-              break;

-            }

-          }

-        }

-      }

-    }

-    return result;

-  }

-  

-

-  private List<AnnotationFS> expand(AnnotationFS a, CAS cas, List<Type> basicTypes) {

-    List<AnnotationFS> result = new LinkedList<AnnotationFS>();

-    for (Type basicType : basicTypes) {

-      AnnotationFS window = cas.createAnnotation(basicType, a.getBegin(), a.getEnd());

-      FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(basicType).subiterator(window);

-      while (iterator.isValid()) {

-        AnnotationFS basic = iterator.get();

-        if (cas.getTypeSystem().subsumes(basicType, basic.getType())

-                && basic.getBegin() >= a.getBegin() && basic.getEnd() <= a.getEnd()) {

-          result.add(cas.createAnnotation(a.getType(), basic.getBegin(), basic.getEnd()));

-        }

-        iterator.moveToNext();

-      }

-    }

-    return result;

-  }

-

-  private boolean match(FeatureStructure a1, FeatureStructure a2, List<Type> basicTypes) {

-    Type type1 = a1.getType();

-    Type type2 = a2.getType();

-    if (!type1.getName().equals(type2.getName())) {

-      return false;

-    }

-

-    if (a1 instanceof AnnotationFS && a2 instanceof AnnotationFS) {

-      AnnotationFS a11 = (AnnotationFS) a1;

-      AnnotationFS a22 = (AnnotationFS) a2;

-      if (!(a11.getBegin() == a22.getBegin() && a11.getEnd() == a22.getEnd())) {

-        return false;

-      }

-    }

-    CAS cas = a1.getCAS();

-    TypeSystem typeSystem = cas.getTypeSystem();

-    Type annotationType = cas.getAnnotationType();

-    List<Feature> features1 = type1.getFeatures();

-    boolean result = true;

-    boolean allEmpty1 = true;

-    boolean allEmpty2 = true;

-    for (Feature eachFeature1 : features1) {

-      Type range = eachFeature1.getRange();

-      if (typeSystem.subsumes(annotationType, range)) {

-        String name = eachFeature1.getShortName();

-        Feature eachFeature2 = type2.getFeatureByBaseName(name);

-        FeatureStructure featureValue1 = a1.getFeatureValue(eachFeature1);

-        FeatureStructure featureValue2 = a2.getFeatureValue(eachFeature2);

-        allEmpty1 &= featureValue1 == null;

-        allEmpty2 &= featureValue2 == null;

-        if (featureValue1 instanceof AnnotationFS && featureValue2 instanceof AnnotationFS) {

-          result &= matchAnnotations((AnnotationFS) featureValue1, (AnnotationFS) featureValue2,

-                  basicTypes);

-        } else if (featureValue1 == null) {

-          // nothing to do

-        } else if (featureValue1 != null || featureValue2 != null) {

-          return false;

-        }

-      }

-    }

-    return result && (allEmpty1 == allEmpty2);

-  }

-

-  private boolean matchAnnotations(AnnotationFS a1, AnnotationFS a2, List<Type> basicTypes) {

-    List<AnnotationFS> w1 = expand(a1, a1.getCAS(), basicTypes);

-    List<AnnotationFS> w2 = expand(a2, a2.getCAS(), basicTypes);

-    boolean result = true;

-    int i = 0;

-    for (AnnotationFS each1 : w1) {

-      if (w2.size() > i) {

-        AnnotationFS each2 = w2.get(i);

-        result &= match(each1, each2);

-      } else {

-        return false;

-      }

-      i++;

-    }

-    return result;

-  }

-

-  

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordTemplateCasEvaluatorFactory.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordTemplateCasEvaluatorFactory.java
deleted file mode 100755
index 2a679cc..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/evaluator/WordTemplateCasEvaluatorFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.testing.evaluator;

-

-public class WordTemplateCasEvaluatorFactory implements ICasEvaluatorFactory {

-

-  public ICasEvaluator createEvaluator() {

-    return new WordTemplateCasEvaluator();

-  }

-

-  public String getDescription() {

-    return "Complex feature structures that provide at least one annotation as a feature value are compared. A template feature structure is a true positive if all all feature values are correct. Here, the word level evaluator is applied for the comparisionof the feature values.";

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/DescriptionChangedListener.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/DescriptionChangedListener.java
deleted file mode 100755
index 7f294ee..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/DescriptionChangedListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.ruta.testing.preferences;
-
-public class DescriptionChangedListener implements IDescriptionChangedListener {
-
-  public void descriptionChanged(String description) {
-    
-
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/DescriptionRadioGroupFieldEditor.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/DescriptionRadioGroupFieldEditor.java
deleted file mode 100755
index 97bf38e..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/DescriptionRadioGroupFieldEditor.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * 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.ruta.testing.preferences;
-
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-
-public class DescriptionRadioGroupFieldEditor extends FieldEditor {
-
-  private IDescriptionChangedListener descriptionChangedListener;
-
-  /**
-   * List of radio button entries of the form [label,value].
-   */
-  private String[][] labelsAndValues;
-
-  /**
-   * Number of columns into which to arrange the radio buttons.
-   */
-  private int numColumns;
-
-  /**
-   * Indent used for the first column of the radion button matrix.
-   */
-  private int indent = HORIZONTAL_GAP;
-
-  /**
-   * The current value, or <code>null</code> if none.
-   */
-  private String value;
-
-  /**
-   * The box of radio buttons, or <code>null</code> if none (before creation and after disposal).
-   */
-  private Composite radioBox;
-
-  /**
-   * The radio buttons, or <code>null</code> if none (before creation and after disposal).
-   */
-  private Button[] radioButtons;
-
-  /**
-   * Whether to use a Group control.
-   */
-  private boolean useGroup;
-
-  public DescriptionRadioGroupFieldEditor(String name, String labelText, int numColumns,
-          String[][] labelAndValues, Composite parent, boolean useGroup) {
-    init(name, labelText);
-    Assert.isTrue(checkArray(labelAndValues));
-    this.labelsAndValues = labelAndValues;
-    this.numColumns = numColumns;
-    this.useGroup = useGroup;
-    createControl(parent);
-  }
-
-  public DescriptionRadioGroupFieldEditor(String name, String labelText, int numColumns,
-          String[][] labelAndValues, Composite parent) {
-    this(name,labelText,numColumns,labelAndValues,parent,false);
-
-
-  }
-
-  @Override
-  protected void adjustForNumColumns(int numColumns) {
-    Control control = getLabelControl();
-    if (control != null) {
-        ((GridData) control.getLayoutData()).horizontalSpan = numColumns;
-    }
-    ((GridData) radioBox.getLayoutData()).horizontalSpan = numColumns;
-}
-
-/**
- * Checks whether given <code>String[][]</code> is of "type" 
- * <code>String[][2]</code>.
- * @param table
- *
- * @return <code>true</code> if it is ok, and <code>false</code> otherwise
- */
-private boolean checkArray(String[][] table) {
-    if (table == null)
-        return false;
-    for (int i = 0; i < table.length; i++) {
-        String[] array = table[i];
-        if (array == null || array.length != 2)
-            return false;
-    }
-    return true;
-}
-
-/* (non-Javadoc)
- * Method declared on FieldEditor.
- */
-@Override
-protected void doFillIntoGrid(Composite parent, int numColumns) {
-    if (useGroup) {
-        Control control = getRadioBoxControl(parent);
-        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-        control.setLayoutData(gd);
-    } else {
-        Control control = getLabelControl(parent);
-        GridData gd = new GridData();
-        gd.horizontalSpan = numColumns;
-        control.setLayoutData(gd);
-        control = getRadioBoxControl(parent);
-        gd = new GridData();
-        gd.horizontalSpan = numColumns;
-        gd.horizontalIndent = indent;
-        control.setLayoutData(gd);
-    }
-
-}
-
-/* (non-Javadoc)
- * Method declared on FieldEditor.
- */
-@Override
-protected void doLoad() {
-    updateValue(getPreferenceStore().getString(getPreferenceName()));
-}
-
-/* (non-Javadoc)
- * Method declared on FieldEditor.
- */
-@Override
-protected void doLoadDefault() {
-    updateValue(getPreferenceStore().getDefaultString(getPreferenceName()));
-}
-
-/* (non-Javadoc)
- * Method declared on FieldEditor.
- */
-@Override
-protected void doStore() {
-    if (value == null) {
-        getPreferenceStore().setToDefault(getPreferenceName());
-        return;
-    }
-
-    getPreferenceStore().setValue(getPreferenceName(), value);
-}
-
-/* (non-Javadoc)
- * Method declared on FieldEditor.
- */
-@Override
-public int getNumberOfControls() {
-    return 1;
-}
-
-/**
- * Returns this field editor's radio group control.
- * @param parent The parent to create the radioBox in
- * @return the radio group control
- */
-public Composite getRadioBoxControl(Composite parent) {
-    if (radioBox == null) {
-
-        Font font = parent.getFont();
-
-        if (useGroup) {
-            Group group = new Group(parent, SWT.NONE);
-            group.setFont(font);
-            String text = getLabelText();
-            if (text != null)
-                group.setText(text);
-            radioBox = group;
-            GridLayout layout = new GridLayout();
-            layout.horizontalSpacing = HORIZONTAL_GAP;
-            layout.numColumns = numColumns;
-            radioBox.setLayout(layout);
-        } else {
-            radioBox = new Composite(parent, SWT.NONE);
-            GridLayout layout = new GridLayout();
-            layout.marginWidth = 0;
-            layout.marginHeight = 0;
-            layout.horizontalSpacing = HORIZONTAL_GAP;
-            layout.numColumns = numColumns;
-            radioBox.setLayout(layout);
-            radioBox.setFont(font);
-        }
-
-        radioButtons = new Button[labelsAndValues.length];
-        for (int i = 0; i < labelsAndValues.length; i++) {
-            Button radio = new Button(radioBox, SWT.RADIO | SWT.LEFT);
-            radioButtons[i] = radio;
-            String[] labelAndValue = labelsAndValues[i];
-            radio.setText(labelAndValue[0]);
-            radio.setData(labelAndValue[1]);
-            radio.setFont(font);
-            radio.addSelectionListener(new SelectionAdapter() {
-                @Override
-                public void widgetSelected(SelectionEvent event) {
-                    String oldValue = value;
-                    value = (String) event.widget.getData();
-                    setPresentsDefaultValue(false);
-                    fireValueChanged(VALUE, oldValue, value);
-                    if(descriptionChangedListener != null) {
-                      descriptionChangedListener.descriptionChanged(value);
-                    }
-                }
-            });
-        }
-        radioBox.addDisposeListener(new DisposeListener() {
-            public void widgetDisposed(DisposeEvent event) {
-                radioBox = null;
-                radioButtons = null;
-            }
-        });
-    } else {
-        checkParent(radioBox, parent);
-    }
-    return radioBox;
-}
-
-/**
- * Sets the indent used for the first column of the radion button matrix.
- *
- * @param indent the indent (in pixels)
- */
-public void setIndent(int indent) {
-    if (indent < 0)
-        this.indent = 0;
-    else
-        this.indent = indent;
-}
-
-/**
- * Select the radio button that conforms to the given value.
- *
- * @param selectedValue the selected value
- */
-private void updateValue(String selectedValue) {
-    this.value = selectedValue;
-    if (radioButtons == null)
-        return;
-
-    if (this.value != null) {
-        boolean found = false;
-        for (int i = 0; i < radioButtons.length; i++) {
-            Button radio = radioButtons[i];
-            boolean selection = false;
-            if (((String) radio.getData()).equals(this.value)) {
-                selection = true;
-                found = true;
-            }
-            radio.setSelection(selection);
-        }
-        if (found)
-            return;
-    }
-
-    // We weren't able to find the value. So we select the first
-    // radio button as a default.
-    if (radioButtons.length > 0) {
-        radioButtons[0].setSelection(true);
-        this.value = (String) radioButtons[0].getData();
-    }
-    return;
-}
-
-/*
- * @see FieldEditor.setEnabled(boolean,Composite).
- */
-@Override
-public void setEnabled(boolean enabled, Composite parent) {
-    if (!useGroup)
-        super.setEnabled(enabled, parent);
-    for (int i = 0; i < radioButtons.length; i++) {
-        radioButtons[i].setEnabled(enabled);
-    }
-
-}
-
-public void setDescriptionChangedListener (IDescriptionChangedListener listener) {
-  descriptionChangedListener = listener;
-}
-
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/IDescriptionChangedListener.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/IDescriptionChangedListener.java
deleted file mode 100755
index 4e656b8..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/IDescriptionChangedListener.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.ruta.testing.preferences;
-
-public interface IDescriptionChangedListener {
-  
-  public void descriptionChanged(String description);
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferenceConstants.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferenceConstants.java
deleted file mode 100755
index 43c75fe..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferenceConstants.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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.ruta.testing.preferences;
-
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-
-public class TestingPreferenceConstants {
-
-  public static final String EVALUATOR_FACTORY = "EVALUATOR_FACTORY";
-
-  public static final String DEFAULT_EVALUATOR_FACTORY = "org.apache.uima.ruta.testing.exactCasEvaluator";
-
-  public static final String AUTOMATED_FILE_SYNCRONIZATION = "AUTOMATED_FILE_SYNCRONIZATION";
-
-  public static final String LOAD_OLD_TEST_RESULTS = "LOAD_OLD_TEST_RESULTS";
-
-  public static final String INCLUDE_SUBTYPES = "INCLUDE_SUBTYPES";
-  
-  public static final String ALL_TYPES = "ALL_TYPES";
-
-  public static final String EXTEND_CLASSPATH = "EXTEND_CLASSPATH";
-
-  public static String[][] EVALUATORS = getEvaluators();
-
-  public static String[][] getEvaluators() {
-    IExtension[] evalExtensions = Platform.getExtensionRegistry()
-            .getExtensionPoint(RutaAddonsPlugin.PLUGIN_ID, "evaluators").getExtensions();
-    int size = 0;
-    for (IExtension extension : evalExtensions) {
-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();
-      for (IConfigurationElement configurationElement : configurationElements) {
-        size++;
-      }
-    }
-
-    String[][] evalFactories = new String[size][2];
-    int count = 0;
-    for (IExtension extension : evalExtensions) {
-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();
-      for (IConfigurationElement configurationElement : configurationElements) {
-        evalFactories[count][0] = configurationElement.getAttribute("name");
-        evalFactories[count][1] = configurationElement.getAttribute("id");
-        count++;
-      }
-    }
-    return evalFactories;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferenceInitializer.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferenceInitializer.java
deleted file mode 100755
index 761c60d..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferenceInitializer.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.ruta.testing.preferences;
-
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-public class TestingPreferenceInitializer extends AbstractPreferenceInitializer {
-
-  @Override
-  public void initializeDefaultPreferences() {
-    IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();
-
-    store.setDefault(TestingPreferenceConstants.EVALUATOR_FACTORY,
-            TestingPreferenceConstants.DEFAULT_EVALUATOR_FACTORY);
-
-    store.setDefault(TestingPreferenceConstants.AUTOMATED_FILE_SYNCRONIZATION, "0");
-    store.setDefault(TestingPreferenceConstants.LOAD_OLD_TEST_RESULTS, "0");
-    store.setDefault(TestingPreferenceConstants.INCLUDE_SUBTYPES, "0");
-    store.setDefault(TestingPreferenceConstants.ALL_TYPES, true);
-    store.setDefault(TestingPreferenceConstants.EXTEND_CLASSPATH, false);
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferencePage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferencePage.java
deleted file mode 100755
index c5c2409..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/preferences/TestingPreferencePage.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * 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.ruta.testing.preferences;
-
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.ruta.testing.ui.handlers.ExtendClasspathHandler;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-
-public class TestingPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
-  public static String ID = "org.apache.uima.ruta.testing.preferences";
-
-  private Text desc;
-
-  private Label evalHeadline;
-
-  private DescriptionRadioGroupFieldEditor evaluators;
-
-  private BooleanFieldEditor sync;
-
-  private BooleanFieldEditor oldResults;
-
-  private BooleanFieldEditor includeSubtypes;
-
-  private BooleanFieldEditor allTypes;
-
-  private BooleanFieldEditor extendClasspath;
-
-  public TestingPreferencePage() {
-    IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();
-    setPreferenceStore(store);
-  }
-
-  public void init(IWorkbench workbench) {
-  }
-
-  @Override
-  protected Control createContents(Composite parent) {
-    Composite top = new Composite(parent, SWT.LEFT);
-    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    top.setLayout(new GridLayout());
-
-    sync = new BooleanFieldEditor(TestingPreferenceConstants.AUTOMATED_FILE_SYNCRONIZATION,
-            "Synchronize Test-Files and Workspace automatically", top);
-    sync.setPage(this);
-    sync.setPreferenceStore(getPreferenceStore());
-    sync.load();
-
-    oldResults = new BooleanFieldEditor(TestingPreferenceConstants.LOAD_OLD_TEST_RESULTS,
-            "Load test results from previous sessions", top);
-    oldResults.setPage(this);
-    oldResults.setPreferenceStore(getPreferenceStore());
-    oldResults.load();
-
-    includeSubtypes = new BooleanFieldEditor(TestingPreferenceConstants.INCLUDE_SUBTYPES,
-            "Additionally include subtypes", top);
-    includeSubtypes.setPage(this);
-    includeSubtypes.setPreferenceStore(getPreferenceStore());
-    includeSubtypes.load();
-    
-    allTypes = new BooleanFieldEditor(TestingPreferenceConstants.ALL_TYPES,
-            "Use all types", top);
-    allTypes.setPage(this);
-    allTypes.setPreferenceStore(getPreferenceStore());
-    allTypes.load();
-    
-    extendClasspath = new BooleanFieldEditor(TestingPreferenceConstants.EXTEND_CLASSPATH,
-            "Extend classpath", top);
-    extendClasspath.setPage(this);
-    extendClasspath.setPreferenceStore(getPreferenceStore());
-    extendClasspath.load();
-    
-    evaluators = new DescriptionRadioGroupFieldEditor(TestingPreferenceConstants.EVALUATOR_FACTORY,
-            "Evaluator :", 1, TestingPreferenceConstants.EVALUATORS, top);
-
-    evaluators.setPage(this);
-    evaluators.setPreferenceStore(getPreferenceStore());
-    evaluators.load();
-
-    IDescriptionChangedListener listener = new IDescriptionChangedListener() {
-      public void descriptionChanged(String s) {
-        String text = RutaAddonsPlugin.getCasEvaluatorFactoryById(s).getDescription();
-        desc.setText(text);
-        desc.update();
-        desc.redraw();
-      }
-    };
-
-    evaluators.setDescriptionChangedListener(listener);
-    evalHeadline = new Label(top, SWT.NULL);
-    evalHeadline.setText("Description:");
-
-    desc = new Text(top, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
-    desc.setText(getEvalDesc());
-    desc.setBackground(this.getControl().getDisplay().getSystemColor(SWT.COLOR_WHITE));
-    desc.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-    return top;
-  }
-
-  public String getEvalDesc() {
-    return RutaAddonsPlugin.getCasEvaluatorFactoryById(
-            getPreferenceStore().getString(TestingPreferenceConstants.EVALUATOR_FACTORY))
-            .getDescription();
-  }
-
-  protected void loadDefaults() {
-    sync.loadDefault();
-    oldResults.loadDefault();
-    evaluators.loadDefault();
-    includeSubtypes.loadDefault();
-    allTypes.loadDefault();
-    extendClasspath.loadDefault();
-    ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(
-            ICommandService.class);
-    service.refreshElements(ExtendClasspathHandler.COMMAND_ID, null);
-    super.performDefaults();
-  }
-  
-  @Override
-  protected void performDefaults() {
-    sync.loadDefault();
-    oldResults.loadDefault();
-    evaluators.loadDefault();
-    includeSubtypes.loadDefault();
-    allTypes.loadDefault();
-    extendClasspath.loadDefault();
-    ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(
-            ICommandService.class);
-    service.refreshElements(ExtendClasspathHandler.COMMAND_ID, null);
-    super.performDefaults();
-  }
-  
-  @Override
-  protected void performApply() {
-    sync.store();
-    oldResults.store();
-    evaluators.store();
-    includeSubtypes.store();
-    allTypes.store();
-    extendClasspath.store();
-    ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(
-            ICommandService.class);
-    service.refreshElements(ExtendClasspathHandler.COMMAND_ID, null);
-    super.performApply();
-  }
-  
-  @Override
-  public boolean performOk() {
-    sync.store();
-    oldResults.store();
-    evaluators.store();
-    includeSubtypes.store();
-    allTypes.store();
-    extendClasspath.store();
-    ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(
-            ICommandService.class);
-    service.refreshElements(ExtendClasspathHandler.COMMAND_ID, null);
-    return super.performOk();
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/searchStrategy/TestingSearchStrategy.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/searchStrategy/TestingSearchStrategy.java
deleted file mode 100755
index 2853a13..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/searchStrategy/TestingSearchStrategy.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * 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.ruta.testing.searchStrategy;

-

-import java.util.List;

-

-import org.apache.uima.caseditor.ide.searchstrategy.ITypeSystemSearchStrategy;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IProjectNature;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-

-public class TestingSearchStrategy implements ITypeSystemSearchStrategy {

-

-  public IFile findTypeSystem(IFile casFile) {

-    IPath location = casFile.getLocation();

-    IProject project = casFile.getProject();

-

-    try {

-      IProjectNature nature = project.getNature(RutaNature.NATURE_ID);

-      if (!(nature instanceof RutaNature)) {

-        return null;

-      }

-    } catch (CoreException e) {

-      return null;

-    }

-

-    IFolder testFolder = project.getFolder(RutaProjectUtils.getDefaultTestLocation());

-    IPath relativeTo = location.makeRelativeTo(testFolder.getLocation());

-    IPath segments = relativeTo.removeLastSegments(2);

-    String scriptName = segments.lastSegment();

-    if(scriptName == null) {

-      return null;

-    }

-    segments = segments.removeLastSegments(1);

-    String tsName = "";

-    try {

-      tsName = scriptName + RutaProjectUtils.getTypeSystemSuffix(project) + ".xml";

-    } catch (Exception e) {

-      return null;

-    }

-    List<IFolder> descriptorFolders = null;

-    try {

-      descriptorFolders = RutaProjectUtils.getDescriptorFolders(project);

-    } catch (CoreException e) {

-      RutaAddonsPlugin.error(e);

-    }

-    if(descriptorFolders == null) {

-      return null;

-    }

-    

-    for (IFolder iFolder : descriptorFolders) {

-      IFile result = iFolder.getFile(tsName);

-      if (result == null || !result.exists()) {

-        return null;

-      }

-    }

-    

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/ExportTabelHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/ExportTabelHandler.java
deleted file mode 100755
index f098a4a..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/ExportTabelHandler.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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.ruta.testing.ui.handlers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.apache.uima.ruta.testing.ui.views.EvalDataDialog;
-import org.apache.uima.ruta.testing.ui.views.TestCasData;
-import org.apache.uima.ruta.testing.ui.views.TestPageBookView;
-import org.apache.uima.ruta.testing.ui.views.TestViewPage;
-import org.apache.uima.ruta.testing.ui.views.evalDataTable.TypeEvalData;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-
-public class ExportTabelHandler extends AbstractHandler {
-
-  public Object execute(ExecutionEvent event) throws ExecutionException {
-    TestPageBookView debugView = (TestPageBookView) HandlerUtil.getActivePart(event);
-    if(!(debugView.getCurrentPage() instanceof TestViewPage)) {
-      return Status.CANCEL_STATUS;
-    }
-    TestViewPage debugPage = (TestViewPage) debugView.getCurrentPage();
-    
-    TableViewer viewer = debugPage.getViewer();
-    
-    Shell shell = HandlerUtil.getActiveShell(event);
-    
-    String evalData = "Test File,Type,TP,FP,FN,Recall,Prec,F-1\n";
-    
-    
-    ArrayList<TestCasData> dataList = (ArrayList)viewer.getInput();
-    
-    for (TestCasData entry : dataList) {
-      Collection<TypeEvalData> col = entry.getTypeEvalData().values();
-      for (TypeEvalData data : col) {
-        if (!data.getTypeName().equals("Total")) {
-          
-        
-        
-        String column = entry.getPath().lastSegment() + ","
-        + data.getTypeName() + "," 
-        + String.valueOf(data.getTruePositives()) + "," 
-        + String.valueOf(data.getFalsePositives()) + "," 
-        + String.valueOf(data.getFalseNegatives()) + "," 
-        + String.valueOf(data.getRecall()) + "," 
-        + String.valueOf(data.getPrecision()) + "," 
-        + String.valueOf(data.getFOne())
-        + "\n";
-        evalData = evalData+ column;
-      }
-      }
-      
-    }
-
-    EvalDataDialog dialog = new EvalDataDialog(shell, evalData);
-    dialog.open();
-    
-//    MessageDialog.openConfirm(shell, "Evaluation Data", text);
-
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/ExtendClasspathHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/ExtendClasspathHandler.java
deleted file mode 100644
index 32614b1..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/ExtendClasspathHandler.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.ruta.testing.ui.handlers;
-
-import java.util.Map;
-
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.ruta.testing.preferences.TestingPreferenceConstants;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.commands.IElementUpdater;
-import org.eclipse.ui.menus.UIElement;
-
-public class ExtendClasspathHandler implements IHandler, IElementUpdater {
-
-  public static final String COMMAND_ID = "org.apache.uima.ruta.testing.extendClasspath";
-  
-  @Override
-  public void addHandlerListener(IHandlerListener arg0) {
-  }
-
-  @Override
-  public void dispose() {
-  }
-
-  @Override
-  public Object execute(ExecutionEvent event) throws ExecutionException {
-    IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();
-    boolean b = store.getBoolean(TestingPreferenceConstants.EXTEND_CLASSPATH);
-    store.setValue(TestingPreferenceConstants.EXTEND_CLASSPATH, !b);
-    ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(
-            ICommandService.class);
-    service.refreshElements(event.getCommand().getId(), null);
-    return null;
-  }
-
-  @Override
-  public boolean isEnabled() {
-    return true;
-  }
-
-  @Override
-  public boolean isHandled() {
-    return true;
-  }
-
-  @Override
-  public void removeHandlerListener(IHandlerListener arg0) {
-
-  }
-
-  @Override
-  public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map map) {
-    IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();
-    boolean b = store.getBoolean(TestingPreferenceConstants.EXTEND_CLASSPATH);
-    element.setChecked(b);
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/LoadFilesFromFolderHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/LoadFilesFromFolderHandler.java
deleted file mode 100755
index 14d3592..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/LoadFilesFromFolderHandler.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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.ruta.testing.ui.handlers;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.uima.ruta.testing.ui.views.TestCasData;
-import org.apache.uima.ruta.testing.ui.views.TestPageBookView;
-import org.apache.uima.ruta.testing.ui.views.TestViewPage;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.core.internal.resources.Folder;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class LoadFilesFromFolderHandler implements IHandler {
-
-  TestPageBookView debugView;
-
-  TestViewPage debugPage;
-
-  public void addHandlerListener(IHandlerListener handlerListener) {
-
-  }
-
-  public void dispose() {
-    // TODO Auto-generated method stub
-
-  }
-
-  public Object execute(ExecutionEvent event) throws ExecutionException {
-
-    debugView = (TestPageBookView) HandlerUtil.getActivePart(event);
-    debugPage = (TestViewPage) debugView.getCurrentPage();
-    IProject project = debugPage.getResource().getProject();
-
-    IViewPart scriptExpl = HandlerUtil.getActiveSite(event).getWorkbenchWindow().getActivePage()
-            .findView("org.eclipse.dltk.ui.ScriptExplorer");
-    if (scriptExpl != null) {
-      ISelection select = scriptExpl.getViewSite().getSelectionProvider().getSelection();
-
-      if (select != null && select instanceof StructuredSelection) {
-        StructuredSelection structSelect = (StructuredSelection) select;
-        Iterator<?> iter = structSelect.iterator();
-        while (iter.hasNext()) {
-          Object o = iter.next();
-          if (o instanceof Folder) {
-            Folder folder = (Folder) o;
-            IPath path2Folder = folder.getFullPath().removeFirstSegments(1);
-            IFolder testFolder = project.getFolder(path2Folder);
-
-            loadFolder(testFolder);
-          }
-        }
-      }
-    }
-    return null;
-  }
-
-  public boolean isEnabled() {
-    return true;
-  }
-
-  public boolean isHandled() {
-    return true;
-  }
-
-  public void removeHandlerListener(IHandlerListener handlerListener) {
-  }
-
-  public void loadFolder(IFolder folder) {
-    try {
-      IResource[] children = folder.members();
-      for (IResource r : children) {
-        // if (r instanceof IFolder) {
-        // loadFolder((IFolder)r);
-        // }
-        if (r instanceof IFile) {
-          if (r != null && r instanceof IFile && r.getLocation().getFileExtension().equals("xmi")) {
-            add2Viewer(r.getLocation());
-          }
-        }
-      }
-    } catch (Exception e) {
-      e.printStackTrace();
-    }
-
-  }
-
-  public void add2Viewer(IPath p) {
-
-    TestViewPage debugPage = (TestViewPage) debugView.getCurrentPage();
-
-    TableViewer viewer = debugPage.getViewer();
-
-    if (viewer.getInput() instanceof ArrayList) {
-      ArrayList input = (ArrayList) debugPage.getViewer().getInput();
-      input.add(new TestCasData(p));
-      viewer.refresh();
-
-      if (input.get(0) != null) {
-        TestCasData data = (TestCasData) input.get(0);
-        if (data.wasEvaluated()) {
-          debugPage.updateSingleTestInformation(data);
-        }
-      }
-    }
-
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RemoveTestsHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RemoveTestsHandler.java
deleted file mode 100755
index dd35dc0..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RemoveTestsHandler.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * 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.ruta.testing.ui.handlers;

-

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.testing.ui.views.TestCasData;

-import org.apache.uima.ruta.testing.ui.views.TestPageBookView;

-import org.apache.uima.ruta.testing.ui.views.TestViewPage;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.jface.viewers.TableViewer;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-

-public class RemoveTestsHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-  }

-

-  public void dispose() {

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    TestPageBookView debugView = (TestPageBookView) HandlerUtil.getActivePart(event);

-    TestViewPage activePage = (TestViewPage) debugView.getCurrentPage();

-    TableViewer viewer = activePage.getViewer();

-    List list = (List) viewer.getInput();

-    if (viewer.getSelection() == null) {

-      // TODO Refactor this

-    } else if (viewer.getSelection() instanceof StructuredSelection) {

-      StructuredSelection selection = (StructuredSelection) viewer.getSelection();

-      Iterator<TestCasData> iter = selection.iterator();

-      while (iter.hasNext()) {

-        list.remove(iter.next());

-      }

-    }

-    viewer.refresh(false);

-    // debugView.saveState();

-    return null;

-  }

-

-  public boolean isEnabled() {

-    // TODO Auto-generated method stub

-    return true;

-  }

-

-  public boolean isHandled() {

-    // TODO Auto-generated method stub

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-    // TODO Auto-generated method stub

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java
deleted file mode 100755
index 9c50d2b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java
+++ /dev/null
@@ -1,737 +0,0 @@
-/*

- * 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.ruta.testing.ui.handlers;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileNotFoundException;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.LinkedList;

-import java.util.List;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineDescription;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.impl.XmiCasSerializer;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.jcas.tcas.Annotation;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.resource.metadata.FsIndexDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationConstants;

-import org.apache.uima.ruta.ide.launching.RutaLaunchConstants;

-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;

-import org.apache.uima.ruta.testing.preferences.TestingPreferenceConstants;

-import org.apache.uima.ruta.testing.ui.views.TestCasData;

-import org.apache.uima.ruta.testing.ui.views.TestPageBookView;

-import org.apache.uima.ruta.testing.ui.views.TestViewPage;

-import org.apache.uima.ruta.testing.ui.views.evalDataTable.TypeEvalData;

-import org.apache.uima.ruta.testing.ui.views.util.EvalDataProcessor;

-import org.apache.uima.ruta.type.EvalAnnotation;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.IJobChangeEvent;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.core.runtime.jobs.JobChangeAdapter;

-import org.eclipse.debug.core.DebugPlugin;

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.core.ILaunchConfigurationType;

-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;

-import org.eclipse.debug.core.ILaunchManager;

-import org.eclipse.debug.core.Launch;

-import org.eclipse.jface.dialogs.MessageDialog;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.xml.sax.SAXException;

-

-public class RerunActionHandler implements IHandler {

-

-  private class DebugJobChangeAdapter extends JobChangeAdapter {

-

-    private TestViewPage page;

-

-    DebugJobChangeAdapter(TestViewPage page) {

-      super();

-      this.page = page;

-    }

-

-    @Override

-    public void done(IJobChangeEvent event) {

-      if (event.getResult().isOK()) {

-        page.getControl().getDisplay().asyncExec(new Runnable() {

-          public void run() {

-            page.updateInfoPanel();

-          }

-        });

-      }

-    }

-  }

-

-  /**

-   * Handler that runs the script to be tested and updates the GUI.

-   */

-  private class RerunHandlerJob extends Job {

-    ExecutionEvent event;

-

-    private final String viewCasName;

-

-    private List<String> excludedTypes;

-

-    private List<String> includedTypes;

-

-    private boolean debug;

-

-    RerunHandlerJob(ExecutionEvent event, String scriptName, String viewCasName,

-            List<String> excludedTypes, List<String> includedTypes, boolean debug) {

-      super("Testing " + scriptName + "...");

-      this.event = event;

-      this.viewCasName = viewCasName;

-      this.excludedTypes = excludedTypes;

-      this.includedTypes = includedTypes;

-      this.debug = debug;

-      setUser(true);

-    }

-

-    @Override

-    public IStatus run(IProgressMonitor monitor) {

-

-      // handle GUI

-      final TestPageBookView testPageView = (TestPageBookView) HandlerUtil.getActivePart(event);

-      final TestViewPage debugPage = (TestViewPage) testPageView.getCurrentPage();

-      testPageView.showBusy(true);

-

-      // init variables

-      IResource r = debugPage.getResource();

-      final IFile fScript = (IFile) r;

-      final IProject project = r.getProject();

-      IPath engineDescriptorPath = null;

-      IPath typeSystemDescriptorPath = null;

-      try {

-        engineDescriptorPath = RutaProjectUtils.getAnalysisEngineDescriptorPath(r.getLocation(), project);

-        typeSystemDescriptorPath = RutaProjectUtils.getTypeSystemDescriptorPath(

-                fScript.getLocation(), project);

-      } catch (CoreException e) {

-        RutaAddonsPlugin.error(e);

-      }

-      // show message

-      @SuppressWarnings({ "unchecked", "rawtypes" })

-      ArrayList<TestCasData> testCasData = (ArrayList) debugPage.getViewer().getInput();

-      int numFiles = testCasData.size();

-      monitor.beginTask("Running evaluation, please wait", numFiles);

-

-      // switch usage mode: old (only Ruta) vs. new (supports java/uimaFIT AEs)

-      IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();

-      boolean javaSupportMode = store.getBoolean(TestingPreferenceConstants.EXTEND_CLASSPATH);

-      if (!javaSupportMode) {

-        // only Ruta mode (classpath NOT expanded)

-        IStatus status = evalRutaOnlyScript(monitor, testPageView, debugPage, fScript, project,

-                engineDescriptorPath, testCasData);

-        if (status.getSeverity() == IStatus.ERROR) {

-          Shell shell = Display.getCurrent().getActiveShell();

-          MessageDialog.openWarning(shell, "Error", status.getMessage());

-        }

-        return status;

-      } else {

-        // * write clean run files into a temp directory, remember file names

-        // TODO this approach (may) causes problems, when Java/uimaFIT engines have their own

-        // typesystems...

-        IStatus status = evalRutaWithClassPathScript(monitor, testPageView, debugPage, fScript,

-                project, typeSystemDescriptorPath, testCasData);

-        return status;

-      }

-    }

-

-    private IStatus evalRutaWithClassPathScript(IProgressMonitor monitor,

-            final TestPageBookView testPageView, final TestViewPage debugPage, final IFile fScript,

-            final IProject project, IPath typeSystemDescriptorPath,

-            ArrayList<TestCasData> testCasData) {

-      final IPath cleanInputPath = project.getLocation()

-              .append(RutaProjectUtils.getDefaultTestLocation())

-              .append(RutaProjectUtils.getDefaultCleanTestLocation());

-      clearFolder(project, cleanInputPath);

-      writeCleanInputFiles(testCasData, project, typeSystemDescriptorPath, cleanInputPath, monitor);

-      if (monitor.isCanceled()) {

-        // TODO call monitor.done()

-        return Status.CANCEL_STATUS;

-      }

-

-      // * apply script to the clean run files

-      final IPath runTestPath = project.getLocation()

-              .append(RutaProjectUtils.getDefaultTestLocation())

-              .append(RutaProjectUtils.getDefaultTempTestLocation());

-      clearFolder(project, runTestPath);

-      runWithJVM(monitor, fScript, cleanInputPath, runTestPath);

-

-      try {

-        // * for each (goldFile, runFile)-pair:

-        XMLInputSource in = new XMLInputSource(typeSystemDescriptorPath.toPortableString());

-        TypeSystemDescription tsd = UIMAFramework.getXMLParser().parseTypeSystemDescription(in);

-        CAS runCas = CasCreationUtils.createCas(tsd, null, null);

-        CAS goldCas = CasCreationUtils.createCas(tsd, null, null);

-        for (TestCasData td : testCasData) {

-          // init etc

-          runCas.reset();

-          goldCas.reset();

-          // deserialize CASes

-          IPath path2RunFile = runTestPath.append(td.getPath().toFile().getName());

-          String runFilePath = path2RunFile.toPortableString();

-          File runFile = new File(runFilePath);

-          deserializeCASs(goldCas, td, runCas, runFile);

-          runCas = runCas.getView(viewCasName);

-          goldCas = goldCas.getView(viewCasName);

-          // ** create TP, FP, FN annotations

-          // ** collect results and gather eval data

-          evalLogicAndUpdateGUI(monitor, testPageView, debugPage, fScript, project, runCas,

-                  goldCas, td);

-          if (monitor.isCanceled()) {

-            return Status.CANCEL_STATUS;

-          }

-        }

-      } catch (Exception e) {

-        RutaAddonsPlugin.error(e);

-        monitor.done();

-        testPageView.showBusy(false);

-        return new Status(Status.ERROR, RutaAddonsPlugin.PLUGIN_ID,

-                "Error during testing. See Error View for details.");

-      }

-      monitor.done();

-      return Status.OK_STATUS;

-    }

-

-    /**

-     * This method assumes that gold annotations have already been removed from the files. It just

-     * applies the script to the files.

-     * 

-     * @param monitor

-     * @param scriptFile

-     * @param cleanInputPath

-     */

-    private void runWithJVM(IProgressMonitor monitor, IFile scriptFile, IPath cleanInputPath,

-            IPath runOutputPath) {

-      monitor.setTaskName(String.format("Processing script \"%s\" [w classpatch ext.].",

-              scriptFile.getName()));

-

-      IProject project = scriptFile.getProject();

-

-      // init args

-      String inputDirPath = null;

-      String outputDirPath = null;

-      if (cleanInputPath != null) {

-        inputDirPath = cleanInputPath.toFile().getAbsolutePath();

-      } else {

-        // TODO throw exception

-        return;

-      }

-      if (runOutputPath != null) {

-        outputDirPath = runOutputPath.toFile().getAbsolutePath();

-      } else {

-        // TODO throw exception

-        return;

-      }

-

-      try {

-        IPath descriptorPath = RutaProjectUtils.getAnalysisEngineDescriptorPath(scriptFile.getLocation(),

-                project);

-        String descriptorAbsolutePath = descriptorPath.toFile().getAbsolutePath();

-        ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();

-        ILaunchConfigurationType type = mgr

-                .getLaunchConfigurationType(RutaLaunchConfigurationConstants.ID_RUTA_SCRIPT);

-

-        ILaunchConfigurationWorkingCopy copy = type.newInstance(null, scriptFile.getName()

-                + ".Testing");

-        // do not use RutaLaunchConstants.ARG_INPUT_FOLDER here

-        copy.setAttribute(RutaLaunchConstants.INPUT_FOLDER, inputDirPath);

-        // do not use RutaLaunchConstants.ARG_OUTPUT_FOLDER here

-        copy.setAttribute(RutaLaunchConstants.OUTPUT_FOLDER, outputDirPath);

-        copy.setAttribute(RutaLaunchConstants.ARG_DESCRIPTOR, descriptorAbsolutePath);

-        copy.setAttribute(RutaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());

-        ILaunchConfiguration lc = copy.doSave();

-

-        String mode = ILaunchManager.RUN_MODE;

-        if (debug) {

-          mode = ILaunchManager.DEBUG_MODE;

-        }

-        ILaunch launch = new Launch(lc, mode, null);

-

-        ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();

-

-        ILaunch launched = launchConfiguration.launch(ILaunchManager.RUN_MODE, monitor);

-

-        while (!launched.isTerminated()) {

-          try {

-            Thread.sleep(100);

-          } catch (InterruptedException e) {

-            RutaAddonsPlugin.error(e);

-          }

-        }

-

-      } catch (CoreException e) {

-        RutaAddonsPlugin.error(e);

-      }

-    }

-

-    private void clearFolder(final IProject project, final IPath folderPath) {

-      FileUtils.deleteAllFiles(folderPath.toFile()); // clear folder

-      try {

-        project.getFolder(folderPath.makeRelativeTo(project.getLocation())).refreshLocal(

-                IResource.DEPTH_INFINITE, new NullProgressMonitor());

-      } catch (CoreException e1) {

-        e1.printStackTrace();

-      }

-    }

-

-    private void deserializeCASs(CAS tdCas, TestCasData td, CAS casA, File fileA)

-            throws FileNotFoundException, SAXException, IOException {

-      if (!fileA.exists()) {

-        throw new FileNotFoundException(fileA.getAbsolutePath());

-      }

-      FileInputStream inputStream = null;

-      try {

-        inputStream = new FileInputStream(new File(td.getPath().toPortableString()));

-        XmiCasDeserializer.deserialize(inputStream, tdCas, true);

-      } finally {

-        if (inputStream != null) {

-          inputStream.close();

-        }

-      }

-      try {

-        inputStream = new FileInputStream(fileA);

-        XmiCasDeserializer.deserialize(inputStream, casA, true);

-      } finally {

-        if (inputStream != null) {

-          inputStream.close();

-        }

-      }

-    }

-

-    private void writeCleanInputFiles(List<TestCasData> testCasData, IProject project,

-            IPath tsDescriptorPath, IPath cleanInputPath, IProgressMonitor monitor) {

-      try {

-        // create CAS:

-        XMLInputSource in = new XMLInputSource(tsDescriptorPath.toPortableString());

-        TypeSystemDescription tsd = UIMAFramework.getXMLParser().parseTypeSystemDescription(in);

-

-        CAS cleanCas = getEmptyCas(tsd);

-

-        for (TestCasData td : testCasData) {

-          // init etc

-          cleanCas.reset(); // clean

-          // deserialize CASes

-          FileInputStream inputStreamRun = null;

-          try {

-            inputStreamRun = new FileInputStream(new File(td.getPath().toPortableString()));

-            XmiCasDeserializer.deserialize(inputStreamRun, cleanCas, true);

-          } finally {

-            if (inputStreamRun != null) {

-              inputStreamRun.close();

-            }

-          }

-          cleanCas = cleanCas.getView(viewCasName);

-          prepareCas(cleanCas);

-          // store clean CAS

-          IPath path2CleanFile = computeCleanPath(cleanInputPath, td);

-          String fPath = path2CleanFile.toPortableString();

-          File cleanFile = new File(fPath);

-          writeXmi(cleanCas, cleanFile);

-

-          td.setResultPath(path2CleanFile);

-

-          if (monitor.isCanceled()) {

-            return;

-          }

-        }

-

-        cleanCas.release();

-        project.getFolder(cleanInputPath.makeRelativeTo(project.getLocation())).refreshLocal(

-                IResource.DEPTH_INFINITE, new NullProgressMonitor());

-      } catch (Exception e) {

-        RutaAddonsPlugin.error(e);

-      }

-    }

-

-    private IPath computeCleanPath(IPath cleanInputPath, TestCasData td) {

-      return cleanInputPath.append(td.getPath().removeFileExtension().lastSegment() + ".xmi");

-    }

-

-    private IStatus evalRutaOnlyScript(IProgressMonitor monitor,

-            final TestPageBookView testPageView, final TestViewPage debugPage, IFile fScript,

-            final IProject project, final IPath engineDescriptorPath,

-            ArrayList<TestCasData> testCasData) {

-      try {

-        // create AE:

-        XMLInputSource in = new XMLInputSource(engineDescriptorPath.toPortableString());

-        ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-        AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

-

-        if (debug) {

-          ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG, true);

-          ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG_WITH_MATCHES, true);

-          ae.setConfigParameterValue(RutaEngine.PARAM_PROFILE, true);

-          ae.setConfigParameterValue(RutaEngine.PARAM_STATISTICS, true);

-          ae.setConfigParameterValue(RutaEngine.PARAM_CREATED_BY, true);

-        }

-        ae.reconfigure();

-

-        // create (empty) CAS objects:

-        String desc = null;

-        desc = engineDescriptorPath.toPortableString();

-        XMLInputSource in2 = new XMLInputSource(desc);

-        Object descriptor = UIMAFramework.getXMLParser().parse(in2);

-        CAS runCas = getEmptyCas(descriptor);

-        CAS testCas = getEmptyCas(descriptor);

-

-        for (TestCasData td : testCasData) {

-          // init td etc

-          runCas.reset();

-          testCas.reset();

-          String elementName = fScript.getLocation().lastSegment();

-          monitor.setTaskName("Processing [w/o classpatch ext.] " + td.getPath().lastSegment());

-          int lastIndexOf = elementName.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);

-          if (lastIndexOf != -1) {

-            elementName = elementName.substring(0, lastIndexOf);

-          }

-          // deserialize CASes

-          FileInputStream inputStreamTest = null;

-          try {

-            inputStreamTest = new FileInputStream(new File(td.getPath().toPortableString()));

-            XmiCasDeserializer.deserialize(inputStreamTest, testCas, true);

-          } finally {

-            if (inputStreamTest != null) {

-              inputStreamTest.close();

-            }

-          }

-          FileInputStream inputStreamRun = null;

-          try {

-            inputStreamRun = new FileInputStream(new File(td.getPath().toPortableString()));

-            XmiCasDeserializer.deserialize(inputStreamRun, runCas, true);

-          } finally {

-            if (inputStreamRun != null) {

-              inputStreamRun.close();

-            }

-          }

-          testCas = testCas.getView(viewCasName);

-          runCas = runCas.getView(viewCasName);

-

-          // gather uima eval-types

-          prepareCas(runCas);

-

-          // process run cas and evaluate it

-          ae.process(runCas);

-          evalLogicAndUpdateGUI(monitor, testPageView, debugPage, fScript, project, runCas,

-                  testCas, td);

-          if (monitor.isCanceled()) {

-            ae.destroy();

-            return Status.CANCEL_STATUS;

-          }

-        }

-        ae.destroy();

-      } catch (Exception e) {

-        RutaAddonsPlugin.error(e);

-        monitor.done();

-        testPageView.showBusy(false);

-        return new Status(Status.ERROR, RutaAddonsPlugin.PLUGIN_ID,

-                "Error during testing. See Error View for details.");

-      }

-

-      monitor.done();

-      testPageView.showBusy(false);

-      return Status.OK_STATUS;

-    }

-

-    private void prepareCas(CAS cas) {

-      if (!includedTypes.isEmpty()) {

-        // exclude all other types if there are some included types

-        excludedTypes = new ArrayList<String>();

-        List<Type> types = cas.getTypeSystem().getProperlySubsumedTypes(cas.getAnnotationType());

-        for (Type type : types) {

-          if (!includedTypes.contains(type.getName())) {

-            excludedTypes.add(type.getName());

-          }

-        }

-      }

-      if (includedTypes.isEmpty() && excludedTypes.isEmpty()) {

-        // remove all annotation in default settings

-        String documentText = cas.getDocumentText();

-        cas.reset();

-        cas.setDocumentText(documentText);

-      } else {

-        List<AnnotationFS> toRemove = new LinkedList<AnnotationFS>();

-        AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex();

-        for (AnnotationFS annotationFS : annotationIndex) {

-          Type type = annotationFS.getType();

-          String typeName = type.getName();

-          if (includedTypes.contains(typeName) || !excludedTypes.contains(typeName)) {

-            toRemove.add(annotationFS);

-          }

-        }

-        for (AnnotationFS each : toRemove) {

-          if (!cas.getDocumentAnnotation().equals(each)) {

-            cas.removeFsFromIndexes(each);

-          }

-        }

-      }

-    }

-

-    private void evalLogicAndUpdateGUI(IProgressMonitor monitor,

-            final TestPageBookView testPageView, final TestViewPage debugPage, IFile fScript,

-            final IProject project, CAS runCas, CAS goldCas, TestCasData td)

-            throws AnalysisEngineProcessException, CASException, IOException, SAXException,

-            CoreException {

-      // memento for prefs

-      IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();

-      String factoryName = store.getString(TestingPreferenceConstants.EVALUATOR_FACTORY);

-      ICasEvaluator evaluator = RutaAddonsPlugin.getCasEvaluatorFactoryById(factoryName)

-              .createEvaluator();

-      boolean includeSubtypes = store.getBoolean(TestingPreferenceConstants.INCLUDE_SUBTYPES);

-      boolean useAllTypes = store.getBoolean(TestingPreferenceConstants.ALL_TYPES);

-

-      CAS resultCas = evaluator.evaluate(goldCas, runCas, excludedTypes, includeSubtypes,

-              useAllTypes);

-

-      // store results

-      IPath path2Test = td.getPath().removeLastSegments(1);

-

-      monitor.setTaskName("Actually evaluating " + td.getPath().lastSegment());

-

-      IPath estimatedTestPath = project.getFullPath().append(

-              RutaProjectUtils.getDefaultTestLocation());

-      IPath path2recource = fScript.getFullPath();

-      IPath projectRelativePath2Script = path2recource.removeFirstSegments(2);

-      IPath estimatedTestFolderPath = estimatedTestPath.append(projectRelativePath2Script

-              .removeFileExtension());

-

-      IPath path2Result = path2Test.append(TestCasData.RESULT_FOLDER);

-      IPath path2ResultFile = path2Result.append(td.getPath().removeFileExtension().lastSegment()

-              + ".result.xmi");

-

-      if (!path2Test.toOSString().contains(estimatedTestFolderPath.toOSString())) {

-        path2Result = project.getLocation().append(RutaProjectUtils.getDefaultTestLocation())

-                .append(RutaProjectUtils.getDefaultTempTestLocation());

-        path2ResultFile = path2Result.append(td.getPath().removeFileExtension().lastSegment()

-                + ".result.xmi");

-      }

-

-      File resultFile = new File(path2ResultFile.toPortableString());

-      writeXmi(resultCas, resultFile);

-

-      td.setResultPath(path2ResultFile);

-

-      // finally, calculate eval data and show it in the GUI

-      EvalDataProcessor.calculateEvaluatData(td, resultCas);

-

-      testPageView.getDefaultPage().getControl().getDisplay().asyncExec(new Runnable() {

-        public void run() {

-          debugPage.getViewer().refresh();

-        }

-      });

-      monitor.worked(1);

-      project.getFolder(path2Result.makeRelativeTo(project.getLocation())).refreshLocal(

-              IResource.DEPTH_INFINITE, new NullProgressMonitor());

-      runCas.release();

-      goldCas.release();

-      resultCas.release();

-    }

-

-    private CAS getEmptyCas(Object descriptor) throws ResourceInitializationException,

-            InvalidXMLException {

-      CAS testCas = null;

-      if (descriptor instanceof AnalysisEngineDescription) {

-        testCas = CasCreationUtils.createCas((AnalysisEngineDescription) descriptor);

-      } else if (descriptor instanceof TypeSystemDescription) {

-        TypeSystemDescription tsDesc = (TypeSystemDescription) descriptor;

-        tsDesc.resolveImports();

-        testCas = CasCreationUtils.createCas(tsDesc, null, new FsIndexDescription[0]);

-      }

-      return testCas;

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    TestPageBookView debugView = (TestPageBookView) HandlerUtil.getActivePart(event);

-    if (!(debugView.getCurrentPage() instanceof TestViewPage)) {

-      return Status.CANCEL_STATUS;

-    }

-    TestViewPage debugPage = (TestViewPage) debugView.getCurrentPage();

-    // set debug by preference

-    boolean debug = true;

-    String viewCasName = debugPage.getSelectedViewCasName();

-    String scriptName = debugPage.getResource().getLocation().lastSegment();

-    RerunHandlerJob job = new RerunHandlerJob(event, scriptName, viewCasName,

-            debugPage.getExcludedTypes(), debugPage.getIncludedTypes(), debug);

-

-    job.addJobChangeListener(new DebugJobChangeAdapter(debugPage) {

-    });

-

-    job.schedule();

-

-    return null;

-  }

-

-  private static void writeXmi(CAS aCas, File file) throws IOException, SAXException {

-    FileOutputStream out = null;

-    try {

-      file.getParentFile().mkdirs();

-      out = new FileOutputStream(file);

-      XmiCasSerializer.serialize(aCas, out);

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-    } finally {

-      if (out != null) {

-        out.close();

-      }

-    }

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  /**

-   * 

-   * @param data

-   *          will be filled with results

-   * @param resultCas

-   *          must contain TP, FP, FN annotations

-   */

-  public void calculateEvaluatData(TestCasData data, CAS resultCas) {

-    data.setEvaluationStatus(true);

-    TypeSystem ts = resultCas.getTypeSystem();

-    Type falsePositiveType = ts.getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = ts.getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositiveType = ts.getType(ICasEvaluator.TRUE_POSITIVE);

-

-    int falsePositiveCount = resultCas.getAnnotationIndex(falsePositiveType).size();

-    int falseNegativeCount = resultCas.getAnnotationIndex(falseNegativeType).size();

-    int truePositiveCount = resultCas.getAnnotationIndex(truePositiveType).size();

-

-    data.setTruePositiveCount(truePositiveCount);

-    data.setFalsePositiveCount(falsePositiveCount);

-    data.setFalseNegativeCount(falseNegativeCount);

-

-    HashMap<String, TypeEvalData> map = new HashMap<String, TypeEvalData>();

-

-    AnnotationIndex<AnnotationFS> index = resultCas.getAnnotationIndex(truePositiveType);

-

-    FSIterator<AnnotationFS> iter = index.iterator();

-

-    while (iter.isValid()) {

-      EvalAnnotation a = (EvalAnnotation) iter.next();

-      Annotation original = a.getOriginal();

-      Type originalType = original.getType();

-

-      if (map.containsKey(originalType.getName())) {

-        TypeEvalData element = (TypeEvalData) map.get(originalType.getName());

-        int oldCount = element.getTruePositives();

-        element.setTruePositives(oldCount + 1);

-      } else {

-        TypeEvalData newData = new TypeEvalData(originalType.getName(), 1, 0, 0);

-        map.put(originalType.getName(), newData);

-      }

-    }

-

-    index = resultCas.getAnnotationIndex(falsePositiveType);

-    iter = index.iterator();

-

-    while (iter.isValid()) {

-      EvalAnnotation a = (EvalAnnotation) iter.next();

-      Annotation original = a.getOriginal();

-      Type originalType = original.getType();

-

-      if (map.containsKey(originalType.getName())) {

-        TypeEvalData element = (TypeEvalData) map.get(originalType.getName());

-        int oldCount = element.getFalsePositives();

-        element.setFalsePositives(oldCount + 1);

-      } else {

-        TypeEvalData newData = new TypeEvalData(originalType.getName(), 0, 1, 0);

-        map.put(originalType.getName(), newData);

-      }

-    }

-

-    index = resultCas.getAnnotationIndex(falseNegativeType);

-    iter = index.iterator();

-

-    while (iter.isValid()) {

-      EvalAnnotation a = (EvalAnnotation) iter.next();

-      Annotation original = a.getOriginal();

-      Type originalType = original.getType();

-

-      if (map.containsKey(originalType.getName())) {

-        TypeEvalData element = (TypeEvalData) map.get(originalType.getName());

-        int oldCount = element.getFalseNegatives();

-        element.setFalseNegatives(oldCount + 1);

-      } else {

-        TypeEvalData newData = new TypeEvalData(originalType.getName(), 0, 0, 1);

-        map.put(originalType.getName(), newData);

-      }

-    }

-

-    data.setTypeEvalData(map);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RunTestHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RunTestHandler.java
deleted file mode 100755
index b8b6849..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RunTestHandler.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*

- * 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.ruta.testing.ui.handlers;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.testing.ui.views.TestViewPage;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.eclipse.ui.part.FileEditorInput;

-

-public class RunTestHandler implements IHandler {

-

-  private IResource resource;

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-

-    // TODO create a new view for every resource file

-    TestViewPage view = null;

-    try {

-      FileEditorInput input = (FileEditorInput) HandlerUtil.getActiveEditor(event).getEditorInput();

-      IResource r = input.getFile();

-      view = (TestViewPage) HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench()

-              .getActiveWorkbenchWindow().getActivePage()

-              .showView("org.apache.uima.ruta.testing.annotationTest");

-      view.setResource(r);

-    } catch (PartInitException e) {

-      RutaAddonsPlugin.error(e);

-    }

-

-    /*

-     * TODO Create a separate view for every tm project that is selected if

-     * (HandlerUtil.getActiveMenuSelection(event) instanceof IStructuredSelection) { // if

-     * (HandlerUtil.getCurrentSelection(event) instanceof IStructuredSelection) {

-     * StructuredSelection selection =

-     * (StructuredSelection)HandlerUtil.getActiveMenuSelection(event);; // StructuredSelection

-     * selection = (StructuredSelection)HandlerUtil.getCurrentSelection(event); Iterator iter =

-     * selection.iterator(); ArrayList<IResource> selectionList = new ArrayList<IResource>(); while

-     * (iter.hasNext()) {

-     * 

-     * Object obj = iter.next(); if (obj instanceof IResource) { selectionList.add((IResource)obj);

-     * } view.setResource(selectionList.get(0)); if (selectionList.get(0) == null) {

-     * System.out.println("keks"); } //view.setTitle(selectionList.get(0).getName()); }

-     * 

-     * ArrayList<String> testList = new ArrayList<String>();

-     * 

-     * if (view.getViewer() != null) { List list = view.getViewer().getList(); for (int i = 0; i <

-     * list.getItemCount(); i++) { String s = view.getViewer().getList().getItem(i).toString();

-     * testList.add(s); } }

-     * 

-     * IResource resource = selectionList.get(0); for (String s : testList) {

-     * 

-     * }

-     * 

-     * }

-     */

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectEvaluatorHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectEvaluatorHandler.java
deleted file mode 100755
index 55403b3..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectEvaluatorHandler.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.testing.ui.handlers;

-

-import org.apache.uima.ruta.testing.preferences.TestingPreferencePage;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.ui.dialogs.PreferencesUtil;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-

-public class SelectEvaluatorHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    Dialog dialog = PreferencesUtil.createPreferenceDialogOn(HandlerUtil.getActiveShell(event),

-            TestingPreferencePage.ID, new String[] { TestingPreferencePage.ID }, null);

-    dialog.open();

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedExcludedTypesHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedExcludedTypesHandler.java
deleted file mode 100755
index 668c1ee..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedExcludedTypesHandler.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*

- * 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.ruta.testing.ui.handlers;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Set;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.testing.ui.views.TestPageBookView;

-import org.apache.uima.ruta.testing.ui.views.TestViewPage;

-import org.apache.uima.ruta.utils.ui.SelectTypesDialog;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.jface.dialogs.ErrorDialog;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class SelectedExcludedTypesHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    TestPageBookView debugView = (TestPageBookView) HandlerUtil.getActivePart(event);

-    if(!(debugView.getCurrentPage() instanceof TestViewPage)) {

-      return Status.CANCEL_STATUS;

-    }

-    TestViewPage activePage = (TestViewPage) debugView.getCurrentPage();

-    IResource resource = activePage.getResource();

-    IPath location = resource.getLocation();

-    String preFilePath = location.toPortableString();

-    File preFile = new File(preFilePath);

-    if (preFile.exists() == false || StringUtils.isEmpty(preFilePath)) {

-      printErrorDialog("The preprocessing file was not found!");

-      return null;

-    }

-    TypeSystemDescription defaultTypeSystemDescription = null;

-    List<String> types = new ArrayList<String>();

-    try {

-      String tsDesc = RutaProjectUtils.getTypeSystemDescriptorPath(location, resource.getProject())

-              .toPortableString();

-

-      defaultTypeSystemDescription = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-              new XMLInputSource(new File(tsDesc)));

-      defaultTypeSystemDescription.resolveImports();

-      TypeDescription[] systemTypes = defaultTypeSystemDescription.getTypes();

-      Set<String> set = new HashSet<String>();

-      for (TypeDescription typeDescription : systemTypes) {

-        set.add(typeDescription.getName());

-      }

-      types.addAll(set);

-      Collections.sort(types);

-    } catch (InvalidXMLException e) {

-      RutaAddonsPlugin.error(e);

-    } catch (IOException e) {

-      RutaAddonsPlugin.error(e);

-    } catch (CoreException e) {

-      RutaAddonsPlugin.error(e);

-    }

-

-    Display display = Display.getDefault();

-    Shell shell = new Shell(display, SWT.RESIZE | SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);

-    shell.setText("Select excluded types");

-    SelectTypesDialog dialog = new SelectTypesDialog(shell, types, activePage.getExcludedTypes());

-    shell.open();

-    while (!shell.isDisposed()) {

-      if (!display.readAndDispatch())

-        display.sleep();

-    }

-    List<String> selectedTypes = dialog.getSelectedTypes();

-    activePage.setExcludedTypes(selectedTypes);

-    return Status.OK_STATUS;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public static void printErrorDialog(String error) {

-    ErrorDialog.openError(Display.getCurrent().getActiveShell(), "File not Found!", error,

-            new Status(IStatus.ERROR, "-1", "File not found!"));

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedIncludedTypesHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedIncludedTypesHandler.java
deleted file mode 100644
index 5e0a977..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedIncludedTypesHandler.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*

- * 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.ruta.testing.ui.handlers;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Set;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.testing.ui.views.TestPageBookView;

-import org.apache.uima.ruta.testing.ui.views.TestViewPage;

-import org.apache.uima.ruta.utils.ui.SelectTypesDialog;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.jface.dialogs.ErrorDialog;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class SelectedIncludedTypesHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    TestPageBookView debugView = (TestPageBookView) HandlerUtil.getActivePart(event);

-    if(!(debugView.getCurrentPage() instanceof TestViewPage)) {

-      return Status.CANCEL_STATUS;

-    }

-    TestViewPage activePage = (TestViewPage) debugView.getCurrentPage();

-    IResource resource = activePage.getResource();

-    IPath location = resource.getLocation();

-    String preFilePath = location.toPortableString();

-    File preFile = new File(preFilePath);

-    if (preFile.exists() == false || StringUtils.isEmpty(preFilePath)) {

-      printErrorDialog("The preprocessing file was not found!");

-      return null;

-    }

-    TypeSystemDescription defaultTypeSystemDescription = null;

-    List<String> types = new ArrayList<String>();

-    try {

-      String tsDesc = RutaProjectUtils.getTypeSystemDescriptorPath(location,

-              resource.getProject()).toPortableString();

-      defaultTypeSystemDescription = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-              new XMLInputSource(new File(tsDesc)));

-      defaultTypeSystemDescription.resolveImports();

-      TypeDescription[] systemTypes = defaultTypeSystemDescription.getTypes();

-      Set<String> set = new HashSet<String>();

-      for (TypeDescription typeDescription : systemTypes) {

-        set.add(typeDescription.getName());

-      }

-      types.addAll(set);

-      Collections.sort(types);

-    } catch (InvalidXMLException e) {

-      RutaAddonsPlugin.error(e);

-    } catch (IOException e) {

-      RutaAddonsPlugin.error(e);

-    } catch (CoreException e) {

-      RutaAddonsPlugin.error(e);

-    }

-    Display display = Display.getDefault();

-    Shell shell = new Shell(display, SWT.RESIZE | SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);

-    shell.setText("Select included types");

-    SelectTypesDialog dialog = new SelectTypesDialog(shell, types, activePage.getIncludedTypes());

-    shell.open();

-    while (!shell.isDisposed()) {

-      if (!display.readAndDispatch())

-        display.sleep();

-    }

-    List<String> selectedTypes = dialog.getSelectedTypes();

-    activePage.setIncludedTypes(selectedTypes);

-    return Status.OK_STATUS;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public static void printErrorDialog(String error) {

-    ErrorDialog.openError(Display.getCurrent().getActiveShell(), "File not Found!", error,

-            new Status(IStatus.ERROR, "-1", "File not found!"));

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvalDataDialog.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvalDataDialog.java
deleted file mode 100755
index fa374cd..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvalDataDialog.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.ruta.testing.ui.views;
-
-import org.eclipse.jface.window.ApplicationWindow;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-public class EvalDataDialog extends ApplicationWindow {
-  
-  Composite overlay;
-  String data;
-  public EvalDataDialog(Shell parentShell, String data) {
-    super(parentShell);
-    this.data=data;
-    // TODO Auto-generated constructor stub
-  }
-  
-  @Override
-  protected Control createContents (Composite parent) {
-    GridLayout layout = new GridLayout();
-    parent.setLayout(layout);
-    parent.setLayoutData(new GridData(GridData.FILL_BOTH));
-    
-    
-    
-    Text text = new Text (parent, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
-    text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
-    text.setText("No data aviable");
-    text.setLayoutData(new GridData(GridData.FILL_BOTH));
-    
-    if (text != null) {
-      text.setText(data);
-    }
-    
-    return parent;
-    
-    
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationContentProvider.java
deleted file mode 100644
index add5a50..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationContentProvider.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.ruta.testing.ui.views;
-
-import org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeNode;
-import org.apache.uima.ruta.caseditor.view.tree.ITreeNode;
-import org.apache.uima.ruta.caseditor.view.tree.TypeTreeNode;
-import org.apache.uima.ruta.testing.ui.views.tree.TestEvaluationTree;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class EvaluationContentProvider implements ITreeContentProvider {
-
-  private Object[] empty = new Object[] {};
-
-  private String type;
-
-  public EvaluationContentProvider(String type) {
-    super();
-    this.type = type;
-  }
-
-  public Object[] getChildren(Object parentElement) {
-    if (parentElement instanceof TestEvaluationTree) {
-      TypeTreeNode root = (TypeTreeNode) ((TestEvaluationTree) parentElement).getRoot();
-      if (root == null) {
-        return empty;
-      }
-      for (ITreeNode node : root.getChildren()) {
-        if (node instanceof TypeTreeNode) {
-          if (((TypeTreeNode) node).getType().getName().equals(type)) {
-            return node.getChildren();
-          }
-        }
-      }
-    }
-    if (parentElement instanceof TypeTreeNode) {
-      TypeTreeNode node = (TypeTreeNode) parentElement;
-      return node.getChildren();
-    }
-    if (parentElement instanceof AnnotationTreeNode) {
-      AnnotationTreeNode node = (AnnotationTreeNode) parentElement;
-      return node.getChildren();
-    }
-    return empty;
-  }
-
-  public Object getParent(Object element) {
-    if (element instanceof ITreeNode) {
-      return ((ITreeNode) element).getParent();
-    }
-    return null;
-  }
-
-  public boolean hasChildren(Object element) {
-    if (element instanceof TestEvaluationTree) {
-      TypeTreeNode root = (TypeTreeNode) ((TestEvaluationTree) element).getRoot();
-      return root.hasChildren();
-
-    }
-    if (element instanceof ITreeNode) {
-      return ((ITreeNode) element).hasChildren();
-    }
-    return false;
-  }
-
-  public Object[] getElements(Object inputElement) {
-    return getChildren(inputElement);
-  }
-
-  public void dispose() {
-
-  }
-
-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationLabelProvider.java
deleted file mode 100644
index ac967e9..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationLabelProvider.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.ruta.testing.ui.views;
-
-import org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeNode;
-import org.apache.uima.ruta.caseditor.view.tree.PrimitiveFeatureTreeNode;
-import org.apache.uima.ruta.caseditor.view.tree.TextUtils;
-import org.apache.uima.ruta.caseditor.view.tree.TypeTreeNode;
-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class EvaluationLabelProvider extends LabelProvider implements ILabelProvider {
-
-  private EvaluationViewPage owner;
-
-  public EvaluationLabelProvider() {
-    super();
-  }
-
-  public EvaluationLabelProvider(EvaluationViewPage owner) {
-    super();
-    this.owner = owner;
-  }
-
-  @Override
-  public String getText(Object element) {
-    if (element instanceof AnnotationTreeNode) {
-      AnnotationTreeNode fnNode = (AnnotationTreeNode) element;
-      if (fnNode.getAnnotation() != null) {
-        String typeName = fnNode.getAnnotation().getType().getName();
-        String coveredText = fnNode.getAnnotation().getCoveredText();
-        coveredText = coveredText.replaceAll("[\\n]", "").replaceAll("[\\r]", "");
-        if (typeName.equals(ICasEvaluator.FALSE_POSITIVE)
-                || typeName.equals(ICasEvaluator.FALSE_NEGATIVE)
-                || typeName.equals(ICasEvaluator.TRUE_POSITIVE)) {
-          return coveredText;
-        }
-        String name = TextUtils.shrinkNamespace(fnNode.getAnnotation().getType().getName());
-        return (name + ": " + coveredText);
-      }
-    }
-    if (element instanceof TypeTreeNode) {
-      TypeTreeNode testNode = (TypeTreeNode) element;
-      return TextUtils.shrinkNamespace(testNode.getType().getName());
-    }
-    if (element instanceof PrimitiveFeatureTreeNode) {
-      PrimitiveFeatureTreeNode fNode = (PrimitiveFeatureTreeNode) element;
-      return fNode.getName();
-    }
-
-    return "error";
-  }
-
-  @Override
-  public Image getImage(Object element) {
-    // if (element instanceof TypeTreeNode) {
-    // return owner.getCurrentData().getIcon(((TypeTreeNode) element).getType());
-    // }
-    // if (element instanceof AnnotationTreeNode) {
-    // return owner.getCurrentData().getIcon(
-    // ((AnnotationTreeNode) element).getAnnotation().getType());
-    // }
-    return null;
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationViewPage.java
deleted file mode 100644
index e7c5945..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/EvaluationViewPage.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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.ruta.testing.ui.views;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.caseditor.editor.AnnotationEditor;
-import org.apache.uima.caseditor.editor.ICasDocument;
-import org.apache.uima.caseditor.editor.ICasDocumentListener;
-import org.apache.uima.caseditor.editor.ICasEditorInputListener;
-import org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeViewDragListener;
-import org.apache.uima.ruta.testing.ui.views.tree.TestEvaluationTree;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPageSite;
-import org.eclipse.ui.part.Page;
-
-public class EvaluationViewPage extends Page implements ICasDocumentListener, ISelectionListener,
-        ICasEditorInputListener {
-
-  private CheckboxTreeViewer viewer;
-
-  int current = 0;
-
-  private AnnotationEditor editor;
-
-  private ICasDocument document;
-
-  private String type;
-
-  public EvaluationViewPage(String type, AnnotationEditor editor) {
-    super();
-    this.type = type;
-    this.editor = editor;
-    this.document = editor.getDocument();
-  }
-
-  @Override
-  public Control getControl() {
-    return viewer.getControl();
-  }
-
-  @Override
-  public void setFocus() {
-    viewer.getControl().setFocus();
-  }
-
-  @Override
-  public void init(IPageSite pageSite) {
-    super.init(pageSite);
-  }
-
-  public TreeViewer getTreeViewer() {
-    return viewer;
-  }
-
-  @Override
-  public void createControl(Composite parent) {
-    viewer = new CheckboxTreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
-    viewer.setContentProvider(new EvaluationContentProvider(type));
-    viewer.setLabelProvider(new EvaluationLabelProvider(this));
-
-    int ops = DND.DROP_COPY | DND.DROP_MOVE;
-    Transfer[] transfers = new Transfer[] { TextTransfer.getInstance() };
-    viewer.addDragSupport(ops, transfers, new AnnotationTreeViewDragListener(viewer));
-
-    getSite().setSelectionProvider(viewer);
-    getSite().getPage().addSelectionListener(this);
-
-    document.addChangeListener(this);
-    editor.addCasEditorInputListener(this);
-    reloadTree();
-  }
-
-  private void reloadTree() {
-    TestEvaluationTree tree = new TestEvaluationTree();
-    tree.createTree(document.getCAS());
-    viewer.setInput(tree);
-    viewer.refresh();
-  }
-
-  @Override
-  public void dispose() {
-    super.dispose();
-    getSite().getPage().removeSelectionListener(this);
-    document.removeChangeListener(this);
-    editor.removeCasEditorInputListener(this);
-  }
-
-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {
-  }
-
-  public void added(FeatureStructure newFeatureStructure) {
-
-  }
-
-  public void added(Collection<FeatureStructure> newFeatureStructure) {
-
-  }
-
-  public void removed(FeatureStructure deletedFeatureStructure) {
-
-  }
-
-  public void removed(Collection<FeatureStructure> deletedFeatureStructure) {
-
-  }
-
-  public void updated(FeatureStructure featureStructure) {
-
-  }
-
-  public void updated(Collection<FeatureStructure> featureStructure) {
-
-  }
-
-  public void changed() {
-    reloadTree();
-
-  }
-
-  public void viewChanged(String oldViewName, String newViewName) {
-    reloadTree();
-  }
-
-  public void casDocumentChanged(IEditorInput oldInput, ICasDocument oldDocument,
-          IEditorInput newInput, ICasDocument newDocument) {
-//    document.removeChangeListener(this);
-//    document = newDocument;
-//    document.addChangeListener(this);
-//    changed();
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/InfoPanel.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/InfoPanel.java
deleted file mode 100755
index 100f6c7..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/InfoPanel.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*

- * 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.ruta.testing.ui.views;

-

-import java.util.List;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Combo;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Text;

-

-public class InfoPanel extends Composite {

-

-  private final Image fErrorIcon = TestViewPage.createImage("/icons/error_ovr.gif"); //$NON-NLS-1$

-

-  private final Image fFailureIcon = TestViewPage.createImage("/icons/failed_ovr.gif"); //$NON-NLS-1$

-

-  Text fileLabel;

-

-  Text runLabel;

-

-  Text fpLabel;

-

-  Text fnLabel;

-

-  Text fMLabel;

-

-  Combo comboBox;

-

-  public InfoPanel(Composite parent) {

-    super(parent, SWT.WRAP);

-    GridLayout gridLayout = new GridLayout();

-    gridLayout.numColumns = 4;

-    setLayout(gridLayout);

-

-    Composite fileInfoComposite = new Composite(this, SWT.WRAP);

-    GridLayout fileInfoLayout = new GridLayout();

-    fileInfoLayout.numColumns = 3;

-    fileInfoComposite.setLayout(fileInfoLayout);

-

-    GridData fileInfoData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);

-    // fileInfoData.grabExcessHorizontalSpace = true;

-    fileInfoComposite.setLayoutData(fileInfoData);

-    fileLabel = createLabel("Script :", null, "--", fileInfoComposite);

-

-    comboBox = new Combo(this, SWT.DROP_DOWN);

-    comboBox.add("_InitialView");

-    comboBox.select(0);

-

-    Composite testInfoComposite = new Composite(this, SWT.WRAP);

-    GridData data = new GridData();

-    data.horizontalSpan = 2;

-    testInfoComposite.setLayoutData(data);

-

-    GridLayout testInfoLayout = new GridLayout();

-    testInfoLayout.numColumns = 12;

-

-    GridData testInfoData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING

-            | GridData.FILL_HORIZONTAL);

-    testInfoComposite.setLayoutData(testInfoData);

-    testInfoComposite.setLayout(testInfoLayout);

-

-    runLabel = createLabel("TP :", null, "0", testInfoComposite);

-    fpLabel = createLabel("FP :", fErrorIcon, "0", testInfoComposite);

-    fnLabel = createLabel("FN :", fFailureIcon, "0", testInfoComposite);

-    fMLabel = createLabel("F1 :", null, "0", testInfoComposite);

-  }

-

-  @Override

-  public void dispose() {

-    super.dispose();

-    fErrorIcon.dispose();

-    fFailureIcon.dispose();

-  }

-

-  private Text createLabel(String name, Image image, String init, Composite parent) {

-

-    Label label = new Label(parent, SWT.NONE);

-    if (image != null) {

-      image.setBackground(label.getBackground());

-      label.setImage(image);

-    }

-    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));

-

-    label = new Label(parent, SWT.NONE);

-    label.setText(name);

-    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));

-    // label.setFont(JFaceResources.getBannerFont());

-

-    Text value = new Text(parent, SWT.READ_ONLY);

-    value.setText(init);

-    // bug: 39661 Junit test counters do not repaint correctly [JUnit]

-//    value.setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));

-    value

-            .setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING

-                    | GridData.FILL_HORIZONTAL));

-    return value;

-  }

-

-  public void setRuns(int x) {

-    this.runLabel.setText(String.valueOf(x));

-  }

-

-  public void setFP(int x) {

-    fpLabel.setText(String.valueOf(x));

-

-  }

-

-  public void setFN(int x) {

-    fnLabel.setText(String.valueOf(x));

-  }

-

-  public void setFilename(String filename) {

-    fileLabel.setText(filename);

-  }

-

-  public void setFMeasure(double f) {

-    fMLabel.setText(String.valueOf(f));

-  }

-

-  public Combo getComboBox() {

-    return comboBox;

-  }

-

-  public String getSelectedViewCasName() {

-    return comboBox.getText();

-  }

-

-  public void addCASViewNamesToCombo(List<String> list) {

-    for (String s : list) {

-      comboBox.add(s);

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListContentProvider.java
deleted file mode 100755
index 67aefac..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListContentProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.testing.ui.views;

-

-import java.util.ArrayList;

-

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.Viewer;

-

-public class ListContentProvider implements IStructuredContentProvider {

-

-  public Object[] getElements(Object inputElement) {

-    return ((ArrayList<?>) inputElement).toArray();

-  }

-

-  public void dispose() {

-

-  }

-

-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListDropAdapter.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListDropAdapter.java
deleted file mode 100755
index 31da85e..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListDropAdapter.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.testing.ui.views;

-

-import java.util.ArrayList;

-

-import org.eclipse.core.runtime.Path;

-import org.eclipse.jface.viewers.TableViewer;

-import org.eclipse.jface.viewers.ViewerDropAdapter;

-import org.eclipse.swt.dnd.FileTransfer;

-import org.eclipse.swt.dnd.TransferData;

-

-public class ListDropAdapter extends ViewerDropAdapter {

-

-  public ListDropAdapter(TableViewer viewer) {

-    super(viewer);

-  }

-

-  @Override

-  public boolean performDrop(Object data) {

-

-    String[] filesArray = (String[]) data;

-    TableViewer viewer = (TableViewer) getViewer();

-

-    ArrayList<TestCasData> testCASes;

-    if (viewer.getInput() == null) {

-      testCASes = new ArrayList<TestCasData>();

-    } else {

-      testCASes = (ArrayList) viewer.getInput();

-    }

-

-    for (int i = 0; i < filesArray.length; i++) {

-      if (filesArray[i].endsWith("xmi")) {

-        TestCasData testData = new TestCasData(new Path(filesArray[i]));

-        testCASes.add(testData);

-      }

-    }

-    viewer.setInput(testCASes);

-    viewer.refresh();

-    return true;

-  }

-

-  @Override

-  public boolean validateDrop(Object target, int operation, TransferData transferType) {

-    // TODO Auto-generated method stub

-    return FileTransfer.getInstance().isSupportedType(transferType);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListLabelProvider.java
deleted file mode 100755
index 63fc50c..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/ListLabelProvider.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*

- * 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.ruta.testing.ui.views;

-

-import org.eclipse.jface.viewers.ILabelProvider;

-import org.eclipse.jface.viewers.ILabelProviderListener;

-import org.eclipse.swt.graphics.Image;

-

-public class ListLabelProvider implements ILabelProvider {

-

-  private final Image blue = TestViewPage.createImage("/icons/bullet_blue.png"); //$NON-NLS-1$

-

-  private final Image green = TestViewPage.createImage("/icons/bullet_green.png"); //$NON-NLS-1$

-

-  private final Image yellow = TestViewPage.createImage("/icons/bullet_yellow.png"); //$NON-NLS-1$

-

-  private final Image orange = TestViewPage.createImage("/icons/bullet_orange.png"); //$NON-NLS-1$

-

-  private final Image red = TestViewPage.createImage("/icons/bullet_red.png"); //$NON-NLS-1$

-

-  private final Image black = TestViewPage.createImage("/icons/bullet_black.png"); //$NON-NLS-1$

-

-  private final Image pink = TestViewPage.createImage("/icons/bullet_pink.png"); //$NON-NLS-1$

-

-  public Image getImage(Object element) {

-    if (element instanceof TestCasData) {

-      TestCasData testData = (TestCasData) element;

-      if (testData.getResultPath() == null) {

-        return black;

-      } else {

-        int tp = testData.getTruePositiveCount();

-        int fp = testData.getFalsePositiveCount();

-        int fn = testData.getFalseNegativeCount();

-        int error = fp + fn;

-        double percent = ((double) error / (double) tp);

-        if (fp == 0 && fn == 0) {

-          return green;

-        } else if (percent >= 0.25) {

-          return red;

-        } else if (percent <= 0.05) {

-          return yellow;

-        } else if (percent < 0.25) {

-          return orange;

-        } else if (fp == 0) {

-          return blue;

-        } else if (fn == 0) {

-          return pink;

-        }

-

-      }

-    }

-    return black;

-  }

-

-  public String getText(Object element) {

-    if (element instanceof TestCasData) {

-      TestCasData testData = (TestCasData) element;

-      String lastSegment = testData.getPath().lastSegment();

-      if (testData.getResultPath() == null) {

-        lastSegment += " [not available]";

-      } else {

-        int tp = testData.getTruePositiveCount();

-        int fp = testData.getFalsePositiveCount();

-        int fn = testData.getFalseNegativeCount();

-        lastSegment += " [" + tp + "|" + fp + "|" + fn + "]";

-      }

-      return lastSegment;

-    }

-    return "error";

-  }

-

-  public void addListener(ILabelProviderListener listener) {

-

-  }

-

-  public void dispose() {

-    black.dispose();

-    blue.dispose();

-    pink.dispose();

-    green.dispose();

-    yellow.dispose();

-    orange.dispose();

-    red.dispose();

-  }

-

-  public boolean isLabelProperty(Object element, String property) {

-    return false;

-  }

-

-  public void removeListener(ILabelProviderListener listener) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/OutputFolder.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/OutputFolder.java
deleted file mode 100755
index 5bb5226..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/OutputFolder.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * 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.ruta.testing.ui.views;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.TabFolder;

-import org.eclipse.swt.widgets.TabItem;

-import org.eclipse.swt.widgets.Text;

-

-public class OutputFolder extends Composite {

-

-  public OutputFolder(Composite parent) {

-    super(parent, SWT.WRAP);

-    GridLayout gridLayout = new GridLayout();

-    gridLayout.numColumns = 1;

-    setLayout(gridLayout);

-

-    TabFolder tFolder = new TabFolder(this, SWT.WRAP);

-

-    // TabItem failures = new TabItem(tFolder, SWT.NONE);

-    // failures.setText("Failures");

-    // Text failuresText = new Text(tFolder, SWT.BORDER | SWT.MULTI);

-    // failuresText.setText("Failures Info");

-    // failures.setControl(failuresText);

-    //		

-    // TabItem falsePositives = new TabItem (tFolder,SWT.NONE);

-    // falsePositives.setText("False Positives");

-    // Text fPositivesText = new Text (tFolder, SWT.BORDER | SWT.MULTI);

-    // fPositivesText.setText("False Positives");

-    // falsePositives.setControl(fPositivesText);

-    //		

-    // TabItem falseNegatives = new TabItem (tFolder,SWT.NONE);

-    // falseNegatives.setText("False Negatives");

-    // Text fNegativesText = new Text(tFolder, SWT.BORDER | SWT.MULTI);

-    // fNegativesText.setText("False Negatives");

-    // falseNegatives.setControl(fNegativesText);

-

-    TabItem failuresTab = createTab(tFolder, "Failures", "Insert Failures here");

-    TabItem fPositivesTab = createTab(tFolder, "FPositives", "Insert false positives here");

-    TabItem fNegativesTab = createTab(tFolder, "FNegatives", "Insert false negatives here");

-

-    GridData tFolderData = new GridData();

-    tFolderData.horizontalAlignment = GridData.FILL;

-    tFolderData.verticalAlignment = GridData.FILL;

-    tFolderData.horizontalSpan = 1;

-    tFolderData.grabExcessHorizontalSpace = true;

-    tFolderData.grabExcessVerticalSpace = true;

-    tFolder.setLayoutData(tFolderData);

-  }

-

-  private TabItem createTab(TabFolder tFolder, String name, String input) {

-    TabItem tab = new TabItem(tFolder, SWT.NONE);

-    tab.setText(name);

-    Text text = new Text(tFolder, SWT.BORDER | SWT.MULTI);

-    text.setText(input);

-    tab.setControl(text);

-    return tab;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestCasData.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestCasData.java
deleted file mode 100755
index dd5b538..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestCasData.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.ruta.testing.ui.views;
-
-import java.util.HashMap;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-
-
-public class TestCasData implements Cloneable {
-
-  public static final String RESULT_FOLDER = "results";
-
-  private boolean wasEvaluated = false;
-
-  private IPath resultPath;
-
-  private IPath testFilePath;
-
-  private int falsePositiveCount = 0;
-
-  private int falseNegativeCount = 0;
-
-  private int truePositiveCount = 0;
-
-  private HashMap typeEvalData = null;
-
-  public TestCasData(IPath testFilePath) {
-    this.testFilePath = testFilePath;
-    this.typeEvalData = new HashMap();
-  }
-
-  public IPath getPath() {
-    return testFilePath;
-  }
-
-  public void setResultPath(IPath resultPath) {
-    this.resultPath = resultPath;
-  }
-
-  public IPath getResultPath() {
-    return resultPath;
-  }
-
-  public int getFalsePositiveCount() {
-    return this.falsePositiveCount;
-  }
-
-  public int getFalseNegativeCount() {
-    return this.falseNegativeCount;
-  }
-
-  public int getTruePositiveCount() {
-    return this.truePositiveCount;
-  }
-
-  public void setFalsePositiveCount(int falsePositiveCount) {
-    this.falsePositiveCount = falsePositiveCount;
-  }
-
-  public void setFalseNegativeCount(int falseNegativeCount) {
-    this.falseNegativeCount = falseNegativeCount;
-  }
-
-  public void setTruePositiveCount(int truePositiveCount) {
-    this.truePositiveCount = truePositiveCount;
-  }
-
-  public boolean wasEvaluated() {
-    return this.wasEvaluated;
-  }
-
-  public void setEvaluationStatus(boolean wasEvaluated) {
-    this.wasEvaluated = wasEvaluated;
-  }
-
-  public void loadPreviousResults(IResource r) {
-    String fileName = testFilePath.removeFileExtension().lastSegment();
-    resultPath = testFilePath.removeLastSegments(1).append(RESULT_FOLDER);
-    fileName = fileName + ".result.xmi";
-    resultPath = resultPath.append(fileName);
-    IProject project = r.getProject();
-    IFile resultFile = project.getFile(resultPath);
-  }
-
-  public HashMap getTypeEvalData() {
-    return typeEvalData;
-  }
-
-  public void setTypeEvalData(HashMap typeEvalData) {
-    this.typeEvalData = typeEvalData;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestPageBookView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestPageBookView.java
deleted file mode 100755
index 34b232b..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestPageBookView.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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.ruta.testing.ui.views;
-
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.part.MessagePage;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.part.PageBookView;
-
-public class TestPageBookView extends PageBookView {
-
-  private IMemento memento;
-
-  public TestPageBookView() {
-  }
-
-  @Override
-  protected IPage createDefaultPage(PageBook book) {
-    MessagePage messagePage = new MessagePage();
-    initPage(messagePage);
-    messagePage.setMessage("This view is not available");
-    messagePage.createControl(book);
-    return messagePage;
-  }
-
-  @Override
-  protected PageRec doCreatePage(IWorkbenchPart part) {
-    EditorPart source = (EditorPart) part;
-    IEditorInput editorInput = source.getEditorInput();
-    if (editorInput instanceof FileEditorInput) {
-      FileEditorInput fileInput = (FileEditorInput) editorInput;
-      IResource r = fileInput.getFile();
-
-      TestViewPage testPage = new TestViewPage(r);
-      initPage(testPage);
-      testPage.createControl(getPageBook());
-      testPage.restoreState(memento);
-      PageRec result = new PageRec(part, testPage);
-      return result;
-    }
-    return null;
-  }
-
-  @Override
-  protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
-    TestViewPage testViewPage = (TestViewPage)pageRecord.page;
-    testViewPage.saveState(memento);
-    testViewPage.dispose();
-  }
-
-  @Override
-  protected IWorkbenchPart getBootstrapPart() {
-    IWorkbenchPage page = getSite().getPage();
-
-    if (page != null) {
-      // check whether the active part is important to us
-      IWorkbenchPart activePart = page.getActivePart();
-      if (activePart != null && isImportant(activePart)) {
-        return activePart;
-      }
-    }
-    return null;
-  }
-
-  @Override
-  public void init(IViewSite site, IMemento memento) throws PartInitException {
-    super.init(site, memento);
-    this.memento = memento;
-  }
-
-  @Override
-  protected boolean isImportant(IWorkbenchPart part) {
-    return part.getSite().getId().equals("org.apache.uima.ruta.ide.ui.editor.RutaEditor");
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestViewPage.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestViewPage.java
deleted file mode 100755
index abe81a5..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestViewPage.java
+++ /dev/null
@@ -1,576 +0,0 @@
-/*
- * 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.ruta.testing.ui.views;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.ruta.testing.preferences.TestingPreferenceConstants;
-import org.apache.uima.ruta.testing.ui.views.evalDataTable.EvalTableContentProvider;
-import org.apache.uima.ruta.testing.ui.views.evalDataTable.EvalTableLabelProvider;
-import org.apache.uima.ruta.testing.ui.views.evalDataTable.TypeEvalTableConst;
-import org.apache.uima.ruta.testing.ui.views.evalDataTable.TypeTableSorter;
-import org.apache.uima.ruta.testing.ui.views.fn.FalseNegativeView;
-import org.apache.uima.ruta.testing.ui.views.fp.FalsePositiveView;
-import org.apache.uima.ruta.testing.ui.views.tp.TruePositiveView;
-import org.apache.uima.ruta.testing.ui.views.util.CASLoader;
-import org.apache.uima.ruta.testing.ui.views.util.EvalDataProcessor;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.dltk.internal.ui.util.CoreUtility;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.part.Page;
-
-public class TestViewPage extends Page implements IPageBookViewPage {
-
-  private Composite overlay;
-
-  private IResource script = null;
-
-  private InfoPanel tInfoPanel;
-
-  private TableViewer listviewer;
-
-  private SashForm sash;
-
-  private TableViewer tableViewer;
-
-  private IPropertyChangeListener propertyChangeListener;
-
-  private List<String> excludedTypes = new ArrayList<String>();
-
-  private List<String> includedTypes = new ArrayList<String>();
-
-  private ListLabelProvider labelProvider;
-
-  public TestViewPage(Composite parent, IResource scriptResource) {
-    this(scriptResource);
-    this.overlay = new Composite(parent, 0);
-    this.propertyChangeListener = null;
-  }
-
-  public TestViewPage(IResource scriptResource) {
-    super();
-    this.script = scriptResource;
-  }
-
-  @Override
-  public void createControl(Composite parent) {
-
-    IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();
-    this.propertyChangeListener = new IPropertyChangeListener() {
-      public void propertyChange(PropertyChangeEvent event) {
-        if (event.getProperty().equals("LOAD_OLD_TEST_RESULTS")) {
-
-          if (event.getNewValue().toString().equals("true")) {
-            loadExistingTests();
-          }
-        }
-      }
-    };
-    store.addPropertyChangeListener(propertyChangeListener);
-
-    this.overlay = new Composite(parent, SWT.NULL);
-
-    GridLayout gridLayout = new GridLayout();
-    gridLayout.numColumns = 1;
-    gridLayout.marginWidth = 5;
-    gridLayout.marginHeight = 5;
-    overlay.setLayout(gridLayout);
-
-    // Composite rowButtonOverlay = new Composite(overlay, SWT.RIGHT_TO_LEFT);
-    GridData layoutData = new GridData(SWT.RIGHT);
-    layoutData.grabExcessHorizontalSpace = true;
-    layoutData.horizontalAlignment = GridData.END;
-    layoutData.horizontalSpan = 1;
-    // rowButtonOverlay.setLayout(rowLayout);
-
-    tInfoPanel = new InfoPanel(overlay);
-    GridData tInfoLabelData = new GridData();
-    tInfoLabelData.grabExcessHorizontalSpace = true;
-    tInfoLabelData.horizontalAlignment = GridData.FILL;
-    tInfoLabelData.horizontalSpan = 1;
-    tInfoPanel.setLayoutData(tInfoLabelData);
-
-    IPath path = script.getFullPath().removeFileExtension();
-    String pathString = path.removeFirstSegments(2).toPortableString().replaceAll("[/]", ".");
-    tInfoPanel.setFilename(pathString);
-
-    sash = new SashForm(overlay, SWT.HORIZONTAL);
-    sash.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-    listviewer = new TableViewer(sash, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
-    labelProvider = new ListLabelProvider();
-    listviewer.setLabelProvider(labelProvider);
-    ListContentProvider provider = new ListContentProvider();
-    listviewer.setContentProvider(provider);
-    listviewer.getControl().addKeyListener(new KeyAdapter() {
-
-      @Override
-      public void keyPressed(KeyEvent e) {
-        int keyCode = e.keyCode;
-        // backspace or delete
-        if (keyCode == SWT.BS || keyCode == SWT.DEL) {
-          List<?> list = (List<?>) listviewer.getInput();
-          if (listviewer.getSelection() instanceof StructuredSelection) {
-            StructuredSelection selection = (StructuredSelection) listviewer.getSelection();
-            Iterator<?> iter = selection.iterator();
-            while (iter.hasNext()) {
-              list.remove(iter.next());
-            }
-          }
-          listviewer.refresh(false);
-        }
-      }
-
-    });
-    checkProjectTestStructure(script);
-    loadExistingTests();
-
-    listviewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
-      public void selectionChanged(SelectionChangedEvent event) {
-        Object obj = event.getSelection();
-        if (obj instanceof IStructuredSelection) {
-          StructuredSelection selection = (StructuredSelection) obj;
-          Iterator<?> iterator = selection.iterator();
-          while (iterator.hasNext()) {
-            Object element = iterator.next();
-            if (element instanceof TestCasData) {
-              TestCasData data = (TestCasData) element;
-              updateSingleTestInformation(data);
-
-            }
-          }
-        }
-      }
-    });
-
-    listviewer.addDoubleClickListener(new IDoubleClickListener() {
-
-      public void doubleClick(DoubleClickEvent event) {
-        Object obj = event.getSelection();
-        if (obj instanceof IStructuredSelection) {
-          StructuredSelection selection = (StructuredSelection) obj;
-          Iterator<?> iterator = selection.iterator();
-          while (iterator.hasNext()) {
-            Object element = iterator.next();
-            if (element instanceof TestCasData) {
-              TestCasData data = (TestCasData) element;
-              if (data.getResultPath() != null) {
-                openInCasEditor(data.getResultPath());
-              }
-            }
-          }
-        }
-
-      }
-    });
-    Transfer[] transfers = new Transfer[] { FileTransfer.getInstance() };
-    int ops = DND.DROP_COPY | DND.DROP_DEFAULT | DND.DROP_LINK | DND.DROP_MOVE;
-
-    listviewer.addDropSupport(ops, transfers, new ListDropAdapter(listviewer));
-    GridData listData = new GridData();
-    listData.horizontalAlignment = GridData.FILL;
-    listData.verticalAlignment = GridData.FILL;
-    listData.grabExcessHorizontalSpace = true;
-    listData.grabExcessVerticalSpace = true;
-    listData.horizontalSpan = 1;
-    listviewer.getControl().setLayoutData(listData);
-
-    tableViewer = new TableViewer(sash);
-    tableViewer.setLabelProvider(new EvalTableLabelProvider());
-    tableViewer.setContentProvider(new EvalTableContentProvider());
-
-    tableViewer.setSorter(new TypeTableSorter());
-
-    Table table = tableViewer.getTable();
-
-    TableColumn tc = new TableColumn(table, SWT.LEFT);
-    tc.setText("Type");
-    tc.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ((TypeTableSorter) tableViewer.getSorter()).doSort(TypeEvalTableConst.COLUMN_TYPE_NAME);
-        tableViewer.refresh();
-      }
-    });
-
-    tc = new TableColumn(table, SWT.LEFT);
-    tc.setText("TP");
-    tc.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ((TypeTableSorter) tableViewer.getSorter())
-                .doSort(TypeEvalTableConst.COLUMN_TRUE_POSITIVES);
-        tableViewer.refresh();
-      }
-    });
-
-    tc = new TableColumn(table, SWT.LEFT);
-    tc.setText("FP");
-    tc.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ((TypeTableSorter) tableViewer.getSorter())
-                .doSort(TypeEvalTableConst.COLUMN_FALSE_POSITIVES);
-        tableViewer.refresh();
-      }
-    });
-
-    tc = new TableColumn(table, SWT.LEFT);
-    tc.setText("FN");
-    tc.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ((TypeTableSorter) tableViewer.getSorter())
-                .doSort(TypeEvalTableConst.COLUMN_FALSE_NEGATIVES);
-        tableViewer.refresh();
-      }
-    });
-
-    tc = new TableColumn(table, SWT.LEFT);
-    tc.setText("Prec.");
-    tc.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ((TypeTableSorter) tableViewer.getSorter()).doSort(TypeEvalTableConst.COLUMN_PRECISION);
-        tableViewer.refresh();
-      }
-    });
-
-    tc = new TableColumn(table, SWT.LEFT);
-    tc.setText("Recall");
-    tc.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ((TypeTableSorter) tableViewer.getSorter()).doSort(TypeEvalTableConst.COLUMN_RECALL);
-        tableViewer.refresh();
-      }
-    });
-
-    tc = new TableColumn(table, SWT.LEFT);
-    tc.setText("F1");
-    tc.addSelectionListener(new SelectionAdapter() {
-      @Override
-      public void widgetSelected(SelectionEvent event) {
-        ((TypeTableSorter) tableViewer.getSorter()).doSort(TypeEvalTableConst.COLUMN_F1);
-        tableViewer.refresh();
-      }
-    });
-
-    for (int i = 0, n = table.getColumnCount(); i < n; i++) {
-      table.getColumn(i).pack();
-    }
-    table.setHeaderVisible(true);
-    table.setLinesVisible(true);
-  }
-
-  protected void openInCasEditor(IPath resultPath) {
-    if (resultPath == null) {
-      return;
-    }
-    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-    IWorkspace workspace = ResourcesPlugin.getWorkspace();
-    IFile file = workspace.getRoot().getFileForLocation(resultPath);
-
-    if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO)) {
-      try {
-        file.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
-      } catch (CoreException e) {
-        RutaAddonsPlugin.error(e);
-      }
-    }
-    try {
-      page.openEditor(new FileEditorInput(file), "org.apache.uima.caseditor.editor");
-      page.showView(TruePositiveView.ID);
-      page.showView(FalsePositiveView.ID);
-      page.showView(FalseNegativeView.ID);
-    } catch (PartInitException e) {
-      RutaAddonsPlugin.error(e);
-    }
-  }
-
-  public static Image createImage(String path) {
-    return RutaAddonsPlugin.getImageDescriptor(path).createImage();
-  }
-
-  public void setResource(IResource r) {
-    this.script = r;
-  }
-
-  public IResource getResource() {
-    return this.script;
-  }
-
-  public TableViewer getViewer() {
-    return this.listviewer;
-  }
-
-  public void updateInfoPanel() {
-    if (listviewer.getInput() != null) {
-      listviewer.refresh();
-
-      int falsePositiveTotalCount = 0;
-      int falseNegativeTotalCount = 0;
-      int truePositiveTotalCount = 0;
-      ArrayList<TestCasData> dataList = (ArrayList<TestCasData>) listviewer.getInput();
-      for (TestCasData data : dataList) {
-        falsePositiveTotalCount += data.getFalsePositiveCount();
-        falseNegativeTotalCount += data.getFalseNegativeCount();
-        truePositiveTotalCount += data.getTruePositiveCount();
-      }
-
-      tInfoPanel.setFP(falsePositiveTotalCount);
-      tInfoPanel.setFN(falseNegativeTotalCount);
-      tInfoPanel.setRuns(truePositiveTotalCount);
-
-      double a = falsePositiveTotalCount;
-      double b = falseNegativeTotalCount;
-      double c = truePositiveTotalCount;
-
-      double precision = c / (c + a);
-      double recall = c / (c + b);
-      double fMeasure = 2 * (precision * recall) / (precision + recall);
-
-      fMeasure = fMeasure * 1000;
-      fMeasure = Math.round(fMeasure);
-      fMeasure = fMeasure / 1000;
-
-      tInfoPanel.setFMeasure(fMeasure);
-    }
-  }
-
-  public void saveState(IMemento memento) {
-    List<String> it = getIncludedTypes();
-    StringBuilder sb1 = new StringBuilder();
-    for (String each : it) {
-      sb1.append(each);
-      sb1.append(";");
-    }
-    List<String> et = getExcludedTypes();
-    StringBuilder sb2 = new StringBuilder();
-    for (String each : et) {
-      sb2.append(each);
-      sb2.append(";");
-    }
-    if (memento != null) {
-      memento.createChild("includedTypes", sb1.toString());
-      memento.createChild("excludedTypes", sb2.toString());
-    }
-  }
-
-  public void restoreState(IMemento memento) {
-    if (memento == null)
-      return;
-
-    IMemento itm = memento.getChild("includedTypes");
-    if (itm != null) {
-      String id = itm.getID();
-      String[] split = id.split("");
-      List<String> l = new ArrayList<String>();
-      for (String string : split) {
-        if (!StringUtils.isBlank(string)) {
-          l.add(string);
-        }
-      }
-      setIncludedTypes(l);
-    }
-
-    IMemento etm = memento.getChild("excludedTypes");
-    if (etm != null) {
-      String id = etm.getID();
-      String[] split = id.split("");
-      List<String> l = new ArrayList<String>();
-      for (String string : split) {
-        if (!StringUtils.isBlank(string)) {
-          l.add(string);
-        }
-      }
-      setExcludedTypes(l);
-    }
-
-  }
-
-  @Override
-  public Control getControl() {
-    return overlay;
-  }
-
-  @Override
-  public void setActionBars(IActionBars actionBars) {
-
-  }
-
-  @Override
-  public void dispose() {
-    overlay.dispose();
-    labelProvider.dispose();
-  }
-
-  @Override
-  public void setFocus() {
-    overlay.setFocus();
-  }
-
-  private void loadExistingTests() {
-    IPreferenceStore store = RutaAddonsPlugin.getDefault().getPreferenceStore();
-
-    IProject project = script.getProject();
-    IPath testFolderPath = project.getFullPath().append(RutaProjectUtils.getDefaultTestLocation())
-            .removeFirstSegments(1);
-    IPath scriptPath = script.getFullPath();
-    IPath scriptPackagePath = scriptPath.removeFirstSegments(2);
-    IPath testFolderPackagePath = testFolderPath.append(scriptPackagePath).removeFileExtension();
-    ArrayList<TestCasData> viewerInput = new ArrayList<TestCasData>();
-
-    IFolder testFolder = project.getFolder(testFolderPackagePath);
-    IResource[] resourceArray;
-    try {
-      resourceArray = testFolder.members();
-
-      for (IResource resource : resourceArray) {
-
-        if (resource != null && resource instanceof IFile
-                && resource.getLocation().getFileExtension().equals("xmi")) {
-          TestCasData data = new TestCasData(resource.getLocation());
-          if (Boolean.valueOf(store.getString(TestingPreferenceConstants.LOAD_OLD_TEST_RESULTS))) {
-            data.loadPreviousResults(script);
-            CAS resultCas = CASLoader.loadCas(script, data.getResultPath());
-            EvalDataProcessor.calculateEvaluatData(data, resultCas);
-          }
-          viewerInput.add(data);
-        }
-      }
-      // tInfoPanel.addCASViewNamesToCombo(viewNames);
-    } catch (CoreException e) {
-      RutaAddonsPlugin.error(e);
-    }
-    listviewer.setInput(viewerInput);
-    listviewer.refresh();
-  }
-
-  private void checkProjectTestStructure(IResource r) {
-    IProject project = r.getProject();
-    IPath testFolderPath = project.getFullPath().append(RutaProjectUtils.getDefaultTestLocation())
-            .removeFirstSegments(1);
-    IPath scriptPath = r.getFullPath().removeFileExtension();
-    IPath scriptPackagePath = scriptPath.removeFirstSegments(2);
-    IPath testScriptPath = testFolderPath.append(scriptPackagePath);
-    IPath resultPath = testScriptPath.append(TestCasData.RESULT_FOLDER);
-    IFolder resultFolder = project.getFolder(resultPath);
-
-    IPath path2TempTests = project.getFullPath().append(RutaProjectUtils.getDefaultTestLocation())
-            .append(RutaProjectUtils.getDefaultTempTestLocation()).removeFirstSegments(1);
-    IFolder tempTestFolder = project.getFolder(path2TempTests);
-
-    if (!project.exists(resultPath)) {
-      try {
-        CoreUtility.createFolder(resultFolder, true, true, new NullProgressMonitor());
-      } catch (CoreException e) {
-        RutaAddonsPlugin.error(e);
-      }
-    }
-
-    if (!project.exists(path2TempTests)) {
-      try {
-        CoreUtility.createFolder(tempTestFolder, true, true, new NullProgressMonitor());
-      } catch (CoreException e) {
-        RutaAddonsPlugin.error(e);
-      }
-    }
-  }
-
-  public void updateSingleTestInformation(TestCasData data) {
-    if (data.getTypeEvalData() != null) {
-      tableViewer.setInput(data.getTypeEvalData());
-      for (TableColumn c : tableViewer.getTable().getColumns()) {
-        c.pack();
-      }
-      tableViewer.refresh();
-    }
-
-  }
-
-  public String getSelectedViewCasName() {
-    return tInfoPanel.getSelectedViewCasName();
-  }
-
-  public void setExcludedTypes(List<String> excludedTypes) {
-    this.excludedTypes = excludedTypes;
-  }
-
-  public List<String> getExcludedTypes() {
-    return excludedTypes;
-  }
-
-  public void setIncludedTypes(List<String> includedTypes) {
-    this.includedTypes = includedTypes;
-  }
-
-  public List<String> getIncludedTypes() {
-    return includedTypes;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/EvalTableContentProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/EvalTableContentProvider.java
deleted file mode 100755
index 244404e..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/EvalTableContentProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.evalDataTable;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class EvalTableContentProvider implements IStructuredContentProvider {
-
-  public Object[] getElements(Object inputElement) {
-    
-    if  (inputElement instanceof HashMap) {
-      return ((HashMap)inputElement).values().toArray();
-    }
-    return null;
-  }
-
-  public void dispose() {
-    // TODO Auto-generated method stub
-
-  }
-
-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-    // TODO Auto-generated method stub
-
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/EvalTableLabelProvider.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/EvalTableLabelProvider.java
deleted file mode 100755
index 3eb9b8f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/EvalTableLabelProvider.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.evalDataTable;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class EvalTableLabelProvider implements ITableLabelProvider {
-
-  public Image getColumnImage(Object element, int columnIndex) {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  public String getColumnText(Object element, int columnIndex) {
-    TypeEvalData entry = (TypeEvalData) element;
-    
-    switch(columnIndex) {
-    
-      case 0:
-        return entry.getTypeName();
-      case 1:
-        return String.valueOf(entry.getTruePositives());
-      case 2:
-        return String.valueOf(entry.getFalsePositives());
-      case 3:
-        return String.valueOf(entry.getFalseNegatives());
-      case 4:
-        return String.valueOf(entry.getPrecision());
-      case 5:
-        return String.valueOf(entry.getRecall());
-      case 6:
-        return String.valueOf(entry.getFOne());
-    }
-     
-    
-    
-    return null;
-  }
-
-  public void addListener(ILabelProviderListener listener) {
-    // TODO Auto-generated method stub
-
-  }
-
-  public void dispose() {
-    // TODO Auto-generated method stub
-
-  }
-
-  public boolean isLabelProperty(Object element, String property) {
-    // TODO Auto-generated method stub
-    return false;
-  }
-
-  public void removeListener(ILabelProviderListener listener) {
-    // TODO Auto-generated method stub
-
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeEvalData.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeEvalData.java
deleted file mode 100755
index ce73af4..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeEvalData.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.evalDataTable;
-
-public class TypeEvalData implements Comparable{
-  
-  private String scriptName;
-  private int truePositives;
-  private int falsePositives;
-  private int falseNegatives;
-  private double precision;
-  private double recall;
-  private double FOne;
-  
-  
-  public TypeEvalData (String scriptName, int truePositives, int falsePositives, int falseNegatives) {
-    this.scriptName = scriptName;
-    this.truePositives = truePositives;
-    this.falsePositives = falsePositives;
-    this.falseNegatives = falseNegatives;
-  }
-  
-  
-  
-  public String getTypeName() {
-    return scriptName;
-  }
-  
-  public int getTruePositives() {
-    return truePositives;
-  }
-  
-  public int getFalsePositives() {
-    return falsePositives;
-  }
-  
-  public int getFalseNegatives() {
-    return falseNegatives;
-  }
-  
-  public void setFalseNegatives(int falseNegatives) {
-    this.falseNegatives = falseNegatives;
-  }
-  
-  public void setFalsePositives(int falsePositives) {
-    this.falsePositives = falsePositives;
-  }
-  
-  public void setScriptName(String scriptName) {
-    this.scriptName = scriptName;
-  }
-  
-  public void setTruePositives(int truePositives) {
-    this.truePositives = truePositives;
-  }
-
-  public double getPrecision() {
-    return precision;
-  }
-  public double getRecall() {
-    return recall;
-  }
-  
-  public double getFOne() {
-    return FOne;
-  }
-
-  public int compareTo(Object o) {
-    if (o instanceof TypeEvalData) {
-      String name = ((TypeEvalData) o).getTypeName();
-      if (scriptName.equals(name)){
-        return 1;
-      }
-    }
-    return 0;
-  }
-  
-  public void calcFOne () {
-    
-    double tp = truePositives;
-    double fp = falsePositives;
-    double fn = falseNegatives;
-    
-    
-    if (truePositives == 0) {
-      precision = 0;
-      recall = 0;
-      FOne = 0;
-    } else {
-    precision = tp / (tp + fp);
-    recall = tp / (tp + fn);
-    FOne = 2 * (precision * recall) / (precision + recall);
-    
-    precision = precision * 1000;
-    precision = Math.round(precision);
-    precision = precision / 1000;
-    
-    recall = recall * 1000;
-    recall = Math.round(recall);
-    recall = recall / 1000;
-    
-    FOne = FOne * 1000;
-    FOne = Math.round(FOne);
-    FOne = FOne / 1000;
-    
-    }
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeEvalTableConst.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeEvalTableConst.java
deleted file mode 100755
index 5b6090f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeEvalTableConst.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.evalDataTable;
-
-public class TypeEvalTableConst {
-  
-  public static final int COLUMN_TYPE_NAME = 0;
-  public static final int COLUMN_TRUE_POSITIVES =1;
-  public static final int COLUMN_FALSE_POSITIVES=2;
-  public static final int COLUMN_FALSE_NEGATIVES=3;
-  public static final int COLUMN_PRECISION=4;
-  public static final int COLUMN_RECALL=5;
-  public static final int COLUMN_F1=6;
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeTableSorter.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeTableSorter.java
deleted file mode 100755
index 64730b7..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/evalDataTable/TypeTableSorter.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.evalDataTable;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-
-public class TypeTableSorter extends ViewerSorter {
-  
-  private static final int ASCENDING = 0;
-
-  private static final int DESCENDING = 1;
-
-  private int column;
-
-  private int direction;
-
-  /**
-   * Does the sort. If it's a different column from the previous sort, do an
-   * ascending sort. If it's the same column as the last sort, toggle the sort
-   * direction.
-   * 
-   * @param column
-   */
-  public void doSort(int column) {
-    if (column == this.column) {
-      // Same column as last sort; toggle the direction
-      direction = 1 - direction;
-    } else {
-      // New column; do an ascending sort
-      this.column = column;
-      direction = ASCENDING;
-    }
-  }
-
-  /**
-   * Compares the object for sorting
-   */
-  @Override
-  public int compare(Viewer viewer, Object e1, Object e2) {
-    int rc = 0;
-    TypeEvalData td1 = (TypeEvalData) e1;
-    TypeEvalData td2 = (TypeEvalData) e2;
-    
-    
-
-    
-    switch(column) {
-      case TypeEvalTableConst.COLUMN_TYPE_NAME:
-        rc = td1.getTypeName().compareTo(td2.getTypeName());
-        break;
-      case TypeEvalTableConst.COLUMN_TRUE_POSITIVES:
-        rc = td1.getTruePositives() - td2.getTruePositives();
-        break;
-      case TypeEvalTableConst.COLUMN_FALSE_POSITIVES:
-        rc = td1.getFalsePositives() - td2.getFalsePositives();
-        break;
-      case TypeEvalTableConst.COLUMN_FALSE_NEGATIVES:
-        rc = td1.getFalseNegatives() - td2.getFalseNegatives();
-        break;
-      case TypeEvalTableConst.COLUMN_PRECISION:
-        rc = Double.compare(td1.getPrecision() , td2.getPrecision());
-        break;
-      case TypeEvalTableConst.COLUMN_RECALL:
-        rc = Double.compare(td1.getRecall() , td2.getRecall());
-        break;
-      case TypeEvalTableConst.COLUMN_F1:
-        rc = Double.compare(td1.getFOne() , td2.getFOne());;
-        break;
-    }
-    
-    if (direction == DESCENDING)
-      rc = -rc;
-
-    return rc;    
-    
-    
-//    int rc = 0;
-//    Player p1 = (Player) e1;
-//    Player p2 = (Player) e2;
-//
-//    // Determine which column and do the appropriate sort
-//    switch (column) {
-//    case PlayerConst.COLUMN_FIRST_NAME:
-//      rc = collator.compare(p1.getFirstName(), p2.getFirstName());
-//      break;
-//    case PlayerConst.COLUMN_LAST_NAME:
-//      rc = collator.compare(p1.getLastName(), p2.getLastName());
-//      break;
-//    case PlayerConst.COLUMN_POINTS:
-//      rc = p1.getPoints() > p2.getPoints() ? 1 : -1;
-//      break;
-//    case PlayerConst.COLUMN_REBOUNDS:
-//      rc = p1.getRebounds() > p2.getRebounds() ? 1 : -1;
-//      break;
-//    case PlayerConst.COLUMN_ASSISTS:
-//      rc = p1.getAssists() > p2.getAssists() ? 1 : -1;
-//      break;
-//    }
-//
-//    // If descending order, flip the direction
-//    if (direction == DESCENDING)
-//      rc = -rc;
-//
-//    return rc;
-  }
-
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fn/FalseNegativeView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fn/FalseNegativeView.java
deleted file mode 100755
index 3121d4f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fn/FalseNegativeView.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.fn;
-
-import org.apache.uima.caseditor.editor.AnnotationEditor;
-import org.apache.uima.caseditor.editor.CasEditorView;
-import org.apache.uima.caseditor.editor.ICasEditor;
-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;
-import org.apache.uima.ruta.testing.ui.views.EvaluationViewPage;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-public class FalseNegativeView extends CasEditorView {
-
-  public static final String ID = "org.apache.uima.ruta.testing.falseNegative";
-
-  public FalseNegativeView() {
-    super("The instance view is currently not available.");
-  }
-
-  @Override
-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {
-    IPageBookViewPage result = null;
-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {
-      EvaluationViewPage page = new EvaluationViewPage(ICasEvaluator.FALSE_NEGATIVE,
-              (AnnotationEditor) editor);
-      result = page;
-    }
-    return result;
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fp/FalsePositiveView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fp/FalsePositiveView.java
deleted file mode 100755
index 6a05381..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fp/FalsePositiveView.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.testing.ui.views.fp;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;

-import org.apache.uima.ruta.testing.ui.views.EvaluationViewPage;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class FalsePositiveView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.testing.falsePositive";

-

-  public FalsePositiveView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      EvaluationViewPage page = new EvaluationViewPage(ICasEvaluator.FALSE_POSITIVE,

-              (AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tp/TruePositiveView.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tp/TruePositiveView.java
deleted file mode 100755
index 0b50006..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tp/TruePositiveView.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.testing.ui.views.tp;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;

-import org.apache.uima.ruta.testing.ui.views.EvaluationViewPage;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class TruePositiveView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.ruta.testing.truePositive";

-

-  public TruePositiveView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      EvaluationViewPage page = new EvaluationViewPage(ICasEvaluator.TRUE_POSITIVE,

-              (AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tree/TestEvaluationTree.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tree/TestEvaluationTree.java
deleted file mode 100755
index a2643da..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tree/TestEvaluationTree.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*

- * 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.ruta.testing.ui.views.tree;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeNode;

-import org.apache.uima.ruta.caseditor.view.tree.ITreeNode;

-import org.apache.uima.ruta.caseditor.view.tree.TypeTreeNode;

-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;

-

-public class TestEvaluationTree {

-

-  private TypeTreeNode root;

-

-  public TestEvaluationTree() {

-

-  }

-

-  public void createTree(CAS cas) {

-    Type falsePositiveType = cas.getTypeSystem().getType(ICasEvaluator.FALSE_POSITIVE);

-    Type falseNegativeType = cas.getTypeSystem().getType(ICasEvaluator.FALSE_NEGATIVE);

-    Type truePositiveType = cas.getTypeSystem().getType(ICasEvaluator.TRUE_POSITIVE);

-

-    if (falsePositiveType == null || falseNegativeType == null) {

-      return;

-    }

-    // Creating RootNode and children that function as root nodes

-    // for the FalsePositive /FalseNegative subtrees

-    root = new TypeTreeNode(null, cas.getAnnotationType());

-

-    TypeTreeNode fproot = new TypeTreeNode(root, falsePositiveType);

-    TypeTreeNode fnroot = new TypeTreeNode(root, falseNegativeType);

-    TypeTreeNode tproot = new TypeTreeNode(root, truePositiveType);

-

-    // Iterating through CAS and adding nodes to according subtrees

-

-    addEvalNodes(cas, falsePositiveType, fproot);

-    addEvalNodes(cas, falseNegativeType, fnroot);

-    addEvalNodes(cas, truePositiveType, tproot);

-

-    root.addChild(fproot);

-    root.addChild(fnroot);

-    root.addChild(tproot);

-  }

-

-  private void addEvalNodes(CAS cas, Type falsePositiveType, TypeTreeNode fproot) {

-    FSIterator<AnnotationFS> iter = cas.getAnnotationIndex(falsePositiveType).iterator();

-    while (iter.isValid()) {

-      FeatureStructure fs = iter.get();

-      if (fs instanceof AnnotationFS) {

-        AnnotationFS a = (AnnotationFS) fs;

-        Feature original = fs.getType().getFeatureByBaseName(ICasEvaluator.ORIGINAL);

-        FeatureStructure originalfs = fs.getFeatureValue(original);

-        TypeTreeNode parentTypeNode = containsTypeNode(fproot, originalfs);

-        if (parentTypeNode == null && originalfs != null) {

-          parentTypeNode = new TypeTreeNode(fproot, originalfs.getType());

-          fproot.addChild(parentTypeNode);

-        }

-        AnnotationTreeNode newNode = new AnnotationTreeNode(parentTypeNode, a);

-        if (parentTypeNode != null) {

-          parentTypeNode.addChild(newNode);

-        } else {

-          RutaAddonsPlugin.error(new IllegalArgumentException(

-                  "Trying to display unknown type for " + a));

-        }

-      }

-      iter.moveToNext();

-    }

-  }

-

-  private TypeTreeNode containsTypeNode(TypeTreeNode fproot, FeatureStructure originalfs) {

-    ITreeNode[] children = fproot.getChildren();

-    for (ITreeNode each : children) {

-      if (each instanceof TypeTreeNode) {

-        TypeTreeNode node = (TypeTreeNode) each;

-        if (node.getType().equals(originalfs.getType())) {

-          return node;

-        }

-      }

-    }

-    return null;

-  }

-

-  public ITreeNode getRoot() {

-    return this.root;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/util/CASLoader.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/util/CASLoader.java
deleted file mode 100755
index 0277edf..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/util/CASLoader.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.impl.XmiCasDeserializer;
-import org.apache.uima.resource.ResourceSpecifier;
-import org.apache.uima.resource.metadata.FsIndexDescription;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.addons.RutaAddonsPlugin;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.util.CasCreationUtils;
-import org.apache.uima.util.XMLInputSource;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-
-public class CASLoader {
-
-  public static CAS loadCas(IResource r, IPath file) {
-    String elementName = r.getLocation().lastSegment();
-    // Remove Fileend if elementName exists
-    int lastIndexOf = elementName.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);
-    if (lastIndexOf != -1) {
-      elementName = elementName.substring(0, lastIndexOf);
-    }
-
-    try {
-      IPath engineDescriptorPath = RutaProjectUtils.getAnalysisEngineDescriptorPath(r.getLocation(),
-              r.getProject());
-      XMLInputSource in = new XMLInputSource(engineDescriptorPath.toPortableString());
-      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
-      AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
-
-      String desc = null;
-      desc = engineDescriptorPath.toPortableString();
-      XMLInputSource in2 = new XMLInputSource(desc);
-      Object descriptor = UIMAFramework.getXMLParser().parse(in2);
-      CAS testCas = null;
-      if (descriptor instanceof AnalysisEngineDescription) {
-        testCas = CasCreationUtils.createCas((AnalysisEngineDescription) descriptor);
-      } else if (descriptor instanceof TypeSystemDescription) {
-        TypeSystemDescription tsDesc = (TypeSystemDescription) descriptor;
-        tsDesc.resolveImports();
-        testCas = CasCreationUtils.createCas(tsDesc, null, new FsIndexDescription[0]);
-        // TODO: where are the type priorities?
-      }
-
-      FileInputStream inputStream = null;
-      try {
-        inputStream = new FileInputStream(
-        // resource.getLocation().toFile()
-                new File(file.toPortableString()));
-
-        XmiCasDeserializer.deserialize(inputStream, testCas, true);
-
-      } finally {
-        if (inputStream != null) {
-          inputStream.close();
-        }
-      }
-      return testCas;
-    } catch (Exception e) {
-      RutaAddonsPlugin.error(e);
-    }
-    return null;
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/util/EvalDataProcessor.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/util/EvalDataProcessor.java
deleted file mode 100755
index 8c43ed1..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/util/EvalDataProcessor.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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.ruta.testing.ui.views.util;
-
-import java.util.Collection;
-import java.util.HashMap;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.ruta.testing.evaluator.ICasEvaluator;
-import org.apache.uima.ruta.testing.ui.views.TestCasData;
-import org.apache.uima.ruta.testing.ui.views.evalDataTable.TypeEvalData;
-
-
-public class EvalDataProcessor {
-
-  public static void calculateEvaluatData(TestCasData data, CAS resultCas) {
-    data.setEvaluationStatus(true);
-    TypeSystem ts = resultCas.getTypeSystem();
-    Type falsePositiveType = ts.getType(ICasEvaluator.FALSE_POSITIVE);
-    Type falseNegativeType = ts.getType(ICasEvaluator.FALSE_NEGATIVE);
-    Type truePositiveType = ts.getType(ICasEvaluator.TRUE_POSITIVE);
-
-    Feature originalFeature = truePositiveType.getFeatureByBaseName("original");
-
-    int falsePositiveCount = resultCas.getAnnotationIndex(falsePositiveType).size();
-    int falseNegativeCount = resultCas.getAnnotationIndex(falseNegativeType).size();
-    int truePositiveCount = resultCas.getAnnotationIndex(truePositiveType).size();
-
-    data.setTruePositiveCount(truePositiveCount);
-    data.setFalsePositiveCount(falsePositiveCount);
-    data.setFalseNegativeCount(falseNegativeCount);
-
-    HashMap<String, TypeEvalData> map = new HashMap<String, TypeEvalData>();
-
-    map.put(" Total", new TypeEvalData("Total", truePositiveCount, falsePositiveCount,
-            falseNegativeCount));
-
-    AnnotationIndex<AnnotationFS> index = resultCas.getAnnotationIndex(truePositiveType);
-
-    FSIterator iter = index.iterator();
-
-    if (originalFeature != null) {
-
-      while (iter.isValid()) {
-        AnnotationFS a = (AnnotationFS) iter.next();
-
-        FeatureStructure fs = a.getFeatureValue(originalFeature);
-        String typeName = fs.getType().getName();
-
-        if (map.containsKey(typeName)) {
-          TypeEvalData element = map.get(typeName);
-          int oldCount = element.getTruePositives();
-          element.setTruePositives(oldCount + 1);
-        } else {
-          TypeEvalData newData = new TypeEvalData(typeName, 1, 0, 0);
-          map.put(typeName, newData);
-        }
-      }
-
-      index = resultCas.getAnnotationIndex(falsePositiveType);
-      iter = index.iterator();
-
-      while (iter.isValid()) {
-        AnnotationFS a = (AnnotationFS) iter.next();
-
-        FeatureStructure fs = a.getFeatureValue(originalFeature);
-        String typeName = fs.getType().getName();
-
-        if (map.containsKey(typeName)) {
-          TypeEvalData element = map.get(typeName);
-          int oldCount = element.getFalsePositives();
-          element.setFalsePositives(oldCount + 1);
-        } else {
-          TypeEvalData newData = new TypeEvalData(typeName, 0, 1, 0);
-          map.put(typeName, newData);
-        }
-      }
-
-      index = resultCas.getAnnotationIndex(falseNegativeType);
-      iter = index.iterator();
-
-      while (iter.isValid()) {
-        AnnotationFS a = (AnnotationFS) iter.next();
-
-        FeatureStructure fs = a.getFeatureValue(originalFeature);
-        String typeName = fs.getType().getName();
-
-        if (map.containsKey(typeName)) {
-          TypeEvalData element = map.get(typeName);
-          int oldCount = element.getFalseNegatives();
-          element.setFalseNegatives(oldCount + 1);
-        } else {
-          TypeEvalData newData = new TypeEvalData(typeName, 0, 0, 1);
-          map.put(typeName, newData);
-        }
-      }
-
-      data.setTypeEvalData(map);
-
-      Collection<TypeEvalData> col = map.values();
-      for (TypeEvalData typeEvalData : col) {
-        typeEvalData.calcFOne();
-      }
-
-      return;
-    }
-  }
-}
diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/AbstarctApplyScriptHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/AbstarctApplyScriptHandler.java
deleted file mode 100755
index c02f7d9..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/AbstarctApplyScriptHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.ui.IEditorInput;

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPage;

-import org.eclipse.ui.part.FileEditorInput;

-

-public abstract class AbstarctApplyScriptHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-  }

-

-  public void dispose() {

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    IWorkbench workbench = RutaAddonsPlugin.getDefault().getWorkbench();

-    IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();

-    IEditorPart part = page.getActiveEditor();

-    IEditorInput editorInput = part.getEditorInput();

-    if (editorInput instanceof FileEditorInput) {

-      FileEditorInput input = (FileEditorInput) editorInput;

-      IFile path = input.getFile();

-      getJob(event, path).schedule();

-    }

-    return null;

-  }

-

-  abstract AbstractApplyScriptHandlerJob getJob(ExecutionEvent event, IFile path);

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/AbstractApplyScriptHandlerJob.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/AbstractApplyScriptHandlerJob.java
deleted file mode 100755
index 8ee47cb..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/AbstractApplyScriptHandlerJob.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.impl.XmiCasSerializer;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.apache.uima.util.XMLSerializer;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.xml.sax.SAXException;

-

-public abstract class AbstractApplyScriptHandlerJob extends Job {

-  private ExecutionEvent event;

-

-  private IFile scriptFile;

-

-  private boolean createXMI;

-

-  AbstractApplyScriptHandlerJob(ExecutionEvent event, IFile scriptFile, boolean createXMI) {

-    super("Applying " + scriptFile.getName() + "...");

-    this.event = event;

-    this.scriptFile = scriptFile;

-    this.createXMI = createXMI;

-    setUser(true);

-  }

-

-  @Override

-  public IStatus run(IProgressMonitor monitor) {

-    monitor.beginTask("Collecting files...", 1);

-

-    if (HandlerUtil.getCurrentSelection(event) instanceof IStructuredSelection) {

-      StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);

-      Iterator<?> iter = selection.iterator();

-      IResource first = null;

-

-      List<IPath> paths = new ArrayList<IPath>();

-      while (iter.hasNext()) {

-        Object object = iter.next();

-        if (object instanceof IResource) {

-          IResource resource = (IResource) object;

-          if (first == null) {

-            first = resource;

-          }

-          paths.addAll(getPaths(resource));

-        }

-      }

-

-      CAS cas = null;

-      AnalysisEngine ae = null;

-      try {

-        IPath rootPath = RutaProjectUtils.getDescriptorRootPath(scriptFile.getProject());

-        IPath descriptorPath = RutaProjectUtils.getAnalysisEngineDescriptorPath(

-                scriptFile.getLocation(), scriptFile.getProject());

-        XMLInputSource in = new XMLInputSource(descriptorPath.toPortableString());

-        ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-        ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

-        resMgr.setDataPath(rootPath.toPortableString());

-        ae = UIMAFramework.produceAnalysisEngine(specifier, resMgr, null);

-        initAE(ae);

-        ae.reconfigure();

-      } catch (Exception e) {

-        DLTKCore.error(e.getMessage(), e);

-        return Status.CANCEL_STATUS;

-      }

-      monitor.beginTask("Processing... ", paths.size());

-      for (IPath path : paths) {

-        if (monitor.isCanceled()) {

-          break;

-        }

-

-        monitor.setTaskName("Processing " + path.lastSegment() + "... ");

-        try {

-

-          if (cas == null) {

-            cas = ae.newCAS();

-          } else {

-            cas.reset();

-          }

-          if (path.getFileExtension().equals("xmi")) {

-            XmiCasDeserializer.deserialize(new FileInputStream(path.toPortableString()), cas, true);

-          } else {

-            cas.setDocumentText(getText(path.toPortableString()));

-          }

-          RutaEngine.removeSourceDocumentInformation(cas);

-          RutaEngine.addSourceDocumentInformation(cas, new File(path.toPortableString()));

-          ae.process(cas);

-        } catch (Exception e) {

-          DLTKCore.error(e.getMessage(), e);

-          monitor.worked(1);

-          continue;

-        }

-

-        if (createXMI) {

-          monitor.setTaskName("Writing " + path.lastSegment() + "... ");

-

-          File newFile = null;

-          if (path.getFileExtension().equals("xmi")) {

-            newFile = new File(path.toPortableString());

-          } else {

-            newFile = new File(path.toPortableString() + ".xmi");

-          }

-          try {

-            writeXmi(cas, newFile);

-          } catch (Exception e) {

-            DLTKCore.error(e.getMessage(), e);

-            monitor.worked(1);

-            continue;

-          }

-          IWorkspace workspace = ResourcesPlugin.getWorkspace();

-          IWorkspaceRoot root = workspace.getRoot();

-          IPath makeRelativeTo = path.makeRelativeTo(root.getLocation());

-          IResource resource = root.findMember(makeRelativeTo);

-

-          try {

-            if (resource != null) {

-              resource.getParent()

-                      .refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

-            }

-          } catch (CoreException e) {

-          }

-        }

-        monitor.worked(1);

-      }

-      if (cas != null) {

-        cas.release();

-      }

-      if (ae != null) {

-        ae.destroy();

-      }

-    }

-

-    monitor.done();

-    return Status.OK_STATUS;

-

-  }

-

-  private static void writeXmi(CAS aCas, File name) throws IOException, SAXException {

-    FileOutputStream out = null;

-

-    try {

-      // write XMI

-      out = new FileOutputStream(name);

-      XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());

-      XMLSerializer xmlSer = new XMLSerializer(out, false);

-      ser.serialize(aCas, xmlSer.getContentHandler());

-    } catch (Exception e) {

-      RutaAddonsPlugin.error(e);

-    } finally {

-      if (out != null) {

-        out.close();

-      }

-    }

-  }

-

-  private List<IPath> getPaths(IResource resource) {

-    List<IPath> paths = new ArrayList<IPath>();

-    if (resource instanceof IFile) {

-      IFile file = (IFile) resource;

-      String fileExtension = file.getFileExtension();

-      if ("txt".equals(fileExtension) || "html".equals(fileExtension)

-              || "xmi".equals(fileExtension) || "htm".equals(fileExtension)) {

-        paths.add(file.getLocation());

-      }

-    } else if (resource instanceof IFolder) {

-      IFolder folder = (IFolder) resource;

-      try {

-        IResource[] members = folder.members();

-        for (IResource each : members) {

-          paths.addAll(getPaths(each));

-        }

-      } catch (CoreException e) {

-      }

-    }

-    return paths;

-  }

-

-  abstract void initAE(AnalysisEngine ae);

-

-  private static String getText(String each) {

-    try {

-      return FileUtils.file2String(new File(each), "UTF-8");

-    } catch (IOException e) {

-      DLTKCore.error(e.getMessage(), e);

-    }

-    return "";

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptKeepBasicsHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptKeepBasicsHandler.java
deleted file mode 100755
index 90b4371..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptKeepBasicsHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.resources.IFile;

-

-public class ApplyScriptKeepBasicsHandler extends AbstarctApplyScriptHandler {

-

-  @Override

-  AbstractApplyScriptHandlerJob getJob(ExecutionEvent event, IFile path) {

-    return new ApplyScriptKeepBasicsJob(event, path);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptKeepBasicsJob.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptKeepBasicsJob.java
deleted file mode 100755
index 29c2aa2..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptKeepBasicsJob.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.resources.IFile;

-

-

-public class ApplyScriptKeepBasicsJob extends AbstractApplyScriptHandlerJob {

-

-  ApplyScriptKeepBasicsJob(ExecutionEvent event, IFile scriptFile) {

-    super(event, scriptFile, true);

-  }

-

-  @Override

-  void initAE(AnalysisEngine ae) {

-    ae.setConfigParameterValue(RutaEngine.PARAM_REMOVE_BASICS, false);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptNoXMIHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptNoXMIHandler.java
deleted file mode 100755
index 966ce16..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptNoXMIHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.resources.IFile;

-

-public class ApplyScriptNoXMIHandler extends AbstarctApplyScriptHandler {

-

-  @Override

-  AbstractApplyScriptHandlerJob getJob(ExecutionEvent event, IFile path) {

-    return new ApplyScriptNoXMIJob(event, path);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptNoXMIJob.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptNoXMIJob.java
deleted file mode 100755
index 75178c3..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptNoXMIJob.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.resources.IFile;

-

-

-public class ApplyScriptNoXMIJob extends AbstractApplyScriptHandlerJob {

-

-  ApplyScriptNoXMIJob(ExecutionEvent event, IFile scriptFile) {

-    super(event, scriptFile, false);

-  }

-

-  @Override

-  void initAE(AnalysisEngine ae) {

-    ae.setConfigParameterValue(RutaEngine.PARAM_REMOVE_BASICS, false);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptRemoveBasicsHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptRemoveBasicsHandler.java
deleted file mode 100755
index 3177a49..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptRemoveBasicsHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.resources.IFile;

-

-public class ApplyScriptRemoveBasicsHandler extends AbstarctApplyScriptHandler {

-

-  @Override

-  AbstractApplyScriptHandlerJob getJob(ExecutionEvent event, IFile path) {

-    return new ApplyScriptRemoveBasicsJob(event, path);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptRemoveBasicsJob.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptRemoveBasicsJob.java
deleted file mode 100755
index 40e5ac8..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/apply/ApplyScriptRemoveBasicsJob.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.utils.apply;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.resources.IFile;

-

-

-public class ApplyScriptRemoveBasicsJob extends AbstractApplyScriptHandlerJob {

-

-  ApplyScriptRemoveBasicsJob(ExecutionEvent event, IFile scriptFile) {

-    super(event, scriptFile, true);

-  }

-

-  @Override

-  void initAE(AnalysisEngine ae) {

-    ae.setConfigParameterValue(RutaEngine.PARAM_REMOVE_BASICS, true);

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/twl/MultiTWLConverterHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/twl/MultiTWLConverterHandler.java
deleted file mode 100755
index 9e45ade..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/twl/MultiTWLConverterHandler.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*

- * 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.ruta.utils.twl;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.apache.uima.ruta.resource.MultiTreeWordList;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IContainer;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class MultiTWLConverterHandler implements IHandler {

-  private class ConverterHandlerJob extends Job {

-    ExecutionEvent event;

-    private boolean compress;

-

-    ConverterHandlerJob(ExecutionEvent event, boolean compress) {

-      super("Converting...");

-      this.event = event;

-      this.compress = compress;

-      setUser(true);

-    }

-

-    @Override

-    public IStatus run(IProgressMonitor monitor) {

-      monitor.beginTask("Collecting files...", 1);

-

-      if (HandlerUtil.getCurrentSelection(event) instanceof IStructuredSelection) {

-        StructuredSelection selection = (StructuredSelection) HandlerUtil

-                .getCurrentSelection(event);

-        Iterator<?> iter = selection.iterator();

-        IResource first = null;

-

-        List<String> paths = new ArrayList<String>();

-        while (iter.hasNext()) {

-          Object object = iter.next();

-          if (object instanceof IResource) {

-            IResource resource = (IResource) object;

-            if (first == null) {

-              first = resource;

-            }

-            paths.addAll(getPaths(resource));

-          }

-        }

-        monitor.beginTask("Compiling generated.mtwl...", 1);

-        if (!paths.isEmpty()) {

-          MultiTreeWordList trie;

-          try {

-            trie = new MultiTreeWordList(paths.toArray(new String[0]));

-          } catch (IOException e) {

-            RutaAddonsPlugin.error(e);

-            return Status.CANCEL_STATUS;

-          }

-

-          IPath parent = first.getLocation().removeLastSegments(1);

-          IPath newPath = parent.append("generated.mtwl");

-

-          File file = newPath.toFile();

-          final String absolutePath = file.getAbsolutePath();

-

-          try {

-            trie.createMTWLFile(absolutePath, compress, "UTF-8");

-          } catch (IOException e) {

-            RutaAddonsPlugin.error(e);

-          }

-

-          IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();

-          IContainer container = myWorkspaceRoot.getContainerForLocation(parent);

-          if (container != null) {

-            try {

-              container.getParent().refreshLocal(IResource.DEPTH_INFINITE,

-                      new NullProgressMonitor());

-            } catch (CoreException e) {

-              RutaAddonsPlugin.error(e);

-            }

-          }

-        }

-

-      }

-

-      monitor.done();

-      return Status.OK_STATUS;

-

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-  }

-

-  public void dispose() {

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    boolean compress = preferenceStore.getBoolean(RutaCorePreferences.COMPRESS_WORDLISTS);

-    new ConverterHandlerJob(event, compress).schedule();

-    return null;

-  }

-

-  private List<String> getPaths(IResource resource) {

-    List<String> paths = new ArrayList<String>();

-    if (resource instanceof IFile) {

-      IFile file = (IFile) resource;

-      String fileExtension = file.getFileExtension();

-      if ("txt".equals(fileExtension)) {

-        String path = file.getRawLocation().toString();

-        paths.add(path);

-      }

-    } else if (resource instanceof IFolder) {

-      IFolder folder = (IFolder) resource;

-      try {

-        IResource[] members = folder.members();

-        for (IResource each : members) {

-          paths.addAll(getPaths(each));

-        }

-      } catch (CoreException e) {

-      }

-    }

-    return paths;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/twl/TWLConverterHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/twl/TWLConverterHandler.java
deleted file mode 100755
index 45a7016..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/twl/TWLConverterHandler.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*

- * 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.ruta.utils.twl;

-

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.apache.uima.ruta.resource.TreeWordList;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IContainer;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class TWLConverterHandler implements IHandler {

-

-  private class ConverterHandlerJob extends Job {

-    ExecutionEvent event;

-    private boolean compress;

-

-    ConverterHandlerJob(ExecutionEvent event, boolean compress) {

-      super("Converting...");

-      this.event = event;

-      this.compress = compress;

-      setUser(true);

-    }

-

-    @Override

-    public IStatus run(IProgressMonitor monitor) {

-      monitor.beginTask("Collecting files...", 1);

-      List<IFile> files = new ArrayList<IFile>();

-      if (HandlerUtil.getCurrentSelection(event) instanceof IStructuredSelection) {

-        StructuredSelection selection = (StructuredSelection) HandlerUtil

-                .getCurrentSelection(event);

-        Iterator<?> iter = selection.iterator();

-        while (iter.hasNext()) {

-          Object object = iter.next();

-          if (object instanceof IFile) {

-            IFile file = (IFile) object;

-            files.add(file);

-          }

-        }

-      }

-      monitor.beginTask("Converting files...", files.size());

-      for (IFile file : files) {

-        monitor.setTaskName("Compiling " + file.getLocation().lastSegment() + "...");

-        String path = file.getRawLocation().toString();

-        TreeWordList list;

-        try {

-          list = new TreeWordList(path, false);

-        } catch (IOException e) {

-          RutaAddonsPlugin.error(e);

-          return Status.CANCEL_STATUS;

-        }

-        String exportPath = path.substring(0, path.length() - 3) + "twl";

-        try {

-          list.createTWLFile(exportPath, compress, "UTF-8");

-        } catch (IOException e) {

-          RutaAddonsPlugin.error(e);

-        }

-        IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();

-        IContainer container = myWorkspaceRoot.getContainerForLocation(file.getLocation());

-        if (container != null) {

-          try {

-            container.getParent().refreshLocal(1, null);

-          } catch (CoreException e) {

-            RutaAddonsPlugin.error(e);

-          }

-        }

-        monitor.worked(1);

-      }

-      monitor.done();

-      return Status.OK_STATUS;

-

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-  }

-

-  public void dispose() {

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    boolean compress = preferenceStore.getBoolean(RutaCorePreferences.COMPRESS_WORDLISTS);

-    new ConverterHandlerJob(event, compress).schedule();

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java
deleted file mode 100644
index 7501f3e..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*

- * 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.ruta.utils.ui;

-

-import java.awt.Toolkit;

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.commons.lang3.StringUtils;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.layout.FillLayout;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Event;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Listener;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Table;

-import org.eclipse.swt.widgets.TableItem;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.swt.widgets.Widget;

-

-public class SelectTypesDialog extends Dialog implements Listener {

-

-  private Shell shell;

-

-  private Text typeNameUI;

-

-  private Table list;

-

-  public String typeName = "error-TypeName-never-set";

-

-  private Button okButton;

-

-  private Button cancelButton;

-

-  private List<String> allTypes;

-

-  private List<String> selectedTypes;

-

-  private List<String> initialTypes;

-

-  public SelectTypesDialog(Shell shell, List<String> allTypes, List<String> selectedTypes) {

-    super(shell);

-    this.shell = shell;

-    this.allTypes = allTypes;

-    this.selectedTypes = selectedTypes;

-    this.initialTypes = new ArrayList<String>(selectedTypes);

-    createDialogArea();

-    init();

-  }

-

-  protected Control createDialogArea() {

-    Composite mainArea = (Composite) createDialogArea(shell);

-    createWideLabel(mainArea, "  Type Name:");

-

-    typeNameUI = newText(mainArea, SWT.SINGLE, "Specify the type name");

-    typeNameUI.addListener(SWT.Modify, this);

-

-    createWideLabel(mainArea, "  Matching Types:");

-

-    list = newTable(mainArea, SWT.CHECK);

-    ((GridData) list.getLayoutData()).heightHint = 250;

-    ((GridData) list.getLayoutData()).minimumHeight = 100;

-    typeNameUI.addListener(SWT.CHECK, this);

-

-    displayFilteredTypes("");

-    createButtonBar(mainArea);

-    return mainArea;

-  }

-

-  @Override

-  protected Control createDialogArea(Composite parent) {

-    Composite composite = new Composite(parent, SWT.NONE);

-    GridLayout layout = new GridLayout();

-    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);

-    layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);

-    layout.verticalSpacing = 3;

-    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);

-    composite.setLayout(layout);

-    composite.setLayoutData(new GridData(GridData.FILL_BOTH));

-    applyDialogFont(composite);

-    return composite;

-  }

-

-  @Override

-  protected Control createButtonBar(Composite parent) {

-    Composite composite = new Composite(parent, SWT.NONE);

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 0;

-    layout.makeColumnsEqualWidth = true;

-    layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);

-    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);

-    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);

-    layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);

-    composite.setLayout(layout);

-    GridData data = new GridData(SWT.CENTER, SWT.CENTER, false, false);

-    composite.setLayoutData(data);

-

-    createButtonsForButtonBar(composite);

-    return composite;

-  }

-

-  @Override

-  protected void createButtonsForButtonBar(Composite parent) {

-    okButton = createButton(parent, IDialogConstants.OK_ID, "OK", true);

-    cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, "    Cancel    ", false);

-  }

-

-  private void init() {

-

-    TableItem[] items = list.getItems();

-    for (TableItem tableItem : items) {

-      if (selectedTypes.contains(tableItem.getText())) {

-        tableItem.setChecked(true);

-      }

-    }

-

-    okButton.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent event) {

-        TableItem[] items = list.getItems();

-        List<String> selection = new ArrayList<String>();

-        for (TableItem tableItem : items) {

-          if (tableItem.getChecked()) {

-            selection.add(tableItem.getText());

-          }

-        }

-        selectedTypes = selection;

-        shell.dispose();

-      }

-    });

-

-    cancelButton.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent event) {

-        selectedTypes = initialTypes;

-        shell.dispose();

-      }

-    });

-

-    int width = 300;

-    int height = 400;

-    shell.setSize(width, height);

-    shell.setMinimumSize(300, 300);

-    shell.setLocation((Toolkit.getDefaultToolkit().getScreenSize().width - width) / 2, (Toolkit

-            .getDefaultToolkit().getScreenSize().height - height) / 2);

-    shell.setLayout(new FillLayout());

-    shell.layout();

-

-  }

-

-  protected Label createWideLabel(Composite parent, String message) {

-    Label label = null;

-    label = new Label(parent, SWT.WRAP);

-    label.setText(null != message ? message : "");

-    GridData data = new GridData(GridData.FILL_HORIZONTAL);

-    data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);

-    data.verticalAlignment = SWT.CENTER;

-    label.setLayoutData(data);

-    return label;

-  }

-

-  protected Text newText(Composite parent, int style, String tip) {

-    Text t = new Text(parent, style | SWT.BORDER);

-    t.setToolTipText(tip);

-    t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    t.addListener(SWT.KeyUp, this);

-    t.addListener(SWT.MouseUp, this);

-    return t;

-  }

-

-  protected Table newTable(Composite parent, int style) {

-    Table table = new Table(parent, style | SWT.BORDER | SWT.MULTI);

-    GridData gd = new GridData(GridData.FILL_BOTH);

-    table.setLayoutData(gd);

-    table.addListener(SWT.Selection, this);

-    table.addListener(SWT.KeyUp, this);

-    return table;

-  }

-

-  private void displayFilteredTypes(String aTypeName) {

-    list.setRedraw(false);

-    list.removeAll();

-    String topEntry = "";

-    aTypeName = aTypeName.toLowerCase();

-    for (String type : allTypes) {

-      String candidateTypeName = type.toLowerCase();

-      if (StringUtils.isBlank(aTypeName)

-              || candidateTypeName.toLowerCase().indexOf(aTypeName.toLowerCase()) != -1) {

-

-        if (StringUtils.isEmpty(topEntry)) {

-          topEntry = type;

-        }

-        TableItem item = new TableItem(list, SWT.NULL);

-        item.setText(type);

-        if (selectedTypes.contains(item.getText())) {

-          item.setChecked(true);

-        }

-

-      }

-    }

-    list.setRedraw(true);

-  }

-

-  public void handleEvent(Event event) {

-    if (event.widget == typeNameUI && event.type == SWT.Modify) {

-      displayFilteredTypes(typeNameUI.getText());

-    } else if (event.widget == list) {

-      Widget item = event.item;

-      if (item instanceof TableItem) {

-        TableItem ti = (TableItem) item;

-        TableItem[] selection = list.getSelection();

-        for (TableItem tableItem : selection) {

-          if (tableItem != ti) {

-            if (ti.getChecked()) {

-              tableItem.setChecked(true);

-              selectedTypes.add(tableItem.getText());

-            } else {

-              selectedTypes.remove(tableItem.getText());

-              tableItem.setChecked(false);

-            }

-          }

-        }

-        if (ti.getChecked()) {

-          selectedTypes.add(ti.getText());

-        } else {

-          selectedTypes.remove(ti.getText());

-        }

-      }

-    }

-  }

-

-  public boolean isValid() {

-    return true;

-  }

-

-  public List<String> getSelectedTypes() {

-    return selectedTypes;

-  }

-

-  public void setSelectedTypes(List<String> selectedTypes) {

-    this.selectedTypes = selectedTypes;

-  }

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/update/ConvertProjectHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/update/ConvertProjectHandler.java
deleted file mode 100644
index a268b6f..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/update/ConvertProjectHandler.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*

- * 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.ruta.utils.update;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.ui.wizards.RutaProjectCreationWizard;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.utils.ResourceUtil;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class ConvertProjectHandler implements IHandler {

-

-  private class ConvertProjectHandlerJob extends Job {

-    ExecutionEvent event;

-

-    ConvertProjectHandlerJob(ExecutionEvent event) {

-      super("Converting...");

-      this.event = event;

-      setUser(true);

-    }

-

-    @Override

-    public IStatus run(IProgressMonitor monitor) {

-      List<IProject> projects = new ArrayList<IProject>();

-      final ISelection currentSelection = HandlerUtil.getCurrentSelection(event);

-      if (currentSelection instanceof IStructuredSelection) {

-        StructuredSelection selection = (StructuredSelection) currentSelection;

-        Iterator<?> iter = selection.iterator();

-        while (iter.hasNext()) {

-          Object object = iter.next();

-          if (object instanceof IScriptProject) {

-            IScriptProject p = (IScriptProject) object;

-            projects.add(p.getProject());

-          } else if (object instanceof IProject) {

-            projects.add((IProject) object);

-          }

-        }

-      }

-      monitor.beginTask("Converting to UIMA Ruta project...", projects.size());

-      for (IProject each : projects) {

-        try {

-          IScriptProject scriptProject = DLTKCore.create(each);

-          ResourceUtil.addNature(each, monitor, RutaNature.NATURE_ID);

-          RutaProjectCreationWizard.createRutaProject(scriptProject, null, monitor);

-        } catch (CoreException e) {

-          RutaAddonsPlugin.error(e);

-        }

-      }

-      monitor.done();

-      return Status.OK_STATUS;

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    new ConvertProjectHandlerJob(event).schedule();

-    return Status.OK_STATUS;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/update/UpdateProjectHandler.java b/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/update/UpdateProjectHandler.java
deleted file mode 100644
index a237640..0000000
--- a/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/update/UpdateProjectHandler.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*

- * 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.ruta.utils.update;

-

-import java.io.File;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.addons.RutaAddonsPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.ide.ui.wizards.RutaProjectCreationWizard;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IProjectDescription;

-import org.eclipse.core.resources.IProjectNature;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-public class UpdateProjectHandler implements IHandler {

-

-  private class ConverterHandlerJob extends Job {

-    ExecutionEvent event;

-

-    ConverterHandlerJob(ExecutionEvent event) {

-      super("Updating...");

-      this.event = event;

-      setUser(true);

-    }

-

-    @Override

-    public IStatus run(IProgressMonitor monitor) {

-      List<IProject> projects = new ArrayList<IProject>();

-      final ISelection currentSelection = HandlerUtil.getCurrentSelection(event);

-      if (currentSelection instanceof IStructuredSelection) {

-        StructuredSelection selection = (StructuredSelection) currentSelection;

-        Iterator<?> iter = selection.iterator();

-        while (iter.hasNext()) {

-          Object object = iter.next();

-          if (object instanceof IScriptProject) {

-            IScriptProject p = (IScriptProject) object;

-            projects.add(p.getProject());

-          } else if (object instanceof IProject) {

-            projects.add((IProject) object);

-          }

-        }

-      }

-      monitor.beginTask("Updating UIMA Ruta project...", projects.size());

-      for (IProject each : projects) {

-        // update old projects

-        try {

-          IProjectDescription description = each.getDescription();

-          String[] natureIds = description.getNatureIds();

-          int counter = 0;

-          boolean oldProject = false;

-          for (String id : Arrays.asList(natureIds)) {

-            if (id.equals("org.apache.uima.textmarker.ide.nature")) {

-              natureIds[counter] = RutaNature.NATURE_ID;

-              oldProject = true;

-            }

-            counter++;

-          }

-          if (oldProject) {

-            description.setNatureIds(natureIds);

-            each.setDescription(description, monitor);

-            List<File> files = getFiles(new File(each.getLocation().toPortableString()));

-            for (File file : files) {

-              String absolutePath = file.getAbsolutePath();

-              if (file.getName().endsWith(".tm")) {

-                File newFile = new File(absolutePath.substring(0, absolutePath.length() - 3)

-                        + ".ruta");

-                file.renameTo(newFile);

-              }

-            }

-            IScriptProject sp = DLTKCore.create(each);

-            List<IFolder> scriptFolders = RutaProjectUtils.getScriptFolders(sp);

-            for (IFolder iFolder : scriptFolders) {

-              iFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);

-            }

-          }

-        } catch (CoreException e) {

-          RutaAddonsPlugin.error(e);

-        }

-

-        try {

-          IProjectNature nature = each.getNature(RutaNature.NATURE_ID);

-          if (nature != null) {

-            List<IFolder> descriptorFolders = RutaProjectUtils.getDescriptorFolders(each);

-            if (descriptorFolders != null && !descriptorFolders.isEmpty()) {

-              IFolder descFolder = descriptorFolders.get(0);

-              RutaProjectCreationWizard.copyDescriptors(descFolder);

-              descFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);

-            }

-          }

-        } catch (CoreException e) {

-          RutaAddonsPlugin.error(e);

-        }

-        monitor.worked(1);

-      }

-      monitor.done();

-      return Status.OK_STATUS;

-    }

-  }

-

-  public void addHandlerListener(IHandlerListener handlerListener) {

-  }

-

-  public void dispose() {

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    new ConverterHandlerJob(event).schedule();

-    return Status.OK_STATUS;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  private static List<File> getFiles(File dir) {

-    List<File> result = new ArrayList<File>();

-    for (File each : dir.listFiles()) {

-      if (each.isHidden()) {

-        continue;

-      }

-      if (each.getName().endsWith(".tm")) {

-        result.add(each);

-      }

-      if (each.isDirectory()) {

-        result.addAll(getFiles(each));

-      }

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-addons/src/main/readme_bin/LICENSE b/trunk/ruta-ep-addons/src/main/readme_bin/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-addons/src/main/readme_bin/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-addons/src/main/readme_src/META-INF/LICENSE b/trunk/ruta-ep-addons/src/main/readme_src/META-INF/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-addons/src/main/readme_src/META-INF/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-caseditor/icons/lightbulb_add.png b/trunk/ruta-ep-caseditor/icons/lightbulb_add.png
deleted file mode 100644
index 0dd848b..0000000
--- a/trunk/ruta-ep-caseditor/icons/lightbulb_add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-caseditor/icons/lightbulb_off.png b/trunk/ruta-ep-caseditor/icons/lightbulb_off.png
deleted file mode 100644
index e95b8c5..0000000
--- a/trunk/ruta-ep-caseditor/icons/lightbulb_off.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-caseditor/icons/views.png b/trunk/ruta-ep-caseditor/icons/views.png
deleted file mode 100644
index 9757fc6..0000000
--- a/trunk/ruta-ep-caseditor/icons/views.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-caseditor/marker-file-identifying-eclipse-plugin b/trunk/ruta-ep-caseditor/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-ep-caseditor/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/ruta-ep-caseditor/plugin.xml b/trunk/ruta-ep-caseditor/plugin.xml
deleted file mode 100644
index 86a2436..0000000
--- a/trunk/ruta-ep-caseditor/plugin.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?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.

--->

-<?eclipse version="3.4"?>

-<plugin>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            category="org.apache.uima.caseditor.ui.views"

-            class="org.apache.uima.ruta.caseditor.view.selection.SelectionView"

-            icon="icons/views.png"

-            id="org.apache.uima.caseditor.selection"

-            name="Selection View">

-      </view>

-      <view

-            category="org.apache.uima.caseditor.ui.views"

-            class="org.apache.uima.ruta.caseditor.view.browser.AnnotationBrowserView"

-            icon="icons/views.png"

-            id="org.apache.uima.caseditor.browser"

-            name="Annotation Browser View">

-      </view>

-   </extension>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            category="org.apache.uima.caseditor.ui.views"

-            class="org.apache.uima.ruta.caseditor.view.html.HtmlView"

-            id="org.apache.uima.caseditor.html"

-            icon="icons/views.png"

-            name="Html View"

-            restorable="true">

-      </view>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-         <page

-           category="org.apache.uima.caseditor.ide.CasEditorPreference"

-           class="org.apache.uima.ruta.caseditor.view.preferences.CasEditorViewPreferencePage"

-           id="org.apache.uima.ruta.caseditor.view.preferences"

-           name="Cas Editor Views">

-     </page>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-         <page

-           category="org.apache.uima.caseditor.ide.CasEditorPreference"

-           class="org.apache.uima.ruta.caseditor.view.html.HtmlViewPreferencePage"

-           id="org.apache.uima.ruta.caseditor.view.html.preferences"

-           name="Cas Editor Html View">

-     </page>

-   </extension>

-   <extension

-         point="org.eclipse.core.runtime.preferences">

-    <initializer

-          class="org.apache.uima.ruta.caseditor.view.preferences.CasEditorViewPreferenceInitializer">

-    </initializer>

-   </extension>

-</plugin>

diff --git a/trunk/ruta-ep-caseditor/pom.xml b/trunk/ruta-ep-caseditor/pom.xml
deleted file mode 100644
index add7d55..0000000
--- a/trunk/ruta-ep-caseditor/pom.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-<?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.    

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-ep-caseditor</artifactId>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-  </properties>

-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <url>${uimaWebsiteUrl}</url>

-  <description>Provides additional views for the CAS Editor</description>

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-ep-caseditor</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-caseditor</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-caseditor</developerConnection>

-  </scm>

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimaj-ep-cas-editor</artifactId>

-      <version>${uimaVersion}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>runtime</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>resources</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.swt.win32.win32</groupId>

-      <artifactId>x86</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>ide</artifactId>

-      <version>[3.3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>views</artifactId>

-      <version>[3.3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui.workbench</groupId>

-      <artifactId>texteditor</artifactId>

-      <version>[3.3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>workbench</artifactId>

-      <version>[3.3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jface</groupId>

-      <artifactId>text</artifactId>

-      <version>[3.3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>app</artifactId>

-      <version>[1.3.0,2.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

-    </dependency>

-  </dependencies>

-

-  <build>

-    <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

-    <finalName>org.apache.uima.ruta.caseditor_${parsedVersion.osgiVersion}</finalName>

-    <resources>

-      <resource>

-        <directory>.</directory>

-        <includes>

-          <include>plugin.xml</include>

-          <include>icons/**/*.*</include>

-        </includes>

-      </resource>

-      <resource>

-        <directory>src/main/resources</directory>

-      </resource>

-      <resource>

-        <directory>src/main/readme_src</directory>

-      </resource>

-    </resources>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>release.properties</exclude> <!-- release generated artifact -->

-                  <exclude>src/test/resources/ManualTests/*</exclude> <!-- test data -->

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>issuesFixed/**</exclude>

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-

-    <plugins>

-      <plugin>

-        <groupId>org.apache.felix</groupId>

-        <artifactId>maven-bundle-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>uima-bundle</id>

-            <configuration>

-              <instructions>

-                <Bundle-SymbolicName>org.apache.uima.ruta.caseditor;singleton:=true</Bundle-SymbolicName>

-                <Bundle-Activator>org.apache.uima.ruta.caseditor.RutaCasEditorPlugin</Bundle-Activator>

-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>

-                <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>

-                <_nouses>true</_nouses>

-                <Export-Package>

-                  org.apache.uima.ruta.caseditor.*

-                </Export-Package>

-                <Require-Bundle>

-                  org.eclipse.jface.text,

-                  org.eclipse.text,

-                  org.eclipse.ui.editors,

-                  org.eclipse.ui.workbench.texteditor,

-                  org.eclipse.ui,

-                  org.eclipse.ui.ide,

-                  org.eclipse.ui.workbench,

-                  org.eclipse.core.runtime,

-                  org.eclipse.core.resources,

-                  org.apache.uima.caseditor.ide,

-                  org.junit4;bundle-version="4.5.0";resolution:=optional

-                </Require-Bundle>

-                <Import-Package>

-                  !org.eclipse.ui,

-                  !org.eclipse.ui.part,

-                  !org.eclipse.core.runtime,

-                  *

-                </Import-Package>

-              </instructions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-

-    </plugins>

-  </build>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/RutaCasEditorPlugin.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/RutaCasEditorPlugin.java
deleted file mode 100644
index 3a55098..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/RutaCasEditorPlugin.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.caseditor;

-

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.ui.plugin.AbstractUIPlugin;

-import org.osgi.framework.BundleContext;

-

-/**

- * The activator class controls the plug-in life cycle

- */

-public class RutaCasEditorPlugin extends AbstractUIPlugin {

-

-  // The plug-in ID

-  public static final String PLUGIN_ID = "org.apache.uima.ruta.caseditor"; //$NON-NLS-1$

-

-  // The shared instance

-  private static RutaCasEditorPlugin plugin;

-

-  /**

-   * The constructor

-   */

-  public RutaCasEditorPlugin() {

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

-   */

-  public void start(BundleContext context) throws Exception {

-    super.start(context);

-    plugin = this;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

-   */

-  public void stop(BundleContext context) throws Exception {

-    plugin = null;

-    super.stop(context);

-  }

-

-  /**

-   * Returns the shared instance

-   * 

-   * @return the shared instance

-   */

-  public static RutaCasEditorPlugin getDefault() {

-    return plugin;

-  }

-

-  public static void error(String message, Throwable t) {

-    plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, t));

-  }

-

-  public static void error(Throwable t) {

-    error(t.getMessage(), t);

-  }

-

-  public static ImageDescriptor getImageDescriptor(String path) {

-    return imageDescriptorFromPlugin(PLUGIN_ID, path);

-  }

-

-  

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/browser/AnnotationBrowserView.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/browser/AnnotationBrowserView.java
deleted file mode 100644
index f7fd114..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/browser/AnnotationBrowserView.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.ruta.caseditor.view.browser;
-
-import org.apache.uima.caseditor.editor.AnnotationEditor;
-import org.apache.uima.caseditor.editor.CasEditorView;
-import org.apache.uima.caseditor.editor.ICasEditor;
-import org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeViewPage;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-public class AnnotationBrowserView extends CasEditorView {
-  public static final String ID = "org.apache.uima.caseditor.browser";
-
-  private AnnotationTreeViewPage page;
-
-  public AnnotationBrowserView() {
-    super("The instance view is currently not available.");
-  }
-
-  @Override
-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {
-    IPageBookViewPage result = null;
-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {
-      page = new AnnotationTreeViewPage(false, (AnnotationEditor) editor);
-      initPage(page);
-      page.createControl(getPageBook());
-      result = page;
-    }
-    return result;
-  }
-
-  public AnnotationTreeViewPage getAnnotationTreeViewPage() {
-    return page;
-  }
-
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlView.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlView.java
deleted file mode 100644
index 000899c..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlView.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.caseditor.view.html;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-public class HtmlView extends CasEditorView {

-

-	public static final String ID = "org.apache.uima.caseditor.html";

-

-	public static final String HTML_SOURCE = "org.apache.uima.caseditor.html.source";

-	

-	public HtmlView() {

-		super("The instance view is currently not available.");

-	}

-

-	protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-		IPageBookViewPage result = null;

-		if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-			HtmlViewPage page = new HtmlViewPage((AnnotationEditor) editor);

-			result = page;

-		}

-		return result;

-	}

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlViewPage.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlViewPage.java
deleted file mode 100644
index 2e24c9d..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlViewPage.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*

- * 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.ruta.caseditor.view.html;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.IOException;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.ICasDocument;

-import org.apache.uima.caseditor.editor.ICasEditorInputListener;

-import org.apache.uima.resource.ResourceInitializationException;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.resource.metadata.impl.TypeSystemDescription_impl;

-import org.apache.uima.ruta.caseditor.RutaCasEditorPlugin;

-import org.apache.uima.util.CasCreationUtils;

-import org.apache.uima.util.FileUtils;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.ISelectionChangedListener;

-import org.eclipse.jface.viewers.ISelectionProvider;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.browser.Browser;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IEditorInput;

-import org.eclipse.ui.part.FileEditorInput;

-import org.eclipse.ui.part.IPageSite;

-import org.eclipse.ui.part.Page;

-import org.xml.sax.SAXException;

-

-public class HtmlViewPage extends Page implements ICasEditorInputListener {

-

-  private AnnotationEditor editor;

-

-  private Browser browser;

-

-  public HtmlViewPage(AnnotationEditor editor) {

-    super();

-    this.editor = editor;

-  }

-

-  @Override

-  public void init(IPageSite pageSite) {

-    super.init(pageSite);

-  }

-

-  @Override

-  public void createControl(Composite parent) {

-    Composite composite = parent;

-

-    browser = new Browser(composite, SWT.NONE);

-    updateHtml();

-    getSite().setSelectionProvider(new ISelectionProvider() {

-

-      public void setSelection(ISelection selection) {

-

-      }

-

-      public void removeSelectionChangedListener(ISelectionChangedListener listener) {

-

-      }

-

-      public ISelection getSelection() {

-        return null;

-      }

-

-      public void addSelectionChangedListener(ISelectionChangedListener listener) {

-

-      }

-    });

-    editor.addCasEditorInputListener(this);

-    browser.refresh();

-  }

-

-  @Override

-  public void setFocus() {

-  }

-

-  @Override

-  public void dispose() {

-    browser.dispose();

-    editor.removeCasEditorInputListener(this);

-  }

-

-  public void casDocumentChanged(IEditorInput oldInput, ICasDocument oldDocument,

-          IEditorInput newInput, ICasDocument newDocument) {

-    updateHtml();

-  }

-

-  @Override

-  public Control getControl() {

-    return browser;

-  }

-

-  private void updateHtml() {

-    if (editor == null) {

-      return;

-    }

-    IPreferenceStore store = RutaCasEditorPlugin.getDefault().getPreferenceStore();

-    String htmlSource = store.getString(HtmlView.HTML_SOURCE);

-    if (StringUtils.isBlank(htmlSource)) {

-      setHtmlWithEditor();

-    } else {

-      IEditorInput editorInput = editor.getEditorInput();

-      if (editorInput instanceof FileEditorInput) {

-        FileEditorInput fei = (FileEditorInput) editorInput;

-        String name = fei.getFile().getName();

-        String[] split = name.split("[.]");

-        File dir = new File(htmlSource);

-        File[] listFiles = dir.listFiles();

-        File selected = null;

-        for (File file : listFiles) {

-          String[] split2 = file.getName().split("[.]");

-          if(split[0].equals(split2[0])) {

-            selected = file;

-            break;

-          }

-        }

-        if(selected == null) {

-          setHtmlWithEditor();

-          return;

-        }

-        try {

-          String html = "";

-          if (selected.getName().endsWith(".html") || selected.getName().endsWith(".txt")) {

-            html = FileUtils.file2String(selected);

-          } else if(selected.getName().endsWith(".xmi")){

-            try {

-              TypeSystemDescription tsd = new TypeSystemDescription_impl();

-              CAS dummyCas = CasCreationUtils.createCas(tsd, null, null);

-              XmiCasDeserializer.deserialize(new FileInputStream(selected), dummyCas, true);

-              html = dummyCas.getDocumentText();

-              dummyCas.release();

-            } catch (ResourceInitializationException e) {

-              RutaCasEditorPlugin.error(e);

-            } catch (SAXException e) {

-              RutaCasEditorPlugin.error(e);

-            }

-          }

-          browser.setText(html);

-          browser.refresh();

-        } catch (IOException e) {

-          RutaCasEditorPlugin.error(e);

-        }

-      }

-    }

-  }

-

-  private void setHtmlWithEditor() {

-    CAS cas = editor.getDocument().getCAS();

-    String html = cas.getDocumentText();

-    browser.setText(html);

-    browser.refresh();

-  }

-

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlViewPreferencePage.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlViewPreferencePage.java
deleted file mode 100644
index 3254024..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlViewPreferencePage.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.caseditor.view.html;

-

-import org.apache.uima.ruta.caseditor.RutaCasEditorPlugin;

-import org.eclipse.jface.preference.FieldEditorPreferencePage;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class HtmlViewPreferencePage extends FieldEditorPreferencePage implements

-        IWorkbenchPreferencePage {

-  

-  private StringFieldEditor htmlSource;

-

-  public HtmlViewPreferencePage() {

-    setPreferenceStore(RutaCasEditorPlugin.getDefault().getPreferenceStore());

-    setDescription("Html View Preferences.");

-  }

-

-  @Override

-  protected void createFieldEditors() {

-    htmlSource = new StringFieldEditor(HtmlView.HTML_SOURCE,

-            "Html source: ", getFieldEditorParent());

-    addField(htmlSource);

-

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewPreferenceInitializer.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewPreferenceInitializer.java
deleted file mode 100644
index 5033d74..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewPreferenceInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.caseditor.view.preferences;

-

-import org.apache.uima.ruta.caseditor.RutaCasEditorPlugin;

-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class CasEditorViewPreferenceInitializer extends AbstractPreferenceInitializer {

-  

-  public void initializeDefaultPreferences() {

-    IPreferenceStore store = RutaCasEditorPlugin.getDefault().getPreferenceStore();

-    store.setDefault(CasEditorViewsPreferenceConstants.SHOW_PARENT_TYPES, false);

-  }

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewPreferencePage.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewPreferencePage.java
deleted file mode 100644
index 2b28551..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewPreferencePage.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta.caseditor.view.preferences;

-

-import org.apache.uima.ruta.caseditor.RutaCasEditorPlugin;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditorPreferencePage;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class CasEditorViewPreferencePage extends FieldEditorPreferencePage implements

-        IWorkbenchPreferencePage {

-private BooleanFieldEditor showParentTypes;

-  

-  public CasEditorViewPreferencePage() {

-    setPreferenceStore(RutaCasEditorPlugin.getDefault().getPreferenceStore());

-    setDescription("Cas Editor Ruta Views Preferences.");

-  }

-  

-

-  @Override

-  protected void createFieldEditors() {

-   

-    // should the editor use the last selected type system to open the cas?

-    showParentTypes = new BooleanFieldEditor(CasEditorViewsPreferenceConstants.SHOW_PARENT_TYPES,

-            "Display parent types", getFieldEditorParent());

-    addField(showParentTypes);

-    

-    

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-  

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewsPreferenceConstants.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewsPreferenceConstants.java
deleted file mode 100644
index fef5a0f..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/preferences/CasEditorViewsPreferenceConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.caseditor.view.preferences;

-

-public class CasEditorViewsPreferenceConstants {

-

-  public static final String SHOW_PARENT_TYPES = "showParentTypes";

-

-  public static final String SHOW_TYPES_WITHOUT_ANNOTATIONS = "showTypesWithoutAnnotations";

-

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/selection/SelectionView.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/selection/SelectionView.java
deleted file mode 100644
index 29a3468..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/selection/SelectionView.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.caseditor.view.selection;

-

-import org.apache.uima.caseditor.editor.AnnotationEditor;

-import org.apache.uima.caseditor.editor.CasEditorView;

-import org.apache.uima.caseditor.editor.ICasEditor;

-import org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeViewPage;

-import org.eclipse.ui.part.IPageBookViewPage;

-

-/**

- */

-public final class SelectionView extends CasEditorView {

-

-  public static final String ID = "org.apache.uima.caseditor.selection";

-

-  public SelectionView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      AnnotationTreeViewPage page = new AnnotationTreeViewPage(true, (AnnotationEditor) editor);

-      result = page;

-    }

-    return result;

-  }

-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AbstractTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AbstractTreeNode.java
deleted file mode 100644
index 09d9130..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AbstractTreeNode.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-public abstract class AbstractTreeNode implements ITreeNode {
-
-  private ITreeNode parent;
-
-  private ArrayList<ITreeNode> children;
-
-  public AbstractTreeNode() {
-    this(null);
-  }
-
-  public AbstractTreeNode(ITreeNode parent) {
-    this.parent = parent;
-    children = new ArrayList<ITreeNode>();
-  }
-
-  public void addChild(ITreeNode child) {
-    children.add(child);
-  }
-
-  public ITreeNode[] getChildren() {
-    return children.toArray(new ITreeNode[] {});
-  }
-
-  public Iterator<ITreeNode> getChildrenIterator() {
-    return children.iterator();
-  }
-
-  public ITreeNode getParent() {
-    return parent;
-  }
-
-  public boolean hasChildren() {
-    return children.size() > 0;
-  }
-
-  public void getNodes(LinkedList<ITreeNode> list) {
-    Iterator<ITreeNode> iter = getChildrenIterator();
-
-    while (iter.hasNext()) {
-      ITreeNode node = iter.next();
-
-      list.add(node);
-
-      node.getNodes(list);
-    }
-  }
-
-  public void sort(Comparator<ITreeNode> cp) {
-    Collections.sort(children, cp);
-  }
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeContentProvider.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeContentProvider.java
deleted file mode 100644
index ef31ed6..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeContentProvider.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.Collection;
-
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.caseditor.editor.AbstractAnnotationDocumentListener;
-import org.apache.uima.caseditor.editor.AnnotationEditor;
-import org.apache.uima.caseditor.editor.ICasDocument;
-import org.apache.uima.caseditor.editor.ICasEditorInputListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-
-public class AnnotationTreeContentProvider extends AbstractAnnotationDocumentListener implements
-        ITreeContentProvider, ICasEditorInputListener {
-
-  private ICasDocument document;
-
-  private final AnnotationTreeViewPage page;
-
-  private AnnotationEditor editor;
-
-  public AnnotationTreeContentProvider(AnnotationEditor editor, AnnotationTreeViewPage page) {
-    super();
-    this.editor = editor;
-    this.document = editor.getDocument();
-    this.page = page;
-    editor.addCasEditorInputListener(this);
-  }
-
-  public void dispose() {
-    document.removeChangeListener(this);
-    editor.removeCasEditorInputListener(this);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang. Object)
-   */
-  public Object[] getChildren(Object element) {
-    if (element instanceof ITreeNode)
-      return ((ITreeNode) element).getChildren();
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object )
-   */
-  public Object getParent(Object element) {
-    if (element instanceof ITreeNode)
-      return ((ITreeNode) element).getParent();
-
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang. Object)
-   */
-  public boolean hasChildren(Object element) {
-    return (element instanceof ITreeNode) && ((ITreeNode) element).hasChildren();
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java .lang.Object)
-   */
-  public Object[] getElements(Object inputElement) {
-    if (inputElement instanceof IRootTreeNode)
-      return ((IRootTreeNode) inputElement).getChildren();
-
-    return null;
-  }
-
-  public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-    // changed();
-  }
-
-  @Override
-  public void changed() {
-    Display.getDefault().syncExec(new Runnable() {
-      public void run() {
-        page.reloadTree();
-      }
-    });
-  }
-
-  @Override
-  public void viewChanged(String oldViewName, String newViewName) {
-    changed();
-  }
-
-  @Override
-  protected void addedAnnotation(Collection<AnnotationFS> annotations) {
-    changed();
-  }
-
-  @Override
-  protected void removedAnnotation(Collection<AnnotationFS> annotations) {
-    changed();
-  }
-
-  @Override
-  protected void updatedAnnotation(Collection<AnnotationFS> annotations) {
-    changed();
-  }
-
-
-  public void casDocumentChanged(IEditorInput oldInput, ICasDocument oldDocument,
-          IEditorInput newInput, ICasDocument newDocument) {
-//    document.removeChangeListener(this);
-//    document = newDocument;
-//    document.addChangeListener(this);
-//    changed();
-  }
-
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeLabelProvider.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeLabelProvider.java
deleted file mode 100644
index fa182e9..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeLabelProvider.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-public class AnnotationTreeLabelProvider extends LabelProvider implements ILabelProvider {
-
-  private AnnotationTreeViewPage page;
-
-  public AnnotationTreeLabelProvider(AnnotationTreeViewPage page) {
-    this.page = page;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
-   */
-  @Override
-  public Image getImage(Object element) {
-    if (element instanceof TypeTreeNode) {
-      return page.getIcon(((TypeTreeNode) element).getType());
-    } else if (element instanceof FSTreeNode) {
-      return page.getIcon(((FSTreeNode) element).getType());
-    }
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
-   */
-  @Override
-  public String getText(Object element) {
-
-    String text = "";
-
-    if (element instanceof ITreeNode) {
-
-      String name = ((ITreeNode) element).getName();
-
-      if (name != null) {
-        // TODO reactive html stuff
-        // name = ParserUtils.trimSpacesBeginEnd(
-        // ParserUtils.trimAllTags(Translate.decode(name), false), "");
-        name = name.replaceAll("[\\n]", "").replaceAll("[\\r]", "");
-      }
-      if (element instanceof TypeTreeNode) {
-        text += TextUtils.shrinkNamespace(name);
-      } else if (name != null) {
-        text += name;
-      }
-      if (element instanceof AnnotationTreeNode) {
-        ITreeNode parent = ((AnnotationTreeNode) element).getParent();
-        if (parent instanceof TypeTreeNode) {
-          text = name;
-        } else if (parent instanceof AnnotationTreeNode) {
-          text = ((AnnotationTreeNode) element).getType().getShortName() + ": " + name;
-        }
-      } else if (element instanceof TypeTreeNode) {
-        text += " [" + ((TypeTreeNode) element).getChildren().length + "]";
-      } else {
-      }
-    }
-
-    return text;
-  }
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeNode.java
deleted file mode 100644
index a411e2a..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeNode.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.Stack;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.eclipse.core.runtime.IAdaptable;
-
-public class AnnotationTreeNode extends FSTreeNode implements IAnnotationNode, IAdaptable {
-
-
-  public AnnotationTreeNode(ITreeNode parent, AnnotationFS annotation) {
-    super(parent, annotation);
-  }
-  
-  public AnnotationTreeNode(ITreeNode parent, AnnotationFS annotation, Stack<Type> parentTypes) {
-    super(parent, annotation, parentTypes);
-  }
-
-  public AnnotationFS getAnnotation() {
-    return (AnnotationFS) fs;
-  }
-
-  @Override
-  public String getName() {
-    return getAnnotation().getCoveredText();
-  }
-
-  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-
-    if (FSTreeNode.class.equals(adapter)) {
-      return this;
-    } else if (AnnotationFS.class.equals(adapter) || FeatureStructure.class.equals(adapter)) {
-      return fs;
-
-    }
-
-    return null;
-  }
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewDragListener.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewDragListener.java
deleted file mode 100644
index ded2962..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewDragListener.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * 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.ruta.caseditor.view.tree;

-

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.StructuredViewer;

-import org.eclipse.swt.dnd.DragSourceAdapter;

-import org.eclipse.swt.dnd.DragSourceEvent;

-

-public class AnnotationTreeViewDragListener extends DragSourceAdapter {

-  private StructuredViewer viewer;

-

-  public AnnotationTreeViewDragListener(StructuredViewer viewer) {

-    this.viewer = viewer;

-  }

-

-  public void dragFinished(DragSourceEvent event) {

-    if (!event.doit)

-      return;

-

-  }

-

-  public void dragSetData(DragSourceEvent event) {

-    IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();

-    Object[] list = selection.toList().toArray();

-    for (Object object : list) {

-      if (object instanceof PrimitiveFeatureTreeNode) {

-        event.data = ((PrimitiveFeatureTreeNode) object).getValue();

-      } else if (object instanceof AnnotationTreeNode) {

-        event.data = ((AnnotationTreeNode) object).getAnnotation().getCoveredText();

-      }

-    }

-  }

-

-  public void dragStart(DragSourceEvent event) {

-    event.doit = !viewer.getSelection().isEmpty();

-  }

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java
deleted file mode 100644
index 2004c15..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java
+++ /dev/null
@@ -1,813 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.cas.text.AnnotationIndex;
-import org.apache.uima.caseditor.editor.AnnotationEditor;
-import org.apache.uima.caseditor.editor.AnnotationStyle;
-import org.apache.uima.caseditor.editor.AnnotationStyleChangeListener;
-import org.apache.uima.caseditor.editor.IAnnotationEditorModifyListener;
-import org.apache.uima.caseditor.editor.ICasDocument;
-import org.apache.uima.ruta.caseditor.RutaCasEditorPlugin;
-import org.apache.uima.ruta.caseditor.view.preferences.CasEditorViewsPreferenceConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.PaletteData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPageSite;
-import org.eclipse.ui.part.Page;
-
-public class AnnotationTreeViewPage extends Page implements MouseListener, IDoubleClickListener,
-        Listener, ISelectionListener, ICheckStateListener, IAnnotationEditorModifyListener {
-
-  public static enum ModifyAnnotationOperation {
-    WIDE_L, LOWER_L, WIDE_R, LOWER_R;
-  }
-
-  public class TreeViewAnnotationStyleChangeListener extends AnnotationStyleChangeListener {
-
-    public void annotationStylesChanged(Collection<AnnotationStyle> styles) {
-      for (AnnotationStyle annotationStyle : styles) {
-        String annotation = annotationStyle.getAnnotation();
-        updateIcon(annotation);
-      }
-      if (!treeView.isBusy() && !treeView.getTree().isDisposed()) {
-        treeView.refresh();
-      }
-    }
-
-  }
-
-  private class CheckAllVisibleAction extends Action {
-    @Override
-    public void run() {
-      uncheckAll();
-      checkAllVisible();
-    }
-  }
-
-  private class UncheckAllAction extends Action {
-    @Override
-    public void run() {
-      uncheckAll();
-    }
-  }
-
-  private class ShowTypesWithoutAnnotations extends Action {
-
-    public ShowTypesWithoutAnnotations() {
-      super("Show Types Without Annotations", Action.AS_CHECK_BOX);
-      setChecked(isTreeWithTypesWithoutAnnotations());
-    }
-
-    @Override
-    public void run() {
-      IPreferenceStore preferenceStore = RutaCasEditorPlugin.getDefault().getPreferenceStore();
-      preferenceStore.setValue(CasEditorViewsPreferenceConstants.SHOW_TYPES_WITHOUT_ANNOTATIONS,
-              isChecked());
-      reloadTree();
-    }
-  }
-
-  private CheckboxTreeViewer treeView;
-
-  private AnnotationTreeLabelProvider lableProvider;
-
-  protected Text filterTypeTextField;
-
-  private Map<Type, Image> icons = new HashMap<Type, Image>();
-
-  private Composite overlay;
-
-  protected AnnotationEditor editor;
-
-  protected ICasDocument document;
-
-  private boolean useSelection;
-
-  private Text filterCoveredTextTextField;
-
-  private int offset = -1;
-
-  private TreeViewAnnotationStyleChangeListener styleListener;
-
-  public AnnotationTreeViewPage(boolean useSelection, AnnotationEditor editor) {
-    super();
-    this.useSelection = useSelection;
-    this.editor = editor;
-    this.document = editor.getDocument();
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.ui.part.Page#init(org.eclipse.ui.part.IPageSite)
-   */
-  @Override
-  public void init(IPageSite pageSite) {
-    super.init(pageSite);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.ui.part.Page#createControl(org.eclipse.swt.widgets.Composite)
-   */
-  @Override
-  public void createControl(Composite parent) {
-    this.overlay = new Composite(parent, SWT.NONE);
-
-    final Clipboard clipboard = new Clipboard(Display.getCurrent());
-
-    GridLayout layout = new GridLayout();
-    layout.horizontalSpacing = 0;
-    layout.verticalSpacing = 0;
-    layout.marginWidth = 0;
-    layout.marginHeight = 0;
-    overlay.setLayout(layout);
-
-    KeyListener checkSelectedKeyListener = new KeyAdapter() {
-
-      public void keyPressed(KeyEvent keyEvent) {
-        int keyCode = keyEvent.keyCode;
-        if (keyCode == SWT.CR || keyCode == SWT.LF || keyCode == SWT.KEYPAD_CR) {
-          uncheckAll();
-          checkAllVisible();
-        }
-      }
-    };
-
-    filterTypeTextField = new Text(overlay, SWT.SINGLE | SWT.BORDER);
-    GridData gd = new GridData();
-    gd.grabExcessHorizontalSpace = true;
-    gd.horizontalAlignment = GridData.FILL;
-    gd.horizontalSpan = 1;
-    filterTypeTextField.setLayoutData(gd);
-    filterTypeTextField.setToolTipText("Retain types that contain...");
-    filterTypeTextField.addListener(SWT.KeyUp, this);
-    filterTypeTextField.addListener(SWT.MouseUp, this);
-    filterTypeTextField.addListener(SWT.Modify, this);
-    // TODO only for 3.3 see pom
-    filterTypeTextField.setMessage("Only types with...");
-    filterTypeTextField.addKeyListener(checkSelectedKeyListener);
-
-    filterCoveredTextTextField = new Text(overlay, SWT.SINGLE | SWT.BORDER);
-    GridData gd2 = new GridData();
-    gd2.grabExcessHorizontalSpace = true;
-    gd2.horizontalAlignment = GridData.FILL;
-    gd2.horizontalSpan = 1;
-    filterCoveredTextTextField.setLayoutData(gd2);
-    filterCoveredTextTextField.setToolTipText("Only annotation with...");
-    filterCoveredTextTextField.addListener(SWT.KeyUp, this);
-    filterCoveredTextTextField.addListener(SWT.MouseUp, this);
-    filterCoveredTextTextField.addListener(SWT.Modify, this);
-    // TODO only for 3.3 see pom
-    filterCoveredTextTextField.setMessage("Only annotations with...");
-    filterCoveredTextTextField.addKeyListener(checkSelectedKeyListener);
-
-    treeView = new CheckboxTreeViewer(overlay, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
-    gd = new GridData(GridData.FILL_BOTH);
-    treeView.getTree().setLayoutData(gd);
-    AnnotationTreeContentProvider provider = new AnnotationTreeContentProvider(editor, this);
-    treeView.setContentProvider(provider);
-    document.addChangeListener(provider);
-
-    lableProvider = new AnnotationTreeLabelProvider(this);
-    treeView.setLabelProvider(lableProvider);
-    treeView.addCheckStateListener(this);
-    treeView.addDoubleClickListener(this);
-    treeView.getTree().addMouseListener(this);
-
-    ToolTipListener tl = new ToolTipListener(treeView.getTree());
-
-    treeView.getTree().addListener(SWT.Dispose, tl);
-    treeView.getTree().addListener(SWT.KeyDown, tl);
-    treeView.getTree().addListener(SWT.MouseMove, tl);
-    treeView.getTree().addListener(SWT.MouseHover, tl);
-    int ops = DND.DROP_COPY | DND.DROP_MOVE;
-    Transfer[] transfers = new Transfer[] { TextTransfer.getInstance() };
-    treeView.addDragSupport(ops, transfers, new AnnotationTreeViewDragListener(treeView));
-
-    getTreeViewer().getControl().addKeyListener(new KeyAdapter() {
-
-      @Override
-      public void keyPressed(KeyEvent e) {
-        int keyCode = e.keyCode;
-        // TODO refactor to actions with key bindings: ...
-        //
-        // backspace or delete: delete annotations
-        if (keyCode == SWT.BS || keyCode == SWT.DEL) {
-          deleteSelectedAnnotations();
-        }
-        // ctrl and c: copy type name to clipboard
-        if ((e.stateMask & SWT.CTRL) == SWT.CTRL && keyCode == 'c') {
-          TreeItem[] selection = treeView.getTree().getSelection();
-          if (selection != null && selection.length == 1) {
-            Object obj = selection[0].getData();
-            if (obj instanceof TypeTreeNode) {
-              TypeTreeNode typeTreeNode = (TypeTreeNode) obj;
-              Type type = typeTreeNode.getType();
-              TextTransfer textTransfer = TextTransfer.getInstance();
-              clipboard.setContents(new Object[] { type.getName() },
-                      new Transfer[] { textTransfer });
-            }
-          }
-        }
-        // ctrl and c: copy type name to clipboard:
-        if ((e.stateMask & SWT.CTRL) == SWT.CTRL) {
-          if (keyCode == 'u') {
-            modifyAnnotation(ModifyAnnotationOperation.WIDE_L);
-          } else if (keyCode == 'i') {
-            modifyAnnotation(ModifyAnnotationOperation.LOWER_L);
-          } else if (keyCode == 'o') {
-            modifyAnnotation(ModifyAnnotationOperation.LOWER_R);
-          } else if (keyCode == 'p') {
-            modifyAnnotation(ModifyAnnotationOperation.WIDE_R);
-          }
-        }
-      }
-
-    });
-
-    styleListener = new TreeViewAnnotationStyleChangeListener();
-    editor.getCasDocumentProvider().getTypeSystemPreferenceStore(editor.getEditorInput())
-            .addPropertyChangeListener(styleListener);
-
-    getSite().getPage().addSelectionListener(this);
-    getSite().setSelectionProvider(treeView);
-
-    editor.addAnnotationListener(this);
-    if (!useSelection) {
-      reloadTree();
-
-      // TODO auto-check all
-      // if (RutaCasEditorPlugin.getDefault().getPreferenceStore().getBoolean("AlwaysCheckAll")) {
-      // checkAll();
-      // }
-
-    }
-
-  }
-
-  @Override
-  public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager,
-          IStatusLineManager statusLineManager) {
-    //
-    Action createActionCheckVisible = new CheckAllVisibleAction();
-    createActionCheckVisible
-            .setText("Set all types visible in the Annotation Browser to be highlighted in the CAS editor.");
-    ImageDescriptor imageDescriptor = RutaCasEditorPlugin
-            .getImageDescriptor("/icons/lightbulb_add.png");
-    createActionCheckVisible.setImageDescriptor(imageDescriptor);
-    toolBarManager.add(createActionCheckVisible);
-    //
-    Action createActionUncheckAll = new UncheckAllAction();
-    createActionUncheckAll.setText("Reset type highlighting. No type will be checked.");
-    createActionUncheckAll.setImageDescriptor(RutaCasEditorPlugin
-            .getImageDescriptor("/icons/lightbulb_off.png"));
-    toolBarManager.add(createActionUncheckAll);
-    //
-    if (!useSelection) {
-      IAction showTypesWithoutAnnotations = new ShowTypesWithoutAnnotations();
-      menuManager.add(showTypesWithoutAnnotations);
-    }
-  }
-
-  /**
-   * Unchecks all types of the typesystem so that they are not highlighted anymore.
-   * 
-   * TODO use more efficient implementation since UIMA 2.5.1 setShownAnnotationType!s!
-   */
-  public void uncheckAll() {
-    // Collection<Type> shownAnnotationTypes = new
-    // ArrayList<Type>(editor.getShownAnnotationTypes());
-    // Iterator<Type> typeIterator = shownAnnotationTypes.iterator();
-    // while (typeIterator.hasNext()) {
-    // Type type = (Type) typeIterator.next();
-    // editor.setShownAnnotationType(type, false);
-    // }
-    editor.setShownAnnotationTypes(new LinkedList<Type>());
-    getTreeViewer().getTree().deselectAll();
-  }
-
-  /**
-   * Checks all visible types of the tree to be highlighted.
-   * 
-   * TODO use more efficient implementation since UIMA 2.5.1 setShownAnnotationType!s!
-   */
-  public void checkAllVisible() {
-    TypeSystem ts = editor.getDocument().getCAS().getTypeSystem();
-    Type documentAnnotationType = ts.getType("uima.tcas.DocumentAnnotation");
-    List<Type> selectedTypes = new LinkedList<Type>();
-    for (TreeItem i : getTreeViewer().getTree().getItems()) {
-      Object e = i.getData();
-      if (e instanceof TypeTreeNode) {
-        TypeTreeNode typeTreeNode = (TypeTreeNode) e;
-        Type type = typeTreeNode.getType();
-        if (!documentAnnotationType.equals(type)) {
-          // editor.setShownAnnotationType(type, true);
-          selectedTypes.add(type);
-        }
-      }
-    }
-    editor.setShownAnnotationTypes(selectedTypes);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.ui.part.Page#dispose()
-   */
-  @Override
-  public void dispose() {
-    super.dispose();
-    getSite().getPage().removeSelectionListener(this);
-    editor.removeAnnotationListener(this);
-    editor.getCasDocumentProvider().getTypeSystemPreferenceStore(editor.getEditorInput())
-            .removePropertyChangeListener(styleListener);
-    overlay.dispose();
-    Collection<Image> values = icons.values();
-    for (Image image : values) {
-      image.dispose();
-    }
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.ui.part.Page#getControl()
-   */
-  @Override
-  public Control getControl() {
-    return overlay;
-  }
-
-  public CheckboxTreeViewer getTreeViewer() {
-    return treeView;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.ui.part.Page#setFocus()
-   */
-  @Override
-  public void setFocus() {
-    overlay.setFocus();
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse
-   * .jface.viewers.DoubleClickEvent)
-   */
-  public void doubleClick(DoubleClickEvent event) {
-    if (event.getSelection() != null && event.getSelection() instanceof ITreeSelection) {
-      Object treeNode = ((ITreeSelection) event.getSelection()).getFirstElement();
-      if (treeNode instanceof AnnotationTreeNode) {
-        // FeatureStructureSelectionProvider provider =
-        // ((FeatureStructureSelectionProvider)editor.getSelectionProvider();
-      } else if (treeNode instanceof TypeTreeNode) {
-        editor.setAnnotationMode(((TypeTreeNode) treeNode).getType());
-      }
-    }
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt .events.MouseEvent)
-   */
-  public void mouseDoubleClick(MouseEvent e) {
-    // TODO
-
-  }
-
-  public void modifyAnnotation(ModifyAnnotationOperation operationType) {
-    TreeItem[] items = treeView.getTree().getSelection();
-    if (items.length != 1) {
-      return;
-    }
-    Feature beginFeature = document.getCAS().getBeginFeature();
-    Feature endFeature = document.getCAS().getEndFeature();
-    for (TreeItem it : items) {
-      if (it.getData() instanceof AnnotationTreeNode) {
-        AnnotationTreeNode annot = (AnnotationTreeNode) it.getData();
-        AnnotationFS fs = annot.getAnnotation();
-        switch (operationType) {
-          case WIDE_L:
-            if (fs.getBegin() > 0) {
-              fs.setIntValue(beginFeature, fs.getBegin() - 1);
-            }
-            break;
-          case LOWER_L:
-            if (fs.getBegin() < fs.getEnd() - 1) {
-              fs.setIntValue(beginFeature, fs.getBegin() + 1);
-            }
-            break;
-          case LOWER_R:
-            if (fs.getEnd() > fs.getBegin() + 1) {
-              fs.setIntValue(endFeature, fs.getEnd() - 1);
-            }
-            break;
-          case WIDE_R:
-            if (fs.getEnd() < fs.getCAS().getDocumentText().length()) {
-              fs.setIntValue(endFeature, fs.getEnd() + 1);
-            }
-            break;
-          default:
-            break;
-        }
-        document.update(fs);
-      }
-    }
-  }
-
-  public void deleteSelectedAnnotations() {
-    if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Confirm Delete",
-            "Are you sure you want to delete these items?")) {
-
-      TreeItem[] items = treeView.getTree().getSelection();
-      HashSet<AnnotationFS> annots = new HashSet<AnnotationFS>();
-
-      for (TreeItem it : items) {
-        if (it.getData() instanceof AnnotationTreeNode) {
-          AnnotationTreeNode annot = (AnnotationTreeNode) it.getData();
-          annots.add(annot.getAnnotation());
-        } else if (it.getData() instanceof TypeTreeNode) {
-          TypeTreeNode type = (TypeTreeNode) it.getData();
-
-          for (Object child : type.getChildren()) {
-            if (child instanceof AnnotationTreeNode) {
-              AnnotationTreeNode annot = (AnnotationTreeNode) child;
-              annots.add(annot.getAnnotation());
-            }
-          }
-        }
-      }
-      editor.getDocument().removeFeatureStructures(annots);
-    }
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events .MouseEvent)
-   */
-  public void mouseDown(final MouseEvent mouseEvent) {
-    // TODO popup menu deactivated
-    // if (mouseEvent.button == 3) {
-    // Display display = Display.getCurrent();
-    // Menu menu = new Menu(display.getActiveShell(), SWT.POP_UP);
-    // MenuItem itemFgC = new MenuItem(menu, SWT.PUSH);
-    //
-    // itemFgC.setText("Change Font Color");
-    // itemFgC.addListener(SWT.Selection, new Listener() {
-    // public void handleEvent(Event e) {
-    // TreeItem item = treeView.getTree().getItem(new Point(mouseEvent.x, mouseEvent.y));
-    //
-    // if (item != null && item.getData() instanceof ITreeNode) {
-    // Type type = ((ITreeNode) item.getData()).getType();
-    // ColorDialog cd = new ColorDialog(Display.getCurrent().getActiveShell());
-    // cd.setRGB(casData.getForegroundColor(type).getRGB());
-    //
-    // RGB rgb = cd.open();
-    //
-    // if (rgb != null)
-    // casData.setForegroundColor(type, new Color(Display.getCurrent(), rgb));
-    // }
-    // }
-    // });
-    //
-    // MenuItem itemBgC = new MenuItem(menu, SWT.PUSH);
-    // itemBgC.setText("Change Background Color");
-    // itemBgC.addListener(SWT.Selection, new Listener() {
-    // public void handleEvent(Event e) {
-    // TreeItem item = treeView.getTree().getItem(new Point(mouseEvent.x, mouseEvent.y));
-    //
-    // if (item != null && item.getData() instanceof ITreeNode) {
-    // Type type = ((ITreeNode) item.getData()).getType();
-    //
-    // ColorDialog cd = new ColorDialog(Display.getCurrent().getActiveShell());
-    // cd.setRGB(casData.getBackgroundColor(type).getRGB());
-    //
-    // RGB rgb = cd.open();
-    //
-    // if (rgb != null)
-    // casData.setBackgroundColor(type, new Color(Display.getCurrent(), rgb));
-    // }
-    // }
-    // });
-    //
-    // TreeItem item = treeView.getTree().getItem(new Point(mouseEvent.x, mouseEvent.y));
-    // if (item != null && item.getData() instanceof FeatureTreeNode) {
-    // itemBgC.setEnabled(false);
-    // itemFgC.setEnabled(false);
-    // }
-    //
-    // new MenuItem(menu, SWT.SEPARATOR);
-    //
-    // MenuItem itemDelA = new MenuItem(menu, SWT.PUSH);
-    // itemDelA.setText("Delete selected Items");
-    // itemDelA.addListener(SWT.Selection, new Listener() {
-    // public void handleEvent(Event e) {
-    // deleteSelectedAnnotations();
-    // }
-    // });
-    //
-    // itemDelA.setEnabled(false);
-    // TreeItem[] items = treeView.getTree().getSelection();
-    // for (TreeItem ti : items)
-    // if (!(ti.getData() instanceof FeatureTreeNode)) {
-    // itemDelA.setEnabled(true);
-    // break;
-    // }
-    //
-    // menu.setVisible(true);
-    //
-    // while (!menu.isDisposed() && menu.isVisible()) {
-    // if (!display.readAndDispatch())
-    // display.sleep();
-    // }
-    // menu.dispose();
-    // }
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @seeorg.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events. MouseEvent)
-   */
-  public void mouseUp(MouseEvent e) {
-  }
-
-  public Image getIcon(Type type) {
-    if (icons.containsKey(type)) {
-      return icons.get(type);
-    }
-    Image image = updateIcon(type);
-    return image;
-  }
-
-  private void updateIcon(String typeName) {
-    Set<Type> keySet = icons.keySet();
-    for (Type type : keySet) {
-      String name = type.getName();
-      if (name.equals(typeName)) {
-        updateIcon(type);
-        return;
-      }
-
-    }
-  }
-
-  private Image updateIcon(Type type) {
-    AnnotationStyle style = editor.getAnnotationStyle(type);
-    Color fg = new Color(Display.getCurrent(), 0, 0, 0);
-    Color bg = new Color(Display.getCurrent(), style.getColor().getRed(), style.getColor()
-            .getGreen(), style.getColor().getBlue());
-
-    PaletteData paletteData = new PaletteData(new RGB[] { bg.getRGB(), fg.getRGB() });
-    ImageData imageData = new ImageData(40, 40, 1, paletteData);
-
-    Image image = new Image(Display.getCurrent(), imageData);
-    GC gc = new GC(image);
-
-    String styleString = style.getStyle().name().substring(0, 2);
-    Point p = gc.stringExtent(styleString);
-
-    gc.dispose();
-    image.dispose();
-
-    imageData = new ImageData(p.x + 4, p.y, 1, paletteData);
-    image = new Image(Display.getCurrent(), imageData);
-    gc = new GC(image);
-
-    gc.setBackground(bg);
-    gc.setForeground(fg);
-
-    gc.setTextAntialias(SWT.ON);
-    gc.drawString(styleString, 2, 0);
-
-    gc.dispose();
-
-    Image oldImage = icons.get(type);
-    if (oldImage != null) {
-      oldImage.dispose();
-    }
-    icons.put(type, image);
-    return image;
-  }
-
-  public IRootTreeNode getTypeOrderedTree(int pos, String manualTypeFilter, String manualTextFilter) {
-    TypeOrderedRootTreeNode root = new TypeOrderedRootTreeNode();
-    IPreferenceStore preferenceStore = RutaCasEditorPlugin.getDefault().getPreferenceStore();
-    boolean withParents = preferenceStore
-            .getBoolean(CasEditorViewsPreferenceConstants.SHOW_PARENT_TYPES);
-    if (isTreeWithTypesWithoutAnnotations()) {
-      CAS cas = editor.getDocument().getCAS();
-      Type atype = cas.getAnnotationType();
-      TypeSystem ts = cas.getTypeSystem();
-      Iterator<Type> tit = ts.getProperlySubsumedTypes(atype).iterator();
-      while (tit.hasNext()) {
-        Type type = tit.next();
-        boolean typeConstraint = StringUtils.isEmpty(manualTypeFilter)
-                || type.getName().toLowerCase().indexOf(manualTypeFilter.toLowerCase()) != -1;
-        if (typeConstraint) {
-          root.getTreeNode(type); // register type
-        }
-      }
-    }
-    AnnotationIndex<AnnotationFS> annotationIndex = document.getCAS().getAnnotationIndex();
-    for (AnnotationFS annotationFS : annotationIndex) {
-      boolean offsetConstraint = pos == -1
-              || (annotationFS.getBegin() <= pos && annotationFS.getEnd() >= pos);
-      boolean typeConstraint = StringUtils.isEmpty(manualTypeFilter)
-              || annotationFS.getType().getName().toLowerCase()
-                      .indexOf(manualTypeFilter.toLowerCase()) != -1;
-      boolean textConstraint = StringUtils.isEmpty(manualTextFilter)
-              || annotationFS.getCoveredText().toLowerCase()
-                      .indexOf(manualTextFilter.toLowerCase()) != -1;
-      if (offsetConstraint && typeConstraint && textConstraint) {
-        root.insertFS(annotationFS, withParents);
-      }
-
-    }
-    root.sort();
-    return root;
-  }
-
-  public void selectionChanged(IWorkbenchPart part, ISelection selection) {
-    if (!useSelection)
-      return;
-    if (selection instanceof StructuredSelection && part instanceof AnnotationEditor) {
-      offset = editor.getCaretOffset();
-      reloadTree();
-    }
-  }
-
-  public void handleEvent(Event event) {
-    if ((event.widget == filterTypeTextField || event.widget == filterCoveredTextTextField)
-            && event.type == SWT.Modify) {
-      reloadTree();
-    }
-  }
-
-  public void reloadTree() {
-    // remember selected annotation:
-    ISelection selection = treeView.getSelection();
-    AnnotationFS selectedFS = null;
-    if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1
-            && ((IStructuredSelection) selection).getFirstElement() instanceof AnnotationTreeNode) {
-      IStructuredSelection ssel = (IStructuredSelection) selection;
-      AnnotationTreeNode firstElement = (AnnotationTreeNode) ssel.getFirstElement();
-      selectedFS = firstElement.getAnnotation();
-    }
-    // reload tree:
-    String typeText = filterTypeTextField.getText();
-    String coveredTextText = filterCoveredTextTextField.getText();
-    IRootTreeNode tree = getTypeOrderedTree(offset, typeText, coveredTextText);
-    getTreeViewer().setInput(tree);
-    Collection<Type> shownAnnotationTypes = editor.getShownAnnotationTypes();
-    List<TypeTreeNode> nodes = toNodes(shownAnnotationTypes);
-    getTreeViewer().setCheckedElements(nodes.toArray());
-    getTreeViewer().setGrayed(new TypeTreeNode(editor.getAnnotationMode()), true);
-    // try to restore selection:
-    if (selectedFS != null) {
-      Type type = selectedFS.getType();
-      TreeItem[] items = getTreeViewer().getTree().getItems();
-      for (int i = 0; i < items.length; i++) {
-        TreeItem treeItem = items[i];
-        Object data = treeItem.getData();
-        if (data instanceof TypeTreeNode && ((TypeTreeNode) data).getType().equals(type)) {
-          TypeTreeNode typeTreeNode = (TypeTreeNode) data;
-          treeItem.setExpanded(true);
-          ITreeNode[] children = typeTreeNode.getChildren();
-          for (int j = 0; j < children.length; j++) {
-            ITreeNode fsTreeNode = children[j];
-            if (fsTreeNode instanceof AnnotationTreeNode) {
-              AnnotationTreeNode atn = (AnnotationTreeNode) fsTreeNode;
-              if (atn.getAnnotation().equals(selectedFS)) {
-                treeView.setSelection(new StructuredSelection(atn));
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-
-  public void checkStateChanged(CheckStateChangedEvent event) {
-    Object element = event.getElement();
-    boolean checked = event.getChecked();
-    Type type = null;
-    if (element instanceof TypeTreeNode) {
-      type = ((TypeTreeNode) element).getType();
-    } else if (element instanceof AnnotationTreeNode) {
-      type = ((AnnotationTreeNode) element).getType();
-    }
-    if (type != null && !editor.getAnnotationMode().equals(type)) {
-      editor.setShownAnnotationType(type, checked);
-    }
-  }
-
-  public void annotationModeChanged(Type newMode) {
-    getTreeViewer().setGrayed(new TypeTreeNode(newMode), true);
-  }
-
-  public void showAnnotationsChanged(Collection<Type> shownAnnotationTypes) {
-    List<TypeTreeNode> nodes = toNodes(shownAnnotationTypes);
-    getTreeViewer().setCheckedElements(nodes.toArray());
-  }
-
-  private List<TypeTreeNode> toNodes(Collection<Type> shownAnnotationTypes) {
-    List<TypeTreeNode> nodes = new ArrayList<TypeTreeNode>();
-    for (Type type : shownAnnotationTypes) {
-      nodes.add(new TypeTreeNode(type));
-    }
-    return nodes;
-  }
-
-  private boolean isTreeWithTypesWithoutAnnotations() {
-    IPreferenceStore preferenceStore = RutaCasEditorPlugin.getDefault().getPreferenceStore();
-    return !useSelection
-            && preferenceStore
-                    .getBoolean(CasEditorViewsPreferenceConstants.SHOW_TYPES_WITHOUT_ANNOTATIONS);
-  }
-
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ArrayFeatureTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ArrayFeatureTreeNode.java
deleted file mode 100644
index b54a0f4..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ArrayFeatureTreeNode.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-
-/**
- * Tree node that represents CommonArrayFS nodes, especially, CommonArrayFS that are not ArrayFS.
- */
-public class ArrayFeatureTreeNode implements ITreeNode {
-
-  private ITreeNode parent;
-
-  private Feature f;
-
-  private String value;
-
-  private ArrayList<ITreeNode> children;
-
-  public ArrayFeatureTreeNode(ITreeNode parent, Feature f, String value) {
-    this.parent = parent;
-    this.f = f;
-    this.value = value;
-    this.children = new ArrayList<ITreeNode>();
-  }
-
-  public void addChild(ITreeNode child) {
-    this.children.add(child);
-  }
-
-  public ITreeNode[] getChildren() {
-    return this.children.toArray(new ITreeNode[] {});
-  }
-
-  public Iterator<ITreeNode> getChildrenIterator() {
-    return this.children.iterator();
-  }
-
-  public String getName() {
-    return f.getShortName() + ": " + value;
-  }
-
-  public void getNodes(LinkedList<ITreeNode> list) {
-  }
-
-  public ITreeNode getParent() {
-    return parent;
-  }
-
-  public Type getType() {
-    return f.getRange();
-  }
-
-  public boolean hasChildren() {
-    if (children.size() > 0) {
-      return true;
-    }
-    return false;
-  }
-
-  public Feature getFeature() {
-    return this.f;
-  }
-
-  public String getValue() {
-    return value;
-  }
-
-  public void sort(Comparator<ITreeNode> cp) {
-    // nothing to do
-  }
-
-  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-
-    if (ArrayFeatureTreeNode.class.equals(adapter)) {
-      return this;
-    } else if (Feature.class.equals(adapter)) {
-      return f;
-
-    }
-
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSFeatureTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSFeatureTreeNode.java
deleted file mode 100644
index d4e4e57..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSFeatureTreeNode.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.Stack;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.eclipse.core.runtime.IAdaptable;
-
-public class FSFeatureTreeNode extends FSTreeNode implements IAnnotationNode, IAdaptable {
-
-  private Feature feature;
-
-  public FSFeatureTreeNode(ITreeNode parent, Feature feature, FeatureStructure fs) {
-    super(parent, fs);
-    this.feature = feature;
-  }
-
-  public FSFeatureTreeNode(ITreeNode parent,Feature feature, FeatureStructure fs,
-          Stack<Type> parentTypes) {
-    super(parent, fs, parentTypes);
-    this.feature = feature;
-  }
-
-  public AnnotationFS getAnnotation() {
-    return (AnnotationFS) fs;
-  }
-
-  @Override
-  public String getName() {
-    return feature.getShortName() + ": " + getAnnotation().getCoveredText();
-  }
-
-  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-    if (FSTreeNode.class.equals(adapter)) {
-      return this;
-    } else if (AnnotationFS.class.equals(adapter) || FeatureStructure.class.equals(adapter)) {
-      return fs;
-    }
-    return null;
-  }
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSTreeNode.java
deleted file mode 100644
index 03d813e..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/FSTreeNode.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*

- * 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.ruta.caseditor.view.tree;

-

-import java.util.Collections;

-import java.util.List;

-import java.util.Stack;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.ArrayFS;

-import org.apache.uima.cas.CommonArrayFS;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.eclipse.core.runtime.IAdaptable;

-

-public class FSTreeNode extends AbstractTreeNode implements IAdaptable {

-

-  protected FeatureStructure fs;

-

-  public FSTreeNode(ITreeNode parent, FeatureStructure annotation) {

-    this(parent, annotation, new Stack<Type>());

-  }

-

-  public FSTreeNode(ITreeNode parent, FeatureStructure annotation, Stack<Type> parentTypes) {

-    super(parent);

-    this.fs = annotation;

-    parentTypes.push(fs.getType());

-    for (Feature f : annotation.getType().getFeatures()) {

-      addFeatures(this, f, annotation, parentTypes);

-    }

-    parentTypes.pop();

-  }

-

-  public String getName() {

-    return fs.getType().getShortName();

-  }

-

-  public Type getType() {

-    return fs.getType();

-  }

-

-  public void addFeatures(ITreeNode parent, Feature f, FeatureStructure featureStructure,

-          Stack<Type> parentTypes) {

-    if (f.getRange().isArray()) {

-      // handle all kinds of arrays

-      FeatureStructure featureValue = featureStructure.getFeatureValue(f);

-      // ArrayFS is a special kind of CommonArrayFS

-      if (featureValue instanceof ArrayFS) {

-        ArrayFS array = (ArrayFS) featureValue;

-        if (array != null) {

-          String text = "Array" + "[" + array.size() + "]";

-          PrimitiveFeatureTreeNode arrayNode = new PrimitiveFeatureTreeNode(this, f, text);

-          parent.addChild(arrayNode);

-          int size = array.size();

-          for (int i = 0; i < size; i++) {

-            FeatureStructure fs = array.get(i);

-            if (fs instanceof FeatureStructure) {

-              Type fsType = fs.getType();

-              if (expandable(fsType, parentTypes)) {

-                ITreeNode fsNode;

-                if (fs instanceof AnnotationFS) {

-                  AnnotationFS faa = (AnnotationFS) fs;

-                  fsNode = new AnnotationTreeNode(arrayNode, faa, parentTypes);

-                } else {

-                  fsNode = new TypeTreeNode(arrayNode, fsType);

-                }

-                arrayNode.addChild(fsNode);

-              }

-            }

-          }

-        }

-      } else if (featureValue instanceof CommonArrayFS) {

-        // handle all other kind of CommonArrayFS nodes (ArrayFS handled above) 

-        CommonArrayFS array = (CommonArrayFS) featureValue;

-        String text = "[" + StringUtils.join(array.toStringArray(), ", ") + "]";

-        parent.addChild(new ArrayFeatureTreeNode(this, f, text));

-      }

-    } else if (f.getRange().isPrimitive()) {

-      if ("uima.cas.AnnotationBase:sofa".equals(f.getName())) {

-      } else {

-        parent.addChild(new PrimitiveFeatureTreeNode(this, f, featureStructure

-                .getFeatureValueAsString(f)));

-      }

-    } else if (f.getRange() instanceof Type) {

-      FeatureStructure featureValue = featureStructure.getFeatureValue(f);

-      if (featureValue instanceof AnnotationFS && expandable(featureValue.getType(), parentTypes)) {

-        parent.addChild(new FSFeatureTreeNode(this, f, featureValue, parentTypes));

-      }

-    }

-  }

-

-  private boolean expandable(Type type, List<Type> parentTypes) {

-    int frequency = Collections.frequency(parentTypes, type);

-    return frequency < 2;

-  }

-

-  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {

-    if (FSTreeNode.class.equals(adapter)) {

-      return this;

-    } else if (FeatureStructure.class.equals(adapter)) {

-      return fs;

-

-    }

-    return null;

-  }

-

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/IAnnotationNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/IAnnotationNode.java
deleted file mode 100644
index e776263..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/IAnnotationNode.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * 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.ruta.caseditor.view.tree;

-

-import org.apache.uima.cas.text.AnnotationFS;

-

-

-public interface IAnnotationNode {

-

-  AnnotationFS getAnnotation();

-

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/IRootTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/IRootTreeNode.java
deleted file mode 100644
index a86f62f..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/IRootTreeNode.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.LinkedList;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-
-public interface IRootTreeNode extends ITreeNode {
-
-  public void insertFS(FeatureStructure annotation, boolean withParents);
-
-  public LinkedList<ITreeNode> getNodes();
-
-  public LinkedList<ITreeNode> getNodes(Type type);
-
-  public LinkedList<ITreeNode> getNodes(AnnotationFS annot);
-
-  public void sort();
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ITreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ITreeNode.java
deleted file mode 100644
index fc2e751..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ITreeNode.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import org.apache.uima.cas.Type;
-import org.eclipse.core.runtime.IAdaptable;
-
-public interface ITreeNode extends IAdaptable {
-
-  public void addChild(ITreeNode child);
-
-  public ITreeNode[] getChildren();
-
-  public Iterator<ITreeNode> getChildrenIterator();
-
-  public String getName();
-
-  public ITreeNode getParent();
-
-  public boolean hasChildren();
-
-  public Type getType();
-
-  public void getNodes(LinkedList<ITreeNode> list);
-
-  public void sort(Comparator<ITreeNode> cp);
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/PrimitiveFeatureTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/PrimitiveFeatureTreeNode.java
deleted file mode 100644
index 9ba413e..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/PrimitiveFeatureTreeNode.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-
-public class PrimitiveFeatureTreeNode implements ITreeNode {
-
-  private ITreeNode parent;
-
-  private Feature f;
-
-  private String value;
-
-  private ArrayList<ITreeNode> children;
-
-  public PrimitiveFeatureTreeNode(ITreeNode parent, Feature f, String value) {
-    this.parent = parent;
-    this.f = f;
-    this.value = value;
-    this.children = new ArrayList<ITreeNode>();
-  }
-
-  public void addChild(ITreeNode child) {
-    this.children.add(child);
-  }
-
-  public ITreeNode[] getChildren() {
-    return this.children.toArray(new ITreeNode[] {});
-  }
-
-  public Iterator<ITreeNode> getChildrenIterator() {
-    return this.children.iterator();
-  }
-
-  public String getName() {
-    return f.getShortName() + ": " + value;
-  }
-
-  public void getNodes(LinkedList<ITreeNode> list) {
-  }
-
-  public ITreeNode getParent() {
-    return parent;
-  }
-
-  public Type getType() {
-    return f.getRange();
-  }
-
-  public boolean hasChildren() {
-    if (children.size() > 0) {
-      return true;
-    }
-    return false;
-  }
-
-  public Feature getFeature() {
-    return this.f;
-  }
-
-  public String getValue() {
-    return value;
-  }
-
-  public void sort(Comparator<ITreeNode> cp) {
-    // nothing to do
-  }
-
-  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-
-    if (PrimitiveFeatureTreeNode.class.equals(adapter)) {
-      return this;
-    } else if (Feature.class.equals(adapter)) {
-      return f;
-
-    }
-
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TextUtils.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TextUtils.java
deleted file mode 100644
index ec95576..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TextUtils.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.caseditor.view.tree;

-

-public class TextUtils {

-

-  public static String shrinkNamespace(String namespace) {

-    String result = "";

-    if (namespace != null) {

-      String[] split = namespace.split("[.]");

-      for (int i = 0; i < split.length - 1; i++) {

-        if (split[i].length() != 0) {

-          result += split[i].charAt(0);

-          result += ".";

-        }

-      }

-      if (split.length == 0) {

-        return namespace;

-      } else {

-        result += split[split.length - 1];

-      }

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ToolTipListener.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ToolTipListener.java
deleted file mode 100644
index fb2c520..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/ToolTipListener.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*

- * 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.ruta.caseditor.view.tree;

-

-import org.apache.uima.cas.text.AnnotationFS;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Point;

-import org.eclipse.swt.graphics.Rectangle;

-import org.eclipse.swt.layout.FillLayout;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Event;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Listener;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Tree;

-import org.eclipse.swt.widgets.TreeItem;

-

-public class ToolTipListener implements Listener {

-

-  private static final String TOOLTIP_TEXT_END = "\nEnd: ";

-

-  private static final String TOOLTIP_TEXT_BEGIN = "Begin: ";

-

-  private Shell tip = null;

-

-  private Label label = null;

-

-  private Tree tree;

-

-  public ToolTipListener(Tree tree) {

-    this.tree = tree;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets .Event)

-   */

-  public void handleEvent(Event event) {

-    switch (event.type) {

-      case SWT.Dispose:

-      case SWT.KeyDown:

-      case SWT.MouseMove: {

-        if (tip == null)

-          break;

-        tip.dispose();

-        tip = null;

-        label = null;

-        break;

-      }

-      case SWT.MouseHover: {

-        TreeItem item = tree.getItem(new Point(event.x, event.y));

-

-        if (item != null) {

-          String text = "";

-          if (item.getData() instanceof FSFeatureTreeNode) {

-            FSFeatureTreeNode node = (FSFeatureTreeNode) item.getData();

-            text = "Type: " + node.getType();

-          } else if (item.getData() instanceof AnnotationTreeNode) {

-            AnnotationFS annot = ((AnnotationTreeNode) item.getData()).getAnnotation();

-            text = TOOLTIP_TEXT_BEGIN + annot.getBegin() + TOOLTIP_TEXT_END + annot.getEnd();

-          } else if (item.getData() instanceof PrimitiveFeatureTreeNode) {

-            PrimitiveFeatureTreeNode node = (PrimitiveFeatureTreeNode) item.getData();

-            text = "Type: " + node.getType();

-          } else if (item.getData() instanceof TypeTreeNode) {

-            TypeTreeNode ttn = (TypeTreeNode) item.getData();

-            text = "Type: " + ttn.getName();

-            // TODO would be nice to show the description of the type, too

-            // however, that seems to require the TypeDescription object

-            // Type type = ttn.getType();

-          }

-          if (tip != null && !tip.isDisposed())

-            tip.dispose();

-

-          tip = new Shell(Display.getCurrent().getActiveShell(), SWT.ON_TOP | SWT.NO_FOCUS

-                  | SWT.TOOL);

-

-          tip.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_INFO_BACKGROUND));

-          FillLayout layout = new FillLayout();

-          layout.marginWidth = 2;

-          tip.setLayout(layout);

-

-          label = new Label(tip, SWT.NONE);

-          label.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_INFO_FOREGROUND));

-          label.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_INFO_BACKGROUND));

-

-          label.setText(text);

-

-          Point size = tip.computeSize(SWT.DEFAULT, SWT.DEFAULT);

-          Rectangle rect = item.getBounds(0);

-          Point pt = tree.toDisplay(rect.x, rect.y);

-          tip.setBounds(pt.x, pt.y, size.x, size.y);

-          tip.setVisible(true);

-        }

-      }

-

-    }

-  }

-}

diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TreeComparator.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TreeComparator.java
deleted file mode 100644
index 790c9a1..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TreeComparator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-public class TreeComparator implements java.util.Comparator<ITreeNode> {
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-   */
-  public int compare(ITreeNode o1, ITreeNode o2) {
-    return o1.getName().compareToIgnoreCase(o2.getName());
-  }
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeOrderedRootTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeOrderedRootTreeNode.java
deleted file mode 100644
index 85cca5f..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeOrderedRootTreeNode.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Stack;
-
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-
-public class TypeOrderedRootTreeNode extends AbstractTreeNode implements IRootTreeNode {
-
-  private Map<Type, TypeTreeNode> typeMap = new HashMap<Type, TypeTreeNode>();
-
-  public TypeOrderedRootTreeNode() {
-    super();
-  }
-
-  public String getName() {
-    return null;
-  }
-
-  public Type getType() {
-    return null;
-  }
-
-  /**
-   * Gets a tree node for a type from cache; may create a new tree node.
-   * 
-   * @param type
-   * @return
-   */
-  public TypeTreeNode getTreeNode(Type type) {
-    TypeTreeNode typeTreeNode = typeMap.get(type);
-    if (typeTreeNode == null) {
-      typeTreeNode = new TypeTreeNode(this, type);
-      typeMap.put(type, typeTreeNode);
-      addChild(typeTreeNode);
-    }
-    return typeTreeNode;
-  }
-
-  public void insertFS(FeatureStructure fs, boolean withParents) {
-    // TODO hotfix for explanation types...
-    Type type = fs.getType();
-    if (type.getShortName().equals("DebugBlockApply")
-            || type.getShortName().equals("DebugMatchedRuleMatch")
-            || type.getShortName().equals("DebugFailedRuleMatch")
-            || type.getShortName().equals("DebugScriptApply")
-            || type.getShortName().equals("DebugRuleElementMatches")
-            || type.getShortName().equals("DebugRuleElementMatch")) {
-      return;
-    }
-    insertFS(fs, type, withParents);
-  }
-
-  private void insertFS(FeatureStructure fs, Type type, boolean withParents) {
-    TypeTreeNode typeTreeNode = getTreeNode(type);
-
-    FSTreeNode node = createFSNode(typeTreeNode, fs);
-    typeTreeNode.addChild(node);
-    if (withParents) {
-      Type parent = fs.getCAS().getTypeSystem().getParent(type);
-      if (parent != null) {
-        insertFS(fs, parent, withParents);
-      }
-    }
-  }
-
-  private FSTreeNode createFSNode(ITreeNode parent, FeatureStructure fs) {
-    if (fs instanceof AnnotationFS) {
-      return new AnnotationTreeNode(parent, (AnnotationFS) fs, new Stack<Type>());
-    }
-    return new FSTreeNode(parent, fs);
-  }
-
-  public LinkedList<ITreeNode> getNodes() {
-    LinkedList<ITreeNode> list = new LinkedList<ITreeNode>();
-    getNodes(list);
-    return list;
-  }
-
-  public LinkedList<ITreeNode> getNodes(Type type) {
-    Iterator<ITreeNode> iter = getChildrenIterator();
-
-    LinkedList<ITreeNode> list = new LinkedList<ITreeNode>();
-
-    while (iter.hasNext()) {
-      TypeTreeNode typeNode = (TypeTreeNode) iter.next();
-
-      if (typeNode.getType().equals(type)) {
-        Iterator<ITreeNode> children = typeNode.getChildrenIterator();
-
-        list.add(typeNode);
-
-        while (children.hasNext())
-          list.add(children.next());
-      }
-    }
-
-    return list;
-  }
-
-  public LinkedList<ITreeNode> getNodes(AnnotationFS annot) {
-    Iterator<ITreeNode> iter = getChildrenIterator();
-
-    LinkedList<ITreeNode> list = new LinkedList<ITreeNode>();
-
-    while (iter.hasNext()) {
-      TypeTreeNode typeNode = (TypeTreeNode) iter.next();
-
-      if (typeNode.getType().equals(annot.getType())) {
-        Iterator<ITreeNode> children = typeNode.getChildrenIterator();
-
-        while (children.hasNext()) {
-          AnnotationTreeNode node = (AnnotationTreeNode) children.next();
-
-          if (node.getAnnotation().equals(annot)) {
-            list.add(node);
-            return list;
-          }
-        }
-      }
-    }
-
-    return list;
-  }
-
-  public void sort() {
-    sort(new TreeComparator());
-  }
-
-  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-
-    if (TypeTreeNode.class.equals(adapter)) {
-      return this;
-    } else if (Type.class.equals(adapter)) {
-      return null;
-
-    }
-
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeTreeNode.java b/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeTreeNode.java
deleted file mode 100644
index 999e434..0000000
--- a/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/TypeTreeNode.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.ruta.caseditor.view.tree;
-
-import org.apache.uima.cas.Type;
-
-public class TypeTreeNode extends AbstractTreeNode {
-
-  private Type type;
-
-  public TypeTreeNode(Type type) {
-    this(null, type);
-  }
-
-  public TypeTreeNode(ITreeNode parent, Type type) {
-    super(parent);
-    this.type = type;
-  }
-
-  public String getName() {
-    return type.getName();
-  }
-
-  public Type getType() {
-    return type;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == null)
-      return false;
-    if (o instanceof TypeTreeNode) {
-      return type.equals(((TypeTreeNode) o).getType());
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    return type.hashCode();
-  }
-
-  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
-
-    if (TypeTreeNode.class.equals(adapter)) {
-      return this;
-    } else if (Type.class.equals(adapter)) {
-      return type;
-
-    }
-
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-caseditor/src/main/readme_bin/LICENSE b/trunk/ruta-ep-caseditor/src/main/readme_bin/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-caseditor/src/main/readme_bin/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-caseditor/src/main/readme_src/META-INF/LICENSE b/trunk/ruta-ep-caseditor/src/main/readme_src/META-INF/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-caseditor/src/main/readme_src/META-INF/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-core-ext/marker-file-identifying-eclipse-plugin b/trunk/ruta-ep-core-ext/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-ep-core-ext/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/ruta-ep-core-ext/plugin.xml b/trunk/ruta-ep-core-ext/plugin.xml
deleted file mode 100644
index e810aa9..0000000
--- a/trunk/ruta-ep-core-ext/plugin.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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.
--->
-
-<plugin>
-   <extension
-         point="org.apache.uima.ruta.ide.blockExtension">
-      <block
-            class="org.apache.uima.ruta.block.OnlyFirstBlockIDEExtension"
-            engine="org.apache.uima.ruta.block.OnlyFirstBlockExtension">
-      </block>
-   </extension>
-   <extension
-         point="org.apache.uima.ruta.ide.blockExtension">
-      <block
-            class="org.apache.uima.ruta.block.OnlyOnceBlockIDEExtension"
-            engine="org.apache.uima.ruta.block.OnlyOnceBlockExtension">
-      </block>
-   </extension>
-   <extension
-         point="org.apache.uima.ruta.ide.blockExtension">
-      <block
-            class="org.apache.uima.ruta.block.fst.FSTBlockIDEExtension"
-            engine="org.apache.uima.ruta.block.fst.FSTBlockExtension">
-      </block>
-   </extension>
-   <extension
-         point="org.apache.uima.ruta.ide.stringFunctionExtension">
-      <stringFunction
-            class="org.apache.uima.ruta.string.StringOperationsIDEExtension"
-            engine="org.apache.uima.ruta.string.StringOperationsExtension">
-      </stringFunction>
-   </extension>
-   <extension
-         point="org.apache.uima.ruta.ide.booleanFunctionExtension">
-      <condition
-            class="org.apache.uima.ruta.string.BooleanOperationsIDEExtension"
-            engine="org.apache.uima.ruta.string.bool.BooleanOperationsExtension">
-      </condition>
-   </extension>
-
-</plugin>
diff --git a/trunk/ruta-ep-core-ext/pom.xml b/trunk/ruta-ep-core-ext/pom.xml
deleted file mode 100644
index 7916cb1..0000000
--- a/trunk/ruta-ep-core-ext/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?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.    
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>ruta-ep-core-ext</artifactId>
-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>
-  <parent>
-    <groupId>org.apache.uima</groupId>
-    <artifactId>ruta-parent</artifactId>
-    <version>2.3.0</version>
-    <relativePath>../ruta-parent/pom.xml</relativePath>
-  </parent>
-  <properties>
-    <postNoticeText />
-  </properties>
-  <url>${uimaWebsiteUrl}</url>
-  <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-ep-core-ext</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-core-ext</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-core-ext</developerConnection>
-  </scm>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.uima</groupId>
-      <artifactId>ruta-core</artifactId>
-      <version>${project.parent.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.uima</groupId>
-      <artifactId>ruta-core-ext</artifactId>
-      <version>${project.parent.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.uima</groupId>
-      <artifactId>ruta-ep-ide</artifactId>
-      <version>${project.parent.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.uima</groupId>
-      <artifactId>ruta-ep-ide-ui</artifactId>
-      <version>${project.parent.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.dltk</groupId>
-      <artifactId>core</artifactId>
-      <version>[3.0.1,5.0.0)</version>
-      <scope>provided</scope>
-    </dependency>
-   <dependency>
-      <groupId>org.antlr</groupId>
-      <artifactId>antlr-runtime</artifactId>
-      <version>3.5.2</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.antlr</groupId> 
-          <artifactId>stringtemplate</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.equinox</groupId>
-      <artifactId>app</artifactId>
-      <version>[1.3.0,2.0.0)</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf.ecore</groupId>
-      <artifactId>xmi</artifactId>
-      <version>[2.7.0,3.0.0)</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.5</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  
-  <build>
-    <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->
-    <finalName>org.apache.uima.ruta.core.ext_${parsedVersion.osgiVersion}</finalName>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.rat</groupId>
-          <artifactId>apache-rat-plugin</artifactId>
-          <executions>
-            <execution>
-              <id>default-cli</id>
-              <configuration>
-                <excludes>
-                  <exclude>release.properties</exclude> <!-- release generated artifact -->
-                  <exclude>marker-file-identifying-*</exclude>
-                  <exclude>issuesFixed/**</exclude>
-                </excludes>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>uima-bundle</id>
-            <configuration>
-              <instructions>
-                <_nouses>true</_nouses>
-                <_exportcontents>
-                  org.apache.uima.ruta
-                </_exportcontents>
-                <Require-Bundle>
-                  org.apache.uima.runtime,
-                  org.apache.uima.ruta.engine,
-                  org.apache.uima.ruta.ide,
-                  org.apache.uima.ruta.ide.ui,
-                  org.eclipse.dltk.core;bundle-version="3.0.0"
-                </Require-Bundle>
-                <Import-Package>
-                </Import-Package>
-                <Bundle-SymbolicName>org.apache.uima.ruta.core.ext;singleton:=true</Bundle-SymbolicName>
-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
-                <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
-                <Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
-                <Eclipse-BuddyPolicy>registered</Eclipse-BuddyPolicy>
-                <Eclipse-RegisterBuddy>org.apache.uima.runtime,org.apache.uima.ruta.engine</Eclipse-RegisterBuddy>
-              </instructions>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-    </plugins>
-  </build>
-  <description>Eclipse plugin for providing the implementions of the additional language extensions in the UIMA Ruta Workbench</description>
-</project>
\ No newline at end of file
diff --git a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlockIDEExtension.java b/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlockIDEExtension.java
deleted file mode 100644
index bfc6997..0000000
--- a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyFirstBlockIDEExtension.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.block;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-
-public class OnlyFirstBlockIDEExtension implements IIDEConditionExtension {
-  private final String[] strings = new String[] { "ONLYFIRST" };
-
-  public String[] getKnownExtensions() {
-    return strings;
-  }
-
-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,
-          IProblemReporter rep) throws RecognitionException {
-    // do not add additional checks yet
-    return true;
-  }
-
-}
diff --git a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlockIDEExtension.java b/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlockIDEExtension.java
deleted file mode 100644
index a6470eb..0000000
--- a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/OnlyOnceBlockIDEExtension.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.block;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-
-public class OnlyOnceBlockIDEExtension implements IIDEConditionExtension {
-  private final String[] strings = new String[] { "ONLYONCE" };
-
-  public String[] getKnownExtensions() {
-    return strings;
-  }
-
-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,
-          IProblemReporter rep) throws RecognitionException {
-    // do not add additional checks yet
-    return true;
-  }
-
-}
diff --git a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlockIDEExtension.java b/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlockIDEExtension.java
deleted file mode 100644
index d3c1cef..0000000
--- a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/block/fst/FSTBlockIDEExtension.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.block.fst;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-
-public class FSTBlockIDEExtension implements IIDEConditionExtension {
-  private final String[] strings = new String[] { "FST" };
-
-  public String[] getKnownExtensions() {
-    return strings;
-  }
-
-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,
-          IProblemReporter rep) throws RecognitionException {
-    // TODO do not add additional checks
-    return false;
-  }
-
-}
diff --git a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/string/BooleanOperationsIDEExtension.java b/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/string/BooleanOperationsIDEExtension.java
deleted file mode 100644
index 9fd1ed2..0000000
--- a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/string/BooleanOperationsIDEExtension.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.ruta.string;
-
-import java.util.List;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.uima.ruta.ide.core.extensions.IIDEBooleanFunctionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IIDEStringFunctionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;
-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;
-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;
-import org.apache.uima.ruta.string.bool.BooleanOperationsExtension;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.compiler.problem.IProblem;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-
-public class BooleanOperationsIDEExtension implements IIDEBooleanFunctionExtension {
-  private final String[] strings = new String[] { "contains", "endsWith",
-      "startsWith", "equals", "equalsIgnoreCase", "isEmpty" };
-
-  public String[] getKnownExtensions() {
-    return strings;
-  }
-
-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,
-          IProblemReporter rep) throws RecognitionException {
-    if (element instanceof RutaFunction) {
-      RutaFunction f = (RutaFunction) element;
-      String name = f.getName();
-      boolean ok = true;
-      List<Expression> childs = f.getChilds();
-      if (childs.size() < 1) {
-        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);
-        rep.reportProblem(problem);
-        ok = false;
-      }
-      Expression expr = childs.get(0);
-      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_S) {
-        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");
-        rep.reportProblem(problem);
-        ok = false;
-      }
-      return ok;
-    }
-    return false;
-  }
-
-}
diff --git a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/string/StringOperationsIDEExtension.java b/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/string/StringOperationsIDEExtension.java
deleted file mode 100644
index 9bc3531..0000000
--- a/trunk/ruta-ep-core-ext/src/main/java/org/apache/uima/ruta/string/StringOperationsIDEExtension.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.ruta.string;
-
-import java.util.List;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.uima.ruta.ide.core.extensions.IIDEStringFunctionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;
-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;
-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.compiler.problem.IProblem;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-
-public class StringOperationsIDEExtension implements IIDEStringFunctionExtension {
-  private final String[] strings = new String[] { "toUpperCase", "toLowerCase",
-          "replaceFirst", "replaceAll", "substring", "firstCharToUpperCase" };
-
-  public String[] getKnownExtensions() {
-    return strings;
-  }
-
-  public boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,
-          IProblemReporter rep) throws RecognitionException {
-    if (element instanceof RutaFunction) {
-      RutaFunction f = (RutaFunction) element;
-      String name = f.getName();
-      // TODO
-      if (!name.equals(strings[0])) {
-        IProblem problem = problemFactory.createUnknownFunctionProblem(f);
-        rep.reportProblem(problem);
-        return false;
-      }
-      boolean ok = true;
-      List<Expression> childs = f.getChilds();
-      if (childs.size() != 1) {
-        IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 1);
-        rep.reportProblem(problem);
-        ok = false;
-      }
-      Expression expr = childs.get(0);
-      if (expr.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {
-        IProblem problem = problemFactory.createWrongArgumentTypeProblem(expr, "TypeExpression");
-        rep.reportProblem(problem);
-        ok = false;
-      }
-      return ok;
-    }
-    return false;
-  }
-
-}
diff --git a/trunk/ruta-ep-engine/marker-file-identifying-eclipse-plugin b/trunk/ruta-ep-engine/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-ep-engine/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/ruta-ep-engine/plugin.xml b/trunk/ruta-ep-engine/plugin.xml
deleted file mode 100644
index 0df6ff0..0000000
--- a/trunk/ruta-ep-engine/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-	<!--
-	 ***************************************************************
-	 * 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.
-	 ***************************************************************
-	-->
-<plugin>
-
-   
-</plugin>
diff --git a/trunk/ruta-ep-engine/pom.xml b/trunk/ruta-ep-engine/pom.xml
deleted file mode 100644
index 40ba8ba..0000000
--- a/trunk/ruta-ep-engine/pom.xml
+++ /dev/null
@@ -1,327 +0,0 @@
-<?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. -->

-

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-ep-engine</artifactId>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <postNoticeText>${uniWueNoticeText}

-

-This product contains htmlparser libraries (http://htmlparser.sourceforge.net/), 

-licensed under the Common Public License.

-    </postNoticeText>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-  </properties>

-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <url>${uimaWebsiteUrl}</url>

-  <description>Provides the UIMA Ruta engine to other Eclipse 

-    plugins for their use</description>

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core-ext</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.antlr</groupId>

-      <artifactId>antlr-runtime</artifactId>

-      <version>3.5.2</version>

-      <scope>compile</scope>

-      <exclusions>

-        <exclusion>

-          <groupId>org.antlr</groupId> 

-          <artifactId>stringtemplate</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

-    <dependency>

-      <groupId>org.htmlparser</groupId>

-      <artifactId>htmlparser</artifactId>

-      <version>1.6</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>commons-collections</groupId>

-      <artifactId>commons-collections</artifactId>

-      <version>3.2.1</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>commons-lang</groupId>

-      <artifactId>commons-lang</artifactId>

-      <version>2.6</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimafit-core</artifactId>

-      <version>2.1.0</version>

-      <scope>compile</scope>

-      <!-- Exclude aop stuff, which is not need by uimafit 

-      and only introduces a non-asl license -->

-      <exclusions>

-        <exclusion>

-          <groupId>org.springframework</groupId> 

-          <artifactId>spring-aop</artifactId>

-        </exclusion>

-        <exclusion>

-          <groupId>aopalliance</groupId> 

-          <artifactId>aopalliance</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>2.4</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-math3</artifactId>

-      <version>3.0</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>commons-logging</groupId>

-      <artifactId>commons-logging</artifactId>

-      <version>1.1.1</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>commons-logging</groupId>

-      <artifactId>commons-logging-api</artifactId>

-      <version>1.1</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.springframework</groupId>

-      <artifactId>spring-core</artifactId>

-      <version>3.1.2.RELEASE</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.springframework</groupId>

-      <artifactId>spring-context</artifactId>

-      <version>3.1.2.RELEASE</version>

-      <scope>compile</scope>

-      <!-- Exclude aop stuff, which is not need by uimafit 

-      and only introduces a non-asl license -->

-      <exclusions>

-        <exclusion>

-          <groupId>org.springframework</groupId> 

-          <artifactId>spring-aop</artifactId>

-        </exclusion>

-        <exclusion>

-          <groupId>aopalliance</groupId> 

-          <artifactId>aopalliance</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

-    <dependency>

-      <groupId>org.springframework</groupId>

-      <artifactId>spring-expression</artifactId>

-      <version>3.1.2.RELEASE</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.springframework</groupId>

-      <artifactId>spring-beans</artifactId>

-      <version>3.1.2.RELEASE</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.springframework</groupId>

-      <artifactId>spring-asm</artifactId>

-      <version>3.1.2.RELEASE</version>

-      <scope>compile</scope>

-    </dependency>

-  </dependencies>

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-ep-engine</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-engine</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-engine</developerConnection>

-  </scm>

-  <build>

-    <!-- don't use artifactId as first part of finalName, follow instead 

-      the eclipse convention -->

-    <finalName>org.apache.uima.ruta.engine_${parsedVersion.osgiVersion}</finalName>

-    <resources>

-      <resource>

-        <directory>src/main/readme_src</directory>

-      </resource>

-    </resources>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>release.properties</exclude> <!-- release generated artifact -->

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>issuesFixed/**</exclude>

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-    <plugins>

-      <plugin>

-        <groupId>org.apache.felix</groupId>

-        <artifactId>maven-bundle-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>uima-bundle</id>

-            <configuration>

-              <instructions>

-                <_nouses>true</_nouses>

-                <_exportcontents>org.apache.uima.ruta,

-                  org.apache.uima.ruta.action,

-                  org.apache.uima.ruta.condition,

-                  org.apache.uima.ruta.constraint,

-                  org.apache.uima.ruta.descriptor,

-                  org.apache.uima.ruta.engine,

-                  org.apache.uima.ruta.expression,

-                  org.apache.uima.ruta.expression.bool,

-                  org.apache.uima.ruta.expression.list,

-                  org.apache.uima.ruta.expression.number,

-                  org.apache.uima.ruta.expression.resource,

-                  org.apache.uima.ruta.expression.string,

-                  org.apache.uima.ruta.expression.type,

-                  org.apache.uima.ruta.extensions,

-                  org.apache.uima.ruta.parser,

-                  org.apache.uima.ruta.resource,

-                  org.apache.uima.ruta.rule,

-                  org.apache.uima.ruta.rule.quantifier,

-                  org.apache.uima.ruta.seed,

-                  org.apache.uima.ruta.type,

-                  org.apache.uima.ruta.utils,

-                  org.apache.uima.ruta.verbalize,

-                  org.apache.uima.ruta.visitor,

-                  org.apache.uima.ruta.block.fst,

-                  org.apache.uima.ruta.block,

-                  org.apache.uima.ruta.string.*,

-                  org.antlr.runtime,

-                  org.antlr.runtime.debug,

-                  org.antlr.runtime.misc,

-                  org.antlr.runtime.tree,

-                  org.htmlparser,

-                  org.htmlparser.*,

-                  org.apache.commons.lang3.*,

-                  org.apache.commons.io.*,

-                  org.apache.uima.fit.*,

-                  org.apache.commons.math3.*,

-                  org.springframework.*

-                </_exportcontents>

-

-                <Import-Package>

-                  <!-- -->

-                  org.apache.uima.*,

-                  !bsh, !com.sun.net.httpserver,

-                  !edu.emory.mathcs.backport.java.util.concurrent,

-                  !groovy.lang, !javax.annotation, !javax.ejb,

-                  !javax.el, !javax.inject,

-                  !javax.interceptor, !javax.jms,

-                  !javax.management, !javax.management.modelmbean, !javax.management.openmbean,

-                  !javax.management.remote,

-                  !javax.naming, !javax.persistence.spi, !javax.rmi, !javax.servlet,

-                  !javax.swing, !javax.swing.border,

-                  !javax.swing.event, !javax.swing.text, !javax.swing.tree, !javax.validation,

-                  !javax.validation.bootstrap,

-                  !javax.validation.metadata, !javax.xml.namespace,

-                  !javax.xml.parsers, !javax.xml.stream,

-                  !javax.xml.stream.events, !javax.xml.stream.util,

-                  !javax.xml.transform, !javax.xml.transform.sax,

-                  !javax.xml.transform.stax,

-                  !javax.xml.ws, !joptsimple, !net.sf.cglib.*, !net.sf.ehcache.*,

-                  !org.antlr.stringtemplate,

-                  !org.apache.avalon.framework.logger,

-                  !org.apache.log, !org.apache.log4j, !org.apache.log4j.xml,

-                  !org.aspectj.*, !org.codehaus.groovy.*, !org.hibernate.* ,

-                  !org.joda.*, !org.jruby.*, !org.omg.CORBA,

-                  !org.springframework.instrument,

-                  !org.w3c.dom, !org.xml.sax, !org.xml.sax.ext, !org.xml.sax.helpers,

-                  !org.aopalliance.*, !org.springframework.aop.*

-                </Import-Package>

-                <!-- -->

-                <Require-Bundle> org.apache.uima.runtime </Require-Bundle>

-                <!-- <Import-Package>org.apache.uima, org.apache.uima.analysis_component, 

-                  org.apache.uima.analysis_engine, org.apache.uima.analysis_engine.annotator, 

-                  org.apache.uima.analysis_engine.asb, org.apache.uima.analysis_engine.asb.impl, 

-                  org.apache.uima.analysis_engine.impl, org.apache.uima.analysis_engine.impl.compatibility, 

-                  org.apache.uima.analysis_engine.metadata, org.apache.uima.analysis_engine.metadata.impl, 

-                  org.apache.uima.analysis_engine.service.impl, org.apache.uima.cas, org.apache.uima.cas.admin, 

-                  org.apache.uima.cas.impl, org.apache.uima.cas.text, org.apache.uima.cas_data, 

-                  org.apache.uima.cas_data.impl, org.apache.uima.flow, org.apache.uima.flow.impl, 

-                  org.apache.uima.impl, org.apache.uima.internal.util, org.apache.uima.internal.util.rb_trees, 

-                  org.apache.uima.internal.util.text, org.apache.uima.jcas, org.apache.uima.jcas.cas, 

-                  org.apache.uima.jcas.impl, org.apache.uima.jcas.tcas, org.apache.uima.resource, 

-                  org.apache.uima.resource.impl, org.apache.uima.resource.metadata, org.apache.uima.resource.metadata.impl, 

-                  org.apache.uima.resource.service.impl, org.apache.uima.search, org.apache.uima.search.impl, 

-                  org.apache.uima.uimacpp, org.apache.uima.util, org.apache.uima.util.impl, 

-                  </Import-Package> -->

-                <Embed-Dependency>*;scope=compile</Embed-Dependency>

-                <!-- <Embed-Transitive>true</Embed-Transitive> -->

-                <Bundle-SymbolicName>org.apache.uima.ruta.engine;singleton:=true</Bundle-SymbolicName>

-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>

-                <Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>

-                <!-- <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy> -->

-                <Eclipse-BuddyPolicy>registered</Eclipse-BuddyPolicy>

-                <Eclipse-RegisterBuddy>org.apache.uima.runtime</Eclipse-RegisterBuddy>

-              </instructions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-      <plugin>

-        <artifactId>maven-dependency-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>copyDependentJars</id>

-            <goals>

-              <goal>copy-dependencies</goal>

-            </goals>

-            <configuration>

-              <outputDirectory>${project.build.outputDirectory}</outputDirectory>

-              <excludeArtifactIds>uimaj-core,uimaj-tools,uimaj-document-annotation,uimaj-adapter-vinci,jVinci,uimaj-cpe,tools,aopalliance,spring-aop,stringtemplate,antlr</excludeArtifactIds>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-ep-engine/src/main/readme_bin/LICENSE b/trunk/ruta-ep-engine/src/main/readme_bin/LICENSE
deleted file mode 100644
index 9273ed3..0000000
--- a/trunk/ruta-ep-engine/src/main/readme_bin/LICENSE
+++ /dev/null
@@ -1,688 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains ANTLR libraries (http://www.antlr.org/), 

-licensed under the BSD License.

-

-  The BSD License

-  Copyright (c) 2010 Terence Parr

-  All rights reserved.

-  Redistribution and use in source and binary forms, with or 

-  without modification, are permitted provided that the following 

-  conditions are met:

-

-  Redistributions of source code must retain the above copyright 

-  notice, this list of conditions and the following disclaimer.

-  Redistributions in binary form must reproduce the above 

-  copyright notice, this list of conditions and the following 

-  disclaimer in the documentation and/or other materials provided 

-  with the distribution.

-  Neither the name of the author nor the names of its contributors 

-  may be used to endorse or promote products derived from this 

-  software without specific prior written permission.

-  

-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 

-  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 

-  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 

-  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 

-  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 

-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 

-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 

-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 

-  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 

-  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 

-  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 

-  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 

-  THE POSSIBILITY OF SUCH DAMAGE.

-

-====================================================================================================   

-

-This product contains htmlparser libraries (http://htmlparser.sourceforge.net/), 

-licensed under the Common Public License.

-

-  Common Public License Version 1.0

-  

-  THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC

-  LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM

-  CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

-  

-  1. DEFINITIONS

-  

-  "Contribution" means:

-  

-      a) in the case of the initial Contributor, the initial code and

-  documentation distributed under this Agreement, and

-  

-      b) in the case of each subsequent Contributor:

-  

-      i) changes to the Program, and

-  

-      ii) additions to the Program;

-  

-      where such changes and/or additions to the Program originate from and are

-  distributed by that particular Contributor. A Contribution 'originates' from a

-  Contributor if it was added to the Program by such Contributor itself or anyone

-  acting on such Contributor's behalf. Contributions do not include additions to

-  the Program which: (i) are separate modules of software distributed in

-  conjunction with the Program under their own license agreement, and (ii) are not

-  derivative works of the Program.

-  

-  "Contributor" means any person or entity that distributes the Program.

-  

-  "Licensed Patents " mean patent claims licensable by a Contributor which are

-  necessarily infringed by the use or sale of its Contribution alone or when

-  combined with the Program.

-  

-  "Program" means the Contributions distributed in accordance with this Agreement.

-  

-  "Recipient" means anyone who receives the Program under this Agreement,

-  including all Contributors.

-  

-  2. GRANT OF RIGHTS

-  

-      a) Subject to the terms of this Agreement, each Contributor hereby grants

-  Recipient a non-exclusive, worldwide, royalty-free copyright license to

-  reproduce, prepare derivative works of, publicly display, publicly perform,

-  distribute and sublicense the Contribution of such Contributor, if any, and such

-  derivative works, in source code and object code form.

-  

-      b) Subject to the terms of this Agreement, each Contributor hereby grants

-  Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed

-  Patents to make, use, sell, offer to sell, import and otherwise transfer the

-  Contribution of such Contributor, if any, in source code and object code form.

-  This patent license shall apply to the combination of the Contribution and the

-  Program if, at the time the Contribution is added by the Contributor, such

-  addition of the Contribution causes such combination to be covered by the

-  Licensed Patents. The patent license shall not apply to any other combinations

-  which include the Contribution. No hardware per se is licensed hereunder.

-  

-      c) Recipient understands that although each Contributor grants the licenses

-  to its Contributions set forth herein, no assurances are provided by any

-  Contributor that the Program does not infringe the patent or other intellectual

-  property rights of any other entity. Each Contributor disclaims any liability to

-  Recipient for claims brought by any other entity based on infringement of

-  intellectual property rights or otherwise. As a condition to exercising the

-  rights and licenses granted hereunder, each Recipient hereby assumes sole

-  responsibility to secure any other intellectual property rights needed, if any.

-  For example, if a third party patent license is required to allow Recipient to

-  distribute the Program, it is Recipient's responsibility to acquire that license

-  before distributing the Program.

-  

-      d) Each Contributor represents that to its knowledge it has sufficient

-  copyright rights in its Contribution, if any, to grant the copyright license set

-  forth in this Agreement.

-  

-  3. REQUIREMENTS

-  

-  A Contributor may choose to distribute the Program in object code form under its

-  own license agreement, provided that:

-  

-      a) it complies with the terms and conditions of this Agreement; and

-  

-      b) its license agreement:

-  

-      i) effectively disclaims on behalf of all Contributors all warranties and

-  conditions, express and implied, including warranties or conditions of title and

-  non-infringement, and implied warranties or conditions of merchantability and

-  fitness for a particular purpose;

-  

-      ii) effectively excludes on behalf of all Contributors all liability for

-  damages, including direct, indirect, special, incidental and consequential

-  damages, such as lost profits;

-  

-      iii) states that any provisions which differ from this Agreement are offered

-  by that Contributor alone and not by any other party; and

-  

-      iv) states that source code for the Program is available from such

-  Contributor, and informs licensees how to obtain it in a reasonable manner on or

-  through a medium customarily used for software exchange. 

-  

-  When the Program is made available in source code form:

-  

-      a) it must be made available under this Agreement; and

-  

-      b) a copy of this Agreement must be included with each copy of the Program. 

-  

-  Contributors may not remove or alter any copyright notices contained within the

-  Program.

-  

-  Each Contributor must identify itself as the originator of its Contribution, if

-  any, in a manner that reasonably allows subsequent Recipients to identify the

-  originator of the Contribution.

-  

-  4. COMMERCIAL DISTRIBUTION

-  

-  Commercial distributors of software may accept certain responsibilities with

-  respect to end users, business partners and the like. While this license is

-  intended to facilitate the commercial use of the Program, the Contributor who

-  includes the Program in a commercial product offering should do so in a manner

-  which does not create potential liability for other Contributors. Therefore, if

-  a Contributor includes the Program in a commercial product offering, such

-  Contributor ("Commercial Contributor") hereby agrees to defend and indemnify

-  every other Contributor ("Indemnified Contributor") against any losses, damages

-  and costs (collectively "Losses") arising from claims, lawsuits and other legal

-  actions brought by a third party against the Indemnified Contributor to the

-  extent caused by the acts or omissions of such Commercial Contributor in

-  connection with its distribution of the Program in a commercial product

-  offering. The obligations in this section do not apply to any claims or Losses

-  relating to any actual or alleged intellectual property infringement. In order

-  to qualify, an Indemnified Contributor must: a) promptly notify the Commercial

-  Contributor in writing of such claim, and b) allow the Commercial Contributor to

-  control, and cooperate with the Commercial Contributor in, the defense and any

-  related settlement negotiations. The Indemnified Contributor may participate in

-  any such claim at its own expense.

-  

-  For example, a Contributor might include the Program in a commercial product

-  offering, Product X. That Contributor is then a Commercial Contributor. If that

-  Commercial Contributor then makes performance claims, or offers warranties

-  related to Product X, those performance claims and warranties are such

-  Commercial Contributor's responsibility alone. Under this section, the

-  Commercial Contributor would have to defend claims against the other

-  Contributors related to those performance claims and warranties, and if a court

-  requires any other Contributor to pay any damages as a result, the Commercial

-  Contributor must pay those damages.

-  

-  5. NO WARRANTY

-  

-  EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN

-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR

-  IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,

-  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each

-  Recipient is solely responsible for determining the appropriateness of using and

-  distributing the Program and assumes all risks associated with its exercise of

-  rights under this Agreement, including but not limited to the risks and costs of

-  program errors, compliance with applicable laws, damage to or loss of data,

-  programs or equipment, and unavailability or interruption of operations.

-  

-  6. DISCLAIMER OF LIABILITY

-  

-  EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY

-  CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,

-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST

-  PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,

-  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY

-  OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS

-  GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-  

-  7. GENERAL

-  

-  If any provision of this Agreement is invalid or unenforceable under applicable

-  law, it shall not affect the validity or enforceability of the remainder of the

-  terms of this Agreement, and without further action by the parties hereto, such

-  provision shall be reformed to the minimum extent necessary to make such

-  provision valid and enforceable.

-  

-  If Recipient institutes patent litigation against a Contributor with respect to

-  a patent applicable to software (including a cross-claim or counterclaim in a

-  lawsuit), then any patent licenses granted by that Contributor to such Recipient

-  under this Agreement shall terminate as of the date such litigation is filed. In

-  addition, if Recipient institutes patent litigation against any entity

-  (including a cross-claim or counterclaim in a lawsuit) alleging that the Program

-  itself (excluding combinations of the Program with other software or hardware)

-  infringes such Recipient's patent(s), then such Recipient's rights granted under

-  Section 2(b) shall terminate as of the date such litigation is filed.

-  

-  All Recipient's rights under this Agreement shall terminate if it fails to

-  comply with any of the material terms or conditions of this Agreement and does

-  not cure such failure in a reasonable period of time after becoming aware of

-  such noncompliance. If all Recipient's rights under this Agreement terminate,

-  Recipient agrees to cease use and distribution of the Program as soon as

-  reasonably practicable. However, Recipient's obligations under this Agreement

-  and any licenses granted by Recipient relating to the Program shall continue and

-  survive.

-  

-  Everyone is permitted to copy and distribute copies of this Agreement, but in

-  order to avoid inconsistency the Agreement is copyrighted and may only be

-  modified in the following manner. The Agreement Steward reserves the right to

-  publish new versions (including revisions) of this Agreement from time to time.

-  No one other than the Agreement Steward has the right to modify this Agreement.

-  IBM is the initial Agreement Steward. IBM may assign the responsibility to serve

-  as the Agreement Steward to a suitable separate entity. Each new version of the

-  Agreement will be given a distinguishing version number. The Program (including

-  Contributions) may always be distributed subject to the version of the Agreement

-  under which it was received. In addition, after a new version of the Agreement

-  is published, Contributor may elect to distribute the Program (including its

-  Contributions) under the new version. Except as expressly stated in Sections

-  2(a) and 2(b) above, Recipient receives no rights or licenses to the

-  intellectual property of any Contributor under this Agreement, whether

-  expressly, by implication, estoppel or otherwise. All rights in the Program not

-  expressly granted under this Agreement are reserved.

-  

-  This Agreement is governed by the laws of the State of New York and the

-  intellectual property laws of the United States of America. No party to this

-  Agreement will bring a legal action under this Agreement more than one year

-  after the cause of action arose. Each party waives its rights to a jury trial in

-  any resulting litigation.

-

-====================================================================================================   

-

-This product contains Spring Framework libraries.

-

-SPRING FRAMEWORK 3.1 SUBCOMPONENTS: 

-

-Spring Framework 3.1 includes a number of subcomponents with

-separate copyright notices and license terms.  The product that 

-includes this file does not necessarily use all the open source 

-subcomponents referred to below. Your use of the source

-code for these subcomponents is subject to the terms and

-conditions of the following licenses. 

-

->>> asm-2.2.3:

-

-Copyright (c) 2000-2005 INRIA, France Telecom

-All rights reserved.

-

-Redistribution and use in source and binary forms, with or without

-modification, are permitted provided that the following conditions

-are met:

-

-1. Redistributions of source code must retain the above copyright

-   notice, this list of conditions and the following disclaimer.

-

-2. Redistributions in binary form must reproduce the above copyright

-   notice, this list of conditions and the following disclaimer in the

-   documentation and/or other materials provided with the distribution.

-

-3. Neither the name of the copyright holders nor the names of its

-   contributors may be used to endorse or promote products derived from

-   this software without specific prior written permission.

-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE

-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF

-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS

-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN

-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)

-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF

-THE POSSIBILITY OF SUCH DAMAGE.

-

-Copyright (c) 1999-2009, OW2 Consortium <http://www.ow2.org/> 

-    

-=======================================================================   

-

-To the extent any open source subcomponents are licensed under the EPL and/or other 

-similar licenses that require the source code and/or modifications to 

-source code to be made available (as would be noted above), you may obtain a 

-copy of the source code corresponding to the binaries for such open source 

-components and modifications thereto, if any, (the "Source Files"), by 

-downloading the Source Files from http://www.springsource.org/download, 

-or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview 

-Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com.  All 

-such requests should clearly specify:  OPEN SOURCE FILES REQUEST, Attention General 

-Counsel.  VMware shall mail a copy of the Source Files to you on a CD or equivalent 

-physical medium.  This offer to obtain a copy of the Source Files is valid for three 

-years from the date you acquired this Software product.

-

-==================================================================================================== 

-

-This product contains Commons Math libraries (http://commons.apache.org/proper/commons-math/).

-

-For the lmder, lmpar and qrsolv Fortran routine from minpack and translated in

-the LevenbergMarquardtOptimizer class in package

-org.apache.commons.math3.optimization.general 

-Original source copyright and license statement:

-

-Minpack Copyright Notice (1999) University of Chicago.  All rights reserved

-

-Redistribution and use in source and binary forms, with or

-without modification, are permitted provided that the

-following conditions are met:

-

-1. Redistributions of source code must retain the above

-copyright notice, this list of conditions and the following

-disclaimer.

-

-2. Redistributions in binary form must reproduce the above

-copyright notice, this list of conditions and the following

-disclaimer in the documentation and/or other materials

-provided with the distribution.

-

-3. The end-user documentation included with the

-redistribution, if any, must include the following

-acknowledgment:

-

-   "This product includes software developed by the

-   University of Chicago, as Operator of Argonne National

-   Laboratory.

-

-Alternately, this acknowledgment may appear in the software

-itself, if and wherever such third-party acknowledgments

-normally appear.

-

-4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"

-WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE

-UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND

-THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR

-IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES

-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE

-OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY

-OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR

-USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF

-THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)

-DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION

-UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL

-BE CORRECTED.

-

-5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT

-HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF

-ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,

-INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF

-ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF

-PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER

-SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT

-(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,

-EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE

-POSSIBILITY OF SUCH LOSS OR DAMAGES.

-===============================================================================

-

-Copyright and license statement for the odex Fortran routine developed by

-E. Hairer and G. Wanner and translated in GraggBulirschStoerIntegrator class

-in package org.apache.commons.math3.ode.nonstiff:

-

-

-Copyright (c) 2004, Ernst Hairer

-

-Redistribution and use in source and binary forms, with or without 

-modification, are permitted provided that the following conditions are 

-met:

-

-- Redistributions of source code must retain the above copyright 

-notice, this list of conditions and the following disclaimer.

-

-- Redistributions in binary form must reproduce the above copyright 

-notice, this list of conditions and the following disclaimer in the 

-documentation and/or other materials provided with the distribution.

-

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 

-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 

-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 

-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR 

-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 

-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 

-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 

-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 

-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 

-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 

-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-===============================================================================

-

-Copyright and license statement for the original lapack fortran routines

-translated in EigenDecompositionImpl class in package

-org.apache.commons.math3.linear:

-

-Copyright (c) 1992-2008 The University of Tennessee.  All rights reserved.

-

-$COPYRIGHT$

-

-Additional copyrights may follow

-

-$HEADER$

-

-Redistribution and use in source and binary forms, with or without

-modification, are permitted provided that the following conditions are

-met:

-

-- Redistributions of source code must retain the above copyright

-  notice, this list of conditions and the following disclaimer. 

-  

-- Redistributions in binary form must reproduce the above copyright

-  notice, this list of conditions and the following disclaimer listed

-  in this license in the documentation and/or other materials

-  provided with the distribution.

-  

-- Neither the name of the copyright holders nor the names of its

-  contributors may be used to endorse or promote products derived from

-  this software without specific prior written permission.

-  

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT  

-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 

-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  

-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

-===============================================================================

-

-Copyright and license statement for the original Mersenne twister C

-routines translated in MersenneTwister class in package 

-org.apache.commons.math3.random:

-

-   Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,

-   All rights reserved.                          

-

-   Redistribution and use in source and binary forms, with or without

-   modification, are permitted provided that the following conditions

-   are met:

-

-     1. Redistributions of source code must retain the above copyright

-        notice, this list of conditions and the following disclaimer.

-

-     2. Redistributions in binary form must reproduce the above copyright

-        notice, this list of conditions and the following disclaimer in the

-        documentation and/or other materials provided with the distribution.

-

-     3. The names of its contributors may not be used to endorse or promote 

-        products derived from this software without specific prior written 

-        permission.

-

-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

-   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

-   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR

-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,

-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,

-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR

-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF

-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING

-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS

-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-

diff --git a/trunk/ruta-ep-engine/src/main/readme_bin/NOTICE b/trunk/ruta-ep-engine/src/main/readme_bin/NOTICE
deleted file mode 100644
index 1ba86b7..0000000
--- a/trunk/ruta-ep-engine/src/main/readme_bin/NOTICE
+++ /dev/null
@@ -1,84 +0,0 @@
-
-Apache UIMA Ruta Eclipse: ruta-ep-engine
-Copyright 2011 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Portions of UIMA Ruta were originally developed by
-the Universität Würzburg.
-Copyright (c) 2006, 2011 Universität Würzburg.
-
-This product contains htmlparser libraries (http://htmlparser.sourceforge.net/), 
-licensed under the Common Public License.
-
-Apache Commons Logging (http://commons.apache.org/proper/commons-logging/):
-This product includes/uses software(s) developed by 'an unknown organization'
-  - Unnamed - avalon-framework:avalon-framework:jar:4.1.3
-  - Unnamed - log4j:log4j:jar:1.2.12
-  - Unnamed - logkit:logkit:jar:1.0.1
-
-This product contains uimaFIT - Core: 
-Copyright 2009-2012 Regents of the University of Colorado.
-All rights reserved,
-Copyright 2009-2012 Ubiquitous Knowledge Processing (UKP) Lab.
-Technische Universität Darmstadt.
-All rights reserved.
-
-This product contains Spring Framework 3.1:
-Copyright (c) 2002-2011 SpringSource, a division of VMware, Inc.
-This product may include a number of subcomponents with separate
-copyright notices and license terms. 
-Your use of the source code for the these subcomponents is subject to
-the terms and conditions of the subcomponent's license, as noted in the
-LICENSE file.
-
-This product contains Apache Commons Math (http://commons.apache.org/proper/commons-math/):
-===============================================================================
-The BracketFinder (package org.apache.commons.math3.optimization.univariate)
-and PowellOptimizer (package org.apache.commons.math3.optimization.general)
-classes are based on the Python code in module "optimize.py" (version 0.5)
-developed by Travis E. Oliphant for the SciPy library (http://www.scipy.org/)
-Copyright © 2003-2009 SciPy Developers.
-===============================================================================
-The LinearConstraint, LinearObjectiveFunction, LinearOptimizer,
-RelationShip, SimplexSolver and SimplexTableau classes in package
-org.apache.commons.math3.optimization.linear include software developed by
-Benjamin McCann (http://www.benmccann.com) and distributed with
-the following copyright: Copyright 2009 Google Inc.
-===============================================================================
-This product includes software developed by the
-University of Chicago, as Operator of Argonne National
-Laboratory.
-The LevenbergMarquardtOptimizer class in package
-org.apache.commons.math3.optimization.general includes software
-translated from the lmder, lmpar and qrsolv Fortran routines
-from the Minpack package
-Minpack Copyright Notice (1999) University of Chicago.  All rights reserved
-===============================================================================
-The GraggBulirschStoerIntegrator class in package
-org.apache.commons.math3.ode.nonstiff includes software translated
-from the odex Fortran routine developed by E. Hairer and G. Wanner.
-Original source copyright:
-Copyright (c) 2004, Ernst Hairer
-===============================================================================
-The EigenDecompositionImpl class in package
-org.apache.commons.math3.linear includes software translated
-from some LAPACK Fortran routines.  Original source copyright:
-Copyright (c) 1992-2008 The University of Tennessee.  All rights reserved.
-===============================================================================
-The MersenneTwister class in package org.apache.commons.math3.random
-includes software translated from the 2002-01-26 version of
-the Mersenne-Twister generator written in C by Makoto Matsumoto and Takuji
-Nishimura. Original source copyright:
-Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
-All rights reserved
-===============================================================================
-The LocalizedFormatsTest class in the unit tests is an adapted version of
-the OrekitMessagesTest class from the orekit library distributed under the
-terms of the Apache 2 licence. Original source copyright:
-Copyright 2010 CS Communication & Systèmes
-===============================================================================
-The complete text of licenses and disclaimers associated with the the original
-sources enumerated above at the time of code translation are in the LICENSE.txt
-file.
\ No newline at end of file
diff --git a/trunk/ruta-ep-engine/src/main/readme_src/META-INF/NOTICE b/trunk/ruta-ep-engine/src/main/readme_src/META-INF/NOTICE
deleted file mode 100644
index 7a83a47..0000000
--- a/trunk/ruta-ep-engine/src/main/readme_src/META-INF/NOTICE
+++ /dev/null
@@ -1,11 +0,0 @@
-
-Apache UIMA Ruta Eclipse: ruta-ep-engine
-Copyright 2011 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Portions of UIMA Ruta were originally developed by
-the Universität Würzburg.
-Copyright (c) 2006, 2011 Universität Würzburg.
-
diff --git a/trunk/ruta-ep-ide-ui/icons/disp_sbook.gif b/trunk/ruta-ep-ide-ui/icons/disp_sbook.gif
deleted file mode 100644
index 5dbbebf..0000000
--- a/trunk/ruta-ep-ide-ui/icons/disp_sbook.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/explain.png b/trunk/ruta-ep-ide-ui/icons/explain.png
deleted file mode 100644
index 47b75a4..0000000
--- a/trunk/ruta-ep-ide-ui/icons/explain.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/insp_sbook.gif b/trunk/ruta-ep-ide-ui/icons/insp_sbook.gif
deleted file mode 100644
index a4548c5..0000000
--- a/trunk/ruta-ep-ide-ui/icons/insp_sbook.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/javadoc.gif b/trunk/ruta-ep-ide-ui/icons/javadoc.gif
deleted file mode 100644
index c43c5d5..0000000
--- a/trunk/ruta-ep-ide-ui/icons/javadoc.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/jwatch_obj.gif b/trunk/ruta-ep-ide-ui/icons/jwatch_obj.gif
deleted file mode 100644
index 7d1ece1..0000000
--- a/trunk/ruta-ep-ide-ui/icons/jwatch_obj.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/method_entry.gif b/trunk/ruta-ep-ide-ui/icons/method_entry.gif
deleted file mode 100644
index b9653f5..0000000
--- a/trunk/ruta-ep-ide-ui/icons/method_entry.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/method_exit.gif b/trunk/ruta-ep-ide-ui/icons/method_exit.gif
deleted file mode 100644
index e080a8e..0000000
--- a/trunk/ruta-ep-ide-ui/icons/method_exit.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/newfile_wiz.png b/trunk/ruta-ep-ide-ui/icons/newfile_wiz.png
deleted file mode 100644
index 902bbe6..0000000
--- a/trunk/ruta-ep-ide-ui/icons/newfile_wiz.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/newpack_wiz.gif b/trunk/ruta-ep-ide-ui/icons/newpack_wiz.gif
deleted file mode 100644
index f9e4d6c..0000000
--- a/trunk/ruta-ep-ide-ui/icons/newpack_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/newpackfolder_wiz.gif b/trunk/ruta-ep-ide-ui/icons/newpackfolder_wiz.gif
deleted file mode 100644
index f2c0079..0000000
--- a/trunk/ruta-ep-ide-ui/icons/newpackfolder_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/newprj_wiz.png b/trunk/ruta-ep-ide-ui/icons/newprj_wiz.png
deleted file mode 100644
index 902bbe6..0000000
--- a/trunk/ruta-ep-ide-ui/icons/newprj_wiz.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/opentype.gif b/trunk/ruta-ep-ide-ui/icons/opentype.gif
deleted file mode 100644
index e8c4948..0000000
--- a/trunk/ruta-ep-ide-ui/icons/opentype.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/ruta.png b/trunk/ruta-ep-ide-ui/icons/ruta.png
deleted file mode 100644
index b4d31ce..0000000
--- a/trunk/ruta-ep-ide-ui/icons/ruta.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/ruta_obj.png b/trunk/ruta-ep-ide-ui/icons/ruta_obj.png
deleted file mode 100644
index 0bfecd5..0000000
--- a/trunk/ruta-ep-ide-ui/icons/ruta_obj.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/ruta_ovr.gif b/trunk/ruta-ep-ide-ui/icons/ruta_ovr.gif
deleted file mode 100644
index 936d71e..0000000
--- a/trunk/ruta-ep-ide-ui/icons/ruta_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/ruta_persp.png b/trunk/ruta-ep-ide-ui/icons/ruta_persp.png
deleted file mode 100644
index 0bfecd5..0000000
--- a/trunk/ruta-ep-ide-ui/icons/ruta_persp.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/rutadoc.png b/trunk/ruta-ep-ide-ui/icons/rutadoc.png
deleted file mode 100644
index 7d863f9..0000000
--- a/trunk/ruta-ep-ide-ui/icons/rutadoc.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/search_obj.png b/trunk/ruta-ep-ide-ui/icons/search_obj.png
deleted file mode 100644
index d22fde8..0000000
--- a/trunk/ruta-ep-ide-ui/icons/search_obj.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/th_vertical.gif b/trunk/ruta-ep-ide-ui/icons/th_vertical.gif
deleted file mode 100644
index dee0cbc..0000000
--- a/trunk/ruta-ep-ide-ui/icons/th_vertical.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/watch_exp.gif b/trunk/ruta-ep-ide-ui/icons/watch_exp.gif
deleted file mode 100644
index d37495a..0000000
--- a/trunk/ruta-ep-ide-ui/icons/watch_exp.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/xuniterr.gif b/trunk/ruta-ep-ide-ui/icons/xuniterr.gif
deleted file mode 100644
index ff1c111..0000000
--- a/trunk/ruta-ep-ide-ui/icons/xuniterr.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/xuniterrq.gif b/trunk/ruta-ep-ide-ui/icons/xuniterrq.gif
deleted file mode 100644
index e3a83eb..0000000
--- a/trunk/ruta-ep-ide-ui/icons/xuniterrq.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/xunitsucc.gif b/trunk/ruta-ep-ide-ui/icons/xunitsucc.gif
deleted file mode 100644
index 4d5ad11..0000000
--- a/trunk/ruta-ep-ide-ui/icons/xunitsucc.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/icons/xunitsuccq.gif b/trunk/ruta-ep-ide-ui/icons/xunitsuccq.gif
deleted file mode 100644
index e30da8e..0000000
--- a/trunk/ruta-ep-ide-ui/icons/xunitsuccq.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-ide-ui/marker-file-identifying-eclipse-plugin b/trunk/ruta-ep-ide-ui/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-ep-ide-ui/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/ruta-ep-ide-ui/plugin.properties b/trunk/ruta-ep-ide-ui/plugin.properties
deleted file mode 100644
index abb8b58..0000000
--- a/trunk/ruta-ep-ide-ui/plugin.properties
+++ /dev/null
@@ -1,179 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-rutaContentType=UIMA Ruta Source File

-

-parserBuildParticipant.name = UIMA Ruta Source Parser

-taskTagsBuildParticipant.name = UIMA Ruta Task Tags Build Participant

-

-sourceParser.name = UIMA Ruta Source Parser

-sourceParser.description = UIMA Ruta Source Parser

-

-pluginProvider=Apache UIMA

-pluginName=Apache UIMA Workbench IDE

-

-Console.PreferencePage = Console

-Interpreters.PreferencePage = Interpreters

-Debug.PreferencePage = Debug

-Engines.PreferencePage = Engines

-

-Debug.PropertyPage = Debug

-Engines.PropertyPage = Engines

-

-ToggleBreakpoint.label = Toggle &Breakpoint

-EnableDisableBreakpoint.label = Toggl&e Enablement

-BreakpointProperties.label = Breakpoint Properties...

-ScriptWatch.label=Watch

-ScriptInspect.label=Inspect

-ScriptDisplay.label=Display

-WatchVariable = Watch as Variable

-showStaticAction.label=Show Function Objects

-VariablesViewRutaSubmenu.label=UIMA Ruta

-scriptConsole = Script Console

-

-RutaConsole.Console = UIMA Ruta Console

-RutaConsole.Actions.PasteToRutaConsole = Paste to UIMA Ruta Console

-

-

-RutaVariableHoverLabel=UIMA Ruta Debug Hover

-RutaVariableHoverDescription=UIMA Ruta Debug Hover

-

-variablesViewMenu.name = UIMA Ruta

-

-showGlobalVarsCommand.name = Show Global Variables

-showGlobalVarsCommand.description = Show Global Variables

-showGlobalVarsCommand.tooltip = Toggles global variable display

-

-showClassVarsCommand.name = Show Class Variables

-showClassVarsCommand.description = Show Class Variables

-showClassVarsCommand.tooltip = Toggles class variable display

-

-showLocalVarsCommand.name = Show Local Variables

-showLocalVarsCommand.description = Show Local Variables

-showLocalVarsCommand.tooltip = Toggles local variable display

-

-

-PreferencePage.name = UIMA Ruta

-PropertyPage.name = UIMA Ruta

-

-DebuggingEngine.name = UIMA Ruta debugging engine

-DebuggingEngine.description = UIMA Ruta debugging engine

-

-RutaLaunchShortcut.name = UIMA Ruta Testing

-RutaLaunchShortcut.description = UIMA Ruta Testing

-

-

-RutaPerspective.name = UIMA Ruta

-

-# Context

-RutaEditContext.name = Editing UIMA Ruta Source

-RutaEditContext.description = Editing UIMA Ruta Source Context

-

-# Editor

-RutaEditor.name = UIMA Ruta Source Editor 

-

-# Wizards

-RutaWizardsCategory.name = UIMA Ruta

-

-NewRutaPackage.label=UIMA Ruta Package

-NewRutaPackage.description=Create a Ruta package

-

-NewRutaFile.label=UIMA Ruta File

-NewRutaFile.description=Create a UIMA Ruta script file

-

-NewSourceFolderCreationWizard.label=Source Folder

-NewSourceFolderCreationWizard.description=Create a DLTK source folder

-

-# Preference Pages

-RutaPreferencePage.name = UIMA Ruta

-RutaEditorPreferencePage.name = Editor

-RutaEditorAssistancePreferencePage.name = Code Assistance

-RutaEditorSyntaxColoringPreferencePage.name = Syntax Coloring

-RutaEditorSmartTypingPreferencePage.name = Smart Typing

-RutaEditorFoldingPreferencePage.name = Folding

-RutaCodeTemplatesPreferencePage.name = Templates

-RutaEditorHoversPreferencePage.name = Hovers

-RutaTaskTags.name = Task Tags

-

-# Property Pages

-RutaPropertyPage.name = UIMA Ruta

-RutaBuildPathPropertyPage.name = Build Path

-RutaTodoPropertyPage.name = Todo Properties

-

-# Search page

-RutaSearchPage.label = UIMA Ruta Search

-

-# Template

-RutaTemplateContext.name = UIMA Ruta

-

-# Views

-RutaViewsCategory.name = UIMA Ruta

-RutaNamespacesView.name = UIMA Ruta Namespaces

-RutaFunctionsView.name = UIMA Ruta Functions

-RutaPackagesView.name = UIMA Ruta Packages

-RutaDocumentationView.name = UIMA Ruta Documentation

-

-# Decorators

-RutaProjectDecorator.name = UIMA Ruta Project Decorator

-

-# Actions

-RutaActionSet.label= UIMA Ruta Navigation

-RutaActionSet.description= UIMA Ruta Navigation Action Set

-

-OpenTypeAction.label=Open &Namespace...

-OpenTypeAction.tooltip=Open Namespace

-

-# Navigate menu

-ActionDefinition.OpenType.name= Open Namespace

-ActionDefinition.OpenType.description= Open a namespace in a Ruta editor

-

-# Search page

-RutaSearchActionSet.label = UIMA Ruta Search

-RutaSearchActionSet.description = UIMA Ruta Search Actions

-

-OpenRutaSearchPageAction.label = UIMA Ruta...

-

-SearchMenu.label = Search

-

-RutaEditorAssistancePreferencePage.name = Code Assistance 

-

-OpenTypeInHierarchyAction.label=Open Type in Hierarch&y...

-OpenTypeInHierarchyAction.tooltip=Opens a Type in a Type Hierarchy

-

-

-ActionDefinition.sourceQuickMenu.name= Show Source Quick Menu

-ActionDefinition.sourceQuickMenu.description= Shows the source quick menu

-ActionDefinition.comment.name= Comment

-ActionDefinition.comment.description= Turn the selected lines into DLTK comments

-ActionDefinition.uncomment.name= Uncomment

-ActionDefinition.uncomment.description= Uncomment the selected DLTK comment lines

-ActionDefinition.toggleComment.name= Toggle Comment

-ActionDefinition.toggleComment.description= Toggle comment the selected lines

-ActionDefinition.addBlockComment.name= Add Block Comment

-ActionDefinition.addBlockComment.description= Enclose the selection with a block comment

-ActionDefinition.removeBlockComment.name= Remove Block Comment

-ActionDefinition.removeBlockComment.description= Remove the block comment enclosing the selection

-ActionDefinition.indent.name= Indent

-ActionDefinition.indent.description= Indent

-ActionDefinition.format.name= Format

-ActionDefinition.format.description= Format the selected text

-ActionDefinition.copyQualifiedName.name= Copy Qualified Name

-ActionDefinition.copyQualifiedName.description= Copy a fully qualified name to the system clipboard

-ActionDefinition.quickformat.name= Format Element

-ActionDefinition.quickformat.description= Format enclosing text element
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/plugin.xml b/trunk/ruta-ep-ide-ui/plugin.xml
deleted file mode 100644
index 5f55b0c..0000000
--- a/trunk/ruta-ep-ide-ui/plugin.xml
+++ /dev/null
@@ -1,1236 +0,0 @@
-<?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.

--->

-

-<?eclipse version="3.4"?>

-<plugin

->

-  <extension-point id="rutaCommandProcessor" name="rutaCommandProcessor" schema="schema/rutaCommandProcessor.exsd"/>

-   <extension-point id="rutaCommandDetector" name="rutaCommandDetector" schema="schema/rutaCommandDetector.exsd"/>

-   <extension-point id="rutakeywords" name="rutakeywords" schema="schema/rutakeywords.exsd"/>

-   <extension-point id="rutaExtension" name="rutaExtension" schema="schema/rutaExtension.exsd"/>

-   <extension-point id="conditionExtension" name="conditionExtension" schema="schema/conditionExtension.exsd"/>

-   <extension-point id="actionExtension" name="actionExtension" schema="schema/actionExtension.exsd"/>

-   <extension-point id="engineExtension" name="engineExtension" schema="schema/engineExtension.exsd"/>

-   <extension-point id="booleanFunctionExtension" name="booleanFunctionExtension" schema="schema/booleanFunctionExtension.exsd"/>

-   <extension-point id="typeFunctionExtension" name="typeFunctionExtension" schema="schema/typeFunctionExtension.exsd"/>

-   <extension-point id="numberFunctionExtension" name="numberFunctionExtension" schema="schema/numberFunctionExtension.exsd"/>

-   <extension-point id="stringFunctionExtension" name="stringFunctionExtension" schema="schema/stringFunctionExtension.exsd"/>

-   <extension-point id="rutaSemanticHighlighting" name="rutaSemanticHighlighting" schema="schema/rutaSemanticHighlighting.exsd"/>

-   <extension-point id="rutaTestEngine" name="rutaTestEngine" schema="schema/rutaTestEngine.exsd"/>

-   

-   <extension

-         point="org.eclipse.core.runtime.preferences">

-      <initializer

-            class="org.apache.uima.ruta.ide.debug.RutaDebugPreferenceInitializer">

-      </initializer>

-      <initializer

-            class="org.apache.uima.ruta.ide.ui.preferences.RutaConsolePreferenceInitializer">

-      </initializer>

-      <initializer

-            class="org.apache.uima.ruta.ide.ui.RutaUIPreferenceInitializer">

-      </initializer>

-   </extension>

-   <extension

-         point="org.eclipse.dltk.debug.scriptDebugModel">

-      <debugModel

-            debugModelId="org.eclipse.dltk.debug.rutaModel"

-            natureId="org.apache.uima.ruta.ide.core.RutaNature"

-            typeFactory="org.apache.uima.ruta.ide.debug.RutaTypeFactory">

-      </debugModel>

-   </extension>

-  

-  <extension point="org.eclipse.ui.viewActions">

-    <viewContribution

-      targetID="org.eclipse.debug.ui.VariableView"

-      id="org.eclipse.jdt.debug.ui.VariableViewActions">

-      <action

-        style="toggle"

-        id="org.eclipse.jdt.debug.ui.variableViewActions.ShowStatic"

-        class="org.apache.uima.ruta.ide.ui.console.ShowFunctionsAction"

-        helpContextId="show_functions_context"

-        icon="icons/ruta.png"

-        label="%showStaticAction.label"

-        menubarPath="org.apache.uima.ruta.ide.debug.ui.menu.VariableView/ruta"

-        tooltip="%showStaticAction.tooltip">

-      </action>

-    </viewContribution>

-  </extension>

-  

-  <extension point="org.eclipse.dltk.ui.editorTextHovers">

-    <hover

-      label="%RutaVariableHoverLabel"

-      description="%RutaVariableHoverDescription"

-      class="org.apache.uima.ruta.ide.debug.ui.RutaDebugHover"

-      id="org.apache.uima.ruta.ide.debug.ui.RutaDebugHover">

-    </hover>

-  </extension>

-

-  <extension point="org.eclipse.debug.ui.launchConfigurationTabGroups">

-    <launchConfigurationTabGroup

-      type="org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationType"

-      class="org.apache.uima.ruta.ide.debug.ui.launchConfiguration.RutaTabGroup"

-      id="org.apache.uima.ruta.ide.debug.ui.launchConfiguration.RutaTabGroup">

-      <launchMode

-        mode="debug"

-        perspective="org.eclipse.debug.ui.DebugPerspective"

-        description="Debug Ruta">

-      </launchMode>

-      <launchMode

-        mode="run"

-        description="Run Ruta">

-      </launchMode>

-    </launchConfigurationTabGroup>

-  </extension>

-

-

-  <extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">

-    <launchConfigurationTypeImage

-      icon="icons/ruta.png"

-      configTypeID="org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationType"

-      id="org.apache.uima.ruta.ide.debug.ui.launchConfigurationTypeImage.localRutaScript">

-    </launchConfigurationTypeImage>

-    <!--launchConfigurationTypeImage

-      configTypeID="org.apache.uima.ruta.ide.launching.RutaRemoteLaunchConfigurationType"

-      icon="icons/ruta.png"

-      id="org.apache.uima.ruta.ide.debug.ui.launchConfigurationTypeImage.remoteRutaScript">

-      </launchConfigurationTypeImage-->

-  </extension>

-

-  <extension point="org.eclipse.debug.ui.launchShortcuts">

-    <shortcut

-      class="org.apache.uima.ruta.ide.debug.ui.launcher.RutaLaunchShortcut"

-      icon="icons/ruta.png"

-      id="org.apache.uima.ruta.ide.debug.ui.launchShortcut"

-      label="UIMA Ruta"

-      modes="run, debug">

-      <contextualLaunch>

-        <enablement>

-          <with variable="selection">

-            <count value="1" />

-            <iterate>

-              <or>

-                <test

-                  property="org.eclipse.dltk.launching.hasProjectNature"

-                  args="org.apache.uima.ruta.ide.nature" />

-              </or>

-            </iterate>

-          </with>

-        </enablement>

-      </contextualLaunch>

-      <perspective id="org.apache.uima.ruta.ide.ui.RutaPerspective">

-      </perspective>

-      <perspective id="org.eclipse.debug.ui.DebugPerspective"></perspective>

-    </shortcut>

-  </extension>

-

-  <extension point="org.eclipse.ui.popupMenus">

-    <objectContribution

-      adaptable="false"

-      id="org.apache.uima.ruta.ide.ui.console.objectContribution1"

-      nameFilter="*"

-      objectClass="org.eclipse.dltk.core.ISourceModule">

-      <action

-        class="org.apache.uima.ruta.ide.ui.console.PasteRutaToConsole"

-        id="org.apache.uima.ruta.ide.ui.console.PasteRutaTextToConsoleAction"

-        label="%RutaConsole.Actions.PasteToRutaConsole" />

-    </objectContribution>

-

-    <viewerContribution

-      id="org.apache.uima.ruta.ide.debug.ui.viewerContribution1"

-      targetID="#RutaEditorContext">

-      <!--action

-        class="org.eclipse.dltk.debug.ui.actions.WatchExpressionAction"

-        id="org.apache.uima.ruta.ide.debug.ui.WatchExpressionAction"

-        label="%WatchVariable"

-        menubarPath="additions"/-->

-      <action

-        id="org.apache.uima.ruta.ide.ui.console.PasteToRutaConsoleAction"

-        label="%RutaConsole.Actions.PasteToRutaConsole"

-        menubarPath="additions"

-        class="org.apache.uima.ruta.ide.ui.console.PasteRutaTextToConsoleAction">

-      </action>

-    </viewerContribution>

-    <viewerContribution

-      id="org.apache.uima.ruta.ide.debug.ui.rulerContribution"

-      targetID="#RutaRulerContext">

-      <action

-        class="org.eclipse.dltk.debug.ui.actions.RulerToggleWatchPointActionDelegate"

-        icon="icons/jwatch_obj.gif"

-        id="ruta.doubleClickWatchPointAction"

-        label="Toggle Watchpoint"

-        menubarPath="debug"

-        style="push">

-      </action>

-      <action

-        label="%EnableDisableBreakpoint.label"

-        id="org.apache.uima.ruta.ide.ui.actions.RulerEnableDisableBreakpointActionDelegate"

-        class="org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"

-        menubarPath="debug">

-      </action>

-

-      <action

-        label="%ToggleBreakpoint.label"

-        id="org.apache.uima.ruta.ide.ui.actions.RulerToggleBreakpointActionDelegate"

-        class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"

-        menubarPath="debug">

-      </action>

-

-      <action

-        class="org.eclipse.dltk.debug.ui.actions.ScriptBreakpointPropertiesRulerActionDelegate"

-        id="org.apache.uima.ruta.ide.debug.ui.ScriptBreakpointPropertiesRulerActionDelegate"

-        label="%BreakpointProperties.label"

-        menubarPath="group.properties" />

-    </viewerContribution>

-    

-    <viewerContribution

-      targetID="#RutaEditorContext"

-      id="org.eclipse.dltk.debug.ui.DebugPopupActions">

-      <visibility>

-        <and>

-          <systemProperty

-            name="org.eclipse.dltk.debug.ui.debuggerActive"

-            value="true">

-          </systemProperty>

-          <objectClass name="org.eclipse.jface.text.ITextSelection">

-          </objectClass>

-        </and>

-      </visibility>

-      <action

-        label="%ScriptWatch.label"

-        icon="/icons/watch_exp.gif"

-        class="org.eclipse.dltk.internal.debug.ui.actions.ScriptWatchAction"

-        menubarPath="additions"

-        id="org.apache.uima.ruta.ide.debug.ui.ScriptWatch">

-      </action>

-      <action

-        label="%ScriptInspect.label"

-        icon="/icons/insp_sbook.gif"

-        definitionId="org.eclipse.dlkt.debug.ui.commands.ScriptInspect"

-        class="org.eclipse.dltk.internal.debug.ui.actions.PopupScriptInspectAction"

-        menubarPath="additions"

-        id="org.apache.uima.ruta.ide.debug.ui.ScriptInspect">

-      </action>

-      <action

-        label="%ScriptDisplay.label"

-        icon="/icons/disp_sbook.gif"

-        definitionId="org.eclipse.dlkt.debug.ui.commands.ScriptDisplay"

-        class="org.eclipse.dltk.internal.debug.ui.actions.PopupScriptDisplayAction"

-        menubarPath="additions"

-        id="org.apache.uima.ruta.ide.debug.ui.ScriptDisplay">

-      </action>

-    </viewerContribution>

-  </extension>

-

-  <extension point="org.eclipse.ui.actionSetPartAssociations">

-    <actionSetPartAssociation

-      targetID="org.eclipse.debug.ui.launchActionSet">

-      <part id="org.apache.uima.ruta.ide.ui.editor.RutaEditor"></part>

-    </actionSetPartAssociation>

-  </extension>

-  <extension point="org.eclipse.ui.actionSetPartAssociations">

-    <actionSetPartAssociation

-      targetID="org.eclipse.debug.ui.launchActionSet">

-      <part id="org.eclipse.dltk.ui.ScriptExplorer"></part>

-      <part id="org.apache.uima.ruta.ide.ui.editor.RutaEditor"></part>

-    </actionSetPartAssociation>

-  </extension>

-  <extension point="org.eclipse.ui.console.consolePatternMatchListeners">

-    <consolePatternMatchListener

-      class="org.apache.uima.ruta.ide.ui.console.RutaConsoleTracker"

-      regex="\(file &quot;.*&quot; line .*\)"

-      id="org.apache.uima.ruta.ide.debug.ui.RutaConsoleTracker">

-      <enablement>

-        <or>

-          <test

-            property="org.eclipse.debug.ui.processTypeTest"

-            value="rutaInterpreter" />

-        </or>

-      </enablement>

-    </consolePatternMatchListener>

-

-  </extension>

-  <!--extension

-    point="org.eclipse.debug.ui.launchConfigurationTabGroups">

-    <launchConfigurationTabGroup

-    type="org.apache.uima.ruta.ide.launching.localRutaApplication"

-    class="org.apache.uima.ruta.ide.debug.ui.launchConfiguration.RutaTabGroup"

-    id="org.apache.uima.ruta.ide.debug.ui.RutaTabGroup">

-    <launchMode 

-    mode="debug"

-    perspective="org.eclipse.debug.ui.DebugPerspective"

-    description="Debug">

-    </launchMode>

-    </launchConfigurationTabGroup>

-    </extension-->   

-

-  <extension point="org.eclipse.ui.editorActions">

-    <editorContribution

-      targetID="org.apache.uima.ruta.ide.ui.editor.RutaEditor"

-      id="org.apache.uima.ruta.ide.debug.RutaEditor.BreakpointRulerActions">

-

-      <action

-        label="Toggle Breakpoint"

-        class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"

-        style="push"

-        actionID="RulerDoubleClick"

-        id="ruta.doubleClickBreakpointAction" />

-

-

-    </editorContribution>

-  </extension>

-  <extension point="org.eclipse.ui.console.consoleFactories">

-    <consoleFactory

-      class="org.apache.uima.ruta.ide.ui.console.RutaConsoleFactory"

-      label="%RutaConsole.Console" />

-  </extension>

-

-  <extension point="org.eclipse.dltk.console.ui.scriptConsole">

-    <scriptConsole

-      class="org.apache.uima.ruta.ide.ui.console.RutaConsoleFactory"

-      natureID="org.apache.uima.ruta.ide.nature" />

-  </extension>

-  <extension point="org.eclipse.dltk.ui.buildpathContainerPage">

-    <buildpathContainerPath

-      class="org.apache.uima.ruta.ide.debug.ui.interpreters.RutaInterpreterContainerWizardPage"

-      id="org.apache.uima.ruta.ide.launching.INTERPRETER_CONTAINER"

-      name="UIMA Ruta Interpreter Libraries"

-      nature="org.apache.uima.ruta.ide.nature" />

-  </extension>

-  <extension point="org.eclipse.ui.perspectiveExtensions">

-    <perspectiveExtension

-      targetID="org.apache.uima.ruta.ide.ui.RutaPerspective">

-      <actionSet id="org.eclipse.debug.ui.breakpointActionSet"></actionSet>

-    </perspectiveExtension>

-  </extension>

-

-  <extension point="org.eclipse.debug.ui.debugModelPresentations">

-    <debugModelPresentation

-      class="org.apache.uima.ruta.ide.debug.ui.RutaDebugModelPresentation"

-      id="org.eclipse.dltk.debug.rutaModel" />

-  </extension>

-

-  <extension point="org.eclipse.debug.core.watchExpressionDelegates">

-    <watchExpressionDelegate

-      debugModel="org.eclipse.dltk.debug.rutaModel"

-      delegateClass="org.eclipse.dltk.debug.internal.core.model.ScriptWatchExpressionDelegate">

-    </watchExpressionDelegate>

-  </extension>

-

-  <extension point="org.eclipse.debug.ui.debugModelContextBindings">

-    <modelContextBinding

-      contextId="org.eclipse.dltk.debug.ui.debugging"

-      debugModelId="org.eclipse.dltk.debug.rutaModel" />

-  </extension>

-

-  <extension point="org.eclipse.core.runtime.adapters">

-    <factory

-      adaptableType="org.apache.uima.ruta.ide.ui.editor.RutaEditor"

-      class="org.apache.uima.ruta.ide.debug.ui.RutaEditorDebugAdapterFactory">

-      <adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget" />

-      <adapter type="org.eclipse.debug.ui.actions.IRunToLineTarget" />

-    </factory>

-  </extension>

-

-  <extension point="org.eclipse.ui.commands">

-    <command

-      id="org.apache.uima.ruta.ide.debug.ui.commands.toggleGlobalVariables"

-      description="%showGlobalVarsCommand.name"

-      name="%showGlobalVarsCommand.description" />

-    <command

-      id="org.apache.uima.ruta.ide.debug.ui.commands.toggleClassVariables"

-      description="%showClassVarsCommand.name"

-      name="%showClassVarsCommand.description" />

-    <command

-      id="org.apache.uima.ruta.ide.debug.ui.commands.toggleLocalVariables"

-      description="%showLocalVarsCommand.name"

-      name="%showLocalVarsCommand.description" />      

-  </extension>

-

-  <extension point="org.eclipse.ui.menus">

-    <menuContribution locationURI="menu:org.eclipse.debug.ui.VariableView">

-      <menu

-        label="%variablesViewMenu.name"

-        id="org.apache.uima.ruta.ide.debug.ui.menu.VariableView" />

-    </menuContribution>

-    <menuContribution locationURI="menu:org.apache.uima.ruta.ide.debug.ui.menu.VariableView">

-      <command 

-        commandId="org.apache.uima.ruta.ide.debug.ui.commands.toggleGlobalVariables"

-        tooltip="%showGlobalVarsCommand.tooltip"     

-        style="toggle" />

-      <command 

-        commandId="org.apache.uima.ruta.ide.debug.ui.commands.toggleClassVariables"

-        tooltip="%showClassVarsCommand.tooltip"      

-        style="toggle" />       

-      <command 

-        commandId="org.apache.uima.ruta.ide.debug.ui.commands.toggleLocalVariables"

-        tooltip="%showLocalVarsCommand.tooltip" 

-        style="toggle" />                      

-    </menuContribution>  

-  </extension>

-

-  <extension point="org.eclipse.ui.handlers">

-    <handler 

-      commandId="org.apache.uima.ruta.ide.debug.ui.commands.toggleGlobalVariables"

-      class="org.apache.uima.ruta.ide.debug.ui.handlers.ToggleGlobalVariablesHandler" />

-    <handler 

-      commandId="org.apache.uima.ruta.ide.debug.ui.commands.toggleClassVariables"

-      class="org.apache.uima.ruta.ide.debug.ui.handlers.ToggleClassVariablesHandler" />

-    <handler 

-      commandId="org.apache.uima.ruta.ide.debug.ui.commands.toggleLocalVariables"

-      class="org.apache.uima.ruta.ide.debug.ui.handlers.ToggleLocalVariablesHandler" />      

-  </extension>

-  <extension point="org.eclipse.dltk.launching.debuggingEngine">

-    <engineContribution natureId="org.apache.uima.ruta.ide.nature">

-      <engine

-        class="org.apache.uima.ruta.ide.debugger.RutaDebuggerRunnerFactory"

-        description="%DebuggingEngine.description"

-        id="org.apache.uima.ruta.ide.debugger"

-        name="%DebuggingEngine.name"

-        priority="0"

-        propertyPageId="org.apache.uima.ruta.ide.propertyPage.debug.engines.debugger"

-        preferencePageId="org.apache.uima.ruta.ide.preferences.debug.engines.debugger">

-      </engine>

-    </engineContribution>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.launching.interpreterInstallTypes">

-     <interpreterInstallType

-           class="org.apache.uima.ruta.ide.launching.GenericRutaInstallType"

-           id="org.apache.uima.ruta.ide.debug.ui.launcher.GenericRutaInstallType">

-     </interpreterInstallType>

-  </extension>

-  <extension

-        point="org.eclipse.debug.core.launchDelegates">

-     <launchDelegate

-           delegate="org.apache.uima.ruta.ide.launching.JavaLocalApplicationLaunchConfigurationDelegate"

-           id="com.Instantiations.profiler.localJavaApplicationDelegate"

-           modes="debug"

-           name="Debugging with Ruta debug support"

-           type="org.eclipse.jdt.launching.localJavaApplication">

-     </launchDelegate>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.console.scriptInterpreter">

-     <scriptInterpreter

-           class="org.apache.uima.ruta.ide.ui.console.RutaInterpreter"

-           natureID="org.apache.uima.ruta.ide.nature">

-     </scriptInterpreter>

-  </extension>

-  <extension

-        point="org.eclipse.debug.ui.launchConfigurationTypeImages">

-     <launchConfigurationTypeImage

-           configTypeID="org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationType"

-           icon="$nl$/icons/ruta.png"

-           id="org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationTypeImage">

-     </launchConfigurationTypeImage>

-  </extension>

-  <extension

-        point="org.eclipse.debug.core.launchConfigurationTypes">

-     <launchConfigurationType

-           delegate="org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationDelegate"

-           id="org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationType"

-           modes="run,debug"

-           name="UIMA Ruta"

-           public="true"

-           sourceLocatorId="rutaSourceLocator"

-           sourcePathComputerId="rutaSourcePathComputer">

-     </launchConfigurationType>

-  </extension>

-  <extension

-        point="org.eclipse.debug.core.sourcePathComputers">

-     <sourcePathComputer

-           class="org.apache.uima.ruta.ide.launching.RutaSourcePathComputer"

-           id="rutaSourcePathComputer">

-     </sourcePathComputer>

-  </extension>

-  <extension

-        point="org.eclipse.debug.core.sourceLocators">

-     <sourceLocator

-           class="org.apache.uima.ruta.ide.launching.RutaSourceLookupDirector"

-           id="rutaSourceLocator"

-           name="org.apache.uima.ruta.ide.launching.rutaSourceLocator">

-     </sourceLocator>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.launching.debuggingEngine">

-     <engineContribution

-           natureId="org.apache.uima.ruta.ide.nature">

-        <selector

-              class="org.apache.uima.ruta.ide.launching.RutaDebuggingEngineSelector">

-        </selector>

-     </engineContribution>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.launching.interpreterInstalls">

-     <interpreterInstall

-           home="${eclipse_home}"

-           id="org.apache.uima.ruta.ide.launching.embeddedRuta"

-           interpreterInstallType="org.apache.uima.ruta.ide.debug.ui.launcher.GenericRutaInstallType"

-           name="UIMA Ruta Interpreter">

-     </interpreterInstall>

-  </extension>

-  <extension

-        point="org.eclipse.core.runtime.preferences">

-     <initializer

-           class="org.apache.uima.ruta.ide.formatter.RutaFormatterPreferenceInitializer">

-     </initializer>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.ui.formatterFactory">

-     <engineContribution

-           natureId="org.apache.uima.ruta.ide.nature">

-        <formatterFactory

-              class="org.apache.uima.ruta.ide.formatter.RutaFormatterFactory"

-              description="Default Ruta formatter providing whitespace control and line wrapping"

-              id="org.apache.uima.ruta.ide.formatter.formatterFactory"

-              name="Default Ruta Formatter"

-              priority="10">

-        </formatterFactory>

-     </engineContribution>

-  </extension>

-  <extension

-        id="org.apache.uima.ruta.ide.ui.editor.DocumentSetupParticipant"

-        name="%documentSetupParticipantName"

-        point="org.eclipse.core.filebuffers.documentSetup">

-     <participant

-           class="org.apache.uima.ruta.ide.ui.editor.RutaDocumentSetupParticipant">

-     </participant>

-  </extension>

-  <extension

-        point="org.eclipse.core.runtime.adapters">

-     <factory

-           adaptableType="org.apache.uima.ruta.ide.ui.navigation.ElementsView$ElementList"

-           class="org.apache.uima.ruta.ide.ui.navigation.ElementListAdapterFactory">

-        <adapter

-              type="org.eclipse.dltk.core.IModelElement">

-        </adapter>

-     </factory>

-  </extension>

-  <extension

-        point="org.eclipse.search.searchPages">

-     <page

-           canSearchEnclosingProjects="true"

-           class="org.apache.uima.ruta.ide.ui.search.RutaSearchPage"

-           enabled="true"

-           extensions="ruta:90, exp:30"

-           icon="$nl$/icons/search_obj.png"

-           id="org.eclipse.dltk.ui.RutaSearchPage"

-           label="%RutaSearchPage.label"

-           showScopeSection="true"

-           sizeHint="460,160">

-     </page>

-  </extension>

-  <extension

-        point="org.eclipse.ui.contexts">

-     <context

-           description="%RutaEditContext.description"

-           id="org.apache.uima.ruta.ide.ui.rutaEditorScope"

-           name="%RutaEditContext.name"

-           parentId="org.eclipse.dltk.ui.scriptEditorScope">

-     </context>

-  </extension>

-  <extension

-        point="org.eclipse.ui.perspectives">

-     <perspective

-           class="org.apache.uima.ruta.ide.ui.RutaPerspective"

-           icon="$nl$/icons/ruta_persp.png"

-           id="org.apache.uima.ruta.ide.ui.RutaPerspective"

-           name="%RutaPerspective.name">

-     </perspective>

-     <perspective

-           class="org.apache.uima.ruta.ide.ui.ExplainPerspective"

-           icon="icons/explain.png"

-           id="org.apache.uima.ruta.ide.ui.explainPerspective"

-           name="UIMA Ruta Explain">

-     </perspective>

-  </extension>

-  <extension

-        point="org.eclipse.ui.perspectiveExtensions">

-     <perspectiveExtension

-           targetID="org.eclipse.ui.resourcePerspective">

-        <perspectiveShortcut

-              id="org.apache.uima.ruta.ide.ui.RutaPerspective">

-        </perspectiveShortcut>

-     </perspectiveExtension>

-     <perspectiveExtension

-           targetID="org.apache.uima.ruta.ide.ui.RutaPerspective">

-        <perspectiveShortcut

-              id="org.apache.uima.ruta.ide.ui.RutaPerspective">

-        </perspectiveShortcut>

-     </perspectiveExtension>

-     <perspectiveExtension

-           targetID="org.apache.uima.ruta.ide.ui.RutaPerspective">

-        <perspectiveShortcut

-              id="org.eclipse.debug.ui.DebugPerspective">

-        </perspectiveShortcut>

-     </perspectiveExtension>

-     <perspectiveExtension

-           targetID="org.eclipse.debug.ui.DebugPerspective">

-        <perspectiveShortcut

-              id="org.apache.uima.ruta.ide.ui.RutaPerspective">

-        </perspectiveShortcut>

-     </perspectiveExtension>

-     <perspectiveExtension

-           targetID="org.eclipse.debug.ui.DebugPerspective">

-        <actionSet

-              id="org.eclipse.dltk.ui.DLTKActionSet">

-        </actionSet>

-     </perspectiveExtension>

-     <perspectiveExtension

-           targetID="org.apache.uima.ruta.ide.ui.RutaPerspective">

-        <showInPart

-              id="org.eclipse.dltk.ui.ScriptExplorer">

-        </showInPart>

-     </perspectiveExtension>

-     <perspectiveExtension

-           targetID="org.eclipse.debug.ui.DebugPerspective">

-        <showInPart

-              id="org.eclipse.dltk.ui.ScriptExplorer">

-        </showInPart>

-     </perspectiveExtension>

-  </extension>

-  <extension

-        point="org.eclipse.ui.newWizards">

-     <category

-           id="org.apache.uima.ruta.ide.ui"

-           name="%RutaWizardsCategory.name">

-     </category>

-     <wizard

-           category="org.apache.uima.ruta.ide.ui"

-           class="org.apache.uima.ruta.ide.ui.wizards.RutaProjectCreationWizard"

-           finalPerspective="org.apache.uima.ruta.ide.ui.RutaPerspective"

-           icon="$nl$/icons/newprj_wiz.png"

-           id="org.apache.uima.ruta.ide.ui.wizards.RutaProjectWizard"

-           name="UIMA Ruta Project"

-           preferredPerspectives="org.apache.uima.ruta.ide.ui.RutaPerspective"

-           project="true">

-        <description>

-           Creates new Ruta project.

-        </description>

-     </wizard>

-     <wizard

-           category="org.apache.uima.ruta.ide.ui"

-           class="org.apache.uima.ruta.ide.ui.wizards.RutaPackageCreationWizard"

-           icon="icons/newpack_wiz.gif"

-           id="org.apache.uima.ruta.ide.ui.wizards.NewPackageCreationWizard"

-           name="%NewRutaPackage.label">

-        <description>

-           %NewRutaPackage.description

-        </description>

-     </wizard>

-     <wizard

-           category="org.apache.uima.ruta.ide.ui"

-           class="org.apache.uima.ruta.ide.ui.wizards.RutaFileCreationWizard"

-           icon="$nl$/icons/newfile_wiz.png"

-           id="org.apache.uima.ruta.ide.ui.wizards.RutaFileCreationWizard"

-           name="%NewRutaFile.label">

-        <description></description>

-     </wizard>

-  </extension>

-  <extension

-        point="org.eclipse.ui.editors">

-     <editor

-           class="org.apache.uima.ruta.ide.ui.editor.RutaEditor"

-           contributorClass="org.eclipse.dltk.internal.ui.editor.SourceModuleEditorActionContributor"

-           default="true"

-           extensions="ruta"

-           icon="$nl$/icons/ruta_obj.png"

-           id="org.apache.uima.ruta.ide.ui.editor.RutaEditor"

-           name="%RutaEditor.name">

-        <contentTypeBinding

-              contentTypeId="org.apache.uima.ruta.ide.rutaContentType">

-        </contentTypeBinding>

-     </editor>

-  </extension>

-  <extension

-        point="org.eclipse.ui.editors.templates">

-     <contextType

-           class="org.apache.uima.ruta.ide.ui.templates.RutaUniversalTemplateContextType"

-           id="rutaUniversalTemplateContextType"

-           name="%RutaTemplateContext.name">

-     </contextType>

-     <include

-           file="templates/templates.xml">

-     </include>

-  </extension>

-  <extension

-        point="org.eclipse.ui.views">

-     <category

-           id="org.apache.uima.ruta.ide.ui"

-           name="%RutaViewsCategory.name">

-     </category>

-     <view

-           category="org.apache.uima.ruta.ide.ui"

-           class="org.apache.uima.ruta.ide.ui.infoviews.RutaDocumentationView"

-           icon="$nl$/icons/rutadoc.png"

-           id="org.apache.uima.ruta.ide.ui.RutaDocumentationView"

-           name="%RutaDocumentationView.name">

-     </view>

-  </extension>

-  <extension

-        point="org.eclipse.ui.actionSets">

-     <actionSet

-           description="%RutaActionSet.description"

-           id="org.apache.uima.ruta.ide.ui.RutaActionSet"

-           label="%RutaActionSet.label"

-           visible="false">

-        <action

-              class="org.apache.uima.ruta.ide.ui.actions.RutaOpenTypeAction"

-              definitionId="org.apache.uima.ruta.ide.ui.navigate.open.type"

-              icon="icons/opentype.gif"

-              id="openType"

-              label="%OpenTypeAction.label"

-              menubarPath="navigate/open.ext2"

-              toolbarPath="org.eclipse.search.searchActionSet/Search"

-              tooltip="%OpenTypeAction.tooltip">

-        </action>

-        <action

-              class="org.apache.uima.ruta.ide.ui.actions.RutaOpenTypeInHierarchyAction"

-              definitionId="org.apache.uima.ruta.ide.ui.navigate.open.type.in.hierarchy"

-              id="openTypeInHierarchy"

-              label="%OpenTypeInHierarchyAction.label"

-              menubarPath="navigate/open.ext2"

-              tooltip="%OpenTypeInHierarchyAction.tooltip">

-        </action>

-     </actionSet>

-  </extension>

-  <extension

-        point="org.eclipse.ui.actionSets">

-     <actionSet

-           description="%RutaSearchActionSet.description"

-           id="org.apache.uima.ruta.ide.ui.SearchActionSet"

-           label="%RutaSearchActionSet.label"

-           visible="false">

-        <menu

-              id="org.eclipse.search.menu"

-              label="%SearchMenu.label"

-              path="navigate">

-           <groupMarker

-                 name="dialogRutaGroup">

-           </groupMarker>

-        </menu>

-        <action

-              class="org.apache.uima.ruta.ide.ui.actions.OpenRutaSearchPageAction"

-              icon="$nl$/icons/search_obj.png"

-              id="org.apache.uima.ruta.ide.ui.actions.OpenRutaSearchPage"

-              label="%OpenRutaSearchPageAction.label"

-              menubarPath="org.eclipse.search.menu/dialogRutaGroup">

-        </action>

-     </actionSet>

-  </extension>

-  <extension

-        point="org.eclipse.ui.bindings">

-     <key

-           commandId="org.apache.uima.ruta.ide.ui.navigate.open.type"

-           contextId="org.apache.uima.ruta.ide.ui.rutaEditorScope"

-           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-           sequence="M1+M2+T">

-     </key>

-     <key

-           commandId="org.eclipse.dltk.ui.edit.text.script.format"

-           contextId="org.apache.uima.ruta.ide.ui.rutaEditorScope"

-           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-           sequence="M1+M2+F">

-     </key>

-     <key

-           commandId="org.eclipse.dltk.ui.edit.text.script.format"

-           contextId="org.apache.uima.ruta.ide.ui.rutaEditorScope"

-           platform="gtk"

-           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-           sequence="ESC CTRL+F">

-     </key>

-  </extension>

-  <extension

-        point="org.eclipse.ui.decorators">

-     <decorator

-           adaptable="false"

-           class="org.apache.uima.ruta.ide.ui.RutaProjectDecorator"

-           id="org.apache.uima.ruta.ide.decorators.projectdecorator"

-           label="%RutaProjectDecorator.name"

-           lightweight="true"

-           location="TOP_LEFT"

-           state="true">

-        <enablement>

-           <or>

-              <objectClass

-                    name="org.eclipse.core.resources.IProject">

-              </objectClass>

-              <objectClass

-                    name="org.eclipse.dltk.core.IScriptProject">

-              </objectClass>

-           </or>

-        </enablement>

-     </decorator>

-  </extension>

-  <extension

-        point="org.eclipse.ui.commands">

-     <command

-           categoryId="org.eclipse.ui.category.navigate"

-           description="%ActionDefinition.OpenType.description"

-           id="org.apache.uima.ruta.ide.ui.navigate.open.type"

-           name="%ActionDefinition.OpenType.name">

-     </command>

-  </extension>

-  <extension

-        point="org.eclipse.ui.menus">

-     <menuContribution

-           locationURI="menu:org.eclipse.dltk.ui.source.menu?after=editGroup">

-        <command

-              commandId="org.eclipse.dltk.ui.edit.text.script.format">

-           <visibleWhen>

-              <with

-                    variable="activeContexts">

-                 <iterate

-                       operator="or">

-                    <equals

-                          value="org.apache.uima.ruta.ide.ui.rutaEditorScope">

-                    </equals>

-                 </iterate>

-              </with>

-           </visibleWhen>

-        </command>

-     </menuContribution>

-  </extension>

-  <extension

-        point="org.eclipse.ui.actionSetPartAssociations">

-     <actionSetPartAssociation

-           targetID="org.eclipse.ui.edit.text.actionSet.presentation">

-        <part

-              id="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-        </part>

-     </actionSetPartAssociation>

-     <actionSetPartAssociation

-           targetID="org.eclipse.dltk.ui.A_OpenActionSet">

-        <part

-              id="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-        </part>

-     </actionSetPartAssociation>

-     <actionSetPartAssociation

-           targetID="org.eclipse.dltk.ui.ScriptCodingActionSet">

-        <part

-              id="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-        </part>

-     </actionSetPartAssociation>

-  </extension>

-  <extension

-        id="RutaScriptNoTypeCompletionProposalComputer"

-        point="org.eclipse.dltk.ui.scriptCompletionProposalComputer">

-     <scriptCompletionProposalComputer

-           categoryId="org.eclipse.dltk.ui.scriptNoTypeProposalCategory"

-           class="org.apache.uima.ruta.ide.ui.text.completion.RutaNoTypeCompletionProposalComputer"

-           toolkitId="org.apache.uima.ruta.ide.nature">

-        <partition

-              type="__dftl_partition_content_type">

-        </partition>

-        <partition

-              type="__ruta_string">

-        </partition>

-     </scriptCompletionProposalComputer>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.ui.scriptDocumentationProviders">

-     <provider

-           class="org.apache.uima.ruta.ide.ui.documentation.RutaCommentDocumentationProvider"

-           id="org.apache.uima.ruta.ide.ui.RutaCommentDocumentationProvider"

-           nature="org.apache.uima.ruta.ide.nature">

-     </provider>

-     <provider

-           class="org.apache.uima.ruta.ide.ui.documentation.RutaPagesDocumentationProvider"

-           id="org.apache.uima.ruta.ide.ruta.ui.RutaPagesDocumentationProvider"

-           nature="org.apache.uima.ruta.ide.nature">

-     </provider>

-     <provider

-           class="org.apache.uima.ruta.ide.ui.documentation.RutaActionDocumentationProvider"

-           id="org.apache.uima.ruta.ide.ui.RutaActionDocumentationProvider"

-           nature="org.apache.uima.ruta.ide.nature">

-     </provider>

-     <provider

-           class="org.apache.uima.ruta.ide.ui.documentation.RutaConditionDocumentationProvider"

-           id="org.apache.uima.ruta.ide.ui.RutaConditionDocumentationProvider"

-           nature="org.apache.uima.ruta.ide.nature">

-     </provider>

-     <provider

-           class="org.apache.uima.ruta.ide.ui.documentation.DescriptorDocumentationProvider"

-           id="org.apache.uima.ruta.ide.ui.DescriptorDocumentationProvider"

-           nature="org.apache.uima.ruta.ide.nature">

-     </provider>

-     <provider

-           class="org.apache.uima.ruta.ide.ui.documentation.RutaFunctionDocumentationProvider"

-           id="org.apache.uima.ruta.ide.ui.RutaFunctionDocumentationProvider"

-           nature="org.apache.uima.ruta.ide.nature">

-     </provider>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.ui.language">

-     <language

-           class="org.apache.uima.ruta.ide.ui.RutaUILanguageToolkit"

-           nature="org.apache.uima.ruta.ide.nature">

-     </language>

-  </extension>

-  <extension

-        point="org.eclipse.ui.actionSetPartAssociations">

-     <actionSetPartAssociation

-           targetID="org.apache.uima.ruta.ide.ui.SearchActionSet">

-        <part

-              id="org.eclipse.dltk.ui.ScriptExplorer">

-        </part>

-        <part

-              id="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-        </part>

-        <part

-              id="org.eclipse.search.SearchResultView">

-        </part>

-     </actionSetPartAssociation>

-  </extension>

-  <extension

-        point="org.eclipse.ui.ide.markerResolution">

-     <markerResolutionGenerator

-           class="org.apache.uima.ruta.ide.ui.text.RutaRequireMarkerResolutionGenerator"

-           markerType="org.eclipse.dltk.core.problem">

-     </markerResolutionGenerator>

-  </extension>

-  <extension

-        point="org.eclipse.ui.editorActions">

-     <editorContribution

-           id="org.apache.uima.ruta.ide.ui.RutaEditor.ruler.actions"

-           targetID="org.apache.uima.ruta.ide.ui.editor.RutaEditor">

-        <action

-              actionID="RulerClick"

-              class="org.apache.uima.ruta.ide.ui.actions.RutaSelectRulerAction"

-              id="org.apache.uima.ruta.ide.ui.rutaeditor.RutaSelectRulerAction"

-              label="UIMA Ruta Selection Ruler action">

-        </action>

-     </editorContribution>

-  </extension>

-  <extension

-        point="org.eclipse.ui.commands">

-     <command

-           categoryId="org.eclipse.dltk.ui.category.source"

-           description="%ActionDefinition.addBlockComment.description"

-           id="org.eclipse.dltk.ui.edit.text.script.add.block.comment"

-           name="%ActionDefinition.addBlockComment.name">

-     </command>

-     <command

-           categoryId="org.eclipse.dltk.ui.category.source"

-           description="%ActionDefinition.removeBlockComment.description"

-           id="org.eclipse.dltk.ui.edit.text.script.remove.block.comment"

-           name="%ActionDefinition.removeBlockComment.name">

-     </command>

-     <command

-           categoryId="org.eclipse.dltk.ui.category.source"

-           description="%ActionDefinition.indent.description"

-           id="org.eclipse.dltk.ui.edit.text.script.indent"

-           name="%ActionDefinition.indent.name">

-     </command>

-     <command

-           categoryId="org.eclipse.dltk.ui.category.source"

-           description="%ActionDefinition.format.description"

-           id="org.eclipse.dltk.ui.edit.text.script.format"

-           name="%ActionDefinition.format.name">

-     </command>

-     <command

-           categoryId="org.eclipse.dltk.ui.category.source"

-           description="%ActionDefinition.quickformat.description"

-           id="org.eclipse.dltk.ui.edit.text.script.quick.format"

-           name="%ActionDefinition.quickformat.name">

-     </command>

-  </extension>

-  <extension

-        point="org.eclipse.dltk.ui.formatterFactory">

-     <engineContribution

-           natureId="org.apache.uima.ruta.ide.nature">

-        <selector

-              class="org.eclipse.dltk.core.PreferenceBasedContributionSelector">

-           <parameter

-                 name="qualifier"

-                 value="org.apache.uima.ruta.ide.ui">

-           </parameter>

-           <parameter

-                 name="key"

-                 value="formatterId">

-           </parameter>

-        </selector>

-     </engineContribution>

-  </extension>

-  <extension

-        point="org.eclipse.ui.propertyPages">

-     <page

-           category="org.apache.uima.ruta.ide.propertyPage"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaBuildpathPropertyPage"

-           id="org.apache.uima.ruta.ide.ui.BuildpathProperties"

-           name="%RutaBuildPathPropertyPage.name">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-        <keywordReference

-              id="org.eclipse.dltk.ui.buildpath">

-        </keywordReference>

-     </page>

-     <page

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaPropertyPage"

-           id="org.apache.uima.ruta.ide.propertyPage"

-           name="%RutaPropertyPage.name">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-     </page>

-     <!--

-     <page

-           category="org.apache.uima.ruta.ide.propertyPage"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaTodoTaskPreferencePage"

-           id="org.apache.uima.ruta.ide.propertyPage.todo"

-           name="%RutaTodoPropertyPage.name">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-     </page>

-     -->

-  </extension>

-  <extension

-        point="org.eclipse.ui.propertyPages">

-     <page

-           category="org.apache.uima.ruta.ide.propertyPage"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaFormatterPreferencePage"

-           id="org.apache.uima.ruta.ide.propertyPage.formatter"

-           name="UIMA Ruta Formatter">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-     </page>

-  </extension>

-  <extension

-        point="org.eclipse.ui.preferencePages">

-     <page

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaGlobalPreferencePage"

-           id="org.apache.uima.ruta.ide.preferences"

-           name="%RutaPreferencePage.name">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaEditorPreferencesPage"

-           id="org.apache.uima.ruta.ide.preferences.editor"

-           name="%RutaEditorPreferencePage.name">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences.editor"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaEditorHoverPreferencePage"

-           id="org.apache.uima.ruta.ide.preferences.editor.hovers"

-           name="%RutaEditorHoversPreferencePage.name">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences.editor"

-           class="org.apache.uima.ruta.ide.ui.templates.RutaCodeTemplatesPreferencePage"

-           id="org.apache.uima.ruta.ide.preferences.templates"

-           name="%RutaCodeTemplatesPreferencePage.name">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences.editor"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaEditorSyntaxColoringPreferencePage"

-           id="org.apache.uima.ruta.ide.ui.editor.SyntaxColoring"

-           name="%RutaEditorSyntaxColoringPreferencePage.name">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences.editor"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaSmartTypingPreferencePage"

-           id="org.apache.uima.ruta.ide.ui.editor.SmartTyping"

-           name="%RutaEditorSmartTypingPreferencePage.name">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences.editor"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaFoldingPreferencePage"

-           id="org.apache.uima.ruta.ide.ui.editor.RutaFolding"

-           name="%RutaEditorFoldingPreferencePage.name">

-     </page>

-     <!--

-     <page

-           category="org.apache.uima.ruta.ide.preferences"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaTodoTaskPreferencePage"

-           id="org.apache.uima.ruta.ide.ui.editor.TodoTasks"

-           name="%RutaTaskTags.name">

-     </page>

-     -->

-     <page

-           category="org.apache.uima.ruta.ide.preferences.editor"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaEditorAssistancePreferencePage"

-           id="org.apache.uima.ruta.ide.ui.editor.Assistence"

-           name="%RutaEditorAssistancePreferencePage.name">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaBuilderPreferencePage"

-           id="org.apache.uima.ruta.ide.preferences.builder"

-           name="Builder">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences.editor"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaFormatterPreferencePage"

-           id="org.apache.uima.ruta.ide.preferences.formatter"

-           name="Formatter">

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.preferences"

-           class="org.apache.uima.ruta.ide.ui.preferences.RutaProjectPreferencePage"

-           id="org.apache.uima.ruta.ide.preferences.project"

-           name="Project Management">

-     </page>

-  </extension>

-

-  <extension point="org.eclipse.ui.preferencePages">

-    <page

-      category="org.apache.uima.ruta.ide.preferences"

-      class="org.apache.uima.ruta.ide.debug.ui.interpreters.RutaInterpreterPreferencePage"

-      id="org.eclipse.dltk.debug.ui.RutaInterpreters"

-      name="%Interpreters.PreferencePage" />

-      <!--

-    <page

-      category="org.apache.uima.ruta.ide.preferences"

-      class="org.apache.uima.ruta.ide.debug.ui.preferences.RutaDebugPreferencePage"

-      id="org.apache.uima.ruta.ide.preferences.debug"

-      name="%Debug.PreferencePage" />

-    <page

-      category="org.apache.uima.ruta.ide.preferences.debug"

-      class="org.apache.uima.ruta.ide.debug.ui.preferences.RutaDebuggingEnginePreferencePage"

-      id="org.apache.uima.ruta.ide.preferences.debug.engines"

-      name="%Engines.PreferencePage" />

-    <page

-      category="org.apache.uima.ruta.ide.preferences"

-      class="org.apache.uima.ruta.ide.ui.preferences.RutaConsolePreferences"

-      id="org.apache.uima.ruta.ide.ui.console.preferences.RutaConsolePreferences"

-      name="%Console.PreferencePage" />

-    <page

-          category="org.apache.uima.ruta.ide.preferences.debug.engines"

-          class="org.apache.uima.ruta.ide.debugger.preferences.RutaDebuggerPreferencePage"

-          id="org.apache.uima.ruta.ide.preferences.debug.engines.debugger"

-          name="%PreferencePage.name">

-    </page>

-      -->

-  </extension>

-

-<!--

-  <extension point="org.eclipse.ui.propertyPages">

-    <page

-      class="org.apache.uima.ruta.ide.debugger.preferences.RutaDebuggerPreferencePage"

-      category="org.apache.uima.ruta.ide.propertyPage.debug.engines"

-      id="org.apache.uima.ruta.ide.propertyPage.debug.engines.debugger"

-      name="%PropertyPage.name">

-      <enabledWhen>

-        <adapt type="org.eclipse.core.resources.IProject">

-          <test

-            property="org.eclipse.core.resources.projectNature"

-            value="org.apache.uima.ruta.ide.nature" />

-        </adapt>

-      </enabledWhen>

-    </page>

-  </extension>

-  -->

-<!--

-  <extension

-        point="org.eclipse.ui.propertyPages">

-     <page

-           category="org.apache.uima.ruta.ide.propertyPage"

-           class="org.apache.uima.ruta.ide.debug.ui.preferences.RutaDebugPreferencePage"

-           id="org.apache.uima.ruta.ide.propertyPage.debug"

-           name="%Debug.PropertyPage">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.propertyPage.debug"

-           class="org.apache.uima.ruta.ide.debug.ui.preferences.RutaDebuggingEnginePreferencePage"

-           id="org.apache.uima.ruta.ide.propertyPage.debug.engines"

-           name="%Engines.PropertyPage">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-     </page>

-  </extension>

-  -->

-  <extension

-        point="org.apache.uima.ruta.ide.rutaSemanticHighlighting">

-     <highlightingExtension

-           class="org.apache.uima.ruta.ide.ui.DefaultRutaSemanticHighlightingExtension">

-     </highlightingExtension>

-  </extension>

-     <extension

-         point="org.eclipse.dltk.validators.core.validator">

-      <validatorType

-            class="org.apache.uima.ruta.ide.validator.CheckValidator"

-            id="org.apache.uima.ruta.ide.validator.checkvalidator"

-            nature="org.apache.uima.ruta.ide.nature">

-      </validatorType>

-   </extension>

-     <extension

-           point="org.eclipse.dltk.core.buildParticipant">

-        <buildParticipant

-              class="org.apache.uima.ruta.ide.validator.CheckValidator"

-              id="org.apache.uima.ruta.ide.validator.Checker"

-              name="UIMA Ruta Validator"

-              nature="org.apache.uima.ruta.ide.nature">

-        </buildParticipant>

-     </extension>

-   <!--

-     <extension

-           point="org.eclipse.dltk.ui.buildpathContainerPage">

-        <buildpathContainerPage

-              class="org.apache.uima.ruta.ide.ui.wizards.RutaJavaContainerPage"

-              id="org.apache.uima.ruta.ide.java.page"

-              name="Java Library"

-              nature="org.apache.uima.ruta.ide.nature">

-        </buildpathContainerPage>

-     </extension>

-     -->
-</plugin>

diff --git a/trunk/ruta-ep-ide-ui/pom.xml b/trunk/ruta-ep-ide-ui/pom.xml
deleted file mode 100644
index 8800635..0000000
--- a/trunk/ruta-ep-ide-ui/pom.xml
+++ /dev/null
@@ -1,350 +0,0 @@
-<?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.    

--->

-

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-ep-ide-ui</artifactId>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-  </properties>

-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <url>${uimaWebsiteUrl}</url>

-  <description>Provides the UIMA Ruta development environment for Eclipse</description>

-  <dependencies>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>launching</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.validators</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.validators</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>console</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.console</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>debug</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.debug</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>formatter</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>testing</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>runtime</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>jobs</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>resources</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse</groupId>

-      <artifactId>search</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.swt</groupId>

-      <artifactId>org.eclipse.swt.win32.win32.x86</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>ide</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>views</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>console</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui.workbench</groupId>

-      <artifactId>texteditor</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jface</groupId>

-      <artifactId>text</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>variables</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jdt</groupId>

-      <artifactId>launching</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jdt</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jdt.debug</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>contenttype</artifactId>

-      <version>[3.4.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>preferences</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>app</artifactId>

-      <version>[1.3.0,2.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.emf.ecore</groupId>

-      <artifactId>xmi</artifactId>

-      <version>[2.7.0,3.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>filesystem</artifactId>

-      <version>[1.0.0,3.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

-    </dependency>

-  </dependencies>

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-ep-ide-ui</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-ide-ui</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-ide-ui</developerConnection>

-  </scm>

-  <build>

-    <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

-    <finalName>org.apache.uima.ruta.ide.ui_${parsedVersion.osgiVersion}</finalName>

-    <resources>

-      <resource>

-        <directory>.</directory>

-        <includes>

-          <include>plugin.xml</include>

-          <include>plugin.properties</include>

-          <include>icons/**/*.*</include>

-        </includes>

-      </resource>

-      <resource>

-        <directory>src/main/resources</directory>

-      </resource>

-      <resource>

-        <directory>src/main/readme_src</directory>

-      </resource>

-    </resources>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>release.properties</exclude> <!-- release generated artifact -->

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>src/main/resources/org/apache/uima/ruta/ide/formatter/*.ruta</exclude> <!-- preview file -->

-                  <exclude>src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/*.ruta</exclude> <!-- preview file -->

-                  <exclude>src/main/resources/org/apache/uima/ruta/ide/launching/*.ruta</exclude> <!-- preview file -->

-                  <exclude>src/main/resources/org/apache/uima/ruta/ide/ui/documentation/*.html</exclude> <!-- hover documentation -->

-                  <exclude>src/main/resources/org/apache/uima/ruta/ide/ui/preferences/*.txt</exclude> <!-- preview file -->

-                  <exclude>issuesFixed/**</exclude>

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-

-    <plugins>

-      <plugin>

-        <groupId>org.apache.felix</groupId>

-        <artifactId>maven-bundle-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>uima-bundle</id>

-            <configuration>

-              <instructions>

-                <Bundle-SymbolicName>org.apache.uima.ruta.ide.ui;singleton:=true</Bundle-SymbolicName>

-                <Bundle-Activator>org.apache.uima.ruta.ide.RutaIdeUIPlugin</Bundle-Activator>

-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>

-                <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>

-                <_nouses>true</_nouses>

-                <Export-Package>

-                  org.apache.uima.ruta.ide.*

-                </Export-Package>

-                <Require-Bundle>

-                  org.apache.uima.runtime,

-                  org.apache.uima.ruta.engine,

-                  org.apache.uima.ruta.ide,

-                  org.eclipse.core.runtime,

-                  org.eclipse.core.resources,

-                  org.eclipse.core.filesystem,

-                  org.eclipse.ui,

-                  org.eclipse.dltk.launching;bundle-version="3.0.0",

-                  org.eclipse.dltk.core;bundle-version="3.0.0",

-                  org.eclipse.dltk.validators.core;bundle-version="3.0.0",

-                  org.eclipse.dltk.console;bundle-version="3.0.0",

-                  org.eclipse.dltk.console.ui;bundle-version="3.0.0",

-                  org.eclipse.dltk;bundle-version="3.0.0",

-                  org.eclipse.dltk.debug;bundle-version="3.0.0",

-                  org.eclipse.dltk.debug.ui;bundle-version="3.0.0",

-                  org.eclipse.dltk.formatter;bundle-version="3.0.0",

-                  org.eclipse.dltk.testing;bundle-version="3.0.0",

-                  org.eclipse.dltk.ui;bundle-version="3.0.0",

-                  org.eclipse.dltk.validators.ui;bundle-version="3.0.0",

-                  org.eclipse.jface.text,

-                  org.eclipse.ui.editors,

-                  org.eclipse.ui.ide,

-                  org.eclipse.search,

-                  org.eclipse.debug.ui,

-                  org.eclipse.ui.console,

-                  org.eclipse.jdt.core,

-                  org.eclipse.jdt.debug.ui,

-                  org.eclipse.core.variables,

-                  org.eclipse.jdt.launching

-                </Require-Bundle>

-                <Import-Package>

-                </Import-Package>

-                <Bundle-Localization>plugin</Bundle-Localization>

-              </instructions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/schema/rutaExtension.exsd b/trunk/ruta-ep-ide-ui/schema/rutaExtension.exsd
deleted file mode 100644
index 24c7d0e..0000000
--- a/trunk/ruta-ep-ide-ui/schema/rutaExtension.exsd
+++ /dev/null
@@ -1,137 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="tmExtension" name="tmExtension"/>

-      </appInfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence>

-            <element ref="tmExtension" minOccurs="1" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute translatable="true"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="tmExtension">

-      <complexType>

-         <attribute name="language" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IRutaLanguageExtension"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-         <attribute name="priority" type="string" use="default" value="0">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="since"/>

-      </appInfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="copyright"/>

-      </appInfo>

-      <documentation>

-         

-      </documentation>

-   </annotation>

-

-</schema>

diff --git a/trunk/ruta-ep-ide-ui/schema/rutaSemanticHighlighting.exsd b/trunk/ruta-ep-ide-ui/schema/rutaSemanticHighlighting.exsd
deleted file mode 100644
index 8f2d12c..0000000
--- a/trunk/ruta-ep-ide-ui/schema/rutaSemanticHighlighting.exsd
+++ /dev/null
@@ -1,120 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="tmSemanticHighlighting" name="tmSemanticHighlighting"/>

-      </appInfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appInfo>

-            <meta.element />

-         </appInfo>

-      </annotation>

-      <complexType>

-         <sequence>

-            <element ref="highlightingExtension" minOccurs="1" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute translatable="true"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="highlightingExtension">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.ui.ISemanticHighlightingExtension"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="since"/>

-      </appInfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/RutaIdeUIPlugin.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/RutaIdeUIPlugin.java
deleted file mode 100644
index e0ed5ef..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/RutaIdeUIPlugin.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*

- * 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.ruta.ide;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URL;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.ui.text.RutaTextTools;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.FileLocator;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.dltk.core.environment.FileAsFileHandle;

-import org.eclipse.dltk.core.environment.IDeployment;

-import org.eclipse.dltk.core.environment.IEnvironment;

-import org.eclipse.dltk.core.environment.IExecutionEnvironment;

-import org.eclipse.dltk.core.environment.IFileHandle;

-import org.eclipse.dltk.core.internal.environment.LocalEnvironment;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.ScriptRuntime;

-import org.eclipse.dltk.launching.ScriptRuntime.DefaultInterpreterEntry;

-import org.eclipse.ui.plugin.AbstractUIPlugin;

-import org.osgi.framework.Bundle;

-import org.osgi.framework.BundleContext;

-import org.osgi.service.packageadmin.PackageAdmin;

-

-/**

- * The activator class controls the plug-in life cycle

- */

-public class RutaIdeUIPlugin extends AbstractUIPlugin {

-

-  // The plug-in ID

-  public static final String PLUGIN_ID = "org.apache.uima.ruta.ide.ui"; //$NON-NLS-1$

-

-  private RutaTextTools textTools;

-

-  private BundleContext bundleContext;

-

-  // The shared instance

-  private static RutaIdeUIPlugin plugin;

-

-  /**

-   * The constructor

-   */

-  public RutaIdeUIPlugin() {

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

-   */

-  public void start(BundleContext context) throws Exception {

-    super.start(context);

-    plugin = this;

-    bundleContext = context;

-

-    checkRutaInterpreter();

-

-//    IWorkbench workbench = PlatformUI.getWorkbench();

-//    workbench.addWorkbenchListener(new IWorkbenchListener() {

-//      public boolean preShutdown(IWorkbench workbench, boolean forced) {

-//        // close all CAS Editors if on is focused when exiting Eclipse

-//        final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();

-//        IEditorPart activeEditor = activePage.getActiveEditor();

-//        if (activeEditor != null

-//                && activeEditor.getClass().getName()

-//                        .equals("org.apache.uima.caseditor.editor.AnnotationEditor")) {

-//          IEditorReference[] editorReferences = activePage.getEditorReferences();

-//          List<IEditorReference> toClose = new ArrayList<IEditorReference>();

-//          for (IEditorReference each : editorReferences) {

-//            if (each.getId().equals("org.apache.uima.caseditor.editor")) {

-//              toClose.add(each);

-//            }

-//          }

-//          activePage.closeEditors(toClose.toArray(new IEditorReference[0]), true);

-//        }

-//        return true;

-//      }

-//

-//      public void postShutdown(IWorkbench workbench) {

-//

-//      }

-//    });

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

-   */

-  public void stop(BundleContext context) throws Exception {

-    plugin = null;

-    super.stop(context);

-  }

-

-  /**

-   * Returns the shared instance

-   * 

-   * @return the shared instance

-   */

-  public static RutaIdeUIPlugin getDefault() {

-    return plugin;

-  }

-

-  public synchronized RutaTextTools getTextTools() {

-    if (textTools == null)

-      textTools = new RutaTextTools(true);

-    return textTools;

-  }

-

-  public static void error(String message, Throwable t) {

-    plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, t));

-  }

-

-  public static void error(Throwable t) {

-    error(t.getMessage(), t);

-  }

-

-  public IFileHandle getConsoleProxy(IExecutionEnvironment exeEnv) throws IOException {

-    IDeployment deployment = exeEnv.createDeployment();

-    IPath path = deployment.add(this.getBundle(), "console");

-    path.append("ConsoleProxy.ruta");

-    return deployment.getFile(path);

-  }

-

-  public Bundle getBundle(String bundleName) {

-    Bundle[] bundles = getBundles(bundleName, null);

-    if (bundles != null && bundles.length > 0)

-      return bundles[0];

-    return null;

-  }

-

-  public Bundle[] getBundles(String bundleName, String version) {

-    Bundle[] bundles = Platform.getBundles(bundleName, version);

-    if (bundles != null)

-      return bundles;

-    // Accessing bundle which is not resolved

-    PackageAdmin admin = (PackageAdmin) bundleContext.getService(bundleContext

-            .getServiceReference(PackageAdmin.class.getName()));

-    bundles = admin.getBundles(bundleName, version);

-    if (bundles != null && bundles.length > 0)

-      return bundles;

-    return null;

-  }

-

-  public String pluginIdToJarPath(String pluginId) throws IOException {

-    Bundle bundle = getBundle(pluginId);

-    URL url = bundle.getEntry("/");

-    if (url == null) {

-      throw new IOException();

-    }

-    return FileLocator.toFileURL(url).getFile();

-  }

-

-  private void checkRutaInterpreter() throws IOException, CoreException {

-    // TODO move this method... it is called way too early when eclipse starts

-    IEnvironment localEnv = LocalEnvironment.getInstance();

-    DefaultInterpreterEntry defaultInterpreterEntry = new DefaultInterpreterEntry(

-            RutaNature.NATURE_ID, localEnv.getId());

-    IInterpreterInstall defaultInterpreterInstall = null;

-    try {

-      defaultInterpreterInstall = ScriptRuntime

-              .getDefaultInterpreterInstall(defaultInterpreterEntry);

-    } catch (Exception e) {

-      error(e);

-    }

-    if(defaultInterpreterInstall == null) {

-      // initialized too early

-      return;

-    }

-    IFileHandle rawInstallLocation = defaultInterpreterInstall.getRawInstallLocation();

-    if (!rawInstallLocation.exists()) {

-      String pluginIdToJarPath = pluginIdToJarPath(RutaIdeUIPlugin.PLUGIN_ID);

-      FileAsFileHandle fh = new FileAsFileHandle(new File(pluginIdToJarPath));

-      defaultInterpreterInstall.setInstallLocation(fh);

-      ScriptRuntime.setDefaultInterpreterInstall(defaultInterpreterInstall,

-              new NullProgressMonitor());

-

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugConstants.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugConstants.java
deleted file mode 100644
index 66a9c73..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * 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.ruta.ide.debug;

-

-public final class RutaDebugConstants {

-  private RutaDebugConstants() {

-  }

-

-  public static final String DEBUG_MODEL_ID = "org.eclipse.dltk.debug.rutaModel";

-

-  public static final String DEBUGGING_ENGINE_ID_KEY = "debugging_engine_id";

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugPreferenceInitializer.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugPreferenceInitializer.java
deleted file mode 100644
index f498aea..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugPreferenceInitializer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.ide.debug;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;

-import org.eclipse.dltk.debug.core.DLTKDebugPreferenceConstants;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaDebugPreferenceInitializer extends AbstractPreferenceInitializer {

-

-  public void initializeDefaultPreferences() {

-    // Preferences store = RutaIdePlugin.getDefault().getPluginPreferences();

-    IPreferenceStore store = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    store.setDefault(RutaDebugConstants.DEBUGGING_ENGINE_ID_KEY, "");

-

-    store.setDefault(DLTKDebugPreferenceConstants.PREF_DBGP_BREAK_ON_FIRST_LINE, false);

-    store.setDefault(DLTKDebugPreferenceConstants.PREF_DBGP_ENABLE_LOGGING, false);

-

-    store.setDefault(DLTKDebugPreferenceConstants.PREF_DBGP_SHOW_SCOPE_GLOBAL, true);

-    store.setDefault(DLTKDebugPreferenceConstants.PREF_DBGP_SHOW_SCOPE_CLASS, true);

-    store.setDefault(DLTKDebugPreferenceConstants.PREF_DBGP_SHOW_SCOPE_LOCAL, true);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugPreferences.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugPreferences.java
deleted file mode 100644
index d754ccf..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaDebugPreferences.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*

- * 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.ruta.ide.debug;

-

-public class RutaDebugPreferences {

-  private static final String DEBUGGING_ENGINE_PATH = "debugging_engine";

-

-  private static final String DEBUGGING_ENGINE_PATH_DEFAULT = "";

-

-  // private static Preferences getNode() {

-  // String id = RutaIdePlugin.getDefault().getBundle().getSymbolicName();

-  // return Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE).node(id);

-  // }

-

-  public static void save() {

-    // try {

-    // getNode().flush();

-    // } catch (BackingStoreException e) {

-    // // TODO: add logging

-    // }

-  }

-

-  public static String getDebuggingEnginePath() {

-    return null;

-    // return getNode().get(DEBUGGING_ENGINE_PATH, DEBUGGING_ENGINE_PATH_DEFAULT);

-  }

-

-  public static void setDebuggingEnginePath(String path) {

-    // getNode().put(DEBUGGING_ENGINE_PATH, path);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaTypeFactory.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaTypeFactory.java
deleted file mode 100644
index 5d5ee66..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/RutaTypeFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.ide.debug;

-

-import org.eclipse.dltk.debug.core.model.AtomicScriptType;

-import org.eclipse.dltk.debug.core.model.ComplexScriptType;

-import org.eclipse.dltk.debug.core.model.IScriptType;

-import org.eclipse.dltk.debug.core.model.IScriptTypeFactory;

-

-public class RutaTypeFactory implements IScriptTypeFactory {

-  private static final String[] atomicTypes = {};

-

-  public RutaTypeFactory() {

-

-  }

-

-  public IScriptType buildType(String type) {

-    for (int i = 0; i < atomicTypes.length; ++i) {

-      if (atomicTypes[i].equals(type)) {

-        return new AtomicScriptType(type);

-      }

-    }

-

-    return new ComplexScriptType(type);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/Messages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/Messages.java
deleted file mode 100644
index 4ffb4ed..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/Messages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui;

-

-import org.eclipse.osgi.util.NLS;

-

-public class Messages extends NLS {

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.debug.ui.messages"; //$NON-NLS-1$

-

-  public static String NoDebuggingEngine_title;

-

-  public static String NoDebuggingEngine_message;

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, Messages.class);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaDebugHover.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaDebugHover.java
deleted file mode 100644
index ed842e7..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaDebugHover.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui;

-

-import org.eclipse.dltk.debug.ui.ScriptDebugModelPresentation;

-import org.eclipse.dltk.internal.debug.ui.ScriptDebugHover;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaDebugHover extends ScriptDebugHover {

-

-  @Override

-  protected ScriptDebugModelPresentation getModelPresentation() {

-    return new RutaDebugModelPresentation();

-  }

-

-  public void setPreferenceStore(IPreferenceStore store) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaDebugModelPresentation.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaDebugModelPresentation.java
deleted file mode 100644
index 421d670..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaDebugModelPresentation.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.debug.core.DebugException;

-import org.eclipse.debug.ui.DebugUITools;

-import org.eclipse.debug.ui.IDebugUIConstants;

-import org.eclipse.dltk.debug.core.DLTKDebugPlugin;

-import org.eclipse.dltk.debug.core.model.IScriptBreakpoint;

-import org.eclipse.dltk.debug.core.model.IScriptMethodEntryBreakpoint;

-import org.eclipse.dltk.debug.core.model.IScriptValue;

-import org.eclipse.dltk.debug.core.model.IScriptVariable;

-import org.eclipse.dltk.debug.core.model.IScriptWatchpoint;

-import org.eclipse.dltk.debug.ui.ScriptDebugImageDescriptor;

-import org.eclipse.dltk.debug.ui.ScriptDebugImages;

-import org.eclipse.dltk.debug.ui.ScriptDebugModelPresentation;

-import org.eclipse.dltk.ui.DLTKPluginImages;

-import org.eclipse.jface.resource.ImageRegistry;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.ui.IEditorInput;

-

-public class RutaDebugModelPresentation extends ScriptDebugModelPresentation {

-  private static final String RUTA_EDITOR_ID = "org.apache.uima.ruta.ide.ui.editor.RutaEditor";

-

-  static ImageRegistry registry = new ImageRegistry(Display.getDefault());

-

-  static {

-    Display.getDefault().syncExec(new Runnable() {

-

-      public void run() {

-

-        DLTKPluginImages.get(ScriptDebugImages.IMG_OBJS_CONTENDED_MONITOR);

-      }

-

-    });

-  }

-

-  public RutaDebugModelPresentation() {

-

-  }

-

-  @Override

-  protected Image getBreakpointImage(IScriptBreakpoint breakpoint) {

-    if (breakpoint instanceof IScriptWatchpoint) {

-      IScriptWatchpoint w = (IScriptWatchpoint) breakpoint;

-      try {

-        if (w.isEnabled()) {

-          return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_WATCHPOINT);

-        }

-      } catch (CoreException e) {

-        DLTKDebugPlugin.log(e);

-      }

-      return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_WATCHPOINT_DISABLED);

-    }

-    if (breakpoint instanceof IScriptMethodEntryBreakpoint) {

-      IScriptMethodEntryBreakpoint ll = (IScriptMethodEntryBreakpoint) breakpoint;

-      int flags = 0;

-

-      try {

-        if (ll.breakOnEntry())

-          flags |= ScriptDebugImageDescriptor.ENTRY;

-        if (ll.breakOnExit())

-          flags |= ScriptDebugImageDescriptor.EXIT;

-

-        if (flags == 0)

-          return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED);

-        if (ll.isEnabled()) {

-          String key = flags + "enabled";

-          Image image = registry.get(key);

-          if (image == null) {

-            registry.put(

-                    key,

-                    new ScriptDebugImageDescriptor(DebugUITools

-                            .getImageDescriptor(IDebugUIConstants.IMG_OBJS_BREAKPOINT), flags));

-            return registry.get(key);

-          }

-          return image;

-        } else {

-          String key = flags + "disabled";

-          Image image = registry.get(key);

-          if (image == null) {

-            registry.put(

-                    key,

-                    new ScriptDebugImageDescriptor(DebugUITools

-                            .getImageDescriptor(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED),

-                            flags));

-            return registry.get(key);

-          }

-          return image;

-        }

-      } catch (CoreException e) {

-        DLTKDebugPlugin.log(e);

-

-      }

-    }

-

-    return null;

-  }

-

-  @Override

-  protected Image getVariableImage(IScriptVariable variable) {

-    IScriptVariable v = variable;

-    IScriptValue scriptValue;

-    try {

-      scriptValue = (IScriptValue) v.getValue();

-    } catch (DebugException e) {

-      return ScriptDebugImages.get(ScriptDebugImages.IMG_OBJS_LOCAL_VARIABLE);

-    }

-    String typeString = (scriptValue).getType().getName();

-    if (typeString.equals("function"))

-      return DLTKPluginImages.get(DLTKPluginImages.IMG_METHOD_PRIVATE);

-    if (typeString.equals("javaclass"))

-      return DLTKPluginImages.get(DLTKPluginImages.IMG_OBJS_CLASS);

-    if (typeString.equals("javaobject"))

-      return DLTKPluginImages.get(DLTKPluginImages.IMG_METHOD_PROTECTED);

-    if (typeString.equals("javaarray"))

-      return DLTKPluginImages.get(DLTKPluginImages.IMG_METHOD_DEFAULT);

-    String fullName = scriptValue.getEvalName();

-    if (fullName != null) {

-      if (fullName.indexOf('.') >= 0 || (fullName.equals("this"))) {

-        return DLTKPluginImages.get(DLTKPluginImages.IMG_METHOD_PUBLIC);

-      }

-    }

-    return ScriptDebugImages.get(ScriptDebugImages.IMG_OBJS_LOCAL_VARIABLE);

-  }

-

-  @Override

-  public String getEditorId(IEditorInput input, Object element) {

-    return RUTA_EDITOR_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaEditorDebugAdapterFactory.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaEditorDebugAdapterFactory.java
deleted file mode 100644
index c4a15cc..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaEditorDebugAdapterFactory.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui;

-

-import org.eclipse.core.runtime.IAdapterFactory;

-import org.eclipse.debug.ui.actions.IRunToLineTarget;

-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;

-import org.eclipse.dltk.internal.debug.ui.ScriptRunToLineAdapter;

-

-public class RutaEditorDebugAdapterFactory implements IAdapterFactory {

-  public Object getAdapter(Object adaptableObject, Class adapterType) {

-    if (adapterType == IRunToLineTarget.class) {

-      return new ScriptRunToLineAdapter();

-    } else if (adapterType == IToggleBreakpointsTarget.class) {

-      return new RutaToggleBreakpointAdapter();

-    }

-

-    return null;

-  }

-

-  public Class[] getAdapterList() {

-    return new Class[] { IRunToLineTarget.class, IToggleBreakpointsTarget.class };

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaToggleBreakpointAdapter.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaToggleBreakpointAdapter.java
deleted file mode 100644
index 3231017..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/RutaToggleBreakpointAdapter.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui;

-

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.debug.core.DebugPlugin;

-import org.eclipse.debug.core.model.IBreakpoint;

-import org.eclipse.debug.core.model.ILineBreakpoint;

-import org.eclipse.dltk.debug.core.DLTKDebugPlugin;

-import org.eclipse.dltk.debug.ui.breakpoints.BreakpointUtils;

-import org.eclipse.dltk.debug.ui.breakpoints.ScriptToggleBreakpointAdapter;

-import org.eclipse.dltk.internal.ui.editor.ScriptEditor;

-import org.eclipse.dltk.ui.DLTKUIPlugin;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.IRegion;

-import org.eclipse.jface.text.ITextSelection;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class RutaToggleBreakpointAdapter extends ScriptToggleBreakpointAdapter {

-  // Line breakpoints

-

-  @Override

-  protected String getDebugModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  @Override

-  public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) {

-

-    return true;

-  }

-

-  @Override

-  public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {

-    if (selection instanceof ITextSelection) {

-      ITextEditor textEditor = getTextEditor(part);

-      ITextSelection textSelection = (ITextSelection) selection;

-      int lineNumber = textSelection.getStartLine() + 1; // one based

-

-      ILineBreakpoint breakpoint = BreakpointUtils.findLineBreakpoint(textEditor, lineNumber);

-      if (breakpoint != null) {

-        breakpoint.delete();

-        return;

-      }

-

-      if (textEditor instanceof ScriptEditor) {

-        ScriptEditor scriptEditor = (ScriptEditor) textEditor;

-        try {

-          IDocument doc = scriptEditor.getScriptSourceViewer().getDocument();

-

-          IRegion region = doc.getLineInformation(lineNumber - 1);

-          String string = doc.get(region.getOffset(), region.getLength());

-          int index = string.indexOf("function");

-          if (index != -1) {

-            string = string.substring(index + "function".length()).trim();

-            int apos = string.indexOf('(');

-            if (apos >= 0) {

-              string = string.substring(0, apos).trim();

-            }

-

-            BreakpointUtils.addMethodEntryBreakpoint(textEditor, lineNumber, string);

-

-            return;

-          }

-        } catch (BadLocationException e) {

-          DLTKDebugPlugin.log(e);

-          return;

-        }

-      }

-      // else

-      BreakpointUtils.addLineBreakpoint(textEditor, lineNumber);

-    }

-  }

-

-  // Method breakpoints

-  public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) {

-    return false;

-  }

-

-  public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection)

-          throws CoreException {

-

-  }

-

-  // Watchpoints

-  public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {

-    if (selection instanceof ITextSelection) {

-      final ITextSelection textSelection = (ITextSelection) selection;

-      final String text = textSelection.getText();

-      if (part instanceof ScriptEditor) {

-        ScriptEditor scriptEditor = (ScriptEditor) part;

-        try {

-          IDocument doc = scriptEditor.getScriptSourceViewer().getDocument();

-          IRegion region = doc.getLineInformation(textSelection.getStartLine());

-          String string = doc.get(region.getOffset(), region.getLength());

-

-          return string.indexOf('=') != -1 || string.trim().startsWith("var ");

-        } catch (BadLocationException e) {

-          DLTKUIPlugin.log(e);

-        }

-      }

-

-      return text.indexOf("=") != -1;

-    }

-    return true;

-  }

-

-  public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {

-    if (selection instanceof ITextSelection) {

-      ITextEditor editor = getTextEditor(part);

-      ITextSelection textSelection = (ITextSelection) selection;

-      int lineNumber = textSelection.getStartLine() + 1; // one based

-

-      IResource resource = BreakpointUtils.getBreakpointResource(editor);

-      IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints();

-

-      for (int i = 0; i < breakpoints.length; i++) {

-        IBreakpoint breakpoint = breakpoints[i];

-        if (resource.equals(breakpoint.getMarker().getResource())) {

-          if (((ILineBreakpoint) breakpoint).getLineNumber() == lineNumber) {

-            breakpoint.delete(); // delete existing

-            // breakpoint

-            return;

-          }

-        }

-      }

-

-      if (editor instanceof ScriptEditor) {

-

-        try {

-          ScriptEditor scriptEditor = (ScriptEditor) editor;

-          IDocument doc = scriptEditor.getScriptSourceViewer().getDocument();

-          IRegion region = doc.getLineInformation(lineNumber - 1);

-          String string = doc.get(region.getOffset(), region.getLength());

-

-          int index = string.indexOf('=');

-          if (index != -1) {

-            string = string.substring(0, index);

-          }

-          index = string.lastIndexOf('.');

-          if (index != -1) {

-            string = string.substring(index + 1);

-          }

-          string = string.trim();

-          index = string.lastIndexOf(' ');

-          if (index != -1) {

-            string = string.substring(index + 1).trim();

-          }

-

-          if (string.endsWith(";")) {

-            string = string.substring(0, string.length() - 1);

-          }

-

-          BreakpointUtils.addWatchPoint(editor, lineNumber, string);

-        } catch (BadLocationException e) {

-          DLTKUIPlugin.log(e);

-        }

-      }

-    }

-  }

-

-  public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {

-    toggleLineBreakpoints(part, selection);

-  }

-

-  public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {

-    return canToggleLineBreakpoints(part, selection);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleClassVariablesHandler.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleClassVariablesHandler.java
deleted file mode 100644
index adc36dd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleClassVariablesHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.handlers;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.dltk.debug.ui.handlers.AbstractToggleClassVariableHandler;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class ToggleClassVariablesHandler extends AbstractToggleClassVariableHandler {

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId()

-   */

-  @Override

-  protected String getModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore()

-   */

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleGlobalVariablesHandler.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleGlobalVariablesHandler.java
deleted file mode 100644
index a8a090c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleGlobalVariablesHandler.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.handlers;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.dltk.debug.ui.handlers.AbstractToggleGlobalVariableHandler;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class ToggleGlobalVariablesHandler extends AbstractToggleGlobalVariableHandler {

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId()

-   */

-  @Override

-  protected String getModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore()

-   */

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleLocalVariablesHandler.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleLocalVariablesHandler.java
deleted file mode 100644
index 83a54aa..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/handlers/ToggleLocalVariablesHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.handlers;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.dltk.debug.ui.handlers.AbstractToggleLocalVariableHandler;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class ToggleLocalVariablesHandler extends AbstractToggleLocalVariableHandler {

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId()

-   */

-  @Override

-  protected String getModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore()

-   */

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/AddRutaInterpreterDialog.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/AddRutaInterpreterDialog.java
deleted file mode 100644
index 4ebeef1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/AddRutaInterpreterDialog.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.interpreters;

-

-import org.eclipse.dltk.internal.debug.ui.interpreters.AbstractInterpreterLibraryBlock;

-import org.eclipse.dltk.internal.debug.ui.interpreters.AddScriptInterpreterDialog;

-import org.eclipse.dltk.internal.debug.ui.interpreters.IAddInterpreterDialogRequestor;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.IInterpreterInstallType;

-import org.eclipse.swt.widgets.Shell;

-

-public class AddRutaInterpreterDialog extends AddScriptInterpreterDialog {

-  public AddRutaInterpreterDialog(IAddInterpreterDialogRequestor requestor, Shell shell,

-          IInterpreterInstallType[] interpreterInstallTypes, IInterpreterInstall editedInterpreter) {

-    super(requestor, shell, interpreterInstallTypes, editedInterpreter);

-  }

-

-  @Override

-  protected AbstractInterpreterLibraryBlock createLibraryBlock(AddScriptInterpreterDialog dialog) {

-    return new RutaInterpreterLibraryBlock(dialog);

-  }

-

-  @Override

-  protected boolean useInterpreterArgs() {

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterComboBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterComboBlock.java
deleted file mode 100644
index 5e36ed4..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterComboBlock.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.interpreters;

-

-import org.eclipse.dltk.internal.debug.ui.interpreters.AbstractInterpreterComboBlock;

-import org.eclipse.dltk.internal.debug.ui.interpreters.IInterpreterComboBlockContext;

-import org.eclipse.jface.preference.IPreferencePage;

-

-public class RutaInterpreterComboBlock extends AbstractInterpreterComboBlock {

-

-  public RutaInterpreterComboBlock(IInterpreterComboBlockContext context) {

-    super(context);

-  }

-

-  @Override

-  protected void showInterpreterPreferencePage() {

-    IPreferencePage page = new RutaInterpreterPreferencePage();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterContainerWizardPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterContainerWizardPage.java
deleted file mode 100644
index ccaac0f..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterContainerWizardPage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.interpreters;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.internal.debug.ui.interpreters.AbstractInterpreterContainerWizardPage;

-

-public class RutaInterpreterContainerWizardPage extends AbstractInterpreterContainerWizardPage {

-

-  @Override

-  public String getScriptNature() {

-    return RutaNature.NATURE_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterLibraryBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterLibraryBlock.java
deleted file mode 100644
index dc116f0..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterLibraryBlock.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.interpreters;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.internal.debug.ui.interpreters.AbstractInterpreterLibraryBlock;

-import org.eclipse.dltk.internal.debug.ui.interpreters.AddScriptInterpreterDialog;

-import org.eclipse.dltk.internal.debug.ui.interpreters.LibraryLabelProvider;

-import org.eclipse.jface.dialogs.IDialogSettings;

-import org.eclipse.jface.viewers.IBaseLabelProvider;

-

-/**

- * Control used to edit the libraries associated with a Interpreter install

- */

-public class RutaInterpreterLibraryBlock extends AbstractInterpreterLibraryBlock {

-

-  public RutaInterpreterLibraryBlock(AddScriptInterpreterDialog d) {

-    super(d);

-  }

-

-  @Override

-  protected IBaseLabelProvider getLabelProvider() {

-    return new LibraryLabelProvider();

-  }

-

-  @Override

-  protected IDialogSettings getDialogSettions() {

-    return RutaIdeUIPlugin.getDefault().getDialogSettings();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterPreferencePage.java
deleted file mode 100644
index ce5ca3f..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterPreferencePage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.interpreters;

-

-import org.eclipse.dltk.internal.debug.ui.interpreters.InterpretersBlock;

-import org.eclipse.dltk.internal.debug.ui.interpreters.ScriptInterpreterPreferencePage;

-

-public class RutaInterpreterPreferencePage extends ScriptInterpreterPreferencePage {

-

-  @Override

-  public InterpretersBlock createInterpretersBlock() {

-    return new RutaInterpretersBlock();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterTab.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterTab.java
deleted file mode 100644
index db70c63..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpreterTab.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.interpreters;

-

-import org.eclipse.dltk.debug.ui.launchConfigurations.IMainLaunchConfigurationTab;

-import org.eclipse.dltk.debug.ui.launchConfigurations.InterpreterTab;

-import org.eclipse.dltk.internal.debug.ui.interpreters.AbstractInterpreterComboBlock;

-import org.eclipse.dltk.internal.debug.ui.interpreters.IInterpreterComboBlockContext;

-

-public class RutaInterpreterTab extends InterpreterTab {

-

-  public RutaInterpreterTab(IMainLaunchConfigurationTab mainTab) {

-    super(mainTab);

-  }

-

-  @Override

-  protected AbstractInterpreterComboBlock createInterpreterBlock(

-          IInterpreterComboBlockContext context) {

-    return new RutaInterpreterComboBlock(context);

-  }

-

-  @Override

-  protected void refreshInterpreters() {

-    // ((RutaInterpreterComboBlock) fInterpreterBlock)

-    // .initialize(getScriptProject());

-    super.refreshInterpreters();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpretersBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpretersBlock.java
deleted file mode 100644
index 3c9f347..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/interpreters/RutaInterpretersBlock.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.interpreters;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.internal.debug.ui.interpreters.AddScriptInterpreterDialog;

-import org.eclipse.dltk.internal.debug.ui.interpreters.InterpretersBlock;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.ScriptRuntime;

-

-public class RutaInterpretersBlock extends InterpretersBlock {

-  @Override

-  protected AddScriptInterpreterDialog createInterpreterDialog(IInterpreterInstall standin) {

-    AddRutaInterpreterDialog dialog = new AddRutaInterpreterDialog(this, getShell(),

-            ScriptRuntime.getInterpreterInstallTypes(getCurrentNature()), standin);

-    return dialog;

-  }

-

-  @Override

-  protected String getCurrentNature() {

-    return RutaNature.NATURE_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaCommonTab.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaCommonTab.java
deleted file mode 100644
index 1b5407d..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaCommonTab.java
+++ /dev/null
@@ -1,1050 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.launchConfiguration;

-

-import java.io.IOException;

-import java.text.MessageFormat;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.resources.IContainer;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.variables.VariablesPlugin;

-import org.eclipse.debug.core.DebugPlugin;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;

-import org.eclipse.debug.internal.ui.DebugUIPlugin;

-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;

-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;

-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;

-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsMessages;

-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension;

-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory;

-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;

-import org.eclipse.debug.ui.DebugUITools;

-import org.eclipse.debug.ui.IDebugUIConstants;

-import org.eclipse.debug.ui.ILaunchGroup;

-import org.eclipse.debug.ui.StringVariableSelectionDialog;

-import org.eclipse.dltk.core.environment.EnvironmentManager;

-import org.eclipse.dltk.core.environment.IExecutionEnvironment;

-import org.eclipse.dltk.core.environment.IFileHandle;

-import org.eclipse.dltk.internal.ui.util.SWTUtil;

-import org.eclipse.dltk.launching.ScriptLaunchConfigurationConstants;

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.jface.dialogs.IDialogSettings;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.viewers.CheckStateChangedEvent;

-import org.eclipse.jface.viewers.CheckboxTableViewer;

-import org.eclipse.jface.viewers.ICheckStateListener;

-import org.eclipse.jface.viewers.ILabelProviderListener;

-import org.eclipse.jface.viewers.IStructuredContentProvider;

-import org.eclipse.jface.viewers.ITableLabelProvider;

-import org.eclipse.jface.viewers.Viewer;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.ModifyEvent;

-import org.eclipse.swt.events.ModifyListener;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Combo;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.FileDialog;

-import org.eclipse.swt.widgets.Group;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.WorkbenchEncoding;

-import org.eclipse.ui.dialogs.ContainerSelectionDialog;

-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;

-import org.eclipse.ui.ide.IDEEncoding;

-import org.eclipse.ui.model.WorkbenchContentProvider;

-import org.eclipse.ui.model.WorkbenchLabelProvider;

-import org.eclipse.ui.views.navigator.ResourceSorter;

-

-/**

- * Launch configuration tab used to specify the location a launch configuration is stored in,

- * whether it should appear in the favorites list, and perspective switching behavior for an

- * associated launch.

- * <p>

- * Clients may instantiate this class. This class is not intended to be subclassed.

- * </p>

- * 

- * 

- */

-public class RutaCommonTab extends AbstractLaunchConfigurationTab {

-

-  /**

-   * Provides a persistable dialog for selecting the shared project location

-   */

-  class SharedLocationSelectionDialog extends ContainerSelectionDialog {

-    private final String SETTINGS_ID = IDebugUIConstants.PLUGIN_ID

-            + ".SHARED_LAUNCH_CONFIGURATON_DIALOG"; //$NON-NLS-1$

-

-    public SharedLocationSelectionDialog(Shell parentShell, IContainer initialRoot,

-            boolean allowNewContainerName, String message) {

-      super(parentShell, initialRoot, allowNewContainerName, message);

-    }

-

-    @Override

-    protected IDialogSettings getDialogBoundsSettings() {

-      IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();

-      IDialogSettings section = settings.getSection(SETTINGS_ID);

-      if (section == null) {

-        section = settings.addNewSection(SETTINGS_ID);

-      }

-      return section;

-    }

-  }

-

-  private static final String EMPTY_STRING = ""; //$NON-NLS-1$

-

-  // Local/shared UI widgets

-  private Button fLocalRadioButton;

-

-  private Button fSharedRadioButton;

-

-  private Text fSharedLocationText;

-

-  private Button fSharedLocationButton;

-

-  private Button fLaunchInBackgroundButton;

-

-  private Button fDefaultEncodingButton;

-

-  private Button fAltEncodingButton;

-

-  private Combo fEncodingCombo;

-

-  private Button fConsoleOutput;

-

-  private Button fFileOutput;

-

-  private Button fFileBrowse;

-

-  private Text fFileText;

-

-  private Button fVariables;

-

-  private Button fAppend;

-

-  private Button fWorkspaceBrowse;

-

-  private Button fUseDltkRadio;

-

-  private Button fNotUseDltkRatio;

-

-  /**

-   * Check box list for specifying favorites

-   */

-  private CheckboxTableViewer fFavoritesTable;

-

-  /**

-   * Modify listener that simply updates the owning launch configuration dialog.

-   */

-  private ModifyListener fBasicModifyListener = new ModifyListener() {

-    public void modifyText(ModifyEvent evt) {

-      updateLaunchConfigurationDialog();

-    }

-  };

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see

-   * org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)

-   */

-  public void createControl(Composite parent) {

-    Composite comp = new Composite(parent, SWT.NONE);

-    setControl(comp);

-    PlatformUI.getWorkbench().getHelpSystem()

-            .setHelp(getControl(), IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_COMMON_TAB);

-    comp.setLayout(new GridLayout(2, true));

-    comp.setFont(parent.getFont());

-

-    createSharedConfigComponent(comp);

-    createFavoritesComponent(comp);

-    createEncodingComponent(comp);

-    createOutputCaptureComponent(comp);

-    createLaunchInBackgroundComponent(comp);

-  }

-

-  /**

-   * Creates the favorites control

-   * 

-   * @param parent

-   *          the parent composite to add this one to

-   * 

-   */

-  private void createFavoritesComponent(Composite parent) {

-    Group favComp = SWTUtil.createGroup(parent,

-            LaunchConfigurationsMessages.CommonTab_Display_in_favorites_menu__10, 1, 1,

-            GridData.FILL_BOTH);

-    fFavoritesTable = CheckboxTableViewer.newCheckList(favComp, SWT.CHECK | SWT.BORDER | SWT.MULTI

-            | SWT.FULL_SELECTION);

-    Control table = fFavoritesTable.getControl();

-    GridData gd = new GridData(GridData.FILL_BOTH);

-    table.setLayoutData(gd);

-    table.setFont(parent.getFont());

-    fFavoritesTable.setContentProvider(new FavoritesContentProvider());

-    fFavoritesTable.setLabelProvider(new FavoritesLabelProvider());

-    fFavoritesTable.addCheckStateListener(new ICheckStateListener() {

-      public void checkStateChanged(CheckStateChangedEvent event) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-  }

-

-  /**

-   * Creates the shared config component

-   * 

-   * @param parent

-   *          the parent composite to add this component to

-   * 

-   */

-  private void createSharedConfigComponent(Composite parent) {

-    Group group = SWTUtil.createGroup(parent, LaunchConfigurationsMessages.CommonTab_0, 3, 2,

-            GridData.FILL_HORIZONTAL);

-    fLocalRadioButton = createRadioButton(group, LaunchConfigurationsMessages.CommonTab_L_ocal_3);

-    GridData gd = new GridData();

-    gd.horizontalSpan = 3;

-    fLocalRadioButton.setLayoutData(gd);

-    fSharedRadioButton = createRadioButton(group, LaunchConfigurationsMessages.CommonTab_S_hared_4);

-    fSharedRadioButton.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent evt) {

-        handleSharedRadioButtonSelected();

-      }

-    });

-    fSharedLocationText = SWTUtil.createSingleText(group, 1);

-    fSharedLocationText.addModifyListener(fBasicModifyListener);

-    fSharedLocationButton = createPushButton(group,

-            LaunchConfigurationsMessages.CommonTab__Browse_6, null);

-    fSharedLocationButton.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent evt) {

-        handleSharedLocationButtonSelected();

-      }

-    });

-

-    fLocalRadioButton.setSelection(true);

-    setSharedEnabled(false);

-  }

-

-  /**

-   * Creates the component set for the capture output composite

-   * 

-   * @param data

-   *          .parent the parent to add this component to

-   */

-

-  private void test() {

-

-  }

-

-  private void createOutputCaptureComponent(Composite parent) {

-    Group group = SWTUtil.createGroup(parent, "Input and Output", 1, 2, GridData.FILL_HORIZONTAL);

-

-    fUseDltkRadio = createRadioButton(group, "Use DLTK Input and Output");

-    fUseDltkRadio.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-

-    fNotUseDltkRatio = createRadioButton(group, "Use Standard Input and Output");

-    fNotUseDltkRatio.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-

-    Group standardGroup = SWTUtil.createGroup(group, "", 5, 2, GridData.FILL_HORIZONTAL);

-

-    fConsoleOutput = createCheckButton(standardGroup, LaunchConfigurationsMessages.CommonTab_5);

-    GridData gd = new GridData(SWT.BEGINNING, SWT.NORMAL, true, false);

-    gd.horizontalSpan = 5;

-    fConsoleOutput.setLayoutData(gd);

-    fConsoleOutput.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-

-    fFileOutput = createCheckButton(standardGroup, LaunchConfigurationsMessages.CommonTab_6);

-    fFileOutput.setLayoutData(new GridData(SWT.BEGINNING, SWT.NORMAL, false, false));

-    fFileOutput.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        enableOuputCaptureWidgets(fFileOutput.getSelection());

-        updateLaunchConfigurationDialog();

-      }

-    });

-    fFileText = SWTUtil.createSingleText(standardGroup, 4);

-    fFileText.addModifyListener(fBasicModifyListener);

-

-    SWTUtil.createLabel(standardGroup, EMPTY_STRING, 2);

-

-    fWorkspaceBrowse = createPushButton(standardGroup, LaunchConfigurationsMessages.CommonTab_12,

-            null);

-    fWorkspaceBrowse.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),

-                new WorkbenchLabelProvider(), new WorkbenchContentProvider());

-        dialog.setTitle(LaunchConfigurationsMessages.CommonTab_13);

-        dialog.setMessage(LaunchConfigurationsMessages.CommonTab_14);

-        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());

-        dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));

-        if (dialog.open() == IDialogConstants.OK_ID) {

-          IResource resource = (IResource) dialog.getFirstResult();

-          String arg = resource.getFullPath().toString();

-          String fileLoc = VariablesPlugin.getDefault().getStringVariableManager()

-                  .generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$

-          fFileText.setText(fileLoc);

-        }

-      }

-    });

-    fFileBrowse = createPushButton(standardGroup, LaunchConfigurationsMessages.CommonTab_7, null);

-    fFileBrowse.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        String filePath = fFileText.getText();

-        FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);

-        filePath = dialog.open();

-        if (filePath != null) {

-          fFileText.setText(filePath);

-        }

-      }

-    });

-    fVariables = createPushButton(standardGroup, LaunchConfigurationsMessages.CommonTab_9, null);

-    fVariables.addSelectionListener(new SelectionListener() {

-      public void widgetSelected(SelectionEvent e) {

-        StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());

-        dialog.open();

-        String variable = dialog.getVariableExpression();

-        if (variable != null) {

-          fFileText.insert(variable);

-        }

-      }

-

-      public void widgetDefaultSelected(SelectionEvent e) {

-      }

-    });

-    fAppend = createCheckButton(standardGroup, LaunchConfigurationsMessages.CommonTab_11);

-    gd = new GridData(SWT.LEFT, SWT.TOP, true, false);

-    gd.horizontalSpan = 4;

-    fAppend.setLayoutData(gd);

-    fAppend.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-  }

-

-  /**

-   * Enables or disables the output capture widgets based on the the specified enablement

-   * 

-   * @param enable

-   *          if the output capture widgets should be enabled or not

-   * 

-   */

-  private void enableOuputCaptureWidgets(boolean enable) {

-    fFileText.setEnabled(enable);

-    fFileBrowse.setEnabled(enable);

-    fWorkspaceBrowse.setEnabled(enable);

-    fVariables.setEnabled(enable);

-    fAppend.setEnabled(enable);

-  }

-

-  /**

-   * Creates the encoding component

-   * 

-   * @param parent

-   *          the parent to add this composite to

-   */

-  private void createEncodingComponent(Composite parent) {

-    List allEncodings = IDEEncoding.getIDEEncodings();

-    String defaultEncoding = WorkbenchEncoding.getWorkbenchDefaultEncoding();

-    Group group = SWTUtil.createGroup(parent, LaunchConfigurationsMessages.CommonTab_1, 2, 1,

-            GridData.FILL_BOTH);

-

-    fDefaultEncodingButton = createRadioButton(group, MessageFormat.format(

-            LaunchConfigurationsMessages.CommonTab_2, new String[] { defaultEncoding }));

-    GridData gd = new GridData(SWT.BEGINNING, SWT.NORMAL, true, false);

-    gd.horizontalSpan = 2;

-    fDefaultEncodingButton.setLayoutData(gd);

-

-    fAltEncodingButton = createRadioButton(group, LaunchConfigurationsMessages.CommonTab_3);

-    fAltEncodingButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));

-

-    fEncodingCombo = new Combo(group, SWT.READ_ONLY);

-    fEncodingCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    fEncodingCombo.setFont(parent.getFont());

-    String[] encodingArray = (String[]) allEncodings.toArray(new String[0]);

-    fEncodingCombo.setItems(encodingArray);

-    if (encodingArray.length > 0) {

-      fEncodingCombo.select(0);

-    }

-    SelectionListener listener = new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        updateLaunchConfigurationDialog();

-        fEncodingCombo.setEnabled(fAltEncodingButton.getSelection() == true);

-      }

-    };

-    fAltEncodingButton.addSelectionListener(listener);

-    fDefaultEncodingButton.addSelectionListener(listener);

-    fEncodingCombo.addSelectionListener(listener);

-  }

-

-  /**

-   * Creates the controls needed to edit the launch in background attribute of an external tool

-   * 

-   * @param parent

-   *          the composite to create the controls in

-   */

-  protected void createLaunchInBackgroundComponent(Composite parent) {

-    fLaunchInBackgroundButton = createCheckButton(parent, LaunchConfigurationsMessages.CommonTab_10);

-    GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);

-    data.horizontalSpan = 2;

-    fLaunchInBackgroundButton.setLayoutData(data);

-    fLaunchInBackgroundButton.setFont(parent.getFont());

-    fLaunchInBackgroundButton.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-  }

-

-  /**

-   * handles the shared radio button being selected

-   */

-  private void handleSharedRadioButtonSelected() {

-    setSharedEnabled(isShared());

-    updateLaunchConfigurationDialog();

-  }

-

-  /**

-   * Sets the widgets for specifying that a launch configuration is to be shared to the enable value

-   * 

-   * @param enable

-   *          the enabled value for

-   */

-  private void setSharedEnabled(boolean enable) {

-    fSharedLocationText.setEnabled(enable);

-    fSharedLocationButton.setEnabled(enable);

-  }

-

-  private String getDefaultSharedConfigLocation(ILaunchConfiguration config) {

-    String path = EMPTY_STRING;

-    try {

-      IResource[] res = config.getMappedResources();

-      if (res != null) {

-        IProject proj;

-        for (int i = 0; i < res.length; i++) {

-          proj = res[i].getProject();

-          if (proj.isAccessible()) {

-            return proj.getFullPath().toOSString();

-          }

-        }

-      }

-    } catch (CoreException e) {

-      DebugUIPlugin.log(e);

-    }

-    return path;

-  }

-

-  /**

-   * if the shared radio button is selected, indicating that the launch configuration is to be

-   * shared

-   * 

-   * @return true if the radio button is selected, false otherwise

-   */

-  private boolean isShared() {

-    return fSharedRadioButton.getSelection();

-  }

-

-  /**

-   * Handles the shared location button being selected

-   */

-  private void handleSharedLocationButtonSelected() {

-    String currentContainerString = fSharedLocationText.getText();

-    IContainer currentContainer = getContainer(currentContainerString);

-    SharedLocationSelectionDialog dialog = new SharedLocationSelectionDialog(

-            getShell(),

-            currentContainer,

-            false,

-            LaunchConfigurationsMessages.CommonTab_Select_a_location_for_the_launch_configuration_13);

-    dialog.showClosedProjects(false);

-    dialog.open();

-    Object[] results = dialog.getResult();

-    if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {

-      IPath path = (IPath) results[0];

-      String containerName = path.toOSString();

-      fSharedLocationText.setText(containerName);

-    }

-  }

-

-  /**

-   * gets the container form the specified path

-   * 

-   * @param path

-   *          the path to get the container from

-   * @return the container for the specified path or null if one cannot be determined

-   */

-  private IContainer getContainer(String path) {

-    Path containerPath = new Path(path);

-    return (IContainer) getWorkspaceRoot().findMember(containerPath);

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @seeorg.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.

-   * ILaunchConfiguration)

-   */

-  public void initializeFrom(ILaunchConfiguration configuration) {

-    boolean isShared = !configuration.isLocal();

-    fSharedRadioButton.setSelection(isShared);

-    fLocalRadioButton.setSelection(!isShared);

-    setSharedEnabled(isShared);

-    fSharedLocationText.setText(getDefaultSharedConfigLocation(configuration));

-    if (isShared) {

-      String containerName = EMPTY_STRING;

-      IFile file = configuration.getFile();

-      if (file != null) {

-        IContainer parent = file.getParent();

-        if (parent != null) {

-          containerName = parent.getFullPath().toOSString();

-        }

-      }

-      fSharedLocationText.setText(containerName);

-    }

-    updateFavoritesFromConfig(configuration);

-    updateLaunchInBackground(configuration);

-    updateEncoding(configuration);

-    updateConsoleOutput(configuration);

-  }

-

-  /**

-   * Updates the console output form the local configuration

-   * 

-   * @param configuration

-   *          the local configuration

-   */

-  private void updateConsoleOutput(ILaunchConfiguration configuration) {

-    boolean outputToConsole = true;

-    String outputFile = null;

-    boolean append = false;

-

-    boolean dltkOutput = false;

-

-    try {

-      dltkOutput = configuration.getAttribute(

-              ScriptLaunchConfigurationConstants.ATTR_USE_INTERACTIVE_CONSOLE, false);

-

-      outputToConsole = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, true);

-      outputFile = configuration

-              .getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, (String) null);

-      append = configuration.getAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, false);

-    } catch (CoreException e) {

-    }

-

-    fUseDltkRadio.setSelection(dltkOutput);

-    fNotUseDltkRatio.setSelection(!dltkOutput);

-

-    fConsoleOutput.setSelection(outputToConsole);

-    fAppend.setSelection(append);

-    boolean haveOutputFile = outputFile != null;

-    if (haveOutputFile) {

-      fFileText.setText(outputFile);

-    }

-    fFileOutput.setSelection(haveOutputFile);

-    enableOuputCaptureWidgets(haveOutputFile);

-  }

-

-  /**

-   * Updates the launch on background check button

-   * 

-   * @param configuration

-   *          the local launch configuration

-   */

-  protected void updateLaunchInBackground(ILaunchConfiguration configuration) {

-    fLaunchInBackgroundButton.setSelection(isLaunchInBackground(configuration));

-  }

-

-  /**

-   * Updates the encoding

-   * 

-   * @param configuration

-   *          the local configuration

-   */

-  private void updateEncoding(ILaunchConfiguration configuration) {

-    String encoding = null;

-    try {

-      encoding = configuration.getAttribute(IDebugUIConstants.ATTR_CONSOLE_ENCODING, (String) null);

-    } catch (CoreException e) {

-    }

-

-    if (encoding != null) {

-      fAltEncodingButton.setSelection(true);

-      fDefaultEncodingButton.setSelection(false);

-      fEncodingCombo.setText(encoding);

-      fEncodingCombo.setEnabled(true);

-    } else {

-      fDefaultEncodingButton.setSelection(true);

-      fAltEncodingButton.setSelection(false);

-      fEncodingCombo.setEnabled(false);

-    }

-  }

-

-  /**

-   * Returns whether the given configuration should be launched in the background.

-   * 

-   * @param configuration

-   *          the configuration

-   * @return whether the configuration is configured to launch in the background

-   */

-  public static boolean isLaunchInBackground(ILaunchConfiguration configuration) {

-    boolean launchInBackground = true;

-    try {

-      launchInBackground = configuration.getAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND,

-              true);

-    } catch (CoreException ce) {

-      DebugUIPlugin.log(ce);

-    }

-    return launchInBackground;

-  }

-

-  /**

-   * Updates the favorites selections from the local configuration

-   * 

-   * @param config

-   *          the local configuration

-   */

-  private void updateFavoritesFromConfig(ILaunchConfiguration config) {

-    fFavoritesTable.setInput(config);

-    fFavoritesTable.setCheckedElements(new Object[] {});

-    try {

-      List groups = config.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, new ArrayList());

-      if (groups.isEmpty()) {

-        // check old attributes for backwards compatible

-        if (config.getAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, false)) {

-          groups.add(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP);

-        }

-        if (config.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false)) {

-          groups.add(IDebugUIConstants.ID_RUN_LAUNCH_GROUP);

-        }

-      }

-      if (!groups.isEmpty()) {

-        List list = new ArrayList();

-        Iterator iterator = groups.iterator();

-        while (iterator.hasNext()) {

-          String id = (String) iterator.next();

-          LaunchGroupExtension extension = getLaunchConfigurationManager().getLaunchGroup(id);

-          list.add(extension);

-        }

-        fFavoritesTable.setCheckedElements(list.toArray());

-      }

-    } catch (CoreException e) {

-      DebugUIPlugin.log(e);

-    }

-  }

-

-  /**

-   * Updates the configuration form the local shared config working copy

-   * 

-   * @param config

-   *          the local shared config working copy

-   */

-  private void updateConfigFromLocalShared(ILaunchConfigurationWorkingCopy config) {

-    if (isShared()) {

-      String containerPathString = fSharedLocationText.getText();

-      IContainer container = getContainer(containerPathString);

-      config.setContainer(container);

-    } else {

-      config.setContainer(null);

-    }

-  }

-

-  /**

-   * Convenience accessor

-   */

-  protected LaunchConfigurationManager getLaunchConfigurationManager() {

-    return DebugUIPlugin.getDefault().getLaunchConfigurationManager();

-  }

-

-  /**

-   * Update the favorite settings.

-   * 

-   * NOTE: set to <code>null</code> instead of <code>false</code> for backwards compatibility when

-   * comparing if content is equal, since 'false' is default and will be missing for older

-   * configurations.

-   */

-  private void updateConfigFromFavorites(ILaunchConfigurationWorkingCopy config) {

-    try {

-      Object[] checked = fFavoritesTable.getCheckedElements();

-      boolean debug = config.getAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, false);

-      boolean run = config.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false);

-      if (debug || run) {

-        // old attributes

-        List groups = new ArrayList();

-        int num = 0;

-        if (debug) {

-          groups.add(getLaunchConfigurationManager().getLaunchGroup(

-                  IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP));

-          num++;

-        }

-        if (run) {

-          num++;

-          groups.add(getLaunchConfigurationManager().getLaunchGroup(

-                  IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP));

-        }

-        // see if there are any changes

-        if (num == checked.length) {

-          boolean different = false;

-          for (int i = 0; i < checked.length; i++) {

-            if (!groups.contains(checked[i])) {

-              different = true;

-              break;

-            }

-          }

-          if (!different) {

-            return;

-          }

-        }

-      }

-      config.setAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, (String) null);

-      config.setAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, (String) null);

-      List groups = null;

-      for (int i = 0; i < checked.length; i++) {

-        LaunchGroupExtension group = (LaunchGroupExtension) checked[i];

-        if (groups == null) {

-          groups = new ArrayList();

-        }

-        groups.add(group.getIdentifier());

-      }

-      config.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, groups);

-    } catch (CoreException e) {

-      DebugUIPlugin.log(e);

-    }

-  }

-

-  /**

-   * Convenience method for getting the workspace root.

-   */

-  private IWorkspaceRoot getWorkspaceRoot() {

-    return ResourcesPlugin.getWorkspace().getRoot();

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see

-   * org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration

-   * )

-   */

-  @Override

-  public boolean isValid(ILaunchConfiguration config) {

-    setMessage(null);

-    setErrorMessage(null);

-

-    return validateLocalShared() && validateRedirectFile() && validateEncoding();

-  }

-

-  /**

-   * validates the encoding selection

-   * 

-   * @return true if the validate encoding is allowable, false otherwise

-   */

-  private boolean validateEncoding() {

-    if (fAltEncodingButton.getSelection()) {

-      if (fEncodingCombo.getSelectionIndex() == -1) {

-        // TODO constant was removed in Eclipse 3.7, find a substitute

-        // setErrorMessage(LaunchConfigurationsMessages.CommonTab_No_Encoding_Selected);

-        return false;

-      }

-    }

-    return true;

-  }

-

-  /**

-   * Validates if the redirect file is valid

-   * 

-   * @return true if the filename is not zero, false otherwise

-   */

-  private boolean validateRedirectFile() {

-    if (fFileOutput.getSelection()) {

-      int len = fFileText.getText().trim().length();

-      if (len == 0) {

-        setErrorMessage(LaunchConfigurationsMessages.CommonTab_8);

-        return false;

-      }

-    }

-    return true;

-  }

-

-  /**

-   * validates the local shared config file location

-   * 

-   * @return true if the local shared file exists, false otherwise

-   */

-  private boolean validateLocalShared() {

-    if (isShared()) {

-      String path = fSharedLocationText.getText().trim();

-      IContainer container = getContainer(path);

-      if (container == null || container.equals(ResourcesPlugin.getWorkspace().getRoot())) {

-        setErrorMessage(LaunchConfigurationsMessages.CommonTab_Invalid_shared_configuration_location_14);

-        return false;

-      } else if (!container.getProject().isOpen()) {

-        setErrorMessage(LaunchConfigurationsMessages.CommonTab_Cannot_save_launch_configuration_in_a_closed_project__1);

-        return false;

-      }

-    }

-

-    return true;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @seeorg.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.

-   * ILaunchConfigurationWorkingCopy)

-   */

-  public void setDefaults(ILaunchConfigurationWorkingCopy config) {

-    config.setContainer(null);

-    config.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, true);

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @seeorg.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.

-   * ILaunchConfigurationWorkingCopy)

-   */

-  public void performApply(ILaunchConfigurationWorkingCopy configuration) {

-    updateConfigFromLocalShared(configuration);

-    updateConfigFromFavorites(configuration);

-    setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, configuration,

-            fLaunchInBackgroundButton.getSelection(), true);

-    String encoding = null;

-    if (fAltEncodingButton.getSelection()) {

-      encoding = fEncodingCombo.getText();

-    }

-    configuration.setAttribute(IDebugUIConstants.ATTR_CONSOLE_ENCODING, encoding);

-

-    boolean captureOutput = false;

-

-    if (fConsoleOutput.getSelection()) {

-      captureOutput = true;

-      configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, (String) null);

-    } else {

-      configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, false);

-    }

-

-    if (fFileOutput.getSelection()) {

-      captureOutput = true;

-      String file = fFileText.getText();

-      configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, file);

-      if (fAppend.getSelection()) {

-        configuration.setAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, true);

-      } else {

-        configuration.setAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, (String) null);

-      }

-    } else {

-      configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, (String) null);

-    }

-

-    boolean useDltk = false;

-    if (fUseDltkRadio.getSelection()) {

-      configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, (String) null);

-

-      configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_CONSOLE_ID,

-              Long.toString(System.currentTimeMillis()));

-      IFileHandle proxyFile;

-      try {

-        IExecutionEnvironment exeEnv = (IExecutionEnvironment) EnvironmentManager

-                .getLocalEnvironment().getAdapter(IExecutionEnvironment.class);

-        proxyFile = RutaIdeUIPlugin.getDefault().getConsoleProxy(exeEnv);

-        configuration.setAttribute("environmentId", proxyFile.getEnvironment().getId());

-        configuration.setAttribute("proxy_path", proxyFile.toOSString());

-      } catch (IOException e) {

-        // TODO Auto-generated catch block

-        e.printStackTrace();

-      }

-

-      captureOutput = false;

-      useDltk = true;

-    }

-

-    configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_USE_INTERACTIVE_CONSOLE,

-            useDltk);

-

-    // Last option

-    if (captureOutput) {

-      configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, (String) null);

-    } else {

-      configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, false);

-    }

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()

-   */

-  public String getName() {

-    return LaunchConfigurationsMessages.CommonTab__Common_15;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.debug.ui.ILaunchConfigurationTab#canSave()

-   */

-  @Override

-  public boolean canSave() {

-    return validateLocalShared();

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()

-   */

-  @Override

-  public Image getImage() {

-    return DebugUITools.getImage(IInternalDebugUIConstants.IMG_OBJS_COMMON_TAB);

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @seeorg.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.

-   * ILaunchConfigurationWorkingCopy)

-   */

-  @Override

-  public void activated(ILaunchConfigurationWorkingCopy workingCopy) {

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @seeorg.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.

-   * ILaunchConfigurationWorkingCopy)

-   */

-  @Override

-  public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {

-  }

-

-  /**

-   * Content provider for the favorites table

-   */

-  class FavoritesContentProvider implements IStructuredContentProvider {

-

-    public Object[] getElements(Object inputElement) {

-      ILaunchGroup[] groups = DebugUITools.getLaunchGroups();

-      List possibleGroups = new ArrayList();

-      ILaunchConfiguration configuration = (ILaunchConfiguration) inputElement;

-      for (int i = 0; i < groups.length; i++) {

-        ILaunchGroup extension = groups[i];

-        LaunchHistory history = getLaunchConfigurationManager().getLaunchHistory(

-                extension.getIdentifier());

-        if (history != null && history.accepts(configuration)) {

-          possibleGroups.add(extension);

-        }

-      }

-      return possibleGroups.toArray();

-    }

-

-    public void dispose() {

-    }

-

-    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-    }

-

-  }

-

-  /**

-   * Provides the labels for the favorites table

-   * 

-   */

-  class FavoritesLabelProvider implements ITableLabelProvider {

-

-    private Map fImages = new HashMap();

-

-    public Image getColumnImage(Object element, int columnIndex) {

-      Image image = (Image) fImages.get(element);

-      if (image == null) {

-        ImageDescriptor descriptor = ((LaunchGroupExtension) element).getImageDescriptor();

-        if (descriptor != null) {

-          image = descriptor.createImage();

-          fImages.put(element, image);

-        }

-      }

-      return image;

-    }

-

-    public String getColumnText(Object element, int columnIndex) {

-      String label = ((LaunchGroupExtension) element).getLabel();

-      return DebugUIPlugin.removeAccelerators(label);

-    }

-

-    public void addListener(ILabelProviderListener listener) {

-    }

-

-    public void dispose() {

-      Iterator images = fImages.values().iterator();

-      while (images.hasNext()) {

-        Image image = (Image) images.next();

-        image.dispose();

-      }

-    }

-

-    public boolean isLabelProperty(Object element, String property) {

-      return false;

-    }

-

-    public void removeListener(ILabelProviderListener listener) {

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaMainLaunchConfigurationTab.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaMainLaunchConfigurationTab.java
deleted file mode 100644
index 9067148..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaMainLaunchConfigurationTab.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.launchConfiguration;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.ide.launching.RutaLaunchConstants;

-import org.eclipse.core.resources.IContainer;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.PreferencesLookupDelegate;

-import org.eclipse.dltk.debug.core.DLTKDebugPreferenceConstants;

-import org.eclipse.dltk.debug.ui.launchConfigurations.MainLaunchConfigurationTab;

-import org.eclipse.dltk.launching.AbstractScriptLaunchConfigurationDelegate;

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.jface.layout.GridDataFactory;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.ModifyEvent;

-import org.eclipse.swt.events.ModifyListener;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Group;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.ui.dialogs.ContainerSelectionDialog;

-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;

-import org.eclipse.ui.model.WorkbenchContentProvider;

-import org.eclipse.ui.model.WorkbenchLabelProvider;

-

-public class RutaMainLaunchConfigurationTab extends MainLaunchConfigurationTab {

-

-  private Text inputFolderText;

-

-  private Button recursivelyButton;

-

-  private Text outputFolderText;

-

-  private Text viewText;

-

-  public RutaMainLaunchConfigurationTab(String mode) {

-    super(mode);

-  }

-

-  /*

-   * @seeorg.eclipse.dltk.debug.ui.launchConfigurations.ScriptLaunchConfigurationTab#

-   * breakOnFirstLinePrefEnabled(org.eclipse.dltk.core.PreferencesLookupDelegate)

-   */

-  @Override

-  protected boolean breakOnFirstLinePrefEnabled(PreferencesLookupDelegate delegate) {

-    return delegate.getBoolean(RutaIdeUIPlugin.PLUGIN_ID,

-            DLTKDebugPreferenceConstants.PREF_DBGP_BREAK_ON_FIRST_LINE);

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.debug.ui.launchConfigurations.ScriptLaunchConfigurationTab#dbpgLoggingPrefEnabled

-   * (org.eclipse.dltk.core.PreferencesLookupDelegate)

-   */

-  @Override

-  protected boolean dbpgLoggingPrefEnabled(PreferencesLookupDelegate delegate) {

-    return delegate.getBoolean(RutaIdeUIPlugin.PLUGIN_ID,

-            DLTKDebugPreferenceConstants.PREF_DBGP_ENABLE_LOGGING);

-  }

-

-  @Override

-  public String getNatureID() {

-    return RutaNature.NATURE_ID;

-  }

-

-  @Override

-  protected void doCreateControl(Composite composite) {

-    super.doCreateControl(composite);

-    // Input Resource Group

-    Group inputResourceGroup = new Group(composite, SWT.None);

-    inputResourceGroup.setText("Input Folder:");

-

-    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false)

-            .applyTo(inputResourceGroup);

-

-    GridLayout inputResourceGroupLayout = new GridLayout(4, false);

-    inputResourceGroup.setLayout(inputResourceGroupLayout);

-

-    inputFolderText = new Text(inputResourceGroup, SWT.BORDER);

-    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(3, 1)

-            .applyTo(inputFolderText);

-    inputFolderText.addModifyListener(new ModifyListener() {

-

-      public void modifyText(ModifyEvent event) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-    Button browseInputResource = new Button(inputResourceGroup, SWT.NONE);

-    browseInputResource.setText("Browse ...");

-    browseInputResource.addSelectionListener(new SelectionAdapter() {

-      public void widgetSelected(SelectionEvent e) {

-        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),

-                new WorkbenchLabelProvider(), new WorkbenchContentProvider());

-        dialog.setTitle("Select input folder");

-        dialog.setMessage("Select input folder");

-

-        dialog.setInput(getProject().getProject());

-        dialog.setInitialSelection(getWorkspaceRoot().findMember(inputFolderText.getText()));

-        if (dialog.open() == IDialogConstants.OK_ID) {

-          IResource resource = (IResource) dialog.getFirstResult();

-          if (resource != null) {

-            String fileLoc = resource.getFullPath().toString();

-            inputFolderText.setText(fileLoc);

-          }

-        }

-      }

-    });

-

-    recursivelyButton = new Button(inputResourceGroup, SWT.CHECK);

-    recursivelyButton.setText("Recursively");

-    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false)

-            .applyTo(recursivelyButton);

-    recursivelyButton.addSelectionListener(new SelectionListener() {

-

-      public void widgetSelected(SelectionEvent event) {

-        updateLaunchConfigurationDialog();

-      }

-

-      public void widgetDefaultSelected(SelectionEvent event) {

-      }

-    });

-

-    Label viewLabel = new Label(inputResourceGroup, SWT.NONE);

-    viewLabel.setText("View Name:");

-    viewText = new Text(inputResourceGroup, SWT.BORDER);

-    GridDataFactory.swtDefaults().hint(250, SWT.DEFAULT).align(SWT.LEFT, SWT.CENTER)

-            .grab(true, false).applyTo(viewText);

-    viewText.addModifyListener(new ModifyListener() {

-      public void modifyText(ModifyEvent event) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-

-    Group outputFolderGroup = new Group(composite, SWT.None);

-    outputFolderGroup.setText("Output Folder:");

-    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false)

-            .applyTo(outputFolderGroup);

-    GridLayout outputFolderGroupLayout = new GridLayout(2, false);

-    outputFolderGroup.setLayout(outputFolderGroupLayout);

-    outputFolderText = new Text(outputFolderGroup, SWT.BORDER);

-    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false)

-            .applyTo(outputFolderText);

-    outputFolderText.addModifyListener(new ModifyListener() {

-

-      public void modifyText(ModifyEvent event) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-

-    Button browseOutputFolderButton = new Button(outputFolderGroup, SWT.NONE);

-    browseOutputFolderButton.setText("Browse ...");

-    browseOutputFolderButton.addSelectionListener(new SelectionAdapter() {

-      public void widgetSelected(SelectionEvent e) {

-        String currentContainerString = outputFolderText.getText();

-        IContainer currentContainer = getContainer(currentContainerString);

-        ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),

-                currentContainer, false, "Select output folder");

-        dialog.showClosedProjects(false);

-        dialog.open();

-        Object[] results = dialog.getResult();

-        if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {

-          IPath path = (IPath) results[0];

-          String containerName = path.toOSString();

-          outputFolderText.setText(containerName);

-        }

-      }

-    });

-

-  }

-

-  private IContainer getContainer(String path) {

-    Path containerPath = new Path(path);

-    IResource resource = getWorkspaceRoot().findMember(containerPath);

-    if (resource instanceof IContainer)

-      return (IContainer) resource;

-

-    return null;

-  }

-

-  @Override

-  public void doInitializeForm(ILaunchConfiguration config) {

-    super.doInitializeForm(config);

-

-    IScriptProject proj = null;

-    try {

-      proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(config);

-    } catch (CoreException e) {

-      RutaIdeUIPlugin.error(e);

-    }

-    String defaultInputLocation = RutaProjectUtils.getDefaultInputLocation();

-    String defaultOutputLocation = RutaProjectUtils.getDefaultOutputLocation();

-    IResource defaultInputFolder = proj.getProject().findMember(defaultInputLocation);

-    IResource defaultOutputFolder = proj.getProject().findMember(defaultOutputLocation);

-

-    try {

-      recursivelyButton.setSelection(config.getAttribute(RutaLaunchConstants.RECURSIVE, false));

-    } catch (CoreException e) {

-      recursivelyButton.setSelection(false);

-    }

-

-    try {

-      viewText.setText(config.getAttribute(RutaLaunchConstants.VIEW, CAS.NAME_DEFAULT_SOFA));

-    } catch (CoreException e) {

-      viewText.setText(CAS.NAME_DEFAULT_SOFA);

-    }

-

-    try {

-      if (defaultInputFolder != null) {

-        inputFolderText.setText(config.getAttribute(RutaLaunchConstants.INPUT_FOLDER,

-                defaultInputFolder.getFullPath().toPortableString()));

-      } else {

-        inputFolderText.setText(config.getAttribute(RutaLaunchConstants.INPUT_FOLDER, ""));

-      }

-    } catch (Exception e) {

-    }

-

-    try {

-      if (defaultOutputFolder != null) {

-        outputFolderText.setText(config.getAttribute(RutaLaunchConstants.OUTPUT_FOLDER,

-                defaultOutputFolder.getFullPath().toPortableString()));

-      } else {

-        outputFolderText.setText(config.getAttribute(RutaLaunchConstants.OUTPUT_FOLDER, ""));

-      }

-    } catch (Exception e) {

-    }

-  }

-

-  @Override

-  public void doPerformApply(ILaunchConfigurationWorkingCopy config) {

-    super.doPerformApply(config);

-

-    config.setAttribute(RutaLaunchConstants.RECURSIVE, recursivelyButton.getSelection());

-    config.setAttribute(RutaLaunchConstants.VIEW, viewText.getText());

-    config.setAttribute(RutaLaunchConstants.INPUT_FOLDER, inputFolderText.getText());

-    config.setAttribute(RutaLaunchConstants.OUTPUT_FOLDER, outputFolderText.getText());

-

-  }

-

-  @Override

-  public void setDefaults(ILaunchConfigurationWorkingCopy config) {

-    super.setDefaults(config);

-    IScriptProject proj = null;

-    try {

-      proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(config);

-    } catch (CoreException e) {

-      RutaIdeUIPlugin.error(e);

-    }

-    String defaultInputLocation = RutaProjectUtils.getDefaultInputLocation();

-    String defaultOutputLocation = RutaProjectUtils.getDefaultOutputLocation();

-    IResource inputFolder = proj.getProject().findMember(defaultInputLocation);

-    IResource outputFolder = proj.getProject().findMember(defaultOutputLocation);

-    config.setAttribute(RutaLaunchConstants.RECURSIVE, false);

-    config.setAttribute(RutaLaunchConstants.INPUT_FOLDER, inputFolder.getFullPath()

-            .toPortableString());

-    config.setAttribute(RutaLaunchConstants.OUTPUT_FOLDER, outputFolder.getFullPath()

-            .toPortableString());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaRemoteTab.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaRemoteTab.java
deleted file mode 100644
index 326e6ad..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaRemoteTab.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.launchConfiguration;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;

-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;

-import org.eclipse.dltk.launching.ScriptLaunchConfigurationConstants;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.ModifyEvent;

-import org.eclipse.swt.events.ModifyListener;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Group;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Text;

-

-public class RutaRemoteTab extends AbstractLaunchConfigurationTab {

-  private static final int DEFAULT_PORT = 9000;

-

-  private static final String DEFAULT_SESSION_ID = "ruta_debug";

-

-  private static final int DEFAULT_TIMEOUT = 30 * 1000; // 30 min

-

-  private Text portText;

-

-  private Text sessionIdText;

-

-  private Text timeoutText;

-

-  private int getPort() {

-    return Integer.parseInt(portText.getText());

-  }

-

-  private void setPort(int port) {

-    portText.setText(Integer.toString(port));

-  }

-

-  private String getSessionId() {

-    return sessionIdText.getText();

-  }

-

-  private void setSessionId(String id) {

-    sessionIdText.setText(id);

-  }

-

-  private int getTimeout() {

-    return Integer.parseInt(timeoutText.getText());

-  }

-

-  private void setTimeout(int timeout) {

-    timeoutText.setText(Integer.toString(timeout));

-  }

-

-  protected void createInstruction(Composite parent, Object data) {

-    Label instruction = new Label(parent, SWT.NONE);

-    instruction.setLayoutData(data);

-    instruction.setText("To start Ruta debugging engine use this command temlate:");

-  }

-

-  protected void createPathTemplate(Composite parent, Object data) {

-  }

-

-  protected void createConnectionPropertiesGroup(Composite parent, Object data) {

-    Group group = new Group(parent, SWT.NONE);

-    group.setText("Connection Properties");

-    group.setLayoutData(data);

-

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 2;

-    group.setLayout(layout);

-

-    // Local port

-    Label portLabel = new Label(group, SWT.NONE);

-    portLabel.setText("Local port:");

-

-    portText = new Text(group, SWT.BORDER);

-    portText.addModifyListener(new ModifyListener() {

-      public void modifyText(ModifyEvent e) {

-

-        updateLaunchConfigurationDialog();

-      }

-    });

-    portText.setLayoutData(new GridData(GridData.FILL, SWT.NONE, true, false));

-

-    // Id string

-    Label idLabel = new Label(group, SWT.NONE);

-    idLabel.setText("Connection id:");

-

-    sessionIdText = new Text(group, SWT.BORDER);

-    sessionIdText.addModifyListener(new ModifyListener() {

-      public void modifyText(ModifyEvent e) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-

-    sessionIdText.setLayoutData(new GridData(GridData.FILL, SWT.NONE, true, false));

-

-    // Timeout

-    Label timeoutLabel = new Label(group, SWT.NONE);

-    timeoutLabel.setText("Waiting timeout:");

-

-    timeoutText = new Text(group, SWT.BORDER);

-    timeoutText.addModifyListener(new ModifyListener() {

-      public void modifyText(ModifyEvent e) {

-        updateLaunchConfigurationDialog();

-      }

-    });

-

-    timeoutText.setLayoutData(new GridData(GridData.FILL, SWT.NONE, true, false));

-  }

-

-  public void createControl(Composite parent) {

-    Composite composite = new Composite(parent, SWT.NONE);

-    setControl(composite);

-

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 1;

-    composite.setLayout(layout);

-

-    createConnectionPropertiesGroup(composite, new GridData(GridData.FILL, SWT.NONE, true, false));

-

-    createInstruction(composite, new GridData(GridData.FILL, SWT.NONE, true, false));

-

-    createPathTemplate(composite, new GridData(GridData.FILL, SWT.NONE, true, false));

-  }

-

-  public String getName() {

-    return "Ruta Remote Properties";

-  }

-

-  public void initializeFrom(ILaunchConfiguration configuration) {

-    try {

-      // Port

-      int port = configuration.getAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_PORT,

-              -1);

-

-      setPort(port != -1 ? port : DEFAULT_PORT);

-

-      // Session id

-      String sessionId = configuration.getAttribute(

-              ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_SESSION_ID, (String) null);

-

-      setSessionId(sessionId != null ? sessionId : DEFAULT_SESSION_ID);

-

-      // Timeout

-      int timeout = configuration.getAttribute(

-              ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_WAITING_TIMEOUT, -1);

-      setTimeout(timeout != -1 ? timeout : DEFAULT_TIMEOUT);

-    } catch (CoreException e) {

-      // TODO: Log this

-    }

-  }

-

-  public void performApply(ILaunchConfigurationWorkingCopy configuration) {

-    try {

-      setErrorMessage(null);

-

-      configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_REMOTE, true);

-

-      configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_PORT, getPort());

-

-      configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_SESSION_ID,

-              getSessionId());

-

-      configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_WAITING_TIMEOUT,

-              getTimeout());

-    } catch (NumberFormatException e) {

-      setErrorMessage("Should be a number instead of string");

-    }

-  }

-

-  public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {

-    configuration

-            .setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_PORT, DEFAULT_PORT);

-

-    configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_SESSION_ID,

-            DEFAULT_SESSION_ID);

-

-    configuration.setAttribute(ScriptLaunchConfigurationConstants.ATTR_DLTK_DBGP_WAITING_TIMEOUT,

-            DEFAULT_TIMEOUT);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaRemoteTabGroup.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaRemoteTabGroup.java
deleted file mode 100644
index a1ce6c8..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaRemoteTabGroup.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.launchConfiguration;

-

-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;

-import org.eclipse.debug.ui.ILaunchConfigurationDialog;

-import org.eclipse.debug.ui.ILaunchConfigurationTab;

-

-public class RutaRemoteTabGroup extends AbstractLaunchConfigurationTabGroup {

-

-  public RutaRemoteTabGroup() {

-  }

-

-  public void createTabs(ILaunchConfigurationDialog dialog, String mode) {

-    ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { new RutaRemoteTab() };

-    setTabs(tabs);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaTabGroup.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaTabGroup.java
deleted file mode 100644
index a8a5c92..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launchConfiguration/RutaTabGroup.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.launchConfiguration;

-

-import org.apache.uima.ruta.ide.debug.ui.interpreters.RutaInterpreterTab;

-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;

-import org.eclipse.debug.ui.EnvironmentTab;

-import org.eclipse.debug.ui.ILaunchConfigurationDialog;

-import org.eclipse.debug.ui.ILaunchConfigurationTab;

-import org.eclipse.dltk.debug.ui.launchConfigurations.ScriptCommonTab;

-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;

-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;

-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;

-

-public class RutaTabGroup extends AbstractLaunchConfigurationTabGroup {

-  public void createTabs(ILaunchConfigurationDialog dialog, String mode) {

-    RutaMainLaunchConfigurationTab main = new RutaMainLaunchConfigurationTab(mode);

-    ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { main, new JavaArgumentsTab(),

-        new JavaJRETab(), new JavaClasspathTab(), new RutaInterpreterTab(main),

-        new EnvironmentTab(), new ScriptCommonTab(main) };

-    setTabs(tabs);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launcher/RutaLaunchShortcut.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launcher/RutaLaunchShortcut.java
deleted file mode 100644
index e11d58c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/launcher/RutaLaunchShortcut.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.launcher;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationConstants;

-import org.eclipse.debug.core.ILaunchConfigurationType;

-import org.eclipse.dltk.internal.debug.ui.launcher.AbstractScriptLaunchShortcut;

-

-public class RutaLaunchShortcut extends AbstractScriptLaunchShortcut {

-  @Override

-  protected ILaunchConfigurationType getConfigurationType() {

-    return getLaunchManager().getLaunchConfigurationType(

-            RutaLaunchConfigurationConstants.ID_RUTA_SCRIPT);

-  }

-

-  @Override

-  protected String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferenceMessages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferenceMessages.java
deleted file mode 100644
index 97134d9..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferenceMessages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.preferences;

-

-import org.eclipse.osgi.util.NLS;

-

-public class RutaDebugPreferenceMessages extends NLS {

-  private static String BUNDLE_NAME = "org.apache.uima.ruta.ide.debug.ui.preferences.RutaDebugPreferenceMessages";

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, RutaDebugPreferenceMessages.class);

-  }

-

-  public static String RutaDebugPreferencePage_description;

-

-  public static String RutaDebugEnginePreferencePage_description;

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferencePage.java
deleted file mode 100644
index d432035..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferencePage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.dltk.debug.core.DLTKDebugPreferenceConstants;

-import org.eclipse.dltk.debug.ui.preferences.AbstractDebuggingOptionsBlock;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage;

-import org.eclipse.dltk.ui.preferences.AbstractOptionsBlock;

-import org.eclipse.dltk.ui.preferences.PreferenceKey;

-import org.eclipse.dltk.ui.util.IStatusChangeListener;

-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;

-

-public class RutaDebugPreferencePage extends AbstractConfigurationBlockPropertyAndPreferencePage {

-

-  private static PreferenceKey BREAK_ON_FIRST_LINE = new PreferenceKey(RutaIdeUIPlugin.PLUGIN_ID,

-          DLTKDebugPreferenceConstants.PREF_DBGP_BREAK_ON_FIRST_LINE);

-

-  private static PreferenceKey ENABLE_DBGP_LOGGING = new PreferenceKey(RutaIdeUIPlugin.PLUGIN_ID,

-          DLTKDebugPreferenceConstants.PREF_DBGP_ENABLE_LOGGING);

-

-  private static String PREFERENCE_PAGE_ID = "org.apache.uima.ruta.ide.preferences.debug";

-

-  private static String PROPERTY_PAGE_ID = "org.apache.uima.ruta.ide.propertyPage.debug";

-

-  @Override

-  protected AbstractOptionsBlock createOptionsBlock(IStatusChangeListener newStatusChangedListener,

-          IProject project, IWorkbenchPreferenceContainer container) {

-    return new AbstractDebuggingOptionsBlock(newStatusChangedListener, project, getKeys(),

-            container) {

-

-      @Override

-      protected PreferenceKey getBreakOnFirstLineKey() {

-        return BREAK_ON_FIRST_LINE;

-      }

-

-      @Override

-      protected PreferenceKey getDbgpLoggingEnabledKey() {

-        return ENABLE_DBGP_LOGGING;

-      }

-    };

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-    return null;

-  }

-

-  /*

-   * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageId()

-   */

-  @Override

-  protected String getPreferencePageId() {

-    return PREFERENCE_PAGE_ID;

-  }

-

-  /*

-   * @seeorg.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#

-   * getProjectHelpId()

-   */

-  @Override

-  protected String getProjectHelpId() {

-    // TODO Auto-generated method stub

-    return null;

-  }

-

-  /*

-   * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageId()

-   */

-  @Override

-  protected String getPropertyPageId() {

-    return PROPERTY_PAGE_ID;

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#setDescription

-   * ()

-   */

-  @Override

-  protected void setDescription() {

-    setDescription(RutaDebugPreferenceMessages.RutaDebugPreferencePage_description);

-  }

-

-  /*

-   * @seeorg.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences()));

-  }

-

-  private PreferenceKey[] getKeys() {

-    return new PreferenceKey[] { BREAK_ON_FIRST_LINE, ENABLE_DBGP_LOGGING };

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebuggingEnginePreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebuggingEnginePreferencePage.java
deleted file mode 100644
index baadc53..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebuggingEnginePreferencePage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.ide.debug.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.dltk.debug.ui.preferences.AbstractDebuggingEngineOptionsBlock;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage;

-import org.eclipse.dltk.ui.preferences.AbstractOptionsBlock;

-import org.eclipse.dltk.ui.preferences.PreferenceKey;

-import org.eclipse.dltk.ui.util.IStatusChangeListener;

-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;

-

-public class RutaDebuggingEnginePreferencePage extends

-        AbstractConfigurationBlockPropertyAndPreferencePage {

-

-  private static PreferenceKey DEBUGGING_ENGINE = new PreferenceKey(RutaIdeUIPlugin.PLUGIN_ID,

-          RutaDebugConstants.DEBUGGING_ENGINE_ID_KEY);

-

-  private static final String PREFERENCE_PAGE_ID = "org.apache.uima.ruta.ide.preferences.debug.engines";

-

-  private static final String PROPERTY_PAGE_ID = "org.apache.uima.ruta.ide.propertyPage.debug.engines";

-

-  @Override

-  protected AbstractOptionsBlock createOptionsBlock(IStatusChangeListener newStatusChangedListener,

-          IProject project, IWorkbenchPreferenceContainer container) {

-    return new AbstractDebuggingEngineOptionsBlock(newStatusChangedListener, project, getKeys(),

-            container) {

-

-      @Override

-      protected String getNatureId() {

-        return RutaNature.NATURE_ID;

-      }

-

-      @Override

-      protected PreferenceKey getSavedContributionKey() {

-        return DEBUGGING_ENGINE;

-      }

-    };

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-    // TODO Auto-generated method stub

-    return null;

-  }

-

-  /*

-   * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageId()

-   */

-  @Override

-  protected String getPreferencePageId() {

-    return PREFERENCE_PAGE_ID;

-  }

-

-  /*

-   * @seeorg.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#

-   * getProjectHelpId()

-   */

-  @Override

-  protected String getProjectHelpId() {

-    // TODO Auto-generated method stub

-    return null;

-  }

-

-  /*

-   * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageId()

-   */

-  @Override

-  protected String getPropertyPageId() {

-    return PROPERTY_PAGE_ID;

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#setDescription

-   * ()

-   */

-  @Override

-  protected void setDescription() {

-    setDescription(RutaDebugPreferenceMessages.RutaDebugEnginePreferencePage_description);

-  }

-

-  /*

-   * @seeorg.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences()));

-  }

-

-  private PreferenceKey[] getKeys() {

-    return new PreferenceKey[] { DEBUGGING_ENGINE };

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/RutaDebuggerRunner.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/RutaDebuggerRunner.java
deleted file mode 100644
index 6deae9a..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/RutaDebuggerRunner.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.ide.debugger;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.apache.uima.ruta.ide.launching.IConfigurableRunner;

-import org.apache.uima.ruta.ide.launching.IRutaInterpreterRunnerConfig;

-import org.apache.uima.ruta.ide.launching.RutaInterpreterRunner;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.dltk.core.PreferencesLookupDelegate;

-import org.eclipse.dltk.launching.DebuggingEngineRunner;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.InterpreterConfig;

-

-public class RutaDebuggerRunner extends DebuggingEngineRunner implements IConfigurableRunner {

-

-  private static String ENGINE_ID = "org.apache.uima.ruta.ide.debugger.preferences.RutaDebuggerRunnerFactory";

-

-  IRutaInterpreterRunnerConfig runnerconfig = RutaInterpreterRunner.DEFAULT_CONFIG;

-

-  public RutaDebuggerRunner(IInterpreterInstall install) {

-    super(install);

-  }

-

-  @Override

-  public String getDebugModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  @Override

-  public void run(InterpreterConfig config, ILaunch launch, IProgressMonitor monitor)

-          throws CoreException {

-    initializeLaunch(launch, config, createPreferencesLookupDelegate(launch));

-    RutaInterpreterRunner.doRunImpl(config, launch, this.runnerconfig, monitor);

-  }

-

-  public void setRunnerConfig(IRutaInterpreterRunnerConfig config) {

-    this.runnerconfig = config;

-  }

-

-  @Override

-  protected String getDebuggingEngineId() {

-    return ENGINE_ID;

-  }

-

-  @Override

-  protected String getDebugPreferenceQualifier() {

-    return RutaIdeUIPlugin.PLUGIN_ID;

-  }

-

-  @Override

-  protected String getDebuggingEnginePreferenceQualifier() {

-    return RutaIdeUIPlugin.PLUGIN_ID;

-  }

-

-  protected String getLoggingEnabledPreferenceKey() {

-    // not yet supported...

-    return null;

-  }

-

-  @Override

-  protected String getLogFileNamePreferenceKey() {

-    // not yet supported...

-    return null;

-  }

-

-  protected String getLogFilePathPreferenceKey() {

-    // not yet supported...

-    return null;

-  }

-

-  @Override

-  protected InterpreterConfig addEngineConfig(InterpreterConfig config,

-          PreferencesLookupDelegate delegate, ILaunch launch) throws CoreException {

-    return config;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/RutaDebuggerRunnerFactory.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/RutaDebuggerRunnerFactory.java
deleted file mode 100644
index 0b00863..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/RutaDebuggerRunnerFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * 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.ruta.ide.debugger;

-

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.IInterpreterRunner;

-import org.eclipse.dltk.launching.IInterpreterRunnerFactory;

-

-public class RutaDebuggerRunnerFactory implements IInterpreterRunnerFactory {

-

-  /*

-   * @see

-   * org.eclipse.dltk.launching.IInterpreterRunnerFactory#createRunner(org.eclipse.dltk.launching

-   * .IInterpreterInstall)

-   */

-  public IInterpreterRunner createRunner(IInterpreterInstall install) {

-    return new RutaDebuggerRunner(install);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/preferences/PreferenceMessages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/preferences/PreferenceMessages.java
deleted file mode 100644
index 4236652..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/preferences/PreferenceMessages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.debugger.preferences;

-

-import org.eclipse.osgi.util.NLS;

-

-public class PreferenceMessages {

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.debugger.preferences.PreferenceMessages";

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, PreferenceMessages.class);

-  }

-

-  public static String PreferencesDescription;

-

-  public static String NoSettingsAvailable;

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/preferences/RutaDebuggerPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/preferences/RutaDebuggerPreferencePage.java
deleted file mode 100644
index 656ed86..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/debugger/preferences/RutaDebuggerPreferencePage.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*

- * 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.ruta.ide.debugger.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage;

-import org.eclipse.dltk.ui.preferences.AbstractOptionsBlock;

-import org.eclipse.dltk.ui.preferences.PreferenceKey;

-import org.eclipse.dltk.ui.util.IStatusChangeListener;

-import org.eclipse.dltk.ui.util.SWTFactory;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;

-

-public class RutaDebuggerPreferencePage extends AbstractConfigurationBlockPropertyAndPreferencePage {

-

-  private static String PREFERENCE_PAGE_ID = "org.apache.uima.ruta.ide.preferences.debug.engines.debugger";

-

-  private static String PROPERTY_PAGE_ID = "org.apache.uima.ruta.ide.propertyPage.debug.engines.debugger";

-

-  /*

-   * @seeorg.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#

-   * createOptionsBlock(org.eclipse.dltk.ui.util.IStatusChangeListener,

-   * org.eclipse.core.resources.IProject, org.eclipse.ui.preferences.IWorkbenchPreferenceContainer)

-   */

-  @Override

-  protected AbstractOptionsBlock createOptionsBlock(IStatusChangeListener newStatusChangedListener,

-          IProject project, IWorkbenchPreferenceContainer container) {

-    return new AbstractOptionsBlock(newStatusChangedListener, project, new PreferenceKey[] {},

-            container) {

-

-      @Override

-      protected Control createOptionsBlock(Composite parent) {

-        Composite composite = SWTFactory.createComposite(parent, parent.getFont(), 1, 1,

-                GridData.FILL);

-        SWTFactory.createLabel(composite, PreferenceMessages.NoSettingsAvailable, 1);

-        return composite;

-      }

-    };

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-    return null;

-  }

-

-  /*

-   * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageId()

-   */

-  @Override

-  protected String getPreferencePageId() {

-    return PREFERENCE_PAGE_ID;

-  }

-

-  /*

-   * @seeorg.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#

-   * getProjectHelpId()

-   */

-  @Override

-  protected String getProjectHelpId() {

-    // TODO Auto-generated method stub

-    return null;

-  }

-

-  /*

-   * @see org.eclipse.dltk.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageId()

-   */

-  @Override

-  protected String getPropertyPageId() {

-    return PROPERTY_PAGE_ID;

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#setDescription

-   * ()

-   */

-  @Override

-  protected void setDescription() {

-    setDescription(PreferenceMessages.PreferencesDescription);

-  }

-

-  /*

-   * @seeorg.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/Messages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/Messages.java
deleted file mode 100644
index 7699a3b..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/Messages.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.ruta.ide.formatter;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.formatter.internal.messages"; //$NON-NLS-1$
-
-  public static String RutaFormatter_contentCorrupted;
-  static {
-    // initialize resource bundle
-    NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-  }
-
-  private Messages() {
-  }
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormattedPrinter.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormattedPrinter.java
deleted file mode 100644
index e15ec5c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormattedPrinter.java
+++ /dev/null
@@ -1,894 +0,0 @@
-/*
- * 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.ruta.ide.formatter;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.antlr.runtime.CommonToken;
-import org.apache.uima.ruta.ide.parser.ast.ActionFactory;
-import org.apache.uima.ruta.ide.parser.ast.ComposedRuleElement;
-import org.apache.uima.ruta.ide.parser.ast.ConditionFactory;
-import org.apache.uima.ruta.ide.parser.ast.RutaAbstractDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaBinaryArithmeticExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaBlock;
-import org.apache.uima.ruta.ide.parser.ast.RutaBooleanNumberExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;
-import org.apache.uima.ruta.ide.parser.ast.RutaConditionConstants;
-import org.apache.uima.ruta.ide.parser.ast.RutaDeclarationsStatement;
-import org.apache.uima.ruta.ide.parser.ast.RutaDeclareDeclarationsStatement;
-import org.apache.uima.ruta.ide.parser.ast.RutaExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaFeatureDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaListExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaLogAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaPackageDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaQuantifierLiteralExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaRegExpRule;
-import org.apache.uima.ruta.ide.parser.ast.RutaRule;
-import org.apache.uima.ruta.ide.parser.ast.RutaRuleElement;
-import org.apache.uima.ruta.ide.parser.ast.RutaStringExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaStructureAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;
-import org.apache.uima.ruta.ide.parser.ast.RutaTypeDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;
-import org.eclipse.dltk.ast.ASTListNode;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.declarations.Declaration;
-import org.eclipse.dltk.ast.declarations.MethodDeclaration;
-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
-import org.eclipse.dltk.ast.declarations.TypeDeclaration;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.ast.expressions.StringLiteral;
-import org.eclipse.dltk.ast.statements.Block;
-import org.eclipse.dltk.ast.statements.Statement;
-import org.eclipse.dltk.formatter.FormatterDocument;
-import org.eclipse.dltk.formatter.IFormatterIndentGenerator;
-
-/**
- * Formats a document.<br>
- * Use the append methods within the visit methods to preserve the comments.
- * 
- * 
- */
-public class RutaFormattedPrinter extends ASTVisitor {
-
-  private FormatterDocument document;
-
-  private String lineDelimiter;
-
-  private static final String SEMI = ";";
-
-  private static final String CONCAT = " + ";
-
-  private static final String CONCAT_RULES = "% ";
-  
-  private static final String COMMA = ",";
-
-  private static final int NL_DECLS_COUNT = 2;
-
-  private static final String CURLY_OPEN = "{";
-
-  private static final String CURLY_CLOSE = "}";
-
-  private static final String BRACK_OPEN = "[";
-
-  private static final String BRACK_CLOSE = "]";
-
-  private static final String THEN = "->";
-
-  private static final String PAR_OPEN = "(";
-
-  private static final String PAR_CLOSE = ")";
-
-  private static final String EQUALS = " = ";
-
-  private IFormatterIndentGenerator indentGenerator;
-
-  private StringBuilder output;
-
-  private List<CommonToken> comments;
-
-  private Iterator<CommonToken> iterator;
-
-  private CommonToken currentComment;
-
-  private int indentLevel = 0;
-
-  private int lines_before_long_declarations;
-
-  private int maxLineLength;
-
-  private boolean inBlockDeclaration = false;
-
-  private Map<Integer, Object> lastStatements = new HashMap<Integer, Object>();
-
-  private int commentLineSince = 0;
-
-  // hotfix: 0 = false, 1 = first rule element, 3 = not first rule element
-  private int inLargeRule = 0;
-
-  private boolean retainLB = true;
-
-  public RutaFormattedPrinter(FormatterDocument document, String lineDelimiter,
-          IFormatterIndentGenerator indentGenerator, List<CommonToken> comments, RutaFormatter tmf) {
-    this.document = document;
-    this.lineDelimiter = lineDelimiter;
-    this.indentGenerator = indentGenerator;
-    this.output = new StringBuilder();
-
-    // read format preferences
-    this.lines_before_long_declarations = tmf
-            .getInt(RutaFormatterConstants.LINES_BEFORE_LONG_DECLARATIONS);
-    this.maxLineLength = tmf.getInt(RutaFormatterConstants.MAX_LINE_LENGTH);
-
-    // comments
-    this.comments = comments == null ? new ArrayList<CommonToken>() : comments;
-    iterator = this.comments.iterator();
-    this.currentComment = iterator.hasNext() ? iterator.next() : null;
-  }
-
-  public String getOutput() {
-    appendLeftComments();
-    return this.output.toString();
-  }
-
-  @Override
-  public boolean visit(Statement s) throws Exception {
-
-    appendComments(s);
-    fillNewLines(s);
-
-    if (s instanceof RutaDeclarationsStatement) {
-      // append new lines before LONG DECLARATIONS
-      RutaDeclarationsStatement decls = (RutaDeclarationsStatement) s;
-      // if (decls.getDeclarationsCount() > NL_DECLS_COUNT) {
-      // for (int i = 0; i < lines_before_long_declarations; i++) {
-      // appendNewLine();
-      // }
-      // }
-      // format declarations:
-      // print type token
-      appendIntoNewLine(document.get(decls.getTypeTokenStart(), decls.getTypeTokenEnd()) + " ");
-      // print parent if available
-      if (s instanceof RutaDeclareDeclarationsStatement) {
-        RutaDeclareDeclarationsStatement dds = (RutaDeclareDeclarationsStatement) s;
-        ASTNode p = dds.getParent();
-        if (p != null) {
-          append(p);
-          append(" ");
-        }
-      }
-      // print identifiers
-      List<RutaAbstractDeclaration> declarations = decls.getDeclarations();
-      traverseAstNodes(declarations);
-      // print init expr
-      if (decls.getInitExpr() != null) {
-        append(EQUALS);
-        decls.getInitExpr().traverse(this);
-      }
-      appendStatementEnd();
-      return false;
-    }
-    if (s instanceof RutaRegExpRule) {
-      // traverse into container RutaRule to format RuleElements
-      if (!inBlockDeclaration) {
-        appendNewLine();
-      }
-      // Rules always just consists of RuleElements: whitespace separation
-      if (s.sourceEnd() - s.sourceStart() > 2 * maxLineLength) {
-        inLargeRule = 1;
-        indentLevel++;
-      }
-      RutaRule rule = (RutaRule) s;
-      List<Expression> expressions = rule.getExpressions();
-      if (expressions != null && !expressions.isEmpty()) {
-        append(expressions.get(0));
-        append(" " + THEN + " ");
-        if (expressions.size() > 1) {
-          for (int i = 1; i < expressions.size(); i++) {
-            Expression expression = expressions.get(i);
-            if (expression.getKind() == RutaTypeConstants.RUTA_TYPE_N && i < expressions.size() - 1) {
-              append(expression);
-              append(EQUALS);
-              append(expressions.get(++i));
-            } else {
-              append(expression);
-            }
-            if (i < expressions.size() - 1) {
-              append(COMMA + " ");
-            }
-          }
-        }
-      }
-      if (!inBlockDeclaration) {
-        appendStatementEnd();
-      }
-      if (inLargeRule > 0) {
-        indentLevel--;
-        inLargeRule = 0;
-      }
-      return false;
-    }
-
-    if (s instanceof RutaRule) {
-      // traverse into container RutaRule to format RuleElements
-      if (!inBlockDeclaration) {
-        appendNewLine();
-      }
-      // Rules always just consists of RuleElements: whitespace separation
-      if (s.sourceEnd() - s.sourceStart() > 2 * maxLineLength) {
-        inLargeRule = 1;
-        indentLevel++;
-      }
-      RutaRule rule = (RutaRule) s;
-      List<Expression> expressions = rule.getExpressions();
-      String sep = "";
-      traverseAstNodes(expressions, sep);
-      if (!inBlockDeclaration) {
-        appendStatementEnd();
-      }
-      if (inLargeRule > 0) {
-        indentLevel--;
-        inLargeRule = 0;
-      }
-      return false;
-      // return true;
-    }
-    if (s instanceof RutaTypeDeclaration) {
-      RutaTypeDeclaration rtd = (RutaTypeDeclaration) s;
-      append(document.get(rtd.getNameStart(), rtd.getNameEnd()));
-      List<RutaFeatureDeclaration> features = ((RutaTypeDeclaration) s).getFeatures();
-      if (features != null && !features.isEmpty()) {
-        append(PAR_OPEN);
-        for (RutaFeatureDeclaration each : features) {
-          append(each.getType());
-          append(" ");
-          append(each.getName());
-          if (features.indexOf(each) < features.size() - 1) {
-            append(COMMA + " ");
-          }
-        }
-        append(PAR_CLOSE);
-      }
-      return false;
-    }
-
-    if (s instanceof Declaration && !(s instanceof RutaPackageDeclaration)) {
-      append(s);
-      return false;
-    }
-    if (s instanceof RutaPackageDeclaration) {
-      append(s);
-      appendStatementEnd();
-      return false;
-    }
-    // append SEMIs for all other statements
-    appendIntoNewLine(s);
-    appendStatementEnd();
-    return false;
-  }
-
-  private void fillNewLines(Object s) {
-    Object last = lastStatements.get(indentLevel);
-    // if (last == null && indentLevel > 0) {
-    // last = lastStatements.get(indentLevel - 1);
-    // }
-    if (last != null && retainLB) {
-      int start = 0;
-      int end = 0;
-      if (s instanceof Statement) {
-        end = ((ASTNode) s).sourceStart();
-      } else if (s instanceof CommonToken) {
-        end = ((CommonToken) s).getStartIndex();
-      }
-      if (last instanceof Statement) {
-        start = ((ASTNode) last).sourceEnd() + 1;
-      } else if (last instanceof CommonToken) {
-        start = ((CommonToken) last).getStopIndex();
-      }
-
-      if (start < end) {
-        String string = document.get(start, end);
-        String replaceAll = string.replaceAll(lineDelimiter, "");
-        double d = (string.length() - replaceAll.length()) / lineDelimiter.length()
-                - commentLineSince;
-        if (s instanceof CommonToken && commentLineSince == 0) {
-          d++;
-        }
-        for (int i = 1; i < d; i++) {
-          appendNewLine();
-        }
-        if (d < 2 && s instanceof RutaDeclarationsStatement && !(last instanceof Declaration)) {
-          appendNewLine();
-        }
-        commentLineSince = 0;
-      }
-    } else if (inBlockDeclaration || s instanceof CommonToken) {
-      appendNewLine();
-    }
-    lastStatements.put(indentLevel, s);
-  }
-
-  @Override
-  public boolean endvisit(Statement s) throws Exception {
-    // if (s instanceof RutaRule) {
-    // append(SEMI);
-    // return true;
-    // }
-    return super.endvisit(s);
-  }
-
-  @Override
-  public boolean visit(Expression s) throws Exception {
-    // traverse Block (first child of root element:
-    if (s instanceof Block) {
-      return true;
-    }
-    if (s instanceof ComposedRuleElement) {
-      ComposedRuleElement cre = (ComposedRuleElement) s;
-      List<Expression> elements = cre.getElements();
-      // int length = cre.sourceEnd() - cre.sourceStart();
-      if (inLargeRule == 2) {
-        inLargeRule = 4;
-      }
-      if(cre.isAfterConcat()) {
-        append(CONCAT_RULES);
-      }
-      append(PAR_OPEN);
-      String sep = "";
-      if (cre.isDisjunctive() != null) {
-        if (cre.isDisjunctive()) {
-          sep = " |";
-        } else {
-          sep = " &";
-        }
-      }
-      traverseAstNodes(elements, sep);
-      append(PAR_CLOSE);
-      appendRuleElement(cre);
-      if (inLargeRule == 4) {
-        inLargeRule = 1;
-      }
-      return false;
-    }
-    // special format for RuleElements:
-    if (s instanceof RutaRuleElement) {
-      RutaRuleElement ruleEl = (RutaRuleElement) s;
-      if (inLargeRule == 2) {
-        appendNewLine();
-      } else if (inLargeRule == 1) {
-        inLargeRule = 2;
-      }
-      if(ruleEl.isAfterConcat()) {
-        append(CONCAT_RULES);
-      }
-      appendRuleElement(ruleEl);
-      return false;
-    }
-    // special format for actions
-    if (s instanceof RutaAction) {
-      RutaAction a = (RutaAction) s;
-      String name = document.get(a.getNameStart(), a.getNameEnd());
-      append(name);
-      List<? extends ASTNode> childs = a.getChilds();
-      if (childs != null && !childs.isEmpty()) {
-        boolean addPar = !a.getName().equals(ActionFactory.IMPLICIT);
-        if (addPar) {
-          append(PAR_OPEN);
-        }
-        // special format for create
-        if (a instanceof RutaStructureAction) {
-          if (name.equals("TRIE")) {
-            printStructureAction2(a);
-          } else {
-            printStructureAction(a);
-          }
-        } else {
-          traverseAstNodes(childs);
-        }
-        // special format for log
-        if (a instanceof RutaLogAction && ((RutaLogAction) a).isLogLevelAssigned()) {
-          appendSeparator(COMMA);
-          RutaLogAction logAction = (RutaLogAction) a;
-          append(logAction.getLogLevelStart(), logAction.getLogLevelEnd());
-        }
-        if (addPar) {
-          append(PAR_CLOSE);
-        }
-      }
-      return false;
-    }
-    // special format for conditions
-    if (s instanceof RutaCondition) {
-      RutaCondition c = (RutaCondition) s;
-      append(document.get(c.getNameStart(), c.getNameEnd()));
-      List<? extends ASTNode> childs = c.getChilds();
-      // minus is a condition without parameter parantheses:
-      boolean addPar = !c.getName().equals(ConditionFactory.IMPLICIT)
-              && s.getKind() != RutaConditionConstants.COND_MINUS && childs != null
-              && !childs.isEmpty();
-      if (addPar) {
-        append(PAR_OPEN);
-      }
-      traverseAstNodes(childs);
-      if (addPar) {
-        append(PAR_CLOSE);
-      }
-      return false;
-    }
-    // special format for boolean number expressions
-    if (s instanceof RutaBooleanNumberExpression) {
-      RutaBooleanNumberExpression tmbne = (RutaBooleanNumberExpression) s;
-      append(PAR_OPEN);
-      if (tmbne.getE1() != null) {
-        tmbne.getE1().traverse(this);
-      }
-      append(tmbne.getOperator());
-      if (tmbne.getE2() != null) {
-        tmbne.getE2().traverse(this);
-      }
-      append(PAR_CLOSE);
-      return false;
-    }
-    // special format for string expressions
-    if (s instanceof RutaStringExpression && ((RutaExpression) s).getExpression() != null) {
-      RutaStringExpression tmse = (RutaStringExpression) s;
-      List<?> childs = tmse.getExpression().getChilds();
-      Object object2 = childs.get(0);
-      if (object2 instanceof ASTNode) {
-        ASTNode astnode = (ASTNode) object2;
-        List<?> childs2 = astnode.getChilds();
-        for (Object object : childs2) {
-          if (object instanceof RutaExpression) {
-            RutaExpression expr = (RutaExpression) object;
-            // if (expr.isInParantheses()) {
-            // append(PAR_OPEN);
-            // append(expr);
-            // append(PAR_CLOSE);
-            // } else {
-            append(expr);
-            // }
-          } else if (object instanceof StringLiteral) {
-            StringLiteral sl = (StringLiteral) object;
-            String value = sl.getValue();
-            append(value);
-          } else if (object instanceof RutaVariableReference) {
-            RutaVariableReference vr = (RutaVariableReference) object;
-            append(vr.getName());
-          }
-          if (childs2.indexOf(object) < childs2.size() - 1) {
-            append(CONCAT);
-          }
-        }
-      } else {
-        append(s);
-      }
-      return false;
-    }
-    if (s instanceof RutaListExpression) {
-      RutaListExpression le = (RutaListExpression) s;
-      append(CURLY_OPEN);
-      ASTListNode exprs = le.getExprs();
-      traverseAstNodes(exprs.getChilds());
-      append(CURLY_CLOSE);
-      return false;
-    }
-
-    // special format for paranthesed expressions: (expression)
-    // if (s instanceof RutaExpression && ((RutaExpression) s).isInParantheses()) {
-    // append(PAR_OPEN);
-    // append(s);
-    // append(PAR_CLOSE);
-    // return false;
-    // }
-    if (s instanceof RutaBinaryArithmeticExpression) {
-      RutaBinaryArithmeticExpression ba = (RutaBinaryArithmeticExpression) s;
-      String operator = ba.getOperator();
-      append(operator);
-      append(PAR_OPEN);
-      traverseAstNodes(ba.getChilds());
-      append(PAR_CLOSE);
-    }
-    append(s);
-    return false;
-  }
-
-  /**
-   * structure actions like CREATE, FILL with assignments.
-   * 
-   * @param a
-   */
-  private void printStructureAction(RutaAction a) {
-    RutaStructureAction tmca = (RutaStructureAction) a;
-    // structure
-    if (tmca.getStructure() != null) {
-      append(tmca.getStructure());
-    }
-    append(COMMA);
-    append(" ");
-    // number expressions
-    List<Expression> indices = tmca.getExpressions();
-    if (indices != null) {
-      traverseAstNodes(indices);
-      if (!indices.isEmpty()) {
-        append(COMMA);
-        append(" ");
-      }
-    }
-    // assignments
-    Map<Expression, Expression> assignments = tmca.getAssignments();
-    Iterator it = assignments.entrySet().iterator();
-    while (it.hasNext()) {
-      if (assignments.size() > 3) {
-        appendNewLineAndIndent();
-      }
-      Map.Entry pairs = (Map.Entry) it.next();
-      try {
-        ((Expression) pairs.getKey()).traverse(this);
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-      append(EQUALS);
-      try {
-        ((Expression) pairs.getValue()).traverse(this);
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-      if (it.hasNext()) {
-        output.append(COMMA);
-        append(" ");
-      }
-    }
-  }
-
-  private void printStructureAction2(RutaAction a) {
-    RutaStructureAction tmca = (RutaStructureAction) a;
-
-    Map<Expression, Expression> assignments = tmca.getAssignments();
-    Iterator it = assignments.entrySet().iterator();
-    while (it.hasNext()) {
-      if (assignments.size() > 3) {
-        appendNewLineAndIndent();
-      }
-      Map.Entry pairs = (Map.Entry) it.next();
-      try {
-        ((Expression) pairs.getKey()).traverse(this);
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-      append(EQUALS);
-      try {
-        ((Expression) pairs.getValue()).traverse(this);
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-      output.append(COMMA);
-      append(" ");
-    }
-    // structure
-    if (tmca.getStructure() != null) {
-      append(tmca.getStructure());
-    }
-    append(COMMA);
-    append(" ");
-    // number expressions
-    List<Expression> indices = tmca.getExpressions();
-    if (indices != null) {
-      traverseAstNodes(indices);
-    }
-    // assignments
-
-  }
-
-  @Override
-  public boolean endvisit(Expression s) throws Exception {
-    return super.endvisit(s);
-  }
-
-  /**
-   * @param ruleEl
-   * @param conditions
-   * @param actions
-   * @throws Exception 
-   */
-  private void appendRuleElement(RutaRuleElement ruleEl) throws Exception {
-    // if (ruleEl instanceof ComposedRuleElement) {
-    // ComposedRuleElement cre = (ComposedRuleElement) ruleEl;
-    // List<Expression> elements = cre.getElements();
-    // append(PAR_OPEN);
-    // for (Expression expression : elements) {
-    //
-    // if (expression instanceof RutaRuleElement) {
-    // RutaRuleElement re = (RutaRuleElement) expression;
-    // appendRuleElement(re);
-    // }
-    // if (elements.indexOf(expression) < elements.size() - 1) {
-    // append(" ");
-    // }
-    //
-    // }
-    // append(PAR_CLOSE);
-    // } else
-    if (ruleEl.getHead() != null) {
-      append(ruleEl.getHead());
-    }
-    if(ruleEl.isWildcard()) {
-      append("#");
-    }
-    List<RutaCondition> conditions = ruleEl.getConditions();
-    List<RutaAction> actions = ruleEl.getActions();
-    // don't print {->} for empty rule elements
-
-    // print Quantifiers
-    List<? extends ASTNode> quantifierExpressions = ruleEl.getQuantifierExpressions();
-    if (quantifierExpressions != null && !quantifierExpressions.isEmpty()) {
-      if (quantifierExpressions.size() == 1) {
-        ASTNode astNode = quantifierExpressions.get(0);
-        if (astNode instanceof RutaQuantifierLiteralExpression) {
-          append(astNode);
-        } else {
-          append(BRACK_OPEN);
-          append(astNode);
-          append(BRACK_CLOSE);
-        }
-      } else if (quantifierExpressions.size() == 2) {
-        if (quantifierExpressions.get(1) instanceof RutaQuantifierLiteralExpression) {
-          append(BRACK_OPEN);
-          append(quantifierExpressions.get(0));
-          append(BRACK_CLOSE);
-          append(quantifierExpressions.get(1));
-        } else {
-          append(BRACK_OPEN);
-          append(quantifierExpressions.get(0));
-          append(COMMA + " ");
-          append(quantifierExpressions.get(1));
-          append(BRACK_CLOSE);
-        }
-      } else if (quantifierExpressions.size() == 3) {
-        append(BRACK_OPEN);
-        append(quantifierExpressions.get(0));
-        append(COMMA + " ");
-        append(quantifierExpressions.get(1));
-        append(BRACK_CLOSE);
-        append(quantifierExpressions.get(2));
-      }
-    }
-    if (!inBlockDeclaration && conditions == null && actions == null) {
-      return;
-    }
-
-    if (!inBlockDeclaration
-            && ((conditions == null && actions.isEmpty()) || actions == null
-                    && (conditions != null) && conditions.isEmpty())) {
-      return;
-    }
-    append(CURLY_OPEN);
-    // print Conditions
-    if (conditions != null && !conditions.isEmpty()) {
-      traverseAstNodes(conditions);
-    }
-    if (conditions != null && !conditions.isEmpty()) {
-    }
-    // print Actions
-    if (actions != null && !actions.isEmpty()) {
-      if (conditions != null && !conditions.isEmpty()) {
-        append(" " + THEN + " ");
-      } else {
-        append(THEN + " ");
-      }
-      traverseAstNodes(actions);
-    }
-    append(CURLY_CLOSE);
-    if(ruleEl.getInlinedRules()!= null && !ruleEl.getInlinedRules().isEmpty()) {
-      String inlineMode = ruleEl.getInlineMode();
-      append(inlineMode);
-      append(CURLY_OPEN);
-      indentLevel++;
-      List<RutaRule> inlinedRules = ruleEl.getInlinedRules();
-      for (RutaRule rutaRule : inlinedRules) {
-        visit(rutaRule);
-      }
-      indentLevel--;
-      appendIntoNewLine(CURLY_CLOSE);
-    }
-  }
-
-  /**
-   * @param astnodes
-   */
-  @SuppressWarnings("unchecked")
-  private void traverseAstNodes(List<? extends ASTNode> astnodes) {
-    traverseAstNodes(astnodes, COMMA);
-  }
-
-  /**
-   * @param astnodes
-   */
-  @SuppressWarnings("unchecked")
-  private void traverseAstNodes(List<? extends ASTNode> astnodes, String separator) {
-    if (astnodes == null) {
-      return;
-    }
-    Iterator iterator2 = astnodes.iterator();
-    while (iterator2.hasNext()) {
-      ASTNode node = (ASTNode) iterator2.next();
-      try {
-        node.traverse(this);
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-      if (iterator2.hasNext()) {
-        appendSeparator(separator);
-      }
-    }
-  }
-
-  private void appendSeparator(String separator) {
-    output.append(separator);
-    append(" ");
-  }
-
-  @Override
-  public boolean visit(MethodDeclaration s) throws Exception {
-    appendComments(s);
-    fillNewLines(s);
-
-    // Statement last = lastStatements.get(indentLevel);
-    // // if (last == null && indentLevel > 0) {
-    // // last = lastStatements.get(indentLevel - 1);
-    // // }
-    // if (last != null && retainLB) {
-    // int start = last.sourceEnd() + 1;
-    // int end = s.sourceStart();
-    // if (start < end) {
-    // String string = document.get(start, end);
-    // String replaceAll = string.replaceAll(lineDelimiter, "");
-    // double d = (string.length() - replaceAll.length()) / lineDelimiter.length()
-    // - commentLineSince;
-    // for (int i = 1; i < d; i++) {
-    // appendNewLine();
-    // }
-    // commentLineSince = 0;
-    // }
-    // }
-
-    if (s instanceof RutaBlock) {
-      RutaBlock b = (RutaBlock) s;
-      appendIntoNewLine("BLOCK(");
-      append(b.getName());
-      append(") ");
-      this.inBlockDeclaration = true;
-      if (b.getRule() != null) {
-        b.getRule().traverse(this);
-      }
-      this.inBlockDeclaration = false;
-      append(" {");
-      indentLevel++;
-      b.getBody().traverse(this);
-      lastStatements.put(indentLevel, null);
-      indentLevel--;
-      lastStatements.put(indentLevel, s);
-      appendIntoNewLine("}");
-      appendNewLine();
-      return false;
-    }
-    return super.visit(s);
-  }
-
-  @Override
-  public boolean visit(ModuleDeclaration s) throws Exception {
-    return true;
-  }
-
-  @Override
-  public boolean visit(TypeDeclaration s) throws Exception {
-    return super.visit(s);
-  }
-
-  @Override
-  public boolean visitGeneral(ASTNode node) throws Exception {
-    return super.visitGeneral(node);
-  }
-
-  private void append(int begin, int end) {
-    append(document.get(begin, end));
-  }
-
-  private void append(String string) {
-    if (outputPosInLine() + string.length() > maxLineLength) {
-      appendNewLine();
-      indentGenerator.generateIndent(1, output);
-    }
-    output.append(string);
-  }
-
-  private void appendIntoNewLine(String string) {
-    appendNewLine();
-    output.append(string);
-  }
-
-  private void append(ASTNode s) {
-    appendComments(s);
-    // this.output.
-    append(document.get(s.sourceStart(), s.sourceEnd()));
-  }
-
-  private void appendIntoNewLine(ASTNode s) {
-    appendComments(s);
-    appendNewLine();
-    append(s);
-  }
-
-  private void appendNewLine() {
-    output.append(lineDelimiter);
-    indentGenerator.generateIndent(indentLevel, output);
-  }
-
-  private void appendNewLineAndIndent() {
-    output.append(lineDelimiter);
-    indentGenerator.generateIndent(indentLevel + 1, output);
-  }
-
-  private void appendStatementEnd() {
-    output.append(SEMI);
-  }
-
-  /**
-   * @param s
-   * @return
-   */
-  private int appendComments(ASTNode s) {
-    return appendComments(s.sourceStart());
-  }
-
-  /**
-   * @param start
-   * @return
-   */
-  private int appendComments(int start) {
-    while (currentComment != null && currentComment.getStartIndex() < start) {
-      String text = currentComment.getText().trim();
-      fillNewLines(currentComment);
-      append("" + text);
-      currentComment = iterator.hasNext() ? iterator.next() : null;
-      commentLineSince++;
-    }
-    return start;
-  }
-
-  private void appendLeftComments() {
-    while (currentComment != null) {
-      append(currentComment.getText());
-      currentComment = iterator.hasNext() ? iterator.next() : null;
-    }
-  }
-
-  private int outputPosInLine() {
-    String out = output.toString();
-    int lastIndexOf = out.lastIndexOf("\n");
-    return out.length() - lastIndexOf;
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatter.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatter.java
deleted file mode 100644
index 1be93d2..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatter.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * 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.ruta.ide.formatter;
-
-import java.io.IOException;
-import java.io.LineNumberReader;
-import java.io.Reader;
-import java.util.List;
-import java.util.Map;
-
-import org.antlr.runtime.BitSet;
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.CommonTokenStream;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.core.parser.RutaSourceParser;
-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
-import org.eclipse.dltk.ast.parser.IModuleDeclaration;
-import org.eclipse.dltk.compiler.problem.IProblem;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-import org.eclipse.dltk.formatter.AbstractScriptFormatter;
-import org.eclipse.dltk.formatter.FormatterDocument;
-import org.eclipse.dltk.ui.formatter.FormatterException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-
-public class RutaFormatter extends AbstractScriptFormatter {
-
-  class DummyReporter implements IProblemReporter {
-
-    private boolean gotProblems = false;
-
-    public void reportProblem(IProblem problem) {
-      setProblems(true);
-    }
-
-    public void setProblems(boolean gotProblems) {
-      this.gotProblems = gotProblems;
-    }
-
-    public boolean gotProblems() {
-      return gotProblems;
-    }
-  };
-
-  protected static final String[] INDENTING = { RutaFormatterConstants.INDENT_BLOCK,
-      RutaFormatterConstants.INDENT_STRUCTURE };
-
-  // protected static final String[] BLANK_LINES = { };
-
-  private final String lineDelimiter;
-
-  public RutaFormatter(String lineDelimiter, Map preferences) {
-    super(preferences);
-    this.lineDelimiter = lineDelimiter;
-  }
-
-  public TextEdit format(String source, int offset, int length, int indent)
-          throws FormatterException {
-    String input = source;
-    // TODO implement useful format for code snippets
-    // final String input = source.substring(offset, offset + length);
-    if (StringUtils.isEmpty(input)) {
-      return null;
-    }
-    RutaSourceParser tmsp = new RutaSourceParser();
-
-    DummyReporter reporter = new DummyReporter();
-    IModuleDeclaration md = tmsp.parse("format" + RutaEngine.SCRIPT_FILE_EXTENSION, source,
-            reporter);
-    CommonTokenStream tokenStream = tmsp.getTokenStream();
-
-    if (!reporter.gotProblems()) {
-
-      BitSet bs = new BitSet();
-      bs.add(org.apache.uima.ruta.parser.RutaParser.LINE_COMMENT);
-      bs.add(org.apache.uima.ruta.parser.RutaParser.COMMENT);
-      List<CommonToken> comments = (List<CommonToken>) tokenStream.getTokens(0, tokenStream.size(), bs);
-
-      final String output = format(input, (ModuleDeclaration) md, comments, indent);
-      if (output != null) {
-        if (!input.equals(output)) {
-          return new ReplaceEdit(0, source.length(), output);
-          // return new ReplaceEdit(offset, length, output);
-          // if (!equalsIgnoreBlanks(new StringReader(input), new StringReader(output))) {
-          // // return new MultiTextEdit();
-          // return new ReplaceEdit(offset, length, output);
-          // } else {
-          // // TODO reset throwing exception
-          // return new MultiTextEdit();
-          // // throw new IllegalArgumentException("illegal format context");
-          // // System.err.println("illegal format context");
-          // }
-        } else {
-          return new MultiTextEdit();
-        }
-      }
-    }
-    return null;
-  }
-
-  /**
-   * @param input
-   * @param md
-   * @param indent
-   * @return the formatted code
-   */
-  private String format(String input, ModuleDeclaration md, List<CommonToken> comments, int indent) {
-    final FormatterDocument document = createDocument(input);
-
-    // compute new (formatted) document structure
-    RutaFormattedPrinter tmfp = new RutaFormattedPrinter(document, lineDelimiter,
-            createIndentGenerator(), comments, this);
-    try {
-      md.traverse(tmfp);
-    } catch (Exception e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
-    return tmfp.getOutput();
-
-    // // compute new (formatted) document structure
-    // final RutaFormatterNodeBuilder builder = new RutaFormatterNodeBuilder();
-    // IFormatterContainerNode root = builder.build(md, document);
-    // // new RutaFormatterNodeRewriter(result, document).rewrite(root);
-    // IFormatterContext context = new FormatterContext(indent);
-    // FormatterWriter writer = new FormatterWriter(document, lineDelimiter,
-    // createIndentGenerator());
-    // try {
-    // root.accept(context, writer);
-    // writer.flush(context);
-    // return writer.getOutput();
-    // } catch (Exception e) {
-    // e.printStackTrace();
-    // return null;
-    // }
-  }
-
-  /**
-   * Factory method for FormatterDocuments that represent the content with formatting options.<br>
-   * No formatting operations done in this method and no formatting done with the content of the
-   * formatterDocument in general.
-   * 
-   * @param input
-   * @return
-   */
-  private FormatterDocument createDocument(String input) {
-    FormatterDocument document = new FormatterDocument(input);
-    for (int i = 0; i < INDENTING.length; ++i) {
-      document.setBoolean(INDENTING[i], getBoolean(INDENTING[i]));
-    }
-    document.setInt(RutaFormatterConstants.FORMATTER_TAB_SIZE,
-            getInt(RutaFormatterConstants.FORMATTER_TAB_SIZE));
-    return document;
-  }
-
-  private boolean equalsIgnoreBlanks(Reader inputReader, Reader outputReader) {
-    LineNumberReader input = new LineNumberReader(inputReader);
-    LineNumberReader output = new LineNumberReader(outputReader);
-    for (;;) {
-      final String inputLine = readLine(input);
-      final String outputLine = readLine(output);
-      if (inputLine == null) {
-        if (outputLine == null) {
-          return true;
-        } else {
-          return false;
-        }
-      } else if (outputLine == null) {
-        return false;
-      } else if (!inputLine.equals(outputLine)) {
-        return false;
-      }
-    }
-  }
-
-  private String readLine(LineNumberReader reader) {
-    String line;
-    do {
-      try {
-        line = reader.readLine();
-      } catch (IOException e) {
-        return null; // just doing sth.
-      }
-      if (line == null) {
-        return line;
-      }
-      line = line.trim();
-    } while (line.length() == 0);
-    return line;
-  }
-
-  @Override
-  public int getInt(String key) {
-    return super.getInt(key);
-  }
-
-  @Override
-  protected boolean getBoolean(String key) {
-    return super.getBoolean(key);
-  }
-
-  @Override
-  protected String getString(String key) {
-    return super.getString(key);
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterConstants.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterConstants.java
deleted file mode 100644
index a80a9ea..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterConstants.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.ruta.ide.formatter;
-
-import org.eclipse.dltk.ui.CodeFormatterConstants;
-
-public class RutaFormatterConstants {
-
-  public static final String FORMATTER_TAB_CHAR = CodeFormatterConstants.FORMATTER_TAB_CHAR;
-
-  public static final String FORMATTER_TAB_SIZE = CodeFormatterConstants.FORMATTER_TAB_SIZE;
-
-  public static final String FORMATTER_INDENTATION_SIZE = CodeFormatterConstants.FORMATTER_INDENTATION_SIZE;
-
-  public static final String FORMATTER_PROFILES = "formatter.profiles"; //$NON-NLS-1$
-
-  public static final String FORMATTER_ACTIVE_PROFILE = "formatter.profiles.active"; //$NON-NLS-1$
-
-  public static final String INDENT_BLOCK = "indent.block";
-
-  public static final String INDENT_STRUCTURE = "indent.structure";
-
-  // TODO implement smarter format options, first just indentation...
-  public static final String LINES_BEFORE_LONG_DECLARATIONS = "lines.before.long.declarations";
-
-  public static final String MAX_LINE_LENGTH = "wrapping.max.line.length";
-
-  // public static final String LINES_FILE_AFTER_GLOBAL =
-  // "line.file.global.after";
-  // public static final String LINES_FILE_BEFORE_FIRST_ =
-  // "line.file.block.between";
-  // public static final String LINES_FILE_BETWEEN_BLOCK =
-  // "line.file.block.between";
-  // public static final String LINES_FILE_BETWEEN_BLOCK =
-  // "line.file.block.between";
-  // public static final String LINES_FILE_BETWEEN_BLOCK =
-  // "line.file.block.between";
-  // public static final String LINES_FILE_BETWEEN_BLOCK =
-  // "line.file.block.between";
-  // public static final String LINES_FILE_BETWEEN_BLOCK =
-  // "line.file.block.between";
-
-  public static final String LINES_PRESERVE = "lines.preserve";
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterFactory.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterFactory.java
deleted file mode 100644
index 8eebe07..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterFactory.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.ruta.ide.formatter;
-
-import java.net.URL;
-import java.util.Map;
-
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;
-import org.apache.uima.ruta.ide.formatter.preferences.RutaFormatterModifyDialog;
-import org.eclipse.dltk.formatter.AbstractScriptFormatterFactory;
-import org.eclipse.dltk.ui.formatter.IFormatterModifyDialog;
-import org.eclipse.dltk.ui.formatter.IFormatterModifyDialogOwner;
-import org.eclipse.dltk.ui.formatter.IScriptFormatter;
-import org.eclipse.dltk.ui.preferences.PreferenceKey;
-
-public class RutaFormatterFactory extends AbstractScriptFormatterFactory {
-
-  private static final String[] KEYS = {
-      // RutaUI.PLUGIN_ID :
-      RutaFormatterConstants.FORMATTER_TAB_CHAR, RutaFormatterConstants.FORMATTER_INDENTATION_SIZE,
-      RutaFormatterConstants.FORMATTER_TAB_SIZE,
-      // RutaFormatterPlugin.PLUGIN_ID :
-      RutaFormatterConstants.INDENT_BLOCK, RutaFormatterConstants.INDENT_STRUCTURE,
-      RutaFormatterConstants.LINES_BEFORE_LONG_DECLARATIONS, RutaFormatterConstants.MAX_LINE_LENGTH };
-
-  public PreferenceKey[] getPreferenceKeys() {
-    final PreferenceKey[] result = new PreferenceKey[KEYS.length];
-    for (int i = 0; i < KEYS.length; ++i) {
-      final String key = KEYS[i];
-      final String qualifier;
-      if (RutaFormatterConstants.FORMATTER_TAB_CHAR.equals(key)
-              || RutaFormatterConstants.FORMATTER_INDENTATION_SIZE.equals(key)
-              || RutaFormatterConstants.FORMATTER_TAB_SIZE.equals(key)) {
-        qualifier = RutaIdeUIPlugin.PLUGIN_ID;
-      } else {
-        qualifier = RutaIdeUIPlugin.PLUGIN_ID;
-      }
-      result[i] = new PreferenceKey(qualifier, key);
-    }
-    return result;
-  }
-
-  @Override
-  public PreferenceKey getProfilesKey() {
-    return new PreferenceKey(RutaIdeUIPlugin.PLUGIN_ID, RutaFormatterConstants.FORMATTER_PROFILES);
-  }
-
-  public PreferenceKey getActiveProfileKey() {
-    return new PreferenceKey(RutaIdeUIPlugin.PLUGIN_ID,
-            RutaFormatterConstants.FORMATTER_ACTIVE_PROFILE);
-  }
-
-  public IScriptFormatter createFormatter(String lineDelimiter, Map preferences) {
-    return new RutaFormatter(lineDelimiter, preferences);
-  }
-
-  @Override
-  public URL getPreviewContent() {
-    return getClass().getResource("formatPreviewScript" + RutaEngine.SCRIPT_FILE_EXTENSION); //$NON-NLS-1$
-  }
-
-  public IFormatterModifyDialog createDialog(IFormatterModifyDialogOwner dialogOwner) {
-    return new RutaFormatterModifyDialog(dialogOwner, this);
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterPreferenceInitializer.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterPreferenceInitializer.java
deleted file mode 100644
index 73976f8..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/RutaFormatterPreferenceInitializer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.ide.formatter;
-
-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-public class RutaFormatterPreferenceInitializer extends AbstractPreferenceInitializer {
-
-  public void initializeDefaultPreferences() {
-    RutaIdeUIPlugin plugin = RutaIdeUIPlugin.getDefault();
-    IPreferenceStore store = plugin.getPreferenceStore();
-
-    store.setDefault(RutaFormatterConstants.INDENT_BLOCK, true);
-    store.setDefault(RutaFormatterConstants.INDENT_STRUCTURE, true);
-
-    store.setDefault(RutaFormatterConstants.LINES_BEFORE_LONG_DECLARATIONS, 1);
-
-    store.setDefault(RutaFormatterConstants.LINES_PRESERVE, 1);
-
-    store.setDefault(RutaFormatterConstants.MAX_LINE_LENGTH, 100);
-  }
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/Messages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/Messages.java
deleted file mode 100644
index b13b82c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/Messages.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.ruta.ide.formatter.preferences;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.formatter.preferences.messages"; //$NON-NLS-1$
-
-  // public static String RutaFormatterBlankLinesPage_afterGlobalStatements;
-  // public static String RutaFormatterBlankLinesPage_befireFirstDeclaration;
-  // public static String RutaFormatterBlankLinesPage_beforeBlockDeclarations;
-  // public static String RutaFormatterBlankLinesPage_betweenBlocks;
-  public static String RutaFormatterBlankLinesPage_blankLinesBeforeDeclarations;
-
-  public static String RutaFormatterBlankLinesPage_beforeDeclarations;
-
-  // public static String RutaFormatterBlankLinesPage_existingBlankLines;
-  // public static String RutaFormatterBlankLinesPage_numberOfEmptyLinesToPreserve;
-  // public static String RutaFormatterCommentsPage_commentFormatting;
-  // public static String RutaFormatterCommentsPage_enableCommentWrapping;
-  // public static String RutaFormatterCommentsPage_maximumLineWidthForComments;
-  public static String RutaFormatterLineWrappingPage_maximumLineLenght;
-
-  public static String RutaFormatterLineWrappingPage_generalWrapping;
-
-  public static String RutaFormatterIndentationTabPage_statementsWithinBlockBody;
-
-  public static String RutaFormatterIndentationTabPage_assignmentsWithinCreateAction;
-
-  public static String RutaFormatterIndentationTabPage_generalSettings;
-
-  public static String RutaFormatterIndentationTabPage_indentationCharacter;
-
-  public static String RutaFormatterIndentationTabPage_indentationSize;
-
-  public static String RutaFormatterIndentationTabPage_indentWithinBlocks;
-
-  public static String RutaFormatterIndentationTabPage_indentWithinCreateActions;
-
-  public static String RutaFormatterIndentationTabPage_tabSize;
-
-  public static String RutaFormatterModifyDialog_blankLines;
-
-  // public static String RutaFormatterModifyDialog_comments;
-  public static String RutaFormatterModifyDialog_indentation;
-
-  public static String RutaFormatterModifyDialog_lineWrapping;
-
-  public static String RutaFormatterModifyDialog_RutaFormatter;
-  static {
-    // initialize resource bundle
-    NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-  }
-
-  private Messages() {
-  }
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterBlankLinesPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterBlankLinesPage.java
deleted file mode 100644
index 6e13118..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterBlankLinesPage.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.ruta.ide.formatter.preferences;
-
-import java.net.URL;
-
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.formatter.RutaFormatterConstants;
-import org.eclipse.dltk.ui.formatter.FormatterModifyTabPage;
-import org.eclipse.dltk.ui.formatter.IFormatterControlManager;
-import org.eclipse.dltk.ui.formatter.IFormatterModifyDialog;
-import org.eclipse.dltk.ui.util.SWTFactory;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-public class RutaFormatterBlankLinesPage extends FormatterModifyTabPage {
-
-  /**
-   * @param dialog
-   */
-  public RutaFormatterBlankLinesPage(IFormatterModifyDialog dialog) {
-    super(dialog);
-  }
-
-  @Override
-  protected void createOptions(IFormatterControlManager manager, Composite parent) {
-    Group emptyLinesGroup = SWTFactory.createGroup(parent,
-            Messages.RutaFormatterBlankLinesPage_blankLinesBeforeDeclarations, 2, 1,
-            GridData.FILL_HORIZONTAL);
-    manager.createNumber(emptyLinesGroup, RutaFormatterConstants.LINES_BEFORE_LONG_DECLARATIONS,
-            Messages.RutaFormatterBlankLinesPage_beforeDeclarations);
-    // manager.createNumber(emptyLinesGroup,
-    // RutaFormatterConstants.LINES_FILE_BETWEEN_BLOCK,
-    // Messages.RutaFormatterBlankLinesPage_betweenBlocks);
-    // manager.createNumber(emptyLinesGroup,
-    // RutaFormatterConstants.LINES_FILE_BETWEEN_CLASS,
-    // Messages.RutaFormatterBlankLinesPage_betweenClasses);
-    // manager.createNumber(emptyLinesGroup,
-    // RutaFormatterConstants.LINES_FILE_BETWEEN_METHOD,
-    // Messages.RutaFormatterBlankLinesPage_betweenMethods);
-    // //
-    // Group emptyLinesInternalGroup = SWTFactory.createGroup(parent,
-    // Messages.RutaFormatterBlankLinesPage_blankLinesWithingClassModuleDeclarations, 2, 1,
-    // GridData.FILL_HORIZONTAL);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_FIRST,
-    // Messages.RutaFormatterBlankLinesPage_befireFirstDeclaration);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_MODULE,
-    // Messages.RutaFormatterBlankLinesPage_beforeNestedModuleDeclarations);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_CLASS,
-    // Messages.RutaFormatterBlankLinesPage_beforeNestedClassDeclarations);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_METHOD,
-    // Messages.RutaFormatterBlankLinesPage_beforeMethodDeclarations);
-    // //
-    // Group preserveGroup = SWTFactory.createGroup(parent,
-    // Messages.RutaFormatterBlankLinesPage_existingBlankLines, 2, 1,
-    // GridData.FILL_HORIZONTAL);
-    // manager.createNumber(preserveGroup,
-    // RutaFormatterConstants.LINES_PRESERVE,
-    // Messages.RutaFormatterBlankLinesPage_numberOfEmptyLinesToPreserve);
-  }
-
-  @Override
-  protected URL getPreviewContent() {
-    return getClass().getResource("blank-lines-preview" + RutaEngine.SCRIPT_FILE_EXTENSION); //$NON-NLS-1$
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterIndentationTabPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterIndentationTabPage.java
deleted file mode 100644
index 72f358b..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterIndentationTabPage.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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.ruta.ide.formatter.preferences;
-
-import java.net.URL;
-
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.formatter.RutaFormatterConstants;
-import org.eclipse.dltk.ui.CodeFormatterConstants;
-import org.eclipse.dltk.ui.formatter.FormatterModifyTabPage;
-import org.eclipse.dltk.ui.formatter.IFormatterControlManager;
-import org.eclipse.dltk.ui.formatter.IFormatterModifyDialog;
-import org.eclipse.dltk.ui.preferences.FormatterMessages;
-import org.eclipse.dltk.ui.util.SWTFactory;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Text;
-
-public class RutaFormatterIndentationTabPage extends FormatterModifyTabPage {
-
-  /**
-   * @param dialog
-   */
-  public RutaFormatterIndentationTabPage(IFormatterModifyDialog dialog) {
-    super(dialog);
-  }
-
-  private Combo tabPolicy;
-
-  private Text indentSize;
-
-  private Text tabSize;
-
-  private final String[] tabPolicyItems = new String[] { CodeFormatterConstants.SPACE,
-      CodeFormatterConstants.TAB, CodeFormatterConstants.MIXED };
-
-  private class TabPolicyListener extends SelectionAdapter implements
-          IFormatterControlManager.IInitializeListener {
-
-    private final IFormatterControlManager manager;
-
-    public TabPolicyListener(IFormatterControlManager manager) {
-      this.manager = manager;
-    }
-
-    @Override
-    public void widgetSelected(SelectionEvent e) {
-      int index = tabPolicy.getSelectionIndex();
-      if (index >= 0) {
-        final boolean tabMode = CodeFormatterConstants.TAB.equals(tabPolicyItems[index]);
-        manager.enableControl(indentSize, !tabMode);
-      }
-    }
-
-    public void initialize() {
-      final boolean tabMode = CodeFormatterConstants.TAB.equals(manager
-              .getString(RutaFormatterConstants.FORMATTER_TAB_CHAR));
-      manager.enableControl(indentSize, !tabMode);
-    }
-
-  }
-
-  private TabPolicyListener tabPolicyListener;
-
-  @Override
-  protected void createOptions(final IFormatterControlManager manager, Composite parent) {
-    Group tabPolicyGroup = SWTFactory.createGroup(parent,
-            Messages.RutaFormatterIndentationTabPage_generalSettings, 2, 1,
-            GridData.FILL_HORIZONTAL);
-    tabPolicy = manager.createCombo(tabPolicyGroup, RutaFormatterConstants.FORMATTER_TAB_CHAR,
-            FormatterMessages.IndentationTabPage_general_group_option_tab_policy, tabPolicyItems);
-    tabPolicyListener = new TabPolicyListener(manager);
-    tabPolicy.addSelectionListener(tabPolicyListener);
-    manager.addInitializeListener(tabPolicyListener);
-    indentSize = manager.createNumber(tabPolicyGroup,
-            RutaFormatterConstants.FORMATTER_INDENTATION_SIZE,
-            FormatterMessages.IndentationTabPage_general_group_option_indent_size);
-    tabSize = manager.createNumber(tabPolicyGroup, RutaFormatterConstants.FORMATTER_TAB_SIZE,
-            FormatterMessages.IndentationTabPage_general_group_option_tab_size);
-    tabSize.addModifyListener(new ModifyListener() {
-      public void modifyText(ModifyEvent e) {
-        int index = tabPolicy.getSelectionIndex();
-        if (index >= 0) {
-          final boolean tabMode = CodeFormatterConstants.TAB.equals(tabPolicyItems[index]);
-          if (tabMode) {
-            indentSize.setText(tabSize.getText());
-          }
-        }
-      }
-    });
-    //
-    Group indentGroup = SWTFactory.createGroup(parent,
-            Messages.RutaFormatterIndentationTabPage_indentWithinBlocks, 1, 1,
-            GridData.FILL_HORIZONTAL);
-    manager.createCheckbox(indentGroup, RutaFormatterConstants.INDENT_BLOCK,
-            Messages.RutaFormatterIndentationTabPage_statementsWithinBlockBody);
-    Group indentBlocks = SWTFactory.createGroup(parent,
-            Messages.RutaFormatterIndentationTabPage_indentWithinCreateActions, 1, 1,
-            GridData.FILL_HORIZONTAL);
-    manager.createCheckbox(indentBlocks, RutaFormatterConstants.INDENT_STRUCTURE,
-            Messages.RutaFormatterIndentationTabPage_assignmentsWithinCreateAction);
-  }
-
-  @Override
-  protected URL getPreviewContent() {
-    return getClass().getResource("indentation-preview" + RutaEngine.SCRIPT_FILE_EXTENSION);
-  }
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterLineWrappingPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterLineWrappingPage.java
deleted file mode 100644
index 146e5b1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterLineWrappingPage.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.ruta.ide.formatter.preferences;
-
-import java.net.URL;
-
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.formatter.RutaFormatterConstants;
-import org.eclipse.dltk.ui.formatter.FormatterModifyTabPage;
-import org.eclipse.dltk.ui.formatter.IFormatterControlManager;
-import org.eclipse.dltk.ui.formatter.IFormatterModifyDialog;
-import org.eclipse.dltk.ui.util.SWTFactory;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-public class RutaFormatterLineWrappingPage extends FormatterModifyTabPage {
-
-  /**
-   * @param dialog
-   */
-  public RutaFormatterLineWrappingPage(IFormatterModifyDialog dialog) {
-    super(dialog);
-  }
-
-  @Override
-  protected void createOptions(IFormatterControlManager manager, Composite parent) {
-    Group emptyLinesGroup = SWTFactory.createGroup(parent,
-            Messages.RutaFormatterLineWrappingPage_generalWrapping, 2, 1, GridData.FILL_HORIZONTAL);
-    manager.createNumber(emptyLinesGroup, RutaFormatterConstants.MAX_LINE_LENGTH,
-            Messages.RutaFormatterLineWrappingPage_maximumLineLenght);
-    // manager.createNumber(emptyLinesGroup,
-    // RutaFormatterConstants.LINES_FILE_BETWEEN_BLOCK,
-    // Messages.RutaFormatterBlankLinesPage_betweenBlocks);
-    // manager.createNumber(emptyLinesGroup,
-    // RutaFormatterConstants.LINES_FILE_BETWEEN_CLASS,
-    // Messages.RutaFormatterBlankLinesPage_betweenClasses);
-    // manager.createNumber(emptyLinesGroup,
-    // RutaFormatterConstants.LINES_FILE_BETWEEN_METHOD,
-    // Messages.RutaFormatterBlankLinesPage_betweenMethods);
-    // //
-    // Group emptyLinesInternalGroup = SWTFactory.createGroup(parent,
-    // Messages.RutaFormatterBlankLinesPage_blankLinesWithingClassModuleDeclarations, 2, 1,
-    // GridData.FILL_HORIZONTAL);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_FIRST,
-    // Messages.RutaFormatterBlankLinesPage_befireFirstDeclaration);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_MODULE,
-    // Messages.RutaFormatterBlankLinesPage_beforeNestedModuleDeclarations);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_CLASS,
-    // Messages.RutaFormatterBlankLinesPage_beforeNestedClassDeclarations);
-    // manager.createNumber(emptyLinesInternalGroup,
-    // RutaFormatterConstants.LINES_BEFORE_METHOD,
-    // Messages.RutaFormatterBlankLinesPage_beforeMethodDeclarations);
-    // //
-    // Group preserveGroup = SWTFactory.createGroup(parent,
-    // Messages.RutaFormatterBlankLinesPage_existingBlankLines, 2, 1,
-    // GridData.FILL_HORIZONTAL);
-    // manager.createNumber(preserveGroup,
-    // RutaFormatterConstants.LINES_PRESERVE,
-    // Messages.RutaFormatterBlankLinesPage_numberOfEmptyLinesToPreserve);
-  }
-
-  @Override
-  protected URL getPreviewContent() {
-    return getClass().getResource("wrapping-preview" + RutaEngine.SCRIPT_FILE_EXTENSION); //$NON-NLS-1$
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterModifyDialog.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterModifyDialog.java
deleted file mode 100644
index 5a57f52..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/formatter/preferences/RutaFormatterModifyDialog.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.ruta.ide.formatter.preferences;
-
-import org.eclipse.dltk.ui.formatter.FormatterModifyDialog;
-import org.eclipse.dltk.ui.formatter.IFormatterModifyDialogOwner;
-import org.eclipse.dltk.ui.formatter.IScriptFormatterFactory;
-
-public class RutaFormatterModifyDialog extends FormatterModifyDialog {
-
-  public RutaFormatterModifyDialog(IFormatterModifyDialogOwner dialogOwner,
-          IScriptFormatterFactory formatterFactory) {
-    super(dialogOwner, formatterFactory);
-    setTitle(Messages.RutaFormatterModifyDialog_RutaFormatter);
-  }
-
-  @Override
-  protected void addPages() {
-    addTabPage(Messages.RutaFormatterModifyDialog_indentation, new RutaFormatterIndentationTabPage(
-            this));
-    addTabPage(Messages.RutaFormatterModifyDialog_blankLines, new RutaFormatterBlankLinesPage(this));
-    addTabPage(Messages.RutaFormatterModifyDialog_lineWrapping, new RutaFormatterLineWrappingPage(
-            this));
-    // addTabPage(Messages.RutaFormatterModifyDialog_comments,
-    // new RutaFormatterCommentsPage(this));
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/GenericRutaInstall.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/GenericRutaInstall.java
deleted file mode 100644
index e7afe54..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/GenericRutaInstall.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import java.io.BufferedReader;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.InputStreamReader;

-

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.debug.core.ILaunchManager;

-import org.eclipse.dltk.launching.AbstractInterpreterInstall;

-import org.eclipse.dltk.launching.IInterpreterInstallType;

-import org.eclipse.dltk.launching.IInterpreterRunner;

-

-public class GenericRutaInstall extends AbstractInterpreterInstall {

-

-  public GenericRutaInstall(IInterpreterInstallType type, String id) {

-    super(type, id);

-  }

-

-  @Override

-  public String getBuiltinModuleContent(String name) {

-    InputStream stream = GenericRutaInstall.class.getResourceAsStream("builtins"

-            + RutaEngine.SCRIPT_FILE_EXTENSION);

-    if (stream == null) {

-      return "PACKAGE org.apache.uima.ruta;\n";

-    }

-    BufferedReader br = new BufferedReader(new InputStreamReader(stream));

-    StringBuffer buf = new StringBuffer();

-    try {

-      String line = null;

-      while ((line = br.readLine()) != null) {

-        buf.append(line);

-        buf.append('\n');

-      }

-    } catch (IOException e) {

-      RutaIdeUIPlugin.error(e);

-    }

-    return buf.toString();

-  }

-

-  @Override

-  public String[] getBuiltinModules() {

-    return new String[] { "builtins" + RutaEngine.SCRIPT_FILE_EXTENSION };

-  }

-

-  @Override

-  public IInterpreterRunner getInterpreterRunner(String mode) {

-    IInterpreterRunner runner = super.getInterpreterRunner(mode);

-    if (runner != null) {

-      return runner;

-    }

-

-    if (mode.equals(ILaunchManager.RUN_MODE)) {

-      return new RutaInterpreterRunner(this);

-    }

-    return null;

-  }

-

-  public String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/GenericRutaInstallType.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/GenericRutaInstallType.java
deleted file mode 100644
index da8fd5c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/GenericRutaInstallType.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.core.runtime.ILog;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.dltk.core.environment.IDeployment;

-import org.eclipse.dltk.core.environment.IFileHandle;

-import org.eclipse.dltk.internal.launching.AbstractInterpreterInstallType;

-import org.eclipse.dltk.launching.EnvironmentVariable;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.LibraryLocation;

-

-public class GenericRutaInstallType extends AbstractInterpreterInstallType {

-

-  public static final String DBGP_FOR_RUTA_BUNDLE_ID = "org.apache.uima.ruta.ide.interpreter.dbgp";

-

-  public static final String EMBEDDED_RUTA_BUNDLE_ID = "org.apache.uima.ruta.ide.interpreter";

-

-  public String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-

-  public String getName() {

-    return "Generic Ruta Install";

-  }

-

-  @Override

-  public LibraryLocation[] getDefaultLibraryLocations(IFileHandle installLocation,

-          EnvironmentVariable[] variables, IProgressMonitor monitor) {

-    return new LibraryLocation[0];

-  }

-

-  private static String[] possibleExes = { "ruta" };

-

-  @Override

-  protected String getPluginId() {

-    return RutaIdeUIPlugin.PLUGIN_ID;

-  }

-

-  @Override

-  protected String[] getPossibleInterpreterNames() {

-    return possibleExes;

-  }

-

-  @Override

-  protected IInterpreterInstall doCreateInterpreterInstall(String id) {

-    return new GenericRutaInstall(this, id);

-  }

-

-  @Override

-  protected void filterEnvironment(Map environment) {

-    environment.remove("TMLIBPATH");

-    environment.remove("DISPLAY");

-  }

-

-  @Override

-  public IStatus validateInstallLocation(IFileHandle installLocation) {

-    return Status.OK_STATUS;

-  }

-

-  @Override

-  protected IPath createPathFile(IDeployment deployment) throws IOException {

-    throw new RuntimeException("This method should not be used");

-  }

-

-  @Override

-  protected String[] parsePaths(String result) {

-    ArrayList<String> paths = new ArrayList<String>();

-    String subs = null;

-    int index = 0;

-    while (index < result.length()) {

-      while (index < result.length() && Character.isWhitespace(result.charAt(index)))

-        index++;

-      if (index == result.length())

-        break;

-

-      if (result.charAt(index) == '{') {

-        int start = index;

-        while (index < result.length() && result.charAt(index) != '}')

-          index++;

-        if (index == result.length())

-          break;

-        subs = result.substring(start + 1, index);

-      } else {

-        int start = index;

-        while (index < result.length() && result.charAt(index) != ' ')

-          index++;

-        subs = result.substring(start, index);

-      }

-

-      paths.add(subs);

-      index++;

-    }

-

-    return (String[]) paths.toArray(new String[paths.size()]);

-  }

-

-  @Override

-  protected ILog getLog() {

-    return RutaIdeUIPlugin.getDefault().getLog();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/IConfigurableRunner.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/IConfigurableRunner.java
deleted file mode 100644
index 422f891..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/IConfigurableRunner.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-public interface IConfigurableRunner {

-

-  public void setRunnerConfig(IRutaInterpreterRunnerConfig config);

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/IRutaInterpreterRunnerConfig.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/IRutaInterpreterRunnerConfig.java
deleted file mode 100644
index ba42103..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/IRutaInterpreterRunnerConfig.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.dltk.launching.InterpreterConfig;

-import org.eclipse.jdt.core.IJavaProject;

-import org.eclipse.jdt.launching.VMRunnerConfiguration;

-

-public interface IRutaInterpreterRunnerConfig {

-

-  public String getRunnerClassName(InterpreterConfig config, ILaunch launch, IJavaProject project);

-

-  public String[] computeClassPath(InterpreterConfig config, ILaunch launch, IJavaProject project)

-          throws Exception;

-

-  public String[] getProgramArguments(InterpreterConfig config, ILaunch launch, IJavaProject project);

-

-  public void adjustRunnerConfiguration(VMRunnerConfiguration vconfig, InterpreterConfig iconfig,

-          ILaunch launch, IJavaProject project);

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/JavaLocalApplicationLaunchConfigurationDelegate.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/JavaLocalApplicationLaunchConfigurationDelegate.java
deleted file mode 100644
index 80e3d06..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/JavaLocalApplicationLaunchConfigurationDelegate.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;

-import org.eclipse.debug.core.model.ISourceLocator;

-import org.eclipse.debug.core.model.IStackFrame;

-import org.eclipse.dltk.debug.core.DLTKDebugPlugin;

-import org.eclipse.dltk.debug.core.IDbgpService;

-import org.eclipse.dltk.debug.core.model.IScriptDebugTarget;

-import org.eclipse.dltk.debug.ui.ScriptStreamProxy;

-import org.eclipse.dltk.internal.debug.core.model.ScriptDebugTarget;

-import org.eclipse.jdt.launching.JavaLaunchDelegate;

-import org.eclipse.ui.console.IOConsole;

-

-public class JavaLocalApplicationLaunchConfigurationDelegate extends JavaLaunchDelegate implements

-        ILaunchConfigurationDelegate {

-

-  @Override

-  public String getVMArguments(ILaunchConfiguration configuration) throws CoreException {

-    return super.getVMArguments(configuration);

-  }

-

-  @Override

-  public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch,

-          IProgressMonitor monitor) throws CoreException {

-    // System.out.println("launching");

-    IDbgpService dbgpService = null;

-    try {

-      dbgpService = DLTKDebugPlugin.getDefault().getDbgpService();

-

-      IScriptDebugTarget target = new ScriptDebugTarget("org.apache.uima.ruta.ide.debug.rutaModel",

-              dbgpService, "hello", launch, null);

-      IOConsole cs = new IOConsole("aa", null);

-      ScriptStreamProxy proxy = new ScriptStreamProxy(cs);

-      target.setStreamProxy(proxy);

-      launch.addDebugTarget(target);

-      final ISourceLocator sourceLocator = launch.getSourceLocator();

-      final RutaSourceLookupDirector l = new RutaSourceLookupDirector();

-      launch.setSourceLocator(new ISourceLocator() {

-

-        public Object getSourceElement(IStackFrame stackFrame) {

-          Object sourceElement = sourceLocator.getSourceElement(stackFrame);

-          if (sourceElement != null)

-            return sourceElement;

-          return l.getSourceElement(stackFrame);

-        }

-

-      });

-    } catch (Exception e) {

-

-    }

-

-    super.launch(configuration, mode, launch, monitor);

-  }

-

-  public static final String LOCAL_APPLICATION = "debug.localJavaApplication";

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/JavaLocalApplicationTabGroup.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/JavaLocalApplicationTabGroup.java
deleted file mode 100644
index 5487458..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/JavaLocalApplicationTabGroup.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import org.eclipse.debug.ui.ILaunchConfigurationDialog;

-

-public class JavaLocalApplicationTabGroup extends

-        org.eclipse.jdt.internal.debug.ui.launcher.LocalJavaApplicationTabGroup {

-

-  @Override

-  public void createTabs(ILaunchConfigurationDialog dialog, String mode) {

-    super.createTabs(dialog, mode);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaDebuggingEngineSelector.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaDebuggingEngineSelector.java
deleted file mode 100644
index c9ac538..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaDebuggingEngineSelector.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.dltk.core.DLTKIdContributionSelector;

-import org.eclipse.dltk.core.PreferencesLookupDelegate;

-

-public class RutaDebuggingEngineSelector extends DLTKIdContributionSelector {

-  @Override

-  protected String getSavedContributionId(PreferencesLookupDelegate delegate) {

-    return delegate.getString(RutaIdeUIPlugin.PLUGIN_ID, RutaDebugConstants.DEBUGGING_ENGINE_ID_KEY);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaInterpreterRunner.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaInterpreterRunner.java
deleted file mode 100644
index 20c7d96..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaInterpreterRunner.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.List;

-import java.util.logging.Handler;

-import java.util.logging.LogRecord;

-import java.util.logging.Logger;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.impl.XmiCasSerializer;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.ResourceSpecifier;

-import org.apache.uima.ruta.action.LogAction;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.util.XMLInputSource;

-import org.apache.uima.util.XMLSerializer;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.SubProgressMonitor;

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.launching.AbstractInterpreterRunner;

-import org.eclipse.dltk.launching.AbstractScriptLaunchConfigurationDelegate;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.InterpreterConfig;

-import org.eclipse.dltk.launching.ScriptLaunchConfigurationConstants;

-import org.eclipse.jdt.core.IJavaProject;

-import org.eclipse.jdt.launching.JavaRuntime;

-import org.eclipse.jdt.launching.VMRunnerConfiguration;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.ui.console.ConsolePlugin;

-import org.eclipse.ui.console.IConsole;

-import org.eclipse.ui.console.IConsoleManager;

-import org.eclipse.ui.console.MessageConsole;

-import org.eclipse.ui.console.MessageConsoleStream;

-import org.xml.sax.SAXException;

-

-public class RutaInterpreterRunner extends AbstractInterpreterRunner implements IConfigurableRunner {

-

-  public static final IRutaInterpreterRunnerConfig DEFAULT_CONFIG = new IRutaInterpreterRunnerConfig() {

-

-    public void adjustRunnerConfiguration(VMRunnerConfiguration vconfig, InterpreterConfig iconfig,

-            ILaunch launch, IJavaProject project) {

-      System.out.println("adjust runner");

-    }

-

-    public String[] computeClassPath(InterpreterConfig config, ILaunch launch, IJavaProject project)

-            throws Exception {

-      return RutaInterpreterRunner.getClassPath(project);

-    }

-

-    public String[] getProgramArguments(InterpreterConfig config, ILaunch launch,

-            IJavaProject project) {

-      return new String[0];

-    }

-

-    public String getRunnerClassName(InterpreterConfig config, ILaunch launch, IJavaProject project) {

-      return "RutaRunner";

-    }

-

-  };

-

-  private IRutaInterpreterRunnerConfig config = DEFAULT_CONFIG;

-

-  @Override

-  public void run(InterpreterConfig config, ILaunch launch, IProgressMonitor monitor)

-          throws CoreException {

-    doRunImpl(config, launch, this.config, monitor);

-  }

-

-  private static Handler initConsoleLink(String module) {

-    final MessageConsole console;

-    final MessageConsoleStream out;

-    console = findConsole(module);

-    out = console.newMessageStream();

-

-    Handler handler = new Handler() {

-

-      @Override

-      public void publish(LogRecord record) {

-        String message = record.getMessage();

-        if (message.equals("\\n")) {

-          out.println();

-        }

-        String[] split = message.split("\\\\n");

-        for (String string : split) {

-          out.println(string);

-        }

-        console.activate();

-      }

-

-      @Override

-      public void flush() {

-

-      }

-

-      @Override

-      public void close() throws SecurityException {

-

-      }

-    };

-    Logger.getLogger(LogAction.LOGGER_NAME).addHandler(handler);

-    return handler;

-  }

-

-  private static void clearConsoleLink(Handler handler) {

-    Logger.getLogger(LogAction.LOGGER_NAME).removeHandler(handler);

-  }

-

-  private static MessageConsole findConsole(String name) {

-    ConsolePlugin plugin = ConsolePlugin.getDefault();

-    IConsoleManager conMan = plugin.getConsoleManager();

-    IConsole[] existing = conMan.getConsoles();

-    for (int i = 0; i < existing.length; i++)

-      if (name.equals(existing[i].getName()))

-        return (MessageConsole) existing[i];

-    MessageConsole myConsole = new MessageConsole(name, null);

-    conMan.addConsoles(new IConsole[] { myConsole });

-    return myConsole;

-  }

-

-  public static List<File> getFiles(File dir, boolean recusive) {

-    List<File> result = new ArrayList<File>();

-    for (File each : dir.listFiles()) {

-      // TODO: find a solution for this hotfix

-      if (each.getName().endsWith(".svn")) {

-        continue;

-      }

-      result.add(each);

-      if (each.isDirectory() && recusive) {

-        result.addAll(getFiles(each, recusive));

-      }

-    }

-    return result;

-  }

-

-  public static void doRunImpl(InterpreterConfig config, ILaunch launch,

-          IRutaInterpreterRunnerConfig iconfig, IProgressMonitor monitor) throws CoreException {

-    String launchMode = launch.getLaunchMode();

-    IScriptProject proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(launch

-            .getLaunchConfiguration());

-

-    IPath projectPath = proj.getResource().getLocation();

-    IPath inputDirPath = projectPath.append(RutaProjectUtils.getDefaultInputLocation());

-    IPath outputDirPath = projectPath.append(RutaProjectUtils.getDefaultOutputLocation());

-    String engine = RutaProjectUtils.getAnalysisEngineDescriptorPath(config.getScriptFilePath(),

-            proj.getProject()).toPortableString();

-    IPath rootPath = RutaProjectUtils.getDescriptorRootPath(proj.getProject());

-

-    File inputDir = inputDirPath.makeAbsolute().toFile();

-    File outputDir = outputDirPath.makeAbsolute().toFile();

-

-    if (!inputDir.exists()) {

-      inputDir.mkdirs();

-      IFolder folder = proj.getProject().getFolder(RutaProjectUtils.getDefaultInputLocation());

-      folder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

-    }

-    IFolder outputFolder = proj.getProject().getFolder(RutaProjectUtils.getDefaultOutputLocation());

-    if (!outputDir.exists()) {

-      outputDir.mkdirs();

-      outputFolder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

-    }

-

-    IPreferenceStore store = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    boolean clearOutput = store.getBoolean(RutaCorePreferences.PROJECT_CLEAR_OUTPUT);

-    if (clearOutput) {

-      List<File> outputFiles = getFiles(outputDir, false);

-      for (File file : outputFiles) {

-        file.delete();

-      }

-      outputFolder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

-    }

-

-    List<File> inputFiles = getFiles(inputDir, false);

-

-    int ticks = (inputFiles.size() * 2) + 1;

-    SubProgressMonitor mon = new SubProgressMonitor(monitor, ticks);

-

-    mon.setTaskName("Initializing");

-    Handler handler = initConsoleLink(config.getScriptFilePath().lastSegment());

-

-    CAS cas = null;

-

-    AnalysisEngine ae = null;

-    try {

-      File specFile = new File(engine);

-      XMLInputSource in = new XMLInputSource(specFile);

-      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

-      ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

-      resMgr.setDataPath(rootPath.toPortableString());

-      ae = UIMAFramework.produceAnalysisEngine(specifier, resMgr, null);

-    } catch (Exception e) {

-      String message = e.getMessage();

-      DLTKCore.error(message, e);

-      clearConsoleLink(handler);

-      throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID,

-              ScriptLaunchConfigurationConstants.ERR_INTERNAL_ERROR, message, e));

-    }

-

-    try {

-      if ("debug".equals(launchMode)) {

-        ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG, true);

-        ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG_WITH_MATCHES, true);

-        ae.setConfigParameterValue(RutaEngine.PARAM_PROFILE, true);

-        ae.setConfigParameterValue(RutaEngine.PARAM_STATISTICS, true);

-        ae.setConfigParameterValue(RutaEngine.PARAM_CREATED_BY, true);

-        ae.reconfigure();

-      }

-    } catch (Exception e) {

-      clearConsoleLink(handler);

-      String message = e.getMessage();

-      DLTKCore.error(message, e);

-      throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID,

-              ScriptLaunchConfigurationConstants.ERR_INTERNAL_ERROR, message, e));

-    }

-    mon.worked(1);

-    for (File each : inputFiles) {

-

-      mon.setTaskName("Processing " + each.getName());

-      if (mon.isCanceled()) {

-        break;

-      }

-      try {

-        if (cas == null) {

-          cas = ae.newCAS();

-        } else {

-          cas.reset();

-        }

-        if (each.getName().endsWith("xmi")) {

-          XmiCasDeserializer.deserialize(new FileInputStream(each), cas, true);

-        } else {

-          cas.setDocumentText(getText(each));

-        }

-

-        if (mon.isCanceled()) {

-          break;

-        }

-

-        RutaEngine.removeSourceDocumentInformation(cas);

-        RutaEngine.addSourceDocumentInformation(cas, each);

-

-        ae.process(cas);

-

-        mon.worked(1);

-

-        if (mon.isCanceled()) {

-          break;

-        }

-

-        File outputFile = new File(outputDir, each.getName() + ".xmi");

-        mon.setTaskName("Saving " + outputFile.getName());

-        writeXmi(cas, outputFile);

-        mon.worked(1);

-      } catch (Exception e) {

-        if (cas != null) {

-          cas.release();

-        }

-        if (ae != null) {

-          ae.destroy();

-        }

-        clearConsoleLink(handler);

-        String message = e.getMessage();

-        DLTKCore.error(message, e);

-        throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID,

-                ScriptLaunchConfigurationConstants.ERR_INTERNAL_ERROR, message, e));

-      }

-    }

-    if (cas != null) {

-      cas.release();

-    }

-    if (ae != null) {

-      ae.destroy();

-    }

-    IFolder folder = outputFolder;

-    folder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

-    clearConsoleLink(handler);

-    mon.done();

-  }

-

-  private static String getText(File each) {

-    try {

-      return org.apache.uima.pear.util.FileUtil.loadTextFile(each, "UTF-8");

-    } catch (IOException e) {

-      DLTKCore.error(e.getMessage(), e);

-    }

-    return "";

-  }

-

-  private static void writeXmi(CAS aCas, File name) throws IOException, SAXException {

-    FileOutputStream out = null;

-

-    try {

-      // write XMI

-      out = new FileOutputStream(name);

-      XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());

-      XMLSerializer xmlSer = new XMLSerializer(out, false);

-      ser.serialize(aCas, xmlSer.getContentHandler());

-    } finally {

-      if (out != null) {

-        out.close();

-      }

-    }

-  }

-

-  public static String[] getClassPath(IJavaProject myJavaProject) {

-    String[] newClassPath = new String[0];// classPath.length + 2];

-    return newClassPath;

-  }

-

-  protected static String[] computeBaseClassPath(IJavaProject myJavaProject) throws CoreException {

-    if (!myJavaProject.exists())

-      return new String[0];

-    return JavaRuntime.computeDefaultRuntimeClassPath(myJavaProject);

-  }

-

-  protected String constructProgramString(InterpreterConfig config) {

-    return "";

-  }

-

-  public RutaInterpreterRunner(IInterpreterInstall install) {

-    super(install);

-  }

-

-  @Override

-  protected String getProcessType() {

-    return RutaLaunchConfigurationConstants.ID_RUTA_PROCESS_TYPE;

-  }

-

-  public void setRunnerConfig(IRutaInterpreterRunnerConfig config) {

-    this.config = config;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationConstants.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationConstants.java
deleted file mode 100644
index 4f4ba33..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationConstants.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import org.eclipse.dltk.launching.ScriptLaunchConfigurationConstants;

-

-public class RutaLaunchConfigurationConstants extends ScriptLaunchConfigurationConstants {

-  protected RutaLaunchConfigurationConstants() {

-

-  }

-

-  public static final String ID_RUTA_SCRIPT = "org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationType"; //$NON-NLS-1$

-

-  public static final String ID_RUTA_PROCESS_TYPE = "rutaInterpreter"; //$NON-NLS-1$

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationDelegate.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationDelegate.java
deleted file mode 100644
index b3cc7ba..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationDelegate.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import java.io.File;

-import java.io.IOException;

-import java.io.UnsupportedEncodingException;

-import java.net.URL;

-import java.net.URLEncoder;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.Enumeration;

-import java.util.List;

-import java.util.TreeSet;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.eclipse.core.internal.resources.Folder;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.FileLocator;

-import org.eclipse.core.runtime.IExtension;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.launching.AbstractScriptLaunchConfigurationDelegate;

-import org.eclipse.jdt.launching.JavaLaunchDelegate;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.osgi.framework.Bundle;

-

-public class RutaLaunchConfigurationDelegate extends JavaLaunchDelegate {

-

-

-  private String mode;

-

-  @Override

-  public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {

-    StringBuilder cmdline = new StringBuilder();

-    IScriptProject proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(configuration);

-

-    String mainScriptAttribute = configuration.getAttribute("mainScript", "");

-

-    String encoding = proj.getProject().getDefaultCharset();

-    String view = configuration.getAttribute(RutaLaunchConstants.VIEW, CAS.NAME_DEFAULT_SOFA);

-    if (StringUtils.isBlank(view)) {

-      view = CAS.NAME_DEFAULT_SOFA;

-    }

-    boolean recursive = configuration.getAttribute(RutaLaunchConstants.RECURSIVE, false);

-

-    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    boolean addSDI = preferenceStore.getBoolean(RutaCorePreferences.ADD_SDI);

-

-    IResource member = proj.getProject().findMember(mainScriptAttribute);

-    IPath projectPath = proj.getResource().getLocation();

-    IPath inputDirPath = projectPath.append(RutaProjectUtils.getDefaultInputLocation());

-    IPath outputDirPath = projectPath.append(RutaProjectUtils.getDefaultOutputLocation());

-    String engineDefaultMethod = RutaProjectUtils.getAnalysisEngineDescriptorPath(member.getLocation(),

-            proj.getProject()).toPortableString();

-    String input = configuration.getAttribute(RutaLaunchConstants.INPUT_FOLDER,

-            inputDirPath.toPortableString());

-    if (StringUtils.isBlank(input)) {

-      input = inputDirPath.toPortableString();

-    }

-    String output = configuration.getAttribute(RutaLaunchConstants.OUTPUT_FOLDER,

-            outputDirPath.toPortableString());

-    if (StringUtils.isBlank(output)) {

-      output = outputDirPath.toPortableString();

-    }

-    String engine = configuration.getAttribute(RutaLaunchConstants.ARG_DESCRIPTOR,

-            engineDefaultMethod);

-    if (StringUtils.isBlank(engine)) {

-      engine = engineDefaultMethod;

-    }

-

-    try {

-      cmdline.append(RutaLaunchConstants.ARG_DESCRIPTOR + " ");

-      cmdline.append(URLEncoder.encode(engine, RutaLauncher.URL_ENCODING) + " ");

-

-      cmdline.append(RutaLaunchConstants.ARG_INPUT_FOLDER + " ");

-      cmdline.append(URLEncoder.encode(makeAbsolute(input, configuration), RutaLauncher.URL_ENCODING) + " ");

-

-      cmdline.append(RutaLaunchConstants.ARG_OUTPUT_FOLDER + " ");

-      cmdline.append(URLEncoder.encode(makeAbsolute(output, configuration), RutaLauncher.URL_ENCODING) + " ");

-

-    } catch (UnsupportedEncodingException e) {

-      throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID,

-              "Unsupported Encoding"));

-    }

-    cmdline.append(RutaLaunchConstants.ARG_MODE + " ");

-    cmdline.append(mode + " ");

-

-    cmdline.append(RutaLaunchConstants.ARG_ENCODING + " ");

-    cmdline.append(encoding + " ");

-

-    cmdline.append(RutaLaunchConstants.ARG_VIEW + " ");

-    cmdline.append(view + " ");

-

-    cmdline.append(RutaLaunchConstants.ARG_RECURSIVE + " ");

-    cmdline.append(recursive + " ");

-

-    cmdline.append(RutaLaunchConstants.ARG_ADD_SDI + " ");

-    cmdline.append(addSDI + " ");

-

-    return cmdline.toString();

-  }

-

-  private String makeAbsolute(String input, ILaunchConfiguration configuration)

-          throws CoreException {

-    IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(input);

-    if (member != null) {

-      return member.getLocation().toPortableString();

-    }

-    return input;

-  }

-

-  @Override

-  public String getMainTypeName(ILaunchConfiguration configuration) throws CoreException {

-    return "org.apache.uima.ruta.ide.launching.RutaLauncher";

-  }

-

-  @Override

-  public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {

-

-    List<String> extendedClasspath = new ArrayList<String>();

-    Collections.addAll(extendedClasspath, super.getClasspath(configuration));

-    IScriptProject scriptProject = AbstractScriptLaunchConfigurationDelegate

-            .getScriptProject(configuration);

-    extendedClasspath.addAll(getClassPath(scriptProject));

-

-    return extendedClasspath.toArray(new String[extendedClasspath.size()]);

-  }

-

-  public static List<String> getClassPath(IScriptProject project) throws CoreException {

-    RutaIdeUIPlugin d = RutaIdeUIPlugin.getDefault();

-    List<String> extendedClasspath = new ArrayList<String>();

-

-    // Normal mode, add the launcher plugin and uima runtime jar to the classpath

-    try {

-      if (!Platform.inDevelopmentMode()) {

-        // Add this plugin jar to the classpath

-        extendedClasspath.add(d.pluginIdToJarPath(RutaIdeUIPlugin.PLUGIN_ID));

-      } else {

-        extendedClasspath.add(d.pluginIdToJarPath(RutaIdeUIPlugin.PLUGIN_ID) + "target/classes");

-      }

-

-      // uima

-      Bundle bundle = RutaIdeUIPlugin.getDefault().getBundle("org.apache.uima.runtime");

-      if (bundle != null) {

-        Enumeration<?> jarEnum = bundle.findEntries("/", "uimaj-core*.jar",

-                Platform.inDevelopmentMode());

-        while (jarEnum != null && jarEnum.hasMoreElements()) {

-          URL element = (URL) jarEnum.nextElement();

-          extendedClasspath.add(FileLocator.toFileURL(element).getFile());

-        }

-      }

-      extendedClasspath.add(d.pluginIdToJarPath("org.apache.uima.runtime"));

-

-      // ruta

-      bundle = RutaIdeUIPlugin.getDefault().getBundle("org.apache.uima.ruta.engine");

-      if (bundle != null) {

-        Enumeration<?> jarEnum = bundle.findEntries("/", "*.jar", Platform.inDevelopmentMode());

-        while (jarEnum != null && jarEnum.hasMoreElements()) {

-          URL element = (URL) jarEnum.nextElement();

-          extendedClasspath.add(FileLocator.toFileURL(element).getFile());

-        }

-      }

-      extendedClasspath.add(d.pluginIdToJarPath("org.apache.uima.ruta.engine"));

-    } catch (IOException e) {

-      throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID, IStatus.OK,

-              "Failed to compose classpath!", e));

-    }

-    

-    

-    Collection<String> classPath = RutaProjectUtils.getClassPath(project.getProject());

-    extendedClasspath.addAll(classPath);

-

-    Collection<String> extensions = getExtensions();

-    extendedClasspath.addAll(extensions);

-    return extendedClasspath;

-  }

-

-  private static Collection<String> getExtensions() throws CoreException {

-    RutaIdeUIPlugin d = RutaIdeUIPlugin.getDefault();

-    Collection<String> result = new TreeSet<String>();

-    IExtension[] extensions = null;

-    extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "actionExtension").getExtensions();

-    extensionToClassPath(d, result, extensions);

-    extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "conditionExtension").getExtensions();

-    extensionToClassPath(d, result, extensions);

-    extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "booleanFunctionExtension")

-            .getExtensions();

-    extensionToClassPath(d, result, extensions);

-    extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "numberFunctionExtension")

-            .getExtensions();

-    extensionToClassPath(d, result, extensions);

-    extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "stringFunctionExtension")

-            .getExtensions();

-    extensionToClassPath(d, result, extensions);

-    extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "typeFunctionExtension")

-            .getExtensions();

-    extensionToClassPath(d, result, extensions);

-    return result;

-  }

-

-  private static void extensionToClassPath(RutaIdeUIPlugin d, Collection<String> result,

-          IExtension[] extensions) throws CoreException {

-    for (IExtension each : extensions) {

-      String namespaceIdentifier = each.getNamespaceIdentifier();

-      try {

-        if (!Platform.inDevelopmentMode()) {

-          result.add(d.pluginIdToJarPath(namespaceIdentifier));

-        } else {

-          result.add(d.pluginIdToJarPath(namespaceIdentifier) + "target/classes");

-          result.add(d.pluginIdToJarPath(namespaceIdentifier) + "bin");

-        }

-      } catch (IOException e) {

-        throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID, IStatus.OK,

-                "Failed to extend classpath with " + namespaceIdentifier + "!", e));

-      }

-    }

-  }

-

-

-  @Override

-  public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch,

-          IProgressMonitor monitor) throws CoreException {

-    this.mode = mode;

-    IResource ouputFolder = null;

-    IScriptProject proj = AbstractScriptLaunchConfigurationDelegate.getScriptProject(configuration);

-    IPath projectPath = proj.getResource().getLocation();

-    IPath outputDirPath = projectPath.append(RutaProjectUtils.getDefaultOutputLocation());

-    String outputFolderPath = configuration.getAttribute(RutaLaunchConstants.ARG_OUTPUT_FOLDER, "");

-    if (StringUtils.isBlank(outputFolderPath)) {

-      outputFolderPath = configuration.getAttribute(RutaLaunchConstants.OUTPUT_FOLDER,

-              outputDirPath.toPortableString());

-    }

-    if (outputFolderPath.length() != 0) {

-      IPath path = Path.fromPortableString(outputFolderPath);

-      IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(path);

-      if (member instanceof Folder) {

-        ouputFolder = member;

-      } else {

-        ouputFolder = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(path);

-      }

-    }

-    boolean recursive = configuration.getAttribute(RutaLaunchConstants.RECURSIVE, false);

-    if (ouputFolder != null) {

-      clearOutputFolder(new File(ouputFolder.getLocation().toPortableString()), recursive);

-    }

-

-    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    boolean noVM = preferenceStore.getBoolean(RutaCorePreferences.NO_VM_IN_DEV_MODE);

-    if (noVM && Platform.inDevelopmentMode()) {

-      String[] args = getProgramArguments(configuration).split(" ");

-      try {

-        RutaLauncher.main(args);

-      } catch (Exception e1) {

-        RutaIdeUIPlugin.error(e1);

-      }

-    } else {

-      super.launch(configuration, mode, launch, monitor);

-

-      while (!launch.isTerminated()) {

-        try {

-          Thread.sleep(100);

-        } catch (InterruptedException e) {

-          Thread.interrupted();

-        }

-      }

-    }

-    if (ouputFolder != null) {

-      ouputFolder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

-    }

-  }

-

-  private void clearOutputFolder(File outputDir, boolean recursive) {

-    IPreferenceStore store = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    boolean clearOutput = store.getBoolean(RutaCorePreferences.PROJECT_CLEAR_OUTPUT);

-    if (clearOutput) {

-      List<File> outputFiles = getFiles(outputDir, recursive);

-      for (File file : outputFiles) {

-        file.delete();

-      }

-    }

-  }

-

-  private static List<File> getFiles(File dir, boolean recusive) {

-    List<File> result = new ArrayList<File>();

-    for (File each : dir.listFiles()) {

-      // TODO: find a solution for this hotfix

-      if (each.getName().endsWith(".svn")) {

-        continue;

-      }

-      result.add(each);

-      if (each.isDirectory() && recusive) {

-        result.addAll(getFiles(each, recusive));

-      }

-    }

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationDelegateOld.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationDelegateOld.java
deleted file mode 100644
index 5e3dc50..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConfigurationDelegateOld.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.dltk.launching.AbstractScriptLaunchConfigurationDelegate;

-import org.eclipse.dltk.launching.IInterpreterRunner;

-import org.eclipse.dltk.launching.InterpreterConfig;

-

-public class RutaLaunchConfigurationDelegateOld extends AbstractScriptLaunchConfigurationDelegate {

-

-  @Override

-  protected void runRunner(ILaunchConfiguration configuration, IInterpreterRunner runner,

-          InterpreterConfig config, ILaunch launch, IProgressMonitor monitor) throws CoreException {

-    if (runner instanceof IConfigurableRunner) {

-      IRutaInterpreterRunnerConfig runnerConfig = getConfig();

-      if (runnerConfig != null) {

-        IConfigurableRunner rc = (IConfigurableRunner) runner;

-        rc.setRunnerConfig(runnerConfig);

-      }

-    }

-    runner.run(config, launch, monitor);

-  }

-

-  public IRutaInterpreterRunnerConfig getConfig() {

-    return null;

-  }

-

-  @Override

-  public String getLanguageId() {

-    return RutaNature.NATURE_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConstants.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConstants.java
deleted file mode 100644
index 8f6159a..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLaunchConstants.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-public class RutaLaunchConstants {

-

-  public static final String ARG_INPUT_FOLDER = "-inputFolder";

-

-  public static final String ARG_OUTPUT_FOLDER = "-outputFolder";

-

-  public static final String ARG_DESCRIPTOR = "-descriptor";

-

-  public static final String ARG_RECURSIVE = "-inputRecursive";

-

-  public static final String ARG_MODE = "-mode";

-

-  public static final String ARG_VIEW = "-view";

-

-  public static final String ARG_ENCODING = "-encoding";

-

-  public static final String INPUT_FOLDER = "org.apache.uima.ruta.ide.launching.inputFolder";

-

-  public static final String OUTPUT_FOLDER = "org.apache.uima.ruta.ide.launching.outputFolder";

-

-  public static final String RECURSIVE = "org.apache.uima.ruta.ide.launching.recursive";

-

-  public static final String VIEW = "org.apache.uima.ruta.ide.launching.view";

-

-  public static final String ARG_ADD_SDI = "org.apache.uima.ruta.ide.launching.addsdi";;

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLauncher.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLauncher.java
deleted file mode 100644
index a1e3ed7..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaLauncher.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.UnsupportedEncodingException;

-import java.net.URI;

-import java.net.URLDecoder;

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.analysis_engine.AnalysisEngine;

-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.impl.XmiCasDeserializer;

-import org.apache.uima.cas.impl.XmiCasSerializer;

-import org.apache.uima.resource.ResourceConfigurationException;

-import org.apache.uima.ruta.engine.Ruta;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.util.FileUtils;

-import org.apache.uima.util.XMLSerializer;

-import org.apache.uima.util.impl.ProcessTrace_impl;

-import org.xml.sax.SAXException;

-

-public class RutaLauncher {

-

-  public static final String URL_ENCODING = "UTF-8";

-

-  private static File descriptor;

-

-  private static File inputFolder;

-

-  private static File outputFolder = null;

-

-  private static boolean inputRecursive = false;

-

-  private static boolean addSDI = false;

-

-  private static String inputEncoding = "UTF-8";

-

-  private static String launchMode = "run";

-

-  private static String view = null;

-

-  private static boolean parseCmdLineArgs(String[] args) throws UnsupportedEncodingException {

-    int index = 0;

-    int count = 0;

-    while (index < args.length) {

-      String each = args[index++];

-      if (RutaLaunchConstants.ARG_INPUT_FOLDER.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        count++;

-        inputFolder = new File(URLDecoder.decode(args[index++], URL_ENCODING));

-      } else if (RutaLaunchConstants.ARG_OUTPUT_FOLDER.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        outputFolder = new File(URLDecoder.decode(args[index++], URL_ENCODING));

-      } else if (RutaLaunchConstants.ARG_DESCRIPTOR.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        count++;

-        descriptor = new File(URLDecoder.decode(args[index++], URL_ENCODING));

-      } else if (RutaLaunchConstants.ARG_RECURSIVE.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        inputRecursive = Boolean.parseBoolean(args[index++]);

-      } else if (RutaLaunchConstants.ARG_ADD_SDI.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        addSDI = Boolean.parseBoolean(args[index++]);

-      } else if (RutaLaunchConstants.ARG_RECURSIVE.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        inputEncoding = args[index++];

-      } else if (RutaLaunchConstants.ARG_MODE.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        launchMode = args[index++];

-      } else if (RutaLaunchConstants.ARG_VIEW.equals(each)) {

-        if (index >= args.length) {

-          return false;

-        }

-        view = args[index++];

-      }

-    }

-    return count == 2;

-  }

-

-  public static void main(String[] args) throws Exception {

-    if (!parseCmdLineArgs(args)) {

-      throw new IllegalArgumentException("Passed arguments are invalid!");

-    }

-

-    AnalysisEngine ae = Ruta.wrapAnalysisEngine(descriptor.toURI().toURL(), view, true,

-            inputEncoding);

-    configure(ae);

-    CAS cas = ae.newCAS();

-

-    List<File> inputFiles = getFiles(inputFolder, inputRecursive);

-    for (File file : inputFiles) {

-      processFile(file, ae, cas);

-    }

-

-    ae.batchProcessComplete(new ProcessTrace_impl());

-    ae.collectionProcessComplete(new ProcessTrace_impl());

-    cas.release();

-    ae.destroy();

-  }

-

-  private static void processFile(File file, AnalysisEngine ae, CAS cas) throws IOException,

-          AnalysisEngineProcessException, SAXException {

-    if (view != null) {

-      boolean found = false;

-      Iterator<CAS> viewIterator = cas.getViewIterator();

-      while (viewIterator.hasNext()) {

-        CAS each = (CAS) viewIterator.next();

-        String viewName = each.getViewName();

-        if (viewName.equals(view)) {

-          cas = cas.getView(view);

-          found = true;

-          break;

-        }

-      }

-      if (!found) {

-        cas = cas.createView(view);

-      }

-

-    }

-    if (file.getName().endsWith(".xmi")) {

-      XmiCasDeserializer.deserialize(new FileInputStream(file), cas, true);

-    } else {

-      String document = FileUtils.file2String(file, inputEncoding);

-      cas.setDocumentText(document);

-    }

-

-    if (addSDI) {

-      RutaEngine.removeSourceDocumentInformation(cas);

-      RutaEngine.addSourceDocumentInformation(cas, file);

-    }

-    ae.process(cas);

-    if (outputFolder != null) {

-      File outputFile = getOutputFile(file, inputFolder, outputFolder);

-      writeXmi(cas, outputFile);

-    }

-    cas.reset();

-  }

-

-  private static void configure(AnalysisEngine ae) throws ResourceConfigurationException {

-    if ("debug".equals(launchMode)) {

-      ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG, true);

-      ae.setConfigParameterValue(RutaEngine.PARAM_DEBUG_WITH_MATCHES, true);

-      ae.setConfigParameterValue(RutaEngine.PARAM_PROFILE, true);

-      ae.setConfigParameterValue(RutaEngine.PARAM_STATISTICS, true);

-      ae.setConfigParameterValue(RutaEngine.PARAM_CREATED_BY, true);

-    }

-    ae.reconfigure();

-

-  }

-

-  private static List<File> getFiles(File dir, boolean recusive) {

-    List<File> result = new ArrayList<File>();

-    File[] listFiles = dir.listFiles();

-    if (listFiles != null) {

-      for (File each : listFiles) {

-        // TODO: find a solution for this hotfix

-        if (each.isHidden()) {

-          continue;

-        }

-        if (each.isFile()) {

-          result.add(each);

-        } else if (each.isDirectory() && recusive) {

-          result.addAll(getFiles(each, recusive));

-        }

-      }

-    }

-    return result;

-  }

-

-  private static void writeXmi(CAS cas, File file) throws IOException, SAXException {

-    FileOutputStream out = null;

-    try {

-      out = new FileOutputStream(file);

-      XmiCasSerializer ser = new XmiCasSerializer(cas.getTypeSystem());

-      XMLSerializer xmlSer = new XMLSerializer(out, false);

-      ser.serialize(cas, xmlSer.getContentHandler());

-    } finally {

-      if (out != null) {

-        out.close();

-      }

-    }

-  }

-

-  private static File getOutputFile(File inputFile, File inputFolder, File outputFolder) {

-    URI relativize = inputFolder.toURI().relativize(inputFile.toURI());

-    String path = relativize.getPath();

-    if (!path.endsWith(".xmi")) {

-      path += ".xmi";

-    }

-    File result = new File(outputFolder, path);

-    result.getParentFile().mkdirs();

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaSourceLookupDirector.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaSourceLookupDirector.java
deleted file mode 100644
index 4f86dfc..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaSourceLookupDirector.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import java.io.File;

-import java.net.URI;

-

-import org.eclipse.core.resources.IContainer;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.core.model.IPersistableSourceLocator;

-import org.eclipse.debug.core.model.IStackFrame;

-import org.eclipse.dltk.internal.debug.core.model.ScriptStackFrame;

-

-public class RutaSourceLookupDirector implements IPersistableSourceLocator {

-

-  public RutaSourceLookupDirector() {

-  }

-

-  public Object getSourceElement(IStackFrame stackFrame) {

-    if (stackFrame instanceof ScriptStackFrame) {

-      ScriptStackFrame sf = (ScriptStackFrame) stackFrame;

-      URI uri = sf.getFileName();

-

-      String pathname = uri.getPath();

-      if (Platform.getOS().equals(Platform.OS_WIN32)) {

-        pathname = pathname.substring(1);

-      }

-

-      File file = new File(pathname);

-

-      IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();

-      IContainer container = root.getContainerForLocation(new Path(file.getParent()));

-

-      if (container != null) {

-        IResource resource = container.findMember(file.getName());

-

-        if (resource instanceof IFile) {

-          return resource;

-        }

-      } else {

-        return file;

-      }

-    }

-

-    return null;

-  }

-

-  public String getMemento() throws CoreException {

-    return null;

-  }

-

-  public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException {

-

-  }

-

-  public void initializeFromMemento(String memento) throws CoreException {

-

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaSourcePathComputer.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaSourcePathComputer.java
deleted file mode 100644
index 81701f2..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/launching/RutaSourcePathComputer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.ide.launching;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.debug.core.ILaunchConfiguration;

-import org.eclipse.debug.core.sourcelookup.ISourceContainer;

-import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;

-

-public class RutaSourcePathComputer implements ISourcePathComputerDelegate {

-

-  public RutaSourcePathComputer() {

-  }

-

-  public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration,

-          IProgressMonitor monitor) throws CoreException {

-    List containers = new ArrayList();

-    return (ISourceContainer[]) containers.toArray(new ISourceContainer[containers.size()]);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/DefaultRutaSemanticHighlightingExtension.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/DefaultRutaSemanticHighlightingExtension.java
deleted file mode 100644
index 42862bb..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/DefaultRutaSemanticHighlightingExtension.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.parser.ast.RutaModuleDeclaration;

-import org.apache.uima.ruta.ide.ui.text.RutaTextTools;

-import org.eclipse.dltk.ast.ASTListNode;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.Argument;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.declarations.TypeDeclaration;

-import org.eclipse.dltk.compiler.env.ISourceModule;

-import org.eclipse.dltk.core.SourceParserUtil;

-import org.eclipse.dltk.ui.editor.highlighting.HighlightedPosition;

-import org.eclipse.dltk.ui.editor.highlighting.ISemanticHighlightingRequestor;

-import org.eclipse.dltk.ui.editor.highlighting.SemanticHighlighting;

-

-public class DefaultRutaSemanticHighlightingExtension implements ISemanticHighlightingExtension {

-

-  private SemanticHighlighting[] highlightings = new SemanticHighlighting[] {

-      new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR, null, null),

-      new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_FUNCTION_COLOR, null, null),

-      new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_ACTION_COLOR, null, null),

-      new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_CONDITION_COLOR, null, null),

-      new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_STRING_COLOR, null, null),

-      new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_VARIABLE_COLOR,

-              RutaPreferenceConstants.EDITOR_CONDITION_COLOR, null) };

-

-  public DefaultRutaSemanticHighlightingExtension() {

-  }

-

-  public HighlightedPosition[] calculatePositions(ASTNode node,

-          ISemanticHighlightingRequestor requestor) {

-

-    // Check Ruta procedures

-    if (node instanceof MethodDeclaration) {

-      MethodDeclaration m = (MethodDeclaration) node;

-      requestor.addPosition(m.getNameStart(), m.getNameEnd(),

-              RutaPreferenceConstants.EDITOR_FUNCTION_COLOR);

-

-    }

-

-    if (node instanceof Argument) {

-      Argument m = (Argument) node;

-      requestor.addPosition(m.getNameStart(), m.getNameEnd(),

-              RutaPreferenceConstants.EDITOR_VARIABLE_COLOR);

-    }

-

-    if (node instanceof TypeDeclaration) {

-

-      TypeDeclaration t = (TypeDeclaration) node;

-      List children;

-

-      // Handle base classes highlighting

-      ASTListNode s = t.getSuperClasses();

-

-      if (s != null && s.getChilds() != null) {

-        children = s.getChilds();

-        Iterator it = children.iterator();

-        while (it.hasNext()) {

-          ASTNode n = (ASTNode) it.next();

-          requestor.addPosition(n.sourceStart(), n.sourceEnd(),

-                  RutaPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR);

-        }

-      }

-

-      requestor.addPosition(t.getNameStart(), t.getNameEnd(),

-              RutaPreferenceConstants.EDITOR_VARIABLE_COLOR);

-    }

-

-    return null;

-

-  }

-

-  public void processNode(ASTNode node, ISemanticHighlightingRequestor requestor) {

-    calculatePositions(node, requestor);

-

-  }

-

-  public SemanticHighlighting[] getHighlightings() {

-    return highlightings;

-  }

-

-  public void doOtherHighlighting(ISourceModule code,

-          final ISemanticHighlightingRequestor semanticHighlightingRequestor) {

-    ModuleDeclaration moduleDeclaration = SourceParserUtil

-            .getModuleDeclaration((org.eclipse.dltk.core.ISourceModule) (code.getModelElement()));

-    if (moduleDeclaration instanceof RutaModuleDeclaration) {

-      RutaModuleDeclaration md = (RutaModuleDeclaration) moduleDeclaration;

-      if (md != null) {

-

-        // do highlightings

-

-      }

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/ExplainPerspective.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/ExplainPerspective.java
deleted file mode 100644
index 078f357..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/ExplainPerspective.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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.ruta.ide.ui;
-
-import org.apache.uima.ruta.ide.ui.wizards.RutaFileCreationWizard;
-import org.apache.uima.ruta.ide.ui.wizards.RutaPackageCreationWizard;
-import org.apache.uima.ruta.ide.ui.wizards.RutaProjectCreationWizard;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-import org.eclipse.ui.console.IConsoleConstants;
-import org.eclipse.ui.progress.IProgressConstants;
-
-public class ExplainPerspective implements IPerspectiveFactory {
-
-  public static final String FAILED_RULES = "org.apache.uima.ruta.explain.failed";
-
-  public static final String MATCHED_RULES = "org.apache.uima.ruta.explain.matched";
-
-  public static final String RULE_ELEMENTS = "org.apache.uima.ruta.explain.element";
-
-  public static final String APPLIED_RULES = "org.apache.uima.ruta.explain.apply";
-
-  public static final String SELECTION_RULES = "org.apache.uima.ruta.explain.selection";
-
-  public static final String RULE_LIST = "org.apache.uima.ruta.explain.rulelist";
-
-  public static final String CREATED_BY = "org.apache.uima.ruta.explain.createdBy";
-
-  public static final String TYPE_BROWSER = "org.apache.uima.caseditor.browser";
-
-  public static final String SELECTION_VIEW = "org.apache.uima.caseditor.selection";
-
-  public static final String QUERY = "org.apache.uima.ruta.query.ui.ScriptQueryView";
-
-  public static final String SCRIPT_EXPLORER = "org.eclipse.dltk.ui.ScriptExplorer";
-
-  public static final String NEW_FOLDER_WIZARD = "org.eclipse.ui.wizards.new.folder"; //$NON-NLS-1$ 
-
-  public static final String NEW_FILE_WIZARD = "org.eclipse.ui.wizards.new.file"; //$NON-NLS-1$
-
-  public static final String NEW_UNTITLED_TEXT_FILE_WIZARD = "org.eclipse.ui.editors.wizards.UntitledTextFileWizard"; //$NON-NLS-1$
-
-  public static final String ID_NEW_SOURCE_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.NewSourceFolderCreationWizard";
-
-  public static final String ID_NEW_PACKAGE_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.NewPackageCreationWizard";
-
-  protected void addNewWizardShortcuts(IPageLayout layout) {
-    layout.addNewWizardShortcut(RutaProjectCreationWizard.ID_WIZARD);
-    layout.addNewWizardShortcut(RutaFileCreationWizard.ID_WIZARD);
-
-    layout.addNewWizardShortcut(ID_NEW_SOURCE_WIZARD);
-    layout.addNewWizardShortcut(RutaPackageCreationWizard.ID_WIZARD);
-
-    layout.addNewWizardShortcut(NEW_FOLDER_WIZARD);
-    layout.addNewWizardShortcut(NEW_FILE_WIZARD);
-    layout.addNewWizardShortcut(NEW_UNTITLED_TEXT_FILE_WIZARD);
-  }
-
-  protected void addShowViewShortcuts(IPageLayout layout) {
-    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
-    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
-    layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
-
-    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
-    layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
-
-    layout.addShowViewShortcut(SCRIPT_EXPLORER);
-    layout.addShowViewShortcut(TYPE_BROWSER);
-    layout.addShowViewShortcut(SELECTION_VIEW);
-    layout.addShowViewShortcut(CREATED_BY);
-    layout.addShowViewShortcut(QUERY);
-
-  }
-
-  public void createFolders(IPageLayout layout) {
-    final String editorArea = layout.getEditorArea();
-
-    IFolderLayout rightFolder = layout.createFolder("rightFolder", IPageLayout.RIGHT, (float) 0.75,
-            editorArea);
-    rightFolder.addView(APPLIED_RULES);
-    rightFolder.addView(SELECTION_RULES);
-    rightFolder.addView(RULE_LIST);
-    rightFolder.addView(TYPE_BROWSER);
-    rightFolder.addView(SELECTION_VIEW);
-
-    IFolderLayout ruleFolder = layout.createFolder("ruleFolder", IPageLayout.BOTTOM, (float) 0.6,
-            "rightFolder");
-    ruleFolder.addView(RULE_ELEMENTS);
-    ruleFolder.addView(CREATED_BY);
-
-    IFolderLayout navigationFolder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.2,
-            editorArea);
-    navigationFolder.addView(SCRIPT_EXPLORER);
-
-    IFolderLayout matchedFolder = layout.createFolder("matchedFolder", IPageLayout.BOTTOM,
-            (float) 0.75, editorArea);
-    matchedFolder.addView(MATCHED_RULES);
-
-    IFolderLayout failedFolder = layout.createFolder("failedFolder", IPageLayout.BOTTOM,
-            (float) 0.75, editorArea);
-    failedFolder.addView(FAILED_RULES);
-
-  }
-
-  protected void addPerspectiveShotcuts(IPageLayout layout) {
-    layout.addPerspectiveShortcut("org.apache.uima.ruta.ide.ui.RutaPerspective");
-  }
-
-  public void createInitialLayout(IPageLayout layout) {
-    createFolders(layout);
-    addShowViewShortcuts(layout);
-    addNewWizardShortcuts(layout);
-    addPerspectiveShotcuts(layout);
-
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/ISemanticHighlightingExtension.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/ISemanticHighlightingExtension.java
deleted file mode 100644
index c5361fb..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/ISemanticHighlightingExtension.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ui.editor.highlighting.ISemanticHighlightingRequestor;

-import org.eclipse.dltk.ui.editor.highlighting.SemanticHighlighting;

-

-public interface ISemanticHighlightingExtension {

-

-  SemanticHighlighting[] getHighlightings();

-

-  void processNode(ASTNode node, ISemanticHighlightingRequestor requestor);

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaImages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaImages.java
deleted file mode 100644
index b8603e2..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaImages.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.dltk.ui.PluginImagesHelper;

-import org.eclipse.jface.resource.ImageDescriptor;

-

-public class RutaImages {

-  private static final PluginImagesHelper helper = new PluginImagesHelper(RutaIdeUIPlugin

-          .getDefault().getBundle(), new Path("/icons"));

-

-  public static final ImageDescriptor PROJECT_DECARATOR = helper

-          .createUnManaged("", "ruta_ovr.gif");

-

-  public static final ImageDescriptor DESC_WIZBAN_PROJECT_CREATION = helper.createUnManaged("",

-          "projectcreate_wiz.png");

-

-  public static final ImageDescriptor DESC_WIZBAN_FILE_CREATION = helper.createUnManaged("",

-          "filecreate_wiz.png");

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPartitions.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPartitions.java
deleted file mode 100644
index ce0a07e..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPartitions.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.core.RutaConstants;

-import org.eclipse.jface.text.IDocument;

-

-public interface RutaPartitions {

-

-  public final static String RUTA_PARTITIONING = RutaConstants.RUTA_PARTITIONING;

-

-  public final static String RUTA_COMMENT = "__ruta_comment";

-

-  public final static String RUTA_STRING = "__ruta_string";

-

-  public static final String RUTA_INNER_CODE = "__ruta_inner_code";

-

-  public final static String[] RUTA_PARTITION_TYPES = new String[] { RutaPartitions.RUTA_STRING,

-      RutaPartitions.RUTA_COMMENT, IDocument.DEFAULT_CONTENT_TYPE };

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPerspective.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPerspective.java
deleted file mode 100644
index 9a55567..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPerspective.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.ui.wizards.RutaFileCreationWizard;

-import org.apache.uima.ruta.ide.ui.wizards.RutaPackageCreationWizard;

-import org.apache.uima.ruta.ide.ui.wizards.RutaProjectCreationWizard;

-import org.eclipse.ui.IFolderLayout;

-import org.eclipse.ui.IPageLayout;

-import org.eclipse.ui.IPerspectiveFactory;

-import org.eclipse.ui.console.IConsoleConstants;

-import org.eclipse.ui.progress.IProgressConstants;

-

-public class RutaPerspective implements IPerspectiveFactory {

-

-  private static final String TAE_CONFIGURATOR_NEW_WIZARD = "taeconfigurator.wizards.TAEConfiguratorNewWizard";

-

-  private static final String TYPE_SYSTEM_NEW_WIZARD = "taeconfigurator.wizards.TypeSystemNewWizard";

-

-  public static final String TYPE_BROWSER = "org.apache.uima.caseditor.browser";

-

-  public static final String SELECTION_VIEW = "org.apache.uima.caseditor.selection";

-

-  public static final String ANNOTATION_TESTING = "org.apache.uima.ruta.testing.TestingView";

-

-  public static final String QUERY = "org.apache.uima.ruta.query.ui.ScriptQueryView";

-

-  public static final String TEXTRULER = "org.apache.uima.ruta.ml.MainView";

-

-  public static final String SCRIPT_EXPLORER = "org.eclipse.dltk.ui.ScriptExplorer";

-

-  public static final String NEW_FOLDER_WIZARD = "org.eclipse.ui.wizards.new.folder"; //$NON-NLS-1$ 

-

-  public static final String NEW_FILE_WIZARD = "org.eclipse.ui.wizards.new.file"; //$NON-NLS-1$

-

-  public static final String NEW_UNTITLED_TEXT_FILE_WIZARD = "org.eclipse.ui.editors.wizards.UntitledTextFileWizard"; //$NON-NLS-1$

-

-  public static final String ID_NEW_SOURCE_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.NewSourceFolderCreationWizard";

-

-  public static final String ID_NEW_PACKAGE_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.NewPackageCreationWizard";

-

-  private static final String CHECK_ANNOTATIONS = "org.apache.uima.ruta.check";

-

-  protected void addNewWizardShortcuts(IPageLayout layout) {

-    layout.addNewWizardShortcut(RutaProjectCreationWizard.ID_WIZARD);

-    layout.addNewWizardShortcut(RutaFileCreationWizard.ID_WIZARD);

-

-    layout.addNewWizardShortcut(ID_NEW_SOURCE_WIZARD);

-    layout.addNewWizardShortcut(RutaPackageCreationWizard.ID_WIZARD);

-    layout.addNewWizardShortcut(TYPE_SYSTEM_NEW_WIZARD);

-    layout.addNewWizardShortcut(TAE_CONFIGURATOR_NEW_WIZARD);

-

-    layout.addNewWizardShortcut(NEW_FOLDER_WIZARD);

-    layout.addNewWizardShortcut(NEW_FILE_WIZARD);

-    layout.addNewWizardShortcut(NEW_UNTITLED_TEXT_FILE_WIZARD);

-  }

-

-  protected void addShowViewShortcuts(IPageLayout layout) {

-    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);

-    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);

-    layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);

-

-    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

-    layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);

-

-    layout.addShowViewShortcut(SCRIPT_EXPLORER);

-    layout.addShowViewShortcut(TYPE_BROWSER);

-    layout.addShowViewShortcut(SELECTION_VIEW);

-    layout.addShowViewShortcut(TEXTRULER);

-    layout.addShowViewShortcut(ANNOTATION_TESTING);

-    layout.addShowViewShortcut(QUERY);

-

-  }

-

-  protected void addActionSets(IPageLayout layout) {

-

-  }

-

-  protected void createFolders(IPageLayout layout) {

-    final String editorArea = layout.getEditorArea();

-

-    IFolderLayout rightFolder = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.75,

-            editorArea);

-    rightFolder.addView(IPageLayout.ID_OUTLINE);

-    rightFolder.addView(TYPE_BROWSER);

-    rightFolder.addView(CHECK_ANNOTATIONS);

-

-    // Folder

-    IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.2, editorArea); //$NON-NLS-1$		

-

-    folder.addView(SCRIPT_EXPLORER);

-    folder.addPlaceholder(IPageLayout.ID_BOOKMARKS);

-

-    // Output folder

-    IFolderLayout outputFolder = layout.createFolder(

-            "bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$

-

-    outputFolder.addView(IPageLayout.ID_PROBLEM_VIEW);

-    outputFolder.addView(IPageLayout.ID_TASK_LIST);

-    outputFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);

-    outputFolder.addView(SELECTION_VIEW);

-    outputFolder.addView(TEXTRULER);

-    outputFolder.addView(ANNOTATION_TESTING);

-    outputFolder.addView(QUERY);

-

-    outputFolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);

-    outputFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);

-    outputFolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);

-  }

-

-  protected void addPerspectiveShotcuts(IPageLayout layout) {

-    layout.addPerspectiveShortcut("org.apache.uima.ruta.ide.ui.explainPerspective");

-  }

-

-  public void createInitialLayout(IPageLayout layout) {

-    createFolders(layout);

-    addActionSets(layout);

-    addShowViewShortcuts(layout);

-    addNewWizardShortcuts(layout);

-    addPerspectiveShotcuts(layout);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPreferenceConstants.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPreferenceConstants.java
deleted file mode 100644
index 0a49ab1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaPreferenceConstants.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.ui.text.RutaColorConstants;

-import org.eclipse.dltk.ui.CodeFormatterConstants;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.dltk.ui.preferences.NewScriptProjectPreferencePage;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferenceConverter;

-import org.eclipse.swt.graphics.RGB;

-

-public class RutaPreferenceConstants extends PreferenceConstants {

-

-  public static final String EDITOR_FOLDING_IMPORTS = "editor_folding_default_imports"; //$NON-NLS-1$

-

-  public static final String EDITOR_FOLDING_BLOCKS = "editor_folding_blocks"; //$NON-NLS-1$

-

-  public static final int EDITOR_FOLDING_BLOCKS_OFF = 0;

-

-  public static final int EDITOR_FOLDING_BLOCKS_INCLUDE = 1;

-

-  public static final int EDITOR_FOLDING_BLOCKS_EXCLUDE = 2;

-

-  public static final String EDITOR_FOLDING_INCLUDE_LIST = "editor_folding_include_list"; //$NON-NLS-1$

-

-  public static final String EDITOR_FOLDING_EXCLUDE_LIST = "editor_folding_exclude_list"; //$NON-NLS-1$

-

-  public static final String EDITOR_FOLDING_INIT_COMMENTS = "editor_folding_init_comments"; //$NON-NLS-1$

-

-  public static final String EDITOR_FOLDING_INIT_NAMESPACES = "editor_folding_init_namespaces"; //$NON-NLS-1$

-

-  public static final String EDITOR_FOLDING_INIT_BLOCKS = "editor_folding_init_blocks"; //$NON-NLS-1$

-

-  public static final String EDITOR_FOLDING_COMMENTS_WITH_NEWLINES = "editor_folding_comments_lines"; //$NON-NLS-1$

-

-  public static final String DOC_MAN_PAGES_LOCATIONS = "doc_man_pages_locations";

-

-  public static final String EDITOR_FOLDING_COMMENTS_FOLDING = "editor_folding_comments";

-

-  public final static String EDITOR_SINGLE_LINE_COMMENT_COLOR = RutaColorConstants.RUTA_SINGLE_LINE_COMMENT;

-

-  public final static String EDITOR_SINGLE_LINE_COMMENT_BOLD = RutaColorConstants.RUTA_SINGLE_LINE_COMMENT

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_SINGLE_LINE_COMMENT_ITALIC = RutaColorConstants.RUTA_SINGLE_LINE_COMMENT

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_SINGLE_LINE_COMMENT_STRIKETHROUGH = RutaColorConstants.RUTA_SINGLE_LINE_COMMENT

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_SINGLE_LINE_COMMENT_UNDERLINE = RutaColorConstants.RUTA_SINGLE_LINE_COMMENT

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_NUMBER_COLOR = RutaColorConstants.RUTA_NUMBER;

-

-  public final static String EDITOR_NUMBER_BOLD = RutaColorConstants.RUTA_NUMBER

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_NUMBER_ITALIC = RutaColorConstants.RUTA_NUMBER

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_NUMBER_STRIKETHROUGH = RutaColorConstants.RUTA_NUMBER

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_NUMBER_UNDERLINE = RutaColorConstants.RUTA_NUMBER

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_STRING_COLOR = RutaColorConstants.RUTA_STRING;

-

-  public final static String EDITOR_STRING_BOLD = RutaColorConstants.RUTA_STRING

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_STRING_ITALIC = RutaColorConstants.RUTA_STRING

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_STRING_STRIKETHROUGH = RutaColorConstants.RUTA_STRING

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_STRING_UNDERLINE = RutaColorConstants.RUTA_STRING

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_FUNCTION_COLOR = RutaColorConstants.RUTA_FUNCTION;

-

-  public final static String EDITOR_FUNCTION_COLOR_BOLD = RutaColorConstants.RUTA_FUNCTION

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_FUNCTION_COLOR_ITALIC = RutaColorConstants.RUTA_FUNCTION

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_FUNCTION_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_FUNCTION

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_FUNCTION_COLOR_UNDERLINE = RutaColorConstants.RUTA_FUNCTION

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_CONDITION_COLOR = RutaColorConstants.RUTA_CONDITION;

-

-  public final static String EDITOR_CONDITION_COLOR_BOLD = RutaColorConstants.RUTA_CONDITION

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_CONDITION_COLOR_ITALIC = RutaColorConstants.RUTA_CONDITION

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_CONDITION_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_CONDITION

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_CONDITION_COLOR_UNDERLINE = RutaColorConstants.RUTA_CONDITION

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_ACTION_COLOR = RutaColorConstants.RUTA_ACTION;

-

-  public final static String EDITOR_ACTION_COLOR_BOLD = RutaColorConstants.RUTA_ACTION

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_ACTION_COLOR_ITALIC = RutaColorConstants.RUTA_ACTION

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_ACTION_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_ACTION

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_ACTION_COLOR_UNDERLINE = RutaColorConstants.RUTA_ACTION

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_THEN_COLOR = RutaColorConstants.RUTA_THEN;

-

-  public final static String EDITOR_THEN_COLOR_BOLD = RutaColorConstants.RUTA_THEN

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_THEN_COLOR_ITALIC = RutaColorConstants.RUTA_THEN

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_THEN_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_THEN

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_THEN_COLOR_UNDERLINE = RutaColorConstants.RUTA_THEN

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_DECLARATION_DEFINITION_COLOR = RutaColorConstants.RUTA_DECLARATION;

-

-  public final static String EDITOR_DECLARATION_DEFINITION_COLOR_BOLD = RutaColorConstants.RUTA_DECLARATION

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_DECLARATION_DEFINITION_COLOR_ITALIC = RutaColorConstants.RUTA_DECLARATION

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_DECLARATION_DEFINITION_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_DECLARATION

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_DECLARATION_DEFINITION_COLOR_UNDERLINE = RutaColorConstants.RUTA_DECLARATION

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_BASICSYMBOL_DEFINITION_COLOR = RutaColorConstants.RUTA_BASICSYMBOL;

-

-  public final static String EDITOR_BASICSYMBOL_DEFINITION_COLOR_BOLD = RutaColorConstants.RUTA_BASICSYMBOL

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_BASICSYMBOL_DEFINITION_COLOR_ITALIC = RutaColorConstants.RUTA_BASICSYMBOL

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_BASICSYMBOL_DEFINITION_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_BASICSYMBOL

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_BASICSYMBOL_DEFINITION_COLOR_UNDERLINE = RutaColorConstants.RUTA_BASICSYMBOL

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_DOC_COMMENT_COLOR = RutaColorConstants.RUTA_DOC_COMMENT;

-

-  public final static String EDITOR_DOC_COMMENT_COLOR_BOLD = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_DOC_COMMENT_COLOR_ITALIC = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_DOC_COMMENT_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_DOC_COMMENT_COLOR_UNDERLINE = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_VARIABLE_COLOR = RutaColorConstants.RUTA_DOC_COMMENT;

-

-  public final static String EDITOR_VARIABLE_COLOR_BOLD = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_BOLD_SUFFIX;

-

-  public final static String EDITOR_VARIABLE_COLOR_ITALIC = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_ITALIC_SUFFIX;

-

-  public final static String EDITOR_VARIABLE_COLOR_STRIKETHROUGH = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_STRIKETHROUGH_SUFFIX;

-

-  public final static String EDITOR_VARIABLE_COLOR_UNDERLINE = RutaColorConstants.RUTA_DOC_COMMENT

-          + EDITOR_UNDERLINE_SUFFIX;

-

-  public final static String EDITOR_SMART_PASTE_MODE = "smartPasteMode"; //$NON-NLS-1$

-

-  public final static int EDITOR_SMART_PASTE_MODE_SIMPLE = 1;

-

-  public final static int EDITOR_SMART_PASTE_MODE_FULL = 2;

-

-  public static final String DOC_RUTA_PAGES_LOCATIONS = "doc_ruta_pages_location";

-

-  public static final String COMMENT_TASK_TAGS = RutaColorConstants.RUTA_TODO_TAG;// RutaColorConstants

-

-  public static final String COMMENT_TASK_TAGS_BOLD = COMMENT_TASK_TAGS + EDITOR_BOLD_SUFFIX;

-

-  /**

-   * A preference that controls the selected formatter.

-   */

-  public static final String FORMATTER_ID = "formatterId"; //$NON-NLS-1$

-

-  public static void initializeDefaultValues(IPreferenceStore store) {

-    PreferenceConstants.initializeDefaultValues(store);

-

-    PreferenceConverter.setDefault(store, COMMENT_TASK_TAGS, new RGB(127, 159, 191));

-    store.setDefault(COMMENT_TASK_TAGS_BOLD, true);

-

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR,

-            new RGB(63, 127, 95));

-    store.setDefault(RutaPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD, false);

-    store.setDefault(RutaPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC, false);

-

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_DOC_COMMENT_COLOR,

-            new RGB(63, 127, 95));

-

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_STRING_COLOR, new RGB(42,

-            0, 255));

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_NUMBER_COLOR, new RGB(128,

-            0, 0));

-

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_VARIABLE_COLOR, new RGB(

-            200, 0, 0));

-

-    // Functions

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_FUNCTION_COLOR, new RGB(

-            50, 50, 200));

-    store.setDefault(RutaPreferenceConstants.EDITOR_FUNCTION_COLOR_BOLD, true);

-

-    // Conditions

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_CONDITION_COLOR, new RGB(

-            0, 128, 0));

-    store.setDefault(RutaPreferenceConstants.EDITOR_CONDITION_COLOR_BOLD, true);

-

-    // Actions

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_ACTION_COLOR, new RGB(0,

-            0, 128));

-    store.setDefault(RutaPreferenceConstants.EDITOR_ACTION_COLOR_BOLD, true);

-

-    // Then

-    PreferenceConverter.setDefault(store, RutaPreferenceConstants.EDITOR_THEN_COLOR, new RGB(0, 0,

-            0));

-    store.setDefault(RutaPreferenceConstants.EDITOR_THEN_COLOR_BOLD, true);

-

-    // Declarations

-    PreferenceConverter.setDefault(store,

-            RutaPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR, new RGB(128, 0, 0));

-    store.setDefault(RutaPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR_BOLD, true);

-

-    // basic tokens

-    PreferenceConverter.setDefault(store,

-            RutaPreferenceConstants.EDITOR_BASICSYMBOL_DEFINITION_COLOR, new RGB(128, 128, 128));

-    store.setDefault(RutaPreferenceConstants.EDITOR_BASICSYMBOL_DEFINITION_COLOR_BOLD, true);

-

-    store.setDefault(PreferenceConstants.EDITOR_CLOSE_STRINGS, false);

-    store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACKETS, true);

-    store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACES, true);

-    store.setDefault(PreferenceConstants.EDITOR_SMART_TAB, true);

-    store.setDefault(PreferenceConstants.EDITOR_SMART_PASTE, true);

-    store.setDefault(PreferenceConstants.EDITOR_SMART_HOME_END, true);

-    store.setDefault(PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, true);

-    store.setDefault(PreferenceConstants.EDITOR_TAB_WIDTH, 4);

-    store.setDefault(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, true);

-

-    // folding

-    store.setDefault(PreferenceConstants.EDITOR_FOLDING_ENABLED, true);

-    store.setDefault(PreferenceConstants.EDITOR_COMMENTS_FOLDING_ENABLED, true);

-    store.setDefault(RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_EXCLUDE);

-    store.setDefault(RutaPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST, "BLOCK");

-    store.setDefault(RutaPreferenceConstants.EDITOR_FOLDING_EXCLUDE_LIST, "");

-    store.setDefault(RutaPreferenceConstants.EDITOR_FOLDING_COMMENTS_WITH_NEWLINES, true);

-    store.setDefault(RutaPreferenceConstants.EDITOR_FOLDING_INIT_COMMENTS, true);

-    store.setDefault(PreferenceConstants.EDITOR_FOLDING_LINES_LIMIT, 5);

-

-    store.setDefault(CodeFormatterConstants.FORMATTER_TAB_CHAR, CodeFormatterConstants.SPACE);

-    store.setDefault(CodeFormatterConstants.FORMATTER_TAB_SIZE, "4");

-    store.setDefault(CodeFormatterConstants.FORMATTER_INDENTATION_SIZE, "4");

-

-    NewScriptProjectPreferencePage.initDefaults(store);

-

-    store.setDefault(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES, false);

-    store.setDefault(PreferenceConstants.APPEARANCE_METHOD_RETURNTYPE, false);

-    store.setDefault(PreferenceConstants.APPEARANCE_METHOD_TYPEPARAMETERS, true);

-    store.setDefault(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW, ""); //$NON-NLS-1$

-

-    store.setDefault(PreferenceConstants.SHOW_SOURCE_MODULE_CHILDREN, true);

-

-    store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS, ".");

-

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaProjectDecorator.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaProjectDecorator.java
deleted file mode 100644
index 442656e..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaProjectDecorator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.ui.AbstractScriptProjectDecorator;

-import org.eclipse.jface.resource.ImageDescriptor;

-

-public class RutaProjectDecorator extends AbstractScriptProjectDecorator {

-

-  /*

-   * @see org.eclipse.dltk.ui.AbstractScriptProjectDecorator#getNatureId()

-   */

-  @Override

-  protected String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.AbstractScriptProjectDecorator#getProjectDecorator()

-   */

-  @Override

-  protected ImageDescriptor getProjectDecorator() {

-    return RutaImages.PROJECT_DECARATOR;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaSemanticPositionUpdater.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaSemanticPositionUpdater.java
deleted file mode 100644
index 99ab421..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaSemanticPositionUpdater.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.ui.text.RutaTextTools;

-import org.eclipse.dltk.compiler.env.IModuleSource;

-import org.eclipse.dltk.ui.editor.highlighting.ASTSemanticHighlighter;

-import org.eclipse.dltk.ui.editor.highlighting.ISemanticHighlightingRequestor;

-import org.eclipse.dltk.ui.editor.highlighting.SemanticHighlighting;

-

-public class RutaSemanticPositionUpdater extends ASTSemanticHighlighter {

-

-  private final ISemanticHighlightingExtension[] extensions;

-

-  private final ISemanticHighlightingRequestor[] requestors;

-

-  private static class SemanticPositionRequestorExtension implements ISemanticHighlightingRequestor {

-

-    private final ISemanticHighlightingRequestor requestor;

-

-    private final int offset;

-

-    /**

-     * @param requestor

-     * @param offset

-     */

-    public SemanticPositionRequestorExtension(ISemanticHighlightingRequestor requestor, int offset) {

-      this.offset = offset;

-      this.requestor = requestor;

-    }

-

-    public void addPosition(int start, int end, String highlightingKey) {

-      requestor.addPosition(start, end, highlightingKey);

-

-    }

-

-  }

-

-  public RutaSemanticPositionUpdater(ISemanticHighlightingExtension[] extensions) {

-    this.extensions = extensions;

-    this.requestors = new ISemanticHighlightingRequestor[extensions.length];

-    int offset = 0;

-    for (int i = 0; i < extensions.length; ++i) {

-      requestors[i] = new SemanticPositionRequestorExtension(this, offset);

-      offset += extensions[i].getHighlightings().length;

-    }

-  }

-

-  @Override

-  protected String getNature() {

-    return RutaNature.NATURE_ID;

-  }

-

-  public SemanticHighlighting[] getSemanticHighlightings() {

-    return new SemanticHighlighting[] {

-        new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR, null,

-                null),

-        new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_FUNCTION_COLOR, null, null),

-        new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_ACTION_COLOR, null, null),

-        new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_CONDITION_COLOR, null, null),

-        new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_STRING_COLOR, null, null),

-        new RutaTextTools.SH(RutaPreferenceConstants.EDITOR_VARIABLE_COLOR,

-                RutaPreferenceConstants.EDITOR_CONDITION_COLOR, null) };

-  }

-

-  @Override

-  protected boolean doHighlighting(IModuleSource code) throws Exception {

-    return false;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaUILanguageToolkit.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaUILanguageToolkit.java
deleted file mode 100644
index 4f46433..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaUILanguageToolkit.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaConstants;

-import org.apache.uima.ruta.ide.core.RutaLanguageToolkit;

-import org.apache.uima.ruta.ide.core.parser.RutaParseUtils;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.apache.uima.ruta.ide.ui.editor.RutaEditor;

-import org.apache.uima.ruta.ide.ui.text.SimpleRutaSourceViewerConfiguration;

-import org.eclipse.dltk.core.IDLTKLanguageToolkit;

-import org.eclipse.dltk.core.IField;

-import org.eclipse.dltk.core.IScriptFolder;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.ui.AbstractDLTKUILanguageToolkit;

-import org.eclipse.dltk.ui.IDLTKUILanguageToolkit;

-import org.eclipse.dltk.ui.ScriptElementLabels;

-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;

-import org.eclipse.dltk.ui.text.ScriptTextTools;

-import org.eclipse.dltk.ui.viewsupport.ScriptUILabelProvider;

-import org.eclipse.jface.dialogs.IDialogSettings;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaUILanguageToolkit extends AbstractDLTKUILanguageToolkit {

-

-  private static RutaUILanguageToolkit toolkit = null;

-

-  public static IDLTKUILanguageToolkit getInstance() {

-    if (toolkit == null) {

-      toolkit = new RutaUILanguageToolkit();

-    }

-    return toolkit;

-  }

-

-  private static ScriptElementLabels sInstance = new ScriptElementLabels() {

-    @Override

-    protected void getScriptFolderLabel(IScriptFolder folder, StringBuffer buf) {

-      String name = folder.getElementName();

-      name = name.replace(IScriptFolder.PACKAGE_DELIMITER, '.');

-      buf.append(name);

-    }

-

-    @Override

-    protected void getFieldLabel(IField field, long flags, StringBuffer buf) {

-      super.getFieldLabel(field, flags, buf);

-      int i = RutaParseUtils.getTypeOfIModelElement(field);

-      String type = RutaTypeConstants.typeStringOfInt.get(i);

-      if (type != null) {

-        type = type.toLowerCase();

-        buf.append(" : ");

-        buf.append(type);

-      }

-    }

-  };

-

-  @Override

-  public ScriptElementLabels getScriptElementLabels() {

-    return sInstance;

-  }

-

-  public IPreferenceStore getPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-

-  public IDLTKLanguageToolkit getCoreToolkit() {

-    return RutaLanguageToolkit.getDefault();

-  }

-

-  public IDialogSettings getDialogSettings() {

-    return RutaIdeUIPlugin.getDefault().getDialogSettings();

-  }

-

-  @Override

-  public String getPartitioningId() {

-    return RutaConstants.RUTA_PARTITIONING;

-  }

-

-  @Override

-  public String getEditorId(Object inputElement) {

-    return RutaEditor.EDITOR_ID;

-  }

-

-  @Override

-  public String getInterpreterContainerId() {

-    return "org.apache.uima.ruta.ide.launching.INTERPRETER_CONTAINER";

-  }

-

-  @Override

-  public ScriptUILabelProvider createScriptUILabelProvider() {

-    return null;

-  }

-

-  @Override

-  public boolean getProvideMembers(ISourceModule element) {

-    return true;

-  }

-

-  @Override

-  public ScriptTextTools getTextTools() {

-    return RutaIdeUIPlugin.getDefault().getTextTools();

-  }

-

-  @Override

-  public ScriptSourceViewerConfiguration createSourceViewerConfiguration() {

-    return new SimpleRutaSourceViewerConfiguration(getTextTools().getColorManager(),

-            getPreferenceStore(), null, getPartitioningId(), false);

-  }

-

-  private static final String INTERPRETERS_PREFERENCE_PAGE_ID = "org.apache.uima.ruta.ide.preferences.interpreters";

-

-  private static final String DEBUG_PREFERENCE_PAGE_ID = "org.apache.uima.ruta.ide.preferences.debug";

-

-  @Override

-  public String getInterpreterPreferencePage() {

-    return INTERPRETERS_PREFERENCE_PAGE_ID;

-  }

-

-  @Override

-  public String getDebugPreferencePage() {

-    return DEBUG_PREFERENCE_PAGE_ID;

-  }

-

-  private static final String[] EDITOR_PREFERENCE_PAGES_IDS = {

-      "org.apache.uima.ruta.ide.preferences.editor",

-      "org.apache.uima.ruta.ide.ui.editor.SyntaxColoring",

-      "org.apache.uima.ruta.ide.ui.editor.SmartTyping",

-      "org.apache.uima.ruta.ide.ui.editor.RutaFolding" };

-

-  @Override

-  public String[] getEditorPreferencePages() {

-    return EDITOR_PREFERENCE_PAGES_IDS;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaUIPreferenceInitializer.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaUIPreferenceInitializer.java
deleted file mode 100644
index 294d12e..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/RutaUIPreferenceInitializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.ui;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;

-import org.eclipse.dltk.compiler.util.Util;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.ui.editors.text.EditorsUI;

-

-public class RutaUIPreferenceInitializer extends AbstractPreferenceInitializer {

-  /*

-   * (non-Javadoc)

-   * 

-   * @see

-   * org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences

-   * ()

-   */

-  public void initializeDefaultPreferences() {

-    IPreferenceStore store = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-

-    EditorsUI.useAnnotationsPreferencePage(store);

-    EditorsUI.useQuickDiffPreferencePage(store);

-    RutaPreferenceConstants.initializeDefaultValues(store);

-    store.setDefault(RutaPreferenceConstants.FORMATTER_ID, Util.EMPTY_STRING);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/OpenRutaSearchPageAction.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/OpenRutaSearchPageAction.java
deleted file mode 100644
index 90bc9dd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/OpenRutaSearchPageAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * 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.ruta.ide.ui.actions;

-

-import org.eclipse.dltk.ui.DLTKUIPlugin;

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.search.ui.NewSearchUI;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.IWorkbenchWindow;

-import org.eclipse.ui.IWorkbenchWindowActionDelegate;

-

-public class OpenRutaSearchPageAction implements IWorkbenchWindowActionDelegate {

-

-  private static final String RUTA_SEARCH_PAGE_ID = "org.apache.uima.ruta.ide.ui.RutaSearchPage";

-

-  private IWorkbenchWindow window;

-

-  public OpenRutaSearchPageAction() {

-  }

-

-  public void init(IWorkbenchWindow window) {

-    this.window = window;

-  }

-

-  public void run(IAction action) {

-    if (window == null || window.getActivePage() == null) {

-      beep();

-      return;

-    }

-

-    NewSearchUI.openSearchDialog(window, RUTA_SEARCH_PAGE_ID);

-  }

-

-  public void selectionChanged(IAction action, ISelection selection) {

-  }

-

-  public void dispose() {

-    window = null;

-  }

-

-  protected void beep() {

-    Shell shell = DLTKUIPlugin.getActiveWorkbenchShell();

-    if (shell != null && shell.getDisplay() != null)

-      shell.getDisplay().beep();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaGenerateActionGroup.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaGenerateActionGroup.java
deleted file mode 100644
index 8410a71..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaGenerateActionGroup.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.ide.ui.actions;
-
-import org.apache.uima.ruta.ide.ui.editor.RutaEditor;
-import org.eclipse.dltk.internal.ui.editor.DLTKEditorMessages;
-import org.eclipse.dltk.ui.actions.DLTKActionConstants;
-import org.eclipse.dltk.ui.actions.GenerateActionGroup;
-import org.eclipse.dltk.ui.actions.IScriptEditorActionDefinitionIds;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.ui.texteditor.TextOperationAction;
-
-public class RutaGenerateActionGroup extends GenerateActionGroup {
-  public RutaGenerateActionGroup(RutaEditor editor, String groupName) {
-    super(editor, groupName);
-    Action action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),
-            "Format.", editor, ISourceViewer.FORMAT); //$NON-NLS-1$
-    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.FORMAT);
-    editor.setAction(DLTKActionConstants.FORMAT, action);
-    editor.markAsStateDependentAction(DLTKActionConstants.FORMAT, true);
-    editor.markAsSelectionDependentAction(DLTKActionConstants.FORMAT, true);
-  }
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaOpenTypeAction.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaOpenTypeAction.java
deleted file mode 100644
index d1e6971..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaOpenTypeAction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * 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.ruta.ide.ui.actions;

-

-import org.apache.uima.ruta.ide.ui.RutaUILanguageToolkit;

-import org.eclipse.dltk.ui.IDLTKUILanguageToolkit;

-import org.eclipse.dltk.ui.actions.OpenTypeAction;

-

-public class RutaOpenTypeAction extends OpenTypeAction {

-  @Override

-  protected IDLTKUILanguageToolkit getUILanguageToolkit() {

-    return RutaUILanguageToolkit.getInstance();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaOpenTypeInHierarchyAction.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaOpenTypeInHierarchyAction.java
deleted file mode 100644
index 043a5dc..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaOpenTypeInHierarchyAction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * 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.ruta.ide.ui.actions;

-

-import org.apache.uima.ruta.ide.ui.RutaUILanguageToolkit;

-import org.eclipse.dltk.ui.IDLTKUILanguageToolkit;

-import org.eclipse.dltk.ui.actions.OpenTypeInHierarchyAction;

-

-public class RutaOpenTypeInHierarchyAction extends OpenTypeInHierarchyAction {

-  @Override

-  protected IDLTKUILanguageToolkit getLanguageToolkit() {

-    return RutaUILanguageToolkit.getInstance();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaSelectAnnotationRulerAction.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaSelectAnnotationRulerAction.java
deleted file mode 100644
index 42c6274..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaSelectAnnotationRulerAction.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*

- * 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.ruta.ide.ui.actions;

-

-import java.util.Iterator;

-import java.util.ResourceBundle;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.text.RutaCorrectionProcessor;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.ITextOperationTarget;

-import org.eclipse.jface.text.Position;

-import org.eclipse.jface.text.source.Annotation;

-import org.eclipse.jface.text.source.IAnnotationAccessExtension;

-import org.eclipse.jface.text.source.ISourceViewer;

-import org.eclipse.jface.text.source.IVerticalRulerInfo;

-import org.eclipse.swt.widgets.Event;

-import org.eclipse.ui.editors.text.EditorsUI;

-import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;

-import org.eclipse.ui.texteditor.AnnotationPreference;

-import org.eclipse.ui.texteditor.AnnotationPreferenceLookup;

-import org.eclipse.ui.texteditor.ITextEditor;

-import org.eclipse.ui.texteditor.ITextEditorExtension;

-import org.eclipse.ui.texteditor.SelectMarkerRulerAction;

-

-public class RutaSelectAnnotationRulerAction extends SelectMarkerRulerAction {

-

-  private ITextEditor fTextEditor;

-

-  private Position fPosition;

-

-  private Annotation fAnnotation;

-

-  private AnnotationPreferenceLookup fAnnotationPreferenceLookup;

-

-  private IPreferenceStore fStore;

-

-  private boolean fHasCorrection;

-

-  private ResourceBundle fBundle;

-

-  public RutaSelectAnnotationRulerAction(ResourceBundle bundle, String prefix, ITextEditor editor,

-          IVerticalRulerInfo ruler) {

-    super(bundle, prefix, editor, ruler);

-    fBundle = bundle;

-    fTextEditor = editor;

-

-    fAnnotationPreferenceLookup = EditorsUI.getAnnotationPreferenceLookup();

-    fStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-

-    // PlatformUI.getWorkbench().getHelpSystem().setHelp(this,

-    // IJavaHelpContextIds.JAVA_SELECT_MARKER_RULER_ACTION);

-  }

-

-  @Override

-  public void run() {

-    if (fStore.getBoolean(PreferenceConstants.EDITOR_ANNOTATION_ROLL_OVER))

-      return;

-

-    runWithEvent(null);

-  }

-

-  /*

-   * @see org.eclipse.jface.action.IAction#runWithEvent(org.eclipse.swt.widgets.Event)

-   * 

-   * @since 3.2

-   */

-  @Override

-  public void runWithEvent(Event event) {

-    // if (fAnnotation instanceof

-    // OverrideIndicatorManager.OverrideIndicator) {

-    // ((OverrideIndicatorManager.OverrideIndicator)fAnnotation).open();

-    // return;

-    // }

-

-    if (fHasCorrection) {

-      ITextOperationTarget operation = (ITextOperationTarget) fTextEditor

-              .getAdapter(ITextOperationTarget.class);

-      final int opCode = ISourceViewer.QUICK_ASSIST;

-      if (operation != null && operation.canDoOperation(opCode)) {

-        fTextEditor.selectAndReveal(fPosition.getOffset(), fPosition.getLength());

-        operation.doOperation(opCode);

-      }

-      return;

-    }

-

-    super.run();

-  }

-

-  @Override

-  public void update() {

-    findJavaAnnotation();

-    setEnabled(true); // super.update() might change this later

-

-    // if (fAnnotation instanceof

-    // OverrideIndicatorManager.OverrideIndicator) {

-    // initialize(fBundle,

-    // "JavaSelectAnnotationRulerAction.OpenSuperImplementation.");

-    // //$NON-NLS-1$

-    // return;

-    // }

-    if (fHasCorrection) {

-      // if (fAnnotation instanceof AssistAnnotation)

-      // initialize(fBundle,

-      // "JavaSelectAnnotationRulerAction.QuickAssist."); //$NON-NLS-1$

-      // else

-      initialize(fBundle, "JavaSelectAnnotationRulerAction.QuickFix."); //$NON-NLS-1$

-      return;

-    }

-

-    initialize(fBundle, "JavaSelectAnnotationRulerAction.GotoAnnotation."); //$NON-NLS-1$;

-    super.update();

-  }

-

-  private void findJavaAnnotation() {

-    fPosition = null;

-    fAnnotation = null;

-    fHasCorrection = false;

-

-    AbstractMarkerAnnotationModel model = getAnnotationModel();

-    IAnnotationAccessExtension annotationAccess = getAnnotationAccessExtension();

-

-    IDocument document = getDocument();

-    if (model == null)

-      return;

-

-    boolean hasAssistLightbulb = false;

-    // fStore.getBoolean(RutaPreferenceConstants.EDITOR_QUICKASSIST_LIGHTBULB);

-

-    Iterator iter = model.getAnnotationIterator();

-    int layer = Integer.MIN_VALUE;

-

-    while (iter.hasNext()) {

-      Annotation annotation = (Annotation) iter.next();

-      if (annotation.isMarkedDeleted())

-        continue;

-

-      int annotationLayer = layer;

-      if (annotationAccess != null) {

-        annotationLayer = annotationAccess.getLayer(annotation);

-        if (annotationLayer < layer)

-          continue;

-      }

-

-      Position position = model.getPosition(annotation);

-      if (!includesRulerLine(position, document))

-        continue;

-

-      boolean isReadOnly = fTextEditor instanceof ITextEditorExtension

-              && ((ITextEditorExtension) fTextEditor).isEditorInputReadOnly();

-      if (!isReadOnly && ((RutaCorrectionProcessor.hasCorrections(annotation)))) {

-        fPosition = position;

-        fAnnotation = annotation;

-        fHasCorrection = true;

-        layer = annotationLayer;

-        continue;

-      } else {

-        AnnotationPreference preference = fAnnotationPreferenceLookup

-                .getAnnotationPreference(annotation);

-        if (preference == null)

-          continue;

-

-        String key = preference.getVerticalRulerPreferenceKey();

-        if (key == null)

-          continue;

-

-        if (fStore.getBoolean(key)) {

-          fPosition = position;

-          fAnnotation = annotation;

-          fHasCorrection = false;

-          layer = annotationLayer;

-        }

-      }

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaSelectRulerAction.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaSelectRulerAction.java
deleted file mode 100644
index 7aaa510..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/actions/RutaSelectRulerAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*

- * 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.ruta.ide.ui.actions;

-

-import org.eclipse.dltk.internal.ui.editor.DLTKEditorMessages;

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.text.source.IVerticalRulerInfo;

-import org.eclipse.ui.texteditor.AbstractRulerActionDelegate;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class RutaSelectRulerAction extends AbstractRulerActionDelegate {

-

-  @Override

-  protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {

-    return new RutaSelectAnnotationRulerAction(DLTKEditorMessages.getBundleForConstructedKeys(),

-            "SelectAnnotationRulerAction.", editor, rulerInfo); //$NON-NLS-1$

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/ConsoleMessages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/ConsoleMessages.java
deleted file mode 100644
index c21b54f..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/ConsoleMessages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import org.eclipse.osgi.util.NLS;

-

-public class ConsoleMessages extends NLS {

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.debug.ui.console.ConsoleMessages";

-

-  public static String RutaFileHyperlink_Information_1;

-

-  public static String RutaFileHyperlink_Error;

-

-  public static String ScriptStackTraceConsoleFactory_0;

-

-  public static String ScriptStackTraceConsole_0;

-

-  public static String RutaFileHyperlink_Source_not_found_for__0__2;

-

-  public static String RutaFileHyperlink_An_exception_occurred_while_following_link__3;

-

-  public static String RutaFileHyperlink_Unable_to_parse_type_name_from_hyperlink__5;

-

-  public static String RutaFileHyperlink_Unable_to_parse_line_number_from_hyperlink__6;

-

-  public static String RutaFileHyperlink_Unable_to_parse_line_number_from_hyperlink__7;

-

-  public static String RutaFileHyperlink_Unable_to_retrieve_hyperlink_text__8;

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, ConsoleMessages.class);

-  }

-

-  public static String RutaFileHyperlink_0;

-

-  public static String RutaFileHyperlink_1;

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/PasteRutaTextToConsoleAction.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/PasteRutaTextToConsoleAction.java
deleted file mode 100644
index 811d298..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/PasteRutaTextToConsoleAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import org.eclipse.dltk.console.ui.IScriptConsole;

-import org.eclipse.dltk.console.ui.ScriptConsoleManager;

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.ITextSelection;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.ui.IEditorActionDelegate;

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.texteditor.IDocumentProvider;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class PasteRutaTextToConsoleAction implements IEditorActionDelegate {

-

-  private ISelection selection;

-

-  private IEditorPart targetEditor;

-

-  protected IDocument getDocument() {

-    if (!(targetEditor instanceof ITextEditor))

-      return null;

-

-    ITextEditor editor = (ITextEditor) targetEditor;

-    IDocumentProvider dp = editor.getDocumentProvider();

-    return dp.getDocument(editor.getEditorInput());

-  }

-

-  public void setActiveEditor(IAction action, IEditorPart targetEditor) {

-    this.targetEditor = targetEditor;

-  }

-

-  public void run(IAction action) {

-    ScriptConsoleManager manager = ScriptConsoleManager.getInstance();

-

-    IScriptConsole console = manager.getActiveScriptConsole(RutaConsole.CONSOLE_TYPE);

-

-    if (console == null) {

-      return;

-    }

-

-    if (selection instanceof ITextSelection) {

-      String text = ((ITextSelection) selection).getText();

-      console.insertText(text);

-    }

-  }

-

-  public void selectionChanged(IAction action, ISelection selection) {

-    this.selection = selection;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/PasteRutaToConsole.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/PasteRutaToConsole.java
deleted file mode 100644
index 1f6b04d..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/PasteRutaToConsole.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.ui.IObjectActionDelegate;

-import org.eclipse.ui.IWorkbenchPart;

-

-public class PasteRutaToConsole implements IObjectActionDelegate {

-

-  private ISelection selection;

-

-  public void setActivePart(IAction action, IWorkbenchPart targetPart) {

-

-  }

-

-  public void run(IAction action) {

-    // TODO: implement

-  }

-

-  public void selectionChanged(IAction action, ISelection selection) {

-    this.selection = selection;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsole.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsole.java
deleted file mode 100644
index a740814..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsole.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import org.eclipse.dltk.console.ui.ScriptConsole;

-

-public class RutaConsole extends ScriptConsole {

-  public static final String CONSOLE_TYPE = "ruta_console";

-

-  public static final String CONSOLE_NAME = "Ruta Console";

-

-  public RutaConsole(RutaInterpreter interpreter, String id) {

-    super(CONSOLE_NAME + " [" + id + "]", CONSOLE_TYPE);

-

-    setInterpreter(interpreter);

-    setTextHover(new RutaConsoleTextHover(interpreter));

-    setContentAssistProcessor(new RutaConsoleCompletionProcessor(interpreter));

-

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleCompletionProcessor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleCompletionProcessor.java
deleted file mode 100644
index 7fbcc16..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleCompletionProcessor.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import java.io.IOException;

-import java.util.List;

-

-import org.eclipse.dltk.console.IScriptConsoleShell;

-import org.eclipse.dltk.console.ScriptConsoleCompletionProposal;

-import org.eclipse.dltk.console.ui.IScriptConsoleViewer;

-import org.eclipse.dltk.console.ui.ScriptConsoleCompletionProcessor;

-import org.eclipse.dltk.ui.DLTKPluginImages;

-import org.eclipse.jface.text.ITextViewer;

-import org.eclipse.jface.text.TextPresentation;

-import org.eclipse.jface.text.contentassist.ICompletionProposal;

-import org.eclipse.jface.text.contentassist.IContextInformation;

-import org.eclipse.jface.text.contentassist.IContextInformationPresenter;

-import org.eclipse.jface.text.contentassist.IContextInformationValidator;

-import org.eclipse.swt.graphics.Image;

-

-public class RutaConsoleCompletionProcessor extends ScriptConsoleCompletionProcessor {

-

-  protected static class Validator implements IContextInformationValidator,

-          IContextInformationPresenter {

-

-    protected int installOffset;

-

-    public boolean isContextInformationValid(int offset) {

-      return Math.abs(installOffset - offset) < 5;

-    }

-

-    public void install(IContextInformation info, ITextViewer viewer, int offset) {

-      installOffset = offset;

-    }

-

-    public boolean updatePresentation(int documentPosition, TextPresentation presentation) {

-      return false;

-    }

-  }

-

-  protected IProposalDecorator tmDecorator = new IProposalDecorator() {

-    public String formatProposal(ScriptConsoleCompletionProposal c) {

-      return c.getDisplay();

-    }

-

-    public Image getImage(ScriptConsoleCompletionProposal c) {

-      String type = c.getType();

-      if (type.equals("var")) {

-        return DLTKPluginImages.get(DLTKPluginImages.IMG_OBJS_LOCAL_VARIABLE);

-      } else if (type.equals("proc")) {

-        return DLTKPluginImages.get(DLTKPluginImages.IMG_METHOD_PUBLIC);

-      } else if (type.equals("command")) {

-        return DLTKPluginImages.get(DLTKPluginImages.IMG_METHOD_PRIVATE);

-      } else if (type.equals("func")) {

-        return DLTKPluginImages.get(DLTKPluginImages.IMG_OBJS_FIELD);

-      }

-

-      return null;

-    }

-  };

-

-  private IContextInformationValidator validator;

-

-  public RutaConsoleCompletionProcessor(IScriptConsoleShell interpreterShell) {

-    super(interpreterShell);

-  }

-

-  @Override

-  public char[] getCompletionProposalAutoActivationCharacters() {

-    return new char[] { '$' };

-  }

-

-  @Override

-  protected ICompletionProposal[] computeCompletionProposalsImpl(IScriptConsoleViewer viewer,

-          int offset) {

-

-    try {

-      String commandLine = viewer.getCommandLine();

-      int cursorPosition = offset - viewer.getCommandLineOffset();

-

-      List list = getInterpreterShell().getCompletions(commandLine, cursorPosition);

-

-      List proposals = createProposalsFromString(list, offset, tmDecorator);

-

-      return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);

-    } catch (IOException e) {

-      e.printStackTrace();

-    }

-

-    return new ICompletionProposal[] {};

-  }

-

-  @Override

-  protected IContextInformation[] computeContextInformationImpl(ITextViewer viewer, int offset) {

-    return null;

-  }

-

-  public IContextInformationValidator getContextInformationValidator() {

-    if (validator == null) {

-      validator = new Validator();

-    }

-

-    return validator;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleConstants.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleConstants.java
deleted file mode 100644
index aa40232..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleConstants.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-public final class RutaConsoleConstants {

-  private RutaConsoleConstants() {

-  }

-

-  public static final String PREF_NEW_PROMPT = "tmconsole.new_invitation";

-

-  public static final String PREF_CONTINUE_PROMPT = "tmconsole.continue_invitation";

-

-  public static final String DEFAULT_NEW_PROMPT = "=>";

-

-  public static final String DEFAULT_CONTINUE_PROMPT = "->";

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleFactory.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleFactory.java
deleted file mode 100644
index dd07ff3..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleFactory.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.debug.core.ILaunch;

-import org.eclipse.dltk.console.IScriptInterpreter;

-import org.eclipse.dltk.console.ScriptConsolePrompt;

-import org.eclipse.dltk.console.ui.IScriptConsole;

-import org.eclipse.dltk.console.ui.IScriptConsoleFactory;

-import org.eclipse.dltk.console.ui.ScriptConsole;

-import org.eclipse.dltk.console.ui.ScriptConsoleFactoryBase;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaConsoleFactory extends ScriptConsoleFactoryBase implements IScriptConsoleFactory {

-  protected IPreferenceStore getPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-

-  protected ScriptConsolePrompt makeInvitation() {

-    IPreferenceStore store = getPreferenceStore();

-    return new ScriptConsolePrompt(store.getString(RutaConsoleConstants.PREF_NEW_PROMPT),

-            store.getString(RutaConsoleConstants.PREF_CONTINUE_PROMPT));

-  }

-

-  protected RutaConsole makeConsole(RutaInterpreter interpreter, String id) {

-    RutaConsole console = new RutaConsole(interpreter, id);

-    console.setPrompt(makeInvitation());

-    return console;

-  }

-

-  private RutaConsole createConsoleInstance(IScriptInterpreter interpreter, String id) {

-    if (interpreter == null) {

-      try {

-        id = "default";

-        interpreter = new RutaInterpreter();

-        // RutaConsoleUtil.runDefaultRutaInterpreter((RutaInterpreter)

-        // interpreter);

-      } catch (Exception e) {

-        return null;

-      }

-    }

-

-    return makeConsole((RutaInterpreter) interpreter, id);

-  }

-

-  @Override

-  protected ScriptConsole createConsoleInstance() {

-    return createConsoleInstance(null, null);

-  }

-

-  public RutaConsoleFactory() {

-    super();

-  }

-

-  public void openConsole(IScriptInterpreter interpreter, String id) {

-    registerAndOpenConsole(createConsoleInstance(interpreter, id));

-  }

-

-  public IScriptConsole openConsole(IScriptInterpreter interpreter, String id, ILaunch launch) {

-    RutaConsole tmConsole = createConsoleInstance(interpreter, id);

-    tmConsole.setLaunch(launch);

-    registerAndOpenConsole(tmConsole);

-    return tmConsole;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleTextHover.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleTextHover.java
deleted file mode 100644
index 3c1c5b5..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleTextHover.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import java.io.IOException;

-

-import org.eclipse.dltk.console.IScriptConsoleShell;

-import org.eclipse.dltk.console.ui.IScriptConsoleViewer;

-import org.eclipse.dltk.console.ui.ScriptConsoleTextHover;

-import org.eclipse.jface.text.IRegion;

-

-public class RutaConsoleTextHover extends ScriptConsoleTextHover {

-

-  private IScriptConsoleShell interpreterShell;

-

-  public RutaConsoleTextHover(IScriptConsoleShell interpreterShell) {

-    this.interpreterShell = interpreterShell;

-  }

-

-  @Override

-  protected String getHoverInfoImpl(IScriptConsoleViewer viewer, IRegion hoverRegion) {

-    try {

-      int cursorPosition = hoverRegion.getOffset() - viewer.getCommandLineOffset();

-

-      String commandLine = viewer.getCommandLine();

-

-      return interpreterShell.getDescription(commandLine, cursorPosition);

-    } catch (IOException e) {

-      // TODO: log exception

-      e.printStackTrace();

-      return null;

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleTracker.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleTracker.java
deleted file mode 100644
index 370bfdf..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleTracker.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.ui.console.IHyperlink;

-import org.eclipse.ui.console.IPatternMatchListenerDelegate;

-import org.eclipse.ui.console.PatternMatchEvent;

-import org.eclipse.ui.console.TextConsole;

-

-public class RutaConsoleTracker implements IPatternMatchListenerDelegate {

-  private TextConsole console;

-

-  public void connect(TextConsole console) {

-    this.console = console;

-  }

-

-  public void disconnect() {

-    console = null;

-  }

-

-  protected TextConsole getConsole() {

-    return console;

-  }

-

-  public void matchFound(PatternMatchEvent event) {

-    try {

-      int offset = event.getOffset();

-      int length = event.getLength();

-      IHyperlink link = new RutaFileHyperlink(console);

-      console.addHyperlink(link, offset + 1, length - 2);

-    } catch (BadLocationException e) {

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleUtil.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleUtil.java
deleted file mode 100644
index a4a507d..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaConsoleUtil.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import java.io.IOException;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.dltk.console.ScriptConsoleServer;

-import org.eclipse.dltk.core.environment.EnvironmentManager;

-import org.eclipse.dltk.core.environment.IExecutionEnvironment;

-import org.eclipse.dltk.core.environment.IFileHandle;

-import org.eclipse.dltk.launching.ScriptLaunchUtil;

-

-public class RutaConsoleUtil {

-

-  public static void runDefaultRutaInterpreter(RutaInterpreter interpreter) throws CoreException,

-          IOException {

-    ScriptConsoleServer server = ScriptConsoleServer.getInstance();

-

-    String id = server.register(interpreter);

-    String port = Integer.toString(server.getPort());

-

-    String[] args = new String[] { "127.0.0.1", port, id };

-

-    IExecutionEnvironment exeEnv = (IExecutionEnvironment) EnvironmentManager.getLocalEnvironment()

-            .getAdapter(IExecutionEnvironment.class);

-    IFileHandle scriptFile = RutaIdeUIPlugin.getDefault().getConsoleProxy(exeEnv);

-    ScriptLaunchUtil.runScript(RutaNature.NATURE_ID, scriptFile, null, null, args, null);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaFileHyperlink.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaFileHyperlink.java
deleted file mode 100644
index fdaae88..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaFileHyperlink.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import java.text.MessageFormat;

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.dltk.debug.ui.DLTKDebugUIPlugin;

-import org.eclipse.dltk.internal.ui.editor.EditorUtility;

-import org.eclipse.jface.dialogs.ErrorDialog;

-import org.eclipse.jface.dialogs.MessageDialog;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.IRegion;

-import org.eclipse.ui.IEditorDescriptor;

-import org.eclipse.ui.IEditorInput;

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.console.IHyperlink;

-import org.eclipse.ui.console.TextConsole;

-import org.eclipse.ui.ide.IDE;

-import org.eclipse.ui.texteditor.IDocumentProvider;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-/**

- * A hyperlink from a stack trace line of the form "(file "*.*")"

- */

-public class RutaFileHyperlink implements IHyperlink {

-

-  private TextConsole fConsole;

-

-  public RutaFileHyperlink(TextConsole console) {

-    fConsole = console;

-  }

-

-  public void linkEntered() {

-  }

-

-  public void linkExited() {

-  }

-

-  public void linkActivated() {

-    try {

-      String fileName;

-      int lineNumber;

-      try {

-        String linkText = getLinkText();

-        fileName = getFileName(linkText);

-        lineNumber = getLineNumber(linkText);

-      } catch (CoreException e1) {

-        ErrorDialog.openError(DLTKDebugUIPlugin.getActiveWorkbenchShell(),

-                ConsoleMessages.RutaFileHyperlink_Error, ConsoleMessages.RutaFileHyperlink_Error,

-                e1.getStatus());

-        return;

-      }

-

-      // documents start at 0

-      if (lineNumber > 0) {

-        lineNumber--;

-      }

-      Object sourceElement = getSourceModule(fileName);

-      if (sourceElement != null) {

-        IEditorPart part = EditorUtility.openInEditor(sourceElement);

-        IEditorPart editorPart = EditorUtility.openInEditor(sourceElement);

-        if (editorPart instanceof ITextEditor && lineNumber >= 0) {

-          ITextEditor textEditor = (ITextEditor) editorPart;

-          IDocumentProvider provider = textEditor.getDocumentProvider();

-          IEditorInput input = part.getEditorInput();

-          provider.connect(input);

-          IDocument document = provider.getDocument(input);

-          try {

-            IRegion line = document.getLineInformation(lineNumber);

-            textEditor.selectAndReveal(line.getOffset(), line.getLength());

-          } catch (BadLocationException e) {

-

-          }

-          provider.disconnect(input);

-        }

-        return;

-      }

-      // did not find source

-      MessageDialog.openInformation(DLTKDebugUIPlugin.getActiveWorkbenchShell(),

-              ConsoleMessages.RutaFileHyperlink_Information_1, MessageFormat.format(

-                      ConsoleMessages.RutaFileHyperlink_Source_not_found_for__0__2,

-                      new String[] { fileName }));

-    } catch (CoreException e) {

-      DLTKDebugUIPlugin.errorDialog(

-              ConsoleMessages.RutaFileHyperlink_An_exception_occurred_while_following_link__3, e);

-      return;

-    }

-  }

-

-  public String getEditorId(IEditorInput input, Object inputObject) {

-    try {

-      IEditorDescriptor descriptor = IDE.getEditorDescriptor(input.getName());

-      return descriptor.getId();

-    } catch (PartInitException e) {

-      return null;

-    }

-  }

-

-  public IEditorInput getEditorInput(Object item) {

-    try {

-      return EditorUtility.getEditorInput(item);

-    } catch (CoreException e) {

-      DLTKDebugUIPlugin.log(e);

-      return null;

-    }

-  }

-

-  protected Object getSourceModule(String fileName) {

-    IFile f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(fileName));

-    return f;

-  }

-

-  /**

-   * Returns the fully qualified name of the type to open

-   * 

-   * @return fully qualified type name

-   * @exception CoreException

-   *              if unable to parse the type name

-   */

-  protected String getFileName(String linkText) throws CoreException {

-    Pattern p = Pattern.compile("\\(file \"(.*)\"");

-    Matcher m = p.matcher(linkText);

-    if (m.find()) {

-      String name = m.group(1);

-      return name;

-    }

-    IStatus status = new Status(IStatus.ERROR, DLTKDebugUIPlugin.getUniqueIdentifier(), 0,

-            ConsoleMessages.RutaFileHyperlink_Unable_to_parse_type_name_from_hyperlink__5, null);

-    throw new CoreException(status);

-  }

-

-  /**

-   * Returns the line number associated with the stack trace or -1 if none.

-   * 

-   * @exception CoreException

-   *              if unable to parse the number

-   */

-  protected int getLineNumber(String linkText) throws CoreException {

-    Pattern p = Pattern.compile("line (\\d*)");

-    Matcher m = p.matcher(linkText);

-    if (m.find()) {

-      String lineText = m.group(1);

-      try {

-        return Integer.parseInt(lineText);

-      } catch (NumberFormatException e) {

-        IStatus status = new Status(IStatus.ERROR, DLTKDebugUIPlugin.getUniqueIdentifier(), 0,

-                ConsoleMessages.RutaFileHyperlink_Unable_to_parse_line_number_from_hyperlink__6, e);

-        throw new CoreException(status);

-      }

-    }

-    IStatus status = new Status(IStatus.ERROR, DLTKDebugUIPlugin.getUniqueIdentifier(), 0,

-            ConsoleMessages.RutaFileHyperlink_Unable_to_parse_line_number_from_hyperlink__7, null);

-    throw new CoreException(status);

-  }

-

-  /**

-   * Returns the console this link is contained in.

-   * 

-   * @return console

-   */

-  protected TextConsole getConsole() {

-    return fConsole;

-  }

-

-  /**

-   * Returns this link's text

-   * 

-   * @exception CoreException

-   *              if unable to retrieve the text

-   */

-  protected String getLinkText() throws CoreException {

-    try {

-      IDocument document = getConsole().getDocument();

-      IRegion region = getConsole().getRegion(this);

-      int regionOffset = region.getOffset();

-

-      int lineNumber = document.getLineOfOffset(regionOffset);

-      IRegion lineInformation = document.getLineInformation(lineNumber);

-      int lineOffset = lineInformation.getOffset();

-      String line = document.get(lineOffset, lineInformation.getLength());

-

-      int regionOffsetInLine = regionOffset - lineOffset;

-

-      int linkEnd = line.indexOf(')', regionOffsetInLine);

-      int linkStart = line.lastIndexOf(' ', regionOffsetInLine);

-

-      return line.substring(linkStart == -1 ? 0 : linkStart + 1, linkEnd + 1);

-    } catch (BadLocationException e) {

-      IStatus status = new Status(IStatus.ERROR, DLTKDebugUIPlugin.getUniqueIdentifier(), 0,

-              ConsoleMessages.RutaFileHyperlink_Unable_to_retrieve_hyperlink_text__8, e);

-      throw new CoreException(status);

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaInterpreter.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaInterpreter.java
deleted file mode 100644
index 51a2fee..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/RutaInterpreter.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.List;

-

-import org.eclipse.dltk.console.ConsoleRequest;

-import org.eclipse.dltk.console.IScriptConsoleIO;

-import org.eclipse.dltk.console.IScriptExecResult;

-import org.eclipse.dltk.console.IScriptInterpreter;

-import org.eclipse.dltk.console.InterpreterResponse;

-import org.eclipse.dltk.console.ScriptExecResult;

-import org.eclipse.dltk.console.ShellResponse;

-

-public class RutaInterpreter implements IScriptInterpreter, ConsoleRequest {

-

-  private static final String COMPLETE_COMMAND = "complete";

-

-  private static final String DESCRIBE_COMMAND = "describe";

-

-  private static final String CLOSE_COMMAND = "close";

-

-  private IScriptConsoleIO protocol;

-

-  private String content;

-

-  private int state;

-

-  public IScriptExecResult exec(String command) throws IOException {

-    InterpreterResponse response = protocol.execInterpreter(command);

-    state = response.getState();

-    return new ScriptExecResult(response.getContent());

-  }

-

-  public String getOutput() {

-    return content;

-  }

-

-  public int getState() {

-    return state;

-  }

-

-  // IScriptInterpreterShell

-  public List getCompletions(String commandLine, int position) throws IOException {

-

-    String[] args = new String[] { commandLine, Integer.toString(position) };

-

-    ShellResponse response = protocol.execShell(COMPLETE_COMMAND, args);

-

-    return response.getCompletions();

-  }

-

-  public String getDescription(String commandLine, int position) throws IOException {

-    String[] args = new String[] { commandLine, Integer.toString(position) };

-

-    ShellResponse response = protocol.execShell(DESCRIBE_COMMAND, args);

-

-    return response.getDescription();

-  }

-

-  public String[] getNames(String type) throws IOException {

-    return null;

-  }

-

-  public void close() throws IOException {

-    protocol.execShell(CLOSE_COMMAND, new String[] {});

-    protocol.close();

-  }

-

-  // IScriptConsoleProtocol

-  public void consoleConnected(IScriptConsoleIO protocol) {

-    this.protocol = protocol;

-  }

-

-  public String getInitialOuput() {

-    return null;

-  }

-

-  public void addInitialListenerOperation(Runnable runnable) {

-

-  }

-

-  public InputStream getInitialOutputStream() {

-    return null;

-  }

-

-  public boolean isValid() {

-    return protocol != null;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/ShowFunctionsAction.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/ShowFunctionsAction.java
deleted file mode 100644
index 85bb7fe..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/console/ShowFunctionsAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta.ide.ui.console;

-

-import org.eclipse.debug.core.DebugException;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.debug.core.model.IScriptValue;

-import org.eclipse.dltk.debug.core.model.IScriptVariable;

-import org.eclipse.dltk.debug.ui.actions.ViewFilterAction;

-import org.eclipse.jface.viewers.Viewer;

-

-/**

- * Shows non-final static variables

- */

-public class ShowFunctionsAction extends ViewFilterAction {

-

-  public ShowFunctionsAction() {

-    super();

-  }

-

-  @Override

-  protected String getPreferenceKey() {

-    return "show_functions";

-  }

-

-  @Override

-  public boolean select(Viewer viewer, Object parentElement, Object element) {

-    if (element instanceof IScriptVariable) {

-      IScriptVariable variable = (IScriptVariable) element;

-      try {

-        return !((IScriptValue) variable.getValue()).getType().getName().equals("function");

-      } catch (DebugException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      }

-    }

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/AbstractLanguageElementDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/AbstractLanguageElementDocumentationProvider.java
deleted file mode 100644
index be8714e..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/AbstractLanguageElementDocumentationProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.io.BufferedReader;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.InputStreamReader;

-import java.io.Reader;

-import java.io.StringReader;

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.core.IMember;

-import org.eclipse.dltk.ui.documentation.IScriptDocumentationProvider;

-import org.htmlparser.Parser;

-import org.htmlparser.util.NodeList;

-

-public abstract class AbstractLanguageElementDocumentationProvider implements

-        IScriptDocumentationProvider {

-

-  protected Map<String, String> map;

-

-  public AbstractLanguageElementDocumentationProvider(String file) {

-    super();

-    map = new HashMap<String, String>();

-    if (file != null) {

-      try {

-        fillMap(file);

-      } catch (IOException e) {

-      }

-    }

-  }

-

-  public Reader getInfo(String content) {

-    String string = map.get(content);

-    if (string == null) {

-      return null;

-    }

-    return new StringReader(string);

-  }

-

-  public Reader getInfo(IMember element, boolean lookIntoParents, boolean lookIntoExternal) {

-    return null;

-  }

-

-  private void fillMap(String documentationFile) throws IOException {

-    InputStream resourceAsStream = getClass().getResourceAsStream(documentationFile);

-    try {

-      BufferedReader reader = new BufferedReader(new InputStreamReader(resourceAsStream));

-      StringBuilder sb = new StringBuilder();

-      while (true) {

-        String line;

-        line = reader.readLine();

-        if (line == null) {

-          break;

-        }

-        sb.append(line + "\n");

-      }

-

-      String document = sb.toString();

-

-      Parser parser = new Parser(document);

-      NodeList list = parser.parse(null);

-      HtmlDocumentationVisitor visitor = new HtmlDocumentationVisitor(document);

-      list.visitAllNodesWith(visitor);

-      map.putAll(visitor.getMap());

-    } catch (Exception e) {

-      RutaIdeUIPlugin.error(e);

-    }

-

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/DescriptorDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/DescriptorDocumentationProvider.java
deleted file mode 100644
index 46340ff..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/DescriptorDocumentationProvider.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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.ruta.ide.ui.documentation;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collection;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.resource.ResourceManager;
-import org.apache.uima.resource.ResourceSpecifier;
-import org.apache.uima.resource.metadata.ConfigurationParameter;
-import org.apache.uima.resource.metadata.ConfigurationParameterDeclarations;
-import org.apache.uima.resource.metadata.FeatureDescription;
-import org.apache.uima.resource.metadata.TypeDescription;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.ruta.ide.ui.editor.RutaEditor;
-import org.apache.uima.util.XMLInputSource;
-import org.apache.uima.util.XMLSerializer;
-import org.apache.uima.util.XMLizable;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.dltk.core.IMember;
-import org.eclipse.dltk.ui.documentation.IDocumentationResponse;
-import org.eclipse.dltk.ui.documentation.IScriptDocumentationProvider;
-import org.eclipse.dltk.ui.documentation.IScriptDocumentationProviderExtension2;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-
-public class DescriptorDocumentationProvider implements IScriptDocumentationProvider {
-
-  @Override
-  public Reader getInfo(final String content) {
-    final StringBuilder sb = new StringBuilder();
-
-    // HOTFIX: fake access to script project, for now until better solution is found
-    Display.getDefault().syncExec(new Runnable() {
-      // display for accessing WorkbenchWindow
-      @Override
-      public void run() {
-        IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-        if (win != null) {
-          IWorkbenchPage page = win.getActivePage();
-          IEditorPart activeEditor = page.getActiveEditor();
-          if (activeEditor != null) {
-            RutaEditor re = (RutaEditor) activeEditor;
-            IEditorInput ei = re.getEditorInput();
-            if (ei instanceof FileEditorInput) {
-              FileEditorInput fei = (FileEditorInput) ei;
-              IProject project = fei.getFile().getProject();
-              try {
-                Collection<String> classPath = RutaProjectUtils.getClassPath(project);
-                URL[] urls = new URL[classPath.size()];
-                int counter = 0;
-                for (String dep : classPath) {
-                  urls[counter] = new File(dep).toURI().toURL();
-                  counter++;
-                }
-                URLClassLoader classloader = new URLClassLoader(urls);
-                Resource[] filesInClasspath = getFilesInClasspath(content, classloader);
-                if (filesInClasspath.length > 0) {
-                  Resource r = filesInClasspath[0];
-                  URL url = r.getURL();
-                  XMLizable desc = (XMLizable) UIMAFramework.getXMLParser().parse(
-                          new XMLInputSource(url));
-                  if (desc instanceof AnalysisEngineDescription) {
-                    AnalysisEngineDescription aed = (AnalysisEngineDescription) desc;
-                    ConfigurationParameterDeclarations cpd = aed.getAnalysisEngineMetaData()
-                            .getConfigurationParameterDeclarations();
-                    ConfigurationParameter[] parameters = cpd.getConfigurationParameters();
-
-                    for (ConfigurationParameter each : parameters) {
-                      sb.append("<b>");
-                      sb.append(each.getName());
-                      sb.append("</b>");
-                      sb.append("<li><b>type:</b> " + each.getType() + "</li>");
-                      sb.append("<li><b>mandatory:</b> " + each.isMandatory() + "</li>");
-                      sb.append("<li><b>multiValued:</b> " + each.isMultiValued() + "</li>");
-                      if (each.getDescription() != null && !each.getDescription().trim().isEmpty()) {
-                        sb.append("<p>");
-                        sb.append(each.getDescription());
-                        sb.append("</p>");
-                      }
-                      sb.append("<br/>");
-                    }
-                  } else if (desc instanceof TypeSystemDescription) {
-                    TypeSystemDescription tsd = (TypeSystemDescription) desc;
-                    // TODO: use better resource manager
-                    tsd.resolveImports();
-                    TypeDescription[] types = tsd.getTypes();
-                    for (TypeDescription each : types) {
-                      sb.append("<b>");
-                      sb.append(each.getName());
-                      sb.append("</b>");
-                      // sb.append("<br/>");
-                      sb.append(" (" + each.getSupertypeName() + ")");
-
-                      if (each.getDescription() != null && !each.getDescription().trim().isEmpty()) {
-                        sb.append("<p>");
-                        sb.append(each.getDescription());
-                        sb.append("</p>");
-                      }
-                      // sb.append("<br/>");
-                      // sb.append("<ul>");
-                      for (FeatureDescription eachFeat : each.getFeatures()) {
-                        sb.append("<li><b>" + eachFeat.getName() + "</b> ("
-                                + eachFeat.getRangeTypeName() + ") </li>");
-                        if (eachFeat.getDescription() != null && !eachFeat.getDescription().trim().isEmpty()) {
-                          sb.append("<p>");
-                          sb.append(eachFeat.getDescription());
-                          sb.append("</p>");
-                        }
-                      }
-                      // sb.append("</ul>");
-                       sb.append("<br/>");
-                    }
-                  }
-                }
-              } catch (Exception e) {
-                RutaIdeUIPlugin.error(e);
-              }
-            }
-
-          }
-        }
-      }
-    });
-
-    return new StringReader(sb.toString());
-  }
-
-  private Resource[] getFilesInClasspath(String name, URLClassLoader classloader)
-          throws IOException {
-    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(
-            classloader);
-    String p = "classpath*:";
-    String suffix = "/**/" + name + ".xml";
-    String pattern = p + suffix;
-    Resource[] resources = resolver.getResources(pattern);
-    return resources;
-  }
-
-  @Override
-  public Reader getInfo(IMember element, boolean lookIntoParents, boolean lookIntoExternal) {
-    return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/HtmlDocumentationVisitor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/HtmlDocumentationVisitor.java
deleted file mode 100644
index e4fc37c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/HtmlDocumentationVisitor.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.util.Map;

-import java.util.TreeMap;

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import org.htmlparser.Tag;

-import org.htmlparser.visitors.NodeVisitor;

-

-public class HtmlDocumentationVisitor extends NodeVisitor {

-

-  private TreeMap<String, String> map;

-

-  private int divDepth = 0;

-

-  private int elementStart = 0;

-

-  private String document;

-

-  public HtmlDocumentationVisitor(String document) {

-    super();

-    this.document = document;

-    this.map = new TreeMap<String, String>();

-  }

-

-  public void visitTag(Tag tag) {

-    String name = tag.getTagName().toLowerCase();

-    if ("div".equals(name)) {

-      divDepth++;

-      if (divDepth == 1) {

-        elementStart = tag.getStartPosition();

-      }

-    }

-

-  }

-

-  public void visitEndTag(Tag tag) {

-    String name = tag.getTagName().toLowerCase();

-    if ("div".equals(name)) {

-      if (divDepth == 1) {

-        String section = document.substring(elementStart, tag.getEndPosition());

-        processSection(section);

-      }

-      divDepth--;

-    }

-

-  }

-

-  private void processSection(String section) {

-    Pattern pattern = Pattern.compile("title=\"\\d+\\.\\d+\\.\\d+\\.&nbsp;(\\p{Upper}+)\"");

-    Matcher matcher = pattern.matcher(section);

-    boolean found = matcher.find();

-    if (found) {

-      String group = matcher.group(1);

-      section = section.trim();

-      section = section.replaceAll("</?a.*>", "");

-      section = section.replaceAll("\\d+\\.\\d+\\.\\d+.\\d+\\.&nbsp;", "");

-      section = section.replaceAll("\\d+\\.\\d+\\.\\d+.&nbsp;", "");

-      map.put(group, section);

-    }

-  }

-

-  public Map<String, String> getMap() {

-    return map;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/HtmlRutaPagesLocation.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/HtmlRutaPagesLocation.java
deleted file mode 100644
index 901b6dd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/HtmlRutaPagesLocation.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.io.File;

-import java.io.FileNotFoundException;

-import java.io.FileReader;

-import java.io.FilenameFilter;

-import java.io.Reader;

-

-public class HtmlRutaPagesLocation implements IRutaPagesLocation {

-

-  private File fLocation;

-

-  /**

-   * @param location

-   *          directory(!)

-   */

-  public HtmlRutaPagesLocation(File location) {

-    if (!location.isDirectory()) {

-      throw new IllegalArgumentException();

-    }

-

-    fLocation = location;

-  }

-

-  public Reader getHtmlInfo(String keyword) {

-    final String pattern = keyword + ".htm";

-    File[] result = fLocation.listFiles(new FilenameFilter() {

-

-      public boolean accept(File dir, String name) {

-        if (name.equals(pattern))

-          return true;

-        return false;

-      }

-

-    });

-    if (result != null && result.length >= 1 && result[0] != null) {

-      try {

-        FileReader reader = new FileReader(result[0]);

-        return reader;

-      } catch (FileNotFoundException e) {

-        // hmmm! but nothing to do.

-      }

-    }

-    return null;

-  }

-

-  public File getLocation() {

-    return fLocation;

-  }

-

-  public void setLocation(File location) {

-    if (!location.isDirectory())

-      return;

-    fLocation = location;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/IRutaPagesLocation.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/IRutaPagesLocation.java
deleted file mode 100644
index f4074c1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/IRutaPagesLocation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.io.Reader;

-

-public interface IRutaPagesLocation {

-

-  /**

-   * Should find inside location for an information about keyword

-   * 

-   * @param keyword

-   * @return Reader with html code

-   */

-  public Reader getHtmlInfo(String keyword);

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaActionDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaActionDocumentationProvider.java
deleted file mode 100644
index 1c496ee..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaActionDocumentationProvider.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-public class RutaActionDocumentationProvider extends AbstractLanguageElementDocumentationProvider {

-

-  public RutaActionDocumentationProvider() {

-    super("Actions.html");

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaCommentDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaCommentDocumentationProvider.java
deleted file mode 100644
index 64297e4..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaCommentDocumentationProvider.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.io.Reader;

-import java.io.StringReader;

-

-import org.eclipse.dltk.core.IBuffer;

-import org.eclipse.dltk.core.IField;

-import org.eclipse.dltk.core.IMember;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.ISourceRange;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.ui.documentation.IScriptDocumentationProvider;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.Document;

-

-public class RutaCommentDocumentationProvider extends ScriptDocumentationProvider implements

-        IScriptDocumentationProvider {

-

-  @Override

-  protected String getLine(Document d, int line) throws BadLocationException {

-    return d.get(d.getLineOffset(line), d.getLineLength(line));

-  }

-

-  protected String getHeaderComment(IMember member) {

-    if (member instanceof IField) {

-      return null;

-    }

-    try {

-      ISourceRange range = member.getSourceRange();

-      if (range == null)

-        return null;

-

-      IBuffer buf = null;

-

-      ISourceModule compilationUnit = member.getSourceModule();

-      if (!compilationUnit.isConsistent()) {

-        return null;

-      }

-

-      buf = compilationUnit.getBuffer();

-

-      final int start = range.getOffset();

-

-      String contents = buf.getContents();

-

-      String result = "";

-

-      Document doc = new Document(contents);

-      try {

-        int line = doc.getLineOfOffset(start);

-        line--;

-        if (line < 0)

-          return null;

-        boolean emptyEnd = true;

-        while (line >= 0) {

-          String curLine = getLine(doc, line);

-          String curLineTrimmed = curLine.trim();

-          if ((curLineTrimmed.length() == 0 && emptyEnd) || curLineTrimmed.startsWith("#")) {

-            if (curLineTrimmed.length() != 0)

-              emptyEnd = false;

-            result = curLine + result;

-          } else

-            break;

-

-          line--;

-        }

-      } catch (BadLocationException e) {

-        return null;

-      }

-

-      return result;

-

-    } catch (ModelException e) {

-    }

-    return null;

-  }

-

-  public Reader getInfo(IMember member, boolean lookIntoParents, boolean lookIntoExternal) {

-    String header = getHeaderComment(member);

-    return new StringReader(convertToHTML(header));

-  }

-

-  @Override

-  protected String convertToHTML(String header) {

-    StringBuffer result = new StringBuffer();

-    // result.append("<p>\n");

-    Document d = new Document(header);

-    for (int line = 0;; line++) {

-      try {

-        String str = getLine(d, line).trim();

-        if (str == null)

-          break;

-        while (str.length() > 0 && str.startsWith("#"))

-          str = str.substring(1);

-        while (str.length() > 0 && str.endsWith("#"))

-          str = str.substring(0, str.length() - 1);

-        if (str.length() == 0)

-          result.append("<p>");

-        else {

-          if (str.trim().matches("\\w*:")) {

-            result.append("<h4>");

-            result.append(str);

-            result.append("</h4>");

-          } else

-            result.append(str + "<br>");

-        }

-      } catch (BadLocationException e) {

-        break;

-      }

-

-    }

-    // result.append("</p>\n");

-    return result.toString();

-  }

-

-  public Reader getInfo(String content) {

-    return null;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaCommentReader.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaCommentReader.java
deleted file mode 100644
index 387e3a0..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaCommentReader.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import org.eclipse.dltk.core.IBuffer;

-import org.eclipse.dltk.corext.documentation.SingleCharReader;

-

-public class RutaCommentReader extends SingleCharReader {

-

-  private IBuffer fBuffer;

-

-  private int fCurrPos;

-

-  private int fStartPos;

-

-  private int fEndPos;

-

-  private boolean fWasNewLine;

-

-  public RutaCommentReader(IBuffer buf, int start, int end) {

-    fBuffer = buf;

-    fStartPos = start;

-    fEndPos = end;

-

-    reset();

-  }

-

-  /**

-   * @see java.io.Reader#read()

-   */

-  @Override

-  public int read() {

-    if (fCurrPos < fEndPos) {

-      char ch;

-      if (fWasNewLine) {

-        do {

-          ch = fBuffer.getChar(fCurrPos++);

-        } while (fCurrPos < fEndPos && Character.isWhitespace(ch));

-        if (ch == '#') {

-          if (fCurrPos < fEndPos) {

-            do {

-              ch = fBuffer.getChar(fCurrPos++);

-            } while (ch == '#');

-          } else {

-            return -1;

-          }

-        }

-      } else {

-        ch = fBuffer.getChar(fCurrPos++);

-      }

-      fWasNewLine = (ch == '\n' || ch == '\r');

-

-      return ch;

-    }

-    return -1;

-  }

-

-  /**

-   * @see java.io.Reader#close()

-   */

-  @Override

-  public void close() {

-    fBuffer = null;

-  }

-

-  /**

-   * @see java.io.Reader#reset()

-   */

-  @Override

-  public void reset() {

-    fCurrPos = fStartPos;

-    fWasNewLine = true;

-  }

-

-  /**

-   * Returns the offset of the last read character in the passed buffer.

-   */

-  public int getOffset() {

-    return fCurrPos;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaConditionDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaConditionDocumentationProvider.java
deleted file mode 100644
index aee3aa7..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaConditionDocumentationProvider.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-public class RutaConditionDocumentationProvider extends

-        AbstractLanguageElementDocumentationProvider {

-

-  public RutaConditionDocumentationProvider() {

-    super("Conditions.html");

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaFunctionDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaFunctionDocumentationProvider.java
deleted file mode 100644
index fa4af2c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaFunctionDocumentationProvider.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-public class RutaFunctionDocumentationProvider extends AbstractLanguageElementDocumentationProvider {

-

-  public RutaFunctionDocumentationProvider() {

-    super(null);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPageFolder.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPageFolder.java
deleted file mode 100644
index 3c6d286..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPageFolder.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.io.ByteArrayInputStream;

-import java.io.File;

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-

-import javax.xml.parsers.DocumentBuilder;

-import javax.xml.parsers.DocumentBuilderFactory;

-import javax.xml.parsers.ParserConfigurationException;

-

-import org.w3c.dom.Element;

-import org.w3c.dom.Node;

-import org.w3c.dom.NodeList;

-import org.xml.sax.InputSource;

-import org.xml.sax.SAXException;

-import org.xml.sax.helpers.DefaultHandler;

-

-public class RutaPageFolder {

-  private String path;

-

-  private HashMap pages = new HashMap();

-

-  public RutaPageFolder(String path) {

-    super();

-    this.path = path;

-  }

-

-  public void addPage(String keyword, String file) {

-    pages.put(keyword, file);

-  }

-

-  public boolean verify() {

-    if (path == null)

-      return false;

-    File file = new File(path);

-    if (file.exists() && file.isDirectory())

-      return true;

-    return false;

-  }

-

-  public String getPath() {

-    return path;

-  }

-

-  public HashMap getPages() {

-    return pages;

-  }

-

-  @Override

-  public boolean equals(Object obj) {

-    if (!(obj instanceof RutaPageFolder))

-      return false;

-    if (obj == this)

-      return true;

-    RutaPageFolder f = (RutaPageFolder) obj;

-    if (!f.path.equals(this.path))

-      return false;

-    if (!f.pages.equals(this.pages))

-      return false;

-    return true;

-  }

-

-  public static List readXML(String data) throws IOException {

-    // Wrapper the stream for efficient parsing

-    InputStream stream = new ByteArrayInputStream(data.getBytes());

-

-    // Do the parsing and obtain the top-level node

-    Element config = null;

-    try {

-      DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();

-      parser.setErrorHandler(new DefaultHandler());

-      config = parser.parse(new InputSource(stream)).getDocumentElement();

-    } catch (SAXException e) {

-      throw new IOException("Bad XML format");

-    } catch (ParserConfigurationException e) {

-      stream.close();

-      throw new IOException("Bad XML format");

-    } finally {

-      stream.close();

-    }

-

-    if (!config.getNodeName().equalsIgnoreCase("manPages")) {

-      throw new RuntimeException("Bad top level node");

-    }

-

-    List folders = new ArrayList();

-

-    NodeList list = config.getChildNodes();

-    int length = list.getLength();

-    for (int i = 0; i < length; ++i) {

-      Node node = list.item(i);

-      short type = node.getNodeType();

-      if (type == Node.ELEMENT_NODE && node.getNodeName().equalsIgnoreCase("location")) {

-        Element location = (Element) node;

-        String path = location.getAttribute("path");

-        RutaPageFolder folder = new RutaPageFolder(path);

-        NodeList locationChilds = location.getChildNodes();

-        int pages = locationChilds.getLength();

-        for (int j = 0; j < pages; ++j) {

-          node = locationChilds.item(j);

-          type = node.getNodeType();

-          if (type == Node.ELEMENT_NODE && node.getNodeName().equalsIgnoreCase("page")) {

-            Element word = (Element) node;

-            String kw = word.getAttribute("keyword");

-            String file = word.getAttribute("file");

-            folder.addPage(kw, file);

-          }

-        }

-        folders.add(folder);

-      }

-    }

-

-    return folders;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPagesDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPagesDocumentationProvider.java
deleted file mode 100644
index 4deb0d0..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPagesDocumentationProvider.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.io.File;

-import java.io.FileNotFoundException;

-import java.io.FileReader;

-import java.io.IOException;

-import java.io.Reader;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.dltk.core.IMember;

-import org.eclipse.dltk.ui.documentation.IScriptDocumentationProvider;

-import org.eclipse.jface.util.IPropertyChangeListener;

-import org.eclipse.jface.util.PropertyChangeEvent;

-

-public class RutaPagesDocumentationProvider implements IScriptDocumentationProvider {

-

-  private List folders = null;

-

-  public Reader getInfo(IMember element, boolean lookIntoParents, boolean lookIntoExternal) {

-    return null;

-  }

-

-  public Reader getInfo(String content) {

-    initalizeLocations(false);

-

-    if (folders != null) {

-      for (Iterator iterator = folders.iterator(); iterator.hasNext();) {

-        RutaPageFolder f = (RutaPageFolder) iterator.next();

-        HashMap pages = f.getPages();

-        String ans = (String) pages.get(content);

-        if (ans != null) {

-          IPath filePath = new Path(f.getPath()).append(ans);

-          File file = filePath.toFile();

-          if (file != null && file.isFile()) {

-            try {

-              return new FileReader(file);

-            } catch (FileNotFoundException e) {

-              e.printStackTrace();

-            }

-          }

-          break;

-        }

-      }

-    }

-

-    return null;

-  }

-

-  private void initalizeLocations(boolean force) {

-    if (!force && this.folders != null)

-      return;

-

-    RutaIdeUIPlugin.getDefault().getPreferenceStore()

-            .addPropertyChangeListener(new IPropertyChangeListener() {

-

-              public void propertyChange(PropertyChangeEvent event) {

-                initalizeLocations(true);

-              }

-

-            });

-

-    String value = RutaIdeUIPlugin.getDefault().getPreferenceStore()

-            .getString(RutaPreferenceConstants.DOC_RUTA_PAGES_LOCATIONS);

-

-    try {

-      if (!StringUtils.isEmpty(value)) {

-        // value = "<Pages></Pages>";

-        this.folders = RutaPageFolder.readXML(value);

-      }

-    } catch (IOException e) {

-      e.printStackTrace();

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPagesLocationsBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPagesLocationsBlock.java
deleted file mode 100644
index 56bb7c5..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/RutaPagesLocationsBlock.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import java.io.ByteArrayOutputStream;

-import java.io.File;

-import java.io.FileFilter;

-import java.io.FileNotFoundException;

-import java.io.FileReader;

-import java.io.IOException;

-import java.io.UnsupportedEncodingException;

-import java.lang.reflect.InvocationTargetException;

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-import java.util.regex.Matcher;

-import java.util.regex.Pattern;

-

-import javax.xml.parsers.DocumentBuilder;

-import javax.xml.parsers.DocumentBuilderFactory;

-import javax.xml.parsers.ParserConfigurationException;

-import javax.xml.transform.OutputKeys;

-import javax.xml.transform.Transformer;

-import javax.xml.transform.TransformerConfigurationException;

-import javax.xml.transform.TransformerException;

-import javax.xml.transform.TransformerFactory;

-import javax.xml.transform.dom.DOMSource;

-import javax.xml.transform.stream.StreamResult;

-

-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.dltk.ui.DLTKPluginImages;

-import org.eclipse.dltk.ui.dialogs.TimeTriggeredProgressMonitorDialog;

-import org.eclipse.jface.dialogs.ProgressMonitorDialog;

-import org.eclipse.jface.operation.IRunnableWithProgress;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.viewers.IBaseLabelProvider;

-import org.eclipse.jface.viewers.ISelectionChangedListener;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.ITreeContentProvider;

-import org.eclipse.jface.viewers.LabelProvider;

-import org.eclipse.jface.viewers.SelectionChangedEvent;

-import org.eclipse.jface.viewers.TreeViewer;

-import org.eclipse.jface.viewers.Viewer;

-import org.eclipse.jface.viewers.ViewerSorter;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.graphics.Font;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.graphics.Point;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.DirectoryDialog;

-import org.eclipse.swt.widgets.Label;

-import org.w3c.dom.Document;

-import org.w3c.dom.Element;

-

-public class RutaPagesLocationsBlock implements SelectionListener, ISelectionChangedListener {

-

-  protected static final String LAST_PATH_SETTING = "LAST_PATH_SETTING"; //$NON-NLS-1$

-

-  protected static final String DIALOG_SETTINGS_PREFIX = "RutaPagesLocationsBlock"; //$NON-NLS-1$

-

-  protected boolean fInCallback = false;

-

-  protected File fHome;

-

-  // widgets

-  protected TreeViewer fLocationsViewer;

-

-  private Button fClearButton;

-

-  private Button fRemoveButton;

-

-  private Button fAddButton;

-

-  protected Button fDefaultButton;

-

-  private ManLocationsContentProvider fLocationsContentProvider;

-

-  private PreferencePage fPage;

-

-  private IPreferenceStore fStore;

-

-  public RutaPagesLocationsBlock(IPreferenceStore store, PreferencePage page) {

-    fPage = page;

-    fStore = store;

-  }

-

-  protected IBaseLabelProvider getLabelProvider() {

-    return new LabelProvider() {

-

-      @Override

-      public Image getImage(Object element) {

-        if (element instanceof RutaPageFolder) {

-          return DLTKPluginImages.DESC_OBJS_LIBRARY.createImage();

-        }

-        return DLTKPluginImages.DESC_OBJS_INFO_OBJ.createImage();

-      }

-

-      @Override

-      public String getText(Object element) {

-        if (element instanceof RutaPageFolder) {

-          RutaPageFolder folder = (RutaPageFolder) element;

-          return folder.getPath();

-        }

-        return super.getText(element);

-      }

-

-    };

-  }

-

-  private List folders = null;

-

-  private String getFoldersAsXML() {

-    if (folders == null)

-      return null;

-

-    // Create the Document and the top-level node

-    DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();

-    DocumentBuilder docBuilder;

-    try {

-      docBuilder = dfactory.newDocumentBuilder();

-    } catch (ParserConfigurationException e1) {

-      e1.printStackTrace();

-      return null;

-    }

-    Document doc = docBuilder.newDocument();

-

-    Element topElement = doc.createElement("manPages");

-    doc.appendChild(topElement);

-

-    for (Iterator iterator = folders.iterator(); iterator.hasNext();) {

-      RutaPageFolder f = (RutaPageFolder) iterator.next();

-      Element location = doc.createElement("location");

-      topElement.appendChild(location);

-      location.setAttribute("path", f.getPath());

-      for (Iterator iterator2 = f.getPages().keySet().iterator(); iterator2.hasNext();) {

-        String name = (String) iterator2.next();

-        String file = (String) f.getPages().get(name);

-        Element page = doc.createElement("page");

-        location.appendChild(page);

-        page.setAttribute("keyword", name);

-        page.setAttribute("file", file);

-      }

-    }

-

-    ByteArrayOutputStream s = new ByteArrayOutputStream();

-

-    try {

-      TransformerFactory factory = TransformerFactory.newInstance();

-      Transformer transformer;

-      transformer = factory.newTransformer();

-      transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$

-      transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

-

-      DOMSource source = new DOMSource(doc);

-      StreamResult outputTarget = new StreamResult(s);

-      transformer.transform(source, outputTarget);

-    } catch (TransformerConfigurationException e) {

-      e.printStackTrace();

-    } catch (TransformerException e) {

-      e.printStackTrace();

-    }

-

-    String result = null;

-    try {

-      result = s.toString("UTF8");

-    } catch (UnsupportedEncodingException e) {

-      e.printStackTrace();

-    }

-

-    return result;

-  }

-

-  private class ManLocationsContentProvider implements ITreeContentProvider {

-

-    public Object[] getChildren(Object parentElement) {

-      if (parentElement instanceof RutaPageFolder) {

-        RutaPageFolder folder = (RutaPageFolder) parentElement;

-        String[] ch = new String[folder.getPages().size()];

-        int i = 0;

-        for (Iterator iterator = folder.getPages().keySet().iterator(); iterator.hasNext();) {

-          String kw = (String) iterator.next();

-          String file = (String) folder.getPages().get(kw);

-          ch[i++] = kw + " (" + file + ")";

-        }

-        return ch;

-      }

-      return new Object[0];

-    }

-

-    public Object getParent(Object element) {

-      return null;

-    }

-

-    public boolean hasChildren(Object element) {

-      if (element instanceof RutaPageFolder)

-        return true;

-      return false;

-    }

-

-    public Object[] getElements(Object inputElement) {

-      if (folders == null)

-        return new Object[0];

-      return folders.toArray(new Object[folders.size()]);

-    }

-

-    public void dispose() {

-    }

-

-    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

-    }

-

-  }

-

-  /**

-   * Creates and returns the source lookup control.

-   * 

-   * @param parent

-   *          the parent widget of this control

-   */

-  public Control createControl(Composite parent) {

-    Font font = parent.getFont();

-

-    Composite comp = new Composite(parent, SWT.NONE);

-    GridLayout topLayout = new GridLayout();

-    topLayout.numColumns = 2;

-    topLayout.marginHeight = 0;

-    topLayout.marginWidth = 0;

-    comp.setLayout(topLayout);

-    GridData gd = new GridData(GridData.FILL_BOTH);

-    comp.setLayoutData(gd);

-

-    fLocationsViewer = new TreeViewer(comp);

-    gd = new GridData(GridData.FILL_BOTH);

-    gd.heightHint = 6;

-    fLocationsViewer.getControl().setLayoutData(gd);

-    fLocationsContentProvider = new ManLocationsContentProvider();

-    fLocationsViewer.setSorter(new ViewerSorter());

-    fLocationsViewer.setContentProvider(fLocationsContentProvider);

-    fLocationsViewer.setLabelProvider(getLabelProvider());

-    fLocationsViewer.setInput(this);

-    fLocationsViewer.addSelectionChangedListener(this);

-

-    Composite pathButtonComp = new Composite(comp, SWT.NONE);

-    GridLayout pathButtonLayout = new GridLayout();

-    pathButtonLayout.marginHeight = 0;

-    pathButtonLayout.marginWidth = 0;

-    pathButtonComp.setLayout(pathButtonLayout);

-    gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL);

-    pathButtonComp.setLayoutData(gd);

-    pathButtonComp.setFont(font);

-

-    fAddButton = createPushButton(pathButtonComp, "Add folder...");

-    fAddButton.addSelectionListener(this);

-

-    fRemoveButton = createPushButton(pathButtonComp, "Remove");

-    fRemoveButton.addSelectionListener(this);

-

-    fClearButton = createPushButton(pathButtonComp, "Remove All");

-    fClearButton.addSelectionListener(this);

-

-    return comp;

-  }

-

-  /**

-   * Creates and returns a button

-   * 

-   * @param parent

-   *          parent widget

-   * @param label

-   *          label

-   * @return Button

-   */

-  protected Button createPushButton(Composite parent, String label) {

-    Button button = new Button(parent, SWT.PUSH);

-    button.setFont(parent.getFont());

-    button.setText(label);

-    setButtonLayoutData(button);

-    return button;

-  }

-

-  protected void setButtonLayoutData(Button button) {

-    GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);

-    int widthHint = 80;

-    Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);

-    data.widthHint = Math.max(widthHint, minSize.x);

-    button.setLayoutData(data);

-  }

-

-  /**

-   * Create some empty space

-   */

-  protected void createVerticalSpacer(Composite comp, int colSpan) {

-    Label label = new Label(comp, SWT.NONE);

-    GridData gd = new GridData();

-    gd.horizontalSpan = colSpan;

-    label.setLayoutData(gd);

-  }

-

-  /**

-   * Updates buttons and status based on current mans

-   */

-  public void update() {

-    updateButtons();

-

-    if (folders != null) {

-      for (Iterator iterator = folders.iterator(); iterator.hasNext();) {

-        RutaPageFolder v = (RutaPageFolder) iterator.next();

-        if (!v.verify()) {

-          iterator.remove();

-        }

-      }

-    }

-

-    fLocationsViewer.refresh();

-

-    updatePageStatus(Status.OK_STATUS);

-  }

-

-  public void setDefaults() {

-    String res = fStore.getDefaultString(RutaPreferenceConstants.DOC_RUTA_PAGES_LOCATIONS);

-    fStore.setValue(RutaPreferenceConstants.DOC_RUTA_PAGES_LOCATIONS, res);

-    initialize();

-  }

-

-  protected void updatePageStatus(IStatus status) {

-    if (fPage == null)

-      return;

-    fPage.setValid(status.isOK());

-    if (!status.isOK())

-      fPage.setErrorMessage(status.getMessage());

-    else

-      fPage.setErrorMessage(null);

-  }

-

-  public void initialize() {

-    String value = fStore.getString(RutaPreferenceConstants.DOC_RUTA_PAGES_LOCATIONS);

-    try {

-      this.folders = RutaPageFolder.readXML(value);

-    } catch (IOException e) {

-      e.printStackTrace();

-    }

-

-    update();

-  }

-

-  /**

-   * Saves settings

-   */

-  public void performApply() {

-    String xml = this.getFoldersAsXML();

-    if (xml != null)

-      fStore.setValue(RutaPreferenceConstants.DOC_RUTA_PAGES_LOCATIONS, xml);

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see

-   * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)

-   */

-  public void widgetSelected(SelectionEvent e) {

-    Object source = e.getSource();

-    if (source == fClearButton) {

-      folders.clear();

-    } else if (source == fRemoveButton) {

-      IStructuredSelection selection = (IStructuredSelection) fLocationsViewer.getSelection();

-      Object[] array = selection.toArray();

-      for (int i = 0; i < array.length; i++) {

-        if (array[i] instanceof RutaPageFolder) {

-          for (Iterator iterator = folders.iterator(); iterator.hasNext();) {

-            RutaPageFolder f = (RutaPageFolder) iterator.next();

-            if (f == array[i]) {

-              iterator.remove();

-              break;

-            }

-          }

-        }

-      }

-    } else if (source == fAddButton) {

-      add();

-    }

-

-    update();

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @seeorg.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.

-   * SelectionEvent)

-   */

-  public void widgetDefaultSelected(SelectionEvent e) {

-  }

-

-  /**

-   * Open the file selection dialog, and add the return locations.

-   */

-  protected void add() {

-    DirectoryDialog dialog = new DirectoryDialog(fLocationsViewer.getControl().getShell());

-    dialog.setMessage("Select directory to search into");

-    String result = dialog.open();

-    if (result != null) {

-      final File file = new File(result);

-      if (this.folders == null)

-        this.folders = new ArrayList();

-      if (file != null && file.isDirectory()) {

-        ProgressMonitorDialog dialog2 = new TimeTriggeredProgressMonitorDialog(null, 500);

-        try {

-          dialog2.run(true, true, new IRunnableWithProgress() {

-            public void run(IProgressMonitor monitor) {

-              monitor.beginTask("Searching for man pages", 1);

-              performSearch(file);

-              monitor.done();

-            }

-          });

-        } catch (InvocationTargetException e) {

-          e.printStackTrace();

-        } catch (InterruptedException e) {

-          e.printStackTrace();

-        }

-

-      }

-    }

-  }

-

-  private void performSearch(File dir) {

-    if (!dir.isDirectory())

-      return;

-

-    String name = dir.getName();

-

-    if (name.equals("TkLib") || name.equals("RutaLib") || name.equals("Keywords")

-            || name.equals("UserCmd"))

-      return;

-

-    File[] childs = dir.listFiles(new FileFilter() {

-

-      public boolean accept(File file) {

-        if (file.isDirectory())

-          return true;

-        if (file.getName().startsWith("contents.htm"))

-          return true;

-        return false;

-      }

-

-    });

-    for (int i = 0; i < childs.length; i++) {

-      if (childs[i].isDirectory()) {

-        performSearch(childs[i]);

-      }

-      if (childs[i].getName().startsWith("contents.htm")) {

-        RutaPageFolder folder = new RutaPageFolder(dir.getAbsolutePath());

-        parseContentsFile(childs[i], folder);

-        if (folder.getPages().size() > 0 && !folders.contains(folder)) {

-          this.folders.add(folder);

-        }

-      }

-    }

-  }

-

-  private void parseContentsFile(File c, RutaPageFolder folder) {

-    FileReader reader;

-    try {

-      reader = new FileReader(c);

-    } catch (FileNotFoundException e) {

-      return;

-    }

-    StringBuffer buf = new StringBuffer();

-    while (true) {

-      char cbuf[] = new char[1024];

-      try {

-        int read = reader.read(cbuf);

-        if (read >= 0) {

-          buf.append(cbuf, 0, read);

-        } else

-          break;

-      } catch (IOException e) {

-        break;

-      }

-    }

-    String result = buf.toString();

-    Pattern pattern = Pattern.compile("<a\\s+href=\"([a-zA-Z_0-9]+\\.html?)\"\\s*>(\\w+)</a>",

-            Pattern.CASE_INSENSITIVE);

-    Matcher matcher = pattern.matcher(result);

-    while (matcher.find()) {

-      String file = matcher.group(1);

-      if (file.equalsIgnoreCase("Copyright.htm"))

-        continue;

-      String word = matcher.group(2);

-      folder.addPage(word, file);

-    }

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see

-   * org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers

-   * .SelectionChangedEvent)

-   */

-  public void selectionChanged(SelectionChangedEvent event) {

-    updateButtons();

-  }

-

-  /**

-   * Refresh the enable/disable state for the buttons.

-   */

-  private void updateButtons() {

-    fClearButton.setEnabled(folders != null && folders.size() > 0);

-    IStructuredSelection selection = (IStructuredSelection) fLocationsViewer.getSelection();

-

-    boolean canRemove = true;

-    if (folders == null)

-      canRemove = false;

-    else {

-      List list = selection.toList();

-      for (Iterator iterator = list.iterator(); iterator.hasNext();) {

-        Object o = iterator.next();

-        if (!folders.contains(o))

-          canRemove = false;

-        break;

-      }

-      if (selection.isEmpty())

-        canRemove = false;

-    }

-

-    fRemoveButton.setEnabled(canRemove);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/ScriptDocumentationProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/ScriptDocumentationProvider.java
deleted file mode 100644
index 4ca3f9a..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/documentation/ScriptDocumentationProvider.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.ide.ui.documentation;

-

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.Document;

-

-public class ScriptDocumentationProvider {

-

-  public ScriptDocumentationProvider() {

-    super();

-  }

-

-  protected String getLine(Document d, int line) throws BadLocationException {

-    return d.get(d.getLineOffset(line), d.getLineLength(line));

-  }

-

-  protected String convertToHTML(String header) {

-    StringBuffer result = new StringBuffer();

-    // result.append("<p>\n");

-    Document d = new Document(header);

-    for (int line = 0;; line++) {

-      try {

-        String str = getLine(d, line).trim();

-        if (str == null)

-          break;

-        while (str.length() > 0 && str.startsWith("#"))

-          str = str.substring(1);

-        while (str.length() > 0 && str.endsWith("#"))

-          str = str.substring(0, str.length() - 1);

-        if (str.length() == 0)

-          result.append("<p>");

-        else {

-          if (str.trim().matches("\\w*:")) {

-            result.append("<h4>");

-            result.append(str);

-            result.append("</h4>");

-          } else

-            result.append(str + "<br>");

-        }

-      } catch (BadLocationException e) {

-        break;

-      }

-

-    }

-    // result.append("</p>\n");

-    return result.toString();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/ActionMessages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/ActionMessages.java
deleted file mode 100644
index 4817e92..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/ActionMessages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.ide.ui.editor;

-

-import org.eclipse.osgi.util.NLS;

-

-public final class ActionMessages extends NLS {

-

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.ui.editor.ActionMessages";//$NON-NLS-1$

-

-  private ActionMessages() {

-    // Do not instantiate

-  }

-

-  public static String MemberFilterActionGroup_hide_variables_label;

-

-  public static String MemberFilterActionGroup_hide_variables_tooltip;

-

-  public static String MemberFilterActionGroup_hide_variables_description;

-

-  public static String MemberFilterActionGroup_hide_functions_label;

-

-  public static String MemberFilterActionGroup_hide_functions_tooltip;

-

-  public static String MemberFilterActionGroup_hide_functions_description;

-

-  public static String MemberFilterActionGroup_hide_classes_label;

-

-  public static String MemberFilterActionGroup_hide_classes_tooltip;

-

-  public static String MemberFilterActionGroup_hide_classes_description;

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, ActionMessages.class);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/ReferenceFinder.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/ReferenceFinder.java
deleted file mode 100644
index 50f0581..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/ReferenceFinder.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*

- * 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.ruta.ide.ui.editor;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.parser.ast.ActionFactory;

-import org.apache.uima.ruta.ide.parser.ast.ComponentDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.ComponentReference;

-import org.apache.uima.ruta.ide.parser.ast.ConditionFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaAction;

-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;

-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class ReferenceFinder extends ASTVisitor {

-

-  private List<ASTNode> result = new ArrayList<ASTNode>();

-

-  private ASTNode node;

-

-  public ReferenceFinder(ASTNode node) {

-    super();

-    this.node = getRealNode(node);

-  }

-

-  private ASTNode getRealNode(ASTNode node) {

-    if (node instanceof RutaAction) {

-      RutaAction a = (RutaAction) node;

-      if (ActionFactory.IMPLICIT.equals(a.getName()) && !a.getChilds().isEmpty()) {

-        Expression expression = a.getChilds().get(0);

-        if (expression != null && !expression.getChilds().isEmpty()) {

-          return (ASTNode) expression.getChilds().get(0);

-        }

-      }

-    }

-    if (node instanceof RutaCondition) {

-      RutaCondition c = (RutaCondition) node;

-      if (ConditionFactory.IMPLICIT.equals(c.getName()) && !c.getChilds().isEmpty()) {

-        Expression expression = c.getChilds().get(0);

-        if (expression != null && !expression.getChilds().isEmpty()) {

-          return (ASTNode) expression.getChilds().get(0);

-        }

-      }

-    }

-    return node;

-  }

-

-  @Override

-  public boolean visit(Expression s) throws Exception {

-    if (s instanceof RutaVariableReference && node instanceof RutaVariableReference) {

-      RutaVariableReference vr0 = (RutaVariableReference) node;

-      RutaVariableReference vr1 = (RutaVariableReference) s;

-      if (vr1.getStringRepresentation().equals(vr0.getStringRepresentation())

-              && vr1.getType() == vr0.getType()) {

-        result.add(s);

-      }

-    } else if (s instanceof ComponentDeclaration && node instanceof ComponentDeclaration) {

-

-    } else if (s instanceof ComponentReference && node instanceof ComponentReference) {

-      ComponentReference cr1 = (ComponentReference) node;

-      ComponentReference cr2 = (ComponentReference) s;

-      if (cr1.getName().equals(cr2.getName())) {

-        result.add(s);

-      }

-    } else if (s instanceof RutaAction && node instanceof RutaAction) {

-      RutaAction a1 = (RutaAction) node;

-      RutaAction a2 = (RutaAction) s;

-      if (a1.getName().equals(a2.getName())) {

-        result.add(s);

-      }

-    } else if (s instanceof RutaCondition && node instanceof RutaCondition) {

-      RutaCondition c1 = (RutaCondition) node;

-      RutaCondition c2 = (RutaCondition) s;

-      if (c1.getName().equals(c2.getName())) {

-        result.add(s);

-      }

-

-    }

-    return super.visit(s);

-  }

-

-  public List<ASTNode> getResult() {

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaDocumentSetupParticipant.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaDocumentSetupParticipant.java
deleted file mode 100644
index f6c8c15..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaDocumentSetupParticipant.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.ide.ui.editor;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.apache.uima.ruta.ide.ui.text.RutaTextTools;

-import org.eclipse.core.filebuffers.IDocumentSetupParticipant;

-import org.eclipse.jface.text.IDocument;

-

-public class RutaDocumentSetupParticipant implements IDocumentSetupParticipant {

-

-  public RutaDocumentSetupParticipant() {

-  }

-

-  /*

-   * @see

-   * org.eclipse.core.filebuffers.IDocumentSetupParticipant#setup(org.eclipse.jface.text.IDocument)

-   */

-  public void setup(IDocument document) {

-    RutaTextTools tools = RutaIdeUIPlugin.getDefault().getTextTools();

-    tools.setupDocumentPartitioner(document, RutaPartitions.RUTA_PARTITIONING);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaEditor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaEditor.java
deleted file mode 100644
index 1d37e99..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaEditor.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/*

- * 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.ruta.ide.ui.editor;

-

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaLanguageToolkit;

-import org.apache.uima.ruta.ide.core.codeassist.RutaReferenceDeclarationVisitor;

-import org.apache.uima.ruta.ide.core.codeassist.RutaReferenceVisitor;

-import org.apache.uima.ruta.ide.core.codeassist.RutaRuleIdVisitor;

-import org.apache.uima.ruta.ide.core.codeassist.RutaSelectionParser;

-import org.apache.uima.ruta.ide.parser.ast.RutaAction;

-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;

-import org.apache.uima.ruta.ide.parser.ast.RutaRule;

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;

-import org.apache.uima.ruta.ide.ui.text.RutaPairMatcher;

-import org.apache.uima.ruta.ide.ui.text.folding.RutaFoldingStructureProvider;

-import org.eclipse.core.filebuffers.IDocumentSetupParticipant;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.compiler.env.ISourceModule;

-import org.eclipse.dltk.core.IDLTKLanguageToolkit;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.ISourceRange;

-import org.eclipse.dltk.core.ISourceReference;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.internal.ui.actions.FoldingActionGroup;

-import org.eclipse.dltk.internal.ui.editor.DLTKEditorMessages;

-import org.eclipse.dltk.internal.ui.editor.ScriptEditor;

-import org.eclipse.dltk.internal.ui.editor.ScriptOutlinePage;

-import org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer;

-import org.eclipse.dltk.internal.ui.editor.ToggleCommentAction;

-import org.eclipse.dltk.ui.actions.IScriptEditorActionDefinitionIds;

-import org.eclipse.dltk.ui.text.ScriptTextTools;

-import org.eclipse.dltk.ui.text.folding.IFoldingStructureProvider;

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.action.IAction;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.IDocumentExtension3;

-import org.eclipse.jface.text.IRegion;

-import org.eclipse.jface.text.ITextOperationTarget;

-import org.eclipse.jface.text.ITextViewerExtension5;

-import org.eclipse.jface.text.Position;

-import org.eclipse.jface.text.TextUtilities;

-import org.eclipse.jface.text.source.Annotation;

-import org.eclipse.jface.text.source.IAnnotationModel;

-import org.eclipse.jface.text.source.ICharacterPairMatcher;

-import org.eclipse.jface.text.source.ISourceViewer;

-import org.eclipse.jface.text.source.SourceViewerConfiguration;

-import org.eclipse.search.internal.ui.SearchPlugin;

-import org.eclipse.search2.internal.ui.text.Highlighter;

-import org.eclipse.swt.custom.StyledText;

-import org.eclipse.swt.graphics.Point;

-import org.eclipse.ui.IEditorInput;

-import org.eclipse.ui.texteditor.IUpdate;

-import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;

-import org.eclipse.ui.texteditor.TextOperationAction;

-

-public class RutaEditor extends ScriptEditor {

-

-  protected class FormatElementAction extends Action implements IUpdate {

-

-    /*

-     * @since 3.2

-     */

-    FormatElementAction() {

-      setEnabled(isEditorInputModifiable());

-    }

-

-    /*

-     * @see org.eclipse.jface.action.IAction#run()

-     */

-    @Override

-    public void run() {

-

-      final ScriptSourceViewer viewer = (ScriptSourceViewer) getSourceViewer();

-      if (viewer.isEditable()) {

-

-        final Point selection = viewer.rememberSelection();

-        try {

-          viewer.setRedraw(false);

-

-          final String type = TextUtilities.getContentType(viewer.getDocument(),

-                  RutaPartitions.RUTA_PARTITIONING, selection.x, true);

-          if (type.equals(IDocument.DEFAULT_CONTENT_TYPE) && selection.y == 0) {

-

-            try {

-              final IModelElement element = getElementAt(selection.x, true);

-              if (element != null && element.exists()) {

-

-                final int kind = element.getElementType();

-                if (kind == IModelElement.TYPE || kind == IModelElement.METHOD) {

-

-                  final ISourceReference reference = (ISourceReference) element;

-                  final ISourceRange range = reference.getSourceRange();

-

-                  if (range != null) {

-                    viewer.setSelectedRange(range.getOffset(), range.getLength());

-                    viewer.doOperation(ISourceViewer.FORMAT);

-                  }

-                }

-              }

-            } catch (ModelException exception) {

-              // Should not happen

-            }

-          } else {

-            viewer.setSelectedRange(selection.x, 1);

-            viewer.doOperation(ISourceViewer.FORMAT);

-          }

-        } catch (BadLocationException exception) {

-          // Can not happen

-        } finally {

-

-          viewer.setRedraw(true);

-          viewer.restoreSelection();

-        }

-      }

-    }

-

-    /*

-     * @see org.eclipse.ui.texteditor.IUpdate#update()

-     * 

-     * @since 3.2

-     */

-    public void update() {

-      setEnabled(isEditorInputModifiable());

-    }

-  }

-

-  public static final String EDITOR_ID = "org.apache.uima.ruta.ide.ui.editor.RutaEditor";

-

-  public static final String EDITOR_CONTEXT = "#RutaEditorContext";

-

-  public static final String RULER_CONTEXT = "#RutaRulerContext";

-

-  private IFoldingStructureProvider foldingProvider;

-

-  private RutaPairMatcher bracketMatcher;

-

-  private void configureToggleCommentAction() {

-    IAction action = getAction("ToggleComment"); //$NON-NLS-1$

-    if (action instanceof ToggleCommentAction) {

-      ISourceViewer sourceViewer = getSourceViewer();

-      SourceViewerConfiguration configuration = getSourceViewerConfiguration();

-      ((ToggleCommentAction) action).configure(sourceViewer, configuration);

-    }

-  }

-

-  // public void dispose() {

-  // super.dispose();

-  // highlighter.dispose();

-  // }

-

-  @Override

-  protected void initializeEditor() {

-    super.initializeEditor();

-

-    setEditorContextMenuId(EDITOR_CONTEXT);

-    setRulerContextMenuId(RULER_CONTEXT);

-  }

-

-  @Override

-  protected void createActions() {

-    super.createActions();

-

-    // Comment

-    Action action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),

-            "Comment.", this, ITextOperationTarget.PREFIX); //$NON-NLS-1$

-    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.COMMENT);

-    setAction("Comment", action); //$NON-NLS-1$

-    markAsStateDependentAction("Comment", true); //$NON-NLS-1$

-

-    // Uncomment

-    action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),

-            "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX); //$NON-NLS-1$

-    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.UNCOMMENT);

-    setAction("Uncomment", action); //$NON-NLS-1$

-    markAsStateDependentAction("Uncomment", true); //$NON-NLS-1$

-

-    // Toggle comment

-    action = new ToggleCommentAction(DLTKEditorMessages.getBundleForConstructedKeys(),

-            "ToggleComment.", this); //$NON-NLS-1$

-    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.TOGGLE_COMMENT);

-    setAction("ToggleComment", action); //$NON-NLS-1$

-    markAsStateDependentAction("ToggleComment", true); //$NON-NLS-1$

-    configureToggleCommentAction();

-

-    action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),

-            "Format.", this, ISourceViewer.FORMAT); //$NON-NLS-1$

-    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.FORMAT);

-    setAction("Format", action); //$NON-NLS-1$

-    markAsStateDependentAction("Format", true); //$NON-NLS-1$

-    markAsSelectionDependentAction("Format", true); //$NON-NLS-1$

-    // PlatformUI.getWorkbench().getHelpSystem().setHelp(action,

-    // IJavaHelpContextIds.FORMAT_ACTION);

-  }

-

-  final static String[] properties = new String[] { RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS,

-      RutaPreferenceConstants.EDITOR_FOLDING_EXCLUDE_LIST,

-      RutaPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST, };

-

-  private Highlighter highlighter;

-

-  private HashMap<Annotation, Position> myAnnotations;

-

-  @Override

-  protected String[] getFoldingEventPreferenceKeys() {

-    return properties;

-  }

-

-  // protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {

-  // String property = event.getProperty();

-  // try {

-  // ISourceViewer sourceViewer = getSourceViewer();

-  // if (sourceViewer == null) {

-  // return;

-  // }

-  // if (RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS

-  // .equals(property)

-  // || RutaPreferenceConstants.EDITOR_FOLDING_COMMENTS_WITH_NEWLINES

-  // .equals(property)

-  // || RutaPreferenceConstants.EDITOR_FOLDING_EXCLUDE_LIST

-  // .equals(property)

-  // || RutaPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST

-  // .equals(property)

-  // || PreferenceConstants.EDITOR_FOLDING_LINES_LIMIT

-  // .equals(property)) {

-  //

-  // if (sourceViewer instanceof ProjectionViewer) {

-  // fProjectionModelUpdater.initialize();

-  // }

-  // return;

-  // }

-  // } finally {

-  // super.handlePreferenceStoreChanged(event);

-  // }

-  // }

-

-  @Override

-  public IPreferenceStore getScriptPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-

-  @Override

-  public ScriptTextTools getTextTools() {

-    return RutaIdeUIPlugin.getDefault().getTextTools();

-  }

-

-  @Override

-  protected ScriptOutlinePage doCreateOutlinePage() {

-    return new RutaOutlinePage(this, RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  @Override

-  protected void connectPartitioningToElement(IEditorInput input, IDocument document) {

-    if (document instanceof IDocumentExtension3) {

-      IDocumentExtension3 doc = (IDocumentExtension3) document;

-      if (doc.getDocumentPartitioner(RutaPartitions.RUTA_PARTITIONING) == null) {

-        IDocumentSetupParticipant participant = new RutaDocumentSetupParticipant();

-        participant.setup(document);

-      }

-    }

-  }

-

-  @Override

-  protected IFoldingStructureProvider getFoldingStructureProvider() {

-    if (foldingProvider == null) {

-      foldingProvider = new RutaFoldingStructureProvider();

-    }

-

-    return foldingProvider;

-  }

-

-  @Override

-  protected FoldingActionGroup createFoldingActionGroup() {

-    return new FoldingActionGroup(this, getViewer(), RutaIdeUIPlugin.getDefault()

-            .getPreferenceStore());

-  }

-

-  @Override

-  public String getEditorId() {

-    return EDITOR_ID;

-  }

-

-  protected void selectionChanged() {

-

-    if (getSelectionProvider() == null)

-      return;

-

-    super.selectionChanged();

-

-    if (myAnnotations != null && !myAnnotations.isEmpty()) {

-      removeAnnotations(myAnnotations.keySet());

-    }

-

-    RutaSelectionParser parser = new RutaSelectionParser();

-    ISourceModule unit = (ISourceModule) getInputModelElement();

-    ModuleDeclaration parsed = parser.parse(unit);

-    ISourceViewer sourceViewer = getSourceViewer();

-    StyledText styledText = sourceViewer.getTextWidget();

-    int caret = 0;

-    if (sourceViewer instanceof ITextViewerExtension5) {

-      ITextViewerExtension5 extension = (ITextViewerExtension5) sourceViewer;

-      caret = extension.widgetOffset2ModelOffset(styledText.getCaretOffset());

-    } else {

-      int offset = sourceViewer.getVisibleRegion().getOffset();

-      caret = offset + styledText.getCaretOffset();

-    }

-    RutaReferenceVisitor visitor1 = new RutaReferenceVisitor(caret);

-    ASTNode node = null;

-    try {

-      parsed.traverse(visitor1);

-    } catch (Exception e) {

-    }

-    node = visitor1.getResult();

-    if (node == null) {

-      RutaReferenceDeclarationVisitor visitor2 = new RutaReferenceDeclarationVisitor(caret);

-      try {

-        parsed.traverse(visitor2);

-      } catch (Exception e) {

-      }

-      node = visitor2.getResult();

-    }

-    if (node != null) {

-      ReferenceFinder refFinder = new ReferenceFinder(node);

-      try {

-        parsed.traverse(refFinder);

-      } catch (Exception e) {

-      }

-      List<ASTNode> result = refFinder.getResult();

-      myAnnotations = new HashMap<Annotation, Position>(result.size());

-      for (ASTNode each : result) {

-        Annotation annotation = new Annotation(SearchPlugin.SEARCH_ANNOTATION_TYPE, true, null);

-        Position position = null;

-        int sourceStart = each.sourceStart();

-        int sourceEnd = each.sourceEnd();

-        if (each instanceof RutaAction) {

-          RutaAction e = (RutaAction) each;

-          sourceStart = e.getNameStart();

-          sourceEnd = e.getNameEnd();

-        } else if (each instanceof RutaCondition) {

-          RutaCondition e = (RutaCondition) each;

-          sourceStart = e.getNameStart();

-          sourceEnd = e.getNameEnd();

-        }

-        position = new Position(sourceStart, sourceEnd - sourceStart);

-        myAnnotations.put(annotation, position);

-      }

-      addAnnotations(myAnnotations);

-    }

-

-  }

-

-  public void highlightElement(int id) {

-    if (myAnnotations != null && !myAnnotations.isEmpty()) {

-      removeAnnotations(myAnnotations.keySet());

-    }

-

-    RutaSelectionParser parser = new RutaSelectionParser();

-    ISourceModule unit = (ISourceModule) getInputModelElement();

-    ModuleDeclaration parsed = parser.parse(unit);

-    RutaRuleIdVisitor visitor = new RutaRuleIdVisitor(id);

-    try {

-      parsed.traverse(visitor);

-    } catch (Exception e) {

-    }

-    RutaRule rule = visitor.getResult();

-    myAnnotations = new HashMap<Annotation, Position>();

-    if (rule != null) {

-      Annotation annotation = new Annotation(SearchPlugin.SEARCH_ANNOTATION_TYPE, true, null);

-      int sourceStart = rule.sourceStart();

-      int sourceEnd = rule.sourceEnd();

-      Position position = new Position(sourceStart, sourceEnd - sourceStart);

-      getSourceViewer().revealRange(sourceStart, sourceEnd - sourceStart);

-      myAnnotations.put(annotation, position);

-    }

-    addAnnotations(myAnnotations);

-  }

-

-  private void removeAnnotations(Collection<Annotation> annotations) {

-    IAnnotationModel model = getDocumentProvider().getAnnotationModel(getEditorInput());

-    for (Annotation annotation : annotations) {

-      model.removeAnnotation(annotation);

-    }

-  }

-

-  private void addAnnotations(Map<Annotation, Position> annotationToPositionMap) {

-    IAnnotationModel model = getDocumentProvider().getAnnotationModel(getEditorInput());

-    for (Annotation a : annotationToPositionMap.keySet()) {

-      Position p = annotationToPositionMap.get(a);

-      model.addAnnotation(a, p);

-    }

-  }

-

-  @Override

-  protected void initializeKeyBindingScopes() {

-    setKeyBindingScopes(new String[] { "org.apache.uima.ruta.ide.ui.rutaEditorScope" }); //$NON-NLS-1$

-  }

-

-  @Override

-  public IDLTKLanguageToolkit getLanguageToolkit() {

-    return RutaLanguageToolkit.getDefault();

-  }

-

-  @Override

-  public String getCallHierarchyID() {

-    return "org.eclipse.dltk.callhierarchy.view";

-  }

-

-  /**

-   * Jumps to the matching bracket.

-   */

-  @Override

-  public void gotoMatchingBracket() {

-    ISourceViewer sourceViewer = getSourceViewer();

-    IDocument document = sourceViewer.getDocument();

-    if (document == null)

-      return;

-

-    IRegion selection = getSignedSelection(sourceViewer);

-

-    int selectionLength = Math.abs(selection.getLength());

-    if (selectionLength > 1) {

-      setStatusLineErrorMessage("No bracket selected");

-      sourceViewer.getTextWidget().getDisplay().beep();

-      return;

-    }

-

-    // #26314

-    int sourceCaretOffset = selection.getOffset() + selection.getLength();

-    if (isSurroundedByBrackets(document, sourceCaretOffset))

-      sourceCaretOffset -= selection.getLength();

-

-    IRegion region = bracketMatcher.match(document, sourceCaretOffset);

-    if (region == null) {

-      setStatusLineErrorMessage("No matching bracket found");

-      sourceViewer.getTextWidget().getDisplay().beep();

-      return;

-    }

-

-    int offset = region.getOffset();

-    int length = region.getLength();

-

-    if (length < 1)

-      return;

-

-    int anchor = bracketMatcher.getAnchor();

-    // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195

-    int targetOffset = (ICharacterPairMatcher.RIGHT == anchor) ? offset + 1 : offset + length;

-

-    boolean visible = false;

-    if (sourceViewer instanceof ITextViewerExtension5) {

-      ITextViewerExtension5 extension = (ITextViewerExtension5) sourceViewer;

-      visible = (extension.modelOffset2WidgetOffset(targetOffset) > -1);

-    } else {

-      IRegion visibleRegion = sourceViewer.getVisibleRegion();

-      // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195

-      visible = (targetOffset >= visibleRegion.getOffset() && targetOffset <= visibleRegion

-              .getOffset() + visibleRegion.getLength());

-    }

-

-    if (!visible) {

-      setStatusLineErrorMessage("Matching bracket is outside selected element");

-      sourceViewer.getTextWidget().getDisplay().beep();

-      return;

-    }

-

-    if (selection.getLength() < 0)

-      targetOffset -= selection.getLength();

-

-    sourceViewer.setSelectedRange(targetOffset, selection.getLength());

-    sourceViewer.revealRange(targetOffset, selection.getLength());

-  }

-

-  @Override

-  protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {

-    bracketMatcher = new RutaPairMatcher(BRACKETS, this);

-    support.setCharacterPairMatcher(bracketMatcher);

-    support.setMatchingCharacterPainterPreferenceKeys(MATCHING_BRACKETS, MATCHING_BRACKETS_COLOR);

-

-    super.configureSourceViewerDecorationSupport(support);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaOutlinePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaOutlinePage.java
deleted file mode 100644
index 2eafb72..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/editor/RutaOutlinePage.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.ide.ui.editor;

-

-import java.util.ArrayList;

-

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.internal.ui.editor.ScriptEditor;

-import org.eclipse.dltk.internal.ui.editor.ScriptOutlinePage;

-import org.eclipse.dltk.ui.DLTKPluginImages;

-import org.eclipse.dltk.ui.actions.MemberFilterActionGroup;

-import org.eclipse.dltk.ui.viewsupport.MemberFilterAction;

-import org.eclipse.dltk.ui.viewsupport.ModelElementFilter;

-import org.eclipse.jface.action.IToolBarManager;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.ui.IActionBars;

-

-public class RutaOutlinePage extends ScriptOutlinePage {

-

-  public RutaOutlinePage(ScriptEditor editor, IPreferenceStore store) {

-    super(editor, store);

-  }

-

-  @Override

-  protected void registerSpecialToolbarActions(IActionBars actionBars) {

-    IToolBarManager toolBarManager = actionBars.getToolBarManager();

-

-    MemberFilterActionGroup fMemberFilterActionGroup = new MemberFilterActionGroup(fOutlineViewer,

-            fStore);

-

-    String title, helpContext;

-    ArrayList actions = new ArrayList(3);

-

-    // fill-in actions variables

-

-    title = ActionMessages.MemberFilterActionGroup_hide_variables_label;

-    // TODO help support

-    helpContext = "";// IDLTKHelpContextIds.FILTER_FIELDS_ACTION;

-    MemberFilterAction hideVariables = new MemberFilterAction(fMemberFilterActionGroup, title,

-            new ModelElementFilter(IModelElement.FIELD), helpContext, true);

-    hideVariables.setDescription(ActionMessages.MemberFilterActionGroup_hide_variables_description);

-    hideVariables.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_variables_tooltip);

-    DLTKPluginImages.setLocalImageDescriptors(hideVariables, "filter_fields.gif"); //$NON-NLS-1$

-    actions.add(hideVariables);

-

-    // procedures

-

-    title = ActionMessages.MemberFilterActionGroup_hide_functions_label;

-    // TODO help support

-    helpContext = "";// IDLTKHelpContextIds.FILTER_STATIC_ACTION;

-    MemberFilterAction hideProcedures = new MemberFilterAction(fMemberFilterActionGroup, title,

-            new ModelElementFilter(IModelElement.METHOD), helpContext, true);

-    hideProcedures

-            .setDescription(ActionMessages.MemberFilterActionGroup_hide_functions_description);

-    hideProcedures.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_functions_tooltip);

-    // TODO: add correct icon

-    DLTKPluginImages.setLocalImageDescriptors(hideProcedures, "filter_methods.gif"); //$NON-NLS-1$

-    actions.add(hideProcedures);

-

-    // namespaces

-

-    title = ActionMessages.MemberFilterActionGroup_hide_classes_label;

-    // TODO help support

-    helpContext = "";// IDLTKHelpContextIds.FILTER_PUBLIC_ACTION;

-    MemberFilterAction hideNamespaces = new MemberFilterAction(fMemberFilterActionGroup, title,

-            new ModelElementFilter(IModelElement.TYPE), helpContext, true);

-    hideNamespaces.setDescription(ActionMessages.MemberFilterActionGroup_hide_classes_description);

-    hideNamespaces.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_classes_tooltip);

-    DLTKPluginImages.setLocalImageDescriptors(hideNamespaces, "filter_classes.gif"); //$NON-NLS-1$

-    actions.add(hideNamespaces);

-

-    // order corresponds to order in toolbar

-    MemberFilterAction[] fFilterActions = (MemberFilterAction[]) actions

-            .toArray(new MemberFilterAction[actions.size()]);

-

-    fMemberFilterActionGroup.setActions(fFilterActions);

-

-    fMemberFilterActionGroup.contributeToToolBar(toolBarManager);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleClassVariablesHandler.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleClassVariablesHandler.java
deleted file mode 100644
index 66cca4b..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleClassVariablesHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.ui.handlers;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.dltk.debug.ui.handlers.AbstractToggleClassVariableHandler;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class ToggleClassVariablesHandler extends AbstractToggleClassVariableHandler {

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId()

-   */

-  @Override

-  protected String getModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore()

-   */

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleGlobalVariablesHandler.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleGlobalVariablesHandler.java
deleted file mode 100644
index ee36935..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleGlobalVariablesHandler.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.ide.ui.handlers;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.dltk.debug.ui.handlers.AbstractToggleGlobalVariableHandler;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class ToggleGlobalVariablesHandler extends AbstractToggleGlobalVariableHandler {

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId()

-   */

-  @Override

-  protected String getModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore()

-   */

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleLocalVariablesHandler.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleLocalVariablesHandler.java
deleted file mode 100644
index 85c38c0..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/handlers/ToggleLocalVariablesHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.ui.handlers;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.debug.RutaDebugConstants;

-import org.eclipse.dltk.debug.ui.handlers.AbstractToggleLocalVariableHandler;

-import org.eclipse.dltk.ui.PreferencesAdapter;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class ToggleLocalVariablesHandler extends AbstractToggleLocalVariableHandler {

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getModelId()

-   */

-  @Override

-  protected String getModelId() {

-    return RutaDebugConstants.DEBUG_MODEL_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.debug.ui.handlers.AbstractToggleVariableHandler#getPreferenceStore()

-   */

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/hierarchy/RutaHierarchyInformationControl.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/hierarchy/RutaHierarchyInformationControl.java
deleted file mode 100644
index e813546..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/hierarchy/RutaHierarchyInformationControl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.ide.ui.hierarchy;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.internal.ui.typehierarchy.HierarchyInformationControl;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.swt.widgets.Shell;

-

-public class RutaHierarchyInformationControl extends HierarchyInformationControl {

-

-  public RutaHierarchyInformationControl(Shell parent, int shellStyle, int treeStyle) {

-    super(parent, shellStyle, treeStyle);

-  }

-

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/infoviews/RutaDocumentationView.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/infoviews/RutaDocumentationView.java
deleted file mode 100644
index 83ca136..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/infoviews/RutaDocumentationView.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.ide.ui.infoviews;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.ui.infoviews.AbstractDocumentationView;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaDocumentationView extends AbstractDocumentationView {

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-

-  @Override

-  protected String getNature() {

-    return RutaNature.NATURE_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/Messages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/Messages.java
deleted file mode 100644
index e27eca0..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/Messages.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.ruta.ide.ui.preferences;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.ui.formatter.messages";
-
-  public static String RutaFormatterPreferencePage_description;
-  static {
-    // init resource bundle
-    NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-  }
-
-  private Messages() {
-  }
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuildPathsBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuildPathsBlock.java
deleted file mode 100644
index 48b0795..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuildPathsBlock.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.util.IStatusChangeListener;

-import org.eclipse.dltk.ui.wizards.BuildpathsBlock;

-import org.eclipse.jface.operation.IRunnableContext;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;

-

-public class RutaBuildPathsBlock extends BuildpathsBlock {

-  public RutaBuildPathsBlock(IRunnableContext runnableContext, IStatusChangeListener context,

-          int pageToShow, boolean useNewPage, IWorkbenchPreferenceContainer pageContainer) {

-    super(runnableContext, context, pageToShow, useNewPage, pageContainer);

-  }

-

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-

-  @Override

-  protected boolean supportZips() {

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuilderPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuilderPreferencePage.java
deleted file mode 100644
index d4774eb..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuilderPreferencePage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.FieldEditorPreferencePage;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-/**

- * Preference page to manage preferences for the ide plugin.

- */

-public class RutaBuilderPreferencePage extends FieldEditorPreferencePage implements

-        IWorkbenchPreferencePage {

-

-  private BooleanFieldEditor builderImport;

-

-  private FieldEditor builderResolve;

-

-  private BooleanFieldEditor builderShortNames;

-

-  private BooleanFieldEditor compressWordLists;

-

-  public RutaBuilderPreferencePage() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-    setDescription("Builder");

-  }

-

-  @Override

-  protected void createFieldEditors() {

-    builderResolve = new BooleanFieldEditor(RutaCorePreferences.BUILDER_RESOLVE_IMPORTS,

-            RutaPreferencesMessages.BuilderResolveImports, getFieldEditorParent());

-    addField(builderResolve);

-

-    builderImport = new BooleanFieldEditor(RutaCorePreferences.BUILDER_IMPORT_BY_NAME,

-            RutaPreferencesMessages.BuilderImportByName, getFieldEditorParent());

-    addField(builderImport);

-

-    builderShortNames = new BooleanFieldEditor(

-            RutaCorePreferences.BUILDER_IGNORE_DUPLICATE_SHORTNAMES,

-            RutaPreferencesMessages.BuilderIgnoreDuplicateShortnames, getFieldEditorParent());

-    addField(builderShortNames);

-    

-    compressWordLists = new BooleanFieldEditor(

-            RutaCorePreferences.COMPRESS_WORDLISTS,

-            RutaPreferencesMessages.CompressWordLists, getFieldEditorParent());

-    addField(compressWordLists);

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuildpathPropertyPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuildpathPropertyPage.java
deleted file mode 100644
index a013fbe..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaBuildpathPropertyPage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.core.RutaLanguageToolkit;

-import org.eclipse.dltk.core.IDLTKLanguageToolkit;

-import org.eclipse.dltk.ui.preferences.BuildPathsPropertyPage;

-import org.eclipse.dltk.ui.util.BusyIndicatorRunnableContext;

-import org.eclipse.dltk.ui.wizards.BuildpathsBlock;

-import org.eclipse.ui.IWorkbenchPropertyPage;

-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;

-

-public class RutaBuildpathPropertyPage extends BuildPathsPropertyPage implements

-        IWorkbenchPropertyPage {

-  public RutaBuildpathPropertyPage() {

-  }

-

-  @Override

-  protected BuildpathsBlock createBuildPathBlock(IWorkbenchPreferenceContainer pageContainer) {

-    return new RutaBuildPathsBlock(new BusyIndicatorRunnableContext(), this, getSettings().getInt(

-            INDEX), false, pageContainer);

-  }

-

-  public IDLTKLanguageToolkit getLanguageToolkit() {

-    return RutaLanguageToolkit.getDefault();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaConsolePreferenceInitializer.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaConsolePreferenceInitializer.java
deleted file mode 100644
index d2205d8..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaConsolePreferenceInitializer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.console.RutaConsoleConstants;

-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaConsolePreferenceInitializer extends AbstractPreferenceInitializer {

-

-  public RutaConsolePreferenceInitializer() {

-  }

-

-  public void initializeDefaultPreferences() {

-    IPreferenceStore store = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    store.setDefault(RutaConsoleConstants.PREF_NEW_PROMPT, RutaConsoleConstants.DEFAULT_NEW_PROMPT);

-    store.setDefault(RutaConsoleConstants.PREF_CONTINUE_PROMPT,

-            RutaConsoleConstants.DEFAULT_CONTINUE_PROMPT);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaConsolePreferences.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaConsolePreferences.java
deleted file mode 100644
index b5c2e22..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaConsolePreferences.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.console.RutaConsoleConstants;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.ModifyEvent;

-import org.eclipse.swt.events.ModifyListener;

-import org.eclipse.swt.graphics.Font;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Group;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Text;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class RutaConsolePreferences extends PreferencePage implements IWorkbenchPreferencePage {

-

-  private Text newPrompt;

-

-  private Text appendPrompt;

-

-  @Override

-  protected IPreferenceStore doGetPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-

-  protected void createPrompt(Composite parent, Object data) {

-    Font font = parent.getFont();

-

-    Group group = new Group(parent, SWT.NONE);

-    group.setLayoutData(data);

-    group.setFont(font);

-    group.setText("Prompt");

-

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 2;

-    group.setLayout(layout);

-

-    // New command

-    Label newPromptLabel = new Label(group, SWT.NONE);

-    newPromptLabel.setFont(font);

-    newPromptLabel.setText("New command:");

-

-    newPrompt = new Text(group, SWT.BORDER);

-    newPrompt.addModifyListener(new ModifyListener() {

-      public void modifyText(ModifyEvent e) {

-        validateValues();

-      }

-    });

-    newPrompt.setLayoutData(new GridData(GridData.FILL, SWT.NONE, true, false));

-

-    // Append command

-    Label appendCommandLabel = new Label(group, SWT.NONE);

-    appendCommandLabel.setFont(font);

-    appendCommandLabel.setText("Append command:");

-

-    appendPrompt = new Text(group, SWT.BORDER);

-    appendPrompt.addModifyListener(new ModifyListener() {

-      public void modifyText(ModifyEvent e) {

-        validateValues();

-      }

-    });

-    appendPrompt.setLayoutData(new GridData(GridData.FILL, SWT.NONE, true, false));

-  }

-

-  @Override

-  protected Control createContents(Composite parent) {

-    Composite top = new Composite(parent, SWT.NONE);

-

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 1;

-

-    top.setLayout(layout);

-

-    createPrompt(top, new GridData(GridData.FILL, SWT.NONE, true, false));

-

-    initializeValues();

-    validateValues();

-

-    return top;

-  }

-

-  protected void initializeValues() {

-    IPreferenceStore store = getPreferenceStore();

-

-    newPrompt.setText(store.getString(RutaConsoleConstants.PREF_NEW_PROMPT));

-

-    appendPrompt.setText(store.getString(RutaConsoleConstants.PREF_CONTINUE_PROMPT));

-  }

-

-  protected void validateValues() {

-    if (StringUtils.isEmpty(newPrompt.getText())) {

-      setErrorMessage("Empty prompt");

-      setValid(false);

-    } else if (StringUtils.isEmpty(appendPrompt.getText())) {

-      setErrorMessage("Empty prompt");

-      setValid(false);

-    } else {

-      setErrorMessage(null);

-      setValid(true);

-    }

-  }

-

-  public void init(IWorkbench workbench) {

-

-  }

-

-  @Override

-  protected void performDefaults() {

-    newPrompt.setText("=>");

-    appendPrompt.setText("->");

-  }

-

-  @Override

-  public boolean performOk() {

-    IPreferenceStore store = getPreferenceStore();

-

-    store.setValue(RutaConsoleConstants.PREF_NEW_PROMPT, newPrompt.getText());

-    store.setValue(RutaConsoleConstants.PREF_CONTINUE_PROMPT, appendPrompt.getText());

-

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaContentAssistConfigurationBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaContentAssistConfigurationBlock.java
deleted file mode 100644
index ed8131c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaContentAssistConfigurationBlock.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import java.util.ArrayList;

-

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.dltk.ui.preferences.CodeAssistConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-

-public class RutaContentAssistConfigurationBlock extends CodeAssistConfigurationBlock {

-  public RutaContentAssistConfigurationBlock(PreferencePage mainPreferencePage,

-          OverlayPreferenceStore store) {

-    super(mainPreferencePage, store);

-  }

-

-  @Override

-  protected void getOverlayKeys(ArrayList overlayKeys) {

-    super.getOverlayKeys(overlayKeys);

-

-    // overlayKeys.add(new OverlayPreferenceStore.OverlayKey(

-    // OverlayPreferenceStore.BOOLEAN,

-    // RutaPreferenceConstants.CODEASSIST_FILTER_INTERNAL_API));

-    //

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,

-            PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS));

-  }

-

-  // protected void addAutoActivationSection(Composite composite) {

-  // super.addAutoActivationSection(composite);

-  // String label = "Auto activation triggers for &TM:";

-  // addLabelledTextField(composite, label,

-  // PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS, 4, 2,

-  // false);

-  // }

-

-  @Override

-  public Control createControl(Composite parent) {

-    Composite control = (Composite) super.createControl(parent);

-

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 2;

-

-    Composite composite = createSubsection(control, null, "Filtering");

-    composite.setLayout(layout);

-

-    return control;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorAssistancePreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorAssistancePreferencePage.java
deleted file mode 100644
index 2085a60..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorAssistancePreferencePage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-

-public class RutaEditorAssistancePreferencePage extends AbstractConfigurationBlockPreferencePage {

-

-  /*

-   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-

-    return null;

-  }

-

-  /*

-   * @see

-   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()

-   */

-  @Override

-  protected void setDescription() {

-    String description = "&Code Assistance";

-    setDescription(description);

-  }

-

-  /*

-   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  @Override

-  protected Label createDescriptionLabel(Composite parent) {

-    return null; // no description for new look.

-  }

-

-  /*

-   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#

-   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)

-   */

-  @Override

-  protected IPreferenceConfigurationBlock createConfigurationBlock(

-          OverlayPreferenceStore overlayPreferenceStore) {

-    return new RutaContentAssistConfigurationBlock(this, overlayPreferenceStore);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorColoringConfigurationBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorColoringConfigurationBlock.java
deleted file mode 100644
index 9ce351d..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorColoringConfigurationBlock.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import java.io.InputStream;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;

-import org.apache.uima.ruta.ide.ui.editor.RutaDocumentSetupParticipant;

-import org.apache.uima.ruta.ide.ui.text.SimpleRutaSourceViewerConfiguration;

-import org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer;

-import org.eclipse.dltk.ui.preferences.AbstractScriptEditorColoringConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.dltk.ui.preferences.PreferencesMessages;

-import org.eclipse.dltk.ui.text.IColorManager;

-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;

-import org.eclipse.dltk.ui.text.ScriptTextTools;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.source.IOverviewRuler;

-import org.eclipse.jface.text.source.IVerticalRuler;

-import org.eclipse.jface.text.source.projection.ProjectionViewer;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class RutaEditorColoringConfigurationBlock extends

-        AbstractScriptEditorColoringConfigurationBlock implements IPreferenceConfigurationBlock {

-

-  private static final String PREVIEW_FILE_NAME = "PreviewFile.txt";

-

-  private static final String[][] fSyntaxColorListModel = new String[][] {

-      { PreferencesMessages.DLTKEditorPreferencePage_singleLineComment,

-          RutaPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR, sCommentsCategory },

-      { PreferencesMessages.DLTKEditorPreferencePage_CommentTaskTags,

-          RutaPreferenceConstants.COMMENT_TASK_TAGS, sCommentsCategory },

-      { PreferencesMessages.DLTKEditorPreferencePage_strings,

-          RutaPreferenceConstants.EDITOR_STRING_COLOR, sCoreCategory },

-

-      { PreferencesMessages.DLTKEditorPreferencePage_numbers,

-          RutaPreferenceConstants.EDITOR_NUMBER_COLOR, sCoreCategory },

-      { RutaPreferencesMessages.RutaEditorPreferencePage_condition_colors,

-          RutaPreferenceConstants.EDITOR_CONDITION_COLOR, sCoreCategory },

-

-      { RutaPreferencesMessages.RutaEditorPreferencePage_action_colors,

-          RutaPreferenceConstants.EDITOR_ACTION_COLOR, sCoreCategory },

-

-      { RutaPreferencesMessages.RutaEditorPreferencePage_declaration_colors,

-          RutaPreferenceConstants.EDITOR_DECLARATION_DEFINITION_COLOR, sCoreCategory },

-

-      { RutaPreferencesMessages.RutaEditorPreferencePage_basicsymbols_colors,

-          RutaPreferenceConstants.EDITOR_BASICSYMBOL_DEFINITION_COLOR, sCoreCategory },

-

-      { RutaPreferencesMessages.RutaEditorPreferencePage_function_colors,

-          RutaPreferenceConstants.EDITOR_FUNCTION_COLOR, sCoreCategory },

-

-      { RutaPreferencesMessages.RutaEditorPreferencePage_then_colors,

-          RutaPreferenceConstants.EDITOR_THEN_COLOR, sCoreCategory },

-

-      { RutaPreferencesMessages.TodoTaskDescription,// .

-          // DLTKEditorPreferencePage_CommentTaskTags

-          // ,

-          RutaPreferenceConstants.COMMENT_TASK_TAGS, sCommentsCategory }

-  /*

-   * { PreferencesMessages.DLTKEditorPreferencePage_variables,

-   * RutaPreferenceConstants.EDITOR_VARIABLE_COLOR, sCoreCategory }

-   */};

-

-  public RutaEditorColoringConfigurationBlock(OverlayPreferenceStore store) {

-    super(store);

-  }

-

-  @Override

-  protected String[][] getSyntaxColorListModel() {

-    return fSyntaxColorListModel;

-  }

-

-  @Override

-  protected ProjectionViewer createPreviewViewer(Composite parent, IVerticalRuler verticalRuler,

-          IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles,

-          IPreferenceStore store) {

-    return new ScriptSourceViewer(parent, verticalRuler, overviewRuler, showAnnotationsOverview,

-            styles, store);

-  }

-

-  @Override

-  protected ScriptSourceViewerConfiguration createSimpleSourceViewerConfiguration(

-          IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor,

-          boolean configureFormatter) {

-    return new SimpleRutaSourceViewerConfiguration(colorManager, preferenceStore, editor,

-            RutaPartitions.RUTA_PARTITIONING, configureFormatter);

-  }

-

-  @Override

-  protected void setDocumentPartitioning(IDocument document) {

-    RutaDocumentSetupParticipant participant = new RutaDocumentSetupParticipant();

-    participant.setup(document);

-  }

-

-  @Override

-  protected InputStream getPreviewContentReader() {

-    return getClass().getResourceAsStream(PREVIEW_FILE_NAME);

-  }

-

-  @Override

-  protected ScriptTextTools getTextTools() {

-    return RutaIdeUIPlugin.getDefault().getTextTools();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorHoverPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorHoverPreferencePage.java
deleted file mode 100644
index d8faee5..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorHoverPreferencePage.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.dltk.ui.preferences.PreferencesMessages;

-import org.eclipse.dltk.ui.preferences.ScriptEditorHoverConfigurationBlock;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-

-public class RutaEditorHoverPreferencePage extends AbstractConfigurationBlockPreferencePage {

-

-  /*

-   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-

-    return null;

-  }

-

-  /*

-   * @see

-   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()

-   */

-  @Override

-  protected void setDescription() {

-    String description = PreferencesMessages.DLTKEditorPreferencePage_hoverTab_title;

-    setDescription(description);

-  }

-

-  /*

-   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  @Override

-  protected Label createDescriptionLabel(Composite parent) {

-    return null; // no description for new look.

-  }

-

-  /*

-   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#

-   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)

-   */

-  @Override

-  protected IPreferenceConfigurationBlock createConfigurationBlock(

-          OverlayPreferenceStore overlayPreferenceStore) {

-    return new ScriptEditorHoverConfigurationBlock(this, overlayPreferenceStore,

-            RutaNature.NATURE_ID);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorPreferencesPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorPreferencesPage.java
deleted file mode 100644
index 5e997fd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorPreferencesPage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;

-import org.eclipse.dltk.ui.preferences.EditorConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-

-public class RutaEditorPreferencesPage extends AbstractConfigurationBlockPreferencePage {

-

-  /*

-   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-    return "";

-  }

-

-  /*

-   * @see

-   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()

-   */

-  @Override

-  protected void setDescription() {

-    String description = RutaPreferencesMessages.RutaEditorPreferencePage_general;

-    setDescription(description);

-  }

-

-  @Override

-  protected Label createDescriptionLabel(Composite parent) {

-    return null;

-  }

-

-  /*

-   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  /*

-   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#

-   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)

-   */

-  @Override

-  protected IPreferenceConfigurationBlock createConfigurationBlock(

-          OverlayPreferenceStore overlayPreferenceStore) {

-    return new EditorConfigurationBlock(this, overlayPreferenceStore);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorSyntaxColoringPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorSyntaxColoringPreferencePage.java
deleted file mode 100644
index a80a249..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaEditorSyntaxColoringPreferencePage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.dltk.ui.preferences.PreferencesMessages;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-

-public class RutaEditorSyntaxColoringPreferencePage extends

-        AbstractConfigurationBlockPreferencePage {

-

-  /*

-   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-    return "";

-  }

-

-  /*

-   * @see

-   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()

-   */

-  @Override

-  protected void setDescription() {

-    String description = PreferencesMessages.DLTKEditorPreferencePage_colors;

-    setDescription(description);

-  }

-

-  @Override

-  protected Label createDescriptionLabel(Composite parent) {

-    return null;

-  }

-

-  /*

-   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  /*

-   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#

-   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)

-   */

-  @Override

-  protected IPreferenceConfigurationBlock createConfigurationBlock(

-          OverlayPreferenceStore overlayPreferenceStore) {

-    return new RutaEditorColoringConfigurationBlock(overlayPreferenceStore);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFoldingConfigurationBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFoldingConfigurationBlock.java
deleted file mode 100644
index d1ea6cf..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFoldingConfigurationBlock.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.ui.text.folding.RutaFoldingPreferenceBlock;

-import org.eclipse.dltk.ui.preferences.FoldingConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.dltk.ui.text.folding.IFoldingPreferenceBlock;

-import org.eclipse.jface.preference.PreferencePage;

-

-public class RutaFoldingConfigurationBlock extends FoldingConfigurationBlock {

-

-  public RutaFoldingConfigurationBlock(OverlayPreferenceStore store, PreferencePage p) {

-    super(store, p);

-  }

-

-  @Override

-  protected IFoldingPreferenceBlock createFoldingPreferenceBlock() {

-    return new RutaFoldingPreferenceBlock(fStore, getPreferencePage());

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFoldingPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFoldingPreferencePage.java
deleted file mode 100644
index 1d8cbef..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFoldingPreferencePage.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.dltk.ui.preferences.PreferencesMessages;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-

-/**

- * The page for setting the editor options.

- */

-public final class RutaFoldingPreferencePage extends AbstractConfigurationBlockPreferencePage {

-

-  /*

-   * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()

-   */

-  @Override

-  protected String getHelpId() {

-    // return IScriptHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE;

-    return null;

-  }

-

-  /*

-   * @see

-   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()

-   */

-  @Override

-  protected void setDescription() {

-    String description = PreferencesMessages.EditorPreferencePage_folding_title;

-    setDescription(description);

-  }

-

-  /*

-   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  @Override

-  protected Label createDescriptionLabel(Composite parent) {

-    return null; // no description for new look.

-  }

-

-  /*

-   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#

-   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)

-   */

-  @Override

-  protected IPreferenceConfigurationBlock createConfigurationBlock(

-          OverlayPreferenceStore overlayPreferenceStore) {

-    return new RutaFoldingConfigurationBlock(overlayPreferenceStore, this);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFormatterPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFormatterPreferencePage.java
deleted file mode 100644
index 04dc6c0..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaFormatterPreferencePage.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.ruta.ide.ui.preferences;
-
-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;
-import org.apache.uima.ruta.ide.core.RutaNature;
-import org.apache.uima.ruta.ide.ui.RutaPartitions;
-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;
-import org.apache.uima.ruta.ide.ui.text.SimpleRutaSourceViewerConfiguration;
-import org.eclipse.dltk.ui.formatter.AbstractFormatterPreferencePage;
-import org.eclipse.dltk.ui.preferences.PreferenceKey;
-import org.eclipse.dltk.ui.text.IColorManager;
-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * Preference page for Ruta debugging engines
- */
-public class RutaFormatterPreferencePage extends AbstractFormatterPreferencePage {
-
-  private static final PreferenceKey FORMATTER = new PreferenceKey(RutaIdeUIPlugin.PLUGIN_ID,
-          RutaPreferenceConstants.FORMATTER_ID);
-
-  @Override
-  protected String getNatureId() {
-    return RutaNature.NATURE_ID;
-  }
-
-  @Override
-  protected PreferenceKey getFormatterPreferenceKey() {
-    return FORMATTER;
-  }
-
-  @Override
-  protected IDialogSettings getDialogSettings() {
-    return RutaIdeUIPlugin.getDefault().getDialogSettings();
-  }
-
-  @Override
-  protected String getPreferencePageId() {
-    return "org.apache.uima.ruta.ide.preferences.formatter"; //$NON-NLS-1$
-  }
-
-  @Override
-  protected String getPropertyPageId() {
-    return "org.apache.uima.ruta.ide.propertyPage.formatter"; //$NON-NLS-1$
-  }
-
-  @Override
-  protected ScriptSourceViewerConfiguration createSimpleSourceViewerConfiguration(
-          IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor,
-          boolean configureFormatter) {
-    return new SimpleRutaSourceViewerConfiguration(colorManager, preferenceStore, editor,
-            RutaPartitions.RUTA_PARTITIONING, configureFormatter);
-  }
-
-  @Override
-  protected void setPreferenceStore() {
-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaGlobalConfigurationBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaGlobalConfigurationBlock.java
deleted file mode 100644
index 960c1a8..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaGlobalConfigurationBlock.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-

-public class RutaGlobalConfigurationBlock extends AbstractConfigurationBlock {

-

-  public RutaGlobalConfigurationBlock(OverlayPreferenceStore store,

-          PreferencePage mainPreferencePage) {

-    super(store, mainPreferencePage);

-  }

-

-  public Control createControl(Composite parent) {

-    initializeDialogUnits(parent);

-

-    Composite composite = new Composite(parent, SWT.NONE);

-    composite.setLayout(new GridLayout());

-

-    return composite;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaGlobalPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaGlobalPreferencePage.java
deleted file mode 100644
index 917fd5a..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaGlobalPreferencePage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-

-public class RutaGlobalPreferencePage extends AbstractConfigurationBlockPreferencePage {

-

-  @Override

-  protected IPreferenceConfigurationBlock createConfigurationBlock(

-          OverlayPreferenceStore overlayPreferenceStore) {

-    return new RutaGlobalConfigurationBlock(overlayPreferenceStore, this);

-  }

-

-  @Override

-  protected String getHelpId() {

-    return null;

-  }

-

-  @Override

-  protected void setDescription() {

-    String description = RutaPreferencesMessages.RutaGlobalPreferencePage_description;

-    setDescription(description);

-  }

-

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaPreferencesMessages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaPreferencesMessages.java
deleted file mode 100644
index bc7aca8..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaPreferencesMessages.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.eclipse.osgi.util.NLS;

-

-public class RutaPreferencesMessages extends NLS {

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.ui.preferences.RutaPreferencesMessages";//$NON-NLS-1$	

-

-  

-

-  private RutaPreferencesMessages() {

-    // Do not instantiate

-  }

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, RutaPreferencesMessages.class);

-  }

-

-  public static String RutaGlobalPreferencePage_description;

-

-  public static String RutaEditorPreferencePage_general;

-

-  public static String RutaSmartTypingConfigurationBlock_typing_smartTab;

-

-  public static String RutaSmartTypingConfigurationBlock_closeBrackets;

-

-  public static String RutaSmartTypingConfigurationBlock_closeStrings;

-

-  public static String RutaSmartTypingConfigurationBlock_closeBraces;

-

-  public static String RutaSmartTypingConfigurationBlock_typing_tabTitle;

-

-  public static String RutaEditorPreferencePage_condition_colors;

-

-  public static String RutaEditorPreferencePage_action_colors;

-

-  public static String RutaEditorPreferencePage_declaration_colors;

-

-  public static String RutaEditorPreferencePage_basicsymbols_colors;

-

-  public static String RutaEditorPreferencePage_function_colors;

-

-  public static String RutaEditorPreferencePage_then_colors;

-

-  public static String RutaSmartTypingConfigurationBlock_smartPaste_full;

-

-  public static String RutaSmartTypingConfigurationBlock_smartPaste_simple;

-

-  public static String RutaSmartTypingConfigurationBlock_tabs_title;

-

-  public static String RutaSmartTypingConfigurationBlock_autoclose_title;

-

-  public static String TodoTaskDescription;

-

-  public static String BuilderResolveImports;

-

-  public static String BuilderImportByName;

-

-  public static String BuilderIgnoreDuplicateShortnames;

-

-  public static String ProjectClearOutput;

-

-  public static String NoVMInDevMode;

-  

-  public static String AddSDI;

-  

-  public static String CompressWordLists;

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaProjectPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaProjectPreferencePage.java
deleted file mode 100644
index b315156..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaProjectPreferencePage.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditorPreferencePage;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-/**

- * Preference page to manage preferences for the ide plugin.

- */

-public class RutaProjectPreferencePage extends FieldEditorPreferencePage implements

-        IWorkbenchPreferencePage {

-

-  private BooleanFieldEditor clearOutput;

-

-  private BooleanFieldEditor noVM;

-

-  private BooleanFieldEditor addSDI;

-

-  public RutaProjectPreferencePage() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-    setDescription("Project Management");

-  }

-

-  @Override

-  protected void createFieldEditors() {

-    clearOutput = new BooleanFieldEditor(RutaCorePreferences.PROJECT_CLEAR_OUTPUT,

-            RutaPreferencesMessages.ProjectClearOutput, getFieldEditorParent());

-    addField(clearOutput);

-

-    noVM = new BooleanFieldEditor(RutaCorePreferences.NO_VM_IN_DEV_MODE,

-            RutaPreferencesMessages.NoVMInDevMode, getFieldEditorParent());

-    addField(noVM);

-    

-    addSDI = new BooleanFieldEditor(RutaCorePreferences.ADD_SDI,

-            RutaPreferencesMessages.AddSDI, getFieldEditorParent());

-    addField(addSDI);

-

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaPropertyPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaPropertyPage.java
deleted file mode 100644
index aacf488..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaPropertyPage.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.dialogs.PropertyPage;

-

-public class RutaPropertyPage extends PropertyPage {

-

-  @Override

-  protected Control createContents(Composite parent) {

-    return new Composite(parent, SWT.NONE);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaSmartTypingConfigurationBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaSmartTypingConfigurationBlock.java
deleted file mode 100644
index 54cc43f..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaSmartTypingConfigurationBlock.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;

-import org.eclipse.core.runtime.Assert;

-import org.eclipse.dltk.internal.corext.util.Messages;

-import org.eclipse.dltk.ui.CodeFormatterConstants;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.dltk.ui.preferences.PreferencesMessages;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.util.IPropertyChangeListener;

-import org.eclipse.jface.util.PropertyChangeEvent;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.DisposeListener;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Link;

-import org.eclipse.ui.dialogs.PreferencesUtil;

-

-/**

- * Configures Editor typing preferences.

- */

-class RutaSmartTypingConfigurationBlock extends AbstractConfigurationBlock {

-

-  public RutaSmartTypingConfigurationBlock(OverlayPreferenceStore store) {

-    super(store);

-

-    store.addKeys(createOverlayStoreKeys());

-  }

-

-  private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {

-

-    List keys = new ArrayList();

-

-    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            PreferenceConstants.EDITOR_CLOSE_STRINGS));

-    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            PreferenceConstants.EDITOR_CLOSE_BRACKETS));

-    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            PreferenceConstants.EDITOR_CLOSE_BRACES));

-    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            PreferenceConstants.EDITOR_SMART_TAB));

-    keys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,

-            RutaPreferenceConstants.EDITOR_SMART_PASTE_MODE));

-

-    return (OverlayPreferenceStore.OverlayKey[]) keys

-            .toArray(new OverlayPreferenceStore.OverlayKey[keys.size()]);

-  }

-

-  public Control createControl(Composite parent) {

-    Composite control = new Composite(parent, SWT.NONE);

-    GridLayout layout = new GridLayout();

-    control.setLayout(layout);

-

-    Composite composite = createSubsection(control, null,

-            RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_autoclose_title);

-    addAutoclosingSection(composite);

-

-    composite = createSubsection(control, null,

-            RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_tabs_title);

-    addTabSection(composite);

-

-    composite = createSubsection(control, null,

-            PreferencesMessages.SmartTypingConfigurationBlock_pasting_title);

-    addPasteSection(composite);

-

-    return control;

-  }

-

-  private void addPasteSection(Composite composite) {

-    GridLayout layout = new GridLayout();

-    composite.setLayout(layout);

-

-    String label = null;

-

-    label = RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_smartPaste_simple;

-    addRadioButton(composite, label, RutaPreferenceConstants.EDITOR_SMART_PASTE_MODE,

-            RutaPreferenceConstants.EDITOR_SMART_PASTE_MODE_SIMPLE);

-

-    label = RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_smartPaste_full;

-    addRadioButton(composite, label, RutaPreferenceConstants.EDITOR_SMART_PASTE_MODE,

-            RutaPreferenceConstants.EDITOR_SMART_PASTE_MODE_FULL);

-

-  }

-

-  private void addTabSection(Composite composite) {

-    GridLayout layout = new GridLayout();

-    composite.setLayout(layout);

-

-    String label;

-    label = RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_typing_smartTab;

-    addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_TAB, 0);

-

-    createMessage(composite);

-  }

-

-  private void addAutoclosingSection(Composite composite) {

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 1;

-    composite.setLayout(layout);

-

-    String label;

-

-    label = RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_closeStrings;

-    addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_STRINGS, 0);

-

-    label = RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_closeBrackets;

-    addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_BRACKETS, 0);

-

-    label = RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_closeBraces;

-    addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_BRACES, 0);

-  }

-

-  private void createMessage(final Composite composite) {

-    // TODO create a link with an argument, so the formatter preference page

-    // can open the

-    // current profile automatically.

-    String linkTooltip = PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tooltip;

-    String text;

-    String indentMode = RutaIdeUIPlugin.getDefault().getPreferenceStore()

-            .getString(CodeFormatterConstants.FORMATTER_TAB_CHAR);

-    if (CodeFormatterConstants.TAB.equals(indentMode))

-      text = Messages.format(

-              PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tab_text,

-              new String[] { Integer.toString(getTabDisplaySize()) });

-    else

-      text = Messages.format(

-              PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_others_text,

-              new String[] { Integer.toString(getTabDisplaySize()), getIndentMode() });

-

-    final Link link = new Link(composite, SWT.NONE);

-    link.setText(text);

-    link.setToolTipText(linkTooltip);

-    GridData gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false);

-    gd.widthHint = 300; // don't get wider initially

-    link.setLayoutData(gd);

-    link.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent e) {

-        PreferencesUtil.createPreferenceDialogOn(link.getShell(),

-                "org.apache.uima.ruta.ide.ui.EditorPreferences", null, null); //$NON-NLS-1$

-      }

-    });

-

-    final IPreferenceStore combinedStore = getPreferenceStore();

-    final IPropertyChangeListener propertyChangeListener = new IPropertyChangeListener() {

-      private boolean fHasRun = false;

-

-      public void propertyChange(PropertyChangeEvent event) {

-        if (fHasRun)

-          return;

-        if (composite.isDisposed())

-          return;

-        String property = event.getProperty();

-        if (CodeFormatterConstants.FORMATTER_TAB_CHAR.equals(property)

-                || CodeFormatterConstants.FORMATTER_TAB_SIZE.equals(property)) {

-          fHasRun = true;

-          link.dispose();

-          createMessage(composite);

-          Dialog.applyDialogFont(composite);

-          composite.redraw();

-          composite.layout();

-        }

-      }

-    };

-    combinedStore.addPropertyChangeListener(propertyChangeListener);

-    link.addDisposeListener(new DisposeListener() {

-      public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e) {

-        combinedStore.removePropertyChangeListener(propertyChangeListener);

-      }

-    });

-  }

-

-  private String getIndentMode() {

-    String indentMode = RutaIdeUIPlugin.getDefault().getPreferenceStore()

-            .getString(CodeFormatterConstants.FORMATTER_TAB_CHAR);

-

-    if (CodeFormatterConstants.SPACE.equals(indentMode))

-      return PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_spaces;

-

-    if (CodeFormatterConstants.TAB.equals(indentMode))

-      return PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tabs;

-

-    if (CodeFormatterConstants.MIXED.equals(indentMode))

-      return PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tabsAndSpaces;

-

-    Assert.isTrue(false, "Illegal indent mode - must not happen"); //$NON-NLS-1$

-    return null;

-  }

-

-  private int getTabDisplaySize() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore()

-            .getInt(CodeFormatterConstants.FORMATTER_TAB_SIZE);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaSmartTypingPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaSmartTypingPreferencePage.java
deleted file mode 100644
index 4ae3eb7..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaSmartTypingPreferencePage.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*

- * 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.ruta.ide.ui.preferences;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;

-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-

-public class RutaSmartTypingPreferencePage extends AbstractConfigurationBlockPreferencePage {

-

-  /*

-   * @see

-   * org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()

-   */

-  @Override

-  protected void setDescription() {

-    String description = RutaPreferencesMessages.RutaSmartTypingConfigurationBlock_typing_tabTitle;

-    setDescription(description);

-  }

-

-  /*

-   * @seeorg.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#

-   * setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  @Override

-  protected Label createDescriptionLabel(Composite parent) {

-    return null; // no description for new look.

-  }

-

-  /*

-   * @seeorg.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#

-   * createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)

-   */

-  @Override

-  protected IPreferenceConfigurationBlock createConfigurationBlock(

-          OverlayPreferenceStore overlayPreferenceStore) {

-    return new RutaSmartTypingConfigurationBlock(overlayPreferenceStore);

-  }

-

-  @Override

-  protected String getHelpId() {

-    return "";

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaTodoTaskPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaTodoTaskPreferencePage.java
deleted file mode 100644
index a02767c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/preferences/RutaTodoTaskPreferencePage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.ruta.ide.ui.preferences;
-
-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;
-import org.apache.uima.ruta.ide.core.RutaNature;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.dltk.ui.PreferencesAdapter;
-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPropertyAndPreferencePage;
-import org.eclipse.dltk.ui.preferences.AbstractOptionsBlock;
-import org.eclipse.dltk.ui.preferences.AbstractTodoTaskOptionsBlock;
-import org.eclipse.dltk.ui.preferences.PreferenceKey;
-import org.eclipse.dltk.ui.util.IStatusChangeListener;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-public class RutaTodoTaskPreferencePage extends AbstractConfigurationBlockPropertyAndPreferencePage {
-
-  static final PreferenceKey CASE_SENSITIVE = AbstractTodoTaskOptionsBlock
-          .createCaseSensitiveKey(RutaIdeUIPlugin.PLUGIN_ID);
-
-  static final PreferenceKey ENABLED = AbstractTodoTaskOptionsBlock
-          .createEnabledKey(RutaIdeUIPlugin.PLUGIN_ID);
-
-  static final PreferenceKey TAGS = AbstractTodoTaskOptionsBlock
-          .createTagKey(RutaIdeUIPlugin.PLUGIN_ID);
-
-  protected PreferenceKey[] getPreferenceKeys() {
-    return new PreferenceKey[] { TAGS, ENABLED, CASE_SENSITIVE };
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage #getHelpId()
-   */
-  @Override
-  protected String getHelpId() {
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage #setDescription()
-   */
-  @Override
-  protected void setDescription() {
-    setDescription(RutaPreferencesMessages.TodoTaskDescription);
-  }
-
-  protected Preferences getPluginPreferences() {
-    return RutaIdeUIPlugin.getDefault().getPluginPreferences();
-  }
-
-  @Override
-  protected AbstractOptionsBlock createOptionsBlock(IStatusChangeListener newStatusChangedListener,
-          IProject project, IWorkbenchPreferenceContainer container) {
-    return new AbstractTodoTaskOptionsBlock(newStatusChangedListener, project, getPreferenceKeys(),
-            container) {
-      @Override
-      protected PreferenceKey getTags() {
-        return TAGS;
-      }
-
-      @Override
-      protected PreferenceKey getEnabledKey() {
-        return ENABLED;
-      }
-
-      @Override
-      protected PreferenceKey getCaseSensitiveKey() {
-        return CASE_SENSITIVE;
-      }
-    };
-  }
-
-  @Override
-  protected String getNatureId() {
-    return RutaNature.NATURE_ID;
-  }
-
-  @Override
-  protected String getProjectHelpId() {
-    return null;
-  }
-
-  @Override
-  protected void setPreferenceStore() {
-    setPreferenceStore(new PreferencesAdapter(RutaIdeUIPlugin.getDefault().getPluginPreferences()));
-  }
-
-  @Override
-  protected String getPreferencePageId() {
-    return "org.apache.uima.ruta.ide.preferences.todo";
-  }
-
-  @Override
-  protected String getPropertyPageId() {
-    return "org.apache.uima.ruta.ide.propertyPage.todo";
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/search/RutaSearchPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/search/RutaSearchPage.java
deleted file mode 100644
index f44a658..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/search/RutaSearchPage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * 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.ruta.ide.ui.search;

-

-import org.apache.uima.ruta.ide.core.RutaLanguageToolkit;

-import org.eclipse.dltk.core.IDLTKLanguageToolkit;

-import org.eclipse.dltk.ui.search.ScriptSearchPage;

-

-public class RutaSearchPage extends ScriptSearchPage {

-  @Override

-  protected IDLTKLanguageToolkit getLanguageToolkit() {

-    return RutaLanguageToolkit.getDefault();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaCodeTemplatesPreferencePage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaCodeTemplatesPreferencePage.java
deleted file mode 100644
index 0f3b7df..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaCodeTemplatesPreferencePage.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*

- * 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.ruta.ide.ui.templates;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.apache.uima.ruta.ide.ui.text.RutaTextTools;

-import org.apache.uima.ruta.ide.ui.text.SimpleRutaSourceViewerConfiguration;

-import org.eclipse.dltk.ui.templates.ScriptTemplateAccess;

-import org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage;

-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;

-import org.eclipse.jface.text.IDocument;

-

-/**

- * Ruta code templates preference page

- */

-public class RutaCodeTemplatesPreferencePage extends ScriptTemplatePreferencePage {

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#createSourceViewerConfiguration()

-   */

-  @Override

-  protected ScriptSourceViewerConfiguration createSourceViewerConfiguration() {

-    return new SimpleRutaSourceViewerConfiguration(getTextTools().getColorManager(),

-            getPreferenceStore(), null, RutaPartitions.RUTA_PARTITIONING, false);

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#setDocumentParticioner(org.eclipse

-   * .jface.text.IDocument)

-   */

-  @Override

-  protected void setDocumentParticioner(IDocument document) {

-    getTextTools().setupDocumentPartitioner(document, RutaPartitions.RUTA_PARTITIONING);

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#setPreferenceStore()

-   */

-  @Override

-  protected void setPreferenceStore() {

-    setPreferenceStore(RutaIdeUIPlugin.getDefault().getPreferenceStore());

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#getTemplateAccess()

-   */

-  @Override

-  protected ScriptTemplateAccess getTemplateAccess() {

-    return RutaTemplateAccess.getInstance();

-  }

-

-  private RutaTextTools getTextTools() {

-    return RutaIdeUIPlugin.getDefault().getTextTools();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateAccess.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateAccess.java
deleted file mode 100644
index c36bf40..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateAccess.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.ide.ui.templates;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.templates.ScriptTemplateAccess;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-/**

- * Provides access to Ruta template store.

- */

-public class RutaTemplateAccess extends ScriptTemplateAccess {

-  // Template

-  private static final String CUSTOM_TEMPLATES_KEY = "org.eclipse.ruta.Templates";

-

-  private static RutaTemplateAccess instance;

-

-  public static RutaTemplateAccess getInstance() {

-    if (instance == null) {

-      instance = new RutaTemplateAccess();

-    }

-

-    return instance;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getContextTypeId()

-   */

-  @Override

-  protected String getContextTypeId() {

-    return RutaUniversalTemplateContextType.CONTEXT_TYPE_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getCustomTemplatesKey()

-   */

-  @Override

-  protected String getCustomTemplatesKey() {

-    return CUSTOM_TEMPLATES_KEY;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getPreferenceStore()

-   */

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateCompletionProcessor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateCompletionProcessor.java
deleted file mode 100644
index 481fca2..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateCompletionProcessor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * 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.ruta.ide.ui.templates;

-

-import org.eclipse.dltk.ui.templates.ScriptTemplateAccess;

-import org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor;

-import org.eclipse.dltk.ui.text.completion.ScriptContentAssistInvocationContext;

-

-public class RutaTemplateCompletionProcessor extends ScriptTemplateCompletionProcessor {

-

-  private static char[] IGNORE = new char[] { '.' };

-

-  public RutaTemplateCompletionProcessor(ScriptContentAssistInvocationContext context) {

-    super(context);

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor#getContextTypeId()

-   */

-  @Override

-  protected String getContextTypeId() {

-    return RutaUniversalTemplateContextType.CONTEXT_TYPE_ID;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor#getTemplateAccess()

-   */

-  @Override

-  protected ScriptTemplateAccess getTemplateAccess() {

-    return RutaTemplateAccess.getInstance();

-  }

-

-  @Override

-  protected char[] getIgnore() {

-    return IGNORE;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateContext.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateContext.java
deleted file mode 100644
index c4d3c27..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaTemplateContext.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * 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.ruta.ide.ui.templates;

-

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.ui.templates.ScriptTemplateContext;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.templates.TemplateContextType;

-

-public class RutaTemplateContext extends ScriptTemplateContext {

-

-  public RutaTemplateContext(TemplateContextType type, IDocument document, int completionOffset,

-          int completionLength, ISourceModule sourceModule) {

-    super(type, document, completionOffset, completionLength, sourceModule);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaUniversalTemplateContextType.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaUniversalTemplateContextType.java
deleted file mode 100644
index 2a2abaa..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/templates/RutaUniversalTemplateContextType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.ide.ui.templates;

-

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.ui.templates.ScriptTemplateContext;

-import org.eclipse.dltk.ui.templates.ScriptTemplateContextType;

-import org.eclipse.jface.text.IDocument;

-

-public class RutaUniversalTemplateContextType extends ScriptTemplateContextType {

-  public static final String CONTEXT_TYPE_ID = "rutaUniversalTemplateContextType";

-

-  public RutaUniversalTemplateContextType() {

-    // empty constructor

-  }

-

-  public RutaUniversalTemplateContextType(String id) {

-    super(id);

-  }

-

-  public RutaUniversalTemplateContextType(String id, String name) {

-    super(id, name);

-  }

-

-  @Override

-  public ScriptTemplateContext createContext(IDocument document, int offset, int length,

-          ISourceModule sourceModule) {

-    return new RutaTemplateContext(this, document, offset, length, sourceModule);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/ExternalTypeHyperlink.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/ExternalTypeHyperlink.java
deleted file mode 100644
index a3d1dd2..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/ExternalTypeHyperlink.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.core.resources.IFile;

-import org.eclipse.dltk.internal.ui.editor.DLTKEditorMessages;

-import org.eclipse.jface.text.IRegion;

-import org.eclipse.jface.text.hyperlink.IHyperlink;

-import org.eclipse.ui.IWorkbenchPage;

-import org.eclipse.ui.PartInitException;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.part.FileEditorInput;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class ExternalTypeHyperlink implements IHyperlink {

-  private final IRegion region;

-

-  private final IFile file;

-

-  private final String nodeText;

-

-  private final String tsString;

-

-  private final ITextEditor textEditor;

-

-  public ExternalTypeHyperlink(String nodeText, IRegion region, IFile file, String tsString,

-          ITextEditor textEditor) {

-    this.nodeText = nodeText;

-    this.region = region;

-    this.file = file;

-    this.tsString = tsString;

-    this.textEditor = textEditor;

-  }

-

-  public IRegion getHyperlinkRegion() {

-    return region;

-  }

-

-  public String getHyperlinkText() {

-    return nodeText + " in " + tsString;

-  }

-

-  public String getTypeLabel() {

-    return DLTKEditorMessages.ModelElementHyperlink_typeLabel;

-  }

-

-  public void open() {

-    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();

-    try {

-      page.openEditor(new FileEditorInput(file), "taeconfigurator.editors.MultiPageEditor");

-    } catch (PartInitException e) {

-      e.printStackTrace();

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/ExternalTypeHyperlinkDetector.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/ExternalTypeHyperlinkDetector.java
deleted file mode 100644
index 26c9615..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/ExternalTypeHyperlinkDetector.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.io.IOException;

-import java.net.MalformedURLException;

-import java.net.URL;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Set;

-import java.util.TreeSet;

-

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.ide.core.codeassist.RutaReferenceVisitor;

-import org.apache.uima.ruta.ide.core.codeassist.RutaSelectionParser;

-import org.apache.uima.ruta.ide.parser.ast.RutaModuleDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.runtime.Assert;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.compiler.env.ISourceModule;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.internal.ui.editor.EditorUtility;

-import org.eclipse.dltk.internal.ui.editor.ScriptEditor;

-import org.eclipse.dltk.internal.ui.text.ScriptWordFinder;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.IRegion;

-import org.eclipse.jface.text.ITextViewer;

-import org.eclipse.jface.text.hyperlink.IHyperlink;

-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class ExternalTypeHyperlinkDetector implements IHyperlinkDetector {

-  private ITextEditor fTextEditor;

-

-  public ExternalTypeHyperlinkDetector(ITextEditor editor) {

-    Assert.isNotNull(editor);

-    fTextEditor = editor;

-  }

-

-  public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region,

-          boolean canShowMultipleHyperlinks) {

-    if (region == null || !(fTextEditor instanceof ScriptEditor))

-      return null;

-

-    int offset = region.getOffset();

-

-    IModelElement input = EditorUtility.getEditorInputModelElement(fTextEditor, false);

-    if (input == null)

-      return null;

-

-    try {

-      IDocument document = fTextEditor.getDocumentProvider().getDocument(

-              fTextEditor.getEditorInput());

-      IRegion wordRegion = ScriptWordFinder.findWord(document, offset);

-      if (wordRegion == null)

-        return null;

-      if (input instanceof ISourceModule) {

-        ISourceModule sm = (ISourceModule) input;

-        IModelElement modelElement = sm.getModelElement();

-        RutaSelectionParser parser = new RutaSelectionParser();

-        ModuleDeclaration moduleDeclaration = parser.parse(sm);

-        String word = document.get(wordRegion.getOffset(), wordRegion.getLength());

-        RutaReferenceVisitor referenceVisitor = new RutaReferenceVisitor(wordRegion.getOffset());

-        moduleDeclaration.traverse(referenceVisitor);

-        ASTNode node = referenceVisitor.getResult();

-        if (node instanceof RutaVariableReference

-                && moduleDeclaration instanceof RutaModuleDeclaration) {

-          RutaVariableReference vr = (RutaVariableReference) node;

-          RutaModuleDeclaration parsed = (RutaModuleDeclaration) moduleDeclaration;

-          if (vr.getType() == RutaTypeConstants.RUTA_TYPE_AT) {

-            String nodeText = vr.getStringRepresentation();

-            Collection<String> importedTypeSystems = parsed.descriptorInfo.getImportedTypeSystems();

-            List<IHyperlink> result = new ArrayList<IHyperlink>();

-            for (String tsString : importedTypeSystems) {

-              String xmlFilePath = tsString.replaceAll("\\.", "/");

-              xmlFilePath = xmlFilePath.substring(0, xmlFilePath.length()) + ".xml";

-              Set<String> types = new TreeSet<String>();

-              List<IFolder> descriptorFolders = RutaProjectUtils.getDescriptorFolders(modelElement.getScriptProject().getProject());

-              for (IFolder eachFolder : descriptorFolders) {

-                types.addAll(getTypes(eachFolder, xmlFilePath));

-                if (types.contains(nodeText)) {

-                  IFile iFile = getFile(eachFolder, xmlFilePath);

-                  IHyperlink link = new ExternalTypeHyperlink(nodeText, wordRegion, iFile, tsString,

-                          fTextEditor);

-                  result.add(link);

-                }

-              }  

-            }

-            if (!result.isEmpty()) {

-              return result.toArray(new IHyperlink[] {});

-            } else {

-              return null;

-            }

-          }

-        }

-      }

-    } catch (Exception e) {

-      return null;

-    }

-    return null;

-  }

-

-  private Set<String> getTypes(IFolder folder, String filePath) throws InvalidXMLException,

-          IOException {

-    Set<String> types = new HashSet<String>();

-    IFile iFile = getFile(folder, filePath);

-    URL url;

-    try {

-      url = iFile.getLocationURI().toURL();

-      ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();

-      resMgr.setDataPath(folder.getLocation().toPortableString());

-      types = getTypes(url, resMgr);

-    } catch (MalformedURLException e) {

-      e.printStackTrace();

-    }

-    return types;

-  }

-

-  private Set<String> getTypes(URL resource, ResourceManager resMgr) throws IOException,

-          InvalidXMLException {

-    Set<String> types = new HashSet<String>();

-    TypeSystemDescription typeSysDescr = null;

-    typeSysDescr = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-            new XMLInputSource(resource));

-    typeSysDescr.resolveImports(resMgr);

-    for (TypeDescription each : typeSysDescr.getTypes()) {

-      String name = each.getName();

-      String[] nameSpace = name.split("[.]");

-      types.add(nameSpace[nameSpace.length - 1]);

-      StringBuffer fullName = new StringBuffer();

-      if (nameSpace.length > 0) {

-        fullName.append(nameSpace[0]);

-      }

-      for (int i = 1; i < nameSpace.length; i++) {

-        // TODO fix workaround

-        if (!nameSpace[i].equals("type")) {

-          fullName.append('.');

-          fullName.append(nameSpace[i]);

-        }

-      }

-      types.add(fullName.toString());

-    }

-    return types;

-  }

-

-  private IFile getFile(IFolder folder, String filePath) {

-    int lastDot = filePath.lastIndexOf('.');

-    int sndLastDot = filePath.lastIndexOf('.', lastDot - 1);

-    String fName = filePath;

-    if (sndLastDot >= 0) {

-      String subFolder = filePath.substring(0, sndLastDot);

-      folder = folder.getFolder(subFolder);

-      fName = filePath.substring(sndLastDot + 1);

-    }

-    return folder.getFile(fName);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/Messages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/Messages.java
deleted file mode 100644
index a8bf327..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/Messages.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.osgi.util.NLS;

-

-public class Messages extends NLS {

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.ui.text.messages"; //$NON-NLS-1$

-

-  public static String RutaRequirePackageMarkerResolution_addPackageToBuildpath;

-  static {

-    // initialize resource bundle

-    NLS.initializeMessages(BUNDLE_NAME, Messages.class);

-  }

-

-  private Messages() {

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaAutoEditStrategy.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaAutoEditStrategy.java
deleted file mode 100644
index 7d3f1ef..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaAutoEditStrategy.java
+++ /dev/null
@@ -1,910 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.regex.Pattern;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.ui.CodeFormatterConstants;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy;

-import org.eclipse.jface.text.Document;

-import org.eclipse.jface.text.DocumentCommand;

-import org.eclipse.jface.text.DocumentRewriteSession;

-import org.eclipse.jface.text.DocumentRewriteSessionType;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.ITypedRegion;

-import org.eclipse.jface.text.TextUtilities;

-import org.eclipse.jface.text.rules.FastPartitioner;

-

-public class RutaAutoEditStrategy extends DefaultIndentLineAutoEditStrategy {

-  // TODO

-  IPreferenceStore fStore;

-

-  String fPartitioning;

-

-  final int maxCharsAway = 100;

-

-  public RutaAutoEditStrategy(IPreferenceStore store, String part) {

-    fStore = store;

-    fPartitioning = part;

-  }

-

-  /*

-   * possible prefereces:

-   * 

-   * general indent on/off smart tab key behaviour autoclose "strings", 'strings' autoclose

-   * {brackets}, [], () smart paste

-   */

-

-  private boolean isSmartTab() {

-    return fStore.getBoolean(PreferenceConstants.EDITOR_SMART_TAB);

-  }

-

-  private boolean isSmartMode() {

-    return fStore.getBoolean(PreferenceConstants.EDITOR_SMART_INDENT);

-  }

-

-  private boolean closeBrackets() {

-    return fStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_BRACKETS);

-  }

-

-  private boolean isSmartPaste() {

-    return fStore.getBoolean(PreferenceConstants.EDITOR_SMART_PASTE);

-  }

-

-  private boolean closeStrings() {

-    return fStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_STRINGS);

-  }

-

-  private int getIndentSize() {

-    return fStore.getInt(CodeFormatterConstants.FORMATTER_INDENTATION_SIZE);

-  }

-

-  private String getTabStyle() {

-    return fStore.getString(CodeFormatterConstants.FORMATTER_TAB_CHAR);

-  }

-

-  private String getIndent() {

-    if (getTabStyle().equals(CodeFormatterConstants.SPACE)) {

-      int size = getIndentSize();

-      String res = "";

-      for (int i = 0; i < size; i++)

-        res += " ";

-      return res;

-    } else

-      return "\t";

-  }

-

-  private boolean isLineDelimiter(IDocument document, String text) {

-    String[] delimiters = document.getLegalLineDelimiters();

-    if (delimiters != null)

-      return TextUtilities.equals(delimiters, text) > -1;

-    return false;

-  }

-

-  /**

-   * Returns the leading whitespaces and tabs.

-   * 

-   * @param document

-   *          - the document being parsed

-   * @param line

-   *          - the line being searched

-   * @return the leading whitespace

-   * @throws BadLocationException

-   *           in case <code>line</code> is invalid in the document

-   */

-  private String getLineIndent(IDocument document, int line) throws BadLocationException {

-    if (line > -1) {

-      int start = document.getLineOffset(line);

-      int end = start + document.getLineLength(line); // was - 1

-      int whiteend = findEndOfWhiteSpace(document, start, end);

-      return document.get(start, whiteend - start);

-    }

-    return ""; //$NON-NLS-1$

-  }

-

-  /**

-   * Returns the leading whitespaces and tabs.

-   * 

-   * @param line

-   *          - the line being searched

-   * @return the leading whitespace

-   */

-  public String getLineIndent(String line) {

-    int end = line.length();

-    int whiteend = end;

-    int offset = 0;

-    while (offset < end) {

-      char c = line.charAt(offset);

-      if (c != ' ' && c != '\t') {

-        whiteend = offset;

-        break;

-      }

-      offset++;

-    }

-    return line.substring(0, whiteend);

-  }

-

-  /**

-   * Find line with number <=line, that is not empty and is not a comment line starting with #

-   * 

-   * @param d

-   *          the document to search in

-   * @param line

-   *          number of starting line

-   * @return number of code line or -1 if no such line found

-   * @throws BadLocationException

-   */

-  private int getLastNonEmptyLine(IDocument d, int line) throws BadLocationException {

-    int res = line;

-

-    while (res > -1) {

-      String str = getDocumentLine(d, res).trim();

-      if ((!str.startsWith("#")) && str.length() > 0)

-        return res;

-      res--;

-    }

-

-    return res;

-  }

-

-  /**

-   * Fetched line from document

-   * 

-   * @param d

-   *          the document

-   * @param line

-   *          number of req. line

-   * @return string with line

-   * @throws BadLocationException

-   *           if <b>line</b> is not correct line number

-   */

-  public String getDocumentLine(IDocument d, int line) throws BadLocationException {

-    int start = d.getLineOffset(line);

-    int length = d.getLineLength(line);

-    return d.get(start, length);

-  }

-

-  /**

-   * Get partition type covering offset

-   * 

-   * @param d

-   * @param offset

-   * @return

-   * @throws BadLocationException

-   */

-  private String getRegionType(IDocument d, int offset) throws BadLocationException {

-    int p = ((offset == d.getLength()) ? offset - 1 : offset);

-    ITypedRegion region = TextUtilities.getPartition(d, fPartitioning, p, true);

-    return region.getType();

-  }

-

-  /**

-   * Searchs an pair from offset, forward of backwards. Can skip strings and comments (uses ruta

-   * partitioning).

-   * 

-   * @param d

-   * @param offset

-   * @param forward

-   * @param opening

-   * @param closing

-   * @param skipCommentLines

-   * @param skipStrings

-   * @return offset of pair, or -1 if not found

-   * @throws BadLocationException

-   */

-  private int searchPair(IDocument d, int offset, boolean forward, char opening, char closing,

-          boolean skipCommentLines, boolean skipStrings) throws BadLocationException {

-    int deep = 0;

-    int i = offset;

-    if (forward) {

-      while (i < d.getLength()) {

-        ITypedRegion region = TextUtilities.getPartition(d, fPartitioning, i, true);

-        if (region.getType() == RutaPartitions.RUTA_COMMENT && skipCommentLines) {

-          i = region.getOffset() + region.getLength();

-          continue;

-        }

-        if (region.getType() == RutaPartitions.RUTA_STRING && skipStrings) {

-          i = region.getOffset() + region.getLength();

-          continue;

-        }

-        char c = d.getChar(i);

-        if (c == opening)

-          deep++;

-        if (c == closing) {

-          if (deep == 0)

-            return i;

-          deep--;

-        }

-        i++;

-        if (i - offset > maxCharsAway)

-          return -1;

-      }

-    } else {

-      while (i >= 0) {

-        ITypedRegion region = TextUtilities.getPartition(d, fPartitioning, i, true);

-        if (region.getType() == RutaPartitions.RUTA_COMMENT && skipCommentLines) {

-          i = region.getOffset() - 1;

-          continue;

-        }

-        if (region.getType() == RutaPartitions.RUTA_STRING && skipStrings) {

-          i = region.getOffset() - 1;

-          continue;

-        }

-        char c = d.getChar(i);

-        if (c == closing)

-          deep++;

-        if (c == opening) {

-          if (deep == 0)

-            return i;

-          deep--;

-        }

-        i--;

-        if (offset - i > maxCharsAway)

-          return -1;

-      }

-    }

-    return -1;

-  }

-

-  /**

-   * Finds line < <b>line</b>, such the indent of it is less than of <b>line</b>

-   * 

-   * @param d

-   *          the document to search in

-   * @param line

-   *          appropriate line number

-   * @return if found, number < <b>line</b>, else <b>line</b>

-   */

-  private int findIndentStart(IDocument d, int line) throws BadLocationException {

-    String curIndent = getLineIndent(d, line);

-    int curIndentLength = getPhysicalLength(curIndent);

-    int cur = line - 1;

-    while (cur >= 0) {

-      String curLine = getDocumentLine(d, cur);

-      String ind = getLineIndent(d, cur);

-      if ((!curLine.trim().startsWith("#")) && getPhysicalLength(ind) < curIndentLength)

-        return cur;

-      cur--;

-    }

-    return line;

-  }

-

-  /**

-   * Calculates real length of string. So any char except \t has length 1, \t has length 8.

-   * 

-   * @param str

-   *          string to process

-   * @return length

-   */

-  public int getPhysicalLength(String str) {

-    int res = 0;

-    for (int i = 0; i < str.length(); i++) {

-      if (str.charAt(i) == '\t')

-        res += 8; // TODO

-      else

-        res++;

-    }

-    return res;

-  }

-

-  /**

-   * Return pair to brace. Ex. '(' for ')', e.t.c.

-   * 

-   * @param b

-   *          input brace

-   * @return peer brace

-   */

-  private char getBracePair(char b) {

-    switch (b) {

-      case '(':

-        return ')';

-      case ')':

-        return '(';

-      case '[':

-        return ']';

-      case ']':

-        return '[';

-      case '{':

-        return '}';

-      case '}':

-        return '{';

-      case '\"':

-        return '\"';

-      case '\'':

-        return '\'';

-    }

-    return b;

-  }

-

-  /**

-   * Installs a partitioner with <code>document</code>.

-   * 

-   * @param document

-   *          the document

-   */

-  private static void installStuff(Document document) {

-    String[] types = new String[] { RutaPartitions.RUTA_STRING, RutaPartitions.RUTA_COMMENT,

-        IDocument.DEFAULT_CONTENT_TYPE };

-    FastPartitioner partitioner = new FastPartitioner(new RutaPartitionScanner(), types);

-    partitioner.connect(document);

-    document.setDocumentPartitioner(RutaPartitions.RUTA_PARTITIONING, partitioner);

-  }

-

-  /**

-   * Removes partitioner with <code>document</code>.

-   * 

-   * @param document

-   *          the document

-   */

-  private static void removeStuff(Document document) {

-    document.setDocumentPartitioner(RutaPartitions.RUTA_PARTITIONING, null);

-  }

-

-  /**

-   * STRATEGIES

-   */

-

-  /**

-   * Main indenting algorithm. Needs correct partitioning to work.

-   * 

-   * @param d

-   *          the processed document

-   * @param line

-   *          line, indenting of which we wanna know

-   * @param newLine

-   *          if <b>line</b> is new line, so we have pressed enter-key, and need indentation for new

-   *          line

-   * @param offset

-   *          position, where we have jumped to new line

-   * @return correct indent for line, or null if we should use "default" indent. So calling side

-   *         should determine, change indent or not, or may be use indent of previous line.

-   * @throws BadLocationException

-   */

-  private String calcLineIndent(IDocument d, int line, boolean newLine, int offset)

-          throws BadLocationException {

-

-    boolean isDocumentEnd = (offset == d.getLength());

-

-    // STRINGS

-    if (newLine) {

-      // if we wrap string

-      if (getRegionType(d, offset) == RutaPartitions.RUTA_STRING) {

-        int realLine = d.getLineOfOffset(offset);

-        String curIndent = getLineIndent(d, realLine);

-        // if we just closed string

-        if (d.getChar(offset - 1) != '"') {

-          // if we are fully in string

-          if (getRegionType(d, d.getLineOffset(realLine)) == RutaPartitions.RUTA_STRING) {

-            return curIndent;

-          }

-          // if we first time wrap string

-          return curIndent + getIndent();

-        }

-      }

-    } else {

-      // don't correct strings

-      if (getRegionType(d, d.getLineOffset(line)) == RutaPartitions.RUTA_STRING) {

-        return getLineIndent(d, line); // notice, that we don't use

-        // null

-      }

-    }

-

-    // LINE JOINING

-    if (newLine) {

-      int realLine = d.getLineOfOffset(offset);

-      if (line > 0) {

-        String previousLine = "";

-        if (realLine == line - 1) {

-          int start = d.getLineOffset(realLine);

-          previousLine = d.get(start, offset - start);

-        } else

-          previousLine = getDocumentLine(d, line - 1);

-        if (previousLine.trim().endsWith("\\")) {

-          String prePreviousLine = getDocumentLine(d, line - 2);

-          if (prePreviousLine.trim().endsWith("\\"))

-            return getLineIndent(d, line - 1);

-          return getLineIndent(d, line - 1) + getIndent() + getIndent();

-        }

-        if (line > 1) {

-          String prePreviousLine = getDocumentLine(d, line - 2);

-          if (prePreviousLine.trim().endsWith("\\")) {

-            // find start

-            int t = line - 2;

-            while (t > 0 && getDocumentLine(d, t - 1).trim().endsWith("\\")) {

-              t--;

-            }

-            return getLineIndent(d, t);

-          }

-        }

-      }

-    } else {

-      /*

-       * If this line is explicitly joined: If the previous line was also joined, line it up with

-       * that one, otherwise add two 'shiftwidth'

-       */

-      if (line > 0) {

-        String previousLine = getDocumentLine(d, line - 1);

-        if (previousLine.trim().endsWith("\\")) {

-          if (line > 1) {

-            String prePreviousLine = getDocumentLine(d, line - 2);

-            if (prePreviousLine.trim().endsWith("\\"))

-              return getLineIndent(d, line - 1);

-          }

-          return getLineIndent(d, line - 1) + getIndent() + getIndent();

-        }

-      }

-    }

-

-    // Search backwards for the previous non-empty line.

-    int lastNonEmptyLine = getLastNonEmptyLine(d, line - 1);

-

-    if (lastNonEmptyLine < 0) {

-      // This is the first non-empty line, use zero indent.

-      return "";

-    }

-

-    // first check, if we not inside string, if yes, jump to start

-    ITypedRegion region = TextUtilities.getPartition(d, fPartitioning,

-            d.getLineOffset(lastNonEmptyLine), true);

-    if (region.getType() == RutaPartitions.RUTA_STRING) {

-      lastNonEmptyLine = d.getLineOfOffset(region.getOffset());

-    }

-

-    // If the previous line is inside parenthesis, use the indent of the

-    // starting line.

-    int plnumstart;

-    String previousLineIndent = "";

-    int pairOffset = searchPair(d, d.getLineOffset(lastNonEmptyLine), false, '(', ')', true, true);

-

-    if (pairOffset >= 0) {

-      plnumstart = d.getLineOfOffset(pairOffset);

-      previousLineIndent = getLineIndent(d, plnumstart);

-    } else {

-      plnumstart = lastNonEmptyLine;

-      previousLineIndent = getLineIndent(d, lastNonEmptyLine);

-    }

-

-    /*

-     * When inside parenthesis: If at the first line below the parenthesis add two 'shiftwidth',

-     * otherwise same as previous line. i = (a + b + c)

-     */

-    int p = searchPair(d, offset - 1, false, '(', ')', true, true);

-    if (p >= 0) {

-      if (d.getLineOfOffset(p) == lastNonEmptyLine) {

-        // When the start is inside parenthesis, only indent one

-        // 'shiftwidth'.

-        int pp = searchPair(d, p, false, '(', ')', true, true);

-        if (pp >= 0)

-          return getLineIndent(d, lastNonEmptyLine) + getIndent();

-        return getLineIndent(d, lastNonEmptyLine) + getIndent() + getIndent();

-      }

-      if (d.getLineOfOffset(p) == plnumstart) {

-        return getLineIndent(d, lastNonEmptyLine);

-      }

-      if (d.getLineOfOffset(p) == line && !newLine)

-        return null;

-      return previousLineIndent;

-    }

-

-    // Get the line and remove a trailing comment.

-

-    String pline = "";

-    if (lastNonEmptyLine == line - 1 && newLine) {

-      pline = d.get(d.getLineOffset(line - 1), offset - d.getLineOffset(line - 1));

-    } else {

-      pline = getDocumentLine(d, lastNonEmptyLine);

-    }

-    int plineLen = pline.length();

-    int i;

-    for (i = 0; i < plineLen; i++) {

-      if (pline.charAt(i) == '#') {

-        pline = pline.substring(0, i);

-        break;

-      }

-    }

-

-    String plineTrimmed = pline.trim();

-

-    try {// If the current line begins with a keyword that lines up with

-      // "try"

-      String curLine = "";

-      if (lastNonEmptyLine == line - 1 && newLine) {

-        curLine = d.get(offset, d.getLineLength(line - 1) + d.getLineOffset(line - 1) - offset);

-      } else {

-        curLine = getDocumentLine(d, line).trim();

-      }

-

-      if (curLine.startsWith("except") || curLine.startsWith("finally")) {

-        int lnum = line - 1;

-

-        while (lnum >= 0) {

-          String temp = getDocumentLine(d, lnum).trim();

-          if (temp.startsWith("try") || temp.startsWith("except")) {

-            String ind = getLineIndent(d, lnum);

-            return ind;

-          }

-          lnum--;

-        }

-        return null;

-      }

-

-      // If the current line begins with a header keyword, dedent

-      if (curLine.startsWith("elif") || curLine.startsWith("else")) {

-

-        // Unless the previous line was a one-liner

-        String temp = getDocumentLine(d, lastNonEmptyLine).trim();

-        if (temp.startsWith("for") || temp.startsWith("if") || temp.startsWith("try")

-                || temp.startsWith("while")) {

-          return previousLineIndent;

-        }

-        int sline = findIndentStart(d, lastNonEmptyLine);

-        String reqIndent = getLineIndent(d, sline);

-        return reqIndent;

-      }

-

-    } catch (BadLocationException e) {

-      // do nothing, we just don't have current line

-    }

-

-    // If the previous line was a stop-execution statement...

-    String regex = "^\\s*(break|continue|raise|pass|return)(\\s+.*$|$)";

-    if (Pattern.matches(regex, plineTrimmed)) {

-      // find indent

-      int sline = findIndentStart(d, lastNonEmptyLine);

-      String reqIndent = getLineIndent(d, sline);

-      if (newLine || isDocumentEnd

-              || (getPhysicalLength(getLineIndent(d, line)) > getPhysicalLength(reqIndent))) {

-        return reqIndent;

-      }

-      // trust the user

-      return null;

-    }

-

-    // If the previous line ended with a colon, indent this line

-    if (plineTrimmed.endsWith(":"))

-      return previousLineIndent + getIndent();

-

-    if (pairOffset >= 0 && newLine) {

-      return previousLineIndent;

-    }

-

-    // after-string

-    int prevLine = getLastNonEmptyLine(d, line - 1);

-    if (getRegionType(d, d.getLineOffset(prevLine)) == RutaPartitions.RUTA_STRING)

-      return previousLineIndent;

-

-    return null;

-  }

-

-  /**

-   * If we have pressed ":" for example, than we need to reindent line. This function changes

-   * document and sets correct indent for current line.

-   * 

-   * @param d

-   * @param c

-   */

-  private void reindent(IDocument d, DocumentCommand c) {

-    try {

-      if (getRegionType(d, c.offset) != IDocument.DEFAULT_CONTENT_TYPE)

-        return;

-      int line = d.getLineOfOffset(c.offset);

-      String newIndent = calcLineIndent(d, line, false, c.offset);

-      if (newIndent == null)

-        return;

-      String curIndent = getLineIndent(d, line);

-      if (getPhysicalLength(curIndent) < getPhysicalLength(newIndent))

-        return;

-      d.replace(d.getLineOffset(line), curIndent.length(), newIndent);

-      c.offset += (newIndent.length() - curIndent.length());

-    } catch (BadLocationException e) {

-    }

-  }

-

-  /**

-   * Processes command in work with brackets, strings, etc

-   * 

-   * @param d

-   * @param c

-   */

-  private void autoClose(IDocument d, DocumentCommand c) {

-    if (c.offset == -1)

-      return;

-    try {

-      if (d.getChar(c.offset - 1) == '\\')

-        return;

-    } catch (BadLocationException e1) {

-    }

-    if ('\"' == c.text.charAt(0) && !closeStrings())

-      return;

-    if ('\'' == c.text.charAt(0) && !closeStrings())

-      return;

-    if (!closeBrackets()

-            && ('[' == c.text.charAt(0) || '(' == c.text.charAt(0) || '{' == c.text.charAt(0)))

-      return;

-    try {

-

-      switch (c.text.charAt(0)) {

-        case '\"':

-        case '\'':

-          // if we close existing quote, do nothing

-          if ('\"' == c.text.charAt(0) && c.offset > 0 && "\"".equals(d.get(c.offset - 1, 1)))

-            return;

-

-          if ('\'' == c.text.charAt(0) && c.offset > 0 && "\'".equals(d.get(c.offset - 1, 1)))

-            return;

-

-          if (c.offset != d.getLength() && c.text.charAt(0) == d.get(c.offset, 1).charAt(0))

-            c.text = "";

-          else {

-            c.text += c.text;

-            c.length = 0;

-          }

-

-          c.shiftsCaret = false;

-          c.caretOffset = c.offset + 1;

-          break;

-        case '(':

-        case '{':

-        case '[':

-          // check partition

-          if (getRegionType(d, c.offset) != IDocument.DEFAULT_CONTENT_TYPE)

-            return;

-          if (c.offset != d.getLength() && c.text.charAt(0) == d.get(c.offset, 1).charAt(0))

-            return;

-

-          try { // in class closing

-            String regex = "^\\s*class\\s+.*";

-            String regex2 = ".*\\(.*\\).*";

-            int start = d.getLineOffset(d.getLineOfOffset(c.offset));

-            String curLine = d.get(start, c.offset - start);

-            if (Pattern.matches(regex, curLine) && !Pattern.matches(regex2, curLine)) {

-              c.text = "():";

-              c.shiftsCaret = false;

-              c.caretOffset = c.offset + 1;

-              return;

-            }

-          } catch (BadLocationException e) {

-          }

-

-          // add closing peer

-          c.text = c.text + getBracePair(c.text.charAt(0));

-          c.length = 0;

-

-          c.shiftsCaret = false;

-          c.caretOffset = c.offset + 1;

-          break;

-        case '}':

-        case ']':

-        case ')':

-          // check partition

-          if (getRegionType(d, c.offset) != IDocument.DEFAULT_CONTENT_TYPE)

-            return;

-          if (!closeBrackets())

-            return;

-          // if we already have bracket we should jump over it

-          if (c.offset != d.getLength() && c.text.charAt(0) == d.get(c.offset, 1).charAt(0)) {

-            c.text = "";

-            c.shiftsCaret = false;

-            c.caretOffset = c.offset + 1;

-            return;

-          }

-          break;

-      }

-    } catch (BadLocationException e) {

-      e.printStackTrace();

-    }

-  }

-

-  /**

-   * When we have pressed \t, sometimes we wanna not to tabulate, and jump to correct line start

-   * position.

-   * 

-   * @param d

-   * @param c

-   * @return

-   */

-  private boolean smartIndentJump(IDocument d, DocumentCommand c) {

-    if (c.offset == -1 || d.getLength() == 0)

-      return false;

-    try {

-      // int p = (c.offset == d.getLength() ? c.offset - 1 : c.offset);

-      int line = d.getLineOfOffset(c.offset);

-      int start = d.getLineOffset(line);

-      // calculate indentation of this line

-      String resultIndent = calcLineIndent(d, line, false, start);

-      String currentIndent = getLineIndent(d, line);

-      if (resultIndent == null) { // we should save indentation

-        String curLine = getDocumentLine(d, line);

-        if (curLine.trim().length() > 0) // if indentation is "real",

-          // use it

-          resultIndent = currentIndent;

-        else {

-          // get current block level

-          int pl = getLastNonEmptyLine(d, line - 1); // find last

-          // code line

-          if (pl >= 0) {

-            String plStr = getDocumentLine(d, pl).trim();

-            // simple indent-guess strategy

-            String regex = "^\\s*(break|continue|raise|pass|return)(\\s+.*$|$)";

-            if (plStr.endsWith(":"))

-              resultIndent = getLineIndent(plStr) + getIndent();

-            else if (Pattern.matches(regex, plStr)) {

-              // find indent

-              int sline = findIndentStart(d, pl);

-              resultIndent = getLineIndent(d, sline);

-            } else

-              resultIndent = getLineIndent(d, pl);

-          } else

-            return false; // no indent is applicable, do nothing

-        }

-      }

-

-      if (c.offset >= start + resultIndent.length())

-        return false; // we already in the place

-

-      if (!currentIndent.startsWith(resultIndent)) { // create indent

-        c.offset = start;

-        c.length = currentIndent.length();

-        c.shiftsCaret = false;

-        c.text = resultIndent;

-        c.caretOffset = d.getLineOffset(line) + resultIndent.length();

-        return true;

-      }

-

-      c.length = 0;

-      c.shiftsCaret = false;

-      c.text = "";

-      c.caretOffset = d.getLineOffset(line) + resultIndent.length();

-      return true;

-    } catch (BadLocationException e) {

-      e.printStackTrace();

-    }

-    return false;

-  }

-

-  /**

-   * Reindents c.text when pasting.

-   * 

-   * @param d

-   * @param c

-   */

-  private void smartPaste(IDocument d, DocumentCommand c) {

-    try {

-      String content = d.get(0, c.offset) + c.text;

-      Document temp = new Document(content);

-      DocumentRewriteSession session = temp

-              .startRewriteSession(DocumentRewriteSessionType.STRICTLY_SEQUENTIAL);

-      installStuff(temp);

-      int offset = c.offset;

-      int line = temp.getLineOfOffset(offset);

-      String lastIndent = getLineIndent(temp, line);

-      int firstLineOffset = temp.getLineOffset(line);

-      String commonIndent = temp.get(firstLineOffset, c.offset - firstLineOffset);

-      if (StringUtils.isNotBlank(commonIndent)) {

-        // do not copy non whitespace content as indent

-        // and only use leading white spaces

-        String notWSContent = commonIndent.replaceAll("^\\s+", "");

-        commonIndent = StringUtils.removeEnd(commonIndent, notWSContent);

-      }

-      line++;

-      try {

-        while (getDocumentLine(temp, line).trim().length() == 0)

-          line++;

-        offset = temp.getLineOffset(line);

-      } catch (BadLocationException e) {

-        offset = temp.getLength();

-      }

-      while (offset < temp.getLength()) {

-        String resultIndent = calcLineIndent(temp, line, false, temp.getLineOffset(line));

-        String currentIndent = getLineIndent(temp, line);

-        if (resultIndent == null) {

-          resultIndent = commonIndent + currentIndent;

-          // TODO commented to retain indent of pasted blocks

-          // if (getPhysicalLength(resultIndent) > getPhysicalLength(lastIndent))

-          // resultIndent = lastIndent;

-        }

-        temp.replace(offset, currentIndent.length(), resultIndent);

-        String currentLine = getDocumentLine(temp, line);

-        if (currentLine.trim().length() > 0 && (!currentLine.trim().startsWith("//"))) {

-          lastIndent = resultIndent;

-        }

-

-        if (temp.getLineOffset(line) + temp.getLineLength(line) == temp.getLength())

-          break;

-        line++;

-        offset = temp.getLineOffset(line);

-      }

-      temp.stopRewriteSession(session);

-      removeStuff(temp);

-      c.text = temp.get(c.offset, temp.getLength() - c.offset);

-    } catch (BadLocationException e) {

-      e.printStackTrace();

-    }

-

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see

-   * org.eclipse.jface.text.IAutoEditStrategy#customizeDocumentCommand(org.eclipse.jface.text.IDocument

-   * , org.eclipse.jface.text.DocumentCommand)

-   */

-  @Override

-  public void customizeDocumentCommand(IDocument d, DocumentCommand c) {

-    if (c.doit == false)

-      return;

-    if (c.length == 0 && c.text != null && isLineDelimiter(d, c.text)) {

-      if (!isSmartMode()) {

-        super.customizeDocumentCommand(d, c);

-        return;

-      }

-      try {

-        String indent = calcLineIndent(d, d.getLineOfOffset(c.offset) + 1, true, c.offset);

-        if (indent == null)

-          super.customizeDocumentCommand(d, c);

-        else {

-          if (DLTKCore.DEBUG) {

-            System.err.println("Bug:PTN-9");

-          }

-          c.text = c.text + indent;

-        }

-      } catch (BadLocationException e) {

-        super.customizeDocumentCommand(d, c);

-      }

-      return;

-    } else {

-      if (c.length <= 1 && c.text.length() == 1) {

-        switch (c.text.charAt(0)) {

-          case ':':

-            reindent(d, c);

-            break;

-          case '\"':

-          case '\'':

-          case '(':

-          case '{':

-          case '[':

-          case '}':

-          case ']':

-          case ')':

-            autoClose(d, c);

-            break;

-          case '\t':

-            boolean jumped = false;

-            if (isSmartTab()) {

-              jumped = smartIndentJump(d, c);

-            }

-            if (!jumped) {

-              c.text = getIndent();

-            }

-            break;

-        }

-      } else if (c.text.length() >= 1 && isSmartPaste())

-        smartPaste(d, c); // no smart backspace for paste

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCodeScanner.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCodeScanner.java
deleted file mode 100644
index 94714ff..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCodeScanner.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.core.IRutaKeywords;

-import org.apache.uima.ruta.ide.core.RutaKeywordsManager;

-import org.eclipse.dltk.ui.text.AbstractScriptScanner;

-import org.eclipse.dltk.ui.text.IColorManager;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.rules.IRule;

-import org.eclipse.jface.text.rules.IToken;

-import org.eclipse.jface.text.rules.WhitespaceRule;

-

-public class RutaCodeScanner extends AbstractScriptScanner {

-

-  private static String fgTokenProperties[] = new String[] {

-      RutaColorConstants.RUTA_SINGLE_LINE_COMMENT, RutaColorConstants.RUTA_DEFAULT,

-      RutaColorConstants.RUTA_KEYWORD, RutaColorConstants.RUTA_KEYWORD_RETURN,

-      RutaColorConstants.RUTA_NUMBER, RutaColorConstants.RUTA_FUNCTION,

-      RutaColorConstants.RUTA_CONDITION, RutaColorConstants.RUTA_ACTION,

-      RutaColorConstants.RUTA_RULE, RutaColorConstants.RUTA_DECLARATION,

-      RutaColorConstants.RUTA_BASICSYMBOL, RutaColorConstants.RUTA_THEN };

-

-  public RutaCodeScanner(IColorManager manager, IPreferenceStore store) {

-    super(manager, store);

-    initialize();

-  }

-

-  @Override

-  protected String[] getTokenProperties() {

-    return fgTokenProperties;

-  }

-

-  @Override

-  protected List createRules() {

-    List<IRule> rules = new ArrayList<IRule>();

-    IToken keyword = getToken(RutaColorConstants.RUTA_KEYWORD);

-    IToken rule = getToken(RutaColorConstants.RUTA_RULE);

-    IToken comment = getToken(RutaColorConstants.RUTA_SINGLE_LINE_COMMENT);

-    IToken other = getToken(RutaColorConstants.RUTA_DEFAULT);

-    IToken declaration = getToken(RutaColorConstants.RUTA_DECLARATION);

-    IToken basicSymbol = getToken(RutaColorConstants.RUTA_BASICSYMBOL);

-    IToken function = getToken(RutaColorConstants.RUTA_FUNCTION);

-    IToken condition = getToken(RutaColorConstants.RUTA_CONDITION);

-    IToken action = getToken(RutaColorConstants.RUTA_ACTION);

-    IToken then = getToken(RutaColorConstants.RUTA_THEN);

-    IToken number = getToken(RutaColorConstants.RUTA_NUMBER);

-    IToken string = getToken(RutaColorConstants.RUTA_STRING);

-

-    // rules.add(new MultiLineRule("/*", "*/", comment, '\\', true));

-    // rules.add(new EndOfLineRule("//", comment));

-    rules.add(new WhitespaceRule(new RutaWhitespaceDetector()));

-    RutaWordRule wordRule = new RutaWordRule(new RutaWordDetector(), other, rule);

-

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.CONDITION)) {

-      wordRule.addWord(each, condition);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.DECLARATION)) {

-      wordRule.addWord(each, declaration);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.ACTION)) {

-      wordRule.addWord(each, action);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.BASIC)) {

-      wordRule.addWord(each, basicSymbol);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.BOOLEANFUNCTION)) {

-      wordRule.addWord(each, function);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.NUMBERFUNCTION)) {

-      wordRule.addWord(each, function);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.STRINGFUNCTION)) {

-      wordRule.addWord(each, function);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.TYPEFUNCTION)) {

-      wordRule.addWord(each, function);

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.THEN)) {

-      wordRule.addWord(each, then);

-    }

-    rules.add(wordRule);

-

-    setDefaultReturnToken(other);

-    return rules;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaColorConstants.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaColorConstants.java
deleted file mode 100644
index 74ae4d4..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaColorConstants.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.dltk.ui.text.DLTKColorConstants;

-

-public final class RutaColorConstants {

-

-  private RutaColorConstants() {

-  }

-

-  public static final String RUTA_STRING = DLTKColorConstants.DLTK_STRING;

-

-  public static final String RUTA_SINGLE_LINE_COMMENT = DLTKColorConstants.DLTK_SINGLE_LINE_COMMENT;

-

-  public static final String RUTA_DOC_COMMENT = DLTKColorConstants.DLTK_DOC;

-

-  public static final String RUTA_NUMBER = DLTKColorConstants.DLTK_NUMBER;

-

-  public static final String RUTA_KEYWORD = DLTKColorConstants.DLTK_KEYWORD;

-

-  public static final String RUTA_KEYWORD_RETURN = DLTKColorConstants.DLTK_KEYWORD_RETURN;

-

-  public static final String RUTA_DEFAULT = DLTKColorConstants.DLTK_DEFAULT;

-

-  public static final String RUTA_CONDITION = "ruta_condition"; //$NON-NLS-1$

-

-  public static final String RUTA_ACTION = "ruta_action"; //$NON-NLS-1$

-

-  public static final String RUTA_RULE = "ruta_rule";

-

-  public static final String RUTA_THEN = "ruta_then";

-

-  public static final String RUTA_DECLARATION = "ruta_declaration";

-

-  public static final String RUTA_BASICSYMBOL = "ruta_basicSymbol";

-

-  public static final String RUTA_FUNCTION = "ruta_function";

-

-  public static final String RUTA_VARIABLE = "ruta_variable"; //$NON-NLS-1$

-

-  public static final String RUTA_TODO_TAG = DLTKColorConstants.TASK_TAG; // DLTKColorConstants.TASK_TAG;

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCorrectionAssistant.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCorrectionAssistant.java
deleted file mode 100644
index 1da8275..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCorrectionAssistant.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.runtime.Assert;

-import org.eclipse.dltk.ui.DLTKUIPlugin;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.dltk.ui.text.IColorManager;

-import org.eclipse.jface.internal.text.html.HTMLTextPresenter;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferenceConverter;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.DefaultInformationControl;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.IInformationControl;

-import org.eclipse.jface.text.IInformationControlCreator;

-import org.eclipse.jface.text.IRegion;

-import org.eclipse.jface.text.ITextViewer;

-import org.eclipse.jface.text.Position;

-import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;

-import org.eclipse.jface.text.quickassist.QuickAssistAssistant;

-import org.eclipse.jface.text.source.Annotation;

-import org.eclipse.jface.text.source.IAnnotationModel;

-import org.eclipse.jface.text.source.ISourceViewer;

-import org.eclipse.swt.graphics.Color;

-import org.eclipse.swt.graphics.Point;

-import org.eclipse.swt.graphics.RGB;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.texteditor.IDocumentProvider;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class RutaCorrectionAssistant extends QuickAssistAssistant {

-

-  private ITextViewer fViewer;

-

-  private ITextEditor fEditor;

-

-  private Position fPosition;

-

-  private Annotation[] fCurrentAnnotations;

-

-  // private RutaQuickAssistLightBulbUpdater fLightBulbUpdater;

-

-  /**

-   * Constructor for JavaCorrectionAssistant.

-   * 

-   * @param editor

-   *          the editor

-   */

-  public RutaCorrectionAssistant(ITextEditor editor) {

-    super();

-    Assert.isNotNull(editor);

-    fEditor = editor;

-

-    RutaCorrectionProcessor processor = new RutaCorrectionProcessor(this);

-

-    setQuickAssistProcessor(processor);

-

-    setInformationControlCreator(getInformationControlCreator());

-

-    RutaTextTools textTools = RutaIdeUIPlugin.getDefault().getTextTools();

-    IColorManager manager = textTools.getColorManager();

-

-    IPreferenceStore store = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-

-    Color c = getColor(store, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, manager);

-    setProposalSelectorForeground(c);

-

-    c = getColor(store, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, manager);

-    setProposalSelectorBackground(c);

-  }

-

-  public IEditorPart getEditor() {

-    return fEditor;

-  }

-

-  private IInformationControlCreator getInformationControlCreator() {

-    return new IInformationControlCreator() {

-      public IInformationControl createInformationControl(Shell parent) {

-        return new DefaultInformationControl(parent, new HTMLTextPresenter());

-      }

-    };

-  }

-

-  private static Color getColor(IPreferenceStore store, String key, IColorManager manager) {

-    RGB rgb = PreferenceConverter.getColor(store, key);

-    return manager.getColor(rgb);

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.jface.text.contentassist.IContentAssistant#install(org.eclipse

-   * .jface.text.ITextViewer)

-   */

-  @Override

-  public void install(ISourceViewer sourceViewer) {

-    super.install(sourceViewer);

-    fViewer = sourceViewer;

-

-    // fLightBulbUpdater = new

-    // RutaQuickAssistLightBulbUpdater(fEditor,

-    // sourceViewer);

-    // fLightBulbUpdater.install();

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.jface.text.contentassist.ContentAssistant#uninstall()

-   */

-  @Override

-  public void uninstall() {

-    // if (fLightBulbUpdater != null) {

-    // fLightBulbUpdater.uninstall();

-    // fLightBulbUpdater = null;

-    // }

-    super.uninstall();

-  }

-

-  /*

-   * @seeorg.eclipse.jface.text.quickassist.QuickAssistAssistant# showPossibleQuickAssists()

-   * 

-   * @since 3.2

-   */

-

-  /**

-   * Show completions at caret position. If current position does not contain quick fixes look for

-   * next quick fix on same line by moving from left to right and restarting at end of line if the

-   * beginning of the line is reached.

-   * 

-   * @see IQuickAssistAssistant#showPossibleQuickAssists()

-   */

-  @Override

-  public String showPossibleQuickAssists() {

-    fPosition = null;

-    fCurrentAnnotations = null;

-

-    if (fViewer == null || fViewer.getDocument() == null)

-      // Let superclass deal with this

-      return super.showPossibleQuickAssists();

-

-    ArrayList resultingAnnotations = new ArrayList(20);

-    try {

-      Point selectedRange = fViewer.getSelectedRange();

-      int currOffset = selectedRange.x;

-      int currLength = selectedRange.y;

-      boolean goToClosest = (currLength == 0);

-

-      int newOffset = collectQuickFixableAnnotations(fEditor, currOffset, goToClosest,

-              resultingAnnotations);

-      if (newOffset != currOffset) {

-        storePosition(currOffset, currLength);

-        fViewer.setSelectedRange(newOffset, 0);

-        fViewer.revealRange(newOffset, 0);

-      }

-    } catch (BadLocationException e) {

-      // JavaPlugin.log(e);

-    }

-    fCurrentAnnotations = (Annotation[]) resultingAnnotations

-            .toArray(new Annotation[resultingAnnotations.size()]);

-

-    return super.showPossibleQuickAssists();

-  }

-

-  private static IRegion getRegionOfInterest(ITextEditor editor, int invocationLocation)

-          throws BadLocationException {

-    IDocumentProvider documentProvider = editor.getDocumentProvider();

-    if (documentProvider == null) {

-      return null;

-    }

-    IDocument document = documentProvider.getDocument(editor.getEditorInput());

-    if (document == null) {

-      return null;

-    }

-    return document.getLineInformationOfOffset(invocationLocation);

-  }

-

-  public static int collectQuickFixableAnnotations(ITextEditor editor, int invocationLocation,

-          boolean goToClosest, ArrayList resultingAnnotations) throws BadLocationException {

-    IAnnotationModel model = DLTKUIPlugin.getDocumentProvider().getAnnotationModel(

-            editor.getEditorInput());

-    if (model == null) {

-      return invocationLocation;

-    }

-

-    ensureUpdatedAnnotations(editor);

-

-    Iterator iter = model.getAnnotationIterator();

-    if (goToClosest) {

-      IRegion lineInfo = getRegionOfInterest(editor, invocationLocation);

-      if (lineInfo == null) {

-        return invocationLocation;

-      }

-      int rangeStart = lineInfo.getOffset();

-      int rangeEnd = rangeStart + lineInfo.getLength();

-

-      ArrayList allAnnotations = new ArrayList();

-      ArrayList allPositions = new ArrayList();

-      int bestOffset = Integer.MAX_VALUE;

-      while (iter.hasNext()) {

-        Annotation annot = (Annotation) iter.next();

-        if (RutaCorrectionProcessor.isQuickFixableType(annot)) {

-          Position pos = model.getPosition(annot);

-          if (pos != null && isInside(pos.offset, rangeStart, rangeEnd)) { // inside

-            // our

-            // range?

-            allAnnotations.add(annot);

-            allPositions.add(pos);

-            bestOffset = processAnnotation(annot, pos, invocationLocation, bestOffset);

-          }

-        }

-      }

-      if (bestOffset == Integer.MAX_VALUE) {

-        return invocationLocation;

-      }

-      for (int i = 0; i < allPositions.size(); i++) {

-        Position pos = (Position) allPositions.get(i);

-        if (isInside(bestOffset, pos.offset, pos.offset + pos.length)) {

-          resultingAnnotations.add(allAnnotations.get(i));

-        }

-      }

-      return bestOffset;

-    } else {

-      while (iter.hasNext()) {

-        Annotation annot = (Annotation) iter.next();

-        if (RutaCorrectionProcessor.isQuickFixableType(annot)) {

-          Position pos = model.getPosition(annot);

-          if (pos != null && isInside(invocationLocation, pos.offset, pos.offset + pos.length)) {

-            resultingAnnotations.add(annot);

-          }

-        }

-      }

-      return invocationLocation;

-    }

-  }

-

-  private static void ensureUpdatedAnnotations(ITextEditor editor) {

-    // Object inputElement = editor.getEditorInput().getAdapter(

-    // IModelElement.class);

-

-  }

-

-  private static int processAnnotation(Annotation annot, Position pos, int invocationLocation,

-          int bestOffset) {

-    int posBegin = pos.offset;

-    int posEnd = posBegin + pos.length;

-    if (isInside(invocationLocation, posBegin, posEnd)) { // covers

-      // invocation

-      // location?

-      return invocationLocation;

-    } else if (bestOffset != invocationLocation) {

-      int newClosestPosition = computeBestOffset(posBegin, invocationLocation, bestOffset);

-      if (newClosestPosition != -1) {

-        if (newClosestPosition != bestOffset) { // new best

-          // if (JavaCorrectionProcessor.hasCorrections(annot)) { //

-          // only

-          // // jump

-          // // to

-          // // it

-          // // if

-          // // there

-          // // are

-          // // proposals

-          // return newClosestPosition;

-          // }

-        }

-      }

-    }

-    return bestOffset;

-  }

-

-  private static boolean isInside(int offset, int start, int end) {

-    return offset == start || offset == end || (offset > start && offset < end); // make sure to

-    // handle

-    // 0-length ranges

-  }

-

-  /**

-   * Computes and returns the invocation offset given a new position, the initial offset and the

-   * best invocation offset found so far.

-   * <p>

-   * The closest offset to the left of the initial offset is the best. If there is no offset on the

-   * left, the closest on the right is the best.

-   * </p>

-   * 

-   * @param newOffset

-   *          the offset to llok at

-   * @param invocationLocation

-   *          the invocation location

-   * @param bestOffset

-   *          the current best offset

-   * @return -1 is returned if the given offset is not closer or the new best offset

-   */

-  private static int computeBestOffset(int newOffset, int invocationLocation, int bestOffset) {

-    if (newOffset <= invocationLocation) {

-      if (bestOffset > invocationLocation) {

-        return newOffset; // closest was on the right, prefer on the

-        // left

-      } else if (bestOffset <= newOffset) {

-        return newOffset; // we are closer or equal

-      }

-      return -1; // further away

-    }

-

-    if (newOffset <= bestOffset)

-      return newOffset; // we are closer or equal

-

-    return -1; // further away

-  }

-

-  /*

-   * @seeorg.eclipse.jface.text.contentassist.ContentAssistant# possibleCompletionsClosed()

-   */

-  @Override

-  protected void possibleCompletionsClosed() {

-    super.possibleCompletionsClosed();

-    restorePosition();

-  }

-

-  private void storePosition(int currOffset, int currLength) {

-    fPosition = new Position(currOffset, currLength);

-  }

-

-  private void restorePosition() {

-    if (fPosition != null && !fPosition.isDeleted() && fViewer.getDocument() != null) {

-      fViewer.setSelectedRange(fPosition.offset, fPosition.length);

-      fViewer.revealRange(fPosition.offset, fPosition.length);

-    }

-    fPosition = null;

-  }

-

-  /**

-   * Returns true if the last invoked completion was called with an updated offset.

-   * 

-   * @return <code> true</code> if the last invoked completion was called with an updated offset.

-   */

-  public boolean isUpdatedOffset() {

-    return fPosition != null;

-  }

-

-  /**

-   * Returns the annotations at the current offset

-   * 

-   * @return the annotations at the offset

-   */

-  public Annotation[] getAnnotationsAtOffset() {

-    return fCurrentAnnotations;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCorrectionProcessor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCorrectionProcessor.java
deleted file mode 100644
index e366703..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaCorrectionProcessor.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.RutaProblems;

-import org.apache.uima.ruta.ide.core.packages.PackagesManager;

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.dltk.core.CorrectionEngine;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.DLTKLanguageManager;

-import org.eclipse.dltk.core.IDLTKLanguageToolkit;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.IScriptModelMarker;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.internal.ui.editor.ScriptEditor;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.ScriptRuntime;

-import org.eclipse.dltk.ui.DLTKUIPlugin;

-import org.eclipse.dltk.ui.editor.IScriptAnnotation;

-import org.eclipse.dltk.ui.text.MarkerResolutionProposal;

-import org.eclipse.jface.text.contentassist.ICompletionProposal;

-import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;

-import org.eclipse.jface.text.quickassist.IQuickAssistProcessor;

-import org.eclipse.jface.text.source.Annotation;

-import org.eclipse.jface.text.source.IAnnotationModel;

-import org.eclipse.ui.texteditor.MarkerAnnotation;

-import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;

-

-public class RutaCorrectionProcessor implements IQuickAssistProcessor {

-  RutaCorrectionAssistant fAssistant;

-

-  public RutaCorrectionProcessor(RutaCorrectionAssistant tclCorrectionAssistant) {

-    this.fAssistant = tclCorrectionAssistant;

-  }

-

-  public boolean canAssist(IQuickAssistInvocationContext invocationContext) {

-    return true;

-  }

-

-  public boolean canFix(Annotation annotation) {

-    return hasCorrections(annotation);

-  }

-

-  public ICompletionProposal[] computeQuickAssistProposals(

-          IQuickAssistInvocationContext invocationContext) {

-    final Annotation[] annotations = fAssistant.getAnnotationsAtOffset();

-    final ScriptEditor editor = (ScriptEditor) this.fAssistant.getEditor();

-    final IAnnotationModel model = DLTKUIPlugin.getDocumentProvider().getAnnotationModel(

-            editor.getEditorInput());

-    final IModelElement element = editor.getInputModelElement();

-    final IScriptProject scriptProject = element.getScriptProject();

-    List proposals = null;

-    for (int i = 0; i < annotations.length; i++) {

-      final Annotation annotation = annotations[i];

-      ICompletionProposal proposal = null;

-      if (annotation instanceof MarkerAnnotation) {

-        MarkerAnnotation mAnnot = (MarkerAnnotation) annotation;

-        IMarker marker = mAnnot.getMarker();

-        if (isFixable(marker)) {

-          final String pkgName = CorrectionEngine.getProblemArguments(marker)[0];

-          proposal = new MarkerResolutionProposal(new RutaRequirePackageMarkerResolution(pkgName,

-                  scriptProject), marker);

-        }

-      } else if (annotation instanceof IScriptAnnotation) {

-        if (isFixable((IScriptAnnotation) annotation)) {

-          // final String pkgName = ((IScriptAnnotation) annotation)

-          // .getArguments()[0];

-          // proposal = new AnnotationResolutionProposal(

-          // new RutaRequirePackageMarkerResolution(pkgName,

-          // scriptProject), model, annotation);

-        }

-      }

-      if (proposal != null) {

-        if (proposals == null) {

-          proposals = new ArrayList();

-        }

-        proposals.add(proposal);

-      }

-    }

-    if (proposals != null) {

-      return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);

-    }

-    return null;

-  }

-

-  public String getErrorMessage() {

-    return null;

-  }

-

-  public static boolean isQuickFixableType(Annotation annotation) {

-    return (annotation instanceof IScriptAnnotation || annotation instanceof SimpleMarkerAnnotation)

-            && !annotation.isMarkedDeleted();

-  }

-

-  public static boolean isFixable(IMarker marker) {

-    if (marker.getAttribute(IScriptModelMarker.ID, 0) == RutaProblems.UNKNOWN_REQUIRED_PACKAGE) {

-      final String[] args = CorrectionEngine.getProblemArguments(marker);

-      if (args != null && args.length != 0 && args[0] != null) {

-        IResource resource = marker.getResource();

-        IProject project = resource.getProject();

-        IScriptProject scriptProject = DLTKCore.create(project);

-        if (isFixable(args[0], scriptProject)) {

-          return true;

-        }

-      }

-    }

-    return false;

-  }

-

-  public static boolean isFixable(IScriptAnnotation annotation) {

-    // if (annotation.getId() == RutaProblems.UNKNOWN_REQUIRED_PACKAGE) {

-    // final String[] args = annotation.getArguments();

-    // if (args != null && args.length != 0 && args[0] != null) {

-    // final ISourceModule module = annotation.getSourceModule();

-    // if (module != null) {

-    // final IScriptProject project = module.getScriptProject();

-    // if (project != null) {

-    // if (isFixable(args[0], project)) {

-    // return true;

-    // }

-    // }

-    // }

-    // }

-    // }

-    return false;

-  }

-

-  public static boolean isFixable(String pkgName, IScriptProject scriptProject) {

-    IDLTKLanguageToolkit toolkit = null;

-    toolkit = DLTKLanguageManager.getLanguageToolkit(scriptProject);

-    if (toolkit != null && toolkit.getNatureId().equals(RutaNature.NATURE_ID)) {

-      IInterpreterInstall install = null;

-      try {

-        install = ScriptRuntime.getInterpreterInstall(scriptProject);

-      } catch (CoreException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      }

-      if (install != null) {

-        PackagesManager manager = PackagesManager.getInstance();

-        IPath[] paths = manager.getPathsForPackage(install, pkgName);

-        if (paths != null && paths.length > 0) {

-          return true;

-        }

-        Map dependencies = manager.getDependencies(pkgName, install);

-        for (Iterator iterator = dependencies.keySet().iterator(); iterator.hasNext();) {

-          String pkg = (String) iterator.next();

-          IPath[] paths2 = manager.getPathsForPackage(install, pkg);

-          if (paths2 != null && paths2.length > 0) {

-            return true;

-          }

-        }

-      }

-    }

-    return false;

-  }

-

-  public static boolean hasCorrections(Annotation annotation) {

-    if (annotation instanceof MarkerAnnotation) {

-      MarkerAnnotation mAnnot = (MarkerAnnotation) annotation;

-      IMarker marker = mAnnot.getMarker();

-      return isFixable(marker);

-    } else if (annotation instanceof IScriptAnnotation) {

-      return isFixable((IScriptAnnotation) annotation);

-    }

-    return false;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaDecoratorDetector.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaDecoratorDetector.java
deleted file mode 100644
index 26bbd21..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaDecoratorDetector.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.jface.text.rules.IWordDetector;

-

-class RutaDecoratorDetector implements IWordDetector {

-

-  public boolean isWordStart(char c) {

-    return c == '@';

-  }

-

-  public boolean isWordPart(char c) {

-    return c != '\n' && c != '\r' && c != '(';

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaOutlineInformationControl.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaOutlineInformationControl.java
deleted file mode 100644
index d3c01cf..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaOutlineInformationControl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.text.ScriptOutlineInformationControl;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.swt.widgets.Shell;

-

-public class RutaOutlineInformationControl extends ScriptOutlineInformationControl {

-

-  public RutaOutlineInformationControl(Shell parent, int shellStyle, int treeStyle, String commandId) {

-    super(parent, shellStyle, treeStyle, commandId);

-  }

-

-  @Override

-  protected IPreferenceStore getPreferenceStore() {

-    return RutaIdeUIPlugin.getDefault().getPreferenceStore();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaPairMatcher.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaPairMatcher.java
deleted file mode 100644
index 597dadd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaPairMatcher.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.expressions.StringLiteral;

-import org.eclipse.dltk.ast.parser.ISourceParser;

-import org.eclipse.dltk.ast.statements.Block;

-import org.eclipse.dltk.compiler.env.ModuleSource;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.DLTKLanguageManager;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.SourceParserUtil;

-import org.eclipse.dltk.internal.ui.editor.ScriptEditor;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.IDocumentExtension4;

-import org.eclipse.jface.text.IRegion;

-import org.eclipse.jface.text.Region;

-import org.eclipse.jface.text.source.ICharacterPairMatcher;

-

-/**

- * Helper class for match pairs of characters.

- */

-public final class RutaPairMatcher implements ICharacterPairMatcher {

-

-  // private char[] fPairs;

-

-  private IDocument fDocument;

-

-  private int fOffset;

-

-  private int fStartPos;

-

-  private int fEndPos;

-

-  private int fAnchor;

-

-  private ScriptEditor editor;

-

-  private class PairBlock {

-    public PairBlock(int start, int end, char c) {

-      this.start = start;

-      this.end = end;

-      this.c = c;

-    }

-

-    int start;

-

-    int end;

-

-    char c;

-  }

-

-  private PairBlock[] cachedPairs;

-

-  private long cachedStamp = -1;

-

-  private long cachedHash = -1;

-

-  public RutaPairMatcher(char[] pairs, ScriptEditor editor) {

-    // if (pairs == null) {

-    // throw new IllegalArgumentException();

-    // }

-

-    // fPairs = pairs;

-    this.editor = editor;

-  }

-

-  private PairBlock[] computePairRanges(final int offset, String contents) {

-    ISourceParser pp = null;

-    pp = DLTKLanguageManager.getSourceParser(RutaNature.NATURE_ID);

-    ModuleDeclaration md = null;// pp.parse(null, contents.toCharArray(),

-    // null);

-    IModelElement el = this.editor.getInputModelElement();

-    if (el != null && el instanceof ISourceModule) {

-      md = SourceParserUtil.getModuleDeclaration((ISourceModule) el, null);

-    }

-    if (md == null) {

-      md = (ModuleDeclaration) pp.parse(new ModuleSource(contents), null);

-    }

-    if (md == null) {

-      return new PairBlock[0];

-    }

-    final List result = new ArrayList();

-    try {

-      md.traverse(new ASTVisitor() {

-        @Override

-        public boolean visitGeneral(ASTNode node) throws Exception {

-          if (node instanceof StringLiteral) {

-            StringLiteral be = (StringLiteral) node;

-            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '\"'));

-            // } else if (node instanceof RutaExecuteExpression) {

-            // RutaExecuteExpression be = (RutaExecuteExpression) node;

-            // result.add(new PairBlock(offset + be.sourceStart(),

-            // offset + be.sourceEnd() - 1, '['));

-          } else if (node instanceof Block) {

-            Block be = (Block) node;

-            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '{'));

-          }

-          return super.visitGeneral(node);

-        }

-      });

-    } catch (Exception e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-

-    // Iterator i = statements.iterator();

-    // while (i.hasNext()) {

-    // Statement sst = (Statement) i.next();

-    // if (sst instanceof RutaStatement) {

-    // RutaStatement statement = (RutaStatement) sst;

-    // /*

-    // * result.add(new CodeBlock(statement, new Region(offset +

-    // * statement.sourceStart(), statement.sourceEnd() -

-    // * statement.sourceStart())));

-    // */

-    // Iterator si = statement.getExpressions().iterator();

-    // while (si.hasNext()) {

-    // Expression ex = (Expression) si.next();

-    // if (ex instanceof RutaBlockExpression) {

-    // RutaBlockExpression be = (RutaBlockExpression) ex;

-    // try {

-    // String newContents = contents.substring(be

-    // .sourceStart() + 1, be.sourceEnd() - 1);

-    // result.add(new PairBlock(offset + be.sourceStart(),

-    // offset + be.sourceEnd() - 1, '{'));

-    // PairBlock[] cb = computePairRanges(offset

-    // + be.sourceStart() + 1, newContents);

-    // for (int j = 0; j < cb.length; j++) {

-    // result.add(cb[j]);

-    // }

-    // } catch (StringIndexOutOfBoundsException e) {

-    // }

-    // } else if (ex instanceof StringLiteral) {

-    // StringLiteral be = (StringLiteral) ex;

-    // result.add(new PairBlock(offset + be.sourceStart(),

-    // offset + be.sourceEnd() - 1, '\"'));

-    // } else if (ex instanceof RutaExecuteExpression) {

-    // RutaExecuteExpression be = (RutaExecuteExpression) ex;

-    // result.add(new PairBlock(offset + be.sourceStart(),

-    // offset + be.sourceEnd() - 1, '['));

-    // }

-    // }

-    // }

-    // }

-    return (PairBlock[]) result.toArray(new PairBlock[result.size()]);

-  }

-

-  /**

-   * Fully recalcs pairs for document

-   * 

-   * @param doc

-   * @throws BadLocationException

-   */

-  private void recalc() throws BadLocationException {

-    String content = fDocument.get(0, fDocument.getLength());

-    cachedPairs = computePairRanges(0, content);

-

-    if (fDocument instanceof IDocumentExtension4) {

-      cachedStamp = ((IDocumentExtension4) fDocument).getModificationStamp();

-    } else {

-      cachedHash = content.hashCode();

-    }

-  }

-

-  /**

-   * Recalcs pairs for the document, only if it is required

-   */

-  private void updatePairs() throws BadLocationException {

-    if (fDocument instanceof IDocumentExtension4) {

-      IDocumentExtension4 document = (IDocumentExtension4) fDocument;

-

-      if (document.getModificationStamp() == cachedStamp) {

-        return;

-      }

-

-    } else {

-      String content = fDocument.get(0, fDocument.getLength());

-

-      if (content.hashCode() == cachedHash) {

-        return;

-      }

-    }

-

-    recalc();

-  }

-

-  private static boolean isBrace(char c) {

-    return (c == '{' || c == '}' || c == '\"' || c == '[' || c == ']');

-  }

-

-  public IRegion match(IDocument document, int offset) {

-    if (document == null || offset < 0) {

-      throw new IllegalArgumentException();

-    }

-

-    try {

-      fOffset = offset;

-      fDocument = document;

-

-      if (!isBrace(fDocument.getChar(offset))

-              && (offset == 0 || !isBrace(fDocument.getChar(offset - 1)))) {

-        return null;

-      }

-

-      updatePairs();

-

-      if (matchPairsAt() && fStartPos != fEndPos)

-        return new Region(fStartPos, fEndPos - fStartPos + 1);

-    } catch (BadLocationException e) {

-      if (DLTKCore.DEBUG_PARSER)

-        e.printStackTrace();

-    }

-

-    return null;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor()

-   */

-  public int getAnchor() {

-    return fAnchor;

-  }

-

-  public void dispose() {

-    clear();

-    fDocument = null;

-  }

-

-  public void clear() {

-  }

-

-  private boolean matchPairsAt() {

-

-    fStartPos = -1;

-    fEndPos = -1;

-

-    for (int i = 0; i < cachedPairs.length; i++) {

-      PairBlock block = cachedPairs[i];

-

-      if (fOffset == block.end + 1) {

-        fStartPos = block.start - 1;

-        fEndPos = block.start;

-        fAnchor = LEFT;

-        return true;

-      }

-      if (fOffset == block.start + 1) {

-        fStartPos = block.end - 1;

-        fEndPos = block.end;

-        fAnchor = LEFT;

-        return true;

-      }

-

-    }

-

-    return false;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaPartitionScanner.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaPartitionScanner.java
deleted file mode 100644
index 947c940..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaPartitionScanner.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.eclipse.jface.text.rules.EndOfLineRule;

-import org.eclipse.jface.text.rules.IPredicateRule;

-import org.eclipse.jface.text.rules.IToken;

-import org.eclipse.jface.text.rules.MultiLineRule;

-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;

-import org.eclipse.jface.text.rules.Token;

-

-public class RutaPartitionScanner extends RuleBasedPartitionScanner {

-

-  public RutaPartitionScanner() {

-    super();

-

-    IToken string = new Token(RutaPartitions.RUTA_STRING);

-    IToken comment = new Token(RutaPartitions.RUTA_COMMENT);

-

-    List/* < IPredicateRule > */rules = new ArrayList/* <IPredicateRule> */();

-

-    rules.add(new EndOfLineRule("//", comment));

-

-    rules.add(new MultiLineRule("\"\"\"", "\"\"\"", string, '\\'));

-

-    rules.add(new MultiLineRule("\'\'\'", "\'\'\'", string, '\\'));

-

-    rules.add(new MultiLineRule("\'", "\'", string, '\\'));

-

-    rules.add(new MultiLineRule("\"", "\"", string, '\\'));

-

-    IPredicateRule[] result = new IPredicateRule[rules.size()];

-    rules.toArray(result);

-    setPredicateRules(result);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaRequireMarkerResolutionGenerator.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaRequireMarkerResolutionGenerator.java
deleted file mode 100644
index a00b35d..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaRequireMarkerResolutionGenerator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.dltk.core.CorrectionEngine;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.ui.IMarkerResolution;

-import org.eclipse.ui.IMarkerResolutionGenerator;

-

-public class RutaRequireMarkerResolutionGenerator implements IMarkerResolutionGenerator {

-

-  public IMarkerResolution[] getResolutions(IMarker marker) {

-    if (RutaCorrectionProcessor.isFixable(marker)) {

-      String pkgName = CorrectionEngine.getProblemArguments(marker)[0];

-      if (pkgName != null) {

-        IProject project = marker.getResource().getProject();

-        IScriptProject scriptProject = DLTKCore.create(project);

-        return new IMarkerResolution[] { new RutaRequirePackageMarkerResolution(pkgName,

-                scriptProject) };

-      }

-    }

-    return new IMarkerResolution[0];

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaRequirePackageMarkerResolution.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaRequirePackageMarkerResolution.java
deleted file mode 100644
index 0b57050..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaRequirePackageMarkerResolution.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.HashSet;

-import java.util.Set;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.InterpreterContainerHelper;

-import org.eclipse.dltk.launching.ScriptRuntime;

-import org.eclipse.dltk.ui.editor.IScriptAnnotation;

-import org.eclipse.dltk.ui.text.IAnnotationResolution;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.source.Annotation;

-import org.eclipse.osgi.util.NLS;

-import org.eclipse.ui.IMarkerResolution;

-

-final class RutaRequirePackageMarkerResolution implements IMarkerResolution, IAnnotationResolution {

-  private String pkgName;

-

-  private IScriptProject project;

-

-  public RutaRequirePackageMarkerResolution(String pkgName, IScriptProject scriptProject) {

-    this.pkgName = pkgName;

-    this.project = scriptProject;

-  }

-

-  public String getLabel() {

-    final String msg = Messages.RutaRequirePackageMarkerResolution_addPackageToBuildpath;

-    return NLS.bind(msg, pkgName);

-  }

-

-  private boolean resolve() {

-    final IInterpreterInstall install;

-    try {

-      install = ScriptRuntime.getInterpreterInstall(project);

-      if (install != null) {

-        final Set names = new HashSet();

-        final Set autoNames = new HashSet();

-        InterpreterContainerHelper.getInterpreterContainerDependencies(project, names, autoNames);

-

-        if (names.add(pkgName)) {

-          InterpreterContainerHelper.setInterpreterContainerDependencies(project, names, autoNames);

-          return true;

-        }

-      }

-    } catch (CoreException e) {

-      RutaIdeUIPlugin.error("require package resolve error", e); //$NON-NLS-1$

-    }

-    return false;

-  }

-

-  public void run(final IMarker marker) {

-    if (resolve()) {

-      try {

-        marker.delete();

-      } catch (CoreException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      }

-    }

-  }

-

-  public void run(Annotation annotation, IDocument document) {

-    resolve();

-  }

-

-  public void run(IScriptAnnotation annotation, IDocument document) {

-    resolve();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaSourceViewerConfiguration.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaSourceViewerConfiguration.java
deleted file mode 100644
index 2042aa1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaSourceViewerConfiguration.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.apache.uima.ruta.ide.ui.hierarchy.RutaHierarchyInformationControl;

-import org.apache.uima.ruta.ide.ui.text.completion.RutaContentAssistPreference;

-import org.apache.uima.ruta.ide.ui.text.completion.RutaScriptCompletionProcessor;

-import org.eclipse.core.runtime.Assert;

-import org.eclipse.dltk.internal.ui.editor.EditorUtility;

-import org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer;

-import org.eclipse.dltk.internal.ui.text.ScriptElementProvider;

-import org.eclipse.dltk.ui.CodeFormatterConstants;

-import org.eclipse.dltk.ui.text.AbstractScriptScanner;

-import org.eclipse.dltk.ui.text.IColorManager;

-import org.eclipse.dltk.ui.text.ScriptPresentationReconciler;

-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;

-import org.eclipse.dltk.ui.text.completion.ContentAssistPreference;

-import org.eclipse.dltk.ui.text.completion.ContentAssistProcessor;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.AbstractInformationControlManager;

-import org.eclipse.jface.text.IAutoEditStrategy;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.IInformationControl;

-import org.eclipse.jface.text.IInformationControlCreator;

-import org.eclipse.jface.text.contentassist.ContentAssistant;

-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;

-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;

-import org.eclipse.jface.text.information.IInformationPresenter;

-import org.eclipse.jface.text.information.IInformationProvider;

-import org.eclipse.jface.text.information.InformationPresenter;

-import org.eclipse.jface.text.presentation.IPresentationReconciler;

-import org.eclipse.jface.text.presentation.PresentationReconciler;

-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;

-import org.eclipse.jface.text.rules.RuleBasedScanner;

-import org.eclipse.jface.text.source.ISourceViewer;

-import org.eclipse.jface.util.PropertyChangeEvent;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class RutaSourceViewerConfiguration extends ScriptSourceViewerConfiguration {

-

-  private RutaTextTools fTextTools;

-

-  private RutaCodeScanner fCodeScanner;

-

-  private AbstractScriptScanner fStringScanner;

-

-  private AbstractScriptScanner fCommentScanner;

-

-  public RutaSourceViewerConfiguration(IColorManager colorManager,

-          IPreferenceStore preferenceStore, ITextEditor editor, String partitioning) {

-    super(colorManager, preferenceStore, editor, partitioning);

-  }

-

-  @Override

-  public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {

-    return RutaPartitions.RUTA_PARTITION_TYPES;

-  }

-

-  @Override

-  public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {

-    return new String[] { "\t", "    " };

-  }

-

-  /*

-   * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getTabWidth(org

-   * .eclipse.jface.text.source.ISourceViewer)

-   */

-  @Override

-  public int getTabWidth(ISourceViewer sourceViewer) {

-    if (fPreferenceStore == null)

-      return super.getTabWidth(sourceViewer);

-    return fPreferenceStore.getInt(CodeFormatterConstants.FORMATTER_TAB_SIZE);

-  }

-

-  @Override

-  protected void initializeScanners() {

-    Assert.isTrue(isNewSetup());

-    fCodeScanner = new RutaCodeScanner(getColorManager(), fPreferenceStore);

-    fStringScanner = new RutaStringScanner(getColorManager(), fPreferenceStore);

-    fCommentScanner = createCommentScanner(RutaColorConstants.RUTA_SINGLE_LINE_COMMENT,

-            RutaColorConstants.RUTA_TODO_TAG);

-  }

-

-  @Override

-  protected void alterContentAssistant(ContentAssistant assistant) {

-    // IDocument.DEFAULT_CONTENT_TYPE

-    IContentAssistProcessor scriptProcessor = new RutaScriptCompletionProcessor(getEditor(),

-            assistant, IDocument.DEFAULT_CONTENT_TYPE);

-    assistant.setContentAssistProcessor(scriptProcessor, IDocument.DEFAULT_CONTENT_TYPE);

-

-    ContentAssistProcessor singleLineProcessor = new RutaScriptCompletionProcessor(getEditor(),

-            assistant, RutaPartitions.RUTA_COMMENT);

-    assistant.setContentAssistProcessor(singleLineProcessor, RutaPartitions.RUTA_COMMENT);

-

-    ContentAssistProcessor stringProcessor = new RutaScriptCompletionProcessor(getEditor(),

-            assistant, RutaPartitions.RUTA_STRING);

-    assistant.setContentAssistProcessor(stringProcessor, RutaPartitions.RUTA_STRING);

-  }

-

-  private boolean isNewSetup() {

-    return fTextTools == null;

-  }

-

-  protected RuleBasedScanner getStringScanner() {

-    return fStringScanner;

-  }

-

-  @Override

-  public String getCommentPrefix() {

-    return "//";

-  }

-

-  protected RuleBasedScanner getCommentScanner() {

-    return fCommentScanner;

-  }

-

-  @Override

-  public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {

-    PresentationReconciler reconciler = new ScriptPresentationReconciler();

-    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

-

-    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(this.fCodeScanner);

-    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);

-    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

-

-    dr = new DefaultDamagerRepairer(getStringScanner());

-    reconciler.setDamager(dr, RutaPartitions.RUTA_STRING);

-    reconciler.setRepairer(dr, RutaPartitions.RUTA_STRING);

-

-    dr = new DefaultDamagerRepairer(getCommentScanner());

-    reconciler.setDamager(dr, RutaPartitions.RUTA_COMMENT);

-    reconciler.setRepairer(dr, RutaPartitions.RUTA_COMMENT);

-

-    return reconciler;

-  }

-

-  @Override

-  public void handlePropertyChangeEvent(PropertyChangeEvent event) {

-    Assert.isTrue(isNewSetup());

-    if (fCodeScanner.affectsBehavior(event))

-      fCodeScanner.adaptToPreferenceChange(event);

-    if (fStringScanner.affectsBehavior(event))

-      fStringScanner.adaptToPreferenceChange(event);

-    if (fCommentScanner.affectsBehavior(event)) {

-      fCommentScanner.adaptToPreferenceChange(event);

-    }

-  }

-

-  @Override

-  public boolean affectsTextPresentation(PropertyChangeEvent event) {

-    return fCodeScanner.affectsBehavior(event) || fStringScanner.affectsBehavior(event)

-            || fCommentScanner.affectsBehavior(event);

-  }

-

-  private IInformationControlCreator getHierarchyPresenterControlCreator(ISourceViewer sourceViewer) {

-    return new IInformationControlCreator() {

-      public IInformationControl createInformationControl(Shell parent) {

-        int shellStyle = SWT.RESIZE;

-        int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;

-        return new RutaHierarchyInformationControl(parent, shellStyle, treeStyle);

-      }

-    };

-  }

-

-  @Override

-  public IInformationPresenter getHierarchyPresenter(ScriptSourceViewer sourceViewer,

-          boolean doCodeResolve) {

-    // Do not create hierarchy presenter if there's no CU.

-    if (getEditor() != null && getEditor().getEditorInput() != null

-            && EditorUtility.getEditorInputModelElement(getEditor(), true) == null)

-      return null;

-

-    InformationPresenter presenter = new InformationPresenter(

-            getHierarchyPresenterControlCreator(sourceViewer));

-    presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

-    presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);

-    IInformationProvider provider = new ScriptElementProvider(getEditor(), doCodeResolve);

-    presenter.setInformationProvider(provider, IDocument.DEFAULT_CONTENT_TYPE);

-

-    presenter.setSizeConstraints(50, 20, true, false);

-    return presenter;

-  }

-

-  public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {

-    if (!fPreferenceStore

-            .getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINKS_ENABLED))

-      return null;

-

-    IHyperlinkDetector[] inheritedDetectors = super.getHyperlinkDetectors(sourceViewer);

-

-    if (getEditor() == null) {

-      return inheritedDetectors;

-    }

-

-    int inheritedDetectorsLength = inheritedDetectors != null ? inheritedDetectors.length : 0;

-    IHyperlinkDetector[] detectors = new IHyperlinkDetector[inheritedDetectorsLength + 1];

-

-    for (int i = 0; i < inheritedDetectorsLength; i++)

-      detectors[i] = inheritedDetectors[i];

-    detectors[inheritedDetectorsLength] = new ExternalTypeHyperlinkDetector(getEditor());

-

-    return detectors;

-  }

-

-  @Override

-  protected IInformationControlCreator getOutlinePresenterControlCreator(

-          ISourceViewer sourceViewer, final String commandId) {

-    return new IInformationControlCreator() {

-      public IInformationControl createInformationControl(Shell parent) {

-        int shellStyle = SWT.RESIZE;

-        int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;

-        return new RutaOutlineInformationControl(parent, shellStyle, treeStyle, commandId);

-      }

-    };

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAutoEditStrategies

-   * (org.eclipse.jface.text.source.ISourceViewer, java.lang.String)

-   */

-  @Override

-  public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {

-    // TODO: check contentType. think, do we really need it? :)

-    String partitioning = getConfiguredDocumentPartitioning(sourceViewer);

-    // return new IAutoEditStrategy[] { new DefaultAutoIndentStrategy() };

-    return new IAutoEditStrategy[] { new RutaAutoEditStrategy(fPreferenceStore, partitioning) };

-  }

-

-  @Override

-  protected void initializeQuickOutlineContexts(InformationPresenter presenter,

-          IInformationProvider provider) {

-    presenter.setInformationProvider(provider, RutaPartitions.RUTA_COMMENT);

-    presenter.setInformationProvider(provider, RutaPartitions.RUTA_STRING);

-  }

-

-  @Override

-  protected ContentAssistPreference getContentAssistPreference() {

-    return RutaContentAssistPreference.getDefault();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaStringScanner.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaStringScanner.java
deleted file mode 100644
index 5e60edd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaStringScanner.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.dltk.ui.text.AbstractScriptScanner;

-import org.eclipse.dltk.ui.text.IColorManager;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.rules.WhitespaceRule;

-

-public class RutaStringScanner extends AbstractScriptScanner {

-

-  private static final String[] tokenProperties = new String[] { RutaColorConstants.RUTA_STRING,

-      RutaColorConstants.RUTA_NUMBER, RutaColorConstants.RUTA_VARIABLE };

-

-  public RutaStringScanner(IColorManager manager, IPreferenceStore store) {

-    super(manager, store);

-

-    initialize();

-  }

-

-  @Override

-  protected String[] getTokenProperties() {

-    return tokenProperties;

-  }

-

-  @Override

-  protected List createRules() {

-    List/* <IRule> */rules = new ArrayList/* <IRule> */();

-

-    // Add generic whitespace rule.

-    rules.add(new WhitespaceRule(new RutaWhitespaceDetector()));

-

-    setDefaultReturnToken(getToken(RutaColorConstants.RUTA_STRING));

-

-    return rules;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaTextTools.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaTextTools.java
deleted file mode 100644
index cc1bf06..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaTextTools.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.ISemanticHighlightingExtension;

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.apache.uima.ruta.ide.ui.RutaSemanticPositionUpdater;

-import org.eclipse.dltk.core.SimpleClassDLTKExtensionManager;

-import org.eclipse.dltk.ui.editor.highlighting.ISemanticHighlightingUpdater;

-import org.eclipse.dltk.ui.editor.highlighting.SemanticHighlighting;

-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;

-import org.eclipse.dltk.ui.text.ScriptTextTools;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.rules.IPartitionTokenScanner;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class RutaTextTools extends ScriptTextTools {

-

-  private IPartitionTokenScanner fPartitionScanner;

-

-  private SimpleClassDLTKExtensionManager extensions = new SimpleClassDLTKExtensionManager(

-          RutaIdeUIPlugin.PLUGIN_ID + ".rutaSemanticHighlighting"); //$NON-NLS-1$

-

-  private final static String[] LEGAL_CONTENT_TYPES = new String[] { RutaPartitions.RUTA_STRING,

-      RutaPartitions.RUTA_COMMENT };

-

-  public RutaTextTools(boolean autoDisposeOnDisplayDispose) {

-    super(RutaPartitions.RUTA_PARTITIONING, LEGAL_CONTENT_TYPES, autoDisposeOnDisplayDispose);

-    fPartitionScanner = new RutaPartitionScanner();

-  }

-

-  @Override

-  public ScriptSourceViewerConfiguration createSourceViewerConfiguraton(

-          IPreferenceStore preferenceStore, ITextEditor editor, String partitioning) {

-    return new RutaSourceViewerConfiguration(getColorManager(), preferenceStore, editor,

-            partitioning);

-  }

-

-  @Override

-  public IPartitionTokenScanner getPartitionScanner() {

-    return fPartitionScanner;

-  }

-

-  private ISemanticHighlightingExtension[] getExtensions() {

-    Object[] objects = extensions.getObjects();

-    ISemanticHighlightingExtension[] exts = new ISemanticHighlightingExtension[objects.length];

-

-    for (int i = 0; i < objects.length; i++) {

-      exts[i] = ((ISemanticHighlightingExtension) objects[i]);

-    }

-    return exts;

-  }

-

-  @Override

-  public SemanticHighlighting[] getSemanticHighlightings() {

-    List highlightings = new ArrayList();

-    ISemanticHighlightingExtension[] exts = getExtensions();

-    for (int i = 0; i < exts.length; i++) {

-      SemanticHighlighting[] hl = exts[i].getHighlightings();

-      if (hl != null) {

-        highlightings.addAll(Arrays.asList(hl));

-      }

-    }

-    SemanticHighlighting[] ret = new SemanticHighlighting[highlightings.size()];

-    for (int i = 0; i < highlightings.size(); i++)

-      ret[i] = (SemanticHighlighting) highlightings.get(i);

-

-    return ret;

-  }

-

-  public ISemanticHighlightingUpdater getSemanticPositionUpdater(String natureId) {

-    return new RutaSemanticPositionUpdater(getExtensions());

-  }

-

-  public final static class SH extends SemanticHighlighting {

-

-    private final String preferenceKey;

-

-    private final String bgColor;

-

-    private final String description;

-

-    public SH(String editorXmlTagNameColor, String bgColor, String desc) {

-      this.preferenceKey = editorXmlTagNameColor;

-      this.bgColor = bgColor;

-      this.description = desc;

-    }

-

-    @Override

-    public boolean isSemanticOnly() {

-      return description != null;

-    }

-

-    @Override

-    public String getPreferenceKey() {

-      return preferenceKey;

-    }

-

-    @Override

-    public String getBackgroundPreferenceKey() {

-      return bgColor;

-    }

-

-    @Override

-    public int hashCode() {

-      final int prime = 31;

-      int result = 1;

-      result = prime * result + ((preferenceKey == null) ? 0 : preferenceKey.hashCode());

-      return result;

-    }

-

-    @Override

-    public boolean equals(Object obj) {

-      if (this == obj)

-        return true;

-      if (obj == null)

-        return false;

-      if (getClass() != obj.getClass())

-        return false;

-      final SH other = (SH) obj;

-      if (preferenceKey == null) {

-        if (other.preferenceKey != null)

-          return false;

-      } else if (!preferenceKey.equals(other.preferenceKey))

-        return false;

-      return true;

-    }

-

-    @Override

-    public String getDisplayName() {

-      return description;

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWhitespaceDetector.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWhitespaceDetector.java
deleted file mode 100644
index c1a943f..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWhitespaceDetector.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.jface.text.rules.IWhitespaceDetector;

-

-public class RutaWhitespaceDetector implements IWhitespaceDetector {

-

-  /*

-   * (non-Javadoc) Method declared on IWhitespaceDetector

-   */

-  public boolean isWhitespace(char character) {

-    return Character.isWhitespace(character);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWordDetector.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWordDetector.java
deleted file mode 100644
index 7e5eb4c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWordDetector.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.jface.text.rules.IWordDetector;

-

-public class RutaWordDetector implements IWordDetector {

-

-  /*

-   * (non-Javadoc) Method declared on IWordDetector.

-   */

-  public boolean isWordPart(char character) {

-    return Character.isJavaIdentifierPart(character);

-  }

-

-  /*

-   * (non-Javadoc) Method declared on IWordDetector.

-   */

-  public boolean isWordStart(char character) {

-    return Character.isJavaIdentifierStart(character);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWordRule.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWordRule.java
deleted file mode 100644
index bbc343d..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/RutaWordRule.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.eclipse.core.runtime.Assert;

-import org.eclipse.jface.text.rules.ICharacterScanner;

-import org.eclipse.jface.text.rules.IPredicateRule;

-import org.eclipse.jface.text.rules.IToken;

-import org.eclipse.jface.text.rules.IWordDetector;

-import org.eclipse.jface.text.rules.Token;

-

-public class RutaWordRule implements IPredicateRule {

-

-  /** Internal setting for the un-initialized column constraint */

-  protected static final int UNDEFINED = -1;

-

-  /** The word detector used by this rule */

-  protected IWordDetector fDetector;

-

-  /**

-   * The default token to be returned on success and if nothing else has been specified.

-   */

-  protected IToken fDefaultToken;

-

-  /** The column constraint */

-  protected int fColumn = UNDEFINED;

-

-  /** The table of predefined words and token for this rule */

-  protected Map fWords = new HashMap();

-

-  /** Buffer used for pattern detection */

-  private StringBuffer fBuffer = new StringBuffer();

-

-  // private IToken classNameToken;

-

-  // private IToken funcNameToken;

-

-  /**

-   * Creates a rule which, with the help of a word detector, will return the token associated with

-   * the detected word. If no token has been associated, the specified default token will be

-   * returned.

-   * 

-   * @param detector

-   *          the word detector to be used by this rule, may not be <code>null</code>

-   * @param defaultToken

-   *          the default token to be returned on success if nothing else is specified, may not be

-   *          <code>null</code>

-   * @param classNameToken

-   * 

-   * @see #addWord(String, IToken)

-   */

-  public RutaWordRule(IWordDetector detector, IToken defaultToken, IToken classNameToken) {

-

-    Assert.isNotNull(detector);

-    Assert.isNotNull(defaultToken);

-

-    fDetector = detector;

-    fDefaultToken = defaultToken;

-    // this.classNameToken = classNameToken;

-    // this.funcNameToken = funcNameToken;

-  }

-

-  /**

-   * Adds a word and the token to be returned if it is detected.

-   * 

-   * @param word

-   *          the word this rule will search for, may not be <code>null</code>

-   * @param token

-   *          the token to be returned if the word has been found, may not be <code>null</code>

-   */

-  public void addWord(String word, IToken token) {

-    Assert.isNotNull(word);

-    Assert.isNotNull(token);

-

-    fWords.put(word, token);

-  }

-

-  /**

-   * Sets a column constraint for this rule. If set, the rule's token will only be returned if the

-   * pattern is detected starting at the specified column. If the column is smaller then 0, the

-   * column constraint is considered removed.

-   * 

-   * @param column

-   *          the column in which the pattern starts

-   */

-  public void setColumnConstraint(int column) {

-    if (column < 0)

-      column = UNDEFINED;

-    fColumn = column;

-  }

-

-  private String lastFound = "";

-

-  public IToken evaluate(ICharacterScanner scanner) {

-    int c = scanner.read();

-    fBuffer.setLength(0);

-

-    // special for '->'

-    if (c == '-') {

-      fBuffer.append((char) c);

-      c = scanner.read();

-      if (c == '>') {

-        fBuffer.append((char) c);

-        String str = fBuffer.toString();

-        IToken token = (IToken) fWords.get(str);

-        if (token != null) {

-          lastFound = str;

-          return token;

-        }

-      } else {

-        // scanner.unread();

-

-        fBuffer.setLength(0);

-      }

-    }

-    // the rest

-    if (fDetector.isWordStart((char) c)) {

-      if (fColumn == UNDEFINED || (fColumn == scanner.getColumn() - 1)) {

-        fBuffer.setLength(0);

-

-        do {

-          fBuffer.append((char) c);

-          c = scanner.read();

-        } while (c != ICharacterScanner.EOF && fDetector.isWordPart((char) c));

-        scanner.unread();

-

-        String str = fBuffer.toString();

-        IToken token = (IToken) fWords.get(str);

-        if (token != null) {

-          lastFound = str;

-          return token;

-        }

-

-        if (fDefaultToken.isUndefined())

-          unreadBuffer(scanner);

-

-        return fDefaultToken;

-      }

-    }

-

-    scanner.unread();

-    return Token.UNDEFINED;

-  }

-

-  protected void unreadBuffer(ICharacterScanner scanner) {

-    for (int i = fBuffer.length() - 1; i >= 0; i--)

-      scanner.unread();

-  }

-

-  public IToken evaluate(ICharacterScanner scanner, boolean resume) {

-    return evaluate(scanner);

-  }

-

-  public IToken getSuccessToken() {

-    return this.fDefaultToken;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/SimpleRutaSourceViewerConfiguration.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/SimpleRutaSourceViewerConfiguration.java
deleted file mode 100644
index 8b0a990..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/SimpleRutaSourceViewerConfiguration.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*

- * 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.ruta.ide.ui.text;

-

-import org.eclipse.dltk.ui.text.IColorManager;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.IAutoEditStrategy;

-import org.eclipse.jface.text.IInformationControlCreator;

-import org.eclipse.jface.text.ITextHover;

-import org.eclipse.jface.text.formatter.IContentFormatter;

-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;

-import org.eclipse.jface.text.information.IInformationPresenter;

-import org.eclipse.jface.text.source.IAnnotationHover;

-import org.eclipse.jface.text.source.ISourceViewer;

-import org.eclipse.ui.texteditor.ITextEditor;

-

-public class SimpleRutaSourceViewerConfiguration extends RutaSourceViewerConfiguration {

-

-  private boolean fConfigureFormatter;

-

-  public SimpleRutaSourceViewerConfiguration(IColorManager colorManager,

-          IPreferenceStore preferenceStore, ITextEditor editor, String partitioning,

-          boolean configureFormatter) {

-    super(colorManager, preferenceStore, editor, partitioning);

-    fConfigureFormatter = configureFormatter;

-  }

-

-  @Override

-  public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {

-    return null;

-  }

-

-  @Override

-  public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {

-    return null;

-  }

-

-  @Override

-  public IAnnotationHover getOverviewRulerAnnotationHover(ISourceViewer sourceViewer) {

-    return null;

-  }

-

-  @Override

-  public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType) {

-    return null;

-  }

-

-  @Override

-  public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {

-    return null;

-  }

-

-  @Override

-  public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {

-    return null;

-  }

-

-  @Override

-  public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {

-    if (fConfigureFormatter)

-      return super.getContentFormatter(sourceViewer);

-    else

-      return null;

-  }

-

-  @Override

-  public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) {

-    return null;

-  }

-

-  @Override

-  public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {

-    return null;

-  }

-

-  public IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer, boolean doCodeResolve) {

-    return null;

-  }

-

-  public IInformationPresenter getHierarchyPresenter(ISourceViewer sourceViewer,

-          boolean doCodeResolve) {

-    return null;

-  }

-

-  @Override

-  public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {

-    return null;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaCompletionProposalCollector.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaCompletionProposalCollector.java
deleted file mode 100644
index fe3967f..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaCompletionProposalCollector.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.core.CompletionProposal;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.ui.text.completion.IScriptCompletionProposal;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposal;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalCollector;

-import org.eclipse.swt.graphics.Image;

-

-public class RutaCompletionProposalCollector extends ScriptCompletionProposalCollector {

-

-  protected final static char[] VAR_TRIGGER = new char[] { '\t', ' ', '=', ';', '.' };

-

-  @Override

-  protected char[] getVarTrigger() {

-    return VAR_TRIGGER;

-  }

-

-  public RutaCompletionProposalCollector(ISourceModule module) {

-    super(module);

-  }

-

-  // Specific proposals creation. May be use factory?

-  @Override

-  protected ScriptCompletionProposal createScriptCompletionProposal(String completion,

-          int replaceStart, int length, Image image, String displayString, int i) {

-    return new RutaScriptCompletionProposal(completion, replaceStart, length, image, null, i);

-  }

-

-  @Override

-  protected ScriptCompletionProposal createScriptCompletionProposal(String completion,

-          int replaceStart, int length, Image image, String displayString, int i, boolean isInDoc) {

-    return new RutaScriptCompletionProposal(displayString, replaceStart, length, image,

-            displayString, i, isInDoc);

-  }

-

-  @Override

-  protected ScriptCompletionProposal createOverrideCompletionProposal(IScriptProject scriptProject,

-          ISourceModule compilationUnit, String name, String[] paramTypes, int start, int length,

-          String displayName, String completionProposal) {

-    return new RutaOverrideCompletionProposal(scriptProject, compilationUnit, name, paramTypes,

-            start, length, displayName, completionProposal);

-  }

-

-  @Override

-  protected IScriptCompletionProposal createKeywordProposal(CompletionProposal proposal) {

-    String completion = String.valueOf(proposal.getCompletion());

-    int start = proposal.getReplaceStart();

-    int length = getLength(proposal);

-    String label = getLabelProvider().createSimpleLabel(proposal);

-    Image img = getImage(getLabelProvider().createMethodImageDescriptor(proposal));

-    int relevance = computeRelevance(proposal);

-    return createScriptCompletionProposal(completion, start, length, img, label, relevance);

-  }

-

-  @Override

-  protected String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaCompletionProposalLabelProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaCompletionProposalLabelProvider.java
deleted file mode 100644
index 7b0b125..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaCompletionProposalLabelProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.eclipse.dltk.core.CompletionProposal;

-import org.eclipse.dltk.ui.text.completion.CompletionProposalLabelProvider;

-

-public class RutaCompletionProposalLabelProvider extends CompletionProposalLabelProvider {

-  @Override

-  protected String createMethodProposalLabel(CompletionProposal methodProposal) {

-    StringBuffer nameBuffer = new StringBuffer();

-

-    // method name

-    nameBuffer.append(methodProposal.getName());

-

-    // parameters

-    nameBuffer.append('(');

-    appendParameterList(nameBuffer, methodProposal);

-    nameBuffer.append(')');

-

-    return nameBuffer.toString();

-  }

-

-  @Override

-  protected String createOverrideMethodProposalLabel(CompletionProposal methodProposal) {

-    StringBuffer nameBuffer = new StringBuffer();

-

-    // method name

-    nameBuffer.append(methodProposal.getName());

-

-    // parameters

-    nameBuffer.append('(');

-    appendParameterList(nameBuffer, methodProposal);

-    nameBuffer.append(")  "); //$NON-NLS-1$

-

-    return nameBuffer.toString();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaContentAssistPreference.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaContentAssistPreference.java
deleted file mode 100644
index b9dc45e..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaContentAssistPreference.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.text.ScriptTextTools;

-import org.eclipse.dltk.ui.text.completion.ContentAssistPreference;

-

-public class RutaContentAssistPreference extends ContentAssistPreference {

-  static RutaContentAssistPreference sDefault;

-

-  @Override

-  protected ScriptTextTools getTextTools() {

-    return RutaIdeUIPlugin.getDefault().getTextTools();

-  }

-

-  public static ContentAssistPreference getDefault() {

-    if (sDefault == null) {

-      sDefault = new RutaContentAssistPreference();

-    }

-    return sDefault;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaNoTypeCompletionProposalComputer.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaNoTypeCompletionProposalComputer.java
deleted file mode 100644
index 566815c..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaNoTypeCompletionProposalComputer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.templates.RutaTemplateCompletionProcessor;

-import org.eclipse.dltk.core.CompletionProposal;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalCollector;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalComputer;

-import org.eclipse.dltk.ui.text.completion.ScriptContentAssistInvocationContext;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.templates.TemplateCompletionProcessor;

-

-public class RutaNoTypeCompletionProposalComputer extends ScriptCompletionProposalComputer {

-

-  @Override

-  protected ScriptCompletionProposalCollector createCollector(

-          ScriptContentAssistInvocationContext context) {

-    ScriptCompletionProposalCollector collector = new RutaCompletionProposalCollector(

-            context.getSourceModule());

-

-    collector.setIgnored(CompletionProposal.FIELD_REF, false);

-    collector.setIgnored(CompletionProposal.KEYWORD, false);

-    collector.setIgnored(CompletionProposal.PACKAGE_REF, false);

-    collector.setIgnored(CompletionProposal.LABEL_REF, false);

-    collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, false);

-    collector.setIgnored(CompletionProposal.METHOD_DECLARATION, false);

-    collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, false);

-    collector.setIgnored(CompletionProposal.METHOD_REF, false);

-    collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, false);

-    collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, false);

-

-    // collector.setIgnored(CompletionProposal.TYPE_REF, true);

-    collector.setIgnored(CompletionProposal.TYPE_REF, false);

-    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-

-    return collector;

-  }

-

-  @Override

-  protected TemplateCompletionProcessor createTemplateProposalComputer(

-          ScriptContentAssistInvocationContext context) {

-    return new RutaTemplateCompletionProcessor(context);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaOverrideCompletionProposal.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaOverrideCompletionProposal.java
deleted file mode 100644
index 1f8a3f1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaOverrideCompletionProposal.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.core.runtime.Assert;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.dltk.ui.text.completion.ScriptTypeCompletionProposal;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.BadLocationException;

-import org.eclipse.jface.text.Document;

-import org.eclipse.jface.text.IDocument;

-import org.eclipse.jface.text.contentassist.ContextInformation;

-import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4;

-import org.eclipse.jface.text.contentassist.IContextInformation;

-

-public class RutaOverrideCompletionProposal extends ScriptTypeCompletionProposal implements

-        ICompletionProposalExtension4 {

-

-  private String methodName;

-

-  public RutaOverrideCompletionProposal(IScriptProject project, ISourceModule cu,

-          String methodName, String[] paramTypes, int start, int length, String displayName,

-          String completionProposal) {

-    super(completionProposal, cu, start, length, null, displayName, 0);

-    Assert.isNotNull(project);

-    Assert.isNotNull(methodName);

-    Assert.isNotNull(paramTypes);

-    Assert.isNotNull(cu);

-

-    this.methodName = methodName;

-

-    setReplacementString(completionProposal);

-  }

-

-  @Override

-  public CharSequence getPrefixCompletionText(IDocument document, int completionOffset) {

-    return methodName;

-  }

-

-  @Override

-  protected boolean updateReplacementString(IDocument document, char trigger, int offset)

-          throws CoreException, BadLocationException {

-    final IDocument buffer = new Document(document.get());

-    int index = offset - 1;

-    while (index >= 0 && Character.isJavaIdentifierPart(buffer.getChar(index)))

-      index--;

-    final int length = offset - index - 1;

-    buffer.replace(index + 1, length, " "); //$NON-NLS-1$

-    return true;

-  }

-

-  public boolean isAutoInsertable() {

-    return false;

-  }

-

-  @Override

-  public IContextInformation getContextInformation() {

-    return new ContextInformation(getDisplayString(), getDisplayString());

-  }

-

-  @Override

-  protected boolean insertCompletion() {

-    IPreferenceStore preference = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    return preference.getBoolean(PreferenceConstants.CODEASSIST_INSERT_COMPLETION);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaScriptCompletionProcessor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaScriptCompletionProcessor.java
deleted file mode 100644
index f227f43..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaScriptCompletionProcessor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProcessor;

-import org.eclipse.jface.text.ITextViewer;

-import org.eclipse.jface.text.TextPresentation;

-import org.eclipse.jface.text.contentassist.ContentAssistant;

-import org.eclipse.jface.text.contentassist.IContextInformation;

-import org.eclipse.jface.text.contentassist.IContextInformationPresenter;

-import org.eclipse.jface.text.contentassist.IContextInformationValidator;

-import org.eclipse.ui.IEditorPart;

-

-public class RutaScriptCompletionProcessor extends ScriptCompletionProcessor {

-  public RutaScriptCompletionProcessor(IEditorPart editor, ContentAssistant assistant,

-          String partition) {

-    super(editor, assistant, partition);

-  }

-

-  @Override

-  protected String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-

-  protected static class Validator implements IContextInformationValidator,

-          IContextInformationPresenter {

-

-    private int initialOffset;

-

-    public boolean isContextInformationValid(int offset) {

-      return Math.abs(offset - initialOffset) < 5;

-    }

-

-    public void install(IContextInformation info, ITextViewer viewer, int offset) {

-      initialOffset = offset;

-    }

-

-    public boolean updatePresentation(int documentPosition, TextPresentation presentation) {

-      return false;

-    }

-  }

-

-  private IContextInformationValidator validator;

-

-  @Override

-  public IContextInformationValidator getContextInformationValidator() {

-    if (validator == null) {

-      validator = new Validator();

-    }

-    return validator;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaScriptCompletionProposal.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaScriptCompletionProposal.java
deleted file mode 100644
index 7e661bd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaScriptCompletionProposal.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposal;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.swt.graphics.Image;

-

-public class RutaScriptCompletionProposal extends ScriptCompletionProposal {

-

-  public RutaScriptCompletionProposal(String replacementString, int replacementOffset,

-          int replacementLength, Image image, String displayString, int relevance) {

-    super(replacementString, replacementOffset, replacementLength, image, displayString, relevance);

-  }

-

-  public RutaScriptCompletionProposal(String replacementString, int replacementOffset,

-          int replacementLength, Image image, String displayString, int relevance, boolean isInDoc) {

-    super(replacementString, replacementOffset, replacementLength, image, displayString, relevance,

-            isInDoc);

-  }

-

-  @Override

-  protected boolean isSmartTrigger(char trigger) {

-    if (trigger == '.') {

-      return true;

-    }

-    return false;

-  }

-

-  @Override

-  protected boolean isCamelCaseMatching() {

-    return true;

-  }

-

-  @Override

-  protected boolean insertCompletion() {

-    IPreferenceStore preference = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-    return preference.getBoolean(PreferenceConstants.CODEASSIST_INSERT_COMPLETION);

-  }

-

-  @Override

-  protected boolean isValidPrefix(String prefix) {

-    String[] split = getDisplayString().split("[.]");

-    return isPrefix(prefix, getDisplayString()) || isPrefix(prefix, split[split.length - 1]);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaTypeCompletionProposalComputer.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaTypeCompletionProposalComputer.java
deleted file mode 100644
index 0b43f28..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/completion/RutaTypeCompletionProposalComputer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.completion;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.ui.templates.RutaTemplateCompletionProcessor;

-import org.eclipse.dltk.core.CompletionProposal;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalCollector;

-import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalComputer;

-import org.eclipse.dltk.ui.text.completion.ScriptContentAssistInvocationContext;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.templates.TemplateCompletionProcessor;

-

-public class RutaTypeCompletionProposalComputer extends ScriptCompletionProposalComputer {

-

-  @Override

-  protected ScriptCompletionProposalCollector createCollector(

-          ScriptContentAssistInvocationContext context) {

-    ScriptCompletionProposalCollector collector = new RutaCompletionProposalCollector(

-            context.getSourceModule());

-

-    collector.setIgnored(CompletionProposal.FIELD_REF, true);

-    collector.setIgnored(CompletionProposal.KEYWORD, true);

-    collector.setIgnored(CompletionProposal.LABEL_REF, true);

-    collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, true);

-    collector.setIgnored(CompletionProposal.METHOD_DECLARATION, true);

-    collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, true);

-    collector.setIgnored(CompletionProposal.METHOD_REF, true);

-    collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, true);

-    collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, true);

-

-    collector.setIgnored(CompletionProposal.TYPE_REF, false);

-

-    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-

-    return collector;

-  }

-

-  @Override

-  protected TemplateCompletionProcessor createTemplateProposalComputer(

-          ScriptContentAssistInvocationContext context) {

-    return new RutaTemplateCompletionProcessor(context);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingMessages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingMessages.java
deleted file mode 100644
index e7da470..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingMessages.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.folding;

-

-import org.eclipse.osgi.util.NLS;

-

-public final class RutaFoldingMessages extends NLS {

-

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.ui.text.folding.RutaFoldingMessages";//$NON-NLS-1$

-

-  private RutaFoldingMessages() {

-  }

-

-  public static String DefaultFoldingPreferenceBlock_headers;

-

-  public static String DefaultFoldingPreferenceBlock_innerTypes;

-

-  public static String DefaultFoldingPreferenceBlock_methods;

-

-  public static String RutaFoldingPreferenceBlock_0;

-

-  public static String RutaFoldingPreferenceBlock_10;

-

-  public static String RutaFoldingPreferenceBlock_11;

-

-  public static String RutaFoldingPreferenceBlock_12;

-

-  public static String RutaFoldingPreferenceBlock_13;

-

-  public static String RutaFoldingPreferenceBlock_14;

-

-  public static String RutaFoldingPreferenceBlock_15;

-

-  public static String RutaFoldingPreferenceBlock_16;

-

-  public static String RutaFoldingPreferenceBlock_2;

-

-  public static String RutaFoldingPreferenceBlock_3;

-

-  public static String RutaFoldingPreferenceBlock_4;

-

-  public static String RutaFoldingPreferenceBlock_6;

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, RutaFoldingMessages.class);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingPreferenceBlock.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingPreferenceBlock.java
deleted file mode 100644
index bf36ad3..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingPreferenceBlock.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.folding;

-

-import java.util.ArrayList;

-

-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;

-import org.eclipse.dltk.ui.PreferenceConstants;

-import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlock;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;

-import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore.OverlayKey;

-import org.eclipse.dltk.ui.preferences.PreferencesMessages;

-import org.eclipse.dltk.ui.text.folding.IFoldingPreferenceBlock;

-import org.eclipse.dltk.ui.util.PixelConverter;

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.jface.dialogs.IInputValidator;

-import org.eclipse.jface.dialogs.InputDialog;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.resource.JFaceResources;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.jface.viewers.ListViewer;

-import org.eclipse.jface.window.Window;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.graphics.Font;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-

-public class RutaFoldingPreferenceBlock extends AbstractConfigurationBlock implements

-        IFoldingPreferenceBlock {

-

-  protected class ListBlock {

-    private ListViewer fList;

-

-    private String fKey;

-

-    private Button fAddButton;

-

-    private Button fRemoveButton;

-

-    public ListBlock(Composite parent, String key) {

-      fKey = key;

-      createControl(parent);

-    }

-

-    private Control createControl(Composite parent) {

-      Font font = parent.getFont();

-      Composite comp = new Composite(parent, SWT.NONE);

-      GridLayout topLayout = new GridLayout();

-      topLayout.numColumns = 2;

-      topLayout.marginHeight = 0;

-      topLayout.marginWidth = 0;

-      comp.setLayout(topLayout);

-      GridData gd = new GridData(GridData.FILL_BOTH);

-      comp.setLayoutData(gd);

-      fList = new ListViewer(comp);

-      gd = new GridData(GridData.FILL_BOTH);

-      gd.heightHint = 6;

-      fList.getControl().setLayoutData(gd);

-      Composite pathButtonComp = new Composite(comp, SWT.NONE);

-      GridLayout pathButtonLayout = new GridLayout();

-      pathButtonLayout.marginHeight = 0;

-      pathButtonLayout.marginWidth = 0;

-      pathButtonComp.setLayout(pathButtonLayout);

-      gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL);

-      pathButtonComp.setLayoutData(gd);

-      pathButtonComp.setFont(font);

-      fAddButton = createPushButton(pathButtonComp,

-              RutaFoldingMessages.RutaFoldingPreferenceBlock_0);

-      fAddButton.addSelectionListener(new SelectionListener() {

-        public void widgetDefaultSelected(SelectionEvent e) {

-        }

-

-        public void widgetSelected(SelectionEvent e) {

-          IInputValidator validator = new IInputValidator() {

-            public String isValid(String newText) {

-              if (newText.trim().length() > 0 && newText.matches("[_a-zA-Z]*")) //$NON-NLS-1$

-                return null;

-              return RutaFoldingMessages.RutaFoldingPreferenceBlock_2;

-            }

-          };

-          InputDialog dlg = new InputDialog(null, RutaFoldingMessages.RutaFoldingPreferenceBlock_3,

-                  RutaFoldingMessages.RutaFoldingPreferenceBlock_4, "", validator);

-          if (dlg.open() == Window.OK) {

-            fList.add(dlg.getValue());

-            save();

-          }

-        }

-      });

-      fRemoveButton = createPushButton(pathButtonComp,

-              RutaFoldingMessages.RutaFoldingPreferenceBlock_6);

-      fRemoveButton.addSelectionListener(new SelectionListener() {

-        public void widgetDefaultSelected(SelectionEvent e) {

-        }

-

-        public void widgetSelected(SelectionEvent e) {

-          ISelection s = fList.getSelection();

-          if (s instanceof IStructuredSelection) {

-            IStructuredSelection sel = (IStructuredSelection) s;

-            fList.remove(sel.toArray());

-            save();

-          }

-        }

-      });

-      return comp;

-    }

-

-    protected Button createPushButton(Composite parent, String label) {

-      Button button = new Button(parent, SWT.PUSH);

-      button.setFont(parent.getFont());

-      if (label != null) {

-        button.setText(label);

-      }

-      GridData gd = new GridData();

-      button.setLayoutData(gd);

-      gd.widthHint = getButtonWidthHint(button);

-      gd.horizontalAlignment = GridData.FILL;

-      return button;

-    }

-

-    /**

-     * Returns a width hint for a button control.

-     */

-    public int getButtonWidthHint(Button button) {

-      button.setFont(JFaceResources.getDialogFont());

-      PixelConverter converter = new PixelConverter(button);

-      int widthHint = converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);

-      return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);

-    }

-

-    private String[] getEntries() {

-      return fList.getList().getItems();

-    }

-

-    private void setEntries(String items[]) {

-      fList.remove(fList.getList().getItems());

-      for (int i = 0; i < items.length; i++) {

-        if (items[i].trim().length() > 0)

-          fList.add(items[i]);

-      }

-    }

-

-    public void save() {

-      String items[] = getEntries();

-      StringBuffer buf = new StringBuffer();

-      for (int i = 0; i < items.length; i++) {

-        buf.append(items[i]);

-        if (i != items.length - 1)

-          buf.append(","); //$NON-NLS-1$

-      }

-      getPreferenceStore().setValue(fKey, buf.toString());

-    }

-

-    public void initialize() {

-      String val = getPreferenceStore().getString(fKey);

-      if (val != null) {

-        String items[] = val.split(","); //$NON-NLS-1$

-        setEntries(items);

-      }

-

-    }

-

-    public void performDefault() {

-      String val = getPreferenceStore().getDefaultString(fKey);

-      if (val != null) {

-        String items[] = val.split(","); //$NON-NLS-1$

-        setEntries(items);

-      }

-    }

-  }

-

-  private ListBlock fExcludePatterns;

-

-  private ListBlock fIncludePatterns;

-

-  private OverlayPreferenceStore fOverlayStore;

-

-  private OverlayKey[] fKeys;

-

-  public RutaFoldingPreferenceBlock(OverlayPreferenceStore store, PreferencePage mainPreferencePage) {

-    super(store, mainPreferencePage);

-    fOverlayStore = store;

-    fKeys = createKeys();

-    fOverlayStore.addKeys(fKeys);

-  }

-

-  private OverlayKey[] createKeys() {

-    ArrayList overlayKeys = new ArrayList();

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,

-            PreferenceConstants.EDITOR_FOLDING_LINES_LIMIT));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,

-            RutaPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,

-            RutaPreferenceConstants.EDITOR_FOLDING_EXCLUDE_LIST));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            RutaPreferenceConstants.EDITOR_FOLDING_INIT_BLOCKS));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            RutaPreferenceConstants.EDITOR_FOLDING_INIT_COMMENTS));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            RutaPreferenceConstants.EDITOR_FOLDING_INIT_NAMESPACES));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            PreferenceConstants.EDITOR_COMMENTS_FOLDING_ENABLED));

-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,

-            RutaPreferenceConstants.EDITOR_FOLDING_COMMENTS_WITH_NEWLINES));

-    OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys

-            .size()];

-    overlayKeys.toArray(keys);

-    return keys;

-  }

-

-  public Control createControl(Composite composite) {

-    Composite inner = new Composite(composite, SWT.NONE);

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 1;

-    inner.setLayout(layout);

-

-    Composite blockFolding = createSubsection(inner, null,

-            RutaFoldingMessages.RutaFoldingPreferenceBlock_10);

-    blockFolding.setLayout(new GridLayout());

-

-    addRadioButton(blockFolding, RutaFoldingMessages.RutaFoldingPreferenceBlock_11,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_OFF);

-    addRadioButton(blockFolding, RutaFoldingMessages.RutaFoldingPreferenceBlock_12,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_EXCLUDE);

-    fExcludePatterns = new ListBlock(blockFolding,

-            RutaPreferenceConstants.EDITOR_FOLDING_EXCLUDE_LIST);

-    addRadioButton(blockFolding, RutaFoldingMessages.RutaFoldingPreferenceBlock_13,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS,

-            RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_INCLUDE);

-    fIncludePatterns = new ListBlock(blockFolding,

-            RutaPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST);

-

-    IInputValidator val = new IInputValidator() {

-

-      public String isValid(String number) {

-        if (number.length() == 0) {

-          return PreferencesMessages.DLTKEditorPreferencePage_empty_input;

-        } else {

-          try {

-            int value = Integer.parseInt(number);

-            if (value < 2)

-              return "You may input numbers >= 2.";

-          } catch (NumberFormatException e) {

-            return "Input is not a number";

-          }

-        }

-        return null;

-      }

-

-    };

-

-    addLabelledTextField(blockFolding, "Minimal amount of lines to be folded(>=2):",

-            PreferenceConstants.EDITOR_FOLDING_LINES_LIMIT, 3, 1, true, val);

-

-    Composite commentFolding = createSubsection(inner, null,

-            RutaFoldingMessages.RutaFoldingPreferenceBlock_14);

-    commentFolding.setLayout(new GridLayout());

-

-    addCheckBox(commentFolding, RutaFoldingMessages.RutaFoldingPreferenceBlock_15,

-            PreferenceConstants.EDITOR_COMMENTS_FOLDING_ENABLED, 0);

-

-    Composite initialFolding = createSubsection(inner, null,

-            RutaFoldingMessages.RutaFoldingPreferenceBlock_16);

-    initialFolding.setLayout(new GridLayout());

-

-    addCheckBox(initialFolding, RutaFoldingMessages.DefaultFoldingPreferenceBlock_headers,

-            RutaPreferenceConstants.EDITOR_FOLDING_INIT_COMMENTS, 0);

-    addCheckBox(initialFolding, RutaFoldingMessages.DefaultFoldingPreferenceBlock_innerTypes,

-            RutaPreferenceConstants.EDITOR_FOLDING_INIT_NAMESPACES, 0);

-    addCheckBox(initialFolding, RutaFoldingMessages.DefaultFoldingPreferenceBlock_methods,

-            RutaPreferenceConstants.EDITOR_FOLDING_INIT_BLOCKS, 0);

-

-    return inner;

-  }

-

-  @Override

-  public void initialize() {

-    super.initialize();

-    fExcludePatterns.initialize();

-    fIncludePatterns.initialize();

-  }

-

-  @Override

-  public void performDefaults() {

-    super.performDefaults();

-    fExcludePatterns.performDefault();

-    fIncludePatterns.performDefault();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingStructureProvider.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingStructureProvider.java
deleted file mode 100644
index fa4fa94..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingStructureProvider.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*

- * 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.ruta.ide.ui.text.folding;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.parser.ast.RutaStatement;

-import org.apache.uima.ruta.ide.ui.RutaPartitions;

-import org.apache.uima.ruta.ide.ui.RutaPreferenceConstants;

-import org.apache.uima.ruta.ide.ui.text.RutaPartitionScanner;

-import org.eclipse.core.runtime.ILog;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.declarations.TypeDeclaration;

-import org.eclipse.dltk.ast.parser.ISourceParser;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.compiler.env.ModuleSource;

-import org.eclipse.dltk.core.DLTKLanguageManager;

-import org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.text.Region;

-import org.eclipse.jface.text.rules.IPartitionTokenScanner;

-

-public class RutaFoldingStructureProvider extends AbstractASTFoldingStructureProvider {

-

-  // ~ Instance fields

-

-  private List fBlockExcludeList = new ArrayList();

-

-  /* preferences */

-  private int fBlockFolding = 0;

-

-  private List fBlockIncludeList = new ArrayList();

-

-  private boolean fInitCollapseBlocks = true;

-

-  private boolean fInitCollapseComments = true;

-

-  private boolean fInitCollapseNamespaces = true;

-

-  // ~ Methods

-

-  @Override

-  protected CodeBlock[] getCodeBlocks(String code, int offset) {

-    /*

-     * if an ASTVisitor implementation is created for this, just override getFoldingVisitor() and

-     * remove this method

-     */

-    ISourceParser pp = null;

-    pp = DLTKLanguageManager.getSourceParser(RutaNature.NATURE_ID);

-    ModuleDeclaration md = (ModuleDeclaration) pp.parse(new ModuleSource(code), null);

-    List statements = md.getStatements();

-    if (statements == null) {

-      return new CodeBlock[0];

-    }

-

-    List result = new ArrayList();

-    traverse(result, statements, offset, code);

-

-    return (CodeBlock[]) result.toArray(new CodeBlock[result.size()]);

-  }

-

-  private void checkStatement(String code, int offset, List result, Statement sst) {

-    if (sst instanceof RutaStatement) {

-      RutaStatement statement = (RutaStatement) sst;

-      result.add(new CodeBlock(statement, new Region(offset + statement.sourceStart(), statement

-              .sourceEnd() - statement.sourceStart())));

-

-      Iterator si = statement.getExpressions().iterator();

-      // while (si.hasNext()) {

-      // Expression ex = (Expression) si.next();

-      // if (ex instanceof BlockDeclaration) {

-      // BlockDeclaration be = (BlockDeclaration) ex;

-      // try {

-      // String newContents = code.substring(

-      // be.sourceStart() + 1, be.sourceEnd() - 1);

-      // CodeBlock[] cb = getCodeBlocks(newContents, offset

-      // + be.sourceStart() + 1);

-      // for (int j = 0; j < cb.length; j++) {

-      // result.add(cb[j]);

-      // }

-      // } catch (StringIndexOutOfBoundsException e) {

-      // }

-      // }

-      // }

-    }

-  }

-

-  private void traverse(List result, List statements, int offset, String code) {

-    for (Iterator iterator = statements.iterator(); iterator.hasNext();) {

-      ASTNode node = (ASTNode) iterator.next();

-      if (node instanceof RutaStatement) {

-        checkStatement(code, offset, result, (Statement) node);

-      } else if (node instanceof TypeDeclaration) {

-        TypeDeclaration statement = (TypeDeclaration) node;

-        result.add(new CodeBlock(statement, new Region(offset + statement.sourceStart(), statement

-                .sourceEnd() - statement.sourceStart())));

-        traverse(result, statement.getStatements(), offset, code);

-      } else if (node instanceof MethodDeclaration) {

-        MethodDeclaration statement = (MethodDeclaration) node;

-        result.add(new CodeBlock(statement, new Region(offset + statement.sourceStart(), statement

-                .sourceEnd() - statement.sourceStart())));

-        traverse(result, statement.getStatements(), offset, code);

-      }

-    }

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#getCommentPartition()

-   */

-  @Override

-  protected String getCommentPartition() {

-    return RutaPartitions.RUTA_COMMENT;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#getLog()

-   */

-  @Override

-  protected ILog getLog() {

-    return RutaIdeUIPlugin.getDefault().getLog();

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#getPartition()

-   */

-  @Override

-  protected String getPartition() {

-    return RutaPartitions.RUTA_PARTITIONING;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#getPartitionScanner()

-   */

-  @Override

-  protected IPartitionTokenScanner getPartitionScanner() {

-    return new RutaPartitionScanner();

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#getPartitionTypes()

-   */

-  @Override

-  protected String[] getPartitionTypes() {

-    return RutaPartitions.RUTA_PARTITION_TYPES;

-  }

-

-  /*

-   * @see org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#getNatureId()

-   */

-  @Override

-  protected String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#initializePreferences(

-   * org.eclipse.jface.preference.IPreferenceStore)

-   */

-  @Override

-  protected void initializePreferences(IPreferenceStore store) {

-    super.initializePreferences(store);

-    fBlockFolding = store.getInt(RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS);

-

-    String t = store.getString(RutaPreferenceConstants.EDITOR_FOLDING_EXCLUDE_LIST);

-    String[] items = t.split(",");

-    fBlockExcludeList.clear();

-    for (int i = 0; i < items.length; i++) {

-      if (items[i].trim().length() > 0) {

-        fBlockExcludeList.add(items[i]);

-      }

-    }

-

-    t = store.getString(RutaPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST);

-    items = t.split(",");

-    fBlockIncludeList.clear();

-    for (int i = 0; i < items.length; i++) {

-      if (items[i].trim().length() > 0) {

-        fBlockIncludeList.add(items[i]);

-      }

-    }

-

-    fFoldNewLines = store.getBoolean(RutaPreferenceConstants.EDITOR_FOLDING_COMMENTS_WITH_NEWLINES);

-    fInitCollapseBlocks = store.getBoolean(RutaPreferenceConstants.EDITOR_FOLDING_INIT_BLOCKS);

-    fInitCollapseComments = store.getBoolean(RutaPreferenceConstants.EDITOR_FOLDING_INIT_COMMENTS);

-    fInitCollapseNamespaces = store

-            .getBoolean(RutaPreferenceConstants.EDITOR_FOLDING_INIT_NAMESPACES);

-  }

-

-  @Override

-  protected boolean initiallyCollapse(ASTNode s, FoldingStructureComputationContext ctx) {

-    if (s instanceof RutaStatement) {

-      RutaStatement statement = (RutaStatement) s;

-      if (!(statement.getAt(0) instanceof SimpleReference)) {

-        return false;

-      }

-

-      String name = null;

-      name = ((SimpleReference) statement.getAt(0)).getName();

-      if (name.equals("namespace")) {

-        return ctx.allowCollapsing() && fInitCollapseNamespaces;

-      }

-

-      return ctx.allowCollapsing() && fInitCollapseBlocks;

-    }

-

-    return false;

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#initiallyCollapseComments

-   * (org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider.

-   * FoldingStructureComputationContext)

-   */

-  protected boolean initiallyCollapseComments(FoldingStructureComputationContext ctx) {

-    return ctx.allowCollapsing() && fInitCollapseComments;

-  }

-

-  /*

-   * @see

-   * org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider#mayCollapse(org.eclipse

-   * .dltk.ast.statements.Statement,

-   * org.eclipse.dltk.ui.text.folding.AbstractASTFoldingStructureProvider

-   * .FoldingStructureComputationContext)

-   */

-  protected boolean canFold(String name) {

-    switch (fBlockFolding) {

-      case RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_OFF: {

-        if (name.equals("proc") || name.equals("namespace")) {

-          return true;

-        }

-

-        return false;

-      }

-      case RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_INCLUDE: {

-        if (fBlockIncludeList.contains(name)) {

-          return true;

-        }

-

-        return false;

-      }

-      case RutaPreferenceConstants.EDITOR_FOLDING_BLOCKS_EXCLUDE: {

-        if (fBlockExcludeList.contains(name)) {

-          return false;

-        }

-

-        return true;

-      }

-    }

-    return false;

-  }

-

-  @Override

-  protected boolean mayCollapse(ASTNode s, FoldingStructureComputationContext ctx) {

-    if (s instanceof TypeDeclaration) {

-      return canFold("namespace");

-    } else if (s instanceof MethodDeclaration) {

-      return canFold("proc");

-    } else if (s instanceof RutaStatement) {

-      RutaStatement statement = (RutaStatement) s;

-      if (!(statement.getAt(0) instanceof SimpleReference)) {

-        return false;

-      }

-

-      String name = null;

-      name = ((SimpleReference) statement.getAt(0)).getName();

-      return canFold(name);

-    }

-

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaFileCreationPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaFileCreationPage.java
deleted file mode 100644
index 48b1f55..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaFileCreationPage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import java.util.List;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.dltk.compiler.util.Util;

-import org.eclipse.dltk.core.DLTKLanguageManager;

-import org.eclipse.dltk.core.IDLTKLanguageToolkit;

-import org.eclipse.dltk.core.IScriptFolder;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ScriptModelUtil;

-import org.eclipse.dltk.ui.wizards.NewSourceModulePage;

-

-public class RutaFileCreationPage extends NewSourceModulePage {

-

-  @Override

-  protected String getPageDescription() {

-    return "This wizard creates a new Ruta script file.";

-  }

-

-  @Override

-  protected String[] getFileExtensions() {

-    String requiredNature = RutaNature.NATURE_ID;

-

-    IDLTKLanguageToolkit toolkit = DLTKLanguageManager.getLanguageToolkit(requiredNature);

-    String[] extensions = ScriptModelUtil.getFileExtensions(toolkit);

-    if (extensions != null) {

-      return extensions;

-    }

-

-    return new String[] { Util.EMPTY_STRING };

-  }

-

-  @Override

-  protected String getFileContent() {

-    StringBuilder sb = new StringBuilder();

-    IScriptFolder scriptFolder = getScriptFolder();

-    IScriptProject scriptProject = scriptFolder.getScriptProject();

-

-    

-    IFolder folder = null;

-    try {

-      folder = getScriptFolderOf(scriptFolder, scriptProject);

-    } catch (CoreException e) {

-      RutaIdeUIPlugin.error(e);

-    }

-    if (folder == null) {

-      return "";

-    }

-

-    IPath path = scriptFolder.getPath();

-    IPath fullPath = folder.getFullPath();

-    IPath relativeTo = path.makeRelativeTo(fullPath);

-    if (!relativeTo.isEmpty()) {

-      sb.append("PACKAGE ");

-      String pathString = "";

-      for (int i = 0; i < relativeTo.segments().length; i++) {

-        pathString += relativeTo.segments()[i];

-        if (i < relativeTo.segments().length - 1) {

-          pathString += ".";

-        }

-      }

-      sb.append(pathString);

-      sb.append(";\n");

-    }

-    return sb.toString();

-  }

-

-  private IFolder getScriptFolderOf(IScriptFolder scriptFolder, IScriptProject scriptProject)

-          throws CoreException {

-    List<IFolder> scriptFolders = RutaProjectUtils.getScriptFolders(scriptProject);

-    for (IFolder each : scriptFolders) {

-      if (each.equals(scriptFolder.getResource())) {

-        return each;

-      }

-      IPath path = scriptFolder.getPath().makeRelativeTo(each.getFullPath());

-      IResource findMember = each.findMember(path);

-      if (findMember != null && findMember instanceof IFolder) {

-        return each;

-      }

-    }

-    return null;

-  }

-

-  @Override

-  protected String getRequiredNature() {

-    return RutaNature.NATURE_ID;

-  }

-

-  @Override

-  protected String getPageTitle() {

-    return "Create a new Ruta script file";

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaFileCreationWizard.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaFileCreationWizard.java
deleted file mode 100644
index d5ed5a2..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaFileCreationWizard.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import org.apache.uima.ruta.ide.ui.RutaImages;

-import org.eclipse.dltk.ui.DLTKUIPlugin;

-import org.eclipse.dltk.ui.wizards.NewSourceModulePage;

-import org.eclipse.dltk.ui.wizards.NewSourceModuleWizard;

-

-public class RutaFileCreationWizard extends NewSourceModuleWizard {

-  public static final String ID_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.RutaFileCreationWizard";

-

-  public RutaFileCreationWizard() {

-    setDefaultPageImageDescriptor(RutaImages.DESC_WIZBAN_FILE_CREATION);

-    setDialogSettings(DLTKUIPlugin.getDefault().getDialogSettings());

-    setWindowTitle("Create Ruta File");

-  }

-

-  @Override

-  protected NewSourceModulePage createNewSourceModulePage() {

-    return new RutaFileCreationPage();

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaJavaContainerPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaJavaContainerPage.java
deleted file mode 100644
index 319cd15..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaJavaContainerPage.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import org.eclipse.dltk.core.IBuildpathEntry;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.internal.ui.wizards.IBuildpathContainerPage;

-import org.eclipse.dltk.ui.wizards.IBuildpathContainerPageExtension;

-import org.eclipse.dltk.ui.wizards.NewElementWizardPage;

-import org.eclipse.swt.widgets.Composite;

-

-public class RutaJavaContainerPage extends NewElementWizardPage implements IBuildpathContainerPage,

-        IBuildpathContainerPageExtension {

-

-  public RutaJavaContainerPage() {

-    super("RutaJavaContainerPage");

-  }

-

-  public void createControl(Composite composite) {

-

-  }

-

-  public void initialize(IScriptProject project, IBuildpathEntry[] currentEntries) {

-

-  }

-

-  public boolean finish() {

-    return false;

-  }

-

-  public IBuildpathEntry getSelection() {

-    return null;

-  }

-

-  public void setSelection(IBuildpathEntry containerEntry) {

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaPackageCreationWizard.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaPackageCreationWizard.java
deleted file mode 100644
index fd75ee3..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaPackageCreationWizard.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.dltk.core.IProjectFragment;

-import org.eclipse.dltk.ui.wizards.NewPackageCreationWizard;

-import org.eclipse.dltk.ui.wizards.NewPackageWizardPage;

-import org.eclipse.jface.viewers.IStructuredSelection;

-

-public class RutaPackageCreationWizard extends NewPackageCreationWizard {

-  public static final String ID_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.NewPackageCreationWizard";

-

-  @Override

-  protected NewPackageWizardPage createNewPackageWizardPage() {

-    return new NewPackageWizardPage() {

-      @Override

-      public void createPackage(IProgressMonitor monitor) throws CoreException,

-              InterruptedException {

-        if (monitor == null) {

-          monitor = new NullProgressMonitor();

-        }

-        IProjectFragment root = getProjectFragment();

-        String packName = getPackageText();

-        packName = packName.replaceAll("[.]", "/");

-        fCreatedScriptFolder = root.createScriptFolder(packName, true, monitor);

-        if (monitor.isCanceled()) {

-          throw new InterruptedException();

-        }

-      }

-

-      @Override

-      protected String getRequiredNature() {

-        return RutaNature.NATURE_ID;

-      }

-

-      @Override

-      public void init(IStructuredSelection selection) {

-        super.init(selection);

-        setPackageText("", true);

-      }

-    };

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectCreationWizard.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectCreationWizard.java
deleted file mode 100644
index fa60809..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectCreationWizard.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import java.io.File;

-import java.io.FileNotFoundException;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.OutputStream;

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.ide.ui.RutaImages;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IConfigurationElement;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.SubProgressMonitor;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IBuildpathAttribute;

-import org.eclipse.dltk.core.IBuildpathEntry;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.internal.core.BuildpathEntry;

-import org.eclipse.dltk.internal.ui.util.CoreUtility;

-import org.eclipse.dltk.internal.ui.wizards.buildpath.BPListElement;

-import org.eclipse.dltk.ui.DLTKUIPlugin;

-import org.eclipse.dltk.ui.wizards.BuildpathsBlock;

-import org.eclipse.dltk.ui.wizards.ProjectWizard;

-import org.eclipse.dltk.ui.wizards.ProjectWizardFirstPage;

-import org.eclipse.dltk.ui.wizards.ProjectWizardSecondPage;

-import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;

-

-public class RutaProjectCreationWizard extends ProjectWizard {

-

-  public static final String ID_WIZARD = "org.apache.uima.ruta.ide.ui.wizards.RutaProjectWizard"; //$NON-NLS-1$

-

-  private ProjectWizardFirstPage fFirstPage;

-

-  private ProjectWizardSecondPage fSecondPage;

-

-  private IConfigurationElement fConfigElement;

-

-  public RutaProjectCreationWizard() {

-    setDefaultPageImageDescriptor(RutaImages.DESC_WIZBAN_PROJECT_CREATION);

-    setDialogSettings(DLTKUIPlugin.getDefault().getDialogSettings());

-    setWindowTitle(RutaWizardMessages.ProjectCreationWizard_title);

-  }

-

-  @Override

-  public void addPages() {

-    super.addPages();

-    fFirstPage = new RutaProjectWizardFirstPage();

-

-    fFirstPage.setTitle(RutaWizardMessages.ProjectCreationWizardFirstPage_title);

-    fFirstPage.setDescription(RutaWizardMessages.ProjectCreationWizardFirstPage_description);

-    addPage(fFirstPage);

-    fSecondPage = new RutaProjectWizardSecondPage(fFirstPage);

-    addPage(fSecondPage);

-  }

-

-  @Override

-  protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {

-    super.finishPage(monitor);

-    createProject(monitor);

-  }

-

-  public void createProject(IProgressMonitor monitor) throws CoreException {

-    IScriptProject scriptProject = fSecondPage.getScriptProject();

-    createRutaProject(scriptProject, fSecondPage.getRawBuildPath(), monitor);

-  }

-

-  public static void createRutaProject(IScriptProject scriptProject, IBuildpathEntry[] buildPath,

-          IProgressMonitor monitor) throws CoreException {

-    IProject project = scriptProject.getProject();

-    IFolder folder = project.getFolder(RutaProjectUtils.getDefaultInputLocation());

-    if (!folder.exists()) {

-      CoreUtility.createFolder(folder, true, true, new SubProgressMonitor(monitor, 1));

-    }

-    folder = project.getFolder(RutaProjectUtils.getDefaultOutputLocation());

-    if (!folder.exists()) {

-      CoreUtility.createFolder(folder, true, true, new SubProgressMonitor(monitor, 1));

-    }

-    folder = project.getFolder(RutaProjectUtils.getDefaultTestLocation());

-    if (!folder.exists()) {

-      CoreUtility.createFolder(folder, true, true, new SubProgressMonitor(monitor, 1));

-    }

-    IFolder descFolder = project.getFolder(RutaProjectUtils.getDefaultDescriptorLocation());

-    if (!descFolder.exists()) {

-      CoreUtility.createFolder(descFolder, true, true, new SubProgressMonitor(monitor, 1));

-    }

-    IFolder srcFolder = project.getFolder(RutaProjectUtils.getDefaultScriptLocation());

-    if (!srcFolder.exists()) {

-      CoreUtility.createFolder(srcFolder, true, true, new SubProgressMonitor(monitor, 1));

-    }

-    IFolder rsrcFolder = project.getFolder(RutaProjectUtils.getDefaultResourcesLocation());

-    if (!rsrcFolder.exists()) {

-      CoreUtility.createFolder(rsrcFolder, true, true, new SubProgressMonitor(monitor, 1));

-    }

-

-    IFolder utilsFolder = descFolder.getFolder("utils");

-    if (!utilsFolder.exists()) {

-      CoreUtility.createFolder(utilsFolder, true, true, new SubProgressMonitor(monitor, 1));

-    }

-

-    List<BPListElement> buildpathEntries = new ArrayList<BPListElement>();

-    if (buildPath != null) {

-      for (IBuildpathEntry buildpathEntry : buildPath) {

-        BPListElement createFromExisting = BPListElement.createFromExisting(buildpathEntry,

-                scriptProject);

-        if (createFromExisting.getBuildpathEntry().getEntryKind() != IBuildpathEntry.BPE_SOURCE) {

-          buildpathEntries.add(createFromExisting);

-        }

-      }

-    }

-    IBuildpathAttribute[] extraAttributes = new IBuildpathAttribute[1];

-    extraAttributes[0] = DLTKCore.newBuildpathAttribute(RutaProjectUtils.BUILDPATH_ATTRIBUTE_RUTA, RutaProjectUtils.BUILDPATH_ATTRIBUTE_SCRIPT);

-    IBuildpathEntry newSourceEntry = DLTKCore.newSourceEntry(srcFolder.getFullPath(),BuildpathEntry.INCLUDE_ALL,

-            BuildpathEntry.EXCLUDE_NONE, extraAttributes);

-    buildpathEntries.add(BPListElement.createFromExisting(newSourceEntry, scriptProject));

-    

-    extraAttributes = new IBuildpathAttribute[1];

-    extraAttributes[0] = DLTKCore.newBuildpathAttribute(RutaProjectUtils.BUILDPATH_ATTRIBUTE_RUTA, RutaProjectUtils.BUILDPATH_ATTRIBUTE_DESCRIPTOR);

-    IBuildpathEntry newDescriptorEntry = DLTKCore.newSourceEntry(descFolder.getFullPath(),BuildpathEntry.INCLUDE_ALL,

-            BuildpathEntry.EXCLUDE_NONE, extraAttributes);

-    buildpathEntries.add(BPListElement.createFromExisting(newDescriptorEntry, scriptProject));

-    

-    extraAttributes = new IBuildpathAttribute[1];

-    extraAttributes[0] = DLTKCore.newBuildpathAttribute(RutaProjectUtils.BUILDPATH_ATTRIBUTE_RUTA, RutaProjectUtils.BUILDPATH_ATTRIBUTE_RESOURCES);

-    IBuildpathEntry newResourcesEntry = DLTKCore.newSourceEntry(rsrcFolder.getFullPath(),BuildpathEntry.INCLUDE_ALL,

-            BuildpathEntry.EXCLUDE_NONE, extraAttributes);

-    buildpathEntries.add(BPListElement.createFromExisting(newResourcesEntry, scriptProject));

-

-    BuildpathsBlock.flush(buildpathEntries, scriptProject, monitor);

-    copyDescriptors(descFolder);

-

-    RutaProjectUtils.addProjectDataPath(project, descFolder);

-

-    descFolder.refreshLocal(IResource.DEPTH_INFINITE, monitor);

-  }

-

-  public static void copyDescriptors(IFolder descFolder) {

-    File descDir = descFolder.getLocation().toFile();

-    File utilsDir = new File(descFolder.getLocation().toFile(), "utils/");

-    utilsDir.mkdirs();

-    copy(descDir, "BasicTypeSystem.xml");

-    copy(descDir, "BasicEngine.xml");

-    copy(descDir, "InternalTypeSystem.xml");

-

-    copy(utilsDir, "Modifier.xml");

-    copy(utilsDir, "AnnotationWriter.xml");

-    copy(utilsDir, "StyleMapCreator.xml");

-    copy(utilsDir, "XMIWriter.xml");

-    copy(utilsDir, "SourceDocumentInformation.xml");

-    copy(utilsDir, "PlainTextAnnotator.xml");

-    copy(utilsDir, "PlainTextTypeSystem.xml");

-    copy(utilsDir, "HtmlAnnotator.xml");

-    copy(utilsDir, "HtmlTypeSystem.xml");

-    copy(utilsDir, "HtmlConverter.xml");

-    copy(utilsDir, "Cutter.xml");

-    copy(utilsDir, "ViewWriter.xml");

-  }

-

-  private static void copy(File dir, String fileName) {

-    InputStream in = null;

-    OutputStream out = null;

-    in = RutaEngine.class.getResourceAsStream(fileName);

-    try {

-      out = new FileOutputStream(new File(dir, fileName));

-    } catch (FileNotFoundException e) {

-      System.err.println(e);

-    }

-    if (in != null && out != null) {

-      copy(in, out);

-    }

-

-  }

-

-  static void copy(InputStream fis, OutputStream fos) {

-    try {

-      byte[] buffer = new byte[0xFFFF];

-      for (int len; (len = fis.read(buffer)) != -1;)

-        fos.write(buffer, 0, len);

-    } catch (IOException e) {

-      System.err.println(e);

-    } finally {

-      if (fis != null) {

-        try {

-          fis.close();

-        } catch (IOException e) {

-          System.err.println(e);

-        }

-      }

-      if (fos != null) {

-        try {

-          fos.close();

-        } catch (IOException e) {

-          System.err.println(e);

-        }

-      }

-    }

-  }

-

-  @Override

-  public boolean performFinish() {

-    boolean res = super.performFinish();

-    if (res) {

-      BasicNewProjectResourceWizard.updatePerspective(fConfigElement);

-      selectAndReveal(fSecondPage.getScriptProject().getProject());

-    }

-    return res;

-  }

-

-  public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data) {

-    fConfigElement = cfig;

-  }

-

-  @Override

-  public boolean performCancel() {

-    return super.performCancel();

-  }

-

-  @Override

-  public String getScriptNature() {

-    return RutaNature.NATURE_ID;

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectWizardFirstPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectWizardFirstPage.java
deleted file mode 100644
index 5c0d530..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectWizardFirstPage.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import org.eclipse.dltk.ui.wizards.ProjectWizardFirstPage;

-import org.eclipse.swt.widgets.Composite;

-

-final class RutaProjectWizardFirstPage extends ProjectWizardFirstPage {

-

-  public RutaProjectWizardFirstPage() {

-    setTitle(RutaWizardMessages.ProjectCreationWizardFirstPage_title);

-    setDescription(RutaWizardMessages.ProjectCreationWizardFirstPage_description);

-  }

-

-  @Override

-  protected IInterpreterGroup createInterpreterGroup(Composite parent) {

-    return new DefaultInterpreterGroup(parent);

-  }

-

-  @Override

-  protected boolean interpeterRequired() {

-    return false;

-  }

-

-  public boolean useAnalysis() {

-    return false;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectWizardSecondPage.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectWizardSecondPage.java
deleted file mode 100644
index 0792049..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaProjectWizardSecondPage.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import org.apache.uima.ruta.ide.ui.preferences.RutaBuildPathsBlock;

-import org.eclipse.dltk.ui.util.BusyIndicatorRunnableContext;

-import org.eclipse.dltk.ui.util.IStatusChangeListener;

-import org.eclipse.dltk.ui.wizards.BuildpathsBlock;

-import org.eclipse.dltk.ui.wizards.ProjectWizardFirstPage;

-import org.eclipse.dltk.ui.wizards.ProjectWizardSecondPage;

-

-final class RutaProjectWizardSecondPage extends ProjectWizardSecondPage {

-  RutaProjectWizardSecondPage(ProjectWizardFirstPage mainPage) {

-    super(mainPage);

-  }

-

-  @Override

-  protected BuildpathsBlock createBuildpathBlock(IStatusChangeListener listener) {

-    return new RutaBuildPathsBlock(new BusyIndicatorRunnableContext(), listener, 0,

-            useNewSourcePage(), null);

-  }

-

-  // protected BuildpathDetector createBuildpathDetector(

-  // IProgressMonitor monitor, IDLTKLanguageToolkit toolkit)

-  // throws CoreException {

-  // RutaBuildpathDetector detector = new RutaBuildpathDetector(

-  // getCurrProject(), toolkit);

-  //

-  // RutaProjectWizardFirstPage page = (RutaProjectWizardFirstPage) this

-  // .getFirstPage();

-  // detector.setUseAnalysis(page.useAnalysis());

-  // detector.detectBuildpath(new SubProgressMonitor(monitor, 20));

-  // return detector;

-  // }

-

-  // protected void postConfigureProject() throws CoreException {

-  // final IProject project = getCurrProject();

-  // final IEnvironment environment = EnvironmentManager

-  // .getEnvironment(project);

-  // if (environment != null && !environment.isLocal()) {

-  // final Map options = new HashMap();

-  // options.put(DLTKCore.INDEXER_ENABLED, DLTKCore.DISABLED);

-  // options.put(DLTKCore.BUILDER_ENABLED, DLTKCore.DISABLED);

-  // DLTKCore.create(project).setOptions(options);

-  // }

-  // }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaWizardMessages.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaWizardMessages.java
deleted file mode 100644
index ea96ec8..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/ui/wizards/RutaWizardMessages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.ui.wizards;

-

-import org.eclipse.osgi.util.NLS;

-

-public class RutaWizardMessages extends NLS {

-

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.ui.wizards.RutaWizardMessages";//$NON-NLS-1$

-

-  private RutaWizardMessages() {

-  }

-

-  public static String ProjectCreationWizard_title;

-

-  public static String ProjectCreationWizardFirstPage_title;

-

-  public static String ProjectCreationWizardFirstPage_description;

-

-  static {

-    NLS.initializeMessages(BUNDLE_NAME, RutaWizardMessages.class);

-  }

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/CheckValidator.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/CheckValidator.java
deleted file mode 100644
index 697a989..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/CheckValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*

- * 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.ruta.ide.validator;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.builder.AbstractBuildParticipantType;

-import org.eclipse.dltk.core.builder.IBuildParticipant;

-

-public class CheckValidator extends AbstractBuildParticipantType {

-

-  private static final String ID = "org.apache.uima.ruta.ide.validator.checkvalidator"; //$NON-NLS-1$

-

-  private static final String NAME = "Ruta Checker"; //$NON-NLS-1$

-

-  @Override

-  public IBuildParticipant createBuildParticipant(IScriptProject project) throws CoreException {

-    return new RutaChecker(project);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
deleted file mode 100644
index 3a407d1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
+++ /dev/null
@@ -1,1305 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.Stack;
-import java.util.TreeMap;
-
-import org.antlr.runtime.Token;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.resource.ResourceManager;
-import org.apache.uima.resource.impl.ResourceManager_impl;
-import org.apache.uima.resource.metadata.FeatureDescription;
-import org.apache.uima.resource.metadata.TypeDescription;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.resource.metadata.impl.FeatureDescription_impl;
-import org.apache.uima.ruta.UIMAConstants;
-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;
-import org.apache.uima.ruta.ide.core.IRutaKeywords;
-import org.apache.uima.ruta.ide.core.RutaCorePreferences;
-import org.apache.uima.ruta.ide.core.RutaExtensionManager;
-import org.apache.uima.ruta.ide.core.RutaKeywordsManager;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IIDEBlockExtension;
-import org.apache.uima.ruta.ide.core.extensions.IIDEBooleanFunctionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IIDENumberFunctionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IIDEStringFunctionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IIDETypeFunctionExtension;
-import org.apache.uima.ruta.ide.core.extensions.IRutaExtension;
-import org.apache.uima.ruta.ide.parser.ast.FeatureMatchExpression;
-import org.apache.uima.ruta.ide.parser.ast.NullExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaBlock;
-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;
-import org.apache.uima.ruta.ide.parser.ast.RutaDeclareDeclarationsStatement;
-import org.apache.uima.ruta.ide.parser.ast.RutaExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaFeatureDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;
-import org.apache.uima.ruta.ide.parser.ast.RutaImportStatement;
-import org.apache.uima.ruta.ide.parser.ast.RutaImportTypesStatement;
-import org.apache.uima.ruta.ide.parser.ast.RutaListExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaPackageDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaRegExpRule;
-import org.apache.uima.ruta.ide.parser.ast.RutaRuleElement;
-import org.apache.uima.ruta.ide.parser.ast.RutaStatementConstants;
-import org.apache.uima.ruta.ide.parser.ast.RutaStringExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaStructureAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;
-import org.apache.uima.ruta.ide.parser.ast.RutaTypeDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLInputSource;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.dltk.ast.ASTListNode;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.declarations.MethodDeclaration;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.ast.expressions.NumericLiteral;
-import org.eclipse.dltk.ast.expressions.StringLiteral;
-import org.eclipse.dltk.ast.references.SimpleReference;
-import org.eclipse.dltk.ast.statements.Statement;
-import org.eclipse.dltk.compiler.problem.IProblem;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-import org.eclipse.dltk.compiler.problem.ProblemSeverity;
-import org.eclipse.dltk.core.ISourceModule;
-import org.eclipse.dltk.core.builder.ISourceLineTracker;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-
-public class LanguageCheckerVisitor extends ASTVisitor {
-
-  private IProblemReporter pr;
-
-  private ISourceLineTracker linetracker;
-
-  private ISourceModule sourceModule;
-
-  private Map<String, IIDEConditionExtension> conditionExtensions;
-
-  private Map<String, IIDEActionExtension> actionExtensions;
-
-  private Map<String, IIDENumberFunctionExtension> numberFunctionExtensions;
-
-  private Map<String, IIDEBooleanFunctionExtension> booleanFunctionExtensions;
-
-  private Map<String, IIDEStringFunctionExtension> stringFunctionExtensions;
-
-  private Map<String, IIDETypeFunctionExtension> typeFunctionExtensions;
-
-  private Map<String, IIDEBlockExtension> blockExtensions;
-
-  /**
-   * Mapping from short type name (e.g. {@code W}) to their disambiguated long type names (e.g.
-   * {@code org.apache.uima.ruta.type.W}).
-   */
-  private Map<String, String> namespaces;
-
-  /**
-   * Mapping from ambiguous short type names to all their possible long type names.
-   */
-  private Map<String, Set<String>> ambiguousTypeAlias;
-
-  /**
-   * Known variables for each block environment
-   */
-  private final Stack<Map<String, Integer>> knownLocalVariables;
-
-  /**
-   * Name of each block
-   */
-  private final Stack<String> blocks;
-
-  /**
-   * Caching the matched type of a rule element
-   */
-  private String matchedType;
-
-  /**
-   * Caching the declared package of the script
-   */
-  private String packageName = "";
-
-  /**
-   * Mapping all long type names of the type system to their type description
-   */
-  private Map<String, TypeDescription> typeDescriptionMap;
-
-  /**
-   * Mapping all long type names of all declared feature description
-   */
-  private Map<String, Set<FeatureDescription>> featureDescriptionMap;
-
-  /**
-   * The type system description of the script file
-   */
-  private TypeSystemDescription typeSystemDescription;
-
-  private final String implicitString = "Implicit";
-
-  private Set<String> finalTypes;
-
-  private boolean reportWarningOnShortNames;
-
-  private RutaCheckerProblemFactory problemFactory;
-
-  private ResourceManager resourceManager;
-
-  private Set<String> allLongTypeNames;
-
-  private String parentTypeInDeclaration;
-
-  private ClassLoader classLoader;
-
-  public LanguageCheckerVisitor(IProblemReporter problemReporter, ISourceLineTracker linetracker,
-          ISourceModule sourceModule, ClassLoader classLoader) {
-    super();
-    this.pr = problemReporter;
-    this.linetracker = linetracker;
-    this.sourceModule = sourceModule;
-    this.classLoader = classLoader;
-    this.problemFactory = new RutaCheckerProblemFactory(sourceModule.getElementName(), linetracker);
-
-    namespaces = new TreeMap<String, String>();
-    ambiguousTypeAlias = new TreeMap<String, Set<String>>();
-    allLongTypeNames = new HashSet<String>();
-    knownLocalVariables = new Stack<Map<String, Integer>>();
-    knownLocalVariables.push(new HashMap<String, Integer>());
-    blocks = new Stack<String>();
-
-    initializePredefinedInformation();
-    initializeExtensionInformation();
-
-    IPreferenceStore store = RutaIdeUIPlugin.getDefault().getPreferenceStore();
-    reportWarningOnShortNames = !store
-            .getBoolean(RutaCorePreferences.BUILDER_IGNORE_DUPLICATE_SHORTNAMES);
-
-  }
-
-  @Override
-  public boolean visit(Statement s) throws Exception {
-    if (s instanceof RutaPackageDeclaration) {
-      this.packageName = ((RutaPackageDeclaration) s).getName();
-      return false;
-    }
-    if (s instanceof RutaImportTypesStatement) {
-      RutaImportTypesStatement stmt = (RutaImportTypesStatement) s;
-      SimpleReference tsExpr = (SimpleReference) stmt.getExpression();
-      Token typeToken = stmt.getTypeToken();
-      Token pkgToken = stmt.getPkgToken();
-      Token aliasToken = stmt.getAliasToken();
-      if (tsExpr != null) {
-        String localPath = tsExpr.getName();
-        processCompleteTypeSystemImport(tsExpr, localPath, typeToken, pkgToken, aliasToken);
-      } else {
-        // TODO package import not supported in Workbench
-      }
-
-    } else if (s instanceof RutaImportStatement) {
-      // handle type system imports
-      if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_TYPESYSTEM) {
-        SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();
-        String localPath = sRef.getName();
-        processCompleteTypeSystemImport(sRef, localPath);
-        return false;
-      }
-      // handle script-imports
-      if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_SCRIPT) {
-        SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();
-        String localPath = sRef.getName();
-
-        // HOTFIX Peter add also the imported types of the imported type system!
-        try {
-          URL url = null;
-          IFile file = RutaCheckerUtils.checkScriptImport(localPath,
-                  sourceModule.getScriptProject());
-          if (file == null) {
-            String typesystemSuffix = RutaProjectUtils.getTypeSystemSuffix(sourceModule
-                    .getScriptProject().getProject());
-            url = RutaCheckerUtils.checkImportExistence(localPath + typesystemSuffix, "xml",
-                    classLoader);
-          }
-          if (file == null && url == null) {
-            pr.reportProblem(problemFactory.createFileNotFoundProblem(sRef, localPath));
-          } else {
-            IProject referredProject = sourceModule.getScriptProject().getProject();
-            if (file != null) {
-              // script in other project? use that if the file was found in the workspace
-              referredProject = file.getProject();
-            }
-            IPath typeSystemDescriptorPath = RutaProjectUtils.getTypeSystemDescriptorPath(
-                    file.getLocation(), referredProject);
-            TypeSystemDescription tsDesc = importCompleteTypeSystem(typeSystemDescriptorPath, url);
-
-            List<String> checkDuplicateShortNames = checkOnAmbiguousShortNames(tsDesc);
-            if (!checkDuplicateShortNames.isEmpty()) {
-              pr.reportProblem(problemFactory.createDuplicateShortNameInImported(sRef, localPath,
-                      checkDuplicateShortNames, ProblemSeverity.WARNING));
-            }
-          }
-        } catch (IOException e) {
-          pr.reportProblem(problemFactory.createFileNotFoundProblem(sRef, localPath));
-        }
-        return false;
-      }
-    }
-
-    if (s instanceof RutaDeclareDeclarationsStatement) {
-      RutaDeclareDeclarationsStatement dds = (RutaDeclareDeclarationsStatement) s;
-      ASTNode parent = dds.getParent();
-      if (parent != null && parent instanceof RutaVariableReference) {
-        RutaVariableReference p = (RutaVariableReference) parent;
-        String name = p.getName();
-        name = expand(name);
-        parentTypeInDeclaration = name;
-        // TODO remember name for new types and their features!
-        if (finalTypes.contains(name)) {
-          IProblem problem = problemFactory.createInheritenceFinalProblem(p);
-          pr.reportProblem(problem);
-        }
-      }
-      return true;
-    }
-    if (s instanceof RutaTypeDeclaration) {
-      RutaTypeDeclaration newType = (RutaTypeDeclaration) s;
-      String shortName = newType.getName();
-      String longName = getLongNameOfNewType(shortName);
-
-      if (namespaces.values().contains(longName)) {
-        IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newType);
-        pr.reportProblem(problem);
-        return false;
-      }
-
-      if (reportWarningOnShortNames && namespaces.containsKey(shortName)) {
-        IProblem problem = problemFactory
-                .createDuplicateShortName(newType, ProblemSeverity.WARNING);
-        pr.reportProblem(problem);
-        return false;
-      }
-      if (knowsVariable(shortName)) {
-        IProblem problem = problemFactory.createIdConflictsWithVariableProblem(newType);
-        pr.reportProblem(problem);
-        return false;
-      }
-      List<RutaFeatureDeclaration> features = newType.getFeatures();
-      Set<FeatureDescription> feats = new HashSet<FeatureDescription>();
-      if (parentTypeInDeclaration != null) {
-        Set<FeatureDescription> set = featureDescriptionMap.get(parentTypeInDeclaration);
-        if (set != null) {
-          feats.addAll(set);
-        }
-      }
-      if (features != null) {
-        for (RutaFeatureDeclaration each : features) {
-          // TODO create correct feature description! Works right now because the type is not
-          // checked
-          String type = each.getType();
-          type = translate(type);
-          type = expand(type);
-          FeatureDescription f = new FeatureDescription_impl(each.getName(), "", type);
-          feats.add(f);
-          if (type.equals("INT") || type.equals("STRING") || type.equals("DOUBLE")
-                  || type.equals("FLOAT") || type.equals("BOOLEAN")) {
-            continue;
-          }
-          if (!namespaces.keySet().contains(type) && !namespaces.values().contains(type)) {
-            IProblem problem = problemFactory.createUnknownFeatureTypeProblem(each);
-            pr.reportProblem(problem);
-          }
-
-        }
-        featureDescriptionMap.put(longName, feats);
-      }
-      addDeclaredType(shortName);
-      return false;
-    }
-    if (s instanceof RutaVariableDeclaration) {
-      RutaVariableDeclaration newVar = (RutaVariableDeclaration) s;
-      if (knowsVariable(newVar.getName())) {
-        IProblem problem = problemFactory.createIdConflictsWithVariableProblem(newVar);
-        pr.reportProblem(problem);
-        return false;
-      }
-      if (namespaces.containsKey(newVar.getName())) {
-        IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newVar);
-        pr.reportProblem(problem);
-        return false;
-      }
-      knownLocalVariables.peek().put(newVar.getName(), newVar.getKind());
-      return false;
-    }
-    if (s instanceof RutaRegExpRule) {
-      RutaRegExpRule rule = (RutaRegExpRule) s;
-      Map<Expression, Map<Expression, Expression>> faMap = rule.getFeats();
-      Set<Entry<Expression, Map<Expression, Expression>>> typeEntrySet = faMap.entrySet();
-      for (Entry<Expression, Map<Expression, Expression>> entry : typeEntrySet) {
-        Expression struct = entry.getKey();
-        String structure = "";
-        if (struct != null) {
-          structure = sourceModule.getSource().substring(struct.sourceStart(), struct.sourceEnd());
-          structure = expand(structure);
-        }
-        Map<Expression, Expression> fmap = entry.getValue();
-        Set<Expression> keySet = fmap.keySet();
-        for (Expression fkey : keySet) {
-          if (fkey instanceof RutaExpression && fkey.getKind() == RutaTypeConstants.RUTA_TYPE_S) {
-            String feat = fkey.toString();
-            feat = getFeatureName(fkey, feat);
-            boolean findFeature = findFeature(structure, feat, -1);
-            if (!findFeature) {
-              IProblem problem = problemFactory.createUnknownFeatureProblem(fkey, structure);
-              pr.reportProblem(problem);
-            }
-          }
-        }
-      }
-    }
-    return true;
-  }
-
-  private void processCompleteTypeSystemImport(SimpleReference sRef, String localPath)
-          throws CoreException {
-    processCompleteTypeSystemImport(sRef, localPath, null, null, null);
-  }
-
-  private void processCompleteTypeSystemImport(SimpleReference sRef, String localPath,
-          Token typeToken, Token pkgToken, Token aliasToken) throws CoreException {
-    try {
-      URL url = null;
-      IFile file = RutaCheckerUtils.checkTypeSystemImport(localPath,
-              sourceModule.getScriptProject());
-      if (file == null) {
-        url = RutaCheckerUtils.checkImportExistence(localPath, "xml", classLoader);
-      }
-      if (file == null && url == null) {
-        pr.reportProblem(problemFactory.createFileNotFoundProblem(sRef, localPath));
-      } else {
-        IPath path = file == null ? null : file.getLocation();
-        TypeSystemDescription tsDesc = importTypeSystem(path, url, typeToken, pkgToken, aliasToken);
-        if (reportWarningOnShortNames) {
-          List<String> checkDuplicateShortNames = checkOnAmbiguousShortNames(tsDesc);
-          if (!checkDuplicateShortNames.isEmpty()) {
-            pr.reportProblem(problemFactory.createDuplicateShortNameInImported(sRef, localPath,
-                    checkDuplicateShortNames, ProblemSeverity.WARNING));
-          }
-        }
-      }
-    } catch (IOException e) {
-      pr.reportProblem(problemFactory.createFileNotFoundProblem(sRef, localPath));
-    } catch (InvalidXMLException e) {
-      pr.reportProblem(problemFactory.createXMLProblem(sRef, localPath));
-    }
-  }
-
-  private List<String> checkOnAmbiguousShortNames(TypeSystemDescription tsDesc) {
-    List<String> checkDuplicateShortNames = new ArrayList<String>();
-    for (TypeDescription each : tsDesc.getTypes()) {
-      String longName = each.getName();
-      String shortName = getShortName(longName);
-      Set<String> set = ambiguousTypeAlias.get(shortName);
-      if (set != null && set.size() > 1) {
-        checkDuplicateShortNames.addAll(set);
-      }
-    }
-    return checkDuplicateShortNames;
-  }
-
-  private TypeSystemDescription importTypeSystem(IPath path, URL url, Token typeToken,
-          Token pkgToken, Token aliasToken) throws InvalidXMLException, IOException,
-          MalformedURLException, CoreException {
-    TypeSystemDescription tsDesc = null;
-    if (path != null) {
-      tsDesc = UIMAFramework.getXMLParser().parseTypeSystemDescription(
-              new XMLInputSource(path.toFile()));
-    } else {
-      tsDesc = UIMAFramework.getXMLParser().parseTypeSystemDescription(new XMLInputSource(url));
-    }
-
-    ResourceManager resMgr = getResourceManager(classLoader);
-    tsDesc.resolveImports(resMgr);
-    for (TypeDescription each : tsDesc.getTypes()) {
-      String longName = each.getName();
-      String shortName = getShortName(longName);
-      if (pkgToken != null) {
-        String pkg = pkgToken.getText();
-        if (!longName.startsWith(pkg + ".")) {
-          continue;
-        }
-      }
-      if (typeToken != null) {
-        String type = typeToken.getText();
-        if (!longName.equals(type)) {
-          continue;
-        }
-      }
-      if (aliasToken != null) {
-        String alias = aliasToken.getText();
-        if (typeToken == null) {
-          shortName = alias + "." + shortName;
-        } else {
-          shortName = alias;
-        }
-      }
-      importType(longName, shortName);
-    }
-    return tsDesc;
-  }
-
-  private ResourceManager getResourceManager(ClassLoader classloader) throws MalformedURLException,
-          CoreException {
-    if (resourceManager == null) {
-      resourceManager = new ResourceManager_impl(classloader);
-      List<IFolder> folders = RutaProjectUtils.getAllDescriptorFolders(sourceModule
-              .getScriptProject().getProject());
-      StringBuilder sb = new StringBuilder();
-      Iterator<IFolder> iterator = folders.iterator();
-      while (iterator.hasNext()) {
-        IFolder iFolder = (IFolder) iterator.next();
-        sb.append(iFolder.getLocation().toPortableString());
-        if (iterator.hasNext()) {
-          sb.append(System.getProperty("path.separator"));
-        }
-      }
-      resourceManager.setDataPath(sb.toString());
-    }
-    return resourceManager;
-  }
-
-  @Override
-  public boolean visit(Expression s) throws Exception {
-
-    if (s instanceof RutaRuleElement) {
-      RutaRuleElement re = (RutaRuleElement) s;
-      Expression head = re.getHead();
-      if (head instanceof FeatureMatchExpression) {
-        FeatureMatchExpression fme = (FeatureMatchExpression) head;
-        String text = fme.getFeature().getText();
-        int lastIndexOf = text.lastIndexOf('.');
-        String twf = text.substring(0, lastIndexOf);
-        if (getVariableType(twf) == RutaTypeConstants.RUTA_TYPE_AT) {
-          matchedType = twf;
-        } else {
-          twf = expand(twf);
-          matchedType = isFeatureMatch(twf);
-        }
-      } else if (head != null) {
-        matchedType = sourceModule.getSource().substring(head.sourceStart(), head.sourceEnd());
-      }
-      // cache long name
-      matchedType = expand(matchedType);
-      if (matchedType == null) {
-        matchedType = "uima.tcas.Annotation";
-      }
-    }
-    if (s instanceof FeatureMatchExpression) {
-      FeatureMatchExpression fme = (FeatureMatchExpression) s;
-      String featText = fme.getFeature().getText();
-      // HOTFIX: parser creates wrong AST element
-      if (allLongTypeNames.contains(featText)) {
-        return true;
-      }
-      checkTypeOfFeatureMatch(featText, fme);
-      return true;
-    }
-    if (s instanceof RutaVariableReference) {
-      if (s instanceof NullExpression) {
-        return false;
-      }
-      RutaVariableReference ref = (RutaVariableReference) s;
-      if ((ref.getType() & RutaTypeConstants.RUTA_TYPE_AT) != 0) {
-        // types
-        String name = ref.getName();
-        if (name.equals("Document")) {
-          return false;
-        }
-
-        Set<String> set = ambiguousTypeAlias.get(name);
-        if (set != null && !set.isEmpty()) {
-          pr.reportProblem(problemFactory.createAmbiguousShortName(ref, set, ProblemSeverity.ERROR));
-          return false;
-        }
-        if (namespaces.keySet().contains(name) || namespaces.values().contains(name)
-                || allLongTypeNames.contains(name)
-                || getVariableType(name) == RutaTypeConstants.RUTA_TYPE_AT) {
-          return false;
-        }
-        if (isFeatureMatch(name) != null) {
-          return false;
-        }
-        if (name.indexOf(".") != -1) {
-          String[] split = name.split("[.]");
-          if (StringUtils.equals(split[split.length - 1], "ct")
-                  || StringUtils.equals(split[split.length - 1], "coveredText")) {
-            return false;
-          }
-        }
-
-        pr.reportProblem(problemFactory.createTypeProblem(ref, sourceModule));
-        return false;
-      }
-      if (!isVariableDeclared(ref)) {
-        return false;
-      }
-      checkTypeOfVariable(ref);
-      return false;
-    }
-    // check assign types
-    if (s instanceof RutaAction) {
-      RutaAction tma = (RutaAction) s;
-
-      String actionName = sourceModule.getSource().substring(tma.getNameStart(), tma.getNameEnd());
-      String[] keywords = RutaKeywordsManager.getKeywords(IRutaKeywords.ACTION);
-      List<String> asList = Arrays.asList(keywords);
-      if (!StringUtils.isEmpty(actionName) && !"-".equals(actionName)
-              && !asList.contains(actionName) && !implicitString.equals(tma.getName())) {
-        IProblem problem = problemFactory.createUnknownActionProblem(tma);
-        pr.reportProblem(problem);
-      }
-
-      IRutaExtension extension = actionExtensions.get(actionName);
-      if (extension != null) {
-        extension.checkSyntax(tma, problemFactory, pr);
-      }
-
-      if (tma.getName().equals("GETFEATURE") || tma.getName().equals("SETFEATURE")) {
-        List<?> childs = tma.getChilds();
-        RutaStringExpression stringExpr = (RutaStringExpression) childs.get(0);
-        String feat = stringExpr.toString();
-        feat = getFeatureName(stringExpr, feat);
-        boolean featureFound = findFeature(matchedType, feat, -1);
-        if (!featureFound) {
-          IProblem problem = problemFactory.createUnknownFeatureProblem(stringExpr, matchedType);
-          pr.reportProblem(problem);
-        }
-      }
-
-      if (s instanceof RutaStructureAction) {
-        RutaStructureAction sa = (RutaStructureAction) s;
-        Expression struct = sa.getStructure();
-        String structure = null;
-        if (struct != null) {
-          structure = sourceModule.getSource().substring(struct.sourceStart(), struct.sourceEnd());
-          structure = expand(structure);
-        }
-        Map<Expression, Expression> assignments = sa.getAssignments();
-        // hotfix... correct name in ast
-        String action = sourceModule.getSource().substring(sa.getNameStart(), sa.getNameEnd());
-        if (assignments != null && !action.equals("TRIE")) {
-          for (Expression each : assignments.keySet()) {
-            // TODO refactor to visitor?
-            String feat = each.toString();
-            // List<?> childs = each.getChilds();
-            feat = getFeatureName(each, feat);
-            boolean featureFound = findFeature(structure, feat, -1);
-            if (!featureFound) {
-              IProblem problem = problemFactory.createUnknownFeatureProblem(each, structure);
-              pr.reportProblem(problem);
-            }
-          }
-        } else if (assignments != null && action.equals("TRIE")) {
-          for (Expression each : assignments.values()) {
-            if (each instanceof RutaListExpression) {
-              RutaListExpression rle = (RutaListExpression) each;
-              List<?> childs = rle.getExprs().getChilds();
-              if (childs.size() != 2 && childs.size() != 3) {
-                IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(actionName,
-                        rle, 2);
-                pr.reportProblem(problem);
-              }
-              Object arg1 = childs.get(0);
-              if (arg1 instanceof RutaExpression) {
-                RutaExpression e1 = (RutaExpression) arg1;
-                if (e1.getKind() != RutaTypeConstants.RUTA_TYPE_AT) {
-                  IProblem problem = problemFactory.createWrongArgumentTypeProblem(e1, "Type");
-                  pr.reportProblem(problem);
-                }
-              }
-              Object arg2 = childs.get(1);
-              if (arg2 instanceof RutaExpression) {
-                RutaExpression e2 = (RutaExpression) arg2;
-                if (e2.getKind() != RutaTypeConstants.RUTA_TYPE_S) {
-                  IProblem problem = problemFactory.createWrongArgumentTypeProblem(e2, "String");
-                  pr.reportProblem(problem);
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    if (s instanceof RutaCondition) {
-      RutaCondition cond = (RutaCondition) s;
-      String conditionName = sourceModule.getSource().substring(cond.getNameStart(),
-              cond.getNameEnd());
-      String[] keywords = RutaKeywordsManager.getKeywords(IRutaKeywords.CONDITION);
-      List<String> asList = Arrays.asList(keywords);
-      if (!StringUtils.isEmpty(conditionName) && !"-".equals(conditionName)
-              && !asList.contains(conditionName) && !implicitString.equals(cond.getName())) {
-        IProblem problem = problemFactory.createUnknownConditionProblem(cond);
-        pr.reportProblem(problem);
-      }
-
-      IRutaExtension extension = conditionExtensions.get(conditionName);
-      if (extension != null) {
-        // boolean checkSyntax =
-        extension.checkSyntax(cond, problemFactory, pr);
-      }
-
-      if (conditionName.equals("FEATURE")) {
-        if (matchedType != null) {
-          List<?> args = cond.getChilds();
-          RutaStringExpression se = (RutaStringExpression) args.get(0);
-          String feat = se.toString();
-          feat = getFeatureName(se, feat);
-          boolean featureFound = findFeature(matchedType, feat, -1);
-          if (!featureFound) {
-            String featureMatch = isFeatureMatch(matchedType);
-            if (featureMatch != null) {
-              featureFound = findFeature(featureMatch, feat, -1);
-            }
-          }
-          if (!featureFound) {
-            IProblem problem = problemFactory.createUnknownFeatureProblem(se, matchedType);
-            pr.reportProblem(problem);
-          }
-        }
-      }
-    }
-    if (s instanceof RutaFunction) {
-      RutaFunction f = (RutaFunction) s;
-      String name = f.getName();
-      if (s.getKind() == RutaTypeConstants.RUTA_TYPE_AT) {
-        IRutaExtension extension = typeFunctionExtensions.get(name);
-        if (extension != null) {
-          extension.checkSyntax(s, problemFactory, pr);
-        }
-      } else if (s.getKind() == RutaTypeConstants.RUTA_TYPE_B) {
-        IRutaExtension extension = booleanFunctionExtensions.get(name);
-        if (extension != null) {
-          extension.checkSyntax(s, problemFactory, pr);
-        }
-      } else if (s.getKind() == RutaTypeConstants.RUTA_TYPE_N) {
-        IRutaExtension extension = numberFunctionExtensions.get(name);
-        if (extension != null) {
-          extension.checkSyntax(s, problemFactory, pr);
-        }
-      } else if (s.getKind() == RutaTypeConstants.RUTA_TYPE_S) {
-        IRutaExtension extension = stringFunctionExtensions.get(name);
-        if (extension != null) {
-          extension.checkSyntax(s, problemFactory, pr);
-        }
-      }
-    }
-    return true;
-  }
-
-  private String expand(String shortName) {
-    if (shortName == null) {
-      return null;
-    }
-    String longName = shortName;
-    String string = namespaces.get(shortName);
-    if (string != null) {
-      longName = string;
-    }
-    return longName;
-  }
-
-  private void checkTypeOfFeatureMatch(String featText, FeatureMatchExpression fme) {
-    int lastIndexOf = featText.lastIndexOf(".");
-    int firstIndexOf = featText.indexOf(".");
-    if (lastIndexOf == -1) {
-      return;
-    }
-    String bref = featText.substring(0, firstIndexOf);
-    String aref = featText.substring(0, lastIndexOf);
-    String fref = featText.substring(lastIndexOf + 1, featText.length());
-    String match = isFeatureMatch(aref);
-    if (match == null
-            && (getVariableType(aref) == RutaTypeConstants.RUTA_TYPE_AT || getVariableType(bref) == RutaTypeConstants.RUTA_TYPE_AT)) {
-      // do not check on variables!
-      return;
-    }
-    match = expand(match);
-    if (match != null) {
-      int kind = -1;
-      if (fme.getValue() != null) {
-        kind = fme.getValue().getKind();
-        if (fme.getValue() instanceof StringLiteral) {
-          kind = RutaTypeConstants.RUTA_TYPE_S;
-        } else if (fme.getValue() instanceof NumericLiteral) {
-          kind = RutaTypeConstants.RUTA_TYPE_N;
-        }
-      }
-      boolean findFeature = findFeature(match, fref, kind);
-      if (findFeature || fme.getValue() instanceof NullExpression) {
-
-      } else {
-        pr.reportProblem(problemFactory.createUnknownFeatureProblem(fme, aref));
-      }
-    } else {
-      pr.reportProblem(problemFactory.createTypeProblem(fme, sourceModule));
-      pr.reportProblem(problemFactory.createUnknownFeatureProblem(fme, aref));
-    }
-  }
-
-  @Override
-  public boolean endvisit(Expression s) throws Exception {
-    if (s instanceof RutaRuleElement) {
-      matchedType = null;
-    }
-    return super.endvisit(s);
-  }
-
-  @Override
-  public boolean endvisit(Statement s) throws Exception {
-    if (s instanceof RutaDeclareDeclarationsStatement) {
-      parentTypeInDeclaration = null;
-    }
-    return super.endvisit(s);
-  }
-
-  @Override
-  public boolean endvisit(MethodDeclaration s) throws Exception {
-    if (s instanceof RutaBlock) {
-      knownLocalVariables.pop();
-      blocks.pop();
-    }
-    return super.endvisit(s);
-  }
-
-  @Override
-  public boolean visit(MethodDeclaration s) throws Exception {
-    if (s instanceof RutaBlock) {
-      RutaBlock b = (RutaBlock) s;
-      knownLocalVariables.push(new HashMap<String, Integer>());
-      String name = b.getName();
-      blocks.push(name);
-      // TODO add syntax check for block extensions
-    }
-
-    return true;
-  }
-
-  private boolean findFeature(String longTypeName, String featureName, int kind) {
-    if (longTypeName == null) {
-      return false;
-    }
-    if (longTypeName.equals("Document")
-            || longTypeName.equals("org.apache.uima.ruta.type.Document")
-            || longTypeName.equals("uima.tcas.DocumentAnnotation")) {
-      if (featureName.equals("language") || featureName.equals("begin")
-              || featureName.equals("end")) {
-        return true;
-      }
-    }
-    if (featureName.equals("begin") || featureName.equals("end")) {
-      return kind == -1 || kind == RutaTypeConstants.RUTA_TYPE_N;
-    }
-    if (featureName.equals("ct") || featureName.equals("coveredText")) {
-      return kind == -1 || kind == RutaTypeConstants.RUTA_TYPE_S;
-    }
-    Set<FeatureDescription> set = featureDescriptionMap.get(longTypeName);
-    if (set != null) {
-      for (FeatureDescription featureDescription : set) {
-        String fName = featureDescription.getName();
-        // TODO check on correct feature type, e.g., the type of the annotation
-        if (fName.equals(featureName) && (kind == -1 || checkFeatureKind(featureDescription, kind))) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  private boolean checkFeatureKind(FeatureDescription f, int kind) {
-    if (kind == -1) {
-      return true;
-    }
-    String t = f.getRangeTypeName();
-    if (t.equals(UIMAConstants.TYPE_BOOLEAN) && RutaTypeConstants.RUTA_TYPE_B == kind) {
-      return true;
-    } else if (t.equals(UIMAConstants.TYPE_STRING) && RutaTypeConstants.RUTA_TYPE_S == kind) {
-      return true;
-    } else if ((t.equals(UIMAConstants.TYPE_BYTE) || t.equals(UIMAConstants.TYPE_DOUBLE)
-            || t.equals(UIMAConstants.TYPE_FLOAT) || t.equals(UIMAConstants.TYPE_INTEGER)
-            || t.equals(UIMAConstants.TYPE_LONG) || t.equals(UIMAConstants.TYPE_SHORT))
-            && RutaTypeConstants.RUTA_TYPE_N == kind) {
-      return true;
-    } else if ( RutaTypeConstants.RUTA_TYPE_AT == kind) {
-      return true;
-    }
-    return false;
-  }
-
-  private void addDeclaredType(String shortName) {
-    String longName = getLongNameOfNewType(shortName);
-    importType(longName, shortName);
-  }
-
-  private String getLongNameOfNewType(String shortName) {
-    String moduleName = sourceModule.getElementName();
-    moduleName = moduleName.substring(0, moduleName.length() - 5);
-    String packagePrefix = "";
-    if (!packageName.isEmpty()) {
-      packagePrefix = packageName + ".";
-    }
-    for (String each : blocks) {
-      packagePrefix += each + ".";
-    }
-    String longName = packagePrefix + moduleName + "." + shortName;
-    return longName;
-  }
-
-  /**
-   * Import a type in the current namespace.
-   * 
-   * @param longName
-   *          Complete type name.
-   * @param shortName
-   *          Short type name (without namespace).
-   */
-  private void importType(String longName, String shortName) {
-    if (allLongTypeNames.contains(longName)) {
-      // TODO: in conflict with double import
-      // pr.reportProblem(problemFactory.createIdenticalLongTypeNameProblem(longName,
-      // sourceModule));
-    } else {
-      allLongTypeNames.add(longName);
-    }
-    Set<String> targets = ambiguousTypeAlias.get(shortName);
-    if (targets != null) {
-      // shortName is already ambiguous, add longName to its list of possible targets
-      targets.add(longName);
-    } else {
-      String existing = namespaces.put(shortName, longName);
-
-      if (existing != null && !existing.equals(longName)) {
-        // shortName can now be resolved to "existing" or "longName"
-        targets = new HashSet<String>(2);
-        targets.add(existing);
-        targets.add(longName);
-
-        // add existing mapping and longName to its list of possible targets
-        ambiguousTypeAlias.put(shortName, targets);
-
-        // remove shortName from the namespace because it is ambiguous
-        namespaces.remove(shortName);
-      }
-    }
-  }
-
-  private boolean knowsVariable(String name) {
-    for (Map<String, Integer> each : knownLocalVariables) {
-      if (each.containsKey(name)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  private int getVariableType(String name) {
-    for (Map<String, Integer> each : knownLocalVariables) {
-      Integer integer = each.get(name);
-      if (integer != null)
-        return integer;
-    }
-    return 0;
-  }
-
-  private String getFeatureName(Expression expression, String defaultValue) {
-    // TODO refactor AST. This is not a really straightforward!
-    String result = defaultValue;
-    List<?> childs = expression.getChilds();
-    if (childs != null && !childs.isEmpty()) {
-      Object object = childs.get(0);
-      if (object instanceof ASTListNode) {
-        List<?> childs2 = ((ASTListNode) object).getChilds();
-        if (childs2 != null && !childs2.isEmpty()) {
-          Object object2 = childs2.get(0);
-          if (object2 instanceof StringLiteral) {
-            StringLiteral sl = (StringLiteral) object2;
-            result = sl.getValue().replaceAll("\"", "");
-          }
-        }
-      }
-    }
-    return result;
-  }
-
-  private void initializePredefinedInformation() {
-
-    typeDescriptionMap = new HashMap<String, TypeDescription>();
-    featureDescriptionMap = new HashMap<String, Set<FeatureDescription>>();
-
-    try {
-      typeSystemDescription = getTypeSystemOfScript();
-      IProject project = sourceModule.getScriptProject().getProject();
-      List<IFolder> descriptorFolders = RutaProjectUtils.getDescriptorFolders(project);
-      boolean exists = false;
-      for (IFolder iFolder : descriptorFolders) {
-        IPath basicTSD = iFolder.getLocation().append("BasicTypeSystem.xml");
-        exists = basicTSD.toFile().exists();
-        if (exists) {
-          importCompleteTypeSystem(basicTSD, null);
-          break;
-        }
-      }
-      if (!exists) {
-        // not in a common ruta project
-        // try to find the file in the classpath
-        URL resource = classLoader.getResource("org/apache/uima/ruta/engine/BasicTypeSystem.xml");
-        importCompleteTypeSystem(null, resource);
-      }
-    } catch (Exception e) {
-      RutaIdeUIPlugin.error(e);
-    }
-    if (typeSystemDescription != null) {
-      TypeDescription[] descriptions = typeSystemDescription.getTypes();
-      for (TypeDescription typeDescription : descriptions) {
-        String typeName = typeDescription.getName();
-        typeDescriptionMap.put(typeName, typeDescription);
-      }
-
-      for (TypeDescription typeDescription : descriptions) {
-        Set<FeatureDescription> allFeatures = getAllDeclaredFeatures(typeDescription,
-                typeDescriptionMap);
-        featureDescriptionMap.put(typeDescription.getName(), allFeatures);
-      }
-    }
-
-    List<String> uimaPredefTypes = Arrays.asList(new String[] { "uima.cas.Boolean",
-        "uima.cas.Byte", "uima.cas.Short", "uima.cas.Integer", "uima.cas.Long", "uima.cas.Float",
-        "uima.cas.Double", "uima.cas.String", "uima.cas.BooleanArray", "uima.cas.ByteArray",
-        "uima.cas.ShortArray", "uima.cas.IntegerArray", "uima.cas.LongArray",
-        "uima.cas.FloatArray", "uima.cas.DoubleArray", "uima.cas.StringArray", "uima.cas.FSArray",
-        "uima.cas.AnnotationBase", "uima.tcas.Annotation", "uima.tcas.DocumentAnnotation",
-        "uima.cas.FloatList", "uima.cas.IntegerList", "uima.cas.StringList", "uima.cas.FSList",
-        "uima.cas.EmptyFloatList", "uima.cas.EmptyIntegerList", "uima.cas.EmptyStringList",
-        "uima.cas.EmptyFSList", "uima.cas.NonEmptyFloatList", "uima.cas.NonEmptyIntegerList",
-        "uima.cas.NonEmptyStringList", "uima.cas.NonEmptyFSList" });
-    for (String longName : uimaPredefTypes) {
-      String shortName = getShortName(longName);
-      importType(longName, shortName);
-    }
-
-    this.finalTypes = new HashSet<String>();
-    Set<String> uimaFinalTypes = new HashSet<String>();
-    uimaFinalTypes.addAll(Arrays.asList(new String[] { "uima.cas.Boolean", "uima.cas.Byte",
-        "uima.cas.Short", "uima.cas.Integer", "uima.cas.Long", "uima.cas.Float", "uima.cas.Double",
-        "uima.cas.BooleanArray", "uima.cas.ByteArray", "uima.cas.ShortArray",
-        "uima.cas.IntegerArray", "uima.cas.LongArray", "uima.cas.FloatArray",
-        "uima.cas.DoubleArray", "uima.cas.StringArray", "uima.cas.FSArray" }));
-
-    for (String string : uimaFinalTypes) {
-      int indexOf = string.lastIndexOf('.');
-      finalTypes.add(string);
-      finalTypes.add(string.substring(indexOf + 1, string.length()));
-    }
-  }
-
-  private TypeSystemDescription importCompleteTypeSystem(IPath path, URL url)
-          throws InvalidXMLException, MalformedURLException, IOException, CoreException {
-    return importTypeSystem(path, url, null, null, null);
-  }
-
-  private void initializeExtensionInformation() {
-    conditionExtensions = new HashMap<String, IIDEConditionExtension>();
-    actionExtensions = new HashMap<String, IIDEActionExtension>();
-    numberFunctionExtensions = new HashMap<String, IIDENumberFunctionExtension>();
-    booleanFunctionExtensions = new HashMap<String, IIDEBooleanFunctionExtension>();
-    stringFunctionExtensions = new HashMap<String, IIDEStringFunctionExtension>();
-    typeFunctionExtensions = new HashMap<String, IIDETypeFunctionExtension>();
-    blockExtensions = new HashMap<String, IIDEBlockExtension>();
-    IIDEConditionExtension[] cextensions = RutaExtensionManager.getDefault()
-            .getIDEConditionExtensions();
-    for (IIDEConditionExtension each : cextensions) {
-      String[] knownExtensions = each.getKnownExtensions();
-      for (String string : knownExtensions) {
-        conditionExtensions.put(string, each);
-      }
-    }
-    IIDEActionExtension[] aextensions = RutaExtensionManager.getDefault().getIDEActionExtensions();
-    for (IIDEActionExtension each : aextensions) {
-      String[] knownExtensions = each.getKnownExtensions();
-      for (String string : knownExtensions) {
-        actionExtensions.put(string, each);
-      }
-    }
-    IIDENumberFunctionExtension[] nfextensions = RutaExtensionManager.getDefault()
-            .getIDENumberFunctionExtensions();
-    for (IIDENumberFunctionExtension each : nfextensions) {
-      String[] knownExtensions = each.getKnownExtensions();
-      for (String string : knownExtensions) {
-        numberFunctionExtensions.put(string, each);
-      }
-    }
-    IIDEBooleanFunctionExtension[] bfextensions = RutaExtensionManager.getDefault()
-            .getIDEBooleanFunctionExtensions();
-    for (IIDEBooleanFunctionExtension each : bfextensions) {
-      String[] knownExtensions = each.getKnownExtensions();
-      for (String string : knownExtensions) {
-        booleanFunctionExtensions.put(string, each);
-      }
-    }
-    IIDEStringFunctionExtension[] sfextensions = RutaExtensionManager.getDefault()
-            .getIDEStringFunctionExtensions();
-    for (IIDEStringFunctionExtension each : sfextensions) {
-      String[] knownExtensions = each.getKnownExtensions();
-      for (String string : knownExtensions) {
-        stringFunctionExtensions.put(string, each);
-      }
-    }
-    IIDETypeFunctionExtension[] tfextensions = RutaExtensionManager.getDefault()
-            .getIDETypeFunctionExtensions();
-    for (IIDETypeFunctionExtension each : tfextensions) {
-      String[] knownExtensions = each.getKnownExtensions();
-      for (String string : knownExtensions) {
-        typeFunctionExtensions.put(string, each);
-      }
-    }
-    IIDEBlockExtension[] bextensions = RutaExtensionManager.getDefault().getIDEBlockExtensions();
-    for (IIDEBlockExtension each : bextensions) {
-      String[] knownExtensions = each.getKnownExtensions();
-      for (String string : knownExtensions) {
-        blockExtensions.put(string, each);
-      }
-    }
-
-  }
-
-  private Set<FeatureDescription> getAllDeclaredFeatures(TypeDescription typeDescription,
-          Map<String, TypeDescription> typeMap) {
-    Set<FeatureDescription> result = new HashSet<FeatureDescription>();
-    if (typeDescription == null) {
-      return result;
-    }
-    FeatureDescription[] features = typeDescription.getFeatures();
-    if (features == null) {
-      return result;
-    }
-    result.addAll(Arrays.asList(features));
-    String supertypeName = typeDescription.getSupertypeName();
-    if (supertypeName != null) {
-      TypeDescription parent = typeMap.get(supertypeName);
-      result.addAll(getAllDeclaredFeatures(parent, typeMap));
-    }
-    return result;
-  }
-
-  private String isFeatureMatch(String text) {
-    for (String each : namespaces.values()) {
-      String t = checkFeatureMatch(text, each);
-      if (t != null) {
-        return t;
-      }
-    }
-    for (String each : namespaces.keySet()) {
-      String t = checkFeatureMatch(text, each);
-      if (t != null) {
-        return t;
-      }
-    }
-    return null;
-  }
-
-  private String checkFeatureMatch(String name, String type) {
-    if (name.startsWith(type)) {
-      boolean foundAll = true;
-      if (name.length() > type.length()) {
-        String tail = name.substring(type.length() + 1);
-        String[] split = tail.split("[.]");
-        String typeToCheck = type;
-        for (String feat : split) {
-          typeToCheck = expand(typeToCheck);
-          typeToCheck = checkFSFeatureOfType(feat, typeToCheck);
-          foundAll &= (typeToCheck != null);
-          if (!foundAll) {
-            return null;
-          }
-        }
-        return typeToCheck;
-      } else {
-        return type;
-      }
-    } else {
-      return null;
-    }
-  }
-
-  private String checkFSFeatureOfType(String featureName, String longTypeName) {
-    TypeDescription t = typeDescriptionMap.get(longTypeName);
-    if (t == null) {
-      return null;
-    }
-    FeatureDescription[] features = t.getFeatures();
-    for (FeatureDescription featureDescription : features) {
-      String name = featureDescription.getName();
-      String rangeTypeName = featureDescription.getRangeTypeName();
-      boolean isFS = isFeatureStructure(rangeTypeName);
-      if (name.equals(featureName) && isFS) {
-        return rangeTypeName;
-      }
-    }
-    return null;
-  }
-
-  private boolean isFeatureStructure(String rangeTypeName) {
-    if (rangeTypeName.equals("uima.tcas.Annotation") || rangeTypeName.equals("uima.cas.TOP")) {
-      return true;
-    }
-    TypeDescription type = typeDescriptionMap.get(rangeTypeName);
-    if (type == null) {
-      return false;
-    }
-    String supertypeName = type.getSupertypeName();
-    if (supertypeName != null) {
-      return isFeatureStructure(supertypeName);
-    }
-    return false;
-  }
-
-  private boolean checkTypeOfVariable(RutaVariableReference ref) {
-    Integer vt = getVariableType(ref.getName());
-    if (vt == null) {
-      IProblem problem = problemFactory.createUnknownVariableProblem(ref);
-      pr.reportProblem(problem);
-      return false;
-    } else {
-      int variableType = vt.intValue();
-      int requiredType = ref.getType();
-      // reject generic types
-      if ((requiredType & RutaTypeConstants.RUTA_TYPE_G) != 0) {
-        return true;
-      }
-      if ((variableType & requiredType) == 0) {
-        String errMsg = "Variable \"" + ref.getName() + "\" has type "
-                + RutaTypeConstants.typeStringOfInt.get(variableType) + ". But type "
-                + RutaTypeConstants.typeStringOfInt.get(requiredType) + " is required.";
-        IProblem problem = new RutaCheckerDefaultProblem(sourceModule.getElementName(), errMsg,
-                ref, linetracker.getLineNumberOfOffset(ref.sourceStart()));
-        pr.reportProblem(problem);
-        return false;
-      }
-    }
-    return true;
-  }
-
-  private boolean isVariableDeclared(RutaVariableReference ref) {
-    if (!knowsVariable(ref.getName()) && !(ref instanceof NullExpression)) {
-      // declared as type?
-      if (namespaces.keySet().contains(ref.getName())) {
-        String errMsg = "\"" + ref.getName() + "\" declared as a Type. Variable of type "
-                + RutaTypeConstants.typeStringOfInt.get(ref.getType()) + " required.";
-        IProblem problem = new RutaCheckerDefaultProblem(sourceModule.getElementName(), errMsg,
-                ref, linetracker.getLineNumberOfOffset(ref.sourceStart()));
-        pr.reportProblem(problem);
-        return false;
-      }
-      String errMsgHead = "Variable \"";
-      String errMsgTailDefault = " defined in this script or block!";
-
-      // not found
-      String errMsg = errMsgHead + ref.getName() + "\" not" + errMsgTailDefault;
-      IProblem problem = new RutaCheckerDefaultProblem(sourceModule.getElementName(), errMsg, ref,
-              linetracker.getLineNumberOfOffset(ref.sourceStart()));
-      pr.reportProblem(problem);
-      return false;
-    }
-    return true;
-  }
-
-  private String getShortName(String typeName) {
-    String[] nameSpace = typeName.split("[.]");
-    return nameSpace[nameSpace.length - 1];
-  }
-
-  private TypeSystemDescription getTypeSystemOfScript() throws InvalidXMLException, IOException,
-          CoreException {
-    IPath descriptorPath = RutaProjectUtils.getTypeSystemDescriptorPath(sourceModule.getResource()
-            .getLocation(), sourceModule.getScriptProject().getProject());
-    TypeSystemDescription typeSysDescr = null;
-    if (descriptorPath.toFile().exists()) {
-      typeSysDescr = UIMAFramework.getXMLParser().parseTypeSystemDescription(
-              new XMLInputSource(descriptorPath.toPortableString()));
-      ResourceManager resMgr = getResourceManager(classLoader);
-      typeSysDescr.resolveImports(resMgr);
-    } else {
-      // backup: just search for the file named correctly
-      String lastSegment = descriptorPath.lastSegment();
-      PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(
-              classLoader);
-      String prefix = "classpath*:**/";
-      String pattern = prefix + lastSegment;
-      Resource[] resources = resolver.getResources(pattern);
-      if (resources != null && resources.length != 0) {
-        typeSysDescr = UIMAFramework.getXMLParser().parseTypeSystemDescription(
-                new XMLInputSource(resources[0].getURL()));
-        ResourceManager resMgr = getResourceManager(classLoader);
-        typeSysDescr.resolveImports(resMgr);
-      }
-    }
-    return typeSysDescr;
-  }
-
-  private String translate(String name) {
-    if (name == null) {
-      return null;
-    }
-    if (name.equals("Annotation")) {
-      return "uima.tcas.Annotation";
-    } else if (name.equals("STRING")) {
-      return UIMAConstants.TYPE_STRING;
-    } else if (name.equals("INT")) {
-      return UIMAConstants.TYPE_INTEGER;
-    } else if (name.equals("DOUBLE")) {
-      return UIMAConstants.TYPE_DOUBLE;
-    } else if (name.equals("FLOAT")) {
-      return UIMAConstants.TYPE_FLOAT;
-    } else if (name.equals("BOOLEAN")) {
-      return UIMAConstants.TYPE_BOOLEAN;
-    } else if (name.equals("TYPE")) {
-      return UIMAConstants.TYPE_STRING;
-    }
-    return name;
-  }
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaChecker.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaChecker.java
deleted file mode 100644
index a08a963..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaChecker.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.core.ISourceModule;
-import org.eclipse.dltk.core.SourceParserUtil;
-import org.eclipse.dltk.core.builder.IBuildContext;
-import org.eclipse.dltk.core.builder.IBuildParticipant;
-import org.eclipse.dltk.core.builder.IBuildParticipantExtension;
-
-public class RutaChecker implements IBuildParticipant, IBuildParticipantExtension {
-  List<IBuildParticipant> buildParticipants = null;
-
-  public RutaChecker(IScriptProject project) {
-    buildParticipants = new ArrayList<IBuildParticipant>();
-    try {
-      buildParticipants.add(new RutaProjectChecker());
-      buildParticipants.add(new RutaLanguageChecker());
-      buildParticipants.add(new RutaEngineAndCallChecker(project));
-    } catch (CoreException e) {
-      e.printStackTrace();
-    }
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.core.builder.IBuildParticipant#build(org.eclipse.dltk
-   * .core.builder.IBuildContext)
-   */
-  public void build(IBuildContext context) throws CoreException {
-    // if ast not declared in context ..
-    Object mdObj = context.get(IBuildContext.ATTR_MODULE_DECLARATION);
-    if (!(mdObj instanceof ModuleDeclaration)) {
-      // ...temporary inefficient hack to get live error msgs
-      // TODO refactor
-      ISourceModule sourceModule = context.getSourceModule();
-      ModuleDeclaration md = SourceParserUtil.getModuleDeclaration(sourceModule, null);
-      context.set(IBuildContext.ATTR_MODULE_DECLARATION, md);
-    }
-    for (IBuildParticipant buildP : buildParticipants) {
-      buildP.build(context);
-    }
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.core.builder.IBuildParticipantExtension#beginBuild(int)
-   */
-  public boolean beginBuild(int buildType) {
-    return true;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.core.builder.IBuildParticipantExtension#endBuild(org
-   * .eclipse.core.runtime.IProgressMonitor)
-   */
-  public void endBuild(IProgressMonitor monitor) {
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerDefaultProblem.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerDefaultProblem.java
deleted file mode 100644
index b328b78..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerDefaultProblem.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import org.apache.uima.ruta.ide.parser.ast.RutaAbstractDeclaration;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.compiler.problem.DefaultProblem;
-import org.eclipse.dltk.compiler.problem.ProblemSeverity;
-
-public class RutaCheckerDefaultProblem extends DefaultProblem {
-
-  public RutaCheckerDefaultProblem(String fileName, String message, RutaAbstractDeclaration node,
-          int line, int column, ProblemSeverity severity) {
-    super(fileName, message, RutaProblemIdentifier.PROBLEM, new String[] {}, severity, node
-            .getNameStart(), node.getNameEnd(), line, column);
-  }
-
-  public RutaCheckerDefaultProblem(String fileName, String message, RutaAbstractDeclaration node,
-          int line) {
-    super(fileName, message, 0, new String[] {}, ProblemSeverity.ERROR, node.getNameStart(), node
-            .getNameEnd(), line);
-  }
-
-  public RutaCheckerDefaultProblem(String fileName, String message, ASTNode node, int line) {
-    this(fileName, message, node, line, ProblemSeverity.ERROR);
-  }
-
-  public RutaCheckerDefaultProblem(String fileName, String message, ASTNode node, int line,
-          ProblemSeverity severity) {
-    super(fileName, message, 0, new String[] {}, severity, node.sourceStart(), node.sourceEnd(),
-            line);
-  }
-
-  public RutaCheckerDefaultProblem(String fileName, String message) {
-    super(fileName, message, RutaProblemIdentifier.PROBLEM, new String[] {}, ProblemSeverity.ERROR,
-            0, 0, 0, 0);
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerProblemFactory.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerProblemFactory.java
deleted file mode 100644
index 1da8544..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerProblemFactory.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.ruta.ide.core.extensions.IRutaCheckerProblemFactory;
-import org.apache.uima.ruta.ide.parser.ast.FeatureMatchExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaAbstractDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;
-import org.apache.uima.ruta.ide.parser.ast.RutaFeatureDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.dltk.ast.ASTListNode;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.ast.expressions.StringLiteral;
-import org.eclipse.dltk.compiler.problem.IProblem;
-import org.eclipse.dltk.compiler.problem.ProblemSeverity;
-import org.eclipse.dltk.core.ISourceModule;
-import org.eclipse.dltk.core.builder.ISourceLineTracker;
-
-public class RutaCheckerProblemFactory implements IRutaCheckerProblemFactory {
-  private ISourceLineTracker linetracker;
-
-  private String fileName;
-
-  public RutaCheckerProblemFactory(String fileName, ISourceLineTracker linetracker) {
-    this.fileName = fileName;
-    this.linetracker = linetracker;
-  }
-
-  public IProblem createIdConflictsWithVariableProblem(RutaAbstractDeclaration varRef) {
-    String message = generateVarAlreadyDeclaredProblemMsg(varRef);
-    return new RutaCheckerDefaultProblem(this.fileName, message, varRef, getLine(varRef));
-  }
-
-  public IProblem createIdConflictsWithTypeProblem(RutaAbstractDeclaration varRef) {
-    String message = generateVarConflictsWithTypeProblem(varRef);
-    return new RutaCheckerDefaultProblem(this.fileName, message, varRef, getLine(varRef));
-  }
-
-  public IProblem createFileNotFoundProblem(ASTNode node, String localPath) {
-    return new RutaCheckerDefaultProblem(this.fileName, generateFileNotFoundProblemMsg(localPath),
-            node, getLine(node));
-  }
-
-  public IProblem createFileNotFoundProblem(ASTNode fileNode) {
-    return createFileNotFoundProblem(fileNode, fileNode.toString());
-  }
-
-  public IProblem createDuplicateShortNameInImported(ASTNode node, String localPath,
-          List<String> checkDuplicateShortNames, ProblemSeverity severity) {
-    StringBuilder sb = new StringBuilder();
-    Iterator<String> iterator = checkDuplicateShortNames.iterator();
-    while (iterator.hasNext()) {
-      String string = (String) iterator.next();
-      sb.append(string);
-      if(iterator.hasNext()) {
-        sb.append(", ");
-      }
-    }
-    String msg = String.format(
-            "Types in %s share same short name, but with different namespaces: %s.", localPath,
-            StringUtils.abbreviate(sb.toString(), 150));
-    return new RutaCheckerDefaultProblem(this.fileName, msg, node, getLine(node), severity);
-  }
-
-  public IProblem createDuplicateShortName(RutaAbstractDeclaration var, ProblemSeverity severity) {
-    return new RutaCheckerDefaultProblem(this.fileName, "The type " + var.getName()
-            + " conflicts with other types with same short name, but different namespace.", var,
-            getLine(var), severity);
-  }
-
-  public IProblem createXMLProblem(ASTNode node, String localPath) {
-    return new RutaCheckerDefaultProblem(this.fileName, generateXMLProblemMsg(localPath), node,
-            getLine(node));
-  }
-
-  public IProblem createTypeProblem(RutaVariableReference ref, ISourceModule currentFile) {
-
-    String errMsgHead = "Type \"";
-
-    String errMsgTailDefault = " \" not defined in this script/block!";
-    String errMsg = errMsgHead + ref.getName() + errMsgTailDefault;
-    IProblem problem = new RutaCheckerDefaultProblem(currentFile.getElementName(), errMsg, ref,
-            linetracker.getLineNumberOfOffset(ref.sourceStart()));
-    return problem;
-  }
-
-  public IProblem createTypeProblem(FeatureMatchExpression ref, ISourceModule currentFile) {
-
-    String errMsgHead = "Type \"";
-
-    String errMsgTailDefault = " \" not defined in this script/block!";
-    String errMsg = errMsgHead + ref.getFeature().getText() + errMsgTailDefault;
-    IProblem problem = new RutaCheckerDefaultProblem(currentFile.getElementName(), errMsg, ref,
-            linetracker.getLineNumberOfOffset(ref.sourceStart()));
-    return problem;
-  }
-
-  private String generateFileNotFoundProblemMsg(ASTNode node) {
-    return generateFileNotFoundProblemMsg(node.toString());
-  }
-
-  private String generateFileNotFoundProblemMsg(String fileName) {
-    return "error: \"" + fileName + "\" not found.";
-  }
-
-  private String generateXMLProblemMsg(String fileName) {
-    return "error: " + fileName + " causes xml problem.";
-  }
-
-  private int getLine(ASTNode varRef) {
-    return this.linetracker.getLineNumberOfOffset(varRef.sourceStart());
-  }
-
-  private String generateVarAlreadyDeclaredProblemMsg(RutaAbstractDeclaration var) {
-    return "error: Id \"" + var.getName() + "\" conflicts with already declared variable.";
-  }
-
-  private String generateVarConflictsWithTypeProblem(RutaAbstractDeclaration var) {
-    return "error: Identifier \"" + var.getName()
-            + "\" conflicts with already declared annotation type.";
-  }
-
-  public IProblem createUnknownFeatureTypeProblem(RutaFeatureDeclaration var) {
-    String message = "error: Type \"" + var.getType() + "\" of Feature \"" + var.getName()
-            + "\" is not defined.";
-    return new RutaCheckerDefaultProblem(this.fileName, message, var, getLine(var));
-  }
-
-  public IProblem createUnknownFeatureProblem(Expression var, String matchedType) {
-    // TODO refactor and find better solution
-    String feat = var.toString();
-    List childs = var.getChilds();
-    if (childs != null && !childs.isEmpty()) {
-      Object object = childs.get(0);
-      if (object instanceof ASTListNode) {
-        List childs2 = ((ASTListNode) object).getChilds();
-        if (childs2 != null && !childs2.isEmpty()) {
-          Object object2 = childs2.get(0);
-          if (object2 instanceof StringLiteral) {
-            StringLiteral sl = (StringLiteral) object2;
-            feat = sl.getValue().replaceAll("\"", "");
-          }
-        }
-      }
-    }
-    String message = "error: Feature \"" + feat + "\" is not defined.";
-    if (matchedType != null) {
-      message = "error: Feature \"" + feat + "\" is not defined for type \"" + matchedType + "\".";
-    }
-    return new RutaCheckerDefaultProblem(this.fileName, message, var, getLine(var));
-  }
-
-  public IProblem createWrongArgumentTypeProblem(Expression was, String expected) {
-    String message = "Wrong kind of argument: expected " + expected;
-    return new RutaCheckerDefaultProblem(this.fileName, message, was, getLine(was));
-  }
-
-  public IProblem createInheritenceFinalProblem(RutaVariableReference parent) {
-    String message = "Type \"" + parent.getName()
-            + "\" is final and cannot be used as a parent type.";
-    return new RutaCheckerDefaultProblem(this.fileName, message, parent, getLine(parent));
-  }
-
-  public IProblem createUnknownConditionProblem(RutaCondition cond) {
-    String message = "error: Condition \"" + cond.getName() + "\" is not defined.";
-    return new RutaCheckerDefaultProblem(this.fileName, message, cond, getLine(cond));
-  }
-
-  public IProblem createUnknownActionProblem(RutaAction action) {
-    String message = "error: Action \"" + action.getName() + "\" is not defined.";
-    return new RutaCheckerDefaultProblem(this.fileName, message, action, getLine(action));
-  }
-
-  public IProblem createUnknownVariableProblem(RutaVariableReference ref) {
-    String message = "error: Variable \"" + ref.getName() + "\" is not defined.";
-    return new RutaCheckerDefaultProblem(this.fileName, message, ref, getLine(ref));
-  }
-  
-  public IProblem createWrongNumberOfArgumentsProblem(String name, Expression element, int expected) {
-    String message = "error: The element " + name + " expects " + expected + " arguments.";
-    return new RutaCheckerDefaultProblem(this.fileName, message, element, getLine(element));
-  }
-
-  public IProblem createUnknownFunctionProblem(RutaFunction f) {
-    String message = "error: Function \"" + f.getName() + "\" is not defined.";
-    return new RutaCheckerDefaultProblem(this.fileName, message, f, getLine(f));
-  }
-
-  public IProblem createAmbiguousShortName(RutaVariableReference ref, Collection<String> ambiguousTargets, ProblemSeverity error) {
-    StringBuilder message = new StringBuilder(ref.getName());
-    message.append(" is ambiguous, use one of the following instead : ");
-    for (String target : ambiguousTargets) {
-      message.append(target).append(' ');
-    }
-    return new RutaCheckerDefaultProblem(this.fileName, message.toString(), ref, getLine(ref));
-  }
-
-  public IProblem createIdenticalLongTypeNameProblem(String longName, ISourceModule sourceModule) {
-    StringBuilder message = new StringBuilder(longName);
-    message.append(" is ambiguous!");
-    return new RutaCheckerDefaultProblem(this.fileName, message.toString());
-  }
-
-  public IProblem createClosedProjectsProblem(List<IProject> projects) {
-    StringBuilder message = new StringBuilder();
-    if(projects.size() == 1) {
-      message.append("A referenced project is closed: ");
-    } else {
-      message.append("Referenced project are closed: ");
-    }
-    Iterator<IProject> iterator = projects.iterator();
-    while (iterator.hasNext()) {
-      IProject each = (IProject) iterator.next();
-      message.append(each.getName());
-      if(iterator.hasNext()) {
-        message.append(", ");
-      }
-    }
-    
-    return new RutaCheckerDefaultProblem(this.fileName, message.toString());    
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerUtils.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerUtils.java
deleted file mode 100644
index 3d12b4f..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaCheckerUtils.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Stack;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_component.AnalysisComponent;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.resource.metadata.ConfigurationParameterSettings;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLInputSource;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.dltk.core.DLTKCore;
-import org.eclipse.dltk.core.IMethod;
-import org.eclipse.dltk.core.IModelElement;
-import org.eclipse.dltk.core.IScriptFolder;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.core.ISourceModule;
-import org.eclipse.dltk.core.ModelException;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-
-public class RutaCheckerUtils {
-
-  public static Set<String> importScript(String path, int type, IScriptProject project)
-          throws InvalidXMLException, IOException, CoreException {
-    return importScript(path, type, project, false);
-  }
-
-  /**
-   * @param path
-   *          relative to script folder of the project.<br>
-   *          i.e.: "org.apache.uima.MyScript"
-   * @param type
-   *          i.e. IModelElement.FIELD for fields to be collected and returned
-   * @return set of elements
-   * @throws InvalidXMLException
-   * @throws IOException
-   * @throws ModelException
-   */
-  public static Set<String> importScript(String path, int type, IScriptProject project,
-          boolean appendPath) throws InvalidXMLException, IOException, ModelException,
-          CoreException {
-    Stack<String> namespaceStack = new Stack<String>();
-
-    final Set<String> imports = new HashSet<String>();
-    List<IFolder> scriptFolders = null;
-    try {
-      scriptFolders = RutaProjectUtils.getAllScriptFolders(project);
-    } catch (CoreException e) {
-      throw e;
-    }
-    String fileNameWithoutExtension = path.substring(path.lastIndexOf('.') + 1);
-    String fileNameWithExtension = fileNameWithoutExtension + RutaEngine.SCRIPT_FILE_EXTENSION;
-    ISourceModule sourceModule = null;
-    boolean found = false;
-    for (IFolder eachFolder : scriptFolders) {
-
-      IScriptProject sp = DLTKCore.create(eachFolder.getProject());
-      IScriptFolder[] scriptFolders2 = sp.getScriptFolders();
-      for (IScriptFolder iScriptFolder : scriptFolders2) {
-        sourceModule = iScriptFolder.getSourceModule(fileNameWithExtension);
-        if (sourceModule.exists() && sourceModule.getResource() != null
-                && sourceModule.getResource().exists()) {
-          found = true;
-          break;
-        }
-        if (found)
-          break;
-      }
-    }
-    IModelElement elements[] = null;
-    namespaceStack.push(fileNameWithoutExtension);
-    if(sourceModule == null) {
-      return imports;
-    }
-    try {
-      elements = sourceModule.getChildren();
-      for (int i = 0; i < elements.length; i++) {
-        IModelElement modelElement = elements[i];
-        int elementType = modelElement.getElementType();
-        if (elementType == type) {
-          if (elementType == IModelElement.METHOD) {
-            imports.add(namespaceStack.peek() + "." + modelElement.getElementName());
-          } else if (appendPath) {
-            imports.add(path + "." + modelElement.getElementName());
-          } else {
-            imports.add(modelElement.getElementName());
-          }
-        }
-        if (elementType == IModelElement.METHOD) {
-          String nSpace = namespaceStack.empty() ? modelElement.getElementName() : namespaceStack
-                  .peek() + "." + modelElement.getElementName();
-          namespaceStack.push(nSpace);
-          imports.addAll(collectElements((IMethod) modelElement, type, namespaceStack));
-          namespaceStack.pop();
-        }
-      }
-    } catch (ModelException e) {
-      throw new FileNotFoundException();
-    }
-    return imports;
-  }
-
-  private static Set<String> collectElements(IMethod element, int type, Stack stack)
-          throws ModelException {
-    Set<String> fieldsCollection = new HashSet<String>();
-    IModelElement elements[] = element.getChildren();
-    if (elements == null) {
-      return fieldsCollection;
-    }
-    for (int i = 0; i < elements.length; i++) {
-      IModelElement modelElement = elements[i];
-      int elementType = modelElement.getElementType();
-      if (elementType == type) {
-        if (elementType == IModelElement.FIELD) {
-          fieldsCollection.add(modelElement.getElementName());
-        }
-        fieldsCollection.add(stack.peek() + "." + modelElement.getElementName());
-      }
-      if (elementType == IModelElement.METHOD) {
-        stack.push(stack.peek() + "." + modelElement.getElementName());
-        fieldsCollection.addAll(collectElements((IMethod) modelElement, type, stack));
-        stack.pop();
-      }
-    }
-    return fieldsCollection;
-  }
-
-  public static IFile getFile(IFolder folder, String filePath) {
-    int lastDot = filePath.lastIndexOf('.');
-    int sndLastDot = filePath.lastIndexOf('.', lastDot - 1);
-    String fName = filePath;
-    if (sndLastDot >= 0) {
-      String subFolder = filePath.substring(0, sndLastDot);
-      folder = folder.getFolder(subFolder);
-      fName = filePath.substring(sndLastDot + 1);
-    }
-    return folder.getFile(fName);
-  }
-
-  /**
-   * @param xmlFilePath
-   *          absolute full path. i.e.: "org.apache.uima.myengine" ".xml" will be added.
-   * @return file.exists
-   */
-  public static boolean checkEngineImport(String xmlFilePath, IScriptProject project) {
-    boolean result = false;
-    List<IFolder> allDescriptorFolders;
-    try {
-      allDescriptorFolders = RutaProjectUtils.getAllDescriptorFolders(project.getProject());
-    } catch (Exception e) {
-      return false;
-    }
-    for (IFolder folder : allDescriptorFolders) {
-      String fileExtended = xmlFilePath.replaceAll("[.]", "/") + ".xml";
-      IFile file = RutaCheckerUtils.getFile(folder, fileExtended);
-      result |= file.exists();
-    }
-    return result;
-  }
-
-  public static boolean checkEngineOnClasspath(String clazz, IScriptProject project,
-          ClassLoader classloader) {
-    if (classloader == null) {
-      classloader = RutaEngine.class.getClassLoader();
-    }
-    try {
-      Class<?> loadClass = classloader.loadClass(clazz);
-      Class<?> loadClass2 = classloader.loadClass(AnalysisComponent.class.getName());
-      if (loadClass != null && loadClass2.isAssignableFrom(loadClass)) {
-        return true;
-      }
-    } catch (ClassNotFoundException e) {
-      return false;
-    }
-    return false;
-  }
-
-  public static IFile checkScriptImport(String xmlFilePath, IScriptProject project) {
-    List<IFolder> allDescriptorFolders;
-    try {
-      allDescriptorFolders = RutaProjectUtils.getAllScriptFolders(project);
-    } catch (CoreException e) {
-      return null;
-    }
-    for (IFolder folder : allDescriptorFolders) {
-      String fileExtended = xmlFilePath.replaceAll("[.]", "/") + RutaEngine.SCRIPT_FILE_EXTENSION;
-      IFile file = RutaCheckerUtils.getFile(folder, fileExtended);
-      if (file.exists()) {
-        return file;
-      }
-    }
-    return null;
-  }
-
-
-
-  public static IFile checkTypeSystemImport(String localPath, IScriptProject project) {
-    List<IFolder> allDescriptorFolders;
-    try {
-      allDescriptorFolders = RutaProjectUtils.getAllDescriptorFolders(project.getProject());
-    } catch (Exception e) {
-      return null;
-    }
-    for (IFolder folder : allDescriptorFolders) {
-      String fileExtended = localPath.replaceAll("[.]", "/") + ".xml";
-      IFile file = RutaCheckerUtils.getFile(folder, fileExtended);
-      if (file.exists()) {
-        return file;
-      }
-    }
-    return null;
-  }
-
-  public static URL checkImportExistence(String candidate, String extension,
-          ClassLoader classloader) throws IOException {
-    String p = candidate.replaceAll("[.]", "/");
-    p += "." + extension;
-    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(
-            classloader);
-    String prefix = "classpath*:";
-    String pattern = prefix + p;
-    Resource[] resources = resolver.getResources(pattern);
-    if(resources == null || resources.length == 0) {
-      return null;
-    } else {
-      Resource resource = resources[0];
-      URL url = resource.getURL();
-      return url;
-    }
-  }
-
-  
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaEngineAndCallChecker.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaEngineAndCallChecker.java
deleted file mode 100644
index 19f75b9..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaEngineAndCallChecker.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*

- * 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.ruta.ide.validator;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.MalformedURLException;

-import java.net.URL;

-import java.net.URLClassLoader;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.Set;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.apache.uima.ruta.ide.launching.RutaLaunchConfigurationDelegate;

-import org.apache.uima.ruta.ide.parser.ast.RutaAction;

-import org.apache.uima.ruta.ide.parser.ast.RutaActionConstants;

-import org.apache.uima.ruta.ide.parser.ast.RutaImportStatement;

-import org.apache.uima.ruta.ide.parser.ast.RutaStatementConstants;

-import org.apache.uima.util.InvalidXMLException;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.declarations.TypeDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.compiler.problem.IProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.core.builder.IBuildContext;

-import org.eclipse.dltk.core.builder.IBuildParticipant;

-import org.eclipse.dltk.core.builder.IBuildParticipantExtension;

-import org.eclipse.dltk.core.builder.ISourceLineTracker;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaEngineAndCallChecker implements IBuildParticipant, IBuildParticipantExtension {

-

-  private class EngineAndCallCheckerVisitor extends ASTVisitor {

-    private IProblemReporter rep;

-

-    private RutaCheckerProblemFactory problemFactory;

-

-    private Set<String> engines;

-

-    private Set<String> scripts;

-

-    private HashSet<String> scriptsInnerBlocks;

-

-    private URLClassLoader classloader;

-

-    public EngineAndCallCheckerVisitor(IProblemReporter rep, ISourceLineTracker linetracker,

-            String curFile) {

-      this.problemFactory = new RutaCheckerProblemFactory(curFile, linetracker);

-      this.rep = rep;

-      this.engines = new HashSet<String>();

-      this.scripts = new HashSet<String>();

-      this.scriptsInnerBlocks = new HashSet<String>();

-

-      if (curFile != null && curFile.endsWith(".ruta")) {

-        scripts.add(curFile.substring(0, curFile.length() - 5));

-        try {

-          String fnwe = curFile.substring(0, curFile.length() - 5);

-          scriptsInnerBlocks.addAll(RutaCheckerUtils

-                  .importScript(fnwe, IModelElement.METHOD, project));

-        } catch (InvalidXMLException e) {

-        } catch (IOException e) {

-        } catch (ModelException e) {

-        } catch (CoreException e) {

-        }

-      }

-      // IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

-      // boolean noVM = preferenceStore.getBoolean(RutaCorePreferences.NO_VM_IN_DEV_MODE);

-      // if (!(noVM && Platform.inDevelopmentMode())) {

-        try {

-          Collection<String> dependencies = RutaLaunchConfigurationDelegate.getClassPath(project);

-          URL[] urls = new URL[dependencies.size()];

-          int counter = 0;

-          for (String dep : dependencies) {

-            urls[counter] = new File(dep).toURI().toURL();

-            counter++;

-          }

-          classloader = new URLClassLoader(urls);

-        } catch (CoreException e) {

-          RutaIdeUIPlugin.error(e);

-        } catch (MalformedURLException e) {

-          RutaIdeUIPlugin.error(e);

-        }

-//      }

-

-    }

-

-    @Override

-    public boolean visit(Statement s) throws Exception {

-      if (s instanceof RutaImportStatement) {

-        // handle engine imports

-        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_ENGINE) {

-          SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();

-          if (RutaCheckerUtils.checkEngineImport(sRef.getName(), project)) {

-            importEngine(sRef.getName());

-          } else {

-            IProblem problem = problemFactory.createFileNotFoundProblem(sRef);

-            rep.reportProblem(problem);

-          }

-        }

-        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_UIMAFIT_ENGINE) {

-          SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();

-          if (RutaCheckerUtils.checkEngineOnClasspath(sRef.getName(), project, classloader)) {

-            importEngine(sRef.getName());

-          } else {

-            IProblem problem = problemFactory.createFileNotFoundProblem(sRef);

-            rep.reportProblem(problem);

-          }

-        }

-        // handle script imports

-        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_SCRIPT) {

-          SimpleReference stRef = (SimpleReference) ((RutaImportStatement) s).getExpression();

-          String sRefName = stRef.getName();

-          try {

-            Set<String> blocks = RutaCheckerUtils.importScript(sRefName, IModelElement.METHOD,

-                    project);

-            scripts.add(sRefName);

-            if (!blocks.isEmpty()) {

-              scriptsInnerBlocks.addAll(blocks);

-            }

-          } catch (Exception e) {

-          }

-        }

-        return false;

-      }

-      return true;

-    }

-

-    private void importEngine(String name) {

-      engines.add(name);

-      int i = name.lastIndexOf('.');

-      if (i > 1) {

-        // TODO emit errors for doublettes (names in scripts and

-        // engines)

-        String lastPart = name.substring(i + 1);

-        if (lastPart != null && lastPart.length() != 0) {

-          engines.add(lastPart);

-        }

-      }

-    }

-

-    @Override

-    public boolean visit(Expression s) throws Exception {

-      if (s instanceof RutaAction) {

-        RutaAction action = (RutaAction) s;

-        if (action.getKind() == RutaActionConstants.A_CALL || action.getKind() == RutaActionConstants.A_EXEC) {

-          // TODO see antlr grammar: no viable child defined!

-          if (action.getChilds().size() > 0) {

-            SimpleReference ref = (SimpleReference) action.getChilds().get(0);

-            if (ref != null && !engines.contains(ref.getName())) {

-              String required = ref.getName();

-              for (String script : scripts) {

-                // check direct script-call

-                boolean a = script.endsWith(required);

-                if (a) {

-                  return false;

-                }

-              }

-              for (String block : scriptsInnerBlocks) {

-                boolean b = block.equals(required);

-                if (b) {

-                  return false;

-                }

-              }

-              IProblem problem = problemFactory.createFileNotFoundProblem(ref);

-              rep.reportProblem(problem);

-            }

-          }

-          return false;

-        }

-        return true;

-      }

-      return true;

-    }

-

-    @Override

-    public boolean visit(MethodDeclaration s) throws Exception {

-      return true;

-    }

-

-    @Override

-    public boolean visit(TypeDeclaration s) throws Exception {

-      return false;

-    }

-  }

-

-  public RutaEngineAndCallChecker(IScriptProject project) throws CoreException {

-    this.project = project;

-  }

-

-  private IScriptProject project;

-

-  public boolean beginBuild(int buildType) {

-    return true;

-  }

-

-  public void endBuild(IProgressMonitor monitor) {

-  }

-

-  public void build(IBuildContext context) throws CoreException {

-    // getAST:

-    Object mdObj = context.get(IBuildContext.ATTR_MODULE_DECLARATION);

-    if (!(mdObj instanceof ModuleDeclaration)) {

-      return;

-    }

-    ModuleDeclaration md = (ModuleDeclaration) mdObj;

-    IProblemReporter problemReporter = context.getProblemReporter();

-    ISourceModule smod = context.getSourceModule();

-

-    // traverse:

-    ISourceLineTracker linetracker = context.getLineTracker();

-    String fileName = smod.getElementName();

-    try {

-      ASTVisitor visitor = new EngineAndCallCheckerVisitor(problemReporter, linetracker, fileName);

-      md.traverse(visitor);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaLanguageChecker.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaLanguageChecker.java
deleted file mode 100644
index 432dd9a..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaLanguageChecker.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import java.io.File;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collection;
-
-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-import org.eclipse.dltk.core.ISourceModule;
-import org.eclipse.dltk.core.builder.IBuildContext;
-import org.eclipse.dltk.core.builder.IBuildParticipant;
-import org.eclipse.dltk.core.builder.IBuildParticipantExtension;
-import org.eclipse.dltk.core.builder.ISourceLineTracker;
-
-public class RutaLanguageChecker implements IBuildParticipant, IBuildParticipantExtension {
-
-  public boolean beginBuild(int buildType) {
-    return true;
-  }
-
-  public void endBuild(IProgressMonitor monitor) {
-  }
-
-  public void build(IBuildContext context) throws CoreException {
-    Object mdObj = context.get(IBuildContext.ATTR_MODULE_DECLARATION);
-    if (!(mdObj instanceof ModuleDeclaration)) {
-      return;
-    }
-    ModuleDeclaration md = (ModuleDeclaration) mdObj;
-
-    IProblemReporter problemReporter = context.getProblemReporter();
-    ISourceModule smod = context.getSourceModule();
-    ISourceLineTracker linetracker = context.getLineTracker();
-    try {
-      Collection<String> dependencies = RutaProjectUtils.getClassPath(smod.getScriptProject()
-              .getProject());
-      URL[] urls = new URL[dependencies.size()];
-      int counter = 0;
-      for (String dep : dependencies) {
-        urls[counter] = new File(dep).toURI().toURL();
-        counter++;
-      }
-      ClassLoader classloader = new URLClassLoader(urls);
-      ASTVisitor visitor = new LanguageCheckerVisitor(problemReporter, linetracker, smod,
-              classloader);
-      md.traverse(visitor);
-//      XMLOutputVisitor xmlVisitor = new XMLOutputVisitor(smod.getSource());
-//      md.traverse(xmlVisitor);
-//      String xml = xmlVisitor.getXML();
-//      FileUtils.saveString2File(xml, new File("D:/"+ smod.getElementName() + ".xml"));
-    } catch (Exception e) {
-      RutaIdeUIPlugin.error(e);
-    }
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaProblemIdentifier.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaProblemIdentifier.java
deleted file mode 100644
index 3fc56b9..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaProblemIdentifier.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * 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.ruta.ide.validator;

-

-import org.apache.uima.ruta.ide.RutaIdeUIPlugin;

-import org.eclipse.dltk.compiler.problem.IProblemIdentifier;

-

-public enum RutaProblemIdentifier implements IProblemIdentifier {

-

-  PROBLEM;

-

-  public String contributor() {

-    return RutaIdeUIPlugin.PLUGIN_ID;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaProjectChecker.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaProjectChecker.java
deleted file mode 100644
index f737beb..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaProjectChecker.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
-import org.eclipse.dltk.compiler.problem.IProblem;
-import org.eclipse.dltk.compiler.problem.IProblemReporter;
-import org.eclipse.dltk.core.IScriptProject;
-import org.eclipse.dltk.core.ISourceModule;
-import org.eclipse.dltk.core.builder.IBuildContext;
-import org.eclipse.dltk.core.builder.IBuildParticipant;
-import org.eclipse.dltk.core.builder.IBuildParticipantExtension;
-import org.eclipse.dltk.core.builder.ISourceLineTracker;
-
-/**
- * Validator for the complete Ruta project, e.g., checks whether the referenced projects are open.
- *
- */
-public class RutaProjectChecker implements IBuildParticipant, IBuildParticipantExtension {
-
-  public boolean beginBuild(int buildType) {
-    return true;
-  }
-
-  public void endBuild(IProgressMonitor monitor) {
-  }
-
-  public void build(IBuildContext context) throws CoreException {
-    Object mdObj = context.get(IBuildContext.ATTR_MODULE_DECLARATION);
-    if (!(mdObj instanceof ModuleDeclaration)) {
-      return;
-    }
-    IProblemReporter problemReporter = context.getProblemReporter();
-    ISourceModule smod = context.getSourceModule();
-    ISourceLineTracker linetracker = context.getLineTracker();
-    RutaCheckerProblemFactory problemFactory = new RutaCheckerProblemFactory(smod.getElementName(), linetracker);
-    
-    IScriptProject scriptProject = smod.getScriptProject();
-    IProject project = scriptProject.getProject();
-    IProject[] referencedProjects = project.getReferencedProjects();
-    List<IProject> listOfClosedProjects = new ArrayList<IProject>();
-    for (IProject each : referencedProjects) {
-      if(!each.isOpen()) {
-        listOfClosedProjects.add(each);
-      }
-    }
-    
-    if(!listOfClosedProjects.isEmpty()) {
-      IProblem problem = problemFactory.createClosedProjectsProblem(listOfClosedProjects);
-      problemReporter.reportProblem(problem);
-    }
-    
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/XMLOutputVisitor.java b/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/XMLOutputVisitor.java
deleted file mode 100644
index 5f6ea42..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/XMLOutputVisitor.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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.ruta.ide.validator;
-
-import org.apache.uima.ruta.ide.parser.ast.ComponentDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.ComposedRuleElement;
-import org.apache.uima.ruta.ide.parser.ast.FeatureMatchExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;
-import org.apache.uima.ruta.ide.parser.ast.RutaPackageDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaQuantifierLiteralExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaRule;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.NumericLiteral;
-import org.eclipse.dltk.ast.expressions.StringLiteral;
-import org.eclipse.dltk.ast.references.SimpleReference;
-
-public class XMLOutputVisitor extends ASTVisitor {
-
-  private String document;
-
-  public XMLOutputVisitor(String document) {
-    super();
-    this.document = document;
-  }
-
-  private StringBuilder sb = new StringBuilder();
-
-  public boolean visitGeneral(ASTNode node) throws Exception {
-    if (node instanceof RutaRule) {
-      sb.append("<!-- " + document.substring(node.sourceStart(), node.sourceEnd()) + "-->\n");
-    }
-    sb.append("<");
-    sb.append(node.getClass().getSimpleName());
-    addAttributes(node);
-    sb.append(">");
-    sb.append("\n");
-    return true;
-  }
-
-  private void addAttributes(ASTNode node) {
-
-    if (node instanceof RutaQuantifierLiteralExpression) {
-      RutaQuantifierLiteralExpression s = (RutaQuantifierLiteralExpression) node;
-      sb.append(" value='");
-      sb.append(s.getOperator());
-      sb.append("'");
-    }
-
-    if (node instanceof ComposedRuleElement) {
-      ComposedRuleElement s = (ComposedRuleElement) node;
-      Boolean disjunctive = s.isDisjunctive();
-      if(disjunctive != null) {
-        sb.append(" value='");
-        if(disjunctive) {
-          sb.append("Disjunctive");
-        } else {
-          sb.append("Conjunctive");
-        }
-        sb.append("'");
-      }
-    }
-
-    
-    if (node instanceof FeatureMatchExpression) {
-      FeatureMatchExpression s = (FeatureMatchExpression) node;
-      sb.append(" feature='");
-      sb.append(s.getFeature().getText());
-      sb.append("'");
-      if (s.getComparator() != null) {
-        sb.append(" comparator='");
-        sb.append(s.getComparator().getText());
-        sb.append("'");
-      }
-    }
-
-    if (node instanceof SimpleReference) {
-      SimpleReference s = (SimpleReference) node;
-      sb.append(" value='");
-      sb.append(s.getStringRepresentation());
-      sb.append("'");
-    }
-    if (node instanceof RutaPackageDeclaration) {
-
-    }
-    if (node instanceof ComponentDeclaration) {
-      ComponentDeclaration s = (ComponentDeclaration) node;
-      sb.append(" type='");
-      sb.append(s.getType());
-      sb.append("'");
-    }
-    if (node instanceof RutaVariableReference) {
-      RutaVariableReference s = (RutaVariableReference) node;
-      sb.append(" type='");
-      sb.append(s.getType());
-      sb.append("'");
-    }
-    if (node instanceof RutaAction) {
-      RutaAction s = (RutaAction) node;
-      sb.append(" type='");
-      sb.append(s.getName());
-      sb.append("'");
-    }
-    if (node instanceof RutaCondition) {
-      RutaCondition s = (RutaCondition) node;
-      sb.append(" type='");
-      sb.append(s.getName());
-      sb.append("'");
-    }
-    if (node instanceof StringLiteral) {
-      StringLiteral s = (StringLiteral) node;
-      sb.append(" value='");
-      sb.append(s.getValue());
-      sb.append("'");
-    }
-    if (node instanceof NumericLiteral) {
-      NumericLiteral s = (NumericLiteral) node;
-      sb.append(" value='");
-      sb.append(s.getValue());
-      sb.append("'");
-    }
-
-  }
-
-  public void endvisitGeneral(ASTNode node) throws Exception {
-    sb.append("</");
-    sb.append(node.getClass().getSimpleName());
-    sb.append(">");
-    sb.append("\n");
-  }
-
-  public String getXML() {
-    return sb.toString();
-  }
-
-}
diff --git a/trunk/ruta-ep-ide-ui/src/main/readme_bin/LICENSE b/trunk/ruta-ep-ide-ui/src/main/readme_bin/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/readme_bin/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/readme_src/META-INF/LICENSE b/trunk/ruta-ep-ide-ui/src/main/readme_src/META-INF/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/readme_src/META-INF/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debug/ui/messages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debug/ui/messages.properties
deleted file mode 100644
index 77845e8..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debug/ui/messages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-NoDebuggingEngine_title = Debugging engine not configured

-NoDebuggingEngine_message = Debugging engine not configured. Do you want to configure debugging engine now? You should start debug again after configuration. 

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferenceMessages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferenceMessages.properties
deleted file mode 100644
index cf41ccf..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debug/ui/preferences/RutaDebugPreferenceMessages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-RutaDebugPreferencePage_description = General settings for Ruta debugging

-RutaDebugEnginePreferencePage_description = Ruta Debugging Engine Selection

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debugger/preferences/PreferenceMessages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debugger/preferences/PreferenceMessages.properties
deleted file mode 100644
index 31edfdd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/debugger/preferences/PreferenceMessages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-PreferencesDescription = Ruta debugging engine settings.

-NoSettingsAvailable = There are no settings now.

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/bak_formatPreviewScript.ruta b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/bak_formatPreviewScript.ruta
deleted file mode 100644
index 32536ca..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/bak_formatPreviewScript.ruta
+++ /dev/null
@@ -1,55 +0,0 @@
-PACKAGE org.apache.uima;
-
-SCRIPT org.apache.uima.DashTree;
-SCRIPT org.apache.uima.DashTreeError;
-SCRIPT org.apache.uima.BuildTree;
-TYPESYSTEM org.apache.uima.TerminologyTypeSystem;
-
-Document(CALL,DashTree);
- 
-DECLARE link;
-entryContent curlyBracketsOpen inCurlyBrackets{-PARTOF,link}(MARK,link,3) curlyBracketsClose;
-
-Document(RETAINTYPE);
-
-// *** error handling ***
-Document(CALL,DashTreeError);
-// *** end of error handling ***
-
-// *** statistics ***
-INT count;
-Document{TOTALCOUNT,error,1,1000000,count}
-    (LOG,"Longmenu.txt: Es wurde(n) "+(count)+" Fehler gefunden!");
-Document{TOTALCOUNT,rootRow,1,1000000,count}
-    (LOG,"Longmenu.txt: Es wurde(n) "+(count)+" Wurzel-Elemente gefunden.");
-Document{TOTALCOUNT,childRow,1,1000000,count}
-    (LOG,"Longmenu.txt: Es wurde(n) "+(count)+" Kind-Elemente gefunden.");
-// *** end of statistics ***
-
-INT id;
-
-ACTION IncID = (ASSIGN,id,id+1);
-
-
-BLOCK(ChildRows) childRow {
-    childRow[1,9](ASSIGN,id,1+id;
-        CREATE,Term,
-        "Text" = entryContent,
-        "Info" = link,
-        "Id" = "A" + (id),
-        "TermType" = "answer");
-}
-
-BLOCK(RootRow) rootRow {
-    rootRow(ASSIGN,id,1+id;
-        CREATE,Term,
-        "Text" = entryContent,
-        "Info" = link,
-        "Id" = "A" + (id),
-        "TermType" = "answer");
-}
-
-Term{PARTOF,rootRow}(TRANSFER,Root);
-
-Term{PARTOF,rootRow}(MARK,SubTree,1,2) Term+{-PARTOF,rootRow};
-Document(CALL,BuildTree.BuildDashTree);
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/formatPreviewScript.ruta b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/formatPreviewScript.ruta
deleted file mode 100644
index 88c8fe1..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/formatPreviewScript.ruta
+++ /dev/null
@@ -1,25 +0,0 @@
-PACKAGE org.apache.uima;
-
-SCRIPT org.apache.uima.DashTree;
-SCRIPT org.apache.uima.DashTreeError;
-SCRIPT org.apache.uima.BuildTree;
-TYPESYSTEM org.apache.uima.TerminologyTypeSystem;
-
-Document{->CALL(DashTree)}; 
-DECLARE link1, link2, link3, link4;
-link1{PARTOF(link2)->MARK(link,3)};
-
-// *** error handling ***
-Document{->CALL(DashTreeError)};
-// *** end of error handling ***
-
-// *** blocks ***
-DECLARE childRow, Doc2;
-INT id;
-BOOLEAN b = false;
-
-BLOCK(ChildRows)childRow{}{childRow[1,9]{IF(b)->ASSIGN(id,1+id), ASSIGN(b,true)};Doc2{->MARK(childRow)};}
-
-// *** statistics ***
-INT count;
-Document{TOTALCOUNT(error,1,1000000,count)->LOG,"Longmenu.txt: Es wurde(n) "+(count)+" Fehler gefunden!")};
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/messages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/messages.properties
deleted file mode 100644
index 6631cb7..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/messages.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# ***************************************************************
-#  * 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.
-# ***************************************************************
-
-RutaFormatter_contentCorrupted=Content corrupted in formatter
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/bak_indentation-preview.ruta b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/bak_indentation-preview.ruta
deleted file mode 100644
index 8f35ff2..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/bak_indentation-preview.ruta
+++ /dev/null
@@ -1,60 +0,0 @@
-PACKAGE org.apache.uima;
-
-SCRIPT org.apache.uima.DashTree;
-SCRIPT org.apache.uima.DashTreeError;
-SCRIPT org.apache.uima.BuildTree;
-TYPESYSTEM org.apache.uima.TerminologyTypeSystem;
-
-Document(CALL,DashTree);
- 
-DECLARE link;
-entryContent curlyBracketsOpen inCurlyBrackets{-PARTOF,link}(MARK,link,3) curlyBracketsClose;
-
-Document(RETAINTYPE);
-
-// *** error handling ***
-Document(CALL,DashTreeError);
-// *** end of error handling ***
-
-// *** statistics ***
-INT count;
-Document{TOTALCOUNT,error,1,1000000,count}
-    (LOG,"Longmenu.txt: Es wurde(n) "+(count)+" Fehler gefunden!");
-Document{TOTALCOUNT,rootRow,1,1000000,count}
-    (LOG,"Longmenu.txt: Es wurde(n) "+(count)+" Wurzel-Elemente gefunden.");
-Document{TOTALCOUNT,childRow,1,1000000,count}
-    (LOG,"Longmenu.txt: Es wurde(n) "+(count)+" Kind-Elemente gefunden.");
-// *** end of statistics ***
-
-INT id;
-
-ACTION IncID = (ASSIGN,id,id+1);
-
-
-BLOCK(ChildRows) childRow {
-    childRow[1,9](ASSIGN,id,1+id;
-        CREATE,Term,
-        "Text" = entryContent,
-        "Info" = link,
-        "Id" = "A" + (id),
-        "TermType" = "answer");
-}
-
-BLOCK(RootRow) rootRow {
-    rootRow(ASSIGN,id,1+id;
-        CREATE,Term,
-        "Text" = entryContent,
-        "Info" = link,
-        "Id" = "A" + (id),
-        "TermType" = "answer");
-}
-
-Term{PARTOF,rootRow}(TRANSFER,Root);
-
-Term{PARTOF,rootRow}(MARK,SubTree,1,2) Term+{-PARTOF,rootRow};
-Document(CALL,BuildTree.BuildDashTree);
-
-
-
-
-
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/blank-lines-preview.ruta b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/blank-lines-preview.ruta
deleted file mode 100644
index 6a85b3d..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/blank-lines-preview.ruta
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE childRow, Doc2, Doc3, Doc4, Doc5;
-INT id;
-BOOLEAN b = false;
-
-BLOCK(ChildRows)childRow{}{childRow[1,9]{IF(b)->ASSIGN(id,1+id), ASSIGN(b,true)};Doc2{->MARK(childRow)};}
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/indentation-preview.ruta b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/indentation-preview.ruta
deleted file mode 100644
index c1c5c44..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/indentation-preview.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE childRow, Doc2, Doc3, Doc4, Doc5;
-INT id;
-BOOLEAN b = false;
-
-BLOCK(ChildRows)childRow{}{childRow[1,9]{IF(b)->ASSIGN(id,1+id), ASSIGN(b,true)};Doc2{->MARK(childRow)};}
-
-
-
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/messages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/messages.properties
deleted file mode 100644
index 2edcffd..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/messages.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-# ***************************************************************
-#  * 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.
-# ***************************************************************
-
-RutaFormatterModifyDialog_RutaFormatter=Ruta Formatter
-
-RutaFormatterModifyDialog_indentation=Indentation
-RutaFormatterIndentationTabPage_statementsWithinBlockBody=Statements within Blocks
-RutaFormatterIndentationTabPage_assignmentsWithinCreateAction=Feature assignments within CREATE actions
-RutaFormatterIndentationTabPage_generalSettings=General Settings
-RutaFormatterIndentationTabPage_indentationCharacter=Indentation character
-RutaFormatterIndentationTabPage_indentationSize=Indentation size
-RutaFormatterIndentationTabPage_indentWithinBlocks=Indent within Blocks
-RutaFormatterIndentationTabPage_indentWithinCreateActions=Indent within CREATE actions
-RutaFormatterIndentationTabPage_tabSize=Tab size
-
-RutaFormatterModifyDialog_blankLines=Blank Lines
-RutaFormatterBlankLinesPage_blankLinesBeforeDeclarations=Declarations
-RutaFormatterBlankLinesPage_beforeDeclarations=Lines before long declarations
-RutaFormatterBlankLinesPage_numberOfEmptyLinesToPreserve=Number of empty lines to preserve
-
-RutaFormatterModifyDialog_lineWrapping=Line Wrapping
-RutaFormatterLineWrappingPage_generalWrapping=General
-RutaFormatterLineWrappingPage_maximumLineLenght=Maximum line length
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/wrapping-preview.ruta b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/wrapping-preview.ruta
deleted file mode 100644
index c1c5c44..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/formatter/preferences/wrapping-preview.ruta
+++ /dev/null
@@ -1,10 +0,0 @@
-PACKAGE org.apache.uima;
-
-DECLARE childRow, Doc2, Doc3, Doc4, Doc5;
-INT id;
-BOOLEAN b = false;
-
-BLOCK(ChildRows)childRow{}{childRow[1,9]{IF(b)->ASSIGN(id,1+id), ASSIGN(b,true)};Doc2{->MARK(childRow)};}
-
-
-
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/launching/builtins.ruta b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/launching/builtins.ruta
deleted file mode 100644
index 329be08..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/launching/builtins.ruta
+++ /dev/null
@@ -1 +0,0 @@
-PACKAGE org.apache.uima.ruta;
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/console/ConsoleMessages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/console/ConsoleMessages.properties
deleted file mode 100644
index a7ca394..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/console/ConsoleMessages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-RutaFileHyperlink_Information_1=Information

-RutaFileHyperlink_Error=Hyperlink Error

-RutaFileHyperlink_0=Invalid Line Number

-RutaFileHyperlink_1=\ is not a valid line number in 

-ScriptStackTraceConsoleFactory_0=Script Stack Trace Console

-ScriptStackTraceConsole_0=Paste stack traces into this console and follow hyperlinks to source code.

-RutaFileHyperlink_Source_not_found_for__0__2=Source not found for {0}

-RutaFileHyperlink_An_exception_occurred_while_following_link__3=An exception occurred while following link.

-RutaFileHyperlink_Unable_to_parse_type_name_from_hyperlink__5=Unable to parse file name from hyperlink.

-RutaFileHyperlink_Unable_to_parse_line_number_from_hyperlink__6=Unable to parse line number from hyperlink.

-RutaFileHyperlink_Unable_to_parse_line_number_from_hyperlink__7=Unable to parse line number from hyperlink.

-RutaFileHyperlink_Unable_to_retrieve_hyperlink_text__8=Unable to retrieve hyperlink text.

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Actions.html b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Actions.html
deleted file mode 100644
index ce5348a..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Actions.html
+++ /dev/null
@@ -1,1363 +0,0 @@
-<div class="section" title="2.8.1.&nbsp;ADD"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.add">2.8.1.&nbsp;ADD</h3></div></div></div>

-    

-    <p>

-      The ADD action adds all the elements of the passed

-      RutaExpressions to a given list. For example, this expressions

-      could be a string, an integer variable or a list. For a

-      complete overview on UIMA Ruta expressions see

-      <a class="xref" href="#ugr.tools.ruta.language.expressions" title="2.6.&nbsp;Expressions">Section&nbsp;2.6, &#8220;Expressions&#8221;</a>.

-    </p>

-    <div class="section" title="2.8.1.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1551">2.8.1.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">ADD(ListVariable,(RutaExpression)+)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.1.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1556">2.8.1.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;ADD(list, var)};</pre><p>

-      </p>

-      <p>

-        In this example, the variable 'var' is added to the list

-        'list'.

-      </p>

-    </div>

-  </div>

-  

-  <div class="section" title="2.8.2.&nbsp;ADDFILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.addfiltertype">2.8.2.&nbsp;ADDFILTERTYPE</h3></div></div></div>

-    

-    <p>

-      The ADDFILTERTYPE action adds its arguments to the list of filtered types, 

-      which restrict the visibility of the rules.

-    </p>

-    <div class="section" title="2.8.2.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1565">2.8.2.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">ADDFILTERTYPE(TypeExpression(,TypeExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.2.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1570">2.8.2.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;ADDFILTERTYPE(CW)};</pre><p>

-      </p>

-      <p>

-        After applying this rule, capitalized words are invisible additionally to the previously filtered types.

-      </p>

-    </div>

-  </div>

-  

-    <div class="section" title="2.8.3.&nbsp;ADDRETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.addretaintype">2.8.3.&nbsp;ADDRETAINTYPE</h3></div></div></div>

-    

-    <p>

-      The ADDFILTERTYPE action adds its arguments to the list of retained types, 

-      which extend the visibility of the rules.

-    </p>

-    <div class="section" title="2.8.3.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1579">2.8.3.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">ADDRETAINTYPE(TypeExpression(,TypeExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.3.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1584">2.8.3.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;ADDRETAINTYPE(MARKUP)};</pre><p>

-      </p>

-      <p>

-        After applying this rule, markup is visible additionally to the previously retained types.

-      </p>

-    </div>

-  </div>

-  

-  

-  <div class="section" title="2.8.4.&nbsp;ASSIGN"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.assign">2.8.4.&nbsp;ASSIGN</h3></div></div></div>

-    

-    <p>

-      The ASSIGN action assigns the value of the passed expression to

-      a variable of the same type.

-    </p>

-    <div class="section" title="2.8.4.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1593">2.8.4.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">ASSIGN(BooleanVariable,BooleanExpression)</pre><p>

-      </p>

-      <p>

-        </p><pre class="programlisting">ASSIGN(NumberVariable,NumberExpression)</pre><p>

-      </p>

-      <p>

-        </p><pre class="programlisting">ASSIGN(StringVariable,StringExpression)</pre><p>

-      </p>

-      <p>

-        </p><pre class="programlisting">ASSIGN(TypeVariable,TypeExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.4.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1604">2.8.4.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;ASSIGN(amount, (amount/2))};</pre><p>

-      </p>

-      <p>

-        In this example, the value of the variable 'amount' is divided in half.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.5.&nbsp;CALL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.call">2.8.5.&nbsp;CALL</h3></div></div></div>

-    

-    <p>

-      The CALL action initiates the execution of a different script

-      file or script block. Currently, only complete script files are

-      supported.

-    </p>

-    <div class="section" title="2.8.5.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1613">2.8.5.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CALL(DifferentFile)</pre><p>

-      </p>

-      <p>

-        </p><pre class="programlisting">CALL(Block)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.5.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1620">2.8.5.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;CALL(NamedEntities)};</pre><p>

-      </p>

-      <p>

-        Here, a script 'NamedEntities' for named entity recognition is

-        executed.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.6.&nbsp;CLEAR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.clear">2.8.6.&nbsp;CLEAR</h3></div></div></div>

-    

-    <p>

-      The CLEAR action removes all elements of the given list. If the list was initialized as it was declared, 

-      then it is reset to its initial value.

-    </p>

-    <div class="section" title="2.8.6.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1629">2.8.6.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CLEAR(ListVariable)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.6.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1634">2.8.6.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;CLEAR(SomeList)};</pre><p>

-      </p>

-      <p>

-        This rule clears the list 'SomeList'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.7.&nbsp;COLOR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.color">2.8.7.&nbsp;COLOR</h3></div></div></div>

-    

-    <p>

-      The COLOR action sets the color of an annotation type in the

-      modified view, if the rule has fired. The background color is passed as

-      the second parameter. The font color can be changed by passing a

-      further color as a third parameter. The supported colors are: black, silver, gray,

-      white, maroon, red, purple, fuchsia, green, lime, olive, yellow,

-      navy, blue, aqua, lightblue, lightgreen, orange, pink, salmon, cyan,

-      violet, tan, brown, white and mediumpurple.

-    </p>

-    <div class="section" title="2.8.7.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1643">2.8.7.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">COLOR(TypeExpression,StringExpression(, StringExpression

-          (, BooleanExpression)?)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.7.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1648">2.8.7.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;COLOR(Headline, "red", "green", true)};</pre><p>

-      </p>

-      <p>

-        This rule colors all Headline annotations in the modified view.

-        Thereby, the background color is set to red, font color is set to green

-        and all 'Headline' annotations are selected when opening the

-        modified view.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.8.&nbsp;CONFIGURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.configure">2.8.8.&nbsp;CONFIGURE</h3></div></div></div>

-    

-    <p>

-      The CONFIGURE action can be used to configure the analysis

-      engine of the given namespace (first parameter). The parameters that

-      should be configured with corresponding values are passed as

-      name-value

-      pairs.

-    </p>

-    <div class="section" title="2.8.8.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1657">2.8.8.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CONFIGURE(AnalysisEngine(,StringExpression = Expression)+)</pre><p>

-      </p>

-    </div>

-     <div class="section" title="2.8.8.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1662">2.8.8.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">ENGINE utils.HtmlAnnotator;

-Document{-&gt;CONFIGURE(HtmlAnnotator, "onlyContent" = false)};</pre><p>

-      </p>

-      <p>

-        The former rule changes the value of configuration parameter <span class="quote">&#8220;<span class="quote">onlyContent</span>&#8221;</span>

-        to false and reconfigure the analysis engine.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.9.&nbsp;CREATE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.create">2.8.9.&nbsp;CREATE</h3></div></div></div>

-    

-    <p>

-      The CREATE action is similar to the MARK action. It also

-      annotates the matched text fragments with a type annotation, but

-      additionally assigns values to a chosen subset of the type's feature

-      elements.

-    </p>

-    <div class="section" title="2.8.9.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1672">2.8.9.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CREATE(TypeExpression(,NumberExpression)*

-                         (,StringExpression = Expression)+)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.9.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1677">2.8.9.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{COUNT(ANY,0,10000,cnt)-&gt;CREATE(Headline,"size" = cnt)};</pre><p>

-      </p>

-      <p>

-        This rule counts the number of tokens of type ANY in a

-        Paragraph annotation and assigns the counted value to the int

-        variable 'cnt'. If the counted number is between 0 and 10000, a

-        Headline annotation is created for this Paragraph. Moreover, the

-        feature named 'size' of Headline is set to the value of 'cnt'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.10.&nbsp;DEL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.del">2.8.10.&nbsp;DEL</h3></div></div></div>

-    

-    <p>

-      The DEL action deletes the matched text fragments in the

-      modified

-      view.

-    </p>

-    <div class="section" title="2.8.10.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1686">2.8.10.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">DEL</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.10.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1691">2.8.10.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Name{-&gt;DEL};</pre><p>

-      </p>

-      <p>

-        This rule deletes all text fragments that are annotated with a

-        Name annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.11.&nbsp;DYNAMICANCHORING"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.dynamicanchoring">2.8.11.&nbsp;DYNAMICANCHORING</h3></div></div></div>

-    

-    <p>

-      The DYNAMICANCHORING action turns dynamic anchoring on or off

-      (first parameter) and assigns the anchoring parameters penalty

-      (second parameter) and factor (third parameter).

-    </p>

-    <div class="section" title="2.8.11.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1700">2.8.11.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">DYNAMICANCHORING(BooleanExpression

-              (,NumberExpression(,NumberExpression)?)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.11.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1705">2.8.11.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;DYNAMICANCHORING(true)};</pre><p>

-      </p>

-      <p>

-        The above mentioned example activates dynamic anchoring.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.12.&nbsp;EXEC"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.exec">2.8.12.&nbsp;EXEC</h3></div></div></div>

-    

-    <p>

-      The EXEC action initiates the execution of a different script

-      file or analysis engine on the complete input document, independent from

-      the matched text and the current filtering settings. If the imported component (DifferentFile)

-      refers to another script file, it is applied on a new representation of the document:

-      the complete text of the original CAS with the default filtering

-      settings of the UIMA Ruta analysis engine. If it refers to an 

-      external analysis engine, then it is applied on the complete document. 

-      The optional, first argument is is a string expression, which specifies the view the component should be applied on.

-      The optional, third argument is a list of types, which should be reindexed by Ruta (not UIMA itself).

-    </p>

-    <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>

-    <p>

-      Annotations created by the external analysis engine are not accessible for UIMA Ruta rules in the same script. 

-      The types of these annotations need to be provided in the second argument in order to be visible to the Ruta rules.

-    </p>

-    </div>

-    <div class="section" title="2.8.12.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1716">2.8.12.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">EXEC((StringExpression,)? DifferentFile(, TypeListExpression)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.12.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1721">2.8.12.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">ENGINE NamedEntities;

-Document{-&gt;EXEC(NamedEntities, {Person, Location})};</pre><p>

-      </p>

-      <p>

-        Here, an analysis engine for named entity recognition is

-        executed once on the complete document and the annotations of the types Person and Location (and all subtypes) 

-        are reindexed in UIMA Ruta. Without this list of types, the annotations are added to the CAS, but cannot be accessed by Ruta rules.

-      </p>

-    </div>

-  </div>

-  <div class="section" title="2.8.13.&nbsp;FILL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.fill">2.8.13.&nbsp;FILL</h3></div></div></div>

-    

-    <p>

-      The FILL action fills a chosen subset of the given type's

-      feature elements.

-    </p>

-    <div class="section" title="2.8.13.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1730">2.8.13.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">FILL(TypeExpression(,StringExpression = Expression)+)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.13.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1735">2.8.13.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Headline{COUNT(ANY,0,10000,tokenCount)

-          -&gt;FILL(Headline,"size" = tokenCount)};</pre><p>

-      </p>

-      <p>

-        Here, the number of tokens within an Headline annotation is

-        counted and stored in variable 'tokenCount'. If the number of tokens

-        is within the interval [0;10000], the FILL action fills the

-        Headline's feature 'size' with the value of 'tokenCount'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.14.&nbsp;FILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.filtertype">2.8.14.&nbsp;FILTERTYPE</h3></div></div></div>

-    

-    <p>

-      This action filters the given types of annotations. They are now

-      ignored by rules. Expressions are not yet supported. 

-      This action is related to RETAINTYPE (see <a class="xref" href="#ugr.tools.ruta.language.actions.retaintype" title="2.8.34.&nbsp;RETAINTYPE">Section&nbsp;2.8.34, &#8220;RETAINTYPE&#8221;</a>).

-    </p>

-    <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>    

-      <p>

-        The visibility of types is calculated using three lists: 

-        A list <span class="quote">&#8220;<span class="quote">default</span>&#8221;</span> for the initially filtered types, 

-        which is specified in the configuration parameters of the analysis engine, the list <span class="quote">&#8220;<span class="quote">filtered</span>&#8221;</span>, which is 

-        specified by the FILTERTYPE action, and the list <span class="quote">&#8220;<span class="quote">retained</span>&#8221;</span>, which is specified by the RETAINTYPE action.

-        For determining the actual visibility of types, list <span class="quote">&#8220;<span class="quote">filtered</span>&#8221;</span> is added to list <span class="quote">&#8220;<span class="quote">default</span>&#8221;</span> 

-        and then all elements of list <span class="quote">&#8220;<span class="quote">retained</span>&#8221;</span> are removed. The annotations of the types in the resulting list are not visible.

-        Please note that the actions FILTERTYPE and RETAINTYPE replace all elements of the respective lists and that RETAINTYPE 

-        overrides FILTERTYPE.

-      </p>

-    </div>

-    <div class="section" title="2.8.14.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1753">2.8.14.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">FILTERTYPE((TypeExpression(,TypeExpression)*))?</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.14.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1758">2.8.14.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;FILTERTYPE(SW)};</pre><p>

-      </p>

-      <p>

-        This rule filters all small written words in the input

-        document. They are further ignored by every rule.

-      </p>

-      <p>

-        </p><pre class="programlisting">Document{-&gt;FILTERTYPE};</pre><p>

-      </p>

-      <p>

-        Here, the the action (without parentheses) specifies that no additional types should be filtered.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.15.&nbsp;GATHER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.gather">2.8.15.&nbsp;GATHER</h3></div></div></div>

-    

-    <p>

-      This action creates a complex structure: an annotation with

-      features. The optionally passed indexes (NumberExpressions after the

-      TypeExpression) can be used to create an annotation that spans the

-      matched information of several rule elements. The features are

-      collected using the indexes of the rule elements of the complete

-      rule.

-    </p>

-    <div class="section" title="2.8.15.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1770">2.8.15.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">GATHER(TypeExpression(,NumberExpression)*

-          (,StringExpression = NumberExpression)+)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.15.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1775">2.8.15.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">DECLARE Annotation A;

-DECLARE Annotation B;

-DECLARE Annotation C(Annotation a, Annotation b);

-W{REGEXP("A")-&gt;MARK(A)};

-W{REGEXP("B")-&gt;MARK(B)};

-A B{-&gt; GATHER(C, 1, 2, "a" = 1, "b" = 2)};</pre><p>

-      </p>

-      <p>

-        Two annotations A and B are declared and annotated. The last

-        rule creates an annotation C spanning the elements A (index 1 since

-        it is the first rule element) and B (index 2) with its features 'a'

-        set to annotation A (again index 1) and 'b' set to annotation B

-        (again index 2).

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.16.&nbsp;GET"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.get">2.8.16.&nbsp;GET</h3></div></div></div>

-    

-    <p>

-      The GET action retrieves an element of the given list dependent on a

-      given strategy.

-      </p><div class="table"><a name="d5e1784"></a><p class="title"><b>Table&nbsp;2.3.&nbsp;Currently supported strategies</b></p><div class="table-contents">

-        

-        <table summary="Currently supported strategies" style="border-collapse: collapse;border-top: 0.5pt solid black; border-bottom: 0.5pt solid black; border-left: 0.5pt solid black; border-right: 0.5pt solid black; "><colgroup><col><col></colgroup><thead><tr><th style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; " align="left">Strategy</th><th style="border-bottom: 0.5pt solid black; " align="left">Functionality</th></tr></thead><tbody><tr><td style="border-right: 0.5pt solid black; " align="left">dominant</td><td style="" align="left">finds the most occurring element</td></tr></tbody></table>

-      </div></div><p><br class="table-break">

-    </p>

-    <div class="section" title="2.8.16.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1795">2.8.16.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">GET(ListExpression, Variable, StringExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.16.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1800">2.8.16.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;GET(list, var, "dominant")};</pre><p>

-      </p>

-      <p>

-        In this example, the element of the list 'list' that occurs

-        most is stored in the variable 'var'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.17.&nbsp;GETFEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.getfeature">2.8.17.&nbsp;GETFEATURE</h3></div></div></div>

-    

-    <p>

-      The GETFEATURE action stores the value of the matched

-      annotation's feature (first paramter) in the given variable (second

-      parameter).

-    </p>

-    <div class="section" title="2.8.17.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1809">2.8.17.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">GETFEATURE(StringExpression, Variable)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.17.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1814">2.8.17.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;GETFEATURE("language", stringVar)};</pre><p>

-      </p>

-      <p>

-        In this example, variable 'stringVar' will contain the value of

-        the feature 'language'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.18.&nbsp;GETLIST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.getlist">2.8.18.&nbsp;GETLIST</h3></div></div></div>

-    

-    <p>

-      This action retrieves a list of types dependent on a given strategy.

-      </p><div class="table"><a name="d5e1823"></a><p class="title"><b>Table&nbsp;2.4.&nbsp;Currently supported strategies</b></p><div class="table-contents">

-        

-        <table summary="Currently supported strategies" style="border-collapse: collapse;border-top: 0.5pt solid black; border-bottom: 0.5pt solid black; border-left: 0.5pt solid black; border-right: 0.5pt solid black; "><colgroup><col><col></colgroup><thead><tr><th style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; " align="left">Strategy</th><th style="border-bottom: 0.5pt solid black; " align="left">Functionality</th></tr></thead><tbody><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; " align="left">Types</td><td style="border-bottom: 0.5pt solid black; " align="left">get all types within the matched annotation</td></tr><tr><td style="border-right: 0.5pt solid black; border-bottom: 0.5pt solid black; " align="left">Types:End</td><td style="border-bottom: 0.5pt solid black; " align="left">get all types that end at the same offset as the matched

-                annotation

-              </td></tr><tr><td style="border-right: 0.5pt solid black; " align="left">Types:Begin</td><td style="" align="left">get all types that start at the same offset as the

-                matched

-                annotation

-              </td></tr></tbody></table>

-      </div></div><p><br class="table-break">

-    </p>

-    <div class="section" title="2.8.18.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1840">2.8.18.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">GETLIST(ListVariable, StringExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.18.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1845">2.8.18.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;GETLIST(list, "Types")};</pre><p>

-      </p>

-      <p>

-        Here, a list of all types within the document is created and

-        assigned to list variable 'list'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.19.&nbsp;LOG"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.log">2.8.19.&nbsp;LOG</h3></div></div></div>

-    

-    <p>

-      The LOG action writes a log message.

-    </p>

-    <div class="section" title="2.8.19.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1854">2.8.19.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">LOG(StringExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.19.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1859">2.8.19.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;LOG("processed")};</pre><p>

-      </p>

-      <p>

-        This rule writes a log message with the string "processed".

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.20.&nbsp;MARK"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.mark">2.8.20.&nbsp;MARK</h3></div></div></div>

-    

-    <p>

-      The MARK action is the most important action in the UIMA Ruta

-      system. It creates a new annotation of the given type. The optionally

-      passed indexes (NumberExpressions after the TypeExpression) can be

-      used to create an annotation that spanns the matched information of

-      several rule elements.

-    </p>

-    <div class="section" title="2.8.20.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1868">2.8.20.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MARK(TypeExpression(,NumberExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.20.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1873">2.8.20.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Freeline Paragraph{-&gt;MARK(ParagraphAfterFreeline,1,2)};</pre><p>

-      </p>

-      <p>

-        This rule matches on a free line followed by a Paragraph

-        annotation and annotates both in a single ParagraphAfterFreeline

-        annotation. The two numerical expressions at the end of the mark

-        action state that the matched text of the first and the second rule

-        elements are joined to create the boundaries of the new annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.21.&nbsp;MARKFAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.markfast">2.8.21.&nbsp;MARKFAST</h3></div></div></div>

-    

-    <p>

-      The MARKFAST action creates annotations of the given type (first

-      parameter), if an element of the passed list (second parameter) occurs

-      within the window of the matched annotation. Thereby, the created

-      annotation does not cover the whole matched annotation. Instead, it

-      only covers the text of the found occurence. The third parameter is

-      optional. It defines, whether the MARKFAST action should ignore the case,

-      whereby its default value is false. The optional fourth parameter

-      specifies a character threshold for the ignorence of the case. It is

-      only relevant, if the ignore-case value is set to true. The last

-      parameter is set to true by default and specifies whether whitespaces

-      in the entries of the dictionary should be ignored. For more

-      information on lists see

-      <a class="xref" href="#ugr.tools.ruta.language.declarations.ressource" title="2.5.3.&nbsp;Resources">Section&nbsp;2.5.3, &#8220;Resources&#8221;</a>. 

-      Additionally to external word lists, string lists variables can be

-      used.

-    </p>

-    <div class="section" title="2.8.21.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1883">2.8.21.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MARKFAST(TypeExpression,ListExpression(,BooleanExpression

-          (,NumberExpression,(BooleanExpression)?)?)?)</pre><p>

-        </p><pre class="programlisting">MARKFAST(TypeExpression,StringListExpression(,BooleanExpression

-          (,NumberExpression,(BooleanExpression)?)?)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.21.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1889">2.8.21.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">WORDLIST FirstNameList = 'FirstNames.txt';

-DECLARE FirstName;

-Document{-&gt; MARKFAST(FirstName, FirstNameList, true, 2)};</pre><p>

-      </p>

-      <p>

-        This rule annotates all first names listed in the list

-        'FirstNameList' within the document and ignores the case, if the

-        length of the word

-        is greater than 2.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.22.&nbsp;MARKFIRST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.markfirst">2.8.22.&nbsp;MARKFIRST</h3></div></div></div>

-    

-    <p>

-      The MARKFIRST action annotates the first token (basic annotation) of the matched

-      annotation with the given type.

-    </p>

-    <div class="section" title="2.8.22.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1898">2.8.22.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MARKFIRST(TypeExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.22.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1903">2.8.22.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;MARKFIRST(First)};</pre><p>

-      </p>

-      <p>

-        This rule annotates the first token of the document with the

-        annotation First.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.23.&nbsp;MARKLAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.marklast">2.8.23.&nbsp;MARKLAST</h3></div></div></div>

-    

-    <p>

-      The MARKLAST action annotates the last token of the matched

-      annotation with the given type.

-    </p>

-    <div class="section" title="2.8.23.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1912">2.8.23.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MARKLAST(TypeExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.23.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1917">2.8.23.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;MARKLAST(Last)};</pre><p>

-      </p>

-      <p>

-        This rule annotates the last token of the document with the

-        annotation Last.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.24.&nbsp;MARKONCE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.markonce">2.8.24.&nbsp;MARKONCE</h3></div></div></div>

-    

-    <p>

-      The MARKONCE action has the same functionality as the MARK

-      action, but creates a new annotation only, 

-      if each part of the matched annotation is not yet part of the given type.

-    </p>

-    <div class="section" title="2.8.24.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1926">2.8.24.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MARKONCE(NumberExpression,TypeExpression(,NumberExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.24.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1931">2.8.24.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Freeline Paragraph{-&gt;MARKONCE(ParagraphAfterFreeline,1,2)};</pre><p>

-      </p>

-      <p>

-        This rule matches on a free line followed by a Paragraph and

-        annotates both in a single ParagraphAfterFreeline annotation, if no part 

-        is not already annotated with ParagraphAfterFreeline annotation. The

-        two numerical expressions at the end of the MARKONCE action state

-        that the matched text of the first and the second rule elements are

-        joined to create the boundaries of the new annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.25.&nbsp;MARKSCORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.markscore">2.8.25.&nbsp;MARKSCORE</h3></div></div></div>

-    

-    <p>

-      The MARKSCORE action is similar to the MARK action. It also creates a

-      new annotation of the given type, but only if it is not yet existing.

-      The optionally passed indexes (parameters after the TypeExpression)

-      can be used to create an annotation that spanns the matched

-      information of several rule elements. Additionally, a score value

-      (first parameter) is added to the heuristic score value of the

-      annotation. For more information on heuristic scores see

-      <a class="xref" href="#ugr.tools.ruta.language.score" title="2.12.&nbsp;Heuristic extraction using scoring rules">Section&nbsp;2.12, &#8220;Heuristic extraction using scoring rules&#8221;</a>

-      .

-    </p>

-    <div class="section" title="2.8.25.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1941">2.8.25.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MARKSCORE(NumberExpression,TypeExpression(,NumberExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.25.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1946">2.8.25.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Freeline Paragraph{-&gt;MARKSCORE(10,ParagraphAfterFreeline,1,2)};</pre><p>

-      </p>

-      <p>

-        This rule matches on a free line followed by a paragraph and

-        annotates both in a single ParagraphAfterFreeline annotation. The

-        two number expressions at the end of the mark action indicate that

-        the matched text of the first and the second rule elements are

-        joined to create the boundaries of the new annotation. Additionally,

-        the score '10' is added to the heuristic threshold of this

-        annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.26.&nbsp;MARKTABLE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.marktable">2.8.26.&nbsp;MARKTABLE</h3></div></div></div>

-    

-    <p>

-      The MARKTABLE action creates annotations of the given type (first

-      parameter), if an element of the given column (second parameter) of a

-      passed table (third parameter) occures within the window of the

-      matched annotation. Thereby, the created annotation does not cover the

-      whole matched annotation. Instead, it only covers the text of the

-      found occurence. Optionally the MARKTABLE action is able to assign

-      entries of the given table to features of the created annotation.

-      For

-      more information on tables see

-      <a class="xref" href="#ugr.tools.ruta.language.declarations.ressource" title="2.5.3.&nbsp;Resources">Section&nbsp;2.5.3, &#8220;Resources&#8221;</a>. Additionally, several configuration parameters are possible. (See example.)

-    </p>

-    <div class="section" title="2.8.26.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1956">2.8.26.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MARKTABLE(TypeExpression, NumberExpression, TableExpression 

-          (,BooleanExpression, NumberExpression, 

-          StringExpression, NumberExpression)? 

-          (,StringExpression = NumberExpression)+)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.26.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1961">2.8.26.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">WORDTABLE TestTable = 'TestTable.csv';

-DECLARE Annotation Struct(STRING first);

-Document{-&gt; MARKTABLE(Struct, 1, TestTable, 

-    true, 4, ".,-", 2, "first" = 2)};</pre><p>

-      </p>

-      <p>

-        In this example, the whole document is searched for all

-        occurences of the entries of the first column of the given table

-        'TestTable'. For each occurence, an annotation of the type Struct is

-        created and its feature 'first' is filled with the entry of the

-        second column. Moreover, the case of the word is ignored if the

-        length of the word exceeds 4. Additionally, the chars '.', ',' and

-        '-' are ignored, but maximally two of them.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.27.&nbsp;MATCHEDTEXT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.matchedtext">2.8.27.&nbsp;MATCHEDTEXT</h3></div></div></div>

-    

-    <p>

-      The MATCHEDTEXT action saves the text of the matched annotation

-      in a passed String variable. The optionally passed indexes can be

-      used to match the text of several rule elements.

-    </p>

-    <div class="section" title="2.8.27.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1970">2.8.27.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MATCHEDTEXT(StringVariable(,NumberExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.27.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1975">2.8.27.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Headline Paragraph{-&gt;MATCHEDTEXT(stringVariable,1,2)};</pre><p>

-      </p>

-      <p>

-        The text covered by the Headline (rule element 1) and the

-        Paragraph (rule element 2) annotation is saved in variable

-        'stringVariable'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.28.&nbsp;MERGE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.merge">2.8.28.&nbsp;MERGE</h3></div></div></div>

-    

-    <p>

-      The MERGE action merges a number of given lists. The first

-      parameter defines, if the merge is done as intersection (false) or as

-      union (true). The second parameter is the list variable that will

-      contain the result.

-    </p>

-    <div class="section" title="2.8.28.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1984">2.8.28.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MERGE(BooleanExpression, ListVariable, ListExpression, (ListExpression)+)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.28.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1989">2.8.28.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;MERGE(false, listVar, list1, list2, list3)};</pre><p>

-      </p>

-      <p>

-        The elements that occur in all three lists will be placed in

-        the list 'listVar'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.29.&nbsp;REMOVE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.remove">2.8.29.&nbsp;REMOVE</h3></div></div></div>

-    

-    <p>

-      The REMOVE action removes lists or single values from a given

-      list.

-    </p>

-    <div class="section" title="2.8.29.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1998">2.8.29.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">REMOVE(ListVariable,(Argument)+)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.29.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2003">2.8.29.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;REMOVE(list, var)};</pre><p>

-      </p>

-      <p>

-        In this example, the variable 'var' is removed from the list

-        'list'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.30.&nbsp;REMOVEDUPLICATE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.removeduplicate">2.8.30.&nbsp;REMOVEDUPLICATE</h3></div></div></div>

-    

-    <p>

-      This action removes all duplicates within a given list.

-    </p>

-    <div class="section" title="2.8.30.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2012">2.8.30.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">REMOVEDUPLICATE(ListVariable)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.30.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2017">2.8.30.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;REMOVEDUPLICATE(list)};</pre><p>

-      </p>

-      <p>

-        Here, all duplicates within the list 'list' are removed.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.31.&nbsp;REMOVEFILTERTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.removefiltertype">2.8.31.&nbsp;REMOVEFILTERTYPE</h3></div></div></div>

-    

-    <p>

-      The REMOVEFILTERTYPE action removes its arguments from the list of filtered types, 

-      which restrict the visibility of the rules.

-    </p>

-    <div class="section" title="2.8.31.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2026">2.8.31.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">REMOVEFILTERTYPE(TypeExpression(,TypeExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.31.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2031">2.8.31.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;REMOVEFILTERTYPE(W)};</pre><p>

-      </p>

-      <p>

-        After applying this rule, words are possibly visible again depending on the current filtering settings.

-      </p>

-    </div>

-  </div>

-  

-    <div class="section" title="2.8.32.&nbsp;REMOVERETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.removeretaintype">2.8.32.&nbsp;REMOVERETAINTYPE</h3></div></div></div>

-    

-    <p>

-      The REMOVEFILTERTYPE action removes its arguments from the list of retained types, 

-      which extend the visibility of the rules.

-    </p>

-    <div class="section" title="2.8.32.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2040">2.8.32.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">REMOVERETAINTYPE(TypeExpression(,TypeExpression)*)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.32.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2045">2.8.32.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;REMOVERETAINTYPE(W)};</pre><p>

-      </p>

-      <p>

-        After applying this rule, words are possibly not visible anymore depending on the current filtering settings.

-      </p>

-    </div>

-  </div>

-

-

-  <div class="section" title="2.8.33.&nbsp;REPLACE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.replace">2.8.33.&nbsp;REPLACE</h3></div></div></div>

-    

-    <p>

-      The REPLACE action replaces the text of all matched annotations with

-      the given StringExpression. It remembers the modification for the

-      matched annotations and shows them in the modified view (see

-      <a class="xref" href="#ugr.tools.ruta.language.modification" title="2.13.&nbsp;Modification">Section&nbsp;2.13, &#8220;Modification&#8221;</a>).

-    </p>

-    <div class="section" title="2.8.33.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2055">2.8.33.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">REPLACE(StringExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.33.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2060">2.8.33.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">FirstName{-&gt;REPLACE("first name")};</pre><p>

-      </p>

-      <p>

-        This rule replaces all first names with the string 'first

-        name'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.34.&nbsp;RETAINTYPE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.retaintype">2.8.34.&nbsp;RETAINTYPE</h3></div></div></div>

-    

-    <p>

-      The RETAINTYPE action retains the given types. This means that they

-      are now not ignored by rules. This action is related to

-      FILTERTYPE (see <a class="xref" href="#ugr.tools.ruta.language.actions.filtertype" title="2.8.14.&nbsp;FILTERTYPE">Section&nbsp;2.8.14, &#8220;FILTERTYPE&#8221;</a>).

-    </p>

-    <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>    

-      <p>

-        The visibility of types is calculated using three lists: 

-        A list <span class="quote">&#8220;<span class="quote">default</span>&#8221;</span> for the initially filtered types, 

-        which is specified in the configuration parameters of the analysis engine, the list <span class="quote">&#8220;<span class="quote">filtered</span>&#8221;</span>, which is 

-        specified by the FILTERTYPE action, and the list <span class="quote">&#8220;<span class="quote">retained</span>&#8221;</span>, which is specified by the RETAINTYPE action.

-        For determining the actual visibility of types, list <span class="quote">&#8220;<span class="quote">filtered</span>&#8221;</span> is added to list <span class="quote">&#8220;<span class="quote">default</span>&#8221;</span> 

-        and then all elements of list <span class="quote">&#8220;<span class="quote">retained</span>&#8221;</span> are removed. The annotations of the types in the resulting list are not visible.

-        Please note that the actions FILTERTYPE and RETAINTYPE replace all elements of the respective lists and that RETAINTYPE 

-        overrides FILTERTYPE.

-      </p>

-    </div>

-    <div class="section" title="2.8.34.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2078">2.8.34.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">RETAINTYPE((TypeExpression(,TypeExpression)*))?</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.34.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2083">2.8.34.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;RETAINTYPE(SPACE)};</pre><p>

-      </p>

-      <p>

-        Here, all spaces are retained and can be matched by rules.

-      </p>

-      <p>

-        </p><pre class="programlisting">Document{-&gt;RETAINTYPE};</pre><p>

-      </p>

-      <p>

-        Here, the the action (without parentheses) specifies that no types should be retained.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.35.&nbsp;SETFEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.setfeature">2.8.35.&nbsp;SETFEATURE</h3></div></div></div>

-    

-    <p>

-      The SETFEATURE action sets the value of a feature of the

-      matched

-      complex structure.

-    </p>

-    <div class="section" title="2.8.35.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2095">2.8.35.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">SETFEATURE(StringExpression,Expression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.35.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2100">2.8.35.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;SETFEATURE("language","en")};</pre><p>

-      </p>

-      <p>

-        Here, the feature 'language' of the input document is set to

-        English.

-      </p>

-    </div>

-  </div>

-

-    <div class="section" title="2.8.36.&nbsp;SHIFT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.shift">2.8.36.&nbsp;SHIFT</h3></div></div></div>

-      

-      <p>

-        The SHIFT action can be used to change the offsets of an annotation. The optional number expressions,

-        which point the rule elements of the rule, specify the new offsets of the annotation. The annotations that

-        will be modified have to start or end at the match of the rule element of the action. This means that the action 

-        has to be placed at a matching condition, which will be used to specify the annotations to be changed.

-      </p>

-      <div class="section" title="2.8.36.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2109">2.8.36.1.&nbsp;

-          <span class="bold"><strong>Definition:</strong></span>

-        </h4></div></div></div>

-        

-        <p>

-          </p><pre class="programlisting">SHIFT(TypeExpression(,NumberExpression)*)</pre><p>

-        </p>

-      </div>

-      <div class="section" title="2.8.36.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2114">2.8.36.2.&nbsp;

-          <span class="bold"><strong>Example:</strong></span>

-        </h4></div></div></div>

-        

-        <p>

-          </p><pre class="programlisting">Author{-&gt; SHIFT(Author,1,2)} PM;</pre><p>

-        </p>

-        <p>

-          In this example, an annotation of the type <span class="quote">&#8220;<span class="quote">Author</span>&#8221;</span> is expanded 

-          in order to cover the following punctation mark.

-        </p>

-        <p>

-          </p><pre class="programlisting">W{STARTSWITH(FS) -&gt; SHIFT(FS, 1, 2)} W+ MARKUP;</pre><p>

-        </p>

-        <p>

-          In this example, an annotation of the type <span class="quote">&#8220;<span class="quote">FS</span>&#8221;</span> that consists mostly of words 

-          is shrinked by removing the last MARKUP annotation. 

-        </p>

-      </div>

-    </div>

-

-  <div class="section" title="2.8.37.&nbsp;TRANSFER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.transfer">2.8.37.&nbsp;TRANSFER</h3></div></div></div>

-    

-    <p>

-      The TRANSFER action creates a new feature structure and adds all

-      compatible features of the matched annotation.

-    </p>

-    <div class="section" title="2.8.37.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2128">2.8.37.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">TRANSFER(TypeExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.37.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2133">2.8.37.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;TRANSFER(LanguageStorage)};</pre><p>

-      </p>

-      <p>

-        Here, a new feature structure <span class="quote">&#8220;<span class="quote">LanguageStorage</span>&#8221;</span> is created and

-        the compatible features of the Document annotation are copied. E.g.,

-        if LanguageStorage defined a feature named 'language', then the

-        feature value of the Document annotation is copied.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.38.&nbsp;TRIE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.trie">2.8.38.&nbsp;TRIE</h3></div></div></div>

-    

-    <p>

-      The TRIE action uses an external multi tree word list to

-      annotate the matched annotation and provides several configuration

-      parameters.

-    </p>

-    <div class="section" title="2.8.38.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2143">2.8.38.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">TRIE((String = Type)+,ListExpression,BooleanExpression,NumberExpression,

-          BooleanExpression,NumberExpression,StringExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.38.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2148">2.8.38.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{-&gt;TRIE("FirstNames.txt" = FirstName, "Companies.txt" = Company, 

-          'Dictionary.mtwl', true, 4, false, 0, ".,-/")};</pre><p>

-      </p>

-      <p>

-        Here, the dictionary 'Dictionary.mtwl' that contains word lists

-        for first names and companies is used to annotate the document. The

-        words previously contained in the file 'FirstNames.txt' are

-        annotated with the type FirstName and the words in the file

-        'Companies.txt' with the type Company. The case of the word is

-        ignored, if the length of the word exceeds 4. The edit distance is

-        deactivated. The cost of an edit operation can currently not be

-        configured by an argument. The last argument additionally defines

-        several chars that will be ignored.

-      </p>

-    </div>

-  </div>

-

-<div class="section" title="2.8.39.&nbsp;TRIM"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.trim">2.8.39.&nbsp;TRIM</h3></div></div></div>

-    

-    <p>

-      The TRIM action changes the offsets on the matched annotations by removing annotations, whose

-      types are specified by the given parameters.

-    </p>

-    <div class="section" title="2.8.39.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2157">2.8.39.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">TRIE(TypeExpression ( , TypeExpression)*)</pre><p>

-        </p><pre class="programlisting">TRIE(TypeListExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.39.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2163">2.8.39.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Keyword{-&gt; TRIM(SPACE)};</pre><p>

-      </p>

-      <p>

-        This rule removes all spaces at the beginning and at the end of Keyword annotations and

-        thus changes the offsets of the matched annotations.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.40.&nbsp;UNMARK"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.unmark">2.8.40.&nbsp;UNMARK</h3></div></div></div>

-    

-    <p>

-      The UNMARK action removes the annotation of the given type

-      overlapping the matched annotation. There are two additional configurations: If additional

-      indexes are given, then the span of the specified rule elements are applied, similar the the MARK action.

-      If instead a boolean is given as an additional argument, then all annotations of the given type are removed

-      that start at the matched position.

-    </p>

-    <div class="section" title="2.8.40.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2172">2.8.40.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">UNMARK(TypeExpression)</pre><p>

-        </p><pre class="programlisting">UNMARK(TypeExpression (,NumberExpression)*)</pre><p>

-        </p><pre class="programlisting">UNMARK(TypeExpression, BooleanExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.40.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2179">2.8.40.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Headline{-&gt;UNMARK(Headline)};</pre><p>

-      </p>

-      <p>

-        Here, the Headline annotation is removed.

-      </p>

-      <p>

-        </p><pre class="programlisting">CW ANY+? QUESTION{-&gt;UNMARK(Headline,1,3)};</pre><p>

-      </p>

-      <p>

-        Here, all Headline annotations are removed that start with a capitalized word and end with a question mark.

-      </p>

-      <p>

-        </p><pre class="programlisting">CW{-&gt;UNMARK(Headline,true)};</pre><p>

-      </p>

-      <p>

-        Here, all Headline annotations are removed that start with a capitalized word.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.8.41.&nbsp;UNMARKALL"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.actions.unmarkall">2.8.41.&nbsp;UNMARKALL</h3></div></div></div>

-    

-    <p>

-      The UNMARKALL action removes all the annotations of the given

-      type and all of its descendants overlapping the matched annotation,

-      except the annotation is of at least one type in the passed list.

-    </p>

-    <div class="section" title="2.8.41.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e2194">2.8.41.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">UNMARKALL(TypeExpression, TypeListExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.8.41.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e2199">2.8.41.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Annotation{-&gt;UNMARKALL(Annotation, {Headline})};</pre><p>

-      </p>

-      <p>

-        Here, all annotations except from headlines are removed.

-      </p>

-      

-    </div>

-  </div>
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Conditions.html b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Conditions.html
deleted file mode 100644
index eed372a..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/documentation/Conditions.html
+++ /dev/null
@@ -1,909 +0,0 @@
-<div class="section" title="2.7.1.&nbsp;AFTER"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.after">2.7.1.&nbsp;AFTER</h3></div></div></div>

-    

-    <p>

-      The AFTER condition evaluates true, if the matched annotation

-      starts after the beginning of an arbitrary annotation of the passed

-      type. If a list of types is passed, this has to be true for at least

-      one of them.

-    </p>

-    <div class="section" title="2.7.1.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1150">2.7.1.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">AFTER(Type|TypeListExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.1.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1155">2.7.1.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CW{AFTER(SW)};</pre><p>

-      </p>

-      <p>

-        Here, the rule matches on a capitalized word, if there is any

-        small written word previously.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.2.&nbsp;AND"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.and">2.7.2.&nbsp;AND</h3></div></div></div>

-    

-    <p>

-      The AND condition is a composed condition and evaluates true, if

-      all contained conditions evaluate true.

-    </p>

-    <div class="section" title="2.7.2.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1164">2.7.2.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">AND(Condition1,...,ConditionN)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.2.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1169">2.7.2.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{AND(PARTOF(Headline),CONTAINS(Keyword))

-          -&gt;MARK(ImportantHeadline)};</pre><p>

-      </p>

-      <p>

-        In this example, a paragraph is annotated with an

-        ImportantHeadline annotation, if it is part of a Headline and

-        contains a Keyword annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.3.&nbsp;BEFORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.before">2.7.3.&nbsp;BEFORE</h3></div></div></div>

-    

-    <p>

-      The BEFORE condition evaluates true, if the matched annotation

-      starts before the beginning of an arbitrary annotation of the passed

-      type. If a list of types is passed, this has to be true for at least

-      one of them.

-    </p>

-    <div class="section" title="2.7.3.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1178">2.7.3.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">BEFORE(Type|TypeListExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.3.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1183">2.7.3.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CW{BEFORE(SW)};</pre><p>

-      </p>

-      <p>

-        Here, the rule matches on a capitalized word, if there is any

-        small written word afterwards.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.4.&nbsp;CONTAINS"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.contains">2.7.4.&nbsp;CONTAINS</h3></div></div></div>

-    

-    <p>

-      The CONTAINS condition evaluates true on a matched annotation,

-      if

-      the frequency of the passed type lies within an optionally passed

-      interval. The limits of the passed interval are per default

-      interpreted as absolute numeral values. By passing a further boolean

-      parameter set to true the limits are interpreted as percental

-      values.

-      If no interval parameters are passed at all, then the condition

-      checks

-      whether the matched annotation contains at least one

-      occurrence of the

-      passed type.

-    </p>

-    <div class="section" title="2.7.4.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1192">2.7.4.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CONTAINS(Type(,NumberExpression,NumberExpression(,BooleanExpression)?)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.4.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1197">2.7.4.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{CONTAINS(Keyword)-&gt;MARK(KeywordParagraph)};</pre><p>

-      </p>

-      <p>

-        A Paragraph is annotated with a KeywordParagraph annotation, if

-        it contains a Keyword annotation.

-      </p>

-      <p>

-        </p><pre class="programlisting">Paragraph{CONTAINS(Keyword,2,4)-&gt;MARK(KeywordParagraph)};</pre><p>

-      </p>

-      <p>

-        A Paragraph is annotated with a KeywordParagraph annotation, if

-        it contains between two and four Keyword annotations.

-      </p>

-      <p>

-        </p><pre class="programlisting">Paragraph{CONTAINS(Keyword,50,100,true)-&gt;MARK(KeywordParagraph)};</pre><p>

-      </p>

-      <p>

-        A Paragraph is annotated with a KeywordParagraph annotation, if it

-        contains between 50% and 100% Keyword annotations. This is

-        calculated based on the tokens of the Paragraph. If the Paragraph

-        contains six basic annotations (see

-        <a class="xref" href="#ugr.tools.ruta.language.seeding" title="2.3.&nbsp;Basic annotations and tokens">Section&nbsp;2.3, &#8220;Basic annotations and tokens&#8221;</a>), two of them are part of one Keyword annotation, and if one basic

-        annotation is also annotated with a Keyword annotation, then the

-        percentage of the contained Keywords is 50%.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.5.&nbsp;CONTEXTCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.contextcount">2.7.5.&nbsp;CONTEXTCOUNT</h3></div></div></div>

-    

-    <p>

-      The CONTEXTCOUNT condition numbers all occurrences of the

-      matched type within the context of a passed type's annotation

-      consecutively, thus assigning an index to each occurrence.

-      Additionally it stores the index of the matched annotation in a

-      numerical variable if one is passed. The condition evaluates true if

-      the index of the matched annotation is within a passed interval. If

-      no interval is passed, the condition always evaluates true.

-    </p>

-    <div class="section" title="2.7.5.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1213">2.7.5.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CONTEXTCOUNT(Type(,NumberExpression,NumberExpression)?(,Variable)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.5.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1218">2.7.5.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Keyword{CONTEXTCOUNT(Paragraph,2,3,var)

-          -&gt;MARK(SecondOrThirdKeywordInParagraph)};</pre><p>

-      </p>

-      <p>

-        Here, the position of the matched Keyword annotation within a

-        Paragraph annotation is calculated and stored in the variable 'var'.

-        If the counted value lies within the interval [2,3], then the matched

-        Keyword is annotated with the SecondOrThirdKeywordInParagraph

-        annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.6.&nbsp;COUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.count">2.7.6.&nbsp;COUNT</h3></div></div></div>

-    

-    <p>

-      The COUNT condition can be used in two different ways. In the

-      first case (see first definition), it counts the number of

-      annotations of the passed type within the window of the matched

-      annotation and stores the amount in a numerical variable, if such a

-      variable is passed. The condition evaluates true if the counted

-      amount is within a specified interval. If no interval is passed, the

-      condition always evaluates true. In the second case (see second

-      definition), it counts the number of occurrences of the passed

-      VariableExpression (second parameter) within the passed list (first

-      parameter) and stores the amount in a numerical variable, if such a

-      variable is passed. Again, the condition evaluates true if the counted

-      amount is within a specified interval. If no interval is passed, the

-      condition always evaluates true.

-    </p>

-    <div class="section" title="2.7.6.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1227">2.7.6.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">COUNT(Type(,NumberExpression,NumberExpression)?(,NumberVariable)?)</pre><p>

-      </p>

-      <p>

-        </p><pre class="programlisting">COUNT(ListExpression,VariableExpression

-          (,NumberExpression,NumberExpression)?(,NumberVariable)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.6.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1234">2.7.6.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{COUNT(Keyword,1,10,var)-&gt;MARK(KeywordParagraph)};</pre><p>

-      </p>

-      <p>

-        Here, the amount of Keyword annotations within a Paragraph is

-        calculated and stored in the variable 'var'. If one to ten Keywords

-        were counted, the paragraph is marked with a KeywordParagraph

-        annotation.

-      </p>

-      <p>

-        </p><pre class="programlisting">Paragraph{COUNT(list,"author",5,7,var)};</pre><p>

-      </p>

-      <p>

-        Here, the number of occurrences of STRING "author" within the

-        STRINGLIST 'list' is counted and stored in the variable 'var'. If

-        "author" occurs five to seven times within 'list', the condition

-        evaluates true.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.7.&nbsp;CURRENTCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.currentcount">2.7.7.&nbsp;CURRENTCOUNT</h3></div></div></div>

-    

-    <p>

-      The CURRENTCOUNT condition numbers all occurrences of the matched

-      type within the whole document consecutively, thus assigning an index

-      to each occurrence. Additionally, it stores the index of the matched

-      annotation in a numerical variable, if one is passed. The condition

-      evaluates true if the index of the matched annotation is within a

-      specified interval. If no interval is passed, the condition always

-      evaluates true.

-    </p>

-    <div class="section" title="2.7.7.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1246">2.7.7.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">CURRENTCOUNT(Type(,NumberExpression,NumberExpression)?(,Variable)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.7.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1251">2.7.7.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{CURRENTCOUNT(Keyword,3,3,var)-&gt;MARK(ParagraphWithThirdKeyword)};</pre><p>

-      </p>

-      <p>

-        Here, the Paragraph, which contains the third Keyword of the

-        whole document, is annotated with the ParagraphWithThirdKeyword

-        annotation. The index is stored in the variable 'var'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.8.&nbsp;ENDSWITH"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.endswith">2.7.8.&nbsp;ENDSWITH</h3></div></div></div>

-    

-    <p>

-      The ENDSWITH condition evaluates true, if an annotation of the

-      given type ends exactly at the same position as the matched

-      annotation. If a list of types is passed, this has to be true for at

-      least one of them.

-    </p>

-    <div class="section" title="2.7.8.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1260">2.7.8.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">ENDSWITH(Type|TypeListExpression) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.8.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1265">2.7.8.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{ENDSWITH(SW)};</pre><p>

-      </p>

-      <p>

-        Here, the rule matches on a Paragraph annotation, if it ends

-        with a small written word.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.9.&nbsp;FEATURE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.feature">2.7.9.&nbsp;FEATURE</h3></div></div></div>

-    

-    <p>

-      The FEATURE condition compares a feature of the matched

-      annotation with the second argument.

-    </p>

-    <div class="section" title="2.7.9.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1274">2.7.9.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">FEATURE(StringExpression,Expression) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.9.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1279">2.7.9.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{FEATURE("language",targetLanguage)}</pre><p>

-      </p>

-      <p>

-        This rule matches, if the feature named 'language' of the

-        document annotation equals the value of the variable

-        'targetLanguage'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.10.&nbsp;IF"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.if">2.7.10.&nbsp;IF</h3></div></div></div>

-    

-    <p>

-      The IF condition evaluates true, if the contained boolean

-      expression evaluates true.

-    </p>

-    <div class="section" title="2.7.10.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1288">2.7.10.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">IF(BooleanExpression) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.10.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1293">2.7.10.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{IF(keywordAmount &gt; 5)-&gt;MARK(KeywordParagraph)};</pre><p>

-      </p>

-      <p>

-        A Paragraph annotation is annotated with a KeywordParagraph

-        annotation, if the value of the variable 'keywordAmount' is greater

-        than five.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.11.&nbsp;INLIST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.inlist">2.7.11.&nbsp;INLIST</h3></div></div></div>

-    

-    <p>

-      The INLIST condition is fulfilled, if the matched annotation is listed

-      in a given word or string list. The (relative) edit distance

-      is currently disabled.

-      

-    </p>

-    <div class="section" title="2.7.11.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1302">2.7.11.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">INLIST(WordList(,NumberExpression,(BooleanExpression)?)?) </pre><p>

-      </p>

-      <p>

-        </p><pre class="programlisting">INLIST(StringList(,NumberExpression,(BooleanExpression)?)?) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.11.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1309">2.7.11.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Keyword{INLIST(specialKeywords.txt)-&gt;MARK(SpecialKeyword)};</pre><p>

-      </p>

-      <p>

-        A Keyword is annotated with the type SpecialKeyword, if the text

-        of the Keyword annotation is listed in the word list

-        'specialKeywords.txt'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.12.&nbsp;IS"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.is">2.7.12.&nbsp;IS</h3></div></div></div>

-    

-    <p>

-      The IS condition evaluates true, if there is an annotation of the

-      given type with the same beginning and ending offsets as the

-      matched

-      annotation. If a list of types is given, the condition

-      evaluates true,

-      if at least one of them fulfills the former condition.

-    </p>

-    <div class="section" title="2.7.12.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1318">2.7.12.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">IS(Type|TypeListExpression) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.12.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1323">2.7.12.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Author{IS(Englishman)-&gt;MARK(EnglishAuthor)};</pre><p>

-      </p>

-      <p>

-        If an Author annotation is also annotated with an Englishman

-        annotation, it is annotated with an EnglishAuthor annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.13.&nbsp;LAST"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.last">2.7.13.&nbsp;LAST</h3></div></div></div>

-    

-    <p>

-      The LAST condition evaluates true, if the type of the last token

-      within the window of the matched annotation is of the given type.

-    </p>

-    <div class="section" title="2.7.13.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1332">2.7.13.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">LAST(TypeExpression) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.13.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1337">2.7.13.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{LAST(CW)};</pre><p>

-      </p>

-      <p>

-        This rule fires, if the last token of the document is a

-        capitalized word.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.14.&nbsp;MOFN"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.mofn">2.7.14.&nbsp;MOFN</h3></div></div></div>

-    

-    <p>

-      The MOFN condition is a composed condition. It evaluates true if

-      the number of containing conditions evaluating true is within a given

-      interval.

-    </p>

-    <div class="section" title="2.7.14.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1346">2.7.14.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MOFN(NumberExpression,NumberExpression,Condition1,...,ConditionN) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.14.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1351">2.7.14.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{MOFN(1,1,PARTOF(Headline),CONTAINS(Keyword))

-          -&gt;MARK(HeadlineXORKeywords)};</pre><p>

-      </p>

-      <p>

-        A Paragraph is marked as a HeadlineXORKeywords, if the matched

-        text is either part of a Headline annotation or contains Keyword

-        annotations.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.15.&nbsp;NEAR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.near">2.7.15.&nbsp;NEAR</h3></div></div></div>

-    

-    <p>

-      The NEAR condition is fulfilled, if the distance of the matched

-      annotation to an annotation of the given type is within a given

-      interval. The direction is defined by a boolean parameter, whose

-      default value is set to true, therefore searching forward. By default this

-      condition works on an unfiltered index. An optional fifth boolean

-      parameter can be set to true to get the condition being evaluated on

-      a filtered index.

-    </p>

-    <div class="section" title="2.7.15.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1360">2.7.15.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">NEAR(TypeExpression,NumberExpression,NumberExpression

-          (,BooleanExpression(,BooleanExpression)?)?) </pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.15.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1365">2.7.15.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{NEAR(Headline,0,10,false)-&gt;MARK(NoHeadline)};</pre><p>

-      </p>

-      <p>

-        A Paragraph that starts at most ten tokens after a Headline

-        annotation is annotated with the NoHeadline annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.16.&nbsp;NOT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.not">2.7.16.&nbsp;NOT</h3></div></div></div>

-    

-    <p>

-      The NOT condition negates the result of its contained

-      condition.

-    </p>

-    <div class="section" title="2.7.16.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1374">2.7.16.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">"-"Condition</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.16.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1379">2.7.16.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{-PARTOF(Headline)-&gt;MARK(Headline)};</pre><p>

-      </p>

-      <p>

-        A Paragraph that is not part of a Headline annotation so far is

-        annotated with a Headline annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.17.&nbsp;OR"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.or">2.7.17.&nbsp;OR</h3></div></div></div>

-    

-    <p>

-      The OR Condition is a composed condition and evaluates true, if

-      at least one contained condition is evaluated true.

-    </p>

-    <div class="section" title="2.7.17.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1388">2.7.17.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">OR(Condition1,...,ConditionN)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.17.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1393">2.7.17.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{OR(PARTOF(Headline),CONTAINS(Keyword))

-                                           -&gt;MARK(ImportantParagraph)};</pre><p>

-      </p>

-      <p>

-        In this example a Paragraph is annotated with the

-        ImportantParagraph annotation, if it is a Headline or contains

-        Keyword annotations.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.18.&nbsp;PARSE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.parse">2.7.18.&nbsp;PARSE</h3></div></div></div>

-    

-    <p>

-      The PARSE condition is fulfilled, if the text covered by the

-      matched annotation can be transformed into a value of the given

-      variable's type. If this is possible, the parsed value is

-      additionally assigned to the passed variable.

-    </p>

-    <div class="section" title="2.7.18.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1402">2.7.18.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">PARSE(variable)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.18.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1407">2.7.18.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">NUM{PARSE(var)};</pre><p>

-      </p>

-      <p>

-        If the variable 'var' is of an appropriate numeric type, the

-        value of NUM is parsed and subsequently stored in 'var'.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.19.&nbsp;PARTOF"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.partof">2.7.19.&nbsp;PARTOF</h3></div></div></div>

-    

-    <p>

-      The PARTOF condition is fulfilled, if the matched annotation is

-      part of an annotation of the given type. However, it is not necessary

-      that the matched annotation is smaller than the annotation of the

-      given type. Use the (much slower) PARTOFNEQ condition instead, if this

-      is needed. If a type list is given, the condition evaluates true, if

-      the former described condition for a single type is fulfilled for at

-      least one of the types in the list.

-    </p>

-    <div class="section" title="2.7.19.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1416">2.7.19.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">PARTOF(Type|TypeListExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.19.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1421">2.7.19.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{PARTOF(Headline) -&gt; MARK(ImportantParagraph)};</pre><p>

-      </p>

-      <p>

-        A Paragraph is an ImportantParagraph, if the matched text is

-        part of a Headline annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.20.&nbsp;PARTOFNEQ"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.partofneq">2.7.20.&nbsp;PARTOFNEQ</h3></div></div></div>

-    

-    <p>

-      The PARTOFNEQ condition is fulfilled if the matched annotation

-      is part of (smaller than and inside of) an annotation of the given

-      type. If also annotations of the same size should be acceptable, use

-      the PARTOF condition. If a type list is given, the condition

-      evaluates true if the former described condition is fulfilled for at

-      least one of the types in the list.

-    </p>

-    <div class="section" title="2.7.20.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1430">2.7.20.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">PARTOFNEQ(Type|TypeListExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.20.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1435">2.7.20.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">W{PARTOFNEQ(Headline) -&gt; MARK(ImportantWord)};</pre><p>

-      </p>

-      <p>

-        A word is an <span class="quote">&#8220;<span class="quote">ImportantWord</span>&#8221;</span>, if it is part of a headline.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.21.&nbsp;POSITION"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.position">2.7.21.&nbsp;POSITION</h3></div></div></div>

-    

-    <p>

-      The POSITION condition is fulfilled, if the matched type is the

-      k-th occurence of this type within the window of an annotation of the

-      passed type, whereby k is defined by the value of the passed

-      NumberExpression. If the additional boolean paramter is set to false,

-      then k counts the occurences of of the minimal annotations.

-    </p>

-    <div class="section" title="2.7.21.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1445">2.7.21.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">POSITION(Type,NumberExpression(,BooleanExpression)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.21.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1450">2.7.21.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Keyword{POSITION(Paragraph,2)-&gt;MARK(SecondKeyword)};</pre><p>

-      </p>

-      <p>

-        The second Keyword in a Paragraph is annotated with the type

-        SecondKeyword.

-      </p>

-      <p>

-        </p><pre class="programlisting">Keyword{POSITION(Paragraph,2,false)-&gt;MARK(SecondKeyword)};</pre><p>

-      </p>

-      <p>

-        A Keyword in a Paragraph is annotated with the type

-        SecondKeyword, if it starts at the same offset as the second

-        (visible) RutaBasic annotation, which normally corresponds to

-        the tokens.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.22.&nbsp;REGEXP"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.regexp">2.7.22.&nbsp;REGEXP</h3></div></div></div>

-    

-    <p>

-      The REGEXP condition is fulfilled, if the given pattern matches on the

-      matched annotation. However, if a string variable is given as the

-      first

-      argument, then the pattern is evaluated on the value of the

-      variable.

-      For more details on the syntax of regular

-      expressions, take a

-      look at

-      the

-      <a class="ulink" href="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html" target="_top">Java API</a>

-      . By default the REGEXP condition is case-sensitive. To change this,

-      add an optional boolean parameter, which is set to true. The regular expression is 

-      initialized with the flags DOTALL and MULTILINE, and if the optional parameter is set to true, 

-      then additionally with the flags CASE_INSENSITIVE and UNICODE_CASE.

-    </p>

-    <div class="section" title="2.7.22.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1463">2.7.22.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">REGEXP((StringVariable,)? StringExpression(,BooleanExpression)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.22.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1468">2.7.22.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Keyword{REGEXP("..")-&gt;MARK(SmallKeyword)};</pre><p>

-      </p>

-      <p>

-        A Keyword that only consists of two chars is annotated with a

-        SmallKeyword annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.23.&nbsp;SCORE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.score">2.7.23.&nbsp;SCORE</h3></div></div></div>

-    

-    <p>

-      The SCORE condition evaluates the heuristic score of the matched

-      annotation. This score is set or changed by the MARK action.

-      The

-      condition is fulfilled, if the score of the matched annotation is

-      in a

-      given interval. Optionally, the score can be stored in a

-      variable.

-    </p>

-    <div class="section" title="2.7.23.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1477">2.7.23.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">SCORE(NumberExpression,NumberExpression(,Variable)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.23.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1482">2.7.23.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">MaybeHeadline{SCORE(40,100)-&gt;MARK(Headline)};</pre><p>

-      </p>

-      <p>

-        An annotation of the type MaybeHeadline is annotated with

-        Headline, if its score is between 40 and 100.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.24.&nbsp;SIZE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.size">2.7.24.&nbsp;SIZE</h3></div></div></div>

-    

-    <p>

-      The SIZE contition counts the number of elements in the given

-      list. By default, this condition always evaluates true. When an interval

-      is passed, it evaluates true, if the counted number of list elements

-      is within the interval. The counted number can be stored in an

-      optionally passed numeral variable.

-    </p>

-    <div class="section" title="2.7.24.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1491">2.7.24.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">SIZE(ListExpression(,NumberExpression,NumberExpression)?(,Variable)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.24.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1496">2.7.24.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Document{SIZE(list,4,10,var)};</pre><p>

-      </p>

-      <p>

-        This rule fires, if the given list contains between 4 and 10

-        elements. Additionally, the exact amount is stored in the variable

-        <span class="quote">&#8220;<span class="quote">var</span>&#8221;</span>.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.25.&nbsp;STARTSWITH"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.startswith">2.7.25.&nbsp;STARTSWITH</h3></div></div></div>

-    

-    <p>

-      The STARTSWITH condition evaluates true, if an annotation of the

-      given type starts exactly at the same position as the matched

-      annotation. If a type list is given, the condition evaluates true, if

-      the former is true for at least one of the given types in the list.

-    </p>

-    <div class="section" title="2.7.25.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1506">2.7.25.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">STARTSWITH(Type|TypeListExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.25.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1511">2.7.25.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{STARTSWITH(SW)};</pre><p>

-      </p>

-      <p>

-        Here, the rule matches on a Paragraph annotation, if it starts

-        with small written word.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.26.&nbsp;TOTALCOUNT"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.totalcount">2.7.26.&nbsp;TOTALCOUNT</h3></div></div></div>

-    

-    <p>

-      The TOTALCOUNT condition counts the annotations of the passed

-      type within the whole document and stores the amount in an optionally

-      passed numerical variable. The condition evaluates true, if the

-      amount

-      is within the passed interval. If no interval is passed, the

-      condition always evaluates true.

-    </p>

-    <div class="section" title="2.7.26.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1520">2.7.26.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">TOTALCOUNT(Type(,NumberExpression,NumberExpression(,Variable)?)?)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.26.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1525">2.7.26.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{TOTALCOUNT(Keyword,1,10,var)-&gt;MARK(KeywordParagraph)};</pre><p>

-      </p>

-      <p>

-        Here, the amount of Keyword annotations within the whole

-        document is calculated and stored in the variable 'var'. If one to

-        ten Keywords were counted, the Paragraph is marked with a

-        KeywordParagraph annotation.

-      </p>

-    </div>

-  </div>

-

-  <div class="section" title="2.7.27.&nbsp;VOTE"><div class="titlepage"><div><div><h3 class="title" id="ugr.tools.ruta.language.conditions.vote">2.7.27.&nbsp;VOTE</h3></div></div></div>

-    

-    <p>

-      The VOTE condition counts the annotations of the given two types

-      within the window of the matched annotation and evaluates true,

-      if it

-      finds more annotations of the first type.

-    </p>

-    <div class="section" title="2.7.27.1.&nbsp; Definition:"><div class="titlepage"><div><div><h4 class="title" id="d5e1534">2.7.27.1.&nbsp;

-        <span class="bold"><strong>Definition:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">VOTE(TypeExpression,TypeExpression)</pre><p>

-      </p>

-    </div>

-    <div class="section" title="2.7.27.2.&nbsp; Example:"><div class="titlepage"><div><div><h4 class="title" id="d5e1539">2.7.27.2.&nbsp;

-        <span class="bold"><strong>Example:</strong></span>

-      </h4></div></div></div>

-      

-      <p>

-        </p><pre class="programlisting">Paragraph{VOTE(FirstName,LastName)};</pre><p>

-      </p>

-      <p>

-        Here, this rule fires, if a paragraph contains more firstnames

-        than lastnames.

-      </p>

-    </div>

-  </div>
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/editor/ActionMessages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/editor/ActionMessages.properties
deleted file mode 100644
index 840ff82..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/editor/ActionMessages.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-MemberFilterActionGroup_hide_variables_label=Hide &Variables

-MemberFilterActionGroup_hide_variables_tooltip=Hide Variables

-MemberFilterActionGroup_hide_variables_description=Toggles the visibility of variables

-MemberFilterActionGroup_hide_functions_label=Hide &Functions

-MemberFilterActionGroup_hide_functions_tooltip=Hide Functions

-MemberFilterActionGroup_hide_functions_description=Toggles the visibility of functions

-MemberFilterActionGroup_hide_classes_label=Hide &Classes

-MemberFilterActionGroup_hide_classes_tooltip=Hide Classes

-MemberFilterActionGroup_hide_classes_description=Toggles the visibility of classes

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/PreviewFile.txt b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/PreviewFile.txt
deleted file mode 100644
index 2062e92..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/PreviewFile.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-PACKAGE org.apache.uima;

-

-SCRIPT org.apache.uima.DashTree;

-SCRIPT org.apache.uima.DashTreeError;

-SCRIPT org.apache.uima.BuildTree;

-TYPESYSTEM org.apache.uima.TerminologyTypeSystem;

-

-Document{-> CALL(DashTree)};

- 

-DECLARE link;

-entryContent curlyBracketsOpen inCurlyBrackets{-PARTOF(link) -> MARK(link,3)} curlyBracketsClose;

-

-Document{-> RETAINTYPE};

-

-// *** error handling ***

-Document{-> CALL(DashTreeError)};

-// *** end of error handling ***

-

-// *** statistics ***

-INT count;

-Document{TOTALCOUNT(error,1,1000000,count)

-    -> LOG("Longmenu.txt: Es wurde(n) "+(count)+" Fehler gefunden!")};

-Document{TOTALCOUNT(rootRow,1,1000000,count)

-    -> LOG("Longmenu.txt: Es wurde(n) "+(count)+" Wurzel-Elemente gefunden.")};

-Document{TOTALCOUNT(childRow,1,1000000,count)

-    -> LOG("Longmenu.txt: Es wurde(n) "+(count)+" Kind-Elemente gefunden.")};

-// *** end of statistics ***

-

-INT id;

-

-ACTION IncID = (ASSIGN(id,id+1));

-

-

-BLOCK(ChildRows) childRow{} {

-    childRow[1,9]{-> ASSIGN(id,1+id),

-        CREATE(Term,

-        "Text" = entryContent,

-        "Info" = link,

-        "Id" = "A" + (id),

-        "TermType" = "answer")};

-}

-

-BLOCK(RootRow) rootRow{} {

-    rootRow{-> ASSIGN(id,1+id),

-        CREATE(Term,

-        "Text" = entryContent,

-        "Info" = link,

-        "Id" = "A" + (id),

-        "TermType" = "answer")};

-}

-

-Term{PARTOF(rootRow) -> TRANSFER(Root)};

-

-Term{PARTOF(rootRow) -> MARK(SubTree,1,2)} Term+{-PARTOF(rootRow)};

-Document{-> CALL(BuildTree.BuildDashTree)};

-

-

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/RutaPreferencesMessages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/RutaPreferencesMessages.properties
deleted file mode 100644
index 8aed667..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/RutaPreferencesMessages.properties
+++ /dev/null
@@ -1,46 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-RutaSmartTypingConfigurationBlock_autoclose_title =Automatically close

-RutaSmartTypingConfigurationBlock_tabs_title =Tabulators

-RutaGlobalPreferencePage_description=General Ruta settings

-RutaSmartTypingConfigurationBlock_smartPaste_simple =Shift inserted block to insertion point level

-RutaSmartTypingConfigurationBlock_smartPaste_full =Adjust indentation(fully reindents block)

-RutaSmartTypingConfigurationBlock_typing_smartTab =Tab key indents the current line

-RutaSmartTypingConfigurationBlock_closeBrackets =(Parentheses),[square] brackets

-RutaSmartTypingConfigurationBlock_closeBraces ={Braces}

-RutaSmartTypingConfigurationBlock_closeStrings ="Strings"

-RutaSmartTypingConfigurationBlock_typing_tabTitle =RutaSmartTypingConfigurationBlock_typing_tabTitle

-RutaEditorPreferencePage_general=Appeara&nce

-RutaEditorPreferencePage_condition_colors = Condition

-RutaEditorPreferencePage_action_colors = Action

-RutaEditorPreferencePage_declaration_colors = Declaration

-RutaEditorPreferencePage_basicsymbols_colors = Basic Symbol

-RutaEditorPreferencePage_function_colors = Function

-RutaEditorPreferencePage_then_colors = then (the action indicator)

-RutaSmartTypingConfigurationBlock_typing_tabTitle =RutaSmartTypingConfigurationBlock_typing_tabTitle

-

-TodoTaskDescription = Strings indicating tasks in Ruta comments.

-BuilderResolveImports = Resolve imports when creating descriptors.

-BuilderImportByName = Use import by name when creating descriptors.

-BuilderIgnoreDuplicateShortnames = Hide warnings for conflicting short names of types.

-ProjectClearOutput = Clear output folder before running a script.

-NoVMInDevMode = Do not start a VM in development mode.

-AddSDI = Update Source Document Information when launching a script.

-CompressWordLists = Compress generated twl/mtwl word lists.
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/messages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/messages.properties
deleted file mode 100644
index 0e2aae3..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/preferences/messages.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# ***************************************************************
-#  * 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.
-# ***************************************************************
-
-RutaFormatterPreferencePage_description=Ruta Formatter Selection
diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingMessages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingMessages.properties
deleted file mode 100644
index 21148fe..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/text/folding/RutaFoldingMessages.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-RutaFoldingPreferenceBlock_0=Add

-RutaFoldingPreferenceBlock_2=You may use only english letters and _.

-RutaFoldingPreferenceBlock_3=Add block

-RutaFoldingPreferenceBlock_4=Enter name of block ("if" for example)

-RutaFoldingPreferenceBlock_6=Remove

-RutaFoldingPreferenceBlock_10=Block folding

-RutaFoldingPreferenceBlock_11=Off

-RutaFoldingPreferenceBlock_12=Fold all blocks except following:

-RutaFoldingPreferenceBlock_13=Fold only following blocks:

-RutaFoldingPreferenceBlock_14=Comments

-RutaFoldingPreferenceBlock_15=Join comments divided by empty lines

-RutaFoldingPreferenceBlock_16=Initially fold

-DefaultFoldingPreferenceBlock_methods=&Procedures and other blocks

-DefaultFoldingPreferenceBlock_innerTypes=&Namespaces

-DefaultFoldingPreferenceBlock_headers=&Header Comments

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/text/messages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/text/messages.properties
deleted file mode 100644
index 63c74ee..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/text/messages.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-TclRequirePackageMarkerResolution_addPackageToBuildpath=Add package {0} to buildpath.

diff --git a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/wizards/RutaWizardMessages.properties b/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/wizards/RutaWizardMessages.properties
deleted file mode 100644
index 4fa0311..0000000
--- a/trunk/ruta-ep-ide-ui/src/main/resources/org/apache/uima/ruta/ide/ui/wizards/RutaWizardMessages.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-ProjectCreationWizard_title=Create Ruta project

-

-ProjectCreationWizardFirstPage_title=Create a Ruta project

-ProjectCreationWizardFirstPage_description=Create a Ruta project in the workspace or in an external location

diff --git a/trunk/ruta-ep-ide-ui/templates/templates.xml b/trunk/ruta-ep-ide-ui/templates/templates.xml
deleted file mode 100644
index 4581de5..0000000
--- a/trunk/ruta-ep-ide-ui/templates/templates.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>

-<!--

-  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.

--->

-

-<templates>

-	<template id="org.apache.uima.ruta.editor.template.RECA"

-		context="rutaUniversalTemplateContextType" name="RECA"

-		description="Rule element with condition and action" icon="icons/obj16/ruta_obj.png"

-		autoinsert="true">${cursor}Type{C() -&gt; A()};</template>

-	<template id="org.apache.uima.ruta.editor.template.CALL"

-		context="rutaUniversalTemplateContextType" name="CALL" description="Simple CALL rule"

-		icon="icons/obj16/ruta_obj.png" autoinsert="true">Document{->CALL(${cursor})};

-	</template>

-    <template id="org.apache.uima.ruta.editor.template.EXEC"

-        context="rutaUniversalTemplateContextType" name="EXEC" description="Simple EXEC rule"

-        icon="icons/obj16/ruta_obj.png" autoinsert="true">Document{->EXEC(${cursor})};</template>

-	<template id="org.apache.uima.ruta.editor.template.BLOCK"

-		context="rutaUniversalTemplateContextType" name="BLOCK" description="Simple BLOCK"

-		icon="icons/obj16/ruta_obj.png" autoinsert="true">BLOCK(${cursor}Name)

-		Document{} {&#13;&#13;};</template>

-	<template id="org.apache.uima.ruta.editor.template.MF"

-		context="rutaUniversalTemplateContextType" name="MF" description="Common MARKFAST rule"

-		icon="icons/obj16/ruta_obj.png" autoinsert="true">Document{-&gt;MARKFAST(${cursor}Type, List)};</template>

-

-</templates>

diff --git a/trunk/ruta-ep-ide/marker-file-identifying-eclipse-plugin b/trunk/ruta-ep-ide/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-ep-ide/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/ruta-ep-ide/plugin.properties b/trunk/ruta-ep-ide/plugin.properties
deleted file mode 100644
index abb8b58..0000000
--- a/trunk/ruta-ep-ide/plugin.properties
+++ /dev/null
@@ -1,179 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-rutaContentType=UIMA Ruta Source File

-

-parserBuildParticipant.name = UIMA Ruta Source Parser

-taskTagsBuildParticipant.name = UIMA Ruta Task Tags Build Participant

-

-sourceParser.name = UIMA Ruta Source Parser

-sourceParser.description = UIMA Ruta Source Parser

-

-pluginProvider=Apache UIMA

-pluginName=Apache UIMA Workbench IDE

-

-Console.PreferencePage = Console

-Interpreters.PreferencePage = Interpreters

-Debug.PreferencePage = Debug

-Engines.PreferencePage = Engines

-

-Debug.PropertyPage = Debug

-Engines.PropertyPage = Engines

-

-ToggleBreakpoint.label = Toggle &Breakpoint

-EnableDisableBreakpoint.label = Toggl&e Enablement

-BreakpointProperties.label = Breakpoint Properties...

-ScriptWatch.label=Watch

-ScriptInspect.label=Inspect

-ScriptDisplay.label=Display

-WatchVariable = Watch as Variable

-showStaticAction.label=Show Function Objects

-VariablesViewRutaSubmenu.label=UIMA Ruta

-scriptConsole = Script Console

-

-RutaConsole.Console = UIMA Ruta Console

-RutaConsole.Actions.PasteToRutaConsole = Paste to UIMA Ruta Console

-

-

-RutaVariableHoverLabel=UIMA Ruta Debug Hover

-RutaVariableHoverDescription=UIMA Ruta Debug Hover

-

-variablesViewMenu.name = UIMA Ruta

-

-showGlobalVarsCommand.name = Show Global Variables

-showGlobalVarsCommand.description = Show Global Variables

-showGlobalVarsCommand.tooltip = Toggles global variable display

-

-showClassVarsCommand.name = Show Class Variables

-showClassVarsCommand.description = Show Class Variables

-showClassVarsCommand.tooltip = Toggles class variable display

-

-showLocalVarsCommand.name = Show Local Variables

-showLocalVarsCommand.description = Show Local Variables

-showLocalVarsCommand.tooltip = Toggles local variable display

-

-

-PreferencePage.name = UIMA Ruta

-PropertyPage.name = UIMA Ruta

-

-DebuggingEngine.name = UIMA Ruta debugging engine

-DebuggingEngine.description = UIMA Ruta debugging engine

-

-RutaLaunchShortcut.name = UIMA Ruta Testing

-RutaLaunchShortcut.description = UIMA Ruta Testing

-

-

-RutaPerspective.name = UIMA Ruta

-

-# Context

-RutaEditContext.name = Editing UIMA Ruta Source

-RutaEditContext.description = Editing UIMA Ruta Source Context

-

-# Editor

-RutaEditor.name = UIMA Ruta Source Editor 

-

-# Wizards

-RutaWizardsCategory.name = UIMA Ruta

-

-NewRutaPackage.label=UIMA Ruta Package

-NewRutaPackage.description=Create a Ruta package

-

-NewRutaFile.label=UIMA Ruta File

-NewRutaFile.description=Create a UIMA Ruta script file

-

-NewSourceFolderCreationWizard.label=Source Folder

-NewSourceFolderCreationWizard.description=Create a DLTK source folder

-

-# Preference Pages

-RutaPreferencePage.name = UIMA Ruta

-RutaEditorPreferencePage.name = Editor

-RutaEditorAssistancePreferencePage.name = Code Assistance

-RutaEditorSyntaxColoringPreferencePage.name = Syntax Coloring

-RutaEditorSmartTypingPreferencePage.name = Smart Typing

-RutaEditorFoldingPreferencePage.name = Folding

-RutaCodeTemplatesPreferencePage.name = Templates

-RutaEditorHoversPreferencePage.name = Hovers

-RutaTaskTags.name = Task Tags

-

-# Property Pages

-RutaPropertyPage.name = UIMA Ruta

-RutaBuildPathPropertyPage.name = Build Path

-RutaTodoPropertyPage.name = Todo Properties

-

-# Search page

-RutaSearchPage.label = UIMA Ruta Search

-

-# Template

-RutaTemplateContext.name = UIMA Ruta

-

-# Views

-RutaViewsCategory.name = UIMA Ruta

-RutaNamespacesView.name = UIMA Ruta Namespaces

-RutaFunctionsView.name = UIMA Ruta Functions

-RutaPackagesView.name = UIMA Ruta Packages

-RutaDocumentationView.name = UIMA Ruta Documentation

-

-# Decorators

-RutaProjectDecorator.name = UIMA Ruta Project Decorator

-

-# Actions

-RutaActionSet.label= UIMA Ruta Navigation

-RutaActionSet.description= UIMA Ruta Navigation Action Set

-

-OpenTypeAction.label=Open &Namespace...

-OpenTypeAction.tooltip=Open Namespace

-

-# Navigate menu

-ActionDefinition.OpenType.name= Open Namespace

-ActionDefinition.OpenType.description= Open a namespace in a Ruta editor

-

-# Search page

-RutaSearchActionSet.label = UIMA Ruta Search

-RutaSearchActionSet.description = UIMA Ruta Search Actions

-

-OpenRutaSearchPageAction.label = UIMA Ruta...

-

-SearchMenu.label = Search

-

-RutaEditorAssistancePreferencePage.name = Code Assistance 

-

-OpenTypeInHierarchyAction.label=Open Type in Hierarch&y...

-OpenTypeInHierarchyAction.tooltip=Opens a Type in a Type Hierarchy

-

-

-ActionDefinition.sourceQuickMenu.name= Show Source Quick Menu

-ActionDefinition.sourceQuickMenu.description= Shows the source quick menu

-ActionDefinition.comment.name= Comment

-ActionDefinition.comment.description= Turn the selected lines into DLTK comments

-ActionDefinition.uncomment.name= Uncomment

-ActionDefinition.uncomment.description= Uncomment the selected DLTK comment lines

-ActionDefinition.toggleComment.name= Toggle Comment

-ActionDefinition.toggleComment.description= Toggle comment the selected lines

-ActionDefinition.addBlockComment.name= Add Block Comment

-ActionDefinition.addBlockComment.description= Enclose the selection with a block comment

-ActionDefinition.removeBlockComment.name= Remove Block Comment

-ActionDefinition.removeBlockComment.description= Remove the block comment enclosing the selection

-ActionDefinition.indent.name= Indent

-ActionDefinition.indent.description= Indent

-ActionDefinition.format.name= Format

-ActionDefinition.format.description= Format the selected text

-ActionDefinition.copyQualifiedName.name= Copy Qualified Name

-ActionDefinition.copyQualifiedName.description= Copy a fully qualified name to the system clipboard

-ActionDefinition.quickformat.name= Format Element

-ActionDefinition.quickformat.description= Format enclosing text element
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide/plugin.xml b/trunk/ruta-ep-ide/plugin.xml
deleted file mode 100644
index cbe8935..0000000
--- a/trunk/ruta-ep-ide/plugin.xml
+++ /dev/null
@@ -1,265 +0,0 @@
-<?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.

--->

-

-<?eclipse version="3.4"?>

-<plugin

->

-  <extension-point id="rutaCommandProcessor" name="rutaCommandProcessor" schema="schema/rutaCommandProcessor.exsd"/>

-   <extension-point id="rutaCommandDetector" name="rutaCommandDetector" schema="schema/rutaCommandDetector.exsd"/>

-   <extension-point id="rutakeywords" name="rutakeywords" schema="schema/rutakeywords.exsd"/>

-   <extension-point id="rutaExtension" name="rutaExtension" schema="schema/rutaExtension.exsd"/>

-   <extension-point id="conditionExtension" name="conditionExtension" schema="schema/conditionExtension.exsd"/>

-   <extension-point id="actionExtension" name="actionExtension" schema="schema/actionExtension.exsd"/>

-   <extension-point id="engineExtension" name="engineExtension" schema="schema/engineExtension.exsd"/>

-   <extension-point id="booleanFunctionExtension" name="booleanFunctionExtension" schema="schema/booleanFunctionExtension.exsd"/>

-   <extension-point id="typeFunctionExtension" name="typeFunctionExtension" schema="schema/typeFunctionExtension.exsd"/>

-   <extension-point id="numberFunctionExtension" name="numberFunctionExtension" schema="schema/numberFunctionExtension.exsd"/>

-   <extension-point id="stringFunctionExtension" name="stringFunctionExtension" schema="schema/stringFunctionExtension.exsd"/>

-   <extension-point id="rutaSemanticHighlighting" name="rutaSemanticHighlighting" schema="schema/rutaSemanticHighlighting.exsd"/>

-   <extension-point id="rutaTestEngine" name="rutaTestEngine" schema="schema/rutaTestEngine.exsd"/>

-   <extension-point id="blockExtension" name="blockExtension" schema="schema/blockExtension.exsd"/>

-   <extension

-         id="nature"

-         point="org.eclipse.core.resources.natures">

-      <runtime>

-         <run class="org.apache.uima.ruta.ide.core.RutaNature"/>

-      </runtime>

-   </extension>

-   <extension

-         point="org.eclipse.dltk.validators.core.validator">

-      <validatorType

-            class="org.apache.uima.ruta.ide.core.packages.RutaPackageCheckerType"

-            id="org.apache.uima.ruta.ide.packageChecker"

-            nature="org.apache.uima.ruta.ide.nature">

-      </validatorType>

-   </extension>

-   

-   <extension

-         point="org.eclipse.dltk.core.language">

-      <language

-            class="org.apache.uima.ruta.ide.core.RutaLanguageToolkit"

-            nature="org.apache.uima.ruta.ide.nature"/>

-   </extension>

-   <extension

-         point="org.eclipse.dltk.core.sourceElementParsers">

-      <parser

-            class="org.apache.uima.ruta.ide.core.parser.RutaSourceElementParser"

-            nature="org.apache.uima.ruta.ide.nature"

-            priority="0">

-      </parser>

-   </extension>

-   <extension

-         point="org.eclipse.dltk.core.selectionEngine">

-      <selectionEngine

-            class="org.apache.uima.ruta.ide.core.codeassist.RutaSelectionEngine"

-            nature="org.apache.uima.ruta.ide.nature"

-            priority="0">

-      </selectionEngine>

-   </extension>

-   <extension

-         point="org.eclipse.dltk.core.completionEngine">

-      <completionEngine

-            class="org.apache.uima.ruta.ide.core.codeassist.RutaCompletionEngine"

-            nature="org.apache.uima.ruta.ide.nature"

-            priority="0">

-      </completionEngine>

-   </extension>

-   <extension

-         point="org.eclipse.dltk.core.search">

-      <seachFactory

-            class="org.apache.uima.ruta.ide.core.RutaSearchFactory"

-            nature="org.apache.uima.ruta.ide.nature"

-            priority="0">

-      </seachFactory>

-   </extension>

-   <extension

-         point="org.eclipse.dltk.core.callHierarchy">

-      <callHerarchiesFactory

-            class="org.apache.uima.ruta.ide.core.RutaCallHierarchyFactory"

-            nature="org.apache.uima.ruta.ide.nature"

-            priority="0">

-      </callHerarchiesFactory>

-   </extension>

-   <extension

-        point="org.eclipse.core.runtime.contentTypes">

-     <content-type

-           base-type="org.eclipse.core.runtime.text"

-           file-extensions="ruta"

-           id="org.apache.uima.ruta.ide.rutaContentType"

-           name="%rutaContentType"

-           priority="high">

-        <describer

-              class="org.apache.uima.ruta.ide.core.RutaContentDescriber"

-              plugin="org.apache.uima.ruta.ide.core">

-        </describer>       

-     </content-type>

-  </extension>

-   <extension

-         point="org.eclipse.dltk.core.sourceParsers">

-      <parserContribution

-            natureId="org.apache.uima.ruta.ide.nature">

-         <parser

-               class="org.apache.uima.ruta.ide.core.parser.RutaSourceParserFactory"

-               description="%sourceParser.description"

-               id="org.apache.uima.ruta.ide.sourceParser"

-               name="%sourceParser.name"

-               priority="0" />

-      </parserContribution>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.ide.rutakeywords">

-      <keywords

-            class="org.apache.uima.ruta.ide.core.RutaKeywords">

-      </keywords>

-   </extension>

- <extension

-         point="org.eclipse.dltk.core.mixin">

-      <mixin

-            class="org.apache.uima.ruta.ide.core.mixin.RutaMixinParser"

-            nature="org.apache.uima.ruta.ide.nature"

-            priority="0">

-      </mixin>

-   </extension>

-   <extension

-         point="org.eclipse.core.runtime.preferences">

-      <initializer

-            class="org.apache.uima.ruta.ide.core.RutaPreferenceInitializer">

-      </initializer>

-   </extension>
-   <extension

-    point="org.eclipse.dltk.core.buildParticipant">

-      <buildParticipant

-            class="org.eclipse.dltk.core.builder.ParserBuildParticipantFactory"

-            id="org.apache.uima.ruta.ide.buildParticipant.parser"

-            name="%parserBuildParticipant.name"

-            nature="org.apache.uima.ruta.ide.nature">

-      </buildParticipant>

-    <buildParticipant

-      class="org.apache.uima.ruta.ide.core.parser.RutaTodoParserType"

-      id="org.apache.uima.ruta.ide.todo"

-      name="%taskTagsBuildParticipant.name"

-      nature="org.apache.uima.ruta.ide.nature">

-      <requires

-            id="org.apache.uima.ruta.ide.buildParticipant.parser">

-      </requires>

-    </buildParticipant>

-    <buildParticipant

-          class="org.apache.uima.ruta.ide.core.builder.RutaBuilder"

-          id="org.apache.uima.ruta.ide.core.builder"

-          name="UIMA Ruta Descriptor Builder"

-          nature="org.apache.uima.ruta.ide.nature">

-    </buildParticipant>

-  </extension>

-  

-  

-

-

-

-

-

-

-  <!--extension

-    point="org.eclipse.debug.ui.launchConfigurationTabGroups">

-    <launchConfigurationTabGroup

-    type="org.apache.uima.ruta.ide.launching.localRutaApplication"

-    class="org.apache.uima.ruta.ide.debug.ui.launchConfiguration.RutaTabGroup"

-    id="org.apache.uima.ruta.ide.debug.ui.RutaTabGroup">

-    <launchMode 

-    mode="debug"

-    perspective="org.eclipse.debug.ui.DebugPerspective"

-    description="Debug">

-    </launchMode>

-    </launchConfigurationTabGroup>

-    </extension-->   

-

-

-

-

-

-

-

-

-

-

-

-<!--

-  <extension point="org.eclipse.ui.propertyPages">

-    <page

-      class="org.apache.uima.ruta.ide.debugger.preferences.RutaDebuggerPreferencePage"

-      category="org.apache.uima.ruta.ide.propertyPage.debug.engines"

-      id="org.apache.uima.ruta.ide.propertyPage.debug.engines.debugger"

-      name="%PropertyPage.name">

-      <enabledWhen>

-        <adapt type="org.eclipse.core.resources.IProject">

-          <test

-            property="org.eclipse.core.resources.projectNature"

-            value="org.apache.uima.ruta.ide.nature" />

-        </adapt>

-      </enabledWhen>

-    </page>

-  </extension>

-  -->

-<!--

-  <extension

-        point="org.eclipse.ui.propertyPages">

-     <page

-           category="org.apache.uima.ruta.ide.propertyPage"

-           class="org.apache.uima.ruta.ide.debug.ui.preferences.RutaDebugPreferencePage"

-           id="org.apache.uima.ruta.ide.propertyPage.debug"

-           name="%Debug.PropertyPage">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-     </page>

-     <page

-           category="org.apache.uima.ruta.ide.propertyPage.debug"

-           class="org.apache.uima.ruta.ide.debug.ui.preferences.RutaDebuggingEnginePreferencePage"

-           id="org.apache.uima.ruta.ide.propertyPage.debug.engines"

-           name="%Engines.PropertyPage">

-        <enabledWhen>

-           <adapt

-                 type="org.eclipse.core.resources.IProject">

-              <test

-                    property="org.eclipse.core.resources.projectNature"

-                    value="org.apache.uima.ruta.ide.nature">

-              </test>

-           </adapt>

-        </enabledWhen>

-     </page>

-  </extension>

-  -->

-   <!--

-     <extension

-           point="org.eclipse.dltk.ui.buildpathContainerPage">

-        <buildpathContainerPage

-              class="org.apache.uima.ruta.ide.ui.wizards.RutaJavaContainerPage"

-              id="org.apache.uima.ruta.ide.java.page"

-              name="Java Library"

-              nature="org.apache.uima.ruta.ide.nature">

-        </buildpathContainerPage>

-     </extension>

-     -->
-</plugin>

diff --git a/trunk/ruta-ep-ide/pom.xml b/trunk/ruta-ep-ide/pom.xml
deleted file mode 100644
index 4cb38ea..0000000
--- a/trunk/ruta-ep-ide/pom.xml
+++ /dev/null
@@ -1,256 +0,0 @@
-<?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.    

--->

-

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-ep-ide</artifactId>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-    <postNoticeText>${uniWueNoticeText}</postNoticeText>

-  </properties>

-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <url>${uimaWebsiteUrl}</url>

-  <description>Provides the UIMA Ruta development environment for Eclipse</description>

-  <dependencies>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>launching</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.validators</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>runtime</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>resources</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.core</groupId>

-      <artifactId>filesystem</artifactId>

-      <version>[1.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.swt</groupId>

-      <artifactId>org.eclipse.swt.win32.win32.x86</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>preferences</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>app</artifactId>

-      <version>[1.3.0,2.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.emf.ecore</groupId>

-      <artifactId>xmi</artifactId>

-      <version>[2.7.0,3.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jdt</groupId>

-      <artifactId>launching</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jdt</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.3.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.commons</groupId>

-      <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

-    </dependency>

-  </dependencies>

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-ep-ide</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-ide</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-ide</developerConnection>

-  </scm>

-  <build>

-    <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

-    <finalName>org.apache.uima.ruta.ide_${parsedVersion.osgiVersion}</finalName>

-    <resources>

-      <resource>

-        <directory>.</directory>

-        <includes>

-          <include>plugin.xml</include>

-          <include>plugin.properties</include>

-        </includes>

-      </resource>

-      <resource>

-        <directory>src/main/resources</directory>

-      </resource>

-      <resource>

-        <directory>src/main/readme_src</directory>

-      </resource>

-    </resources>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>release.properties</exclude> <!-- release generated artifact -->

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaLexer.tokens</exclude> <!-- grammar tokens -->

-                  <exclude>src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.tokens</exclude> <!-- grammar tokens -->

-                  <exclude>issuesFixed/**</exclude>

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-

-    <plugins>

-      <!-- generate java code for antlr grammars -->

-      <plugin>

-        <groupId>org.antlr</groupId>

-        <artifactId>antlr3-maven-plugin</artifactId>

-        <version>3.5.2</version>

-        <executions>

-          <execution>

-            <id>run antlr</id>

-            <phase>generate-sources</phase>

-            <goals>

-              <goal>antlr</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-      <plugin>

-        <groupId>org.codehaus.mojo</groupId>

-        <artifactId>build-helper-maven-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>add-source</id>

-            <phase>generate-sources</phase>

-            <goals>

-              <goal>add-source</goal>

-            </goals>

-            <configuration>

-              <sources>

-                <source>${basedir}/target/generated-sources/antlr3

-                </source>

-              </sources>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-      <plugin>

-        <groupId>org.apache.felix</groupId>

-        <artifactId>maven-bundle-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>uima-bundle</id>

-            <configuration>

-              <instructions>

-                <Bundle-SymbolicName>org.apache.uima.ruta.ide;singleton:=true</Bundle-SymbolicName>

-                <Bundle-Activator>org.apache.uima.ruta.ide.RutaIdeCorePlugin</Bundle-Activator>

-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>

-                <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>

-                <_nouses>true</_nouses>

-                <Export-Package>

-                  org.apache.uima.ruta.ide.*

-                </Export-Package>

-                <Require-Bundle>

-                  org.eclipse.core.runtime,

-                  org.eclipse.dltk.core;bundle-version="3.0.0",

-                  org.eclipse.core.resources,

-                  org.eclipse.core.filesystem,

-                  org.eclipse.dltk.launching;bundle-version="3.0.0",

-                  org.eclipse.dltk.validators.core;bundle-version="3.0.0",

-                  org.eclipse.ui,

-                  org.apache.uima.runtime,

-                  org.apache.uima.ruta.engine,

-                  org.eclipse.search,

-                  org.eclipse.debug.ui,

-                  org.eclipse.ui.console,

-                  org.eclipse.jdt.core,

-                  org.eclipse.jdt.debug.ui,

-                  org.eclipse.core.variables,

-                  org.eclipse.jdt.launching

-                </Require-Bundle>

-                <!-- <Bundle-ClassPath>.,antlr-runtime-3.4.jar,stringtemplate-3.2.1.jar</Bundle-ClassPath> 

-                  !org.eclipse.core.runtime, !org.antlr.runtime, !org.antlr.stringtemplate, * -->

-                <Import-Package>

-                </Import-Package>

-                <Bundle-Localization>plugin</Bundle-Localization>

-              </instructions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide/schema/actionExtension.exsd b/trunk/ruta-ep-ide/schema/actionExtension.exsd
deleted file mode 100644
index 3bad416..0000000
--- a/trunk/ruta-ep-ide/schema/actionExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="actionExtension" name="actionExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="action"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="action">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-         <attribute name="engine" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IRutaActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/blockExtension.exsd b/trunk/ruta-ep-ide/schema/blockExtension.exsd
deleted file mode 100644
index b2ec9f0..0000000
--- a/trunk/ruta-ep-ide/schema/blockExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="blockExtension" name="blockExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence>

-            <element ref="block" minOccurs="1" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="block">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IIDEBlockExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-         <attribute name="engine" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IRutaBlockExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/booleanFunctionExtension.exsd b/trunk/ruta-ep-ide/schema/booleanFunctionExtension.exsd
deleted file mode 100644
index 0b485af..0000000
--- a/trunk/ruta-ep-ide/schema/booleanFunctionExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="booleanFunctionExtension" name="booleanFunctionExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="booleanFunction"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="booleanFunction">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-         <attribute name="engine" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IRutaActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/conditionExtension.exsd b/trunk/ruta-ep-ide/schema/conditionExtension.exsd
deleted file mode 100644
index c0977e5..0000000
--- a/trunk/ruta-ep-ide/schema/conditionExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="conditionExtension" name="conditionExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence>

-            <element ref="condition" minOccurs="1" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="condition">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-         <attribute name="engine" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IRutaConditionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/engineExtension.exsd b/trunk/ruta-ep-ide/schema/engineExtension.exsd
deleted file mode 100644
index df3c830..0000000
--- a/trunk/ruta-ep-ide/schema/engineExtension.exsd
+++ /dev/null
@@ -1,120 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="engineExtension" name="engineExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="engine"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="engine">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IEngineLoader"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/numberFunctionExtension.exsd b/trunk/ruta-ep-ide/schema/numberFunctionExtension.exsd
deleted file mode 100644
index 08aa909..0000000
--- a/trunk/ruta-ep-ide/schema/numberFunctionExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="numberFunctionExtension" name="numberFunctionExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="numberFunction"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="numberFunction">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-         <attribute name="engine" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IRutaActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/rutaCommandDetector.exsd b/trunk/ruta-ep-ide/schema/rutaCommandDetector.exsd
deleted file mode 100644
index 715233b..0000000
--- a/trunk/ruta-ep-ide/schema/rutaCommandDetector.exsd
+++ /dev/null
@@ -1,123 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="tmCommandProcessor" name="tmCommandProcessor"/>

-      </appInfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="detector"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute translatable="true"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="detector">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.IRutaCommandDetector"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="since"/>

-      </appInfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="copyright"/>

-      </appInfo>

-      <documentation>

-         

-      </documentation>

-   </annotation>

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/rutaCommandProcessor.exsd b/trunk/ruta-ep-ide/schema/rutaCommandProcessor.exsd
deleted file mode 100644
index 7713046..0000000
--- a/trunk/ruta-ep-ide/schema/rutaCommandProcessor.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="tmCommandProcessor" name="tmCommandProcessor"/>

-      </appInfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="processor"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute translatable="true"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="processor">

-      <complexType>

-         <attribute name="id" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.IRutaCommandProcessor"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="since"/>

-      </appInfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="copyright"/>

-      </appInfo>

-      <documentation>

-         

-      </documentation>

-   </annotation>

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/rutakeywords.exsd b/trunk/ruta-ep-ide/schema/rutakeywords.exsd
deleted file mode 100644
index 10d1477..0000000
--- a/trunk/ruta-ep-ide/schema/rutakeywords.exsd
+++ /dev/null
@@ -1,115 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="tmkeywords" name="tmkeywords"/>

-      </appInfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence>

-            <element ref="keywords" minOccurs="1" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute translatable="true"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="keywords">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.IRutaKeywords"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="since"/>

-      </appInfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/stringFunctionExtension.exsd b/trunk/ruta-ep-ide/schema/stringFunctionExtension.exsd
deleted file mode 100644
index 64fd2b4..0000000
--- a/trunk/ruta-ep-ide/schema/stringFunctionExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="stringFunctionExtension" name="stringFunctionExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="stringFunction"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="stringFunction">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-         <attribute name="engine" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IRutaActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/schema/typeFunctionExtension.exsd b/trunk/ruta-ep-ide/schema/typeFunctionExtension.exsd
deleted file mode 100644
index 1fd8fdd..0000000
--- a/trunk/ruta-ep-ide/schema/typeFunctionExtension.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.ide" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appinfo>

-         <meta.schema plugin="org.apache.uima.ruta.ide" id="typeFunctionExtension" name="typeFunctionExtension"/>

-      </appinfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appinfo>

-            <meta.element />

-         </appinfo>

-      </annotation>

-      <complexType>

-         <sequence minOccurs="1" maxOccurs="unbounded">

-            <element ref="typeFunction"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute translatable="true"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="typeFunction">

-      <complexType>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-         <attribute name="engine" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appinfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.extensions.IRutaActionExtension"/>

-               </appinfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="since"/>

-      </appinfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="examples"/>

-      </appinfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="apiinfo"/>

-      </appinfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appinfo>

-         <meta.section type="implementation"/>

-      </appinfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaLexer.g b/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaLexer.g
deleted file mode 100644
index 13ecc45..0000000
--- a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaLexer.g
+++ /dev/null
@@ -1,554 +0,0 @@
-lexer grammar RutaLexer;

-options {

-	language = Java;

-}

-

-

-tokens {

-	DocComment;

-	Annotation;

-	ListIdentifier;

-}

-

-@lexer::header {

-/*

- * 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.ruta.ide.core.parser;

-}

-@lexer::members {

-  public int implicitLineJoiningLevel = 0;

-  public int startPos=-1;

-  public void emitErrorMessage(String msg) {

-  }

-}

-

-

-TRIE

-  : 'TRIE'

-  ;

-

-CONTAINS

-  : 'CONTAINS'

-  ;

-

-DECLARE

-  : 'DECLARE'

-  ;

-

-WORDLIST

-  : 'WORDLIST'

-  ;

-

-WORDTABLE

-  : 'WORDTABLE'

-  ;

-

-RESOURCE

-  : 'RESOURCE'

-  ;

-

-AND

-  : 'AND'

-  ;

-

-CONTEXTCOUNT

-  : 'CONTEXTCOUNT'

-  ;

-

-COUNT

-  : 'COUNT'

-  ;

-

-TOTALCOUNT

-  : 'TOTALCOUNT'

-  ;

-

-CURRENTCOUNT

-  : 'CURRENTCOUNT'

-  ;

-

-INLIST

-  : 'INLIST'

-  ;

-

-

-LAST

-  : 'LAST'

-  ;

-

-MOFN

-  : 'MOFN'

-  ;

-

-NEAR

-  : 'NEAR'

-  ;

-

-OR

-  : 'OR'

-  ;

-

-PARTOF

-  : 'PARTOF'

-  ;

-  

-PARTOFNEQ

-  : 'PARTOFNEQ'

-  ;

-

-POSITION

-  : 'POSITION'

-  ;

-

-REGEXP

-  : 'REGEXP'

-  ;

-

-SCORE

-  : 'SCORE'

-  ;

-

-VOTE

-  : 'VOTE'

-  ;

-

-IF

-  : 'IF'

-  ;

-

-FEATURE

-  : 'FEATURE'

-  ;

-

-PARSE

-  : 'PARSE'

-  ;

-

-CREATE

-  : 'CREATE'

-  ;

-

-GATHER

-  : 'GATHER'

-  ;

-

-FILL

-  : 'FILL'

-  ;

-

-ATTRIBUTE

-  : 'ATTRIBUTE'

-  ;

-

-COLOR

-  : 'COLOR'

-  ;

-

-DEL

-  : 'DEL'

-  ;

-

-LOG

-  : 'LOG'

-  ;

-

-MARK

-  : 'MARK'

-  ;

-

-MARKSCORE

-  : 'MARKSCORE'

-  ;

-

-MARKONCE

-  : 'MARKONCE'

-  ;

-

-MARKFAST

-  : 'MARKFAST'

-  ;

-  

-MARKTABLE

-  : 'MARKTABLE'

-  ;

-  

-MARKLAST

-  : 'MARKLAST'

-  ;

-  

-MARKFIRST

-  : 'MARKFIRST'

-  ;

-

-REPLACE

-  : 'REPLACE'

-  ;

-

-RETAINTYPE

-  : 'RETAINTYPE'

-  ;

-

-FILTERTYPE

-  : 'FILTERTYPE'

-  ;

-

-CALL

-  : 'CALL'

-  ;

-

-

-EXEC

-  : 'EXEC'

-  ;

-

-CONFIGURE

-  : 'CONFIGURE'

-  ;

-

-ASSIGN

-  : 'ASSIGN'

-  ;

-

-SETFEATURE

-  : 'SETFEATURE'

-  ;

-

-GETFEATURE

-  : 'GETFEATURE'

-  ;

-

-UNMARK

-  : 'UNMARK'

-  ;

-

-UNMARKALL

-  : 'UNMARKALL'

-  ;

-

-TRANSFER

-  : 'TRANSFER'

-  ;

-

-

-SHIFT   

-  : 'SHIFT'  

-  ;

-

-DYNAMICANCHORING  

-  : 'DYNAMICANCHORING'   

-  ;

-

-GREEDYANCHORING   

-  : 'GREEDYANCHORING'  

-  ;

-

-TRIM

-  : 'TRIM'

-  ;

-

-BEFORE

-  : 'BEFORE'

-  ;

-

-AFTER

-  : 'AFTER'

-  ;

-

-IS  

-  : 'IS'   

-  ;

-

-

-STARTSWITH  

-  : 'STARTSWITH'   

-  ;

-

-ENDSWITH  

-  : 'ENDSWITH'   

-  ;

-

-ADDRETAINTYPE

-  : 'ADDRETAINTYPE'

-  ;

-

-REMOVERETAINTYPE

-  : 'REMOVERETAINTYPE'

-  ;

-

-ADDFILTERTYPE

-  : 'ADDFILTERTYPE'

-  ;

-

-REMOVEFILTERTYPE

-  : 'REMOVEFILTERTYPE'

-  ;

-

-NOT

-  : 'NOT'

-  ;

-

-ADD : 'ADD';

-REMOVE  : 'REMOVE';

-REMOVEDUPLICATE : 'REMOVEDUPLICATE';

-MERGE   : 'MERGE';

-GET : 'GET';

-GETLIST : 'GETLIST';

-SIZE  : 'SIZE';

-MATCHEDTEXT : 'MATCHEDTEXT';

-REMOVESTRING  : 'REMOVESTRING';

-CLEAR   :  'CLEAR';

-

-THEN 

-  :   '->'

-  ;

-THEN2 

-  :   '<-'

-  ;

-  

-LogLevel:

-  'finest' | 'finer' | 'fine' | 'config' | 'info' | 'warning' | 'severe'

-  ; 

-

-OldColor 

-  : 'black' | 'maroon' | 'green' | 'olive' | 'navy' | 'purple' | 'teal' | 'gray' | 'silver' | 'red' | 'lime' | 'yellow' | 'blue' | 'fuchsia' | 'aqua'

-  ;

-

-PackageString   : 'PACKAGE';

-ScriptString  : 'SCRIPT';

-EngineString  : 'ENGINE';

-UimafitString : 'UIMAFIT';

-BlockString   : 'BLOCK';

-TypeString  : 'TYPE';

-IntString : 'INT';

-DoubleString  : 'DOUBLE';

-FloatString : 'FLOAT';

-StringString  : 'STRING';

-BooleanString : 'BOOLEAN';

-TypeSystemString: 'TYPESYSTEM';

-ImportString    :   'IMPORT';

-FromString      :   'FROM';

-AsString        :   'AS';

-SymbolString  : 'SYMBOL';

-CONDITION : 'CONDITION';  

-ACTION    : 'ACTION';

-BOOLEANLIST 

-  :  'BOOLEANLIST';

-INTLIST : 'INTLIST';

-DOUBLELIST

-  :  'DOUBLELIST';

-FLOATLIST

-  :  'FLOATLIST';

-STRINGLIST

-  : 'STRINGLIST'; 

-TYPELIST: 'TYPELIST';

-

-

-

-EXP   : 'EXP';

-LOGN  : 'LOGN';

-SIN : 'SIN';

-COS : 'COS';

-TAN : 'TAN';

-XOR :   'XOR';

-TRUE  : 'true';

-FALSE   : 'false';

-NULL : 'null';

-

-STARTANCHOR 

-  :  '@';

-

-HexLiteral : '0' ('x'|'X') HexDigit+ IntegerTypeSuffix? ;

-

-DecimalLiteral : ('0' | '1'..'9' '0'..'9'*) IntegerTypeSuffix? ;

-

-OctalLiteral : '0' ('0'..'7')+ IntegerTypeSuffix? ;

-

-fragment

-HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;

-

-fragment

-IntegerTypeSuffix : ('l'|'L') ;

-

-FloatingPointLiteral

-    :   ('0'..'9')+ '.' ('0'..'9')* Exponent? FloatTypeSuffix?

-    |   '.' ('0'..'9')+ Exponent? FloatTypeSuffix?

-    //|   ('0'..'9')+ Exponent FloatTypeSuffix?

-    //|   ('0'..'9')+ Exponent? FloatTypeSuffix

-  ;

-  

-fragment

-Exponent : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;

-

-fragment

-FloatTypeSuffix : ('f'|'F'|'d'|'D') ;

-

-CharacterLiteral

-    :   '\'' ( EscapeSequence | ~('\''|'\\') ) '\''

-    ;

-

-StringLiteral

-    :  '"' ( EscapeSequence | ~('\\'|'"') )* '"'

-    ;

-

-RessourceLiteral

-    :  '\'' ( EscapeSequence | ~('\\'|'\'') )* '\''

-    ;

-

-fragment

-EscapeSequence

-    :   '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')

-    |   UnicodeEscape

-    |   OctalEscape

-    ;

-

-fragment

-OctalEscape

-    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')

-    |   '\\' ('0'..'7') ('0'..'7')

-    |   '\\' ('0'..'7')

-    ;

-

-fragment

-UnicodeEscape

-    :   '\\' 'u' HexDigit HexDigit HexDigit HexDigit

-    ;

-

-  

-Identifier 

-    :   Letter (Letter|JavaIDDigit)*

-    ;

-

-

-fragment

-Letter

-    :  '\u0024' |

-       '\u0041'..'\u005a' |

-       '\u005f' |

-       '\u0061'..'\u007a' |

-       '\u00c0'..'\u00d6' |

-       '\u00d8'..'\u00f6' |

-       '\u00f8'..'\u00ff' |

-       '\u0100'..'\u1fff' |

-       '\u3040'..'\u318f' |

-       '\u3300'..'\u337f' |

-       '\u3400'..'\u3d2d' |

-       '\u4e00'..'\u9fff' |

-       '\uf900'..'\ufaff'

-    ;

-

-fragment

-JavaIDDigit

-    :  '\u0030'..'\u0039' |

-       '\u0660'..'\u0669' |

-       '\u06f0'..'\u06f9' |

-       '\u0966'..'\u096f' |

-       '\u09e6'..'\u09ef' |

-       '\u0a66'..'\u0a6f' |

-       '\u0ae6'..'\u0aef' |

-       '\u0b66'..'\u0b6f' |

-       '\u0be7'..'\u0bef' |

-       '\u0c66'..'\u0c6f' |

-       '\u0ce6'..'\u0cef' |

-       '\u0d66'..'\u0d6f' |

-       '\u0e50'..'\u0e59' |

-       '\u0ed0'..'\u0ed9' |

-       '\u1040'..'\u1049'

-   ;

-

-

-

-LPAREN  : '(' {implicitLineJoiningLevel++;} ;

-

-RPAREN  : ')' {implicitLineJoiningLevel--;} ;

-

-LBRACK  : '[' {implicitLineJoiningLevel++;} ;

-

-RBRACK  : ']' {implicitLineJoiningLevel--;} ;

-

-LCURLY  : '{' {implicitLineJoiningLevel++;} ;

-

-RCURLY  : '}' {implicitLineJoiningLevel--;} ;

-

-CIRCUMFLEX  : '^' ;

-

-DOT : '.' ;

-

-COLON   : ':' ;

-

-COMMA : ',' ;

-

-SEMI  : ';' ;

-

-PLUS  : '+' ;

-

-MINUS : '-' ;

-

-STAR  : '*' ;

-

-SLASH : '/' ;

-

-VBAR  : '|' ;

-

-AMPER : '&' ;

-

-LESS  : '<' ;

-

-GREATER : '>' ;

-

-ASSIGN_EQUAL  : '=' ;

-

-PERCENT : '%' ;

-

-QUESTION  : '?' ;

-

-EQUAL : '==' ;

-

-NOTEQUAL  : '!=' ;

-

-ALT_NOTEQUAL: '<>' ;

-

-LESSEQUAL : '<=' ;

-

-

-GREATEREQUAL  : '>=' ;

-

-

-WILDCARD  : '#' ;

-

-WS  :  (' '|'\r'|'\t'|'\u000C'|'\n') {$channel=HIDDEN;}

-    ;

-

-

-

-

-

-

-

-COMMENT

-    :   '/*'{if (input.LA(1)=='*') $type=DocComment; else $channel=HIDDEN;} ( options {greedy=false;} : . )* '*/' 

-    ;

-

-LINE_COMMENT

-    : '//' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;}

-    ;

-

-

-

-    

diff --git a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaLexer.tokens b/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaLexer.tokens
deleted file mode 100644
index f97367c..0000000
--- a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaLexer.tokens
+++ /dev/null
@@ -1,163 +0,0 @@
-STAR=149

-FloatTypeSuffix=125

-OctalLiteral=123

-LOG=37

-CONTAINS=8

-REMOVE=72

-GREATEREQUAL=162

-MARKFAST=41

-CONDITION=102

-MATCHEDTEXT=78

-COUNT=14

-LOGN=111

-DYNAMICANCHORING=58

-NOT=70

-Identifier=135

-ACTION=103

-NOTEQUAL=159

-CLEAR=80

-VBAR=151

-DOUBLELIST=106

-ENDSWITH=65

-RPAREN=137

-CREATE=31

-GREATER=154

-SIN=112

-EXP=110

-CURRENTCOUNT=16

-COS=113

-TAN=114

-TYPELIST=109

-FloatString=94

-LESS=153

-REGEXP=25

-GET=75

-PARTOF=22

-UNMARK=54

-LAST=18

-COMMENT=165

-REMOVEDUPLICATE=73

-UNMARKALL=55

-RBRACK=139

-NEAR=20

-GREEDYANCHORING=59

-LINE_COMMENT=166

-IntegerTypeSuffix=120

-MARKSCORE=39

-REMOVESTRING=79

-TRANSFER=56

-LCURLY=140

-TRIE=7

-FILTERTYPE=47

-MARKFIRST=44

-STRINGLIST=108

-MARKONCE=40

-ScriptString=86

-EngineString=87

-WS=164

-WORDTABLE=11

-WORDLIST=10

-AutomataBlockString=90

-FromString=99

-FloatingPointLiteral=126

-STARTANCHOR=118

-INTLIST=105

-OR=21

-TRIM=60

-JavaIDDigit=134

-FLOATLIST=107

-CALL=48

-Annotation=5

-FALSE=117

-LESSEQUAL=161

-RessourceLiteral=130

-VOTE=27

-Letter=133

-EscapeSequence=127

-SIZE=77

-REMOVEFILTERTYPE=69

-LBRACK=138

-CharacterLiteral=128

-DEL=36

-ATTRIBUTE=34

-TypeString=91

-SHIFT=57

-Exponent=124

-THEN2=82

-ASSIGN_EQUAL=155

-RETAINTYPE=46

-TypeSystemString=97

-AND=12

-IntString=92

-ADDFILTERTYPE=68

-BlockString=89

-HexDigit=119

-COLOR=35

-LPAREN=136

-POSITION=24

-IF=28

-LogLevel=83

-CONFIGURE=50

-SLASH=150

-THEN=81

-FILL=33

-COMMA=145

-IS=63

-AMPER=152

-REPLACE=45

-GETLIST=76

-WILDCARD=163

-AsString=100

-EQUAL=158

-GATHER=32

-INLIST=17

-PLUS=147

-BooleanString=96

-GETFEATURE=53

-DOT=143

-ListIdentifier=6

-PARTOFNEQ=23

-BOOLEANLIST=104

-ADD=71

-MARKTABLE=42

-HexLiteral=121

-XOR=115

-PERCENT=156

-MARK=38

-PARSE=30

-PackageString=85

-OldColor=84

-MARKLAST=43

-MERGE=74

-CONTEXTCOUNT=13

-BEFORE=61

-EXEC=49

-ImportString=98

-MINUS=148

-AFTER=62

-DecimalLiteral=122

-SEMI=146

-TRUE=116

-FEATURE=29

-SymbolString=101

-COLON=144

-StringLiteral=129

-StringString=95

-SCORE=26

-QUESTION=157

-ADDRETAINTYPE=66

-UnicodeEscape=131

-RCURLY=141

-STARTSWITH=64

-ASSIGN=51

-REMOVERETAINTYPE=67

-TOTALCOUNT=15

-DECLARE=9

-UimafitString=88

-DocComment=4

-MOFN=19

-OctalEscape=132

-SETFEATURE=52

-DoubleString=93

-CIRCUMFLEX=142

-ALT_NOTEQUAL=160

diff --git a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.g b/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.g
deleted file mode 100644
index 95af198..0000000
--- a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.g
+++ /dev/null
@@ -1,2536 +0,0 @@
-parser grammar RutaParser;

-

-options {

-	language = Java;

-	tokenVocab = RutaLexer;

-}

-

-

-@parser::header {

-/*

- * 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.ruta.ide.core.parser;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-import java.util.Stack;

-

-import org.antlr.runtime.BaseRecognizer;

-import org.antlr.runtime.BitSet;

-import org.antlr.runtime.CommonToken;

-import org.antlr.runtime.DFA;

-import org.antlr.runtime.EarlyExitException;

-import org.antlr.runtime.FailedPredicateException;

-import org.antlr.runtime.IntStream;

-import org.antlr.runtime.MismatchedSetException;

-import org.antlr.runtime.NoViableAltException;

-import org.antlr.runtime.Parser;

-import org.antlr.runtime.RecognitionException;

-import org.antlr.runtime.RecognizerSharedState;

-import org.antlr.runtime.Token;

-import org.antlr.runtime.TokenStream;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.DLTKToken;

-import org.eclipse.dltk.ast.declarations.Declaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.expressions.BooleanLiteral;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.references.VariableReference;

-import org.eclipse.dltk.ast.statements.Statement;

-

-import org.apache.uima.ruta.descriptor.RutaDescriptorInformation;

-

-import org.apache.uima.ruta.ide.core.extensions.RutaExternalFactory;

-import org.apache.uima.ruta.ide.parser.ast.ActionFactory;

-import org.apache.uima.ruta.ide.parser.ast.ComponentDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.ComponentReference;

-import org.apache.uima.ruta.ide.parser.ast.ComposedRuleElement;

-import org.apache.uima.ruta.ide.parser.ast.ConditionFactory;

-import org.apache.uima.ruta.ide.parser.ast.ExpressionFactory;

-import org.apache.uima.ruta.ide.parser.ast.ScriptFactory;

-import org.apache.uima.ruta.ide.parser.ast.StatementFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.apache.uima.ruta.ide.parser.ast.RutaBlock;

-import org.apache.uima.ruta.ide.parser.ast.RutaExpression;

-import org.apache.uima.ruta.ide.parser.ast.RutaRule;

-import org.apache.uima.ruta.ide.parser.ast.RutaRuleElement;

-import org.apache.uima.ruta.ide.parser.ast.RutaScriptBlock;

-import org.apache.uima.ruta.ide.parser.ast.RutaAction;

-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;

-import org.apache.uima.ruta.ide.parser.ast.RutaFeatureDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.RutaPackageDeclaration;

-}

-

-@parser::members {

-	public DLTKRutaErrorReporter reporter;

-	public ModuleDeclaration md;

-	private List<String> vars = new ArrayList<String>();	

-	private Map<String, String> varTypeMap = new HashMap<String, String>();

-	private Map<String, String> lists = new HashMap<String, String>();

-	private Map<String, String> tables = new HashMap<String, String>();

-	private Collection<String> knownExternalBlocks = new ArrayList();

-	public int length;

-	public DLTKTokenConverter converter;

-	public RutaDescriptorInformation descriptor;

-	private int level = 0;

-	private RutaExternalFactory external = new RutaExternalFactory();

-	

-	private String module;

-	private String packageString;

-	

-	private ScriptFactory scriptFactory = new ScriptFactory();

-	

-	public void setKnownExternalBlocks(Collection<String> knownExternalBlocks) {

-		this.knownExternalBlocks = knownExternalBlocks;

-	}

-	

-	private boolean isBlockExtension(String name) {

-		return knownExternalBlocks.contains(name);

-	}

-	

-	public List<String> getVariables() {

-		return vars;

-	}

-	

-	public Map<String, String> getVariableTypes() {

-		return varTypeMap;

-	}

-	

-	DLTKToken toDLTK(Token token) {

-		return converter.convert(token);

-	}

-	public void emitErrorMessage(String msg) {

-		reporter.reportMessage(msg);

-	}

-	public void reportError(RecognitionException e) {

-		if( reporter != null ) {

-			reporter.reportError(e);

-		}

-	}

-	

-	public void addType(RutaBlock parent, String type, VariableReference parentTypeExpr) {

-	

-	String parentType = "uima.tcas.Annotation";

-          if(parentTypeExpr != null) {

-          	parentType = parentTypeExpr.getName();

-	  }

-		vars.add(type);

-		String descriptionString = null;

-       if(packageString == null) {

-         descriptionString = "Type defined in " + module;

-       } else {

-         descriptionString = "Type defined in " + packageString + "." + module;

-       }

-		descriptor.addType(parent.getNamespace()+"."+type.trim(), descriptionString, parentType);

-	}

-	

-	public void addPredefinedType(String type) {

-		vars.add(type);

-		varTypeMap.put(type, "TYPE");

-		

-	}

-	

-	public void addType(RutaBlock parent, String name, VariableReference parentTypeExpr, List featuresTypes,

-          List<Token> featuresNames) {

-          String parentType = "uima.tcas.Annotation";

-          if(parentTypeExpr != null) {

-          	parentType = parentTypeExpr.getName();

-	  }

-	   	 name = parent.getNamespace() + "." + name.trim();

-	   	 String descriptionString = null;

-	   	 if(packageString == null) {

-	   	   descriptionString = "Type defined in " + module;

-	   	 } else {

-	   	   descriptionString = "Type defined in " + packageString + "." + module;

-	   	 }

-	   	 descriptor.addType(name, descriptionString, parentType);

-	    	for (int i = 0; i < featuresTypes.size(); i++) {

-	    	  Object object = featuresTypes.get(i);

-	    	  String ftype = "";

-	    	  if (object instanceof ASTNode) {

-	    		    ftype = ((ASTNode) object).toString();

-		      } else if (object instanceof Token) {

-	     	   ftype = ((Token) object).getText();

-	     	 }

-		      String fname = featuresNames.get(i).getText();

-	     	 descriptor.addFeature(name, fname, fname, ftype);

-	   	 }

- 	 }

-	

-	public void addWordList(RutaBlock parent, String name, String list) {

-		lists.put(name, list);

-	}

-	

-	public void addCSVTable(RutaBlock parent, String name, String table) {

-		tables.put(name, table);

-	}

-	

-	public boolean isType(RutaBlock parent, String type) {

-		return vars.contains(type);

-	}

-		

-	public void addVariable(String var, String type, IntStream input) throws NoViableAltException {

-		if(!vars.contains(var)) {

-			vars.add(var);

-			varTypeMap.put(var, type);

-		} 

-	}

-	

-	public void addVariable(String var, String type) {

-		if(!vars.contains(var)) {

-			vars.add(var);

-			varTypeMap.put(var, type);

-		}

-	}

-	

-	public boolean isVariable(String var) {

-		return vars.contains(var);

-	}

-	

-	public boolean isVariableOfType(String var, String type) {

-		return vars.contains(var) && type.equals(varTypeMap.get(var));

-	}

-	

-	public void checkVariable(String var, IntStream input) throws NoViableAltException {

-		if(!vars.contains(var)) {

-			throw new NoViableAltException("not declared \"" + var + "\"", 3, 0, input);

-		}

-	}

-	

-	  public void addImportTypeSystem(ComponentDeclaration ts) {

-	    if(ts != null){

-	     descriptor.addTypeSystem(ts.getName());

-	    }

-	  }

-	

-	  public void addImportScript(ComponentDeclaration module) {

-		    descriptor.addScript(module.getName());

-		  }

-	

-	  public void addImportEngine(ComponentDeclaration module) {

-		    descriptor.addEngine(module.getName());

-		  }

-	   public void addImportUimafitEngine(ComponentDeclaration module) {

-	    descriptor.addUimafitEngine(module.getName());

-	  }

-	

-	protected static final int[] getBounds(Token t) {

-		if (t instanceof CommonToken) {

-			CommonToken ct = (CommonToken) t;

-			int[] bounds = {ct.getStartIndex(), ct.getStopIndex()}; 

-			return bounds;

-		}

-		return null;

-	}

-	

-//	public String getTypeOf(String varName) {

-//		String vn = varTypeMap.get(varName);

-//		return vn != null? vn : "";

-//	}

-	

-}

-

-@rulecatch {

-	catch (RecognitionException exception1) {

-		if( reporter != null ) {

-			reporter.reportError(exception1);

-		}

-		recover(input,exception1);

-	}

-	catch (Throwable exception2) {

-		if( reporter != null ) {

-			reporter.reportThrowable(exception2);

-		}

-	}

-}

-

-

-file_input [String module]

-@init {

-RutaScriptBlock rootBlock = null;

-List<Statement> stmts = new ArrayList<Statement>();

-}

-	:	

-	p = packageDeclaration?

-	{

-	String packageName = "";

-	if(p != null) {packageName = p.getName();}

-	if(descriptor != null) {

-    descriptor.setPackageString(packageName);

-  }

-	rootBlock = scriptFactory.createScriptBlock(0,0,0,0,module, null, null, packageName);

-	stmts.add(p);

-	this.module = module;

-	if(p != null) {

-		this.packageString = p.getName();

-	}

-	}

-	{$blockDeclaration.push(new blockDeclaration_scope());$blockDeclaration::env = rootBlock;}

-

-	gs = globalStatements

-	s = statements

-	{

-	  stmts.addAll(gs);

-	  stmts.addAll(s);

-  	  for (Statement stmt : stmts){

-		  if (stmt != null) {

-		    md.addStatement(stmt);

-		  }

-	  };

-	}

-	EOF

-	;

-	

-

-packageDeclaration returns [RutaPackageDeclaration pack]

-	:	pString = PackageString 

-	{

-	pack = StatementFactory.createPkgDeclaration(p, pString);

-	}

-	p = dottedId 

-	{

-	pack = StatementFactory.createPkgDeclaration(p, pString);

-	}

-	SEMI

-	{

-	pack = StatementFactory.createPkgDeclaration(p, pString);

-	}

-	;

-

-statements returns [List<Statement> stmts = new ArrayList<Statement>()]

-	:

-	(morestmts = statement {if(morestmts != null) {stmts.addAll(morestmts);}})*

-	;

-	

-globalStatements returns [List<Statement> stmts = new ArrayList<Statement>()]

-	:

-	(morestmts = globalStatement {if(morestmts != null) {stmts.addAll(morestmts);}})*

-	;

-

-globalStatement returns [List<Statement> stmts = new ArrayList<Statement>()]

-	:

-	stmtImport = importStatement {stmts.add(stmtImport);}

-	;

-	

-statement returns [List<Statement> stmts = new ArrayList<Statement>()]

-	:	

-	( stmts1 = declaration {stmts.addAll(stmts1);}

-	| stmtVariable = variableDeclaration {stmts.addAll(stmtVariable);}

-	| stmt3 = blockDeclaration {stmts.add(stmt3);}

-	| (externalBlock)=> stmt4 = externalBlock {stmts.add(stmt4);}

-	| stmt2 = simpleStatement {stmts.add(stmt2);}

-	

-

-	)

-	;

-	

-importStatement returns [Statement stmt = null]

-	:

-	im = TypeSystemString 

-	{stmt = StatementFactory.createImportTypeSystem(StatementFactory.createEmptyComponentDeclaration(im),im);} 

-	name = dottedComponentDeclaration 

-	{if(name != null) {stmt = StatementFactory.createImportTypeSystem(name,im);addImportTypeSystem(name);}}

-	 SEMI 

-	| im = ScriptString 

-	{stmt = StatementFactory.createImportScript(StatementFactory.createEmptyComponentDeclaration(im),im);} 

-	name = dottedComponentDeclaration 

-	{if(name != null) {stmt = StatementFactory.createImportScript(name,im);addImportScript(name);}} 

-	SEMI 

-	| im = EngineString 

-	{stmt = StatementFactory.createImportEngine(StatementFactory.createEmptyComponentDeclaration(im),im);} 

-	name = dottedComponentDeclaration 

-	{if(name != null) {stmt = StatementFactory.createImportEngine(name,im);addImportEngine(name);}}

-	 SEMI 

-	 | im = UimafitString 

-	{stmt = StatementFactory.createImportEngine(StatementFactory.createEmptyComponentDeclaration(im),im);} 

-	name = dottedComponentDeclaration 

-	{if(name != null) {stmt = StatementFactory.createImportEngine(name,im);addImportUimafitEngine(name);}}

-	 SEMI 

-	| im = ImportString type = dottedId (FromString ts = dottedComponentDeclaration)? (AsString alias = Identifier)? SEMI

-	{stmt = StatementFactory.createImportType(im,type,ts,alias);addImportTypeSystem(ts);}

-	| im = ImportString STAR FromString ts = dottedComponentDeclaration SEMI

-	{stmt = StatementFactory.createImportTypeSystem(ts,im);addImportTypeSystem(ts);}

-	| im = ImportString PackageString pkg = dottedId (FromString ts = dottedComponentDeclaration)? (AsString alias = Identifier)? SEMI

-	{stmt = StatementFactory.createImportPackage(im,pkg,ts,alias);addImportTypeSystem(ts);}

-	| im = ImportString PackageString STAR FromString ts = dottedComponentDeclaration (AsString alias = Identifier)? SEMI

-	{stmt = StatementFactory.createImportAllPackagew(im,ts,alias);addImportTypeSystem(ts);}

-	

-	;

-	

-variableDeclaration returns [List<Statement> stmts = new ArrayList<Statement>()]

-@init {

-	List decls = new ArrayList();

-}

-	:

-	type = IntString id = Identifier {addVariable(id.getText(), type.getText()); decls.add(StatementFactory.createIntVariable(id, type));}

-		(COMMA id= Identifier {addVariable(id.getText(), type.getText()); decls.add(StatementFactory.createIntVariable(id, type));}

-		)* (ASSIGN_EQUAL init = numberExpression)?  SEMI

-		{

-		 stmts.add(StatementFactory.createDeclarationsStatement(type, decls, init));

-		 }

-	|

-	type = DoubleString id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createDoubleVariable(id, type));}

-			(COMMA id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createDoubleVariable(id, type));}

-		 )* (ASSIGN_EQUAL init = numberExpression)?  SEMI

-		{

-		 stmts.add(StatementFactory.createDeclarationsStatement(type, decls, init));

-		 }

-	|

-	type = FloatString id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createFloatVariable(id, type));}

-			(COMMA id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createFloatVariable(id, type));}

-		 )* (ASSIGN_EQUAL init = numberExpression)?  SEMI

-		{

-		 stmts.add(StatementFactory.createDeclarationsStatement(type, decls, init));

-		 }

-	|

-	type = StringString id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createStringVariable(id, type));}

-			(COMMA id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createStringVariable(id, type));}

-		 )* (ASSIGN_EQUAL init = stringExpression)?  SEMI

-		{

-		 stmts.add(StatementFactory.createDeclarationsStatement(type, decls, init));

-		 }

-	|

-	type = BooleanString id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createBooleanVariable(id, type));}

-			(COMMA id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createBooleanVariable(id, type));}

-		 )* (ASSIGN_EQUAL init = booleanExpression)?  SEMI

-		{

-		 stmts.add(StatementFactory.createDeclarationsStatement(type, decls, init));

-		 }

-	|

-	type = TypeString id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createTypeVariable(id,type));}

-			(COMMA id = Identifier {addVariable(id.getText(), type.getText());decls.add(StatementFactory.createTypeVariable(id,type));}

-		 )* (ASSIGN_EQUAL init = typeExpression)?  SEMI

-		{

-		 stmts.add(StatementFactory.createDeclarationsStatement(type, decls, init));

-		 }

-        |

-        type = WORDLIST id = Identifier (ASSIGN_EQUAL list = wordListExpression)? SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createListVariable(id,type,list));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));

-        }

-        |

-        type = WORDTABLE id = Identifier (ASSIGN_EQUAL table = wordTableExpression)?  SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createTableVariable(id,type,table));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, table));

-        }

-        |

-        type = BOOLEANLIST id = Identifier (ASSIGN_EQUAL list = booleanListExpression)?  SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createVarListVariable(id,type,list, RutaTypeConstants.RUTA_TYPE_BL));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));

-        }

-        |

-        type = INTLIST id = Identifier (ASSIGN_EQUAL list = numberListExpression)?  SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createVarListVariable(id,type,list, RutaTypeConstants.RUTA_TYPE_NL));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));

-        }

-         |

-        type = DOUBLELIST id = Identifier (ASSIGN_EQUAL list = numberListExpression)?  SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createVarListVariable(id,type,list, RutaTypeConstants.RUTA_TYPE_NL));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));

-        }

-          |

-        type = FLOATLIST id = Identifier (ASSIGN_EQUAL list = numberListExpression)?  SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createVarListVariable(id,type,list, RutaTypeConstants.RUTA_TYPE_NL));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));

-        }

-                |

-        type = STRINGLIST id = Identifier (ASSIGN_EQUAL list = stringListExpression)?  SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createVarListVariable(id,type,list, RutaTypeConstants.RUTA_TYPE_SL));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));

-        }

-                |

-        type = TYPELIST id = Identifier (ASSIGN_EQUAL list = typeListExpression)?  SEMI

-        {

-        addVariable(id.getText(), type.getText());

-        decls.add(StatementFactory.createVarListVariable(id,type,list, RutaTypeConstants.RUTA_TYPE_TL));

-        stmts.add(StatementFactory.createDeclarationsStatement(type, decls, list));

-        }       

-	//|

-	//stmt = conditionDeclaration {stmts.add(stmt);}

-	//|

-	//stmt = actionDeclaration {stmts.add(stmt);}

-	;

-

-//conditionDeclaration returns [Statement stmt = null]

-//    :

-//    declareToken = CONDITION id = Identifier {addVariable(id.getText(), declareToken.getText());}

-//    ASSIGN_EQUAL 

-//    LPAREN cons = conditions RPAREN SEMI

-//    {stmt = StatementFactory.createComposedVariableConditionDeclaration(id, cons);}

-//    ;

-

-//TODO added rule

-//actionDeclaration returns [Statement stmt = null]

-//    :

-//    declareToken = ACTION id = Identifier {addVariable(id.getText(), declareToken.getText());}

-//    ASSIGN_EQUAL

-//    LPAREN a = actions RPAREN SEMI

-//    {stmt = StatementFactory.createComposedVariableActionDeclaration(id, a);}

-//    ;

-

-declaration returns [List<Statement> stmts = new ArrayList<Statement>()]

-@init {

-	Statement stmt = null;

-	List<Object> featureTypes = new ArrayList<Object>();

-	List<Token> featureNames = new ArrayList<Token>();

-	List<Declaration> declarations = new ArrayList<Declaration>();

-}

-	:

-	declareToken=DECLARE lazyParent = annotationType?

-		 id = Identifier {addVariable(id.getText(), declareToken.getText());}

-			

-	(

-	{addType($blockDeclaration::env, id.getText(), lazyParent);

-			declarations.add(StatementFactory.createAnnotationType(id,declareToken));}

-		(

-		

-		COMMA 

-		 id = Identifier {addVariable(id.getText(), declareToken.getText());}

-			{addType($blockDeclaration::env, id.getText(),  lazyParent); 

-			declarations.add(StatementFactory.createAnnotationType(id,declareToken));}

-		 )* end = SEMI

-		 {

-		 stmt = StatementFactory.createDeclareDeclarationsStatement(declareToken, declarations, lazyParent);

-		 stmts.add(stmt);

-		 }

-	|

-		(LPAREN 

-			(

-			obj1 = annotationType{featureTypes.add(obj1);} 

-			| obj2 = StringString{featureTypes.add(obj2);} 

-			| obj3 = DoubleString{featureTypes.add(obj3);}

-			| obj6 = FloatString{featureTypes.add(obj6);}  

-			| obj4 = IntString{featureTypes.add(obj4);}

-			| obj5 = BooleanString{featureTypes.add(obj5);}

-			//| obj6 = fsType{featureTypes.add(obj6.getText());}

-			) 

-			fname = Identifier{featureNames.add(fname);} 

-			(

-			COMMA 

-			(

-			obj1 = annotationType{featureTypes.add(obj1);} 

-			| obj2 = StringString{featureTypes.add(obj2);} 

-			| obj3 = DoubleString{featureTypes.add(obj3);}

-			| obj6 = FloatString{featureTypes.add(obj6);}  

-			| obj4 = IntString{featureTypes.add(obj4);}

-			| obj5 = BooleanString{featureTypes.add(obj5);}

-			//| obj6 = fsType{featureTypes.add(obj5.getText());}

-			)

-			fname = Identifier{featureNames.add(fname);})* 

-		RPAREN) SEMI // TODO removed question mark

-		{

-		List<RutaFeatureDeclaration> features = new ArrayList<RutaFeatureDeclaration>();

-		int i = 0;

-		for (Object eachTO : featureTypes) {

-		   Token eachName = featureNames.get(i); 

-		   features.add(StatementFactory.createFeatureDeclaration(eachTO, eachName));  

-		   i++;

-		}

-		addType($blockDeclaration::env, id.getText(), lazyParent, featureTypes, featureNames);

-		declarations.add( StatementFactory.createAnnotationType(id,declareToken, lazyParent, features));

-		stmt = StatementFactory.createDeclareDeclarationsStatement(declareToken, declarations, lazyParent, features);

-		stmts.add(stmt);

-		}

-	)

-	;

-

-

-

-	

-

-blockDeclaration returns [RutaBlock block = null]

-options{

-	backtrack = true;

-}

-scope {

-	RutaBlock env;

-	}	

-@init{

-RutaRule rule = null;

-level++;

-}

-@after {

-level--;

-}

-	:

-

-	(declareToken = BlockString)

-	LPAREN

-	id = Identifier {addVariable(id.getText(), declareToken.getText());}

-	{

-		block = scriptFactory.createScriptBlock(id, declareToken, $blockDeclaration[level - 1]::env);

-		$blockDeclaration::env = block;

-	}

-	RPAREN

-	re1 = ruleElementWithCA

-	{

-	rule = scriptFactory.createRule(re1);

-	scriptFactory.finalizeBlock(block, rc, rule, body);}

-	LCURLY body = statements rc = RCURLY

-	{scriptFactory.finalizeBlock(block, rc, rule, body);}

-	;

-

-externalBlock returns [RutaBlock block = null]

-options{

-	backtrack = true;

-}

-

-@init{

-RutaRule rule = null;

-

-}

-@after {

-

-}

-	:

-	{isBlockExtension(input.LT(1).getText())}? 

-	(type = Identifier)

-	{block = scriptFactory.createExternalBlock(type, $blockDeclaration[level]::env);

-		$blockDeclaration::env = block;}

-	(LPAREN

-	args = varArgumentList  {block.setArguments(args);}

-	RPAREN)?

-	re1 = ruleElementWithCA

-	{

-	rule = scriptFactory.createRule(re1);

-	scriptFactory.finalizeBlock(block, rc, rule, body);}

-	LCURLY body = statements rc = RCURLY

-	{scriptFactory.finalizeBlock(block, rc, rule, body);}

-	;

-	

-ruleElementWithCA returns [RutaRuleElement re = null] 

-    :

-    idRef=typeMatchExpression quantifier = quantifierPart? {re = scriptFactory.createRuleElement(idRef,quantifier,c,a, end);}

-        LCURLY c = conditions? (THEN a = actions)? end = RCURLY

-        {re = scriptFactory.createRuleElement(idRef,quantifier,c,a, end);}

-    ;

-

-	

-ruleElementWithoutCA returns [RutaRuleElement re = null] 

-    :

-    idRef=typeMatchExpression quantifier = quantifierPart? 

-             {re = scriptFactory.createRuleElement(idRef,quantifier,null,null, null);}

-

-    ;

-		

-simpleStatement returns [RutaRule stmt = null]

-options {

-	backtrack = true;

-}

-	: 

-	(regexpRule)=> rer = regexpRule {stmt = rer;}

-	|

-	as = rawActions s = SEMI 

-	{stmt = scriptFactory.createImplicitRule(as, s);}

-	|

-	elements=ruleElementsRoot

-	{stmt = scriptFactory.createRule(elements, null, false);}

-		s = SEMI 

-	{stmt = scriptFactory.createRule(elements, s);}

-	

-	

-	;

-

-regexpRule returns [RutaRule stmt = null]

-@init{

-	List<Expression> exprs = new ArrayList<Expression>();

-	Map<Expression, Map<Expression, Expression>> fa = new HashMap<Expression, Map<Expression, Expression>>();

-	Map<Expression, Expression> fmap = null;

-}

-	:

-	regexp = stringExpression {exprs.add(regexp);} {stmt = scriptFactory.createRegExpRule(exprs, fa, s);} THEN

-	(

-	(numberExpression ASSIGN_EQUAL)=>

-	indexCG = numberExpression {exprs.add(indexCG);}{stmt = scriptFactory.createRegExpRule(exprs, fa, s);} ASSIGN_EQUAL indexTE = typeExpression {exprs.add(indexTE);}

-	(LPAREN {fmap = new HashMap<Expression, Expression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(indexTE, fmap);})?

-	|

-	te = typeExpression {exprs.add(te);} {stmt = scriptFactory.createRegExpRule(exprs, fa, s);}

-	(LPAREN {fmap = new HashMap<Expression, Expression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(te, fmap);})?

-	

-	)

-	

-	(

-	COMMA

-	(

-	(numberExpression ASSIGN_EQUAL)=>

-	indexCG = numberExpression {exprs.add(indexCG);}{stmt = scriptFactory.createRegExpRule(exprs, fa, s);} ASSIGN_EQUAL indexTE = typeExpression {exprs.add(indexTE);}

-	(LPAREN {fmap = new HashMap<Expression, Expression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(indexTE, fmap);})?

-	|

-	te = typeExpression {exprs.add(te);}{stmt = scriptFactory.createRegExpRule(exprs, fa, s);}

-	(LPAREN {fmap = new HashMap<Expression, Expression>();} fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} 

-	(COMMA fk = stringExpression ASSIGN_EQUAL arg = argument {fmap.put(fk, arg);} )* RPAREN {fa.put(te, fmap);})?

-	)

-	)*

-

-	s = SEMI

-	{stmt = scriptFactory.createRegExpRule(exprs, fa, s);}

-	

-	;

-

-

-

-ruleElementsRoot returns [List<Expression> elements = new ArrayList<Expression>()]

-	:

-	re = ruleElement {if(re!=null) elements.add(re);} (p = PERCENT? re = ruleElement {if(re!=null) {elements.add(re);re.setAfterConcat(p);}})*

-	;	

-

-ruleElements returns [List<Expression> elements = new ArrayList<Expression>()]

-	:

-	re = ruleElement {if(re!=null) elements.add(re);} (re = ruleElement {if(re!=null) elements.add(re);})*

-	;

-	

-blockRuleElement returns [RutaRuleElement rElement = null] //[List<RutaRuleElement> elements = new ArrayList<RutaRuleElement>()]

-	:

-	re = ruleElementType {rElement = re;}

-	;	

-	

-ruleElement returns [RutaRuleElement re = null]

-@init{

-List<RutaRule> innerRules = new ArrayList<RutaRule>();

-}

-	:

-	STARTANCHOR?

-	(

-	re1 = ruleElementType {re = re1;}

-	| re2 = ruleElementLiteral {re = re2;}

-	| re3 = ruleElementComposed {re = re3;}

-	| re4 = ruleElementWildCard {re = re4;}

-	)

-	(t = THEN2 LCURLY (rule = simpleStatement {innerRules.add(rule);})+ 

-	RCURLY {re.setInlinedRules(innerRules);re.setInlineMode(t == null ? null : t.getText());})?

-	(t = THEN LCURLY (rule = simpleStatement {innerRules.add(rule);})+ 

-	RCURLY {re.setInlinedRules(innerRules);re.setInlineMode(t == null ? null : t.getText());})?

-	;

-

-ruleElementWildCard returns [RutaRuleElement re = null] 

-@init{

-List<RutaCondition> dummyConds = new ArrayList<RutaCondition>();

-}

-  :

-    	w = WILDCARD

-        (LCURLY 

-        {

-        

-        dummyConds.add(ConditionFactory.createEmptyCondition(input.LT(1)));

-        } 

-        c = conditions? 

-        {

-        if(c==null) {

-        	c = dummyConds;

-        }

-        }

-        (THEN a = actions)? end = RCURLY)?

-        {

-

-        re = scriptFactory.createRuleElement(w,c,a,end);}

-

-    ;

-

-	

-ruleElementComposed returns [ComposedRuleElement re = null] 

-@init{

-	Boolean disjunctive = null;

-	List<Expression> res = new ArrayList<Expression>();

-}

-	:

-	ft = LPAREN

-	(

-	(ruleElement VBAR)=> re1 = ruleElement {res.add(re1);} (VBAR re1 = ruleElement {disjunctive = true; res.add(re1);})+

-	|

-	(ruleElement AMPER)=> re2 = ruleElement {res.add(re2);} (AMPER re2 = ruleElement {disjunctive = false; res.add(re2);})+

-	|

-	res2 = ruleElements {res = res2;}

-	)

-	lt1 = RPAREN q = quantifierPart? (LCURLY c = conditions? (THEN a = actions)? lt2 = RCURLY)?

-	{re = scriptFactory.createComposedRuleElement(res, q, c, a, disjunctive, $blockDeclaration::env, ft, lt1, lt2);}

-	;

-

-ruleElementType returns [RutaRuleElement re = null] 

-@init{

-List<RutaCondition> dummyConds = new ArrayList<RutaCondition>();

-}

-  :

-    (typeMatchExpression)=>idRef=typeMatchExpression quantifier = quantifierPart? 

-        (LCURLY 

-        {

-        

-        dummyConds.add(ConditionFactory.createEmptyCondition(input.LT(1)));

-        } 

-        c = conditions? 

-        {

-        if(c==null) {

-        	c = dummyConds;

-        }

-        }

-        (THEN a = actions)? end = RCURLY)?

-        {

-        // TODO handle quantifierPart.

-        re = scriptFactory.createRuleElement(idRef,quantifier,c,a,end);}

-        //start, end, "", cp, ap, "", $blockDeclaration::env);}

-    ;

-

-ruleElementLiteral returns [RutaRuleElement re = null] 

-    :

-    

-    (simpleStringExpression)=>idRef=simpleStringExpression quantifier = quantifierPart? 

-        (LCURLY 

-

-        c = conditions? 

-        (THEN a = actions)? 

-        end = RCURLY)?

-        {

-        // TODO handle quantifierPart.

-        re = scriptFactory.createRuleElement(idRef,quantifier,c,a,end);}

-        //start, end, "", cp, ap, "", $blockDeclaration::env);}

-    ;

-    

-conditions returns [List<RutaCondition> conds = new ArrayList<RutaCondition>()]

-@init {

-conds.add(ConditionFactory.createEmptyCondition(input.LT(1)));

-}

-    :

-    c = condition {conds.remove(0);conds.add(c);} (COMMA c = condition {conds.add(c);} )*

-    ;

-

-  

-actions returns [List<RutaAction> actions = new ArrayList<RutaAction>()]

-    :

-    a = action {actions.add(a);} (COMMA a = action {actions.add(a);} )*

-    ; 	

-rawActions returns [List<RutaAction> actions = new ArrayList<RutaAction>()]

-    :

-    a = rawAction {actions.add(a);} (COMMA a = rawAction {actions.add(a);} )*

-    ; 	

-	

-listExpression returns [Expression expr = null]

-	:

-	(booleanListExpression)=> e = booleanListExpression {expr = e;}

-	| (intListExpression)=> e = intListExpression {expr = e;}

-	| (doubleListExpression)=> e = doubleListExpression {expr = e;}

-	| (floatListExpression)=> e = floatListExpression {expr = e;}

-	| (stringListExpression)=> e = stringListExpression {expr = e;}

-	| (typeListExpression)=> e = typeListExpression {expr = e;}

-	| (untypedListExpression)=> utl = untypedListExpression {expr = utl;}

-	;

-

-untypedListExpression returns [Expression expr = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-}	:

-	LCURLY (e = argument {list.add(e);} (COMMA e = argument {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createListExpression(list, RutaTypeConstants.RUTA_TYPE_UTL);}

-	;

-	

-booleanListExpression returns [Expression expr = null]

-

-	:

-	e = simpleBooleanListExpression {expr = e;}

-	;

-

-simpleBooleanListExpression returns [Expression expr = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-}	:

-	LCURLY (e = simpleBooleanExpression {list.add(e);} (COMMA e = simpleBooleanExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createListExpression(list, RutaTypeConstants.RUTA_TYPE_BL);}

-	|

-	{isVariableOfType(input.LT(1).getText(), "BOOLEANLIST")}? 

-	var = Identifier 

-	{expr = ExpressionFactory.createListExpression(var, RutaTypeConstants.RUTA_TYPE_BL);}

-	;

-

-

-intListExpression returns [Expression expr = null]

-	:

-	e = simpleIntListExpression {expr = e;}

-	;

-

-simpleIntListExpression returns [Expression expr = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-}	:

-	LCURLY (e = simpleNumberExpression {list.add(e);} (COMMA e = simpleNumberExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createListExpression(list, RutaTypeConstants.RUTA_TYPE_NL);}

-	|

-	{isVariableOfType(input.LT(1).getText(), "INTLIST")}? 

-	var = Identifier 

-	{expr = ExpressionFactory.createListExpression(var, RutaTypeConstants.RUTA_TYPE_NL);}

-	;

-

-

-numberListExpression returns [Expression expr = null]

-	:

-	(e1 = doubleListExpression)=> e1 = doubleListExpression {expr = e1;}

-	|

-	(e1 = floatListExpression)=> e1 = floatListExpression {expr = e1;}

-	|

-	e2 = intListExpression {expr = e2;}

-	;

-	

-doubleListExpression returns [Expression expr = null]

-	:

-	e = simpleDoubleListExpression {expr = e;}

-	;

-

-simpleDoubleListExpression returns [Expression expr = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-}	:

-	LCURLY (e = simpleNumberExpression {list.add(e);} (COMMA e = simpleNumberExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createListExpression(list, RutaTypeConstants.RUTA_TYPE_NL);}

-	|

-	{isVariableOfType(input.LT(1).getText(), "DOUBLELIST")}? 

-	var = Identifier 

-	{expr = ExpressionFactory.createListExpression(var, RutaTypeConstants.RUTA_TYPE_NL);}

-	;

-

-floatListExpression returns [Expression expr = null]

-	:

-	e = simpleFloatListExpression {expr = e;}

-	;

-

-simpleFloatListExpression returns [Expression expr = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-}	:

-	LCURLY (e = simpleNumberExpression {list.add(e);} (COMMA e = simpleNumberExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createListExpression(list, RutaTypeConstants.RUTA_TYPE_NL);}

-	|

-	{isVariableOfType(input.LT(1).getText(), "FLOATLIST")}? 

-	var = Identifier 

-	{expr = ExpressionFactory.createListExpression(var, RutaTypeConstants.RUTA_TYPE_NL);}

-	;

-

-

-stringListExpression returns [Expression expr = null]

-	:

-	e = simpleStringListExpression {expr = e;}

-	;

-

-simpleStringListExpression returns [Expression expr = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-}	:

-	LCURLY (e = simpleStringExpression {list.add(e);} (COMMA e = simpleStringExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createListExpression(list, RutaTypeConstants.RUTA_TYPE_SL);}

-	|

-	{isVariableOfType(input.LT(1).getText(), "STRINGLIST")}? 

-	var = Identifier 

-	{expr = ExpressionFactory.createListExpression(var, RutaTypeConstants.RUTA_TYPE_SL);}

-	;

-

-

-typeListExpression returns [Expression expr = null]

-	:

-	e = simpleTypeListExpression {expr = e;}

-	;

-

-simpleTypeListExpression returns [Expression expr = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-}	:

-	LCURLY (e = simpleTypeExpression {list.add(e);} (COMMA e = simpleTypeExpression {list.add(e);})*)?  RCURLY

-	{expr = ExpressionFactory.createListExpression(list, RutaTypeConstants.RUTA_TYPE_TL);}

-	|

-	{isVariableOfType(input.LT(1).getText(), "TYPELIST")}? 

-	var = Identifier 

-	{expr = ExpressionFactory.createListExpression(var, RutaTypeConstants.RUTA_TYPE_TL);}

-	;	

-	

-	

-typeMatchExpression returns [Expression expr = null]

-options {

-	backtrack = true;

-}

-@init {

-expr = ExpressionFactory.createEmptyTypeExpression(input.LT(1));

-}

-	:

-	(

-	(featureTypeExpression)=> ft = featureTypeExpression {expr = ft;}

-	| 

-	(typeFunction)=> tf = typeFunction {expr = tf;}

-	| 

-	st = simpleTypeExpression 

-	{expr = ExpressionFactory.createTypeExpression(st);

-	 }

-	)

-	

-	

-	;	

-	

-typeExpression returns [Expression expr = null]

-@init {

-expr = ExpressionFactory.createEmptyTypeExpression(input.LT(1));

-}

-	:

-	(typeFunction)=> tf = typeFunction {expr = tf;}

-	| st = simpleTypeExpression 

-	{expr = ExpressionFactory.createTypeExpression(st);

-	 }

-	;

-

-// not checked

-typeFunction returns [Expression expr = null]

-	:

-	(e = externalTypeFunction)=> e = externalTypeFunction {expr = e;}

-	;

-

-// not checked

-externalTypeFunction returns [Expression expr = null]

-	:

-	id = Identifier 

-	LPAREN

-	args = varArgumentList?

-	RPAREN

-	{

-		expr = external.createExternalTypeFunction(id, args);

-	}

-	;

-

-featureAssignmentExpression returns [Expression expr = null]

-	:

-	feature = dottedId3 comp = ASSIGN_EQUAL value = argument {expr = ExpressionFactory.createFeatureMatch(feature, comp, value);}

-	;

-

-featureTypeExpression returns [Expression expr = null]

-	:

-	feature = dottedId3 (comp = LESS | comp = GREATER | comp = GREATEREQUAL | comp = LESSEQUAL |comp =  EQUAL | comp = NOTEQUAL) value = argument {expr = ExpressionFactory.createFeatureMatch(feature, comp, value);}

-	;

-

-featureExpression returns [Expression expr = null]

-	:

-	f = dottedId3  {expr = ExpressionFactory.createFeatureExpression(f);}

-	;

-

-simpleTypeExpression returns [Expression type = null]

-	:

-	at = annotationType {type = at;}

-	;

-

-variable returns [Expression var = null]

-	:

-	{vars.contains(input.LT(1).getText())}? v = Identifier {var=ExpressionFactory.createGenericVariableReference(v);}

-	;	

-	

-

-listVariable returns [Expression var = null]

-	:

-	{isVariableOfType(input.LT(1).getText(), "BOOLEANLIST")

-	||isVariableOfType(input.LT(1).getText(), "INTLIST")

-	||isVariableOfType(input.LT(1).getText(), "FLOATLIST")

-	||isVariableOfType(input.LT(1).getText(), "DOUBLELIST")

-	||isVariableOfType(input.LT(1).getText(), "STRINGLIST")

-	||isVariableOfType(input.LT(1).getText(), "TYPELIST")

-	}? v = Identifier {var=ExpressionFactory.createGenericVariableReference(v);}

-	;

-	

-

-	

-quantifierPart returns [List<Expression> exprs = new ArrayList<Expression>()]

-	:

-	 s = STAR q = QUESTION? {exprs.add(ExpressionFactory.createQuantifierLiteralExpression(s,q));}

-	| p = PLUS q = QUESTION? {exprs.add(ExpressionFactory.createQuantifierLiteralExpression(p,q));}

-	| q1 = QUESTION q = QUESTION? {exprs.add(ExpressionFactory.createQuantifierLiteralExpression(q1,q));}

-	| (b1 = LBRACK min = numberExpression (COMMA (max = numberExpression)?)? b2 = RBRACK q = QUESTION?

-		 {

-		  //if(b1!=null) {exprs.add(b1);}

-		  if(min!=null) {exprs.add(min);}

-		  if(max!=null) {exprs.add(max);}

-		  //if(b2!=null) {exprs.add(b2);}

-		  if(q!=null) {exprs.add(ExpressionFactory.createQuantifierLiteralExpression(q, null));}

-		 }

-	   )

-	;

-	

-	

-condition returns [RutaCondition result = null]

-@init {

-result = ConditionFactory.createEmptyCondition(input.LT(1));

-}

-	:

-	(

-	c = conditionAnd

-	| c = conditionContains

-	| c = conditionContextCount

-	| c = conditionCount

-	| c = conditionCurrentCount

-	| c = conditionInList

-	| c = conditionLast

-	| c = conditionMofN

-	| c = conditionNear

-	| c = conditionNot

-	| c = conditionOr

-	| c = conditionPartOf

-	| c = conditionPosition

-	| c = conditionRegExp

-	| c = conditionScore

-	| c = conditionTotalCount

-	| c = conditionVote

-	| c = conditionIf

-	| c = conditionFeature

-	| c = conditionParse

-	| c = conditionIs

-	| c = conditionBefore

-	| c = conditionAfter

-	| c = conditionStartsWith

-	| c = conditionEndsWith

-	| c = conditionPartOfNeq

-	| c = conditionSize

-	

-	| (booleanExpression)=> b = booleanExpression {c = ConditionFactory.createCondition(b);}

-	| (externalCondition)=> c = externalCondition

-	) {result = c;}

-	;

-	

-//TODO added rule

-variableCondition returns [RutaCondition condition = null]

-	:		

-	// also create condition for auto-completion

-	//{isVariableOfType(input.LT(1).getText(), "CONDITION")}? 

-	id = Identifier

-	{

-		condition = ConditionFactory.createCondition(id);

-	}

-	;	

-	

-	

-externalCondition returns [RutaCondition condition = null]

-	:

-	id = Identifier

-	{condition = external.createExternalCondition(id, args);}

-	LPAREN

-	args = varArgumentList?

-	RPAREN

-	{condition = external.createExternalCondition(id, args);}

-	;

-conditionAnd returns [RutaCondition cond = null]

-    :   

-    name = AND LPAREN conds = conditions  

-    {cond = ConditionFactory.createCondition(name, conds);}

-    RPAREN

-    ;

-

-conditionContains returns [RutaCondition cond = null]

- options {

-	backtrack = true;

-}

-    :   

-    name =  CONTAINS LPAREN (type = typeExpression | list = listExpression COMMA a = argument) 

-    (COMMA min = numberExpression COMMA max = numberExpression (COMMA percent = booleanExpression)?)? 

-    {if(type != null) {cond = ConditionFactory.createCondition(name,type, min, max, percent);}

-    else {cond = ConditionFactory.createCondition(name,list,a, min, max, percent);};}

-    RPAREN

-    ;

-    

-conditionContextCount returns [RutaCondition cond = null]

-    :   

-    name = CONTEXTCOUNT LPAREN typeExpr = typeExpression 

-    {cond = ConditionFactory.createCondition(name, typeExpr, min, max, var);}

-    (COMMA min = numberExpression COMMA max = numberExpression)?

-    {cond = ConditionFactory.createCondition(name, typeExpr, min, max, var);}

-    (COMMA var = numberVariable)? 

-    {cond = ConditionFactory.createCondition(name, typeExpr, min, max, var);}

-    RPAREN

-    ;

-    

-conditionCount returns [RutaCondition cond = null]

- options {

-	backtrack = true;

-}

-     :   

-     name = COUNT LPAREN type = listExpression 

-     {cond = ConditionFactory.createCondition(name, type, a, min, max, var);}

-     COMMA a = argument 

-     {cond = ConditionFactory.createCondition(name, type, a, min, max, var);}

-     (COMMA min = numberExpression COMMA max = numberExpression)? 

-     {cond = ConditionFactory.createCondition(name, type, a, min, max, var);}

-     (COMMA var = numberVariable)? 

-     {cond = ConditionFactory.createCondition(name, type, a, min, max, var);}

-    RPAREN

-    |

-    name = COUNT LPAREN type = typeExpression 

-    {cond = ConditionFactory.createCondition(name, type, min, max, var);}

-    (COMMA min = numberExpression COMMA max = numberExpression)?

-    {cond = ConditionFactory.createCondition(name, type, min, max, var);}

-    (COMMA var = numberVariable)? 

-    {cond = ConditionFactory.createCondition(name, type, min, max, var);}  

-    RPAREN 

-    ;   

-    

-conditionCurrentCount returns [RutaCondition cond = null]

-    :   

-    name = CURRENTCOUNT LPAREN type = typeExpression 

-    {cond = ConditionFactory.createCondition(name,type, min, max, var);}

-    (COMMA min = numberExpression COMMA max = numberExpression)? 

-    {cond = ConditionFactory.createCondition(name,type, min, max, var);}

-    (COMMA var = numberVariable)? 

-    {cond = ConditionFactory.createCondition(name,type, min, max, var);}

-    RPAREN

-    ;   

-    

-conditionTotalCount returns [RutaCondition cond = null]

-    :   

-    name = TOTALCOUNT LPAREN type = typeExpression 

-    {cond = ConditionFactory.createCondition(name,type, min, max, var);}

-    (COMMA min = numberExpression COMMA max = numberExpression)? 

-   {cond = ConditionFactory.createCondition(name,type, min, max, var);}

-    (COMMA var = numberVariable)? 

-    {cond = ConditionFactory.createCondition(name, type, min, max, var);}

-    RPAREN

-    ;

-conditionInList returns [RutaCondition cond = null]

- options {

-	backtrack = true;

-}

-    :

-    name = INLIST LPAREN ((list2 = stringListExpression)=>list2 = stringListExpression | list1 = wordListExpression) 

-    (COMMA arg = stringExpression)?

-    //(COMMA dist = numberExpression (COMMA rel = booleanExpression)?)? 

-     {if(list1 != null) {cond = ConditionFactory.createCondition(name, list1, arg);}

-    else {cond = ConditionFactory.createCondition(name, list2, arg);};}

-    RPAREN

-    ;

-            

-conditionLast returns [RutaCondition cond = null]

-    :   

-    name = LAST LPAREN type = typeExpression 

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;

-    

-conditionMofN returns [RutaCondition cond = null]

-    :   

-    name = MOFN LPAREN min = numberExpression COMMA max = numberExpression COMMA conds = conditions 

-    {List exprs = new ArrayList();

-    exprs.add(min);

-    exprs.add(max);

-    exprs.addAll(conds);

-    cond = ConditionFactory.createCondition(name, exprs);}  

-    RPAREN

-    ;

-

-conditionNear returns [RutaCondition cond = null]

-    :   

-    name = NEAR LPAREN type = typeExpression COMMA min = numberExpression COMMA max = numberExpression 

-    (COMMA direction = booleanExpression (COMMA filtered = booleanExpression)?)? 

-    {cond = ConditionFactory.createCondition(name, type, min, max, direction, filtered);}   

-    RPAREN

-    ;

-conditionNot returns [RutaCondition cond = null]

-    :   

-    ((name = MINUS c = condition) |  (name = NOT LPAREN c = condition RPAREN))

-    {cond = ConditionFactory.createCondition(name, c);} 

-    ;

-conditionOr returns [RutaCondition cond = null]

-    :   

-    name = OR LPAREN conds = conditions 

-    {cond = ConditionFactory.createCondition(name, conds);}

-    RPAREN

-    ;

-conditionPartOf returns [RutaCondition cond = null]

-    :

-    name = PARTOF LPAREN (type = typeExpression|type = typeListExpression)    

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;

-    

-conditionPartOfNeq returns [RutaCondition cond = null]

-    :

-    name = PARTOFNEQ LPAREN (type = typeExpression|type = typeListExpression)    

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;    

-

-

-conditionPosition returns [RutaCondition cond = null]

-    :   

-    name = POSITION LPAREN type = typeExpression 

-    {cond = ConditionFactory.createCondition(name, type, pos, rel);}

-    COMMA pos = numberExpression 

-    {cond = ConditionFactory.createCondition(name, type, pos, rel);}

-    (COMMA rel = booleanExpression)? 

-    {cond = ConditionFactory.createCondition(name, type, pos, rel);}

-    RPAREN

-    ;

-conditionRegExp returns [RutaCondition cond = null]

-    :

-    name = REGEXP LPAREN 

-    ((stringExpression COMMA stringExpression)=> v = stringExpression COMMA pattern = stringExpression

-    | pattern = stringExpression

-    ) (COMMA caseSensitive = booleanExpression)? 

-    {cond = ConditionFactory.createCondition(name, v, pattern, caseSensitive);}   

-    RPAREN 

-    ;

-    

-conditionScore returns [RutaCondition cond = null]

-    :

-    name = SCORE LPAREN min = numberExpression (COMMA max = numberExpression  

-    (COMMA var = numberVariable)?)? 

-    {cond = ConditionFactory.createCondition(name, min, max, var);}

-    RPAREN

-    ;

-

-conditionVote returns [RutaCondition cond = null]

-    :   

-    name = VOTE LPAREN type1 = typeExpression COMMA type2 = typeExpression 

-    {cond = ConditionFactory.createCondition(name, type1, type2);}

-    RPAREN

-    ;   

-conditionIf returns [RutaCondition cond = null]

-    :   

-    name = IF LPAREN e = booleanExpression 

-    {cond = ConditionFactory.createCondition(name, e);}

-    RPAREN

-    ;   

-    

-conditionFeature returns [RutaCondition cond = null]

-    :   

-    name = FEATURE LPAREN se = stringExpression COMMA v = argument 

-    {cond = ConditionFactory.createCondition(name, se, v);}

-    RPAREN

-    ;   

-conditionParse returns [RutaCondition cond = null]

-    :

-    name = PARSE LPAREN

-     var=genericVariableReference 

-    {cond = ConditionFactory.createCondition(name, var);}

-    RPAREN

-    ;

-

-

-conditionIs returns [RutaCondition cond = null]

-    :

-    name = IS LPAREN (type = typeExpression|type = typeListExpression) 

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;

-

-conditionBefore returns [RutaCondition cond = null]

-    :

-    name = BEFORE LPAREN (type = typeExpression|type = typeListExpression) 

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;

-

-conditionAfter returns [RutaCondition cond = null]

-    :

-    name = AFTER LPAREN (type = typeExpression|type = typeListExpression) 

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;

-    

-conditionStartsWith returns [RutaCondition cond = null]

-    :

-    name = STARTSWITH LPAREN (type = typeExpression|type = typeListExpression) 

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;

-    

-conditionEndsWith returns [RutaCondition cond = null]

-    :

-    name = ENDSWITH LPAREN (type = typeExpression|type = typeListExpression) 

-    {cond = ConditionFactory.createCondition(name, type);}

-    RPAREN

-    ;

-    

-conditionSize returns [RutaCondition cond = null]

-    :

-    name = SIZE LPAREN list = listExpression (COMMA min = numberExpression COMMA max = numberExpression)? (COMMA var = numberVariable)? 

-    {cond = ConditionFactory.createCondition(name, list, min, max, var);}

-    RPAREN

-    ;

-

-rawAction returns [RutaAction result = null]

-@init {

-result = ActionFactory.createEmptyAction(input.LT(1));

-}

-	:

-	(

-	a = actionColor

-	| a = actionDel

-	| a = actionLog

-	| a = actionMark

-	| a = actionMarkScore

-	| a = actionMarkFast

-	| a = actionMarkLast

-	| a = actionMarkFirst

-	| a = actionReplace

-	| a = actionRetainType

-	| a = actionFilterType

-	| a = actionCreate

-	| a = actionFill

-	| a = actionCall

-	| a = actionAssign

-	| a = actionSetFeature

-	| a = actionGetFeature

-	| a = actionUnmark

-	| a = actionUnmarkAll

-	| a = actionTransfer

-	| a = actionMarkOnce

-	| a = actionTrie

-	| a = actionGather	

-	| a = actionExec

-	| a = actionMarkTable

-	| a = actionAdd

-	| a = actionRemove

-	| a = actionRemoveDuplicate

-	| a = actionMerge

-	| a = actionGet	

-	| a = actionGetList

-	| a = actionMatchedText

-	| a = actionClear

-	| a = actionShift

-	| a = actionConfigure

-	| a = actionDynamicAnchoring

-	| a = actionGreedyAnchoring

-	| a = actionTrim

-	| a = actionAddFilterType

-	| a = actionAddRetainType

-	| a = actionRemoveFilterType

-	| a = actionRemoveRetainType

-	| (externalAction)=> a = externalAction

-	

-	// | a = variableAction

-	) {result = a;}

-	;

-	

-action returns [RutaAction result = null]

-@init {

-result = ActionFactory.createEmptyAction(input.LT(1));

-}

-	:

-	(

-	a = actionColor

-	| a = actionDel

-	| a = actionLog

-	| a = actionMark

-	| a = actionMarkScore

-	| a = actionMarkFast

-	| a = actionMarkLast

-	| a = actionMarkFirst

-	| a = actionReplace

-	| a = actionRetainType

-	| a = actionFilterType

-	| a = actionCreate

-	| a = actionFill

-	| a = actionCall

-	| a = actionAssign

-	| a = actionSetFeature

-	| a = actionGetFeature

-	| a = actionUnmark

-	| a = actionUnmarkAll

-	| a = actionTransfer

-	| a = actionMarkOnce

-	| a = actionTrie

-	| a = actionGather	

-	| a = actionExec

-	| a = actionMarkTable

-	| a = actionAdd

-	| a = actionRemove

-	| a = actionRemoveDuplicate

-	| a = actionMerge

-	| a = actionGet	

-	| a = actionGetList

-	| a = actionMatchedText

-	| a = actionClear

-	| a = actionShift

-	| a = actionConfigure

-	| a = actionDynamicAnchoring

-	| a = actionGreedyAnchoring

-	| a = actionTrim

-	| a = actionAddFilterType

-	| a = actionAddRetainType

-	| a = actionRemoveFilterType

-	| a = actionRemoveRetainType

-	| (externalAction)=> a = externalAction

-	| (featureAssignmentExpression)=> fae = featureAssignmentExpression {a = ActionFactory.createAction(fae);}

-	| (typeExpression)=> te = typeExpression {a = ActionFactory.createAction(te);}

-	

-	// | a = variableAction

-	) {result = a;}

-	;

-

-

-

-

-variableAction returns [RutaAction action = null]

-	:

-	// also create an dummy action for auto-completion

-	//{isVariableOfType(input.LT(1).getText(), "ACTION")}?

-	 id = Identifier

-	{

-		action = ActionFactory.createAction(id);

-	}

-	;

-	

-externalAction returns [RutaAction action = null]

-	:

-	 id = Identifier

-	 LPAREN

-	 args = varArgumentList? 

-	 RPAREN

-	{

-		action = external.createExternalAction(id, args);

-	}

-	;

-

-

-actionCreate returns [RutaAction action = null]

-@init {

-    List left = new ArrayList();

-    List right = new ArrayList();

-    List indexes = new ArrayList();

-}

-    :

-    name = CREATE LPAREN structure = typeExpression

-    (COMMA 

-        

-    ((numberExpression)=> index = numberExpression {indexes.add(index);} ((COMMA index = numberExpression)=> (COMMA index = numberExpression){indexes.add(index);})* COMMA)?

-    

-    ((stringExpression ASSIGN_EQUAL)=> fname = stringExpression ASSIGN_EQUAL obj1 = argument {left.add(fname); right.add(obj1);} 

-    (COMMA fname = stringExpression ASSIGN_EQUAL obj1 = argument {left.add(fname);right.add(obj1);})*)?

-    

-    )?

-    {action = ActionFactory.createStructureAction(name, structure, indexes, left, right);}

-     RPAREN

-    ;

-

-

-actionMarkTable returns [RutaAction action = null]

-@init {

-    List<Expression> left = new ArrayList<Expression>();

-    List<Expression> right = new ArrayList<Expression>();

-}

-    :

-    name = MARKTABLE LPAREN 

-    structure = typeExpression COMMA 

-    index = numberExpression COMMA

-    table = wordTableExpression 

-    COMMA

-    ( (booleanExpression)=> ignoreCase = booleanExpression 

-    COMMA ignoreLength = numberExpression 

-    COMMA ignoreChar = stringExpression

-    COMMA maxIgnoreChar = numberExpression COMMA)?

-     key = stringExpression {left.add(key);} ASSIGN_EQUAL value = numberExpression{right.add(value);}

-    (COMMA key = stringExpression {left.add(key);} ASSIGN_EQUAL value = numberExpression{right.add(value);} )*

-    

-    

-    {

-    List<Expression> args = new ArrayList<Expression>();

-    args.add(index);

-    args.add(table);

-    	args.add(ignoreCase);

-	args.add(ignoreLength);

-	args.add(ignoreChar);

-    	args.add(maxIgnoreChar);

-    action = ActionFactory.createStructureAction(name, args, left, right, structure);}

-    RPAREN

-    ;

-

-actionGather returns [RutaAction action = null]

-@init {

-    List left = new ArrayList();

-    List right = new ArrayList();

-    List indexes = new ArrayList();

-}

-    :

-    name = GATHER LPAREN structure = typeExpression

-     {action = ActionFactory.createStructureAction(name, structure, indexes, left, right);}

-    (COMMA 

-    ((numberExpression)=> index = numberExpression {indexes.add(index);} ((COMMA index = numberExpression)=>(COMMA index = numberExpression) {indexes.add(index);})* COMMA)?

-    (fname = stringExpression ASSIGN_EQUAL (obj1 = numberExpression | obj2 = numberListExpression) {left.add(fname); right.add(obj1 != null? obj1 : obj2);} 

-    (COMMA fname = stringExpression ASSIGN_EQUAL (obj1 = numberExpression | obj2 = numberListExpression) {left.add(fname);right.add(obj1 != null? obj1 : obj2);})*)?

-    

-    )? 

-    {action = ActionFactory.createStructureAction(name, structure, indexes, left, right);}

-    RPAREN

-    ;

-

-

-actionFill returns [RutaAction action = null]

-@init {

-    List left = new ArrayList();

-    List right = new ArrayList();

-}

-    :

-    name = FILL LPAREN structure = typeExpression

-    {action = ActionFactory.createStructureAction(name, structure, null, left, right);}

-    (

-    COMMA fname = stringExpression ASSIGN_EQUAL

-    obj1 = argument {left.add(fname); right.add(obj1);}

-    )+

-    {action = ActionFactory.createStructureAction(name, structure, null, left, right);}

-     RPAREN

-    ;

-    

-

-actionColor returns [RutaAction action = null]

-    :   

-    name = COLOR LPAREN type = typeExpression 

-    {action = ActionFactory.createAction(name, type, bgcolor, fgcolor, selected);}

-     COMMA 

-    bgcolor = stringExpression 

-    {action = ActionFactory.createAction(name, type, bgcolor, fgcolor, selected);}

-    (COMMA

-    fgcolor = stringExpression

-    {action = ActionFactory.createAction(name, type, bgcolor, fgcolor, selected);} 

-    (COMMA

-    selected = booleanExpression)?)?

-    {action = ActionFactory.createAction(name, type, bgcolor, fgcolor, selected);}

-    RPAREN

-    ;

-

-actionDel returns [RutaAction action = null]

-    :   

-    name = DEL

-    {action = ActionFactory.createAction(name, new ArrayList());}

-    ;

-        

-actionLog returns [RutaAction action = null]

-    :   

-    name = LOG LPAREN lit = stringExpression (COMMA log = LogLevel)? 

-    {action = ActionFactory.createLogAction(name, lit, log);} //TODO handle logLevel

-    RPAREN 

-    ;

-

-actionMark returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = MARK LPAREN 

-    type = typeExpression

-    {list.add(type);}

-    (

-    COMMA (index = numberExpression) => index = numberExpression {list.add(index);}

-    )*

-    {action = ActionFactory.createAction(name, list);}

-     RPAREN

-    ;

-

-actionShift returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = SHIFT LPAREN 

-    type = typeExpression

-    {list.add(type);}

-    (

-    COMMA (index = numberExpression) => index = numberExpression {list.add(index);}

-    )*

-    {action = ActionFactory.createAction(name, list);}

-     RPAREN

-    ;

-

-actionMarkScore returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = MARKSCORE LPAREN score = numberExpression COMMA type = typeExpression

-    {list.add(score); list.add(type);}

-    (

-    COMMA (index = numberExpression) => index = numberExpression {list.add(index);}

-    )*

-    {action = ActionFactory.createAction(name, list);}

-     RPAREN

-    ;

-

-actionMarkOnce returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = MARKONCE LPAREN ((score = numberExpression) => score = numberExpression COMMA)? (type = typeExpression) => type = typeExpression

-    {list.add(score); list.add(type);}

-    (

-    COMMA (index = numberExpression) => index = numberExpression {list.add(index);}

-    )* 

-    {action = ActionFactory.createAction(name, list);}

-    RPAREN

-    ;

-

-actionMarkFast returns [RutaAction action = null]

-@init {

- Expression list = null;

-}

-    :   

-    name = MARKFAST LPAREN type = typeExpression 

-    {action = ActionFactory.createAction(name, type, list, ignore, numExpr);}

-    COMMA (list1 = wordListExpression | list2 = stringListExpression) {list = list1 == null ? list2 : list1;}

-    {action = ActionFactory.createAction(name, type, list, ignore, numExpr);}

-    (COMMA ignore = booleanExpression (COMMA numExpr = numberExpression (COMMA ignoreWS = booleanExpression)?)?)? 

-    {action = ActionFactory.createAction(name, type, list, ignore, numExpr, ignoreWS);} // TODO handle list

-    RPAREN

-    ;

-

-actionMarkLast returns [RutaAction action = null]

-    :   

-    name = MARKLAST LPAREN type = typeExpression 

-    {action = ActionFactory.createAction(name, type);}

-    RPAREN

-    ;

-

-actionMarkFirst returns [RutaAction action = null]

-    :   

-    name = MARKFIRST LPAREN type = typeExpression 

-    {action = ActionFactory.createAction(name, type);}

-    RPAREN

-    ;

-

-

-actionReplace returns [RutaAction action = null]

-    :   

-    name = REPLACE LPAREN lit = stringExpression 

-    {action = ActionFactory.createAction(name, lit);}

-    RPAREN

-    ;

-

-        

-actionRetainType returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = RETAINTYPE (LPAREN id = typeExpression {list.add(id);} 

-    {action = ActionFactory.createAction(name, list);}

-    (COMMA id = typeExpression {list.add(id);})*

-    {action = ActionFactory.createAction(name, list);}

-     RPAREN)?

-    {action = ActionFactory.createAction(name, list);}

-    ;

-    

-

-actionFilterType returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = FILTERTYPE (LPAREN id = typeExpression {list.add(id);} 

-    {action = ActionFactory.createAction(name, list);}

-    (COMMA id = typeExpression {list.add(id);})* 

-    {action = ActionFactory.createAction(name, list);}

-    RPAREN)?

-    {action = ActionFactory.createAction(name, list);}

-    ;       

-

-actionAddFilterType returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = ADDFILTERTYPE (LPAREN id = typeExpression {list.add(id);} 

-    {action = ActionFactory.createAction(name, list);}

-    (COMMA id = typeExpression {list.add(id);})* 

-    {action = ActionFactory.createAction(name, list);}

-    RPAREN)

-    {action = ActionFactory.createAction(name, list);}

-    ;   

-

-actionAddRetainType returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = ADDRETAINTYPE (LPAREN id = typeExpression {list.add(id);} 

-    {action = ActionFactory.createAction(name, list);}

-    (COMMA id = typeExpression {list.add(id);})* 

-    {action = ActionFactory.createAction(name, list);}

-    RPAREN)

-    {action = ActionFactory.createAction(name, list);}

-    ;   

-

-

-actionRemoveFilterType returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = REMOVEFILTERTYPE (LPAREN id = typeExpression {list.add(id);} 

-    {action = ActionFactory.createAction(name, list);}

-    (COMMA id = typeExpression {list.add(id);})* 

-    {action = ActionFactory.createAction(name, list);}

-    RPAREN)

-    {action = ActionFactory.createAction(name, list);}

-    ;   

-

-actionRemoveRetainType returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = REMOVERETAINTYPE (LPAREN id = typeExpression {list.add(id);} 

-    {action = ActionFactory.createAction(name, list);}

-    (COMMA id = typeExpression {list.add(id);})* 

-    {action = ActionFactory.createAction(name, list);}

-    RPAREN)

-    {action = ActionFactory.createAction(name, list);}

-    ; 

-

-actionCall returns [RutaAction action = null]

-@init {

-String string = "";

-

-}

-    :

-    name = CALL lp = LPAREN 

-    {   action = ActionFactory.createCallAction(name, StatementFactory.createEmtpyComponentReference(lp));}

-    

-    ns = dottedComponentReference 

-    {   if(ns != null) {action = ActionFactory.createCallAction(name, ns);}} 

-    RPAREN

-    ;

-

-

-actionConfigure returns [RutaAction action = null]

-@init {

-    List left = new ArrayList();

-    List right = new ArrayList();

-}

-    :

-    name = CONFIGURE lp = LPAREN 

-    {   action = ActionFactory.createConfigureAction(name, StatementFactory.createEmtpyComponentReference(lp), null , null);}

-    

-    ns = dottedComponentReference 

-    {   if(ns != null) {action = ActionFactory.createConfigureAction(name, ns, null , null);}} 

-    

-     (COMMA fname = stringExpression ASSIGN_EQUAL obj1 = argument {left.add(fname); right.add(obj1);} 

-    (COMMA fname = stringExpression ASSIGN_EQUAL obj1 = argument {left.add(fname);right.add(obj1);})*)?

-    {   action = ActionFactory.createConfigureAction(name, ns, left , right);} 

-    

-    RPAREN

-    ;

-

-

-actionExec returns [RutaAction action = null]

-@init {

-String string = "";

-}

-    :

-    name = EXEC lp = LPAREN 

-     {   action = ActionFactory.createCallAction(name, StatementFactory.createEmtpyComponentReference(lp));}

-     ((stringExpression)=> view = stringExpression COMMA)?

-     {   if(view != null) {action = ActionFactory.createCallAction(name, ns, null, view);}}

-    ns = dottedComponentReference 

-     {   if(ns != null) {action = ActionFactory.createCallAction(name, ns, null, view);}}

-     (COMMA tl = typeListExpression)?

-     {   if(ns != null) {action = ActionFactory.createCallAction(name, ns, tl, view);}}

-    RPAREN

-    ;

-

-        

-actionAssign returns [RutaAction action = null]

-@init{

-    VariableReference ref = null;

-}

-    :

-    name = ASSIGN LPAREN

-    (id = Identifier 

-    

-    {

-    ref = ExpressionFactory.createGenericVariableReference(id);

-    action = ActionFactory.createAction(name, ref, e);}

-    COMMA e = argument

-    ) RPAREN 

-    {

-    ref = ExpressionFactory.createGenericVariableReference(id);

-    action = ActionFactory.createAction(name, ref, e);}

-    ;

-

-//unknown

-actionSetFeature returns [RutaAction action = null]

-    :

-    name = SETFEATURE LPAREN f = stringExpression 

-     {action = ActionFactory.createAction(name, f, v);}

-    COMMA v = argument 

-    {action = ActionFactory.createAction(name, f, v);}

-    RPAREN

-    ;

-

-actionGetFeature returns [RutaAction action = null]

-    :

-    name = GETFEATURE LPAREN f = stringExpression 

-    {action = ActionFactory.createAction(name, f, v);}

-    COMMA v = variable 

-    {action = ActionFactory.createAction(name, f, v);}

-    RPAREN

-    ;

-

-//unknown

-actionDynamicAnchoring returns [RutaAction action = null]

-    :

-    name = DYNAMICANCHORING LPAREN active = booleanExpression 

-     {action = ActionFactory.createAction(name, active);}

-    (COMMA penalty = numberExpression 

-    {action = ActionFactory.createAction(name, active, penalty);}

-    (COMMA factor = numberExpression)?)? 

-    {action = ActionFactory.createAction(name, active, penalty, factor);}

-    RPAREN

-    ;

-

-actionGreedyAnchoring returns [RutaAction action = null]

-    :

-    name = GREEDYANCHORING 

-    {action = ActionFactory.createAction(name, active);}

-    LPAREN active = booleanExpression (COMMA active2 = booleanExpression)?

-     {action = ActionFactory.createAction(name, active, active2);}

-    RPAREN

-    ;

-

-actionTrim returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :

-    name = TRIM LPAREN

-    {action = ActionFactory.createAction(name, list);}

-    (

-    t1 = typeExpression {list.add(t1); action = ActionFactory.createAction(name, list);} 

-    (COMMA t2 = typeExpression {list.add(t1); action = ActionFactory.createAction(name, list);})*

-    |

-    tl = typeListExpression {action = ActionFactory.createAction(name, tl);}

-    )

-    RPAREN

-    ;

-

-//unknown

-actionUnmark returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :

-    name = UNMARK LPAREN f = typeExpression

-    {action = ActionFactory.createAction(name, f);}

-    

-    (COMMA 

-    (

-  	(b = booleanExpression) => b = booleanExpression

-  	{action = ActionFactory.createAction(name, f, b);}

-  	|

-  	(

-  	index = numberExpression {list.add(index);} 

-  	{action = ActionFactory.createAction(name, f, list);}

-  	(COMMA index = numberExpression {list.add(index);})*

-  	{action = ActionFactory.createAction(name, f, list);}

-  	)

-    )

-      

-    )?

-    {action = ActionFactory.createAction(name, f , b, list);}

-     RPAREN

-    ;

-

-

-

-actionUnmarkAll returns [RutaAction action = null]

-    :

-    name = UNMARKALL LPAREN f = typeExpression 

-    {action = ActionFactory.createAction(name, f, list);}

-    (COMMA list = typeListExpression)?

-    {action = ActionFactory.createAction(name, f, list);}

-     RPAREN

-    ;

-

-

-//unknown

-

-actionTransfer returns [RutaAction action = null]

-    :

-    name = TRANSFER LPAREN f = typeExpression 

-    {action = ActionFactory.createAction(name, f);}

-    RPAREN

-    ;

-    

-actionTrie returns [RutaAction action = null]

-@init {

-Map<Expression, Expression> map = new HashMap<Expression, Expression>();

-List<Expression> left = new ArrayList<Expression>();

-List<Expression> right = new ArrayList<Expression>();

-}

-    :

-    name = TRIE LPAREN

-        key = stringExpression {left.add(key);}ASSIGN_EQUAL 

-        (value = typeExpression{right.add(value);} | listValue = untypedListExpression {right.add(listValue);}) 

-        (COMMA key = stringExpression {left.add(key);} ASSIGN_EQUAL 

-        (value = typeExpression{right.add(value);} | listValue = untypedListExpression {right.add(listValue);}) 

-        )*

-        COMMA list = wordListExpression 

-        

-    COMMA ignoreCase = booleanExpression 

-    COMMA ignoreLength = numberExpression 

-    COMMA edit = booleanExpression 

-    COMMA distance = numberExpression 

-    COMMA ignoreChar = stringExpression 

-    //TODO cost parameter

-    

-    {

-    List<Expression> args = new ArrayList<Expression>();

-    	args.add(ignoreCase);

-	args.add(ignoreLength);

-	args.add(edit);

-	args.add(distance);

-	args.add(ignoreChar);

-    

-    action = ActionFactory.createStructureAction(name, args, left, right, list);}

-    RPAREN

-    ;   

-

-

-actionAdd returns [RutaAction action = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-} 

-    :

-    name = ADD LPAREN f = listVariable 

-    {action = ActionFactory.createAction(name, f, list);}

-    (COMMA a = argument {list.add(a);})+ 

-    {action = ActionFactory.createAction(name, f, list);}

-    RPAREN

-    ;

-

-actionRemove returns [RutaAction action = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-} 

-    :

-    name = REMOVE LPAREN f = listVariable 

-    {action = ActionFactory.createAction(name, f, list);}

-    (COMMA a = argument {list.add(a);})+ 

-    {action = ActionFactory.createAction(name, f, list);}

-    RPAREN

-    ;

-

-

-actionRemoveDuplicate returns [RutaAction action = null]

-    :

-    name = REMOVEDUPLICATE LPAREN f = listVariable 

-    {action = ActionFactory.createAction(name, f);}

-    RPAREN

-    ;

-   

-actionMerge returns [RutaAction action = null]

-@init{

-	List<Expression> list = new ArrayList<Expression>();

-} 

-    :

-    name = MERGE LPAREN join = booleanExpression 

-     {action = ActionFactory.createAction(name, join, t, list);}

-    COMMA t = listVariable 

-     {action = ActionFactory.createAction(name, join, t, list);}

-    COMMA f = listExpression {list.add(f);} 

-    (COMMA f = listExpression {list.add(f);})+ 

-    {action = ActionFactory.createAction(name, join, t, list);}

-    RPAREN

-    ;

-

-actionGet returns [RutaAction action = null]

-    :

-    name = GET LPAREN f = listExpression 

-    {action = ActionFactory.createAction(name, f, var, op);}

-    COMMA var = variable 

-    {action = ActionFactory.createAction(name, f, var, op);}

-    COMMA op = stringExpression 

-    {action = ActionFactory.createAction(name, f, var, op);}

-    RPAREN

-    ;

-

-

-actionGetList returns [RutaAction action = null]

-    :

-    name = GETLIST LPAREN var = listVariable 

-    {action = ActionFactory.createAction(name, var, op);}

-    COMMA op = stringExpression 

-    {action = ActionFactory.createAction(name, var, op);}

-    RPAREN

-    ;

-

-actionMatchedText returns [RutaAction action = null]

-@init {

-List<Expression> list = new ArrayList<Expression>();

-}

-    :   

-    name = MATCHEDTEXT LPAREN 

-    var = variable

-    (

-    COMMA index = numberExpression {list.add(index);}

-    )* 

-    {action = ActionFactory.createAction(name, var, list);}

-    RPAREN

-    ;

-    

-actionClear returns [RutaAction action = null]

-    :

-    name = CLEAR LPAREN var = listVariable 

-    {action = ActionFactory.createAction(name, var);}

-    RPAREN

-    ;

-

-

-//OKdc

-varArgumentList returns [List<Expression> args = new ArrayList<Expression>()]

-	:

-	arg = argument {args.add(arg);} (COMMA arg = argument {args.add(arg);})*

-	;

-

-//changed but unknown statuslistExpression

-argument returns [Expression expr = null] //SimpleReference arg1 = null]

-//options {

-//	backtrack = true;

-//}

-	:

-	(nullExpression) => a5 = nullExpression {expr = a5;}

-	| (featureExpression)=> fe = featureExpression {expr = fe;}

-	| (booleanExpression)=> a2 = booleanExpression {expr = a2;}

-	| (numberExpression)=> a3 = numberExpression {expr = a3;}

-	| (stringExpression)=> a4 = stringExpression {expr = a4;}

-	| (listExpression)=> l = listExpression {expr = l;}

-	| a1 = typeExpression {expr = a1;}

-	//token = (

-	//(booleanExpression[par]) => booleanExpression[par]

-	//| (numberExpression[par]) => numberExpression[par]

-	//| (stringExpression[par]) => stringExpression[par]

-	//| (typeExpression[par]) => typeExpression[par]

-	//)

-	//{arg = token;}

-	;

-

-nullExpression returns [Expression expr = null]

-	:

-	t = NULL {expr = ExpressionFactory.createNullExpression(t);}

-	;

-

-primitiveArgument returns [Expression expr = null]

-options {

-	backtrack = true;

-}

-	:

-	 a4 = simpleStringExpression {expr = a4;}

-	| a2 = simpleBooleanExpression {expr = a2;}

-	| a3 = simpleNumberExpression {expr = a3;}

-	| a1 = simpleTypeExpression {expr = a1;}

-	//token = (

-	//(booleanExpression[par]) => booleanExpression[par]

-	//| (numberExpression[par]) => numberExpression[par]

-	//| (stringExpression[par]) => stringExpression[par]

-	//| (typeExpression[par]) => typeExpression[par]

-	//)

-	//{arg = token;}

-	;

-

-//snooze

-dottedIdentifier returns [String idString = ""]

-	:

-	id = Identifier {idString += id.getText();}

-	(

-		dot = DOT {idString += dot.getText();}

-		idn = Identifier {idString += idn.getText();}

-	)*

-	;

-dottedIdentifier2 returns [String idString = ""]

-	:

-	id = Identifier {idString += id.getText();}

-	(

-		dot = (DOT|MINUS) {idString += dot.getText();}

-		idn = Identifier {idString += idn.getText();}

-	)*

-	;

-

-

-//snooze	

-dottedId returns [Token token = null ]

-@init {CommonToken ct = null;}

-	:

-	id = Identifier {

-		ct = new CommonToken(id);

-		}

-	(

-		dot = DOT {ct.setText(ct.getText() + dot.getText());}

-		id = Identifier {ct.setStopIndex(getBounds(id)[1]);

-		                 ct.setText(ct.getText() + id.getText());}

-	)*

-	{token = ct;

-	 return token;}

-	;

-

-dottedId2 returns [Token token = null ]

-@init {CommonToken ct = null;}

-	:

-	id = Identifier {

-		ct = new CommonToken(id);

-		}

-	(

-		dot = (DOT| MINUS) {ct.setText(ct.getText() + dot.getText());}

-		id = Identifier {ct.setStopIndex(getBounds(id)[1]);

-		                 ct.setText(ct.getText() + id.getText());}

-	)+

-	{token = ct;

-	 return token;}

-	;

-

-dottedId3 returns [Token token = null ]

-@init {CommonToken ct = null;}

-	:

-	// at least one dot!

-	id = Identifier {

-		ct = new CommonToken(id);

-		}

-	(

-		dot = DOT {ct.setText(ct.getText() + dot.getText());}

-		id = Identifier {ct.setStopIndex(getBounds(id)[1]);

-		                 ct.setText(ct.getText() + id.getText());}

-	)+

-	{token = ct;

-	 return token;}

-	;

-

-//snooze	

-dottedComponentReference returns [ComponentReference ref = null ]

-@init {CommonToken ct = null;}

-	:

-	id = Identifier {

-		ct = new CommonToken(id);

-		//if (ct.getText().equals("<missing Identifier>")) {

-	        //    CommonTokenStream cts = (CommonTokenStream) input;

-	        //    Token lt = cts.LT(1);

-	        //    ct = new CommonToken(lt);

-	        //  }

-		}

-	(

-		dot = (DOT | MINUS) {ct.setText(ct.getText() + dot.getText());}

-		id = Identifier {ct.setStopIndex(getBounds(id)[1]);

-		                 ct.setText(ct.getText() + id.getText());}

-	)*

-	{

-	 if (!ct.getText().equals("<missing Identifier>")) ref = StatementFactory.createComponentReference(ct);}

-	;

-

-dottedComponentDeclaration returns [ComponentDeclaration ref = null ]

-@init {CommonToken ct = null;}

-	:

-	id = Identifier {

-		ct = new CommonToken(id);

-		ref = StatementFactory.createComponentDeclaration(ct);

-		}

-	(

-		{(input.get(id.getTokenIndex()+1).getChannel() != Token.HIDDEN_CHANNEL)}?

-		dot = (DOT | MINUS) {ct.setText(ct.getText() + dot.getText());ref = StatementFactory.createComponentDeclaration(ct);}

-		{(input.get(dot.getTokenIndex()+1).getChannel() != Token.HIDDEN_CHANNEL)}?

-		id = Identifier {ct.setStopIndex(getBounds(id)[1]);

-		                 ct.setText(ct.getText() + id.getText());

-		                 ref = StatementFactory.createComponentDeclaration(ct);}

-	)*

-	{

-	 if (!ct.getText().equals("<missing Identifier>")) ref = StatementFactory.createComponentDeclaration(ct);}

-	;

-

-//seems OK

-annotationType returns [VariableReference at = null]

-	: 

-	(

-	atRef = annotationTypeVariableReference {at = atRef;}

-	)

-	;

-		

-annotationTypeVariableReference returns [VariableReference typeVar = null]

-  :

-  atRef = dottedId 

-  {typeVar = ExpressionFactory.createAnnotationTypeVariableReference(atRef);}

-;

-

-wordListExpression returns [Expression expr = null]

-	:

-	id = Identifier

-	{expr = ExpressionFactory.createListVariableReference(id);}

-	|

-	path = RessourceLiteral

-	{expr = ExpressionFactory.createRessourceReference(path);}

-	;

-

-

-wordTableExpression returns [Expression expr = null]

-	:

-	id = Identifier

-	{expr = ExpressionFactory.createTableVariableReference(id);}

-	|

-	path = RessourceLiteral

-	{expr = ExpressionFactory.createRessourceReference(path);}

-	;

-

-//seems OK

-numberExpression returns [Expression expr = null]

-@init {

-expr = ExpressionFactory.createEmptyNumberExpression(input.LT(1));

-}

-	:

-	e = additiveExpression

-	{if(e!=null) expr = ExpressionFactory.createNumberExpression(e);}

-	;

-

-//seems OK

-additiveExpression returns [Expression root = null]

-    :   expr1=multiplicativeExpression {root=expr1;}

-	((PLUS | MINUS)=> op=(PLUS | MINUS) expr2=multiplicativeExpression {root=ExpressionFactory.createBinaryArithmeticExpr(root,expr2,op);})*

-	;

-

-//NOT OK TODO

-multiplicativeExpression returns [Expression root = null]

-    :

-	((simpleNumberExpression)=> expr1 = simpleNumberExpression {root=expr1;}

-	( ( STAR | SLASH | PERCENT )=> op=( STAR | SLASH | PERCENT ) sNE = simpleNumberExpression {root=ExpressionFactory.createBinaryArithmeticExpr(root,sNE,op);} )*

-	|   e1 = numberFunction {root = e1;})

-	;

-

-//seems OK

-numberExpressionInPar returns [RutaExpression expr = null]

-	:

-	lp = LPAREN numE = numberExpression rp = RPAREN 

-	{expr = ExpressionFactory.createNumberExpression((RutaExpression)numE); 

-	  expr.setInParantheses(true);

-          expr.setStart(((CommonToken) lp).getStartIndex());

-          expr.setEnd(((CommonToken) rp).getStopIndex()+1);}

-	;

-

-//seems OK

-simpleNumberExpression returns [Expression expr = null]

-	:

-	(featureExpression)=> fe = featureExpression {ExpressionFactory.createNumberExpression(fe);}

-	|

-	 m = MINUS? numVarRef = numberVariable

-	  {if(m == null) {expr = numVarRef;} else {expr = ExpressionFactory.createNegatedNumberExpression(m, numVarRef);}}

-	| (m = MINUS)? decLit = DecimalLiteral

-	  {expr = ExpressionFactory.createDecimalLiteral(decLit,m);}

-	| m = MINUS? fpLit = FloatingPointLiteral

-	  {expr = ExpressionFactory.createFloatingPointLiteral(fpLit,m);}

-	

-	| numExprPar = numberExpressionInPar

-	  {expr = numExprPar;}

-	;

-

-// not checked

-numberFunction returns [Expression expr = null]

-	:

-	(op=(EXP | LOGN | SIN | COS | TAN) numExprP=numberExpressionInPar)

-	{expr = ExpressionFactory.createUnaryArithmeticExpr(numExprP,op);}

-	//| {root = ExpressionFactory.createNumberFunction(numExprP,op)}

-	| (e = externalNumberFunction)=> e = externalNumberFunction {expr = e;}

-	;

-

-// not checked

-externalNumberFunction returns [Expression expr = null]

-	:

-	id = Identifier

-	LPAREN

-	args = varArgumentList?

-	RPAREN

-	{

-		expr = external.createExternalNumberFunction(id, args);

-	}

-	;

-

-//OK

-numberVariable returns [Expression expr = null]

-	:

-	   ( {isVariableOfType(input.LT(1).getText(), "INT")}? numVarRef = Identifier //

-	 | {isVariableOfType(input.LT(1).getText(), "DOUBLE")}? numVarRef = Identifier

-	  | {isVariableOfType(input.LT(1).getText(), "FLOAT")}? numVarRef = Identifier)

-	 {	 expr = ExpressionFactory.createNumberVariableReference(numVarRef);}

-	;

-	catch [Exception e]{expr = ExpressionFactory.createNumberVariableReference(input.LT(1));}

-	

-//OK - interface to flag stringExpressions?

-stringExpression returns [Expression expr = null]

-@init {

-List<Expression> exprList = new ArrayList<Expression>();

-{expr = ExpressionFactory.createEmptyStringExpression(input.LT(1));}

-}

-	:

-	(featureExpression)=> fe = featureExpression {expr = ExpressionFactory.createStringExpression(fe);}

-	|

-	(stringFunction)=> e = stringFunction {expr = e;} 

-	|

-	strExpr1 = simpleStringExpression {if (strExpr1!=null) exprList.add(strExpr1);}

-	((PLUS)=> PLUS (nextstrExpr = simpleStringExpression {if (nextstrExpr!=null) exprList.add(nextstrExpr);}

-		| ne = numberExpressionInPar {if (ne!=null) exprList.add(ne);}

-		| be = simpleBooleanExpression {if (be!=null) exprList.add(be);}

-		| (listExpression)=> le = listExpression {if (le!=null) exprList.add(le);}

-		| te = typeExpression {if (te!=null) exprList.add(te);}

-		))*

-	{expr = ExpressionFactory.createStringExpression(exprList);}

-	;

-

-

-// not checked

-stringFunction returns [Expression expr = null]

-@init {List<Expression> list = new ArrayList<Expression>();}

-:

-	name = REMOVESTRING LPAREN var = variable (COMMA s = stringExpression{list.add(s);})+ RPAREN

-	{expr = ExpressionFactory.createStringFunction(name,var,list);}

-	|

-	(e = externalStringFunction)=> e = externalStringFunction {expr = e;}

-	;

-

-// not checked

-externalStringFunction returns [Expression expr = null]

-	:

-	id = Identifier

-	LPAREN

-	args = varArgumentList?

-	RPAREN

-	{

-		expr = external.createExternalStringFunction(id, args);

-	}

-	;

-

-//OK - interface to flag stringExpressions?

-simpleStringExpression returns [Expression expr = null]

-	: 

-	lit = StringLiteral {expr = ExpressionFactory.createSimpleString(lit);} 

-	 | {isVariableOfType(input.LT(1).getText(), "STRING")}? variableId = Identifier {expr = ExpressionFactory.createStringVariableReference(variableId);} 

-	; /*{isVariableOfType(input.LT(1).getText(), "STRING")}?*/

-

-// commented thu, 19.02.09 => rewritten 'stringExpression'

-//simpleStringExpressionOrNumberExpression returns [Expression expr = null]

-//	: StringLiteral

-//	 | {isVariableOfType(input.LT(1).getText(), "STRING")}? id = Identifier

-//	| e = numberExpressionInPar {} 

-//	;

-

-//OK - interface to flag booleanExpressions?

-booleanExpression returns [Expression expr = null]

-@init{

-expr = ExpressionFactory.createEmptyBooleanExpression(input.LT(1));

-}

-	:

-	(featureTypeExpression)=>fmbe = featureTypeExpression {expr = ExpressionFactory.createBooleanExpression(fmbe);}

-	| (featureExpression)=> fe = featureExpression {expr = ExpressionFactory.createBooleanExpression(fe);}

-	| (composedBooleanExpression)=> bcE = composedBooleanExpression {expr = bcE;}

-	| sbE = simpleBooleanExpression {expr = sbE;}

-	;

-	

-simpleBooleanExpression returns [Expression expr = null]

-	:

-	 (lbE = literalBooleanExpression {expr = lbE;}

-	| {isVariableOfType(input.LT(1).getText(), "BOOLEAN")}?(variableId = Identifier

-	  {expr = ExpressionFactory.createBooleanVariableReference(variableId);})

-	  )

-	  {expr = ExpressionFactory.createBooleanExpression(expr);}

-	;

-

-// not checked

-composedBooleanExpression returns [Expression expr = null]

-	:

-	(e2 = booleanCompare)=> e2 = booleanCompare {expr = e2;}

-	| (bte = booleanTypeExpression)=> bte = booleanTypeExpression{expr = bte;}

-	| (bne = booleanNumberExpression)=> bne = booleanNumberExpression{expr = bne;}

-	| e1 = booleanFunction {expr = e1;}

-	| LPAREN ep = booleanExpression RPAREN {expr = ep;}

-	;

-

-// not checked

-booleanFunction returns [Expression expr = null]

-

-	:

-	(op = XOR LPAREN e1 = booleanExpression COMMA e2 = booleanExpression RPAREN)

-	{expr = ExpressionFactory.createBooleanFunction(op,e1,e2);}

-	| (e = externalBooleanFunction)=> e = externalBooleanFunction {expr = e;}

-	;

-	

-// not checked

-externalBooleanFunction returns [Expression expr = null]

-	:

-	id = Identifier

-	LPAREN

-	args = varArgumentList?

-	RPAREN

-	{

-		expr = external.createExternalBooleanFunction(id, args);

-	}

-	;

-

-// not checked

-booleanCompare returns [Expression expr = null]

-	:

-	(e1 = simpleBooleanExpression op = (EQUAL | NOTEQUAL) e2 = booleanExpression)

-	{expr = ExpressionFactory.createBooleanFunction(op,e1,e2);}

-	;

-

-//OK

-literalBooleanExpression returns  [BooleanLiteral expr = null]

-	:

-	(value = TRUE 

-	| value = FALSE)

-	{expr = ExpressionFactory.createSimpleBooleanExpression(value);}

-	;

-

-//not checked

-booleanTypeExpression  returns  [Expression expr = null]

-	:

-	e1 = typeExpression

-	op = (EQUAL | NOTEQUAL)

-	e2 = typeExpression

-	{expr = ExpressionFactory.createBooleanTypeExpression(e1,op,e2);}

-	;

-

-// TODO	requires numberExpression first!

-//nearly OK

-booleanNumberExpression  returns  [Expression expr = null]

-	:

-	//LPAREN

-	e1 = numberExpression

-	op = (LESS | GREATER | GREATEREQUAL | LESSEQUAL | EQUAL | NOTEQUAL)

-	e2 = numberExpression

-	//RPAREN

-	{expr = ExpressionFactory.createBooleanNumberExpression(e1,op,e2);}

-	;

-

-genericVariableReference returns[Expression varRef]

-:

-  id=Identifier

-  {return ExpressionFactory.createGenericVariableReference(id);}

-;

-

-

-

-

-

-    

-

-

diff --git a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.tokens b/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.tokens
deleted file mode 100644
index 00b7752..0000000
--- a/trunk/ruta-ep-ide/src/main/antlr3/org/apache/uima/ruta/ide/core/parser/RutaParser.tokens
+++ /dev/null
@@ -1,163 +0,0 @@
-STAR=149

-FloatTypeSuffix=125

-OctalLiteral=123

-LOG=37

-CONTAINS=8

-REMOVE=72

-GREATEREQUAL=162

-MARKFAST=41

-CONDITION=102

-MATCHEDTEXT=78

-COUNT=14

-LOGN=111

-DYNAMICANCHORING=58

-NOT=70

-Identifier=135

-ACTION=103

-CLEAR=80

-NOTEQUAL=159

-ENDSWITH=65

-DOUBLELIST=106

-VBAR=151

-RPAREN=137

-CREATE=31

-GREATER=154

-SIN=112

-EXP=110

-CURRENTCOUNT=16

-COS=113

-TAN=114

-TYPELIST=109

-FloatString=94

-LESS=153

-REGEXP=25

-GET=75

-UNMARK=54

-PARTOF=22

-LAST=18

-COMMENT=165

-REMOVEDUPLICATE=73

-UNMARKALL=55

-RBRACK=139

-NEAR=20

-GREEDYANCHORING=59

-LINE_COMMENT=166

-IntegerTypeSuffix=120

-MARKSCORE=39

-REMOVESTRING=79

-TRANSFER=56

-LCURLY=140

-TRIE=7

-FILTERTYPE=47

-MARKFIRST=44

-STRINGLIST=108

-MARKONCE=40

-ScriptString=86

-EngineString=87

-WS=164

-WORDTABLE=11

-WORDLIST=10

-AutomataBlockString=90

-FromString=99

-FloatingPointLiteral=126

-STARTANCHOR=118

-INTLIST=105

-OR=21

-TRIM=60

-JavaIDDigit=134

-FLOATLIST=107

-CALL=48

-Annotation=5

-FALSE=117

-LESSEQUAL=161

-RessourceLiteral=130

-VOTE=27

-Letter=133

-EscapeSequence=127

-SIZE=77

-REMOVEFILTERTYPE=69

-LBRACK=138

-CharacterLiteral=128

-DEL=36

-ATTRIBUTE=34

-TypeString=91

-SHIFT=57

-Exponent=124

-THEN2=82

-ASSIGN_EQUAL=155

-RETAINTYPE=46

-AND=12

-TypeSystemString=97

-BlockString=89

-ADDFILTERTYPE=68

-IntString=92

-HexDigit=119

-COLOR=35

-POSITION=24

-LPAREN=136

-IF=28

-LogLevel=83

-CONFIGURE=50

-SLASH=150

-THEN=81

-FILL=33

-COMMA=145

-IS=63

-GETLIST=76

-REPLACE=45

-AMPER=152

-AsString=100

-WILDCARD=163

-EQUAL=158

-GATHER=32

-INLIST=17

-PLUS=147

-BooleanString=96

-GETFEATURE=53

-DOT=143

-ListIdentifier=6

-PARTOFNEQ=23

-ADD=71

-BOOLEANLIST=104

-MARKTABLE=42

-HexLiteral=121

-XOR=115

-MARK=38

-PERCENT=156

-PackageString=85

-PARSE=30

-OldColor=84

-MERGE=74

-MARKLAST=43

-CONTEXTCOUNT=13

-BEFORE=61

-EXEC=49

-ImportString=98

-AFTER=62

-MINUS=148

-DecimalLiteral=122

-TRUE=116

-SEMI=146

-FEATURE=29

-SymbolString=101

-StringString=95

-StringLiteral=129

-COLON=144

-SCORE=26

-QUESTION=157

-ADDRETAINTYPE=66

-UnicodeEscape=131

-STARTSWITH=64

-RCURLY=141

-ASSIGN=51

-REMOVERETAINTYPE=67

-TOTALCOUNT=15

-UimafitString=88

-DECLARE=9

-DocComment=4

-MOFN=19

-SETFEATURE=52

-OctalEscape=132

-DoubleString=93

-CIRCUMFLEX=142

-ALT_NOTEQUAL=160

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/RutaIdeCorePlugin.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/RutaIdeCorePlugin.java
deleted file mode 100644
index a7540f9..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/RutaIdeCorePlugin.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*

- * 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.ruta.ide;

-

-import java.io.IOException;

-import java.net.URL;

-

-import org.eclipse.core.runtime.FileLocator;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.dltk.core.environment.IDeployment;

-import org.eclipse.dltk.core.environment.IExecutionEnvironment;

-import org.eclipse.dltk.core.environment.IFileHandle;

-import org.eclipse.ui.plugin.AbstractUIPlugin;

-import org.osgi.framework.Bundle;

-import org.osgi.framework.BundleContext;

-import org.osgi.service.packageadmin.PackageAdmin;

-

-/**

- * The activator class controls the plug-in life cycle

- */

-public class RutaIdeCorePlugin extends AbstractUIPlugin {

-

-  // The plug-in ID

-  public static final String PLUGIN_ID = "org.apache.uima.ruta.ide"; //$NON-NLS-1$

-

-  // The shared instance

-  private static RutaIdeCorePlugin plugin;

-

-  private BundleContext bundleContext;

-  

-  /**

-   * The constructor

-   */

-  public RutaIdeCorePlugin() {

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

-   */

-  public void start(BundleContext context) throws Exception {

-    super.start(context);

-    bundleContext = context;

-    plugin = this;

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

-   */

-  public void stop(BundleContext context) throws Exception {

-    plugin = null;

-    super.stop(context);

-  }

-

-  /**

-   * Returns the shared instance

-   * 

-   * @return the shared instance

-   */

-  public static RutaIdeCorePlugin getDefault() {

-    return plugin;

-  }

-

-  public static void error(String message, Throwable t) {

-    plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, t));

-  }

-

-  public static void error(Throwable t) {

-    error(t.getMessage(), t);

-  }

-

-  public IFileHandle getConsoleProxy(IExecutionEnvironment exeEnv) throws IOException {

-    IDeployment deployment = exeEnv.createDeployment();

-    IPath path = deployment.add(this.getBundle(), "console");

-    path.append("ConsoleProxy.ruta");

-    return deployment.getFile(path);

-  }

-  

-  public Bundle getBundle(String bundleName) {

-    Bundle[] bundles = getBundles(bundleName, null);

-    if (bundles != null && bundles.length > 0)

-      return bundles[0];

-    return null;

-  }

-

-  public Bundle[] getBundles(String bundleName, String version) {

-    Bundle[] bundles = Platform.getBundles(bundleName, version);

-    if (bundles != null)

-      return bundles;

-    // Accessing bundle which is not resolved

-    PackageAdmin admin = (PackageAdmin) bundleContext.getService(bundleContext

-            .getServiceReference(PackageAdmin.class.getName()));

-    bundles = admin.getBundles(bundleName, version);

-    if (bundles != null && bundles.length > 0)

-      return bundles;

-    return null;

-  }

-

-  public String pluginIdToJarPath(String pluginId) throws IOException {

-    Bundle bundle = getBundle(pluginId);

-    URL url = bundle.getEntry("/");

-    if (url == null) {

-      throw new IOException();

-    }

-    return FileLocator.toFileURL(url).getFile();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/CodeModel.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/CodeModel.java
deleted file mode 100644
index 1cdb455..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/CodeModel.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-public class CodeModel {

-  private String[] codeLines;

-

-  private int[] codeLineLengths;

-

-  public CodeModel(String code) {

-    this.codeLines = code.split("\n");

-    int count = this.codeLines.length;

-

-    this.codeLineLengths = new int[count];

-

-    int sum = 0;

-    for (int i = 0; i < count; ++i) {

-      this.codeLineLengths[i] = sum;

-      sum += this.codeLines[i].length() + 1;

-    }

-  }

-

-  public int[] getBounds(int lineNumber) {

-    String codeLine = this.codeLines[lineNumber];

-

-    int start = this.codeLineLengths[lineNumber];

-    int end = start + codeLine.length();

-

-    return new int[] { start, end };

-  }

-

-  public int getLineNumber(int start, int end) {

-    int len = this.codeLines.length;

-    for (int i = 0; i < len; ++i) {

-      String codeLine = this.codeLines[i];

-

-      int s = this.codeLineLengths[i];

-      int e = start + codeLine.length();

-

-      if (start <= s && end <= e) {

-        return i + 1;

-      }

-    }

-    return this.codeLines.length;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/IRutaKeywords.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/IRutaKeywords.java
deleted file mode 100644
index 75780ff..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/IRutaKeywords.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-public interface IRutaKeywords {

-

-  public static final int ALL = 0;

-

-  public static final int DECLARATION = 1;

-

-  public static final int BASIC = 2;

-

-  public static final int CONDITION = 4;

-

-  public static final int ACTION = 5;

-

-  public static final int BOOLEANFUNCTION = 6;

-

-  public static final int NUMBERFUNCTION = 7;

-

-  public static final int STRINGFUNCTION = 8;

-

-  public static final int TYPEFUNCTION = 9;

-

-  public static final int THEN = 10;

-

-  public static final int START_INDEX = 1;

-

-  public static final int END_INDEX = 11;

-

-  String[] getKeywords(int type);

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCallHierarchyFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCallHierarchyFactory.java
deleted file mode 100644
index b826f62..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCallHierarchyFactory.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import org.apache.uima.ruta.ide.core.search.RutaCallProcessor;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.dltk.core.ICallHierarchyFactory;

-import org.eclipse.dltk.core.ICallProcessor;

-import org.eclipse.dltk.core.ICalleeProcessor;

-import org.eclipse.dltk.core.IMethod;

-import org.eclipse.dltk.core.search.IDLTKSearchScope;

-

-public class RutaCallHierarchyFactory implements ICallHierarchyFactory {

-

-  public ICalleeProcessor createCalleeProcessor(IMethod method, IProgressMonitor monitor,

-          IDLTKSearchScope scope) {

-    return new RutaCalleeProcessor(method, monitor, scope);

-  }

-

-  public ICallProcessor createCallProcessor() {

-    return new RutaCallProcessor();

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCalleeProcessor.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCalleeProcessor.java
deleted file mode 100644
index f700c11..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCalleeProcessor.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.compiler.SourceElementRequestorAdaptor;

-import org.eclipse.dltk.compiler.env.MethodSourceCode;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.DLTKLanguageManager;

-import org.eclipse.dltk.core.ICalleeProcessor;

-import org.eclipse.dltk.core.IMethod;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.ISourceElementParser;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.core.search.IDLTKSearchScope;

-import org.eclipse.dltk.core.search.SearchEngine;

-import org.eclipse.dltk.core.search.SearchParticipant;

-import org.eclipse.dltk.core.search.SearchPattern;

-import org.eclipse.dltk.core.search.SearchRequestor;

-

-public class RutaCalleeProcessor implements ICalleeProcessor {

-  protected static int EXACT_RULE = SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE;

-

-  private Map fSearchResults = new HashMap();

-

-  private IMethod method;

-

-  // private IDLTKSearchScope scope;

-

-  public RutaCalleeProcessor(IMethod method, IProgressMonitor monitor, IDLTKSearchScope scope) {

-    this.method = method;

-    // this.scope = scope;

-  }

-

-  private class CaleeSourceElementRequestor extends SourceElementRequestorAdaptor {

-

-    @Override

-    public void acceptMethodReference(String methodName, int argCount, int sourcePosition,

-            int sourceEndPosition) {

-      String name = new String(methodName);

-      int off = 0;

-      try {

-        off = method.getSourceRange().getOffset();

-      } catch (ModelException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      }

-      SimpleReference ref = new SimpleReference(off + sourcePosition, off + sourceEndPosition, name);

-      IMethod[] methods = findMethods(name, argCount, off + sourcePosition);

-      fSearchResults.put(ref, methods);

-    }

-  }

-

-  public Map doOperation() {

-    try {

-      if (method.getSource() != null) {

-        CaleeSourceElementRequestor requestor = new CaleeSourceElementRequestor();

-        ISourceElementParser parser = DLTKLanguageManager

-                .getSourceElementParser(RutaNature.NATURE_ID);

-        parser.setRequestor(requestor);

-        parser.parseSourceModule(new MethodSourceCode(method));

-      } else {

-        // TODO: Report error here.

-      }

-      return fSearchResults;

-    } catch (ModelException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    } catch (CoreException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return fSearchResults;

-  }

-

-  public IMethod[] findMethods(final String methodName, int argCount, int sourcePosition) {

-    final List methods = new ArrayList();

-    ISourceModule module = this.method.getSourceModule();

-    try {

-      IModelElement[] elements = module.codeSelect(sourcePosition, methodName.length());

-      for (int i = 0; i < elements.length; ++i) {

-        if (elements[i] instanceof IMethod) {

-          methods.add(elements[i]);

-        }

-      }

-    } catch (ModelException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    // final String nsName;

-    // if( methodName.indexOf("::") != -1 ) {

-    // String mmName = methodName;

-    // if( mmName.startsWith("::")) {

-    // mmName = mmName.substring(2);

-    // }

-    // if( mmName.indexOf("::") != -1 ) {

-    // int posb = mmName.indexOf("::");

-    // nsName = mmName.substring(0, posb);

-    // }

-    // else {

-    // nsName = null;

-    // }

-    // }

-    // else {

-    // nsName = null;

-    // }

-    // SearchRequestor requestor = new SearchRequestor() {

-    // public void acceptSearchMatch(SearchMatch match) throws CoreException

-    // {

-    // Object element = match.getElement();

-    // if( element instanceof IMethod ) {

-    // IMethod method = (IMethod)element;

-    // String mn = method.getTypeQualifiedName('$', false).replaceAll("\\$",

-    // "::");

-    // if( mn.equals(methodName) && !isIgnoredBySearchScope(method) ) {

-    // methods.add(method);

-    // }

-    // }

-    // else {

-    // IType type = (IType) element;

-    // if( !( type.getParent() instanceof ISourceModule )) {

-    // return;

-    // }

-    // processTypeFunctions(type);

-    // }

-    // }

-    // private void processTypeFunctions(IType type) throws ModelException {

-    // IMethod[] tmethods = type.getMethods();

-    // for (int i = 0; i < tmethods.length; ++i) {

-    // String mn = tmethods[i].getTypeQualifiedName('$',

-    // false).replaceAll("\\$", "::");

-    // if( mn.equals(methodName) && !isIgnoredBySearchScope(tmethods[i]) ) {

-    // methods.add(tmethods[i]);

-    // }

-    // }

-    // IType[] types = type.getTypes();

-    // for( int i = 0; i < types.length; ++i ) {

-    // processTypeFunctions(types[i]);

-    // }

-    // }

-    // };

-    //

-    // try {

-    // String pattern = methodName;

-    // if( pattern.startsWith("::")) {

-    // pattern = pattern.substring(2);

-    // }

-    // if( pattern.indexOf("::")==-1) {

-    // search(pattern, IDLTKSearchConstants.METHOD,

-    // IDLTKSearchConstants.DECLARATIONS, scope, requestor);

-    // }

-    // if( nsName != null ) {

-    // search(nsName, IDLTKSearchConstants.TYPE,

-    // IDLTKSearchConstants.DECLARATIONS, scope, requestor);

-    // }

-    // } catch (CoreException e) {

-    // // TODO Auto-generated catch block

-    // e.printStackTrace();

-    // }

-

-    return (IMethod[]) methods.toArray(new IMethod[methods.size()]);

-  }

-

-  protected void search(String patternString, int searchFor, int limitTo, IDLTKSearchScope scope,

-          SearchRequestor resultCollector) throws CoreException {

-    search(patternString, searchFor, limitTo, EXACT_RULE, scope, resultCollector);

-  }

-

-  protected void search(String patternString, int searchFor, int limitTo, int matchRule,

-          IDLTKSearchScope scope, SearchRequestor requestor) throws CoreException {

-    if (patternString.indexOf('*') != -1 || patternString.indexOf('?') != -1) {

-      matchRule |= SearchPattern.R_PATTERN_MATCH;

-    }

-    SearchPattern pattern = SearchPattern.createPattern(patternString, searchFor, limitTo,

-            matchRule, scope.getLanguageToolkit());

-    new SearchEngine().search(pattern,

-            new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, scope,

-            requestor, null);

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaConstants.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaConstants.java
deleted file mode 100644
index b1ed130..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-public class RutaConstants {

-  protected RutaConstants() {

-  }

-

-  public final static String RUTA_PARTITIONING = "__ruta_partitioning";

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaContentDescriber.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaContentDescriber.java
deleted file mode 100644
index 20d8cba..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaContentDescriber.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import java.util.regex.Pattern;

-

-import org.eclipse.dltk.core.ScriptContentDescriber;

-

-public class RutaContentDescriber extends ScriptContentDescriber {

-  protected static Pattern[] header_patterns = { Pattern.compile("\\s*PACKAGE", Pattern.MULTILINE), }; //$NON-NLS-1$

-

-  @Override

-  protected Pattern[] getHeaderPatterns() {

-    return header_patterns;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCorePreferences.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCorePreferences.java
deleted file mode 100644
index 84b357e..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaCorePreferences.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-public class RutaCorePreferences {

-  public static final String BUILDER_RESOLVE_IMPORTS = "BuilderResolveImports";

-

-  public static final String BUILDER_IMPORT_BY_NAME = "BuilderImportByName";

-

-  public static final String BUILDER_IGNORE_DUPLICATE_SHORTNAMES = "BuilderErrorOnDuplicateShortnames";

-

-  public static final String PROJECT_CLEAR_OUTPUT = "ProjectClearOutput";

-

-  public static final String NO_VM_IN_DEV_MODE = "NoVMInDevMode";

-

-  public static final String ADD_SDI = "AddSDI";

-

-  public static final String COMPRESS_WORDLISTS = "CompressWordLists";

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaExtensionManager.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaExtensionManager.java
deleted file mode 100644
index fbf2c4f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaExtensionManager.java
+++ /dev/null
@@ -1,463 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.ruta.extensions.IEngineLoader;

-import org.apache.uima.ruta.extensions.IRutaActionExtension;

-import org.apache.uima.ruta.extensions.IRutaBlockExtension;

-import org.apache.uima.ruta.extensions.IRutaBooleanFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaConditionExtension;

-import org.apache.uima.ruta.extensions.IRutaNumberFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaStringFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaTypeFunctionExtension;

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.core.extensions.ICompletionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IIDEActionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IIDEBlockExtension;

-import org.apache.uima.ruta.ide.core.extensions.IIDEBooleanFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IIDEConditionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IIDENumberFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IIDEStringFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IIDETypeFunctionExtension;

-import org.apache.uima.ruta.ide.core.extensions.IMatchLocatorExtension;

-import org.apache.uima.ruta.ide.core.extensions.IMixinBuildVisitorExtension;

-import org.apache.uima.ruta.ide.core.extensions.IRutaLanguageExtension;

-import org.apache.uima.ruta.ide.core.extensions.ISelectionExtension;

-import org.apache.uima.ruta.ide.core.extensions.ISourceElementRequestVisitorExtension;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IConfigurationElement;

-import org.eclipse.core.runtime.IExtension;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.dltk.core.PriorityClassDLTKExtensionManager;

-import org.eclipse.dltk.core.PriorityDLTKExtensionManager.ElementInfo;

-

-public class RutaExtensionManager {

-  PriorityClassDLTKExtensionManager manager = new PriorityClassDLTKExtensionManager(

-          RutaIdeCorePlugin.PLUGIN_ID + ".rutaExtension", "language");

-

-  private static RutaExtensionManager sInstance;

-

-  public static RutaExtensionManager getDefault() {

-    if (sInstance == null) {

-      sInstance = new RutaExtensionManager();

-    }

-    return sInstance;

-  }

-

-  public IRutaLanguageExtension[] getExtensions() {

-    ElementInfo[] infos = manager.getElementInfos();

-    if (infos == null) {

-      return new IRutaLanguageExtension[0];

-    }

-    List extensions = new ArrayList();

-    for (int i = 0; i < infos.length; i++) {

-      Object object = manager.getInitObject(infos[i]);

-      if (object instanceof IRutaLanguageExtension) {

-        extensions.add(object);

-      }

-    }

-    return (IRutaLanguageExtension[]) extensions.toArray(new IRutaLanguageExtension[extensions

-            .size()]);

-  }

-

-  public ISourceElementRequestVisitorExtension[] getSourceElementRequestoVisitorExtensions() {

-    IRutaLanguageExtension[] extensions = getExtensions();

-    List result = new ArrayList();

-    for (int i = 0; i < extensions.length; i++) {

-      ISourceElementRequestVisitorExtension visitorExtension = extensions[i]

-              .createSourceElementRequestVisitorExtension();

-      if (visitorExtension != null) {

-        result.add(visitorExtension);

-      }

-    }

-    return (ISourceElementRequestVisitorExtension[]) result

-            .toArray(new ISourceElementRequestVisitorExtension[result.size()]);

-  }

-

-  public IMixinBuildVisitorExtension[] getMixinVisitorExtensions() {

-    IRutaLanguageExtension[] extensions = getExtensions();

-    List result = new ArrayList();

-    for (int i = 0; i < extensions.length; i++) {

-      IMixinBuildVisitorExtension visitorExtension = extensions[i]

-              .createMixinBuildVisitorExtension();

-      if (visitorExtension != null) {

-        result.add(visitorExtension);

-      }

-    }

-    return (IMixinBuildVisitorExtension[]) result.toArray(new IMixinBuildVisitorExtension[result

-            .size()]);

-  }

-

-  public IMatchLocatorExtension[] getMatchLocatorExtensions() {

-    IRutaLanguageExtension[] extensions = getExtensions();

-    List result = new ArrayList();

-    for (int i = 0; i < extensions.length; i++) {

-      IMatchLocatorExtension visitorExtension = extensions[i].createMatchLocatorExtension();

-      if (visitorExtension != null) {

-        result.add(visitorExtension);

-      }

-    }

-    return (IMatchLocatorExtension[]) result.toArray(new IMatchLocatorExtension[result.size()]);

-  }

-

-  public ICompletionExtension[] getCompletionExtensions() {

-    IRutaLanguageExtension[] extensions = getExtensions();

-    List result = new ArrayList();

-    for (int i = 0; i < extensions.length; i++) {

-      ICompletionExtension visitorExtension = extensions[i].createCompletionExtension();

-      if (visitorExtension != null) {

-        result.add(visitorExtension);

-      }

-    }

-    return (ICompletionExtension[]) result.toArray(new ICompletionExtension[result.size()]);

-  }

-

-  public ISelectionExtension[] getSelectionExtensions() {

-    IRutaLanguageExtension[] extensions = getExtensions();

-    List result = new ArrayList();

-    for (int i = 0; i < extensions.length; i++) {

-      ISelectionExtension visitorExtension = extensions[i].createSelectionExtension();

-      if (visitorExtension != null) {

-        result.add(visitorExtension);

-      }

-    }

-    return (ISelectionExtension[]) result.toArray(new ISelectionExtension[result.size()]);

-  }

-

-  public IIDEConditionExtension[] getIDEConditionExtensions() {

-    Collection<IIDEConditionExtension> result = new ArrayList<IIDEConditionExtension>();

-    IExtension[] conditionExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "conditionExtension").getExtensions();

-    for (IExtension extension : conditionExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IIDEConditionExtension) {

-          result.add((IIDEConditionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IIDEConditionExtension[0]);

-  }

-

-  public IIDEActionExtension[] getIDEActionExtensions() {

-    Collection<IIDEActionExtension> result = new ArrayList<IIDEActionExtension>();

-    IExtension[] conditionExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "actionExtension").getExtensions();

-    for (IExtension extension : conditionExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IIDEActionExtension) {

-          result.add((IIDEActionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IIDEActionExtension[0]);

-  }

-

-  public IIDENumberFunctionExtension[] getIDENumberFunctionExtensions() {

-    Collection<IIDENumberFunctionExtension> result = new ArrayList<IIDENumberFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "numberFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IIDENumberFunctionExtension) {

-          result.add((IIDENumberFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IIDENumberFunctionExtension[0]);

-  }

-

-  public IIDEBooleanFunctionExtension[] getIDEBooleanFunctionExtensions() {

-    Collection<IIDEBooleanFunctionExtension> result = new ArrayList<IIDEBooleanFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "booleanFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IIDEBooleanFunctionExtension) {

-          result.add((IIDEBooleanFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IIDEBooleanFunctionExtension[0]);

-  }

-

-  public IIDEStringFunctionExtension[] getIDEStringFunctionExtensions() {

-    Collection<IIDEStringFunctionExtension> result = new ArrayList<IIDEStringFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "stringFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IIDEStringFunctionExtension) {

-          result.add((IIDEStringFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IIDEStringFunctionExtension[0]);

-  }

-

-  public IIDETypeFunctionExtension[] getIDETypeFunctionExtensions() {

-    Collection<IIDETypeFunctionExtension> result = new ArrayList<IIDETypeFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "typeFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IIDETypeFunctionExtension) {

-          result.add((IIDETypeFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IIDETypeFunctionExtension[0]);

-  }

-

-  public IIDEBlockExtension[] getIDEBlockExtensions() {

-    Collection<IIDEBlockExtension> result = new ArrayList<IIDEBlockExtension>();

-    IExtension[] blockExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "blockExtension").getExtensions();

-    for (IExtension extension : blockExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IIDEBlockExtension) {

-          result.add((IIDEBlockExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IIDEBlockExtension[0]);

-  }

-  

-  public IRutaConditionExtension[] getRutaConditionExtensions() {

-    Collection<IRutaConditionExtension> result = new ArrayList<IRutaConditionExtension>();

-    IExtension[] conditionExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "conditionExtension").getExtensions();

-    for (IExtension extension : conditionExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("engine");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IRutaConditionExtension) {

-          result.add((IRutaConditionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IRutaConditionExtension[0]);

-  }

-

-  public IRutaActionExtension[] getRutaActionExtensions() {

-    Collection<IRutaActionExtension> result = new ArrayList<IRutaActionExtension>();

-    IExtension[] conditionExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "actionExtension").getExtensions();

-    for (IExtension extension : conditionExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("engine");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IRutaActionExtension) {

-          result.add((IRutaActionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IRutaActionExtension[0]);

-  }

-

-  public IRutaNumberFunctionExtension[] getRutaNumberFunctionExtensions() {

-    Collection<IRutaNumberFunctionExtension> result = new ArrayList<IRutaNumberFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "numberFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("engine");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IRutaNumberFunctionExtension) {

-          result.add((IRutaNumberFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IRutaNumberFunctionExtension[0]);

-  }

-

-  public IRutaBooleanFunctionExtension[] getRutaBooleanFunctionExtensions() {

-    Collection<IRutaBooleanFunctionExtension> result = new ArrayList<IRutaBooleanFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "booleanFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("engine");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IRutaBooleanFunctionExtension) {

-          result.add((IRutaBooleanFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IRutaBooleanFunctionExtension[0]);

-  }

-

-  public IRutaStringFunctionExtension[] getRutaStringFunctionExtensions() {

-    Collection<IRutaStringFunctionExtension> result = new ArrayList<IRutaStringFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "stringFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("engine");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IRutaStringFunctionExtension) {

-          result.add((IRutaStringFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IRutaStringFunctionExtension[0]);

-  }

-

-  public IRutaTypeFunctionExtension[] getRutaTypeFunctionExtensions() {

-    Collection<IRutaTypeFunctionExtension> result = new ArrayList<IRutaTypeFunctionExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "typeFunctionExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("engine");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IRutaTypeFunctionExtension) {

-          result.add((IRutaTypeFunctionExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IRutaTypeFunctionExtension[0]);

-  }

-  

-  public IRutaBlockExtension[] getRutaBlockExtensions() {

-    Collection<IRutaBlockExtension> result = new ArrayList<IRutaBlockExtension>();

-    IExtension[] extensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "blockExtension").getExtensions();

-    for (IExtension extension : extensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("engine");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IRutaBlockExtension) {

-          result.add((IRutaBlockExtension) obj);

-        }

-      }

-    }

-    return result.toArray(new IRutaBlockExtension[0]);

-  }

-

-  public IEngineLoader[] getEngineExtensions() {

-    Collection<IEngineLoader> result = new ArrayList<IEngineLoader>();

-    IExtension[] conditionExtensions = Platform.getExtensionRegistry()

-            .getExtensionPoint(RutaIdeCorePlugin.PLUGIN_ID, "engineExtension").getExtensions();

-    for (IExtension extension : conditionExtensions) {

-      IConfigurationElement[] configurationElements = extension.getConfigurationElements();

-      for (IConfigurationElement configurationElement : configurationElements) {

-        Object obj = null;

-        try {

-          obj = configurationElement.createExecutableExtension("class");

-        } catch (CoreException e) {

-          e.printStackTrace();

-        }

-        if (obj instanceof IEngineLoader) {

-          result.add((IEngineLoader) obj);

-        }

-      }

-    }

-    return result.toArray(new IEngineLoader[0]);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaKeywords.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaKeywords.java
deleted file mode 100644
index ed7d810..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaKeywords.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-public class RutaKeywords implements IRutaKeywords {

-

-  private static String[] condition = { "CONTAINS", "IF", "INLIST", "PARTOF", "TOTALCOUNT",

-      "CURRENTCOUNT", "CONTEXTCOUNT", "LAST", "VOTE", "COUNT", "NEAR", "REGEXP", "POSITION",

-      "SCORE", "ISLISTEMPTY", "MOFN", "AND", "OR", "FEATURE", "PARSE", "IS", "BEFORE", "AFTER",

-      "STARTSWITH", "ENDSWITH", "PARTOFNEQ", "SIZE", "NOT" };

-

-  private static String[] declaration = { "WORDLIST", "DECLARE", "BOOLEAN", "PACKAGE", "TYPE",

-      "TYPESYSTEM", "INT", "DOUBLE", "FLOAT", "STRING", "SCRIPT", "WORDTABLE", "ENGINE", "BLOCK",

-      "BOOLEANLIST", "INTLIST", "DOUBLELIST", "FLOATLIST", "STRINGLIST", "TYPELIST",

-      "UIMAFIT", "IMPORT" , "FROM", "AS", "null" };

-

-  private static String[] action = { "DEL", "CALL", "MARK", "MARKSCORE", "COLOR", "LOG", "REPLACE",

-      "FILLOBJECT", "RETAINTYPE", "SETFEATURE", "ASSIGN", "PUTINLIST", "ATTRIBUTE", "MARKFAST",

-      "FILTERTYPE", "CREATE", "FILL", "MARKTABLE", "UNMARK", "TRANSFER", "MARKONCE", "TRIE",

-      "GATHER", "EXEC", "MARKLAST", "ADD", "REMOVE", "MERGE", "GET", "GETLIST", "REMOVEDUPLICATE",

-      "GETFEATURE", "MATCHEDTEXT", "CLEAR", "UNMARKALL", "SHIFT", "CONFIGURE", "DYNAMICANCHORING",

-      "TRIM", "ADDRETAINTYPE", "REMOVERETAINTYPE", "ADDFILTERTYPE", "REMOVEFILTERTYPE", "MARKFIRST", "GREEDYANCHORING" };

-

-  private static String[] basic = { "ALL", "ANY", "AMP", "BREAK", "W", "NUM", "PM", "Document",

-      "MARKUP", "SW", "CW", "CAP", "PERIOD", "NBSP", "SENTENCEEND", "COLON", "COMMA", "SEMICOLON",

-      "WS", "_", "SPACE", "SPECIAL", "EXCLAMATION", "QUESTION", "#" };

-

-  private static String[] booleanFunction = { "true", "false" };

-

-  private static String[] numberFunction = { "EXP", "SIN", "COS", "TAN", "LOGN" };

-

-  private static String[] stringFunction = { "REMOVESTRING" };

-

-  private static String[] typeFunction = {};

-

-  private static String[] then = { "->" };

-

-  public String[] getKeywords(int type) {

-    if (type == CONDITION) {

-      return condition;

-    } else if (type == ACTION) {

-      return action;

-    } else if (type == DECLARATION) {

-      return declaration;

-    } else if (type == BASIC) {

-      return basic;

-    } else if (type == BOOLEANFUNCTION) {

-      return booleanFunction;

-    } else if (type == NUMBERFUNCTION) {

-      return numberFunction;

-    } else if (type == STRINGFUNCTION) {

-      return stringFunction;

-    } else if (type == TYPEFUNCTION) {

-      return typeFunction;

-    } else if (type == THEN) {

-      return then;

-    }

-    return getKeywords();

-  }

-

-  public static String[] append(String prefix, String[] a, String[] b) {

-    int len = 0;

-    if (a != null) {

-      len = a.length;

-    }

-    String[] ns = new String[len + b.length];

-    if (a != null) {

-      System.arraycopy(a, 0, ns, 0, len);

-    }

-    for (int i = 0; i < b.length; i++) {

-      ns[len + i] = prefix + b[i];

-    }

-    return ns;

-  }

-

-  public static String[] append(String[] a, String[] b) {

-    if (b == null) {

-      return a;

-    }

-    String[] ns = new String[a.length + b.length];

-    System.arraycopy(a, 0, ns, 0, a.length);

-    System.arraycopy(b, 0, ns, a.length, b.length);

-    return ns;

-  }

-

-  public String[] getKeywords() {

-    return null;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaKeywordsManager.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaKeywordsManager.java
deleted file mode 100644
index 9d1165e..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaKeywordsManager.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import org.apache.uima.ruta.extensions.IRutaActionExtension;

-import org.apache.uima.ruta.extensions.IRutaBlockExtension;

-import org.apache.uima.ruta.extensions.IRutaBooleanFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaConditionExtension;

-import org.apache.uima.ruta.extensions.IRutaNumberFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaStringFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaTypeFunctionExtension;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IConfigurationElement;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.dltk.core.DLTKCore;

-

-public final class RutaKeywordsManager {

-  private static final String EXTENSION_POINT = "org.apache.uima.ruta.ide.rutakeywords";

-

-  private static final String CLASS = "class";

-

-  private static String[][] all = new String[IRutaKeywords.END_INDEX][];

-

-  private static boolean initialized = false;

-

-  private static void initialize() {

-    if (initialized) {

-      return;

-    }

-    initialized = true;

-    IConfigurationElement[] cfg = Platform.getExtensionRegistry().getConfigurationElementsFor(

-            EXTENSION_POINT);

-    for (int i = 0; i < IRutaKeywords.END_INDEX; i++) {

-      all[i] = new String[0];

-    }

-    for (int i = 0; i < cfg.length; i++) {

-      if (cfg[i].getName().equals("keywords")) {

-        try {

-          IRutaKeywords keywords = (IRutaKeywords) cfg[i].createExecutableExtension(CLASS);

-          if (keywords != null) {

-            for (int q = 0; q < IRutaKeywords.END_INDEX; ++q) {

-              String[] kw2 = keywords.getKeywords(q);

-              all[q] = RutaKeywords.append(all[q], kw2);

-            }

-          }

-        } catch (CoreException e) {

-          if (DLTKCore.DEBUG) {

-            e.printStackTrace();

-          }

-        }

-      }

-    }

-    IRutaActionExtension[] actionExtensions = RutaExtensionManager.getDefault()

-            .getRutaActionExtensions();

-    for (IRutaActionExtension each : actionExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      all[IRutaKeywords.ACTION] = RutaKeywords.append(all[IRutaKeywords.ACTION], knownExtensions);

-    }

-    IRutaConditionExtension[] conditionExtensions = RutaExtensionManager.getDefault()

-            .getRutaConditionExtensions();

-    for (IRutaConditionExtension each : conditionExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      all[IRutaKeywords.CONDITION] = RutaKeywords.append(all[IRutaKeywords.CONDITION],

-              knownExtensions);

-    }

-    IRutaBooleanFunctionExtension[] booleanFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaBooleanFunctionExtensions();

-    for (IRutaBooleanFunctionExtension each : booleanFunctionExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      all[IRutaKeywords.BOOLEANFUNCTION] = RutaKeywords.append(all[IRutaKeywords.BOOLEANFUNCTION],

-              knownExtensions);

-    }

-    IRutaNumberFunctionExtension[] numberFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaNumberFunctionExtensions();

-    for (IRutaNumberFunctionExtension each : numberFunctionExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      all[IRutaKeywords.NUMBERFUNCTION] = RutaKeywords.append(all[IRutaKeywords.NUMBERFUNCTION],

-              knownExtensions);

-    }

-    IRutaStringFunctionExtension[] stringFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaStringFunctionExtensions();

-    for (IRutaStringFunctionExtension each : stringFunctionExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      all[IRutaKeywords.STRINGFUNCTION] = RutaKeywords.append(all[IRutaKeywords.STRINGFUNCTION],

-              knownExtensions);

-    }

-    IRutaTypeFunctionExtension[] typeFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaTypeFunctionExtensions();

-    for (IRutaTypeFunctionExtension each : typeFunctionExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      all[IRutaKeywords.TYPEFUNCTION] = RutaKeywords.append(all[IRutaKeywords.TYPEFUNCTION],

-              knownExtensions);

-    }

-    IRutaBlockExtension[] blockExtensions = RutaExtensionManager.getDefault()

-            .getRutaBlockExtensions();

-    for (IRutaBlockExtension each : blockExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      all[IRutaKeywords.DECLARATION] = RutaKeywords.append(all[IRutaKeywords.DECLARATION],

-              knownExtensions);

-    }

-  }

-

-  public static String[] getKeywords() {

-    initialize();

-    return all[IRutaKeywords.ALL];

-  }

-

-  public static String[] getKeywords(int type) {

-    initialize();

-    if (type >= 0 && type < all.length) {

-      return all[type];

-    }

-    return new String[0];

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaLanguageToolkit.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaLanguageToolkit.java
deleted file mode 100644
index 3ff554f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaLanguageToolkit.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import java.io.File;

-import java.io.FilenameFilter;

-

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.dltk.core.AbstractLanguageToolkit;

-

-public class RutaLanguageToolkit extends AbstractLanguageToolkit {

-  private static final String[] languageExtensions = new String[] { "ruta" };

-

-  private static RutaLanguageToolkit sInstance = new RutaLanguageToolkit();

-

-  public RutaLanguageToolkit() {

-  }

-

-  @Override

-  public boolean languageSupportZIPBuildpath() {

-    return true;

-  }

-

-  public boolean validateSourcePackage(IPath path) {

-    File file = new File(path.toOSString());

-    if (file != null) {

-      String members[] = file.list(new FilenameFilter() {

-

-        public boolean accept(File dir, String name) {

-          if (name.toLowerCase().equals("__init__" + RutaEngine.SCRIPT_FILE_EXTENSION)) {

-            return true;

-          }

-          return false;

-        }

-      });

-      if (members.length > 0) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  public String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-

-  public String[] getLanguageFileExtensions() {

-    return languageExtensions;

-  }

-

-  public String getLanguageName() {

-    return "Ruta";

-  }

-

-  public String getLanguageContentType() {

-    return "org.apache.uima.ruta.ide.rutaContentType";

-  }

-

-  public static RutaLanguageToolkit getDefault() {

-    return sInstance;

-  }

-

-  @Override

-  public String getPreferenceQualifier() {

-    return RutaIdeCorePlugin.PLUGIN_ID;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaMatchLocatorParser.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaMatchLocatorParser.java
deleted file mode 100644
index edb516a..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaMatchLocatorParser.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.FieldDeclaration;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.references.Reference;

-import org.eclipse.dltk.ast.references.VariableReference;

-import org.eclipse.dltk.core.search.matching.MatchLocator;

-import org.eclipse.dltk.core.search.matching.MatchLocatorParser;

-import org.eclipse.dltk.core.search.matching.PatternLocator;

-

-public class RutaMatchLocatorParser extends MatchLocatorParser {

-

-  public RutaMatchLocatorParser(MatchLocator locator) {

-    super(locator);

-  }

-

-  @Override

-  protected void processStatement(ASTNode node, PatternLocator locator) {

-    super.processStatement(node, locator);

-    if (node instanceof VariableReference) {

-      locator.match((Reference) node, getNodeSet());

-    } else if (node instanceof FieldDeclaration) {

-      locator.match((FieldDeclaration) node, getNodeSet());

-    } else if (node instanceof MethodDeclaration) {

-      locator.match((MethodDeclaration) node, getNodeSet());

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaNature.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaNature.java
deleted file mode 100644
index 94fea1c..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaNature.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import org.eclipse.dltk.core.ScriptNature;

-

-public class RutaNature extends ScriptNature {

-

-  public static final String NATURE_ID = "org.apache.uima.ruta.ide.nature";

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaPreferenceInitializer.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaPreferenceInitializer.java
deleted file mode 100644
index 1217bf3..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaPreferenceInitializer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaPreferenceInitializer extends AbstractPreferenceInitializer {

-

-  public RutaPreferenceInitializer() {

-  }

-

-  public void initializeDefaultPreferences() {

-    IPreferenceStore store = RutaIdeCorePlugin.getDefault().getPreferenceStore();

-    // TaskTagUtils.initializeDefaultValues(store);

-    store.setDefault(RutaCorePreferences.BUILDER_IMPORT_BY_NAME, false);

-    store.setDefault(RutaCorePreferences.BUILDER_RESOLVE_IMPORTS, false);

-    store.setDefault(RutaCorePreferences.BUILDER_IGNORE_DUPLICATE_SHORTNAMES, false);

-    store.setDefault(RutaCorePreferences.PROJECT_CLEAR_OUTPUT, false);

-    store.setDefault(RutaCorePreferences.NO_VM_IN_DEV_MODE, false);

-    store.setDefault(RutaCorePreferences.ADD_SDI, false);

-    store.setDefault(RutaCorePreferences.COMPRESS_WORDLISTS, false);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaProblems.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaProblems.java
deleted file mode 100644
index 1f0a134..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaProblems.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import org.eclipse.dltk.compiler.problem.IProblem;

-

-public class RutaProblems {

-

-  public static final int UNKNOWN_REQUIRED_PACKAGE = IProblem.ImportRelated + 1;

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaSearchFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaSearchFactory.java
deleted file mode 100644
index 7b3d0ad..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/RutaSearchFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.ide.core;

-

-import org.eclipse.dltk.core.search.AbstractSearchFactory;

-import org.eclipse.dltk.core.search.IMatchLocatorParser;

-import org.eclipse.dltk.core.search.matching.MatchLocator;

-

-/**

- * Ruta search factory

- */

-public class RutaSearchFactory extends AbstractSearchFactory {

-

-  public IMatchLocatorParser createMatchParser(MatchLocator locator) {

-    return new RutaMatchLocatorParser(locator);

-  }

-

-  // public SourceIndexerRequestor createSourceRequestor() {

-  // return new RutaSourceIndexerRequestor();

-  // }

-

-  // public ISearchPatternProcessor createSearchPatternProcessor() {

-  // return new RutaSearchPatternProcessor();

-  // }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaBuildException.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaBuildException.java
deleted file mode 100644
index dc83b1f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaBuildException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * 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.ruta.ide.core.builder;

-

-public class RutaBuildException extends Exception {

-

-  private static final long serialVersionUID = 8194208263129900183L;

-

-  public RutaBuildException(String message, Throwable cause) {

-    super(message, cause);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaBuilder.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaBuilder.java
deleted file mode 100644
index 58ad480..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaBuilder.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*

- * 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.ruta.ide.core.builder;

-

-import java.io.File;

-import java.net.MalformedURLException;

-import java.net.URL;

-import java.net.URLClassLoader;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-

-import org.apache.uima.ruta.descriptor.RutaBuildOptions;

-import org.apache.uima.ruta.descriptor.RutaDescriptorBuilder;

-import org.apache.uima.ruta.descriptor.RutaDescriptorInformation;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.extensions.IEngineLoader;

-import org.apache.uima.ruta.extensions.IRutaActionExtension;

-import org.apache.uima.ruta.extensions.IRutaBlockExtension;

-import org.apache.uima.ruta.extensions.IRutaBooleanFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaConditionExtension;

-import org.apache.uima.ruta.extensions.IRutaNumberFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaStringFunctionExtension;

-import org.apache.uima.ruta.extensions.IRutaTypeFunctionExtension;

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.core.RutaCorePreferences;

-import org.apache.uima.ruta.ide.core.RutaExtensionManager;

-import org.apache.uima.ruta.ide.parser.ast.RutaModuleDeclaration;

-import org.eclipse.core.resources.IContainer;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.NullProgressMonitor;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.core.runtime.SubProgressMonitor;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.core.builder.AbstractBuildParticipantType;

-import org.eclipse.dltk.core.builder.IBuildChange;

-import org.eclipse.dltk.core.builder.IBuildContext;

-import org.eclipse.dltk.core.builder.IBuildParticipant;

-import org.eclipse.dltk.core.builder.IBuildParticipantExtension;

-import org.eclipse.dltk.core.builder.IBuildParticipantExtension2;

-import org.eclipse.dltk.core.builder.IBuildParticipantExtension3;

-import org.eclipse.dltk.core.builder.IBuildState;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class RutaBuilder extends AbstractBuildParticipantType implements IBuildParticipant,

-        IBuildParticipantExtension, IBuildParticipantExtension2, IBuildParticipantExtension3 {

-

-  private IScriptProject project;

-

-  public RutaBuilder() {

-    super();

-  }

-

-  public RutaBuilder(IScriptProject project) {

-    super();

-    this.project = project;

-  }

-

-  private void generateDescriptorResources(ISourceModule sourceModule,

-          ModuleDeclaration moduleDeclaration) {

-    IProgressMonitor monitor = createMonitor(10);

-    try {

-      IContainer container = getContainer(sourceModule);

-

-      IPath outputPath = getAbsolutePath(sourceModule);

-      IPath[] generateResources = generateResources(moduleDeclaration, outputPath, container,

-              sourceModule);

-

-      IProject proj = sourceModule.getScriptProject().getProject();

-      List<IFolder> allDescriptorFolders = RutaProjectUtils.getAllDescriptorFolders(proj);

-      for (IFolder iFolder : allDescriptorFolders) {

-        RutaProjectUtils.addProjectDataPath(proj, iFolder);

-      }

-      

-      monitor.worked(2);

-      String defaultDescriptorLocation = RutaProjectUtils.getDefaultDescriptorLocation();

-      IFolder folder = container.getProject().getFolder(defaultDescriptorLocation);

-      for (IPath iPath : generateResources) {

-        iPath = iPath.makeRelativeTo(folder.getLocation());

-        IResource findMember = folder.findMember(iPath);

-        if (findMember != null) {

-          findMember.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

-          findMember.getParent().refreshLocal(IResource.DEPTH_ONE, new NullProgressMonitor());

-        }

-

-      }

-      folder.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor,

-              generateResources.length));

-

-      monitor.worked(1);

-    } catch (ModelException e) {

-      if (DLTKCore.DEBUG_PARSER) {

-        e.printStackTrace();

-      }

-    } catch (CoreException e) {

-      if (DLTKCore.DEBUG_PARSER) {

-        e.printStackTrace();

-      }

-    }

-    monitor.done();

-  }

-

-  private IPath[] generateResources(ModuleDeclaration moduleDeclaration, IPath outputPath,

-          IContainer container, ISourceModule sourceModule) throws CoreException {

-    List<IPath> result = new ArrayList<IPath>();

-    if (moduleDeclaration instanceof RutaModuleDeclaration) {

-      RutaModuleDeclaration tmmd = (RutaModuleDeclaration) moduleDeclaration;

-      RutaDescriptorInformation sm = tmmd.descriptorInfo;

-      IPath pathToModule = sourceModule.getResource().getLocation();

-      String elementName = RutaProjectUtils.getModuleName(pathToModule);

-

-      IScriptProject scriptProject = sourceModule.getScriptProject();

-      

-      IProject project = scriptProject.getProject();

-      

-      IPath descPath = RutaProjectUtils.getDescriptorRootPath(project);

-      String basicTS = descPath.append("BasicTypeSystem.xml").toPortableString();

-      String basicE = descPath.append("BasicEngine.xml").toPortableString();

-      

-      List<IFolder> descriptorFolders = RutaProjectUtils.getDescriptorFolders(project);

-      for (IFolder iFolder : descriptorFolders) {

-        File btsd = iFolder.getLocation().append("BasicTypeSystem.xml").toFile();

-        File baed = iFolder.getLocation().append("BasicEngine.xml").toFile();

-        if(btsd.exists() && baed.exists()) {

-          basicTS = btsd.getAbsolutePath();

-          basicE = baed.getAbsolutePath();

-          descPath = iFolder.getLocation();

-          break;

-        }

-      }

-      

-      IPath relativePackagePath = RutaProjectUtils.getPackagePath(sourceModule.getResource()

-              .getLocation(), project);

-      IPath descPackagePath = descPath.append(relativePackagePath);

-      String typeSystem = descPackagePath.append(elementName + RutaProjectUtils.getTypeSystemSuffix(project) + ".xml").toPortableString();

-      String engine = descPackagePath.append(elementName + RutaProjectUtils.getAnalysisEngineSuffix(project) + ".xml").toPortableString();

-

-      

-      String scriptWithPackagePath = RutaProjectUtils.getScriptWithPackage(pathToModule, project);

-      List<String> scriptPathList = new ArrayList<String>();

-      List<String> descriptorPathList = new ArrayList<String>();

-

-      // add all folders

-      try {

-        List<IFolder> scriptFolders = RutaProjectUtils.getAllScriptFolders(scriptProject);

-        scriptPathList.addAll(RutaProjectUtils.getFolderLocations(scriptFolders));

-      } catch (CoreException e) {

-        RutaIdeCorePlugin.error(e);

-      }

-

-      try {

-        List<IFolder> allDescriptorFolders = RutaProjectUtils.getAllDescriptorFolders(project);

-        descriptorPathList.addAll(RutaProjectUtils.getFolderLocations(allDescriptorFolders));

-      } catch (Exception e) {

-        RutaIdeCorePlugin.error(e);

-      }

-

-      String[] descriptorPaths = descriptorPathList.toArray(new String[0]);

-      String[] scriptPaths = scriptPathList.toArray(new String[0]);

-      String mainScript = scriptWithPackagePath;

-      mainScript = mainScript.replaceAll("/", ".");

-      if (mainScript.endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {

-        mainScript = mainScript.substring(0, mainScript.length() - 5);

-      }

-      Collection<String> dependencies = RutaProjectUtils.getClassPath(project);

-      URL[] urls = new URL[dependencies.size()];

-      int counter = 0;

-      for (String dep : dependencies) {

-        try {

-          urls[counter] = new File(dep).toURI().toURL();

-        } catch (MalformedURLException e) {

-          throw new CoreException(new Status(IStatus.ERROR,

-                  RutaIdeCorePlugin.PLUGIN_ID, e.getMessage()));

-        }

-        counter++;

-      }

-      ClassLoader classloader = new URLClassLoader(urls);

-      build(basicTS, basicE, typeSystem, engine, sm, scriptPaths, descriptorPaths, classloader);

-

-      IPath tsPath = Path.fromPortableString(typeSystem);

-      IPath ePath = Path.fromPortableString(engine);

-      result.add(tsPath);

-      result.add(ePath);

-    }

-    return result.toArray(new IPath[0]);

-  }

-

-  private void build(String basicTypesystem, String basicEngine, String typeSystemDest,

-          String engineDest, RutaDescriptorInformation sm, String[] scriptPaths,

-          String[] enginePaths, ClassLoader classloader) {

-    RutaDescriptorBuilder builder = null;

-    try {

-      URL tsUrl = new File(basicTypesystem).toURI().toURL();

-      URL aeUrl= new File(basicEngine).toURI().toURL();

-      builder = new RutaDescriptorBuilder(tsUrl, aeUrl);

-    } catch (Exception e) {

-      DLTKCore.error(e.getMessage(), e);

-      if (DLTKCore.DEBUG_PARSER) {

-        e.printStackTrace();

-      }

-    }

-

-    IRutaConditionExtension[] conditionExtensions = RutaExtensionManager.getDefault()

-            .getRutaConditionExtensions();

-    IRutaActionExtension[] actionExtensions = RutaExtensionManager.getDefault()

-            .getRutaActionExtensions();

-    IRutaBooleanFunctionExtension[] booleanFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaBooleanFunctionExtensions();

-    IRutaNumberFunctionExtension[] numberFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaNumberFunctionExtensions();

-    IRutaStringFunctionExtension[] stringFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaStringFunctionExtensions();

-    IRutaTypeFunctionExtension[] typeFunctionExtensions = RutaExtensionManager.getDefault()

-            .getRutaTypeFunctionExtensions();

-    IRutaBlockExtension[] blockExtensions = RutaExtensionManager.getDefault()

-            .getRutaBlockExtensions();

-    IEngineLoader[] engineExtensions = RutaExtensionManager.getDefault().getEngineExtensions();

-

-    List<String> language = new ArrayList<String>();

-    List<String> engines = new ArrayList<String>();

-

-    for (IRutaConditionExtension each : conditionExtensions) {

-      language.add(each.getClass().getName());

-    }

-    for (IRutaActionExtension each : actionExtensions) {

-      language.add(each.getClass().getName());

-    }

-    for (IRutaBooleanFunctionExtension each : booleanFunctionExtensions) {

-      language.add(each.getClass().getName());

-    }

-    for (IRutaNumberFunctionExtension each : numberFunctionExtensions) {

-      language.add(each.getClass().getName());

-    }

-    for (IRutaStringFunctionExtension each : stringFunctionExtensions) {

-      language.add(each.getClass().getName());

-    }

-    for (IRutaTypeFunctionExtension each : typeFunctionExtensions) {

-      language.add(each.getClass().getName());

-    }

-    for (IRutaBlockExtension each : blockExtensions) {

-      language.add(each.getClass().getName());

-    }

-    for (IEngineLoader each : engineExtensions) {

-      engines.add(each.getClass().getName());

-    }

-

-    try {

-      RutaBuildOptions option = new RutaBuildOptions();

-      option.setLanguageExtensions(language);

-      option.setEngineLoaders(engines);

-      IPreferenceStore store = RutaIdeCorePlugin.getDefault().getPreferenceStore();

-      option.setImportByName(store.getBoolean(RutaCorePreferences.BUILDER_IMPORT_BY_NAME));

-      option.setResolveImports(store.getBoolean(RutaCorePreferences.BUILDER_RESOLVE_IMPORTS));

-      option.setClassLoader(classloader);

-      builder.build(sm, typeSystemDest, engineDest, option, scriptPaths, enginePaths);

-    } catch (Exception e) {

-      DLTKCore.error(e.getMessage(), e);

-      if (DLTKCore.DEBUG_PARSER) {

-        e.printStackTrace();

-      }

-    }

-  }

-

-  private IProgressMonitor createMonitor(int totalWork) {

-    IProgressMonitor pm = new NullProgressMonitor();

-    pm.beginTask("Creating descriptors ", totalWork);

-    return pm;

-  }

-

-  public static IContainer getContainer(ISourceModule sourceModule) {

-    try {

-      IResource file = sourceModule.getCorrespondingResource();

-      return file.getParent();

-    } catch (ModelException e) {

-      if (DLTKCore.DEBUG_PARSER) {

-        e.printStackTrace();

-      }

-    }

-    return null;

-  }

-

-  public static IPath getAbsolutePath(ISourceModule sourceModule) {

-    try {

-      IResource file = sourceModule.getCorrespondingResource();

-      IPath absolutePath = file.getRawLocation().removeLastSegments(1);

-      return absolutePath;

-    } catch (ModelException e) {

-      if (DLTKCore.DEBUG_PARSER) {

-        e.printStackTrace();

-      }

-    }

-    return null;

-  }

-

-  public static IPath getRelativePath(ISourceModule sourceModule, String resourceName) {

-    IContainer parent = getContainer(sourceModule);

-    IPath relativePath = parent.getFullPath();

-    IPath relativeFilePath = relativePath.append(resourceName);

-    return relativeFilePath;

-  }

-

-  public void clean() {

-  }

-

-  public void prepare(IBuildChange buildChange, IBuildState buildState) throws CoreException {

-  }

-

-  public void buildExternalModule(IBuildContext context) throws CoreException {

-

-  }

-

-  public boolean beginBuild(int buildType) {

-    return buildType != RECONCILE_BUILD;

-  }

-

-  public void endBuild(IProgressMonitor monitor) {

-

-  }

-

-  public void build(IBuildContext context) throws CoreException {

-    final ModuleDeclaration ast = (ModuleDeclaration) context

-            .get(IBuildContext.ATTR_MODULE_DECLARATION);

-    ISourceModule sourceModule = context.getSourceModule();

-    generateDescriptorResources(sourceModule, ast);

-  }

-

-  @Override

-  public IBuildParticipant createBuildParticipant(IScriptProject project) throws CoreException {

-    return new RutaBuilder(project);

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaProjectUtils.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaProjectUtils.java
deleted file mode 100644
index eedd081..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/builder/RutaProjectUtils.java
+++ /dev/null
@@ -1,625 +0,0 @@
-/*

- * 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.ruta.ide.core.builder;

-

-import java.net.URI;

-import java.nio.file.Path;

-import java.nio.file.Paths;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Collection;

-import java.util.HashSet;

-import java.util.List;

-import java.util.TreeSet;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.core.filesystem.URIUtil;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IProjectNature;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.IWorkspace;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.QualifiedName;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IBuildpathAttribute;

-import org.eclipse.dltk.core.IBuildpathEntry;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.IScriptFolder;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.internal.core.ScriptProject;

-import org.eclipse.jdt.core.IClasspathEntry;

-import org.eclipse.jdt.core.IJavaProject;

-import org.eclipse.jdt.core.JavaCore;

-import org.eclipse.jdt.core.JavaModelException;

-import org.eclipse.jdt.internal.core.JavaProject;

-

-public class RutaProjectUtils {

-

-  public static final String BUILDPATH_ATTRIBUTE_RUTA = "ruta";

-

-  public static final String BUILDPATH_ATTRIBUTE_SCRIPT = "script";

-

-  public static final String BUILDPATH_ATTRIBUTE_DESCRIPTOR = "descriptor";

-

-  public static final String BUILDPATH_ATTRIBUTE_RESOURCES = "resources";

-

-  public static final String JAVANATURE = "org.eclipse.jdt.core.javanature";

-

-  public static final String CDE_DATA_PATH = "CDEdataPath";

-

-  public static final String DEFAULT_TYPESYSTEM_SUFFX = "TypeSystem";

-

-  public static final String DEFAULT_ANALYSISENGINE_SUFFIX = "Engine";

-

-  public static String getAnalysisEngineSuffix(IProject project) throws CoreException {

-    IScriptProject scriptProject = DLTKCore.create(project);

-    IBuildpathEntry[] buildpathEntries = scriptProject.getRawBuildpath();

-    for (IBuildpathEntry each : buildpathEntries) {

-      if (each.getEntryKind() == IBuildpathEntry.BPE_VARIABLE

-              && StringUtils.equals(each.getPath().toPortableString(), "RUTA_BUILD_VARS")) {

-        IBuildpathAttribute[] attributes = each.getExtraAttributes();

-        for (IBuildpathAttribute eachAttr : attributes) {

-          if (StringUtils.equals(eachAttr.getName(), "analysisEngineSuffix")) {

-            return eachAttr.getValue();

-          }

-        }

-      }

-    }

-    return DEFAULT_ANALYSISENGINE_SUFFIX;

-  }

-

-  public static String getTypeSystemSuffix(IProject project) throws CoreException {

-    IScriptProject scriptProject = DLTKCore.create(project);

-    IBuildpathEntry[] buildpathEntries = scriptProject.getRawBuildpath();

-    for (IBuildpathEntry each : buildpathEntries) {

-      if (each.getEntryKind() == IBuildpathEntry.BPE_VARIABLE

-              && StringUtils.equals(each.getPath().toPortableString(), "RUTA_BUILD_VARS")) {

-        IBuildpathAttribute[] attributes = each.getExtraAttributes();

-        for (IBuildpathAttribute eachAttr : attributes) {

-          if (StringUtils.equals(eachAttr.getName(), "typeSystemSuffix")) {

-            return eachAttr.getValue();

-          }

-        }

-      }

-    }

-    return DEFAULT_TYPESYSTEM_SUFFX;

-  }

-

-  public static IPath getAnalysisEngineDescriptorPath(IPath scriptPath, IProject project)

-          throws CoreException {

-    String analysisEngineSuffix = getAnalysisEngineSuffix(project);

-    String name = getScriptWithPackage(scriptPath, project);

-    String[] paths = getDescriptorPathsArray(project);

-    String locate = RutaEngine.locate(name, paths, analysisEngineSuffix + ".xml");

-    if (locate != null) {

-      return org.eclipse.core.runtime.Path.fromPortableString(locate);

-    } else {

-      return null;

-    }

-  }

-

-  public static IPath getAnalysisEngineDescriptorPath(String scriptLocation) throws CoreException {

-    IPath analysisEngineDescriptorPath;

-    IPath scriptPath = new org.eclipse.core.runtime.Path(scriptLocation);

-    IWorkspace workspace = ResourcesPlugin.getWorkspace();

-    IWorkspaceRoot workspaceRoot = workspace.getRoot();

-    IFile fileForLocation = workspaceRoot.getFileForLocation(scriptPath);

-    analysisEngineDescriptorPath = RutaProjectUtils.getAnalysisEngineDescriptorPath(scriptPath,

-            fileForLocation.getProject());

-    return analysisEngineDescriptorPath;

-  }

-

-  public static IPath getTypeSystemDescriptorPath(IPath scriptPath, IProject project)

-          throws CoreException {

-    String typeSystemSuffix = getTypeSystemSuffix(project);

-    String name = getScriptWithPackage(scriptPath, project);

-    String[] paths = getDescriptorPathsArray(project);

-    String locate = RutaEngine.locate(name, paths, typeSystemSuffix + ".xml");

-    if (locate != null) {

-      return org.eclipse.core.runtime.Path.fromPortableString(locate);

-    } else {

-      return null;

-    }

-  }

-

-  public static IPath getTypeSystemDescriptorPath(String scriptLocation) throws CoreException {

-    IPath analysisEngineDescriptorPath;

-    IPath scriptPath = new org.eclipse.core.runtime.Path(scriptLocation);

-    IWorkspace workspace = ResourcesPlugin.getWorkspace();

-    IWorkspaceRoot workspaceRoot = workspace.getRoot();

-    IFile fileForLocation = workspaceRoot.getFileForLocation(scriptPath);

-    analysisEngineDescriptorPath = RutaProjectUtils.getTypeSystemDescriptorPath(scriptPath,

-            fileForLocation.getProject());

-    return analysisEngineDescriptorPath;

-  }

-

-  public static String getScriptWithPackage(IPath scriptPath, IProject project)

-          throws CoreException {

-    String name = getModuleName(scriptPath);

-    IPath packagePath = getPackagePath(scriptPath, project);

-    if (packagePath != null) {

-      String packageString = packagePath.toPortableString().replaceAll("/", ".");

-      if (!StringUtils.isBlank(packageString)) {

-        name = packageString.concat(".").concat(name);

-      }

-    }

-    return name;

-  }

-

-  private static String[] getDescriptorPathsArray(IProject project) throws CoreException {

-    List<IFolder> descriptorFolders = getDescriptorFolders(project);

-    String[] paths = new String[descriptorFolders.size()];

-    int i = 0;

-    for (IFolder each : descriptorFolders) {

-      paths[i] = each.getLocation().toPortableString();

-      i++;

-    }

-    return paths;

-  }

-

-  public static IPath getDescriptorRootPath(IProject project) throws CoreException {

-    List<IFolder> descriptorFolders = getDescriptorFolders(project);

-    if (descriptorFolders != null && !descriptorFolders.isEmpty()) {

-      return descriptorFolders.get(0).getLocation();

-    } else {

-      IPath projectPath = project.getLocation();

-      IPath descPath = projectPath.append(getDefaultDescriptorLocation());

-      return descPath;

-    }

-  }

-

-  public static List<IFolder> getAllScriptFolders(IScriptProject proj) throws CoreException {

-    List<IFolder> result = new ArrayList<IFolder>();

-    result.addAll(getScriptFolders(proj));

-    result.addAll(getReferencedScriptFolders(proj));

-    return result;

-  }

-

-  public static List<IFolder> getReferencedScriptFolders(IScriptProject proj) throws CoreException {

-    return getReferencedScriptFolders(proj, new HashSet<IProject>());

-  }

-

-  public static List<IFolder> getReferencedScriptFolders(IScriptProject proj,

-          Collection<IProject> visited) throws CoreException {

-    List<IFolder> result = new ArrayList<IFolder>();

-    IProject[] referencedProjects = proj.getProject().getReferencedProjects();

-    for (IProject eachProject : referencedProjects) {

-      if (!visited.contains(eachProject) && eachProject.exists()) {

-        IScriptProject scriptProject = DLTKCore.create(eachProject);

-        result.addAll(getScriptFolders(scriptProject));

-        visited.add(eachProject);

-        result.addAll(getReferencedScriptFolders(scriptProject, visited));

-      }

-    }

-    return result;

-  }

-

-  public static List<IFolder> getScriptFolders(IProject project) throws CoreException {

-    IScriptProject scriptProject = DLTKCore.create(project);

-    return getScriptFolders(scriptProject);

-  }

-

-  public static List<IFolder> getScriptFolders(IScriptProject sp) throws CoreException {

-    List<IFolder> result = new ArrayList<IFolder>();

-

-    if (!sp.isOpen()) {

-      return result;

-    }

-

-    IBuildpathEntry[] rawBuildpath = null;

-    try {

-      rawBuildpath = sp.getRawBuildpath();

-    } catch (ModelException e) {

-      // do not spam error log

-    }

-    if (rawBuildpath != null) {

-      for (IBuildpathEntry each : rawBuildpath) {

-        IPath path = each.getPath();

-        int entryKind = each.getEntryKind();

-        if (entryKind == IBuildpathEntry.BPE_SOURCE) {

-          IBuildpathAttribute[] extraAttributes = each.getExtraAttributes();

-          for (IBuildpathAttribute eachAttr : extraAttributes) {

-            if (eachAttr.getName().equals(BUILDPATH_ATTRIBUTE_RUTA)

-                    && eachAttr.getValue().equals(BUILDPATH_ATTRIBUTE_SCRIPT)) {

-              result.add(ResourcesPlugin.getWorkspace().getRoot().getFolder(path));

-            }

-          }

-        }

-      }

-    }

-    if (result.isEmpty()) {

-      IFolder findElement = sp.getProject().getFolder(getDefaultScriptLocation());

-      if (findElement != null && findElement.exists()) {

-        result.add((IFolder) findElement);

-      }

-    }

-    return result;

-  }

-

-  public static List<IFolder> getAllDescriptorFolders(IProject proj) throws CoreException {

-    List<IFolder> result = new ArrayList<IFolder>();

-    result.addAll(getDescriptorFolders(proj));

-    result.addAll(getReferencedDescriptorFolders(proj));

-    return result;

-  }

-

-  public static List<IFolder> getReferencedDescriptorFolders(IProject proj) throws CoreException {

-    return getReferencedDescriptorFolders(proj, new HashSet<IProject>());

-  }

-

-  public static List<IFolder> getReferencedDescriptorFolders(IProject proj,

-          Collection<IProject> visited) throws CoreException {

-    List<IFolder> result = new ArrayList<IFolder>();

-    Collection<IProject> referencedProjects = getReferencedProjects(proj, new HashSet<IProject>());

-    for (IProject eachProject : referencedProjects) {

-      if (!visited.contains(eachProject)) {

-        result.addAll(RutaProjectUtils.getDescriptorFolders(eachProject));

-        visited.add(eachProject);

-        result.addAll(getReferencedDescriptorFolders(eachProject, visited));

-      }

-    }

-    return result;

-  }

-

-  public static Collection<IProject> getReferencedProjects(IProject proj,

-          Collection<IProject> visited) throws CoreException {

-    Collection<IProject> result = new HashSet<IProject>();

-    if (!proj.isOpen()) {

-      return result;

-    }

-    IProject[] referencedProjects = proj.getReferencedProjects();

-    result.addAll(Arrays.asList(referencedProjects));

-    IProjectNature nature = proj.getNature(JAVANATURE);

-    if (nature != null) {

-      JavaProject javaProject = (JavaProject) JavaCore.create(proj);

-      IClasspathEntry[] resolvedClasspath = javaProject.getResolvedClasspath();

-      for (IClasspathEntry eachCPE : resolvedClasspath) {

-        if (eachCPE.getEntryKind() == IClasspathEntry.CPE_PROJECT) {

-          IProject project = getProject(eachCPE.getPath());

-          result.add(project);

-        }

-      }

-    }

-    return result;

-  }

-

-  public static List<IFolder> getDescriptorFolders(IProject project) throws CoreException {

-    List<IFolder> result = new ArrayList<IFolder>();

-    if (!project.isOpen()) {

-      return result;

-    }

-    IProjectNature javaNature = project.getNature(JAVANATURE);

-    if (javaNature != null) {

-      IJavaProject javaProject = JavaCore.create(project);

-      IPath readOutputLocation = javaProject.readOutputLocation();

-      IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(readOutputLocation);

-      result.add(folder);

-    }

-    IProjectNature pearNature = project.getNature("org.apache.uima.pear.UimaNature");

-    if (pearNature != null) {

-      IFolder findElement = project.getFolder("desc");

-      if (findElement != null) {

-        result.add((IFolder) findElement);

-      }

-    }

-    IProjectNature rutaNature = project.getNature(RutaNature.NATURE_ID);

-    if (rutaNature != null) {

-

-      // try to access script project

-      IScriptProject sp = DLTKCore.create(project);

-      if (sp != null) {

-        IBuildpathEntry[] rawBuildpath = null;

-        try {

-          rawBuildpath = sp.getRawBuildpath();

-        } catch (ModelException e) {

-          // do not spam error log

-        }

-        if (rawBuildpath != null) {

-          for (IBuildpathEntry each : rawBuildpath) {

-            IPath path = each.getPath();

-            int entryKind = each.getEntryKind();

-            if (entryKind == IBuildpathEntry.BPE_SOURCE) {

-              IBuildpathAttribute[] extraAttributes = each.getExtraAttributes();

-              for (IBuildpathAttribute eachAttr : extraAttributes) {

-                if (eachAttr.getName().equals(BUILDPATH_ATTRIBUTE_RUTA)

-                        && eachAttr.getValue().equals(BUILDPATH_ATTRIBUTE_DESCRIPTOR)) {

-                  result.add(ResourcesPlugin.getWorkspace().getRoot().getFolder(path));

-                }

-              }

-            }

-          }

-        }

-      }

-    }

-    if (result.isEmpty()) {

-      IFolder findElement = project.getFolder(getDefaultDescriptorLocation());

-      if (findElement != null && findElement.exists()) {

-        result.add((IFolder) findElement);

-      }

-    }

-    return result;

-  }

-

-  public static List<IFolder> getResourceFolders(IProject project) throws CoreException {

-    List<IFolder> result = new ArrayList<IFolder>();

-    if (!project.isOpen()) {

-      return result;

-    }

-    IProjectNature javaNature = project.getNature(JAVANATURE);

-    if (javaNature != null) {

-      IJavaProject javaProject = JavaCore.create(project);

-      IPath readOutputLocation = javaProject.readOutputLocation();

-      IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(readOutputLocation);

-      result.add(folder);

-    }

-    IProjectNature rutaNature = project.getNature(RutaNature.NATURE_ID);

-    if (rutaNature != null) {

-

-      // try to access script project

-      IScriptProject sp = DLTKCore.create(project);

-      if (sp != null) {

-        IBuildpathEntry[] rawBuildpath = null;

-        try {

-          rawBuildpath = sp.getRawBuildpath();

-        } catch (ModelException e) {

-          // do not spam error log

-        }

-        if (rawBuildpath != null) {

-          for (IBuildpathEntry each : rawBuildpath) {

-            IPath path = each.getPath();

-            int entryKind = each.getEntryKind();

-            if (entryKind == IBuildpathEntry.BPE_SOURCE) {

-              IBuildpathAttribute[] extraAttributes = each.getExtraAttributes();

-              for (IBuildpathAttribute eachAttr : extraAttributes) {

-                if (eachAttr.getName().equals(BUILDPATH_ATTRIBUTE_RUTA)

-                        && eachAttr.getValue().equals(BUILDPATH_ATTRIBUTE_RESOURCES)) {

-                  result.add(ResourcesPlugin.getWorkspace().getRoot().getFolder(path));

-                }

-              }

-            }

-          }

-        }

-      }

-    }

-    if (result.isEmpty()) {

-      IFolder findElement = project.getFolder(getDefaultResourcesLocation());

-      if (findElement != null) {

-        result.add((IFolder) findElement);

-      }

-    }

-    return result;

-  }

-

-  public static List<String> getFolderLocations(List<IFolder> folders) {

-    List<String> result = new ArrayList<String>();

-    if (folders == null)

-      return result;

-    for (IFolder each : folders) {

-      String portableString = each.getLocation().toPortableString();

-      result.add(portableString);

-    }

-    return result;

-  }

-

-  public static IPath getScriptRootPath(IProject project) throws CoreException {

-    List<IFolder> scriptFolders = getScriptFolders(project);

-    if (scriptFolders != null && !scriptFolders.isEmpty()) {

-      return scriptFolders.get(0).getLocation();

-    } else {

-      IPath projectPath = project.getLocation();

-      IPath descPath = projectPath.append(getDefaultScriptLocation());

-      return descPath;

-    }

-  }

-

-  public static IPath getPackagePath(IPath scriptIPath, IProject project) throws CoreException {

-    List<IFolder> scriptFolders = getScriptFolders(project);

-    URI scriptURI = URIUtil.toURI(scriptIPath);

-    Path scriptPath = Paths.get(scriptURI);

-    IPath descIPath = null;

-    for (IFolder eachFolder : scriptFolders) {

-      IPath eachLocation = eachFolder.getLocation();

-      URI eachURI = URIUtil.toURI(eachLocation);

-      Path eachPath = Paths.get(eachURI);

-      if (scriptPath.startsWith(eachPath)) {

-        descIPath = eachLocation;

-        break;

-      }

-    }

-    if (descIPath != null) {

-      IPath makeRelativeTo = scriptIPath.makeRelativeTo(descIPath);

-      // remove script

-      IPath relativePackagePath = makeRelativeTo.removeLastSegments(1);

-      return relativePackagePath;

-    }

-    return null;

-  }

-

-  public static String getModuleName(IPath path) {

-    String result = path.lastSegment();

-    int lastIndexOf = result.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);

-    if (lastIndexOf != -1) {

-      result = result.substring(0, lastIndexOf);

-    }

-    return result;

-  }

-

-  public static void addProjectDataPath(IProject project, IFolder folder) throws CoreException {

-    String dataPath = project.getPersistentProperty((new QualifiedName("", CDE_DATA_PATH)));

-    String sep = System.getProperty("path.separator");

-    if (dataPath == null) {

-      dataPath = "";

-    }

-    String[] split = dataPath.split(sep);

-    List<String> paths = Arrays.asList(split);

-    String addon = folder.getLocation().toPortableString();

-    if (!paths.contains(addon)) {

-      if (!StringUtils.isEmpty(dataPath)) {

-        dataPath += sep;

-      }

-      dataPath += addon;

-      project.setPersistentProperty(new QualifiedName("", CDE_DATA_PATH), dataPath);

-    }

-  }

-

-  public static void removeProjectDataPath(IProject project, IFolder folder) throws CoreException {

-    String dataPath = project.getPersistentProperty((new QualifiedName("", CDE_DATA_PATH)));

-    String sep = System.getProperty("path.separator");

-    if (dataPath == null) {

-      return;

-    }

-    String path = folder.getLocation().toPortableString();

-    if (!StringUtils.isEmpty(dataPath)) {

-      dataPath = dataPath.replaceAll(path, "");

-      dataPath = dataPath.replaceAll(sep + sep, "");

-    }

-    project.setPersistentProperty(new QualifiedName("", CDE_DATA_PATH), dataPath);

-  }

-

-  public static IProject getProject(IPath path) {

-    IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(path);

-    if (member instanceof IProject) {

-      IProject p = (IProject) member;

-      return p;

-    }

-    return null;

-  }

-

-  public static Collection<String> getClassPath(IProject project) throws CoreException {

-    Collection<String> result = new TreeSet<String>();

-    extendClasspathWithProject(result, project.getProject(), new HashSet<IProject>());

-    Collection<String> dependencies = getDependencies(project.getProject());

-    result.addAll(dependencies);

-    return result;

-  }

-

-  private static Collection<String> getDependencies(IProject project) throws CoreException {

-    Collection<String> result = new TreeSet<String>();

-    IProject[] referencedProjects = project.getReferencedProjects();

-    for (IProject eachProject : referencedProjects) {

-      extendClasspathWithProject(result, eachProject, new HashSet<IProject>());

-      IProjectNature nature = eachProject.getNature(RutaNature.NATURE_ID);

-      if (nature != null) {

-        result.addAll(getDependencies(eachProject));

-      }

-    }

-    return result;

-  }

-

-  private static void extendClasspathWithProject(Collection<String> result, IProject project,

-          Collection<IProject> visited) throws CoreException, JavaModelException {

-    IProjectNature rutaNature = project.getNature(RutaNature.NATURE_ID);

-    if (rutaNature != null) {

-      IScriptProject sp = DLTKCore.create(project);

-      List<IFolder> scriptFolders = RutaProjectUtils.getScriptFolders(sp);

-      for (IFolder each : scriptFolders) {

-        result.add(each.getLocation().toPortableString());

-      }

-      List<IFolder> descriptorFolders = RutaProjectUtils.getDescriptorFolders(project);

-      for (IFolder each : descriptorFolders) {

-        result.add(each.getLocation().toPortableString());

-      }

-      List<IFolder> resourceFolders = RutaProjectUtils.getResourceFolders(project);

-      for (IFolder each : resourceFolders) {

-        result.add(each.getLocation().toPortableString());

-      }

-    }

-    IProjectNature javaNature = project.getNature(RutaProjectUtils.JAVANATURE);

-    if (javaNature != null) {

-      JavaProject javaProject = (JavaProject) JavaCore.create(project);

-

-      // add output, e.g., target/classes

-      IPath readOutputLocation = javaProject.readOutputLocation();

-      IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(readOutputLocation);

-      result.add(folder.getLocation().toPortableString());

-

-      IClasspathEntry[] rawClasspath = javaProject.getRawClasspath();

-      for (IClasspathEntry each : rawClasspath) {

-        int entryKind = each.getEntryKind();

-        IPath path = each.getPath();

-        if (entryKind == IClasspathEntry.CPE_PROJECT) {

-          IProject p = RutaProjectUtils.getProject(path);

-          if (!visited.contains(p)) {

-            visited.add(p);

-            extendClasspathWithProject(result, p, visited);

-          }

-        } else if (entryKind != IClasspathEntry.CPE_SOURCE) {

-          String segment = path.segment(0);

-          if (!segment.equals("org.eclipse.jdt.launching.JRE_CONTAINER")) {

-            IClasspathEntry[] resolveClasspath = javaProject

-                    .resolveClasspath(new IClasspathEntry[] { each });

-            for (IClasspathEntry eachResolved : resolveClasspath) {

-              if (eachResolved.getEntryKind() == IClasspathEntry.CPE_PROJECT) {

-                IProject p = RutaProjectUtils.getProject(eachResolved.getPath());

-                if (!visited.contains(p)) {

-                  visited.add(p);

-                  extendClasspathWithProject(result, p, visited);

-                }

-              } else {

-                result.add(eachResolved.getPath().toPortableString());

-              }

-            }

-          }

-        }

-      }

-    }

-  }

-

-  public static String getDefaultInputLocation() {

-    return "input";

-  }

-

-  public static String getDefaultOutputLocation() {

-    return "output";

-  }

-

-  public static String getDefaultTestLocation() {

-    return "test";

-  }

-

-  public static String getDefaultCleanTestLocation() {

-    return "temp_clean";

-  }

-

-  public static String getDefaultScriptLocation() {

-    return BUILDPATH_ATTRIBUTE_SCRIPT;

-  }

-

-  public static String getDefaultResourcesLocation() {

-    return BUILDPATH_ATTRIBUTE_RESOURCES;

-  }

-

-  public static String getDefaultDescriptorLocation() {

-    return BUILDPATH_ATTRIBUTE_DESCRIPTOR;

-  }

-

-  public static String getDefaultTempTestLocation() {

-    return "temp";

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnKeywordArgumentOrFunctionArgument.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnKeywordArgumentOrFunctionArgument.java
deleted file mode 100644
index 78da2f8..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnKeywordArgumentOrFunctionArgument.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.apache.uima.ruta.ide.parser.ast.RutaStatement;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.codeassist.complete.ICompletionOnKeyword;

-import org.eclipse.dltk.utils.CorePrinter;

-

-public class CompletionOnKeywordArgumentOrFunctionArgument extends SimpleReference implements

-        ICompletionOnKeyword {

-

-  private String[] possibleKeywords;

-

-  private RutaStatement statement;

-

-  private ASTNode completionNode;

-

-  public CompletionOnKeywordArgumentOrFunctionArgument(String token, ASTNode completionNode,

-          RutaStatement node, String[] KeywordspossibleKeywords) {

-    super(completionNode.sourceStart(), completionNode.sourceEnd(), token);

-    this.possibleKeywords = KeywordspossibleKeywords;

-    this.statement = node;

-    this.completionNode = completionNode;

-  }

-

-  public CompletionOnKeywordArgumentOrFunctionArgument(String token, RutaStatement node,

-          String[] possibleKeywords, int position) {

-    super(position, position, token);

-    this.possibleKeywords = possibleKeywords;

-    this.statement = node;

-    this.completionNode = null;

-  }

-

-  public char[] getToken() {

-    if (getName() != null) {

-      return getName().toCharArray();

-    }

-    return "".toCharArray();

-  }

-

-  public String[] getPossibleKeywords() {

-    return this.possibleKeywords;

-  }

-

-  @Override

-  public void printNode(CorePrinter output) {

-  }

-

-  @Override

-  public void traverse(ASTVisitor pVisitor) throws Exception {

-  }

-

-  public boolean canCompleteEmptyToken() {

-    return true;

-  }

-

-  public RutaStatement getStatement() {

-    return this.statement;

-  }

-

-  public int argumentIndex() {

-    if (this.completionNode == null) {

-      if (this.statement.getCount() == 1) {

-        return 1;

-      }

-      if (statement.getCount() > 2 && statement.getAt(0).sourceEnd() <= sourceStart()

-              && sourceEnd() <= statement.getAt(1).sourceStart()) {

-        return 1;

-      }

-      return -1;

-    }

-    for (int i = 0; i < this.statement.getCount(); ++i) {

-      if (this.statement.getAt(i).equals(this.completionNode)) {

-        return i;

-      }

-    }

-    return -1;

-  }

-

-  public ASTNode getCompletionNode() {

-    return this.completionNode;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnKeywordOrFunction.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnKeywordOrFunction.java
deleted file mode 100644
index c62b24d..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnKeywordOrFunction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.codeassist.complete.ICompletionOnKeyword;

-import org.eclipse.dltk.utils.CorePrinter;

-

-public class CompletionOnKeywordOrFunction extends SimpleReference implements ICompletionOnKeyword {

-

-  private String[] possibleKeywords;

-

-  public CompletionOnKeywordOrFunction(String token, ASTNode completionNode, ASTNode node,

-          String[] possibleKeywords) {

-    super(completionNode.sourceStart(), completionNode.sourceEnd(), token);

-    this.possibleKeywords = possibleKeywords;

-  }

-

-  public char[] getToken() {

-    return getName().toCharArray();

-  }

-

-  public String[] getPossibleKeywords() {

-    return this.possibleKeywords;

-  }

-

-  @Override

-  public void printNode(CorePrinter output) {

-  }

-

-  @Override

-  public void traverse(ASTVisitor pVisitor) throws Exception {

-  }

-

-  public boolean canCompleteEmptyToken() {

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnVariable.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnVariable.java
deleted file mode 100644
index 10c9772..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/CompletionOnVariable.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class CompletionOnVariable extends SimpleReference {

-  private ASTNode parentNode;

-

-  private ASTNode inNode;

-

-  private ASTNode completionNode;

-

-  private boolean canHandleEmpty;

-

-  private boolean provideDollar = true;

-

-  public CompletionOnVariable(String completionToken, ASTNode completionNode, ASTNode node,

-          ASTNode inNode, boolean canHandleEmpty) {

-    super(completionNode.sourceStart(), completionNode.sourceEnd(), completionToken);

-    this.parentNode = node;

-    this.completionNode = completionNode;

-    this.inNode = inNode;

-    this.canHandleEmpty = canHandleEmpty;

-  }

-

-  public CompletionOnVariable(String completionToken, ASTNode completionNode, ASTNode node,

-          ASTNode inNode, boolean canHandleEmpty, boolean provideDollar) {

-    this(completionToken, completionNode, node, inNode, canHandleEmpty);

-    this.provideDollar = provideDollar;

-  }

-

-  public ASTNode getParentNode() {

-    return this.parentNode;

-  }

-

-  public ASTNode getInNode() {

-    return this.inNode;

-  }

-

-  public ASTNode getCompletionNode() {

-    return this.completionNode;

-  }

-

-  public char[] getToken() {

-    return this.getName().toCharArray();

-  }

-

-  public boolean canHandleEmpty() {

-    return this.canHandleEmpty;

-  }

-

-  public boolean getProvideDollar() {

-    return this.provideDollar;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaASTUtil.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaASTUtil.java
deleted file mode 100644
index ac60bab..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaASTUtil.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.core.parser.RutaParseUtils;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.declarations.TypeDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.statements.Block;

-import org.eclipse.dltk.core.DLTKCore;

-

-public class RutaASTUtil {

-  public static List getStatements(ASTNode node) {

-    if (node instanceof ModuleDeclaration) {

-      return ((ModuleDeclaration) node).getStatements();

-    } else if (node instanceof TypeDeclaration) {

-      return ((TypeDeclaration) node).getStatements();

-    } else if (node instanceof MethodDeclaration) {

-      return ((MethodDeclaration) node).getStatements();

-    } else if (node instanceof Block) {

-      return ((Block) node).getStatements();

-    } else {

-      final List innerBlockStatements = new ArrayList();

-      // Lets traverse to see inner blocks.

-      ASTVisitor visitor = new ASTVisitor() {

-        @Override

-        public boolean visit(Expression s) throws Exception {

-          if (s instanceof Block) {

-            List tStatements = ((Block) s).getStatements();

-            innerBlockStatements.addAll(tStatements);

-          }

-          return false;

-        }

-

-        @Override

-        public boolean visit(MethodDeclaration s) throws Exception {

-          return false;

-        }

-

-        @Override

-        public boolean visit(TypeDeclaration s) throws Exception {

-          return false;

-        }

-      };

-      try {

-        node.traverse(visitor);

-      } catch (Exception e) {

-        e.printStackTrace();

-      }

-      return innerBlockStatements;

-    }

-    // return null;

-  }

-

-  /**

-   * We need to extend all statements to end of lines or to begining of next statement. This is

-   * needed to for correct completion in statements. Such as variable completion and so on.

-   */

-  public static void extendStatements(ASTNode node, String content) {

-    List statements = getStatements(node);

-

-    if (statements != null) {

-      int len = statements.size();

-      for (int i = 0; i < len; ++i) {

-        ASTNode nde = (ASTNode) statements.get(i);

-

-        extendStatement(nde, content);

-        extendStatements(nde, content);

-      }

-    }

-  }

-

-  public static void extendStatement(ASTNode node, String content) {

-    int newValueStart = startLineOrSymbol(node, content);

-    int newValueEnd = endLineOrSymbol(node, content);

-    if (DLTKCore.DEBUG_COMPLETION) {

-      if (node.sourceEnd() != newValueEnd || node.sourceStart() != newValueStart) {

-        // TODO

-      }

-    }

-    node.setStart(newValueStart);

-    node.setEnd(newValueEnd);

-  }

-

-  public static int endLineOrSymbol(ASTNode node, String content) {

-    return RutaParseUtils.endLineOrSymbol(node.sourceEnd(), content);

-  }

-

-  public static int startLineOrSymbol(ASTNode node, String content) {

-    return RutaParseUtils.startLineOrSymbol(node.sourceStart(), content);

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaAssistParser.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaAssistParser.java
deleted file mode 100644
index 17a6654..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaAssistParser.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.parser.ISourceParser;

-import org.eclipse.dltk.codeassist.IAssistParser;

-import org.eclipse.dltk.core.DLTKLanguageManager;

-

-public abstract class RutaAssistParser implements IAssistParser {

-  public static final int MODULE = 0;// IRutaKeywords.MODULE;

-

-  public static final int NAMESPACE = 1;// IRutaKeywords.NAMESPACE;

-

-  public static final int FUNCTION = 2;// IRutaKeywords.FUNCTION;

-

-  public static final int EXEC_EXPRESSION = 3;// IRutaKeywords.EXEC_EXPRESSION;

-

-  protected ISourceParser parser = null;

-

-  protected ModuleDeclaration module;

-

-  protected ASTNode assistNodeParent = null;

-

-  public RutaAssistParser() {

-    // try {

-    this.parser = DLTKLanguageManager.getSourceParser(RutaNature.NATURE_ID);

-    // } catch (CoreException e) {

-    // if (DLTKCore.DEBUG) {

-    // e.printStackTrace();

-    // }

-    // }

-  }

-

-  public ASTNode getAssistNodeParent() {

-    return assistNodeParent;

-  }

-

-  protected void findElementsTo(List statements, ASTNode node, List elements) {

-    if (statements == null) {

-      return;

-    }

-    Iterator i = statements.iterator();

-    while (i.hasNext()) {

-      ASTNode n = (ASTNode) i.next();

-      if (n.equals(node)) {

-        elements.add(n);

-        return;

-      }

-      if (n.sourceStart() <= node.sourceStart() && node.sourceEnd() <= n.sourceEnd()) {

-        elements.add(n);

-        findElementsTo(RutaASTUtil.getStatements(n), node, elements);

-        return;

-      }

-    }

-

-  }

-

-  protected List findLevelsTo(ASTNode astNodeParent) {

-    List elements = new ArrayList();

-    if (this.module != null || astNodeParent instanceof ModuleDeclaration) {

-      if (this.module == null) {

-        this.module = (ModuleDeclaration) astNodeParent;

-      }

-      elements.add(this.module);

-      findElementsTo(RutaASTUtil.getStatements(this.module), astNodeParent, elements);

-    }

-    return elements;

-  }

-

-  public void setSource(ModuleDeclaration unit) {

-    this.module = unit;

-  }

-

-  // public ModuleDeclaration parse(ISourceModule sourceUnit) {

-  //

-  // module = this.parser.parse(sourceUnit., null);

-  // module.rebuild();

-  //

-  // // RutaASTUtil.extendStatements(module, sourceUnit

-  // // .getSourceContents());

-  //

-  // return module;

-  // }

-

-  public ModuleDeclaration getModule() {

-    return this.module;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaCompletionEngine.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaCompletionEngine.java
deleted file mode 100644
index b97d573..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaCompletionEngine.java
+++ /dev/null
@@ -1,748 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.MalformedURLException;

-import java.net.URL;

-import java.net.URLClassLoader;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Collection;

-import java.util.Comparator;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-import java.util.TreeSet;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.analysis_component.AnalysisComponent;

-import org.apache.uima.resource.ResourceManager;

-import org.apache.uima.resource.impl.ResourceManager_impl;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.core.IRutaKeywords;

-import org.apache.uima.ruta.ide.core.RutaExtensionManager;

-import org.apache.uima.ruta.ide.core.RutaKeywordsManager;

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.ide.core.extensions.ICompletionExtension;

-import org.apache.uima.ruta.ide.core.parser.RutaParseUtils;

-import org.apache.uima.ruta.ide.parser.ast.ComponentDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.ComponentReference;

-import org.apache.uima.ruta.ide.parser.ast.RutaAction;

-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;

-import org.apache.uima.ruta.ide.parser.ast.RutaModuleDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.filesystem.URIUtil;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IProjectNature;

-import org.eclipse.core.resources.IResource;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.codeassist.RelevanceConstants;

-import org.eclipse.dltk.codeassist.ScriptCompletionEngine;

-import org.eclipse.dltk.compiler.CharOperation;

-import org.eclipse.dltk.compiler.env.IModuleSource;

-import org.eclipse.dltk.core.CompletionProposal;

-import org.eclipse.dltk.core.IField;

-import org.eclipse.dltk.core.IMethod;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.IType;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.internal.core.SourceField;

-import org.eclipse.dltk.internal.core.SourceMethod;

-import org.eclipse.dltk.internal.core.SourceModule;

-import org.eclipse.jdt.core.IClasspathEntry;

-import org.eclipse.jdt.core.JavaCore;

-import org.eclipse.jdt.core.JavaModelException;

-import org.eclipse.jdt.internal.core.JavaProject;

-import org.springframework.beans.factory.config.BeanDefinition;

-import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;

-import org.springframework.core.io.DefaultResourceLoader;

-import org.springframework.core.io.Resource;

-import org.springframework.core.io.ResourceLoader;

-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

-import org.springframework.core.type.filter.AssignableTypeFilter;

-import org.springframework.util.PathMatcher;

-

-public class RutaCompletionEngine extends ScriptCompletionEngine {

-

-  protected RutaCompletionParser parser;

-

-  protected IModuleSource sourceModule;

-

-  protected final static boolean TRACE_COMPLETION_TIME = false;

-

-  private ICompletionExtension[] extensions;

-

-  private URLClassLoader classloader = null;

-

-  public RutaCompletionEngine() {

-    extensions = RutaExtensionManager.getDefault().getCompletionExtensions();

-    this.parser = new RutaCompletionParser(extensions);

-  }

-

-  @Override

-  protected int getEndOfEmptyToken() {

-    return actualCompletionPosition;

-  }

-

-  @Override

-  protected String processMethodName(IMethod method, String token) {

-    return RutaParseUtils.processMethodName(method, token);

-  }

-

-  @Override

-  protected String processTypeName(IType type, String token) {

-    return RutaParseUtils.processTypeName(type, token);

-  }

-

-  public void complete(IModuleSource module, int position, int i) {

-    this.sourceModule = module;

-    this.actualCompletionPosition = position;

-    this.offset = i;

-    this.requestor.beginReporting();

-    String content = module.getSourceContents();

-    if (position < 0 || position > content.length()) {

-      return;

-    }

-

-    TMAutoCompletionToolkit tk = new TMAutoCompletionToolkit(content, position);

-

-    String startPart = tk.getWordPrefix();

-    this.setSourceRange(position - startPart.length(), position);

-

-    // 090813:

-    RutaModuleDeclaration parsed = (RutaModuleDeclaration) this.parser.parse(module);

-

-    // types = getShortNames(types);

-    if (classloader == null) {

-      IScriptProject scriptProject = sourceModule.getModelElement().getScriptProject();

-      try {

-        Collection<String> dependencies = RutaProjectUtils.getClassPath(scriptProject.getProject());

-        URL[] urls = new URL[dependencies.size()];

-        int counter = 0;

-        for (String dep : dependencies) {

-          urls[counter] = new File(dep).toURI().toURL();

-          counter++;

-        }

-        classloader = new URLClassLoader(urls);

-      } catch (MalformedURLException e) {

-        RutaIdeCorePlugin.error(e);

-      } catch (CoreException e) {

-        RutaIdeCorePlugin.error(e);

-      }

-    }

-

-    ASTNode node;

-    if (parsed != null) {

-      try {

-        RutaReferenceVisitor referenceVisitor = new RutaReferenceVisitor(actualCompletionPosition);

-        parsed.traverse(referenceVisitor);

-        node = referenceVisitor.getResult();

-

-        if (node == null) {

-          doCompletionOnEmptyStatement(module, position, i);

-          doCompletionOnDeclaration(module, startPart);

-          doCompletionOnVarRef(module, parsed, startPart, RutaTypeConstants.RUTA_TYPE_AT, "");

-        } else if (node instanceof RutaVariableReference) {

-          int type = ((RutaVariableReference) node).getType();

-          doCompletionOnVarRef(module, parsed, startPart, type,

-                  ((RutaVariableReference) node).getName());

-          if (RutaParseUtils.isAtLineStart(node, content)) {

-            doCompletionOnDeclaration(module, startPart);

-          }

-        } else if (node instanceof ComponentDeclaration) {

-          doCompletionOnComponentDeclaration(module, parsed, startPart,

-                  ((ComponentDeclaration) node).getType(), startPart);

-        } else if (node instanceof ComponentReference) {

-          doCompletionOnComponentReference(module, parsed, startPart,

-                  ((ComponentReference) node).getType(), startPart);

-        } else if (node instanceof RutaAction) {

-          doCompletionOnAction(module, parsed, startPart, RutaTypeConstants.RUTA_TYPE_A, startPart);

-          doCompletionOnVarRef(module, parsed, startPart, RutaTypeConstants.RUTA_TYPE_AT, "");

-        } else if (node instanceof RutaCondition) {

-          doCompletionOnCondition(module, parsed, startPart, RutaTypeConstants.RUTA_TYPE_C,

-                  startPart);

-          doCompletionOnVarRef(module, parsed, startPart, RutaTypeConstants.RUTA_TYPE_AT, "");

-        }

-        // if(requestor.)

-        // doCompletionOnKeyword(position, i, startPart);

-

-        // }

-      } catch (Exception e) {

-        System.out.println("no completion node found");

-      } finally {

-        this.requestor.endReporting();

-      }

-    }

-  }

-

-  private void doCompletionOnComponentReference(IModuleSource cu, RutaModuleDeclaration parsed,

-          String startPart, int type, String complString) {

-    Collection<String> importedEngines = parsed.descriptorInfo.getImportedEngines();

-    importedEngines.addAll(parsed.descriptorInfo.getImportedUimafitEngines());

-    for (String string : importedEngines) {

-      if (match(complString, string)) {

-        addProposal(complString, string, CompletionProposal.PACKAGE_REF);

-      }

-      int indexOf = string.lastIndexOf(".");

-      if (indexOf != -1) {

-        String shortName = string.substring(indexOf + 1, string.length());

-        if (match(complString, shortName)) {

-          addProposal(complString, shortName, CompletionProposal.PACKAGE_REF);

-        }

-      }

-    }

-    Collection<String> importedScripts = parsed.descriptorInfo.getImportedScripts();

-    for (String each : importedScripts) {

-      String[] split = each.split("\\.");

-      String string = split[split.length - 1];

-      if (match(complString, string)) {

-        addProposal(complString, string, CompletionProposal.PACKAGE_REF);

-      }

-    }

-    List<IMethod> blocks = new ArrayList<IMethod>();

-    try {

-      IModelElement[] children = sourceModule.getModelElement().getModel().getChildren();

-      for (IModelElement iModelElement : children) {

-        if (iModelElement instanceof SourceMethod) {

-          collectBlocks((SourceMethod) iModelElement, blocks);

-        }

-      }

-    } catch (ModelException e) {

-    }

-    for (IMethod m : blocks) {

-      String string = m.getElementName();

-      if (match(complString, string)) {

-        addProposal(complString, string, CompletionProposal.PACKAGE_REF);

-      }

-    }

-  }

-

-  private void doCompletionOnComponentDeclaration(IModuleSource cu, RutaModuleDeclaration parsed,

-          String startPart, int type, String complString) throws Exception {

-    if (type == ComponentDeclaration.SCRIPT) {

-      List<String> scripts = new ArrayList<String>();

-

-      List<IFolder> scriptFolders = RutaProjectUtils.getAllScriptFolders(sourceModule

-              .getModelElement().getScriptProject());

-      for (IFolder folder : scriptFolders) {

-        try {

-          scripts.addAll(collectScripts(folder, ""));

-        } catch (CoreException e) {

-        }

-      }

-      Resource[] resources = getFilesInClasspath(complString, "ruta");

-      for (Resource resource : resources) {

-        try {

-          String string = getScriptRepresentation(resource, "ruta");

-          if (string != null && !scripts.contains(string)) {

-            scripts.add(string);

-          }

-        } catch (Exception e) {

-          // do not report the exceptions

-        }

-      }

-

-      for (String string : scripts) {

-        if (match(complString, string)) {

-          addProposal(complString, string, CompletionProposal.PACKAGE_REF);

-        }

-      }

-    } else if (type == ComponentDeclaration.UIMAFIT_ENGINE) {

-      List<String> engines = new ArrayList<String>();

-      ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(

-              true);

-      ResourceLoader resourceLoader = new DefaultResourceLoader(classloader);

-      provider.setResourceLoader(resourceLoader);

-      provider.addIncludeFilter(new AssignableTypeFilter(AnalysisComponent.class));

-

-      String pack = complString.replaceAll("[.]", "/");

-      if (pack.endsWith("/")) {

-        pack = pack.substring(0, pack.length() - 1);

-      }

-      Set<BeanDefinition> components = provider.findCandidateComponents(pack);

-      for (BeanDefinition component : components) {

-        String beanClassName = component.getBeanClassName();

-        engines.add(beanClassName);

-      }

-      for (String string : engines) {

-        if (match(complString, string)) {

-          addProposal(complString, string, CompletionProposal.PACKAGE_REF);

-        }

-      }

-    } else if (type == ComponentDeclaration.ENGINE) {

-      List<String> engines = new ArrayList<String>();

-      Resource[] resources = getFilesInClasspath(complString, "xml");

-      for (Resource resource : resources) {

-        try {

-          UIMAFramework.getXMLParser().parseAnalysisEngineDescription(

-                  new XMLInputSource(resource.getURL()));

-          String string = getScriptRepresentation(resource, "xml");

-          if (string != null) {

-            engines.add(string);

-          }

-        } catch (Exception e) {

-          // do not report the exceptions

-        }

-      }

-      if (StringUtils.isAllUpperCase(complString)) {

-        List<IFolder> descriptorFolders = RutaProjectUtils.getAllDescriptorFolders(sourceModule

-                .getModelElement().getScriptProject().getProject());

-        for (IFolder folder : descriptorFolders) {

-          try {

-            engines.addAll(collectEngines(folder, ""));

-          } catch (CoreException e) {

-          }

-        }

-      }

-      for (String string : engines) {

-        if (match(complString, string)) {

-          addProposal(complString, string, CompletionProposal.PACKAGE_REF);

-        }

-      }

-    } else {

-      List<String> tss = new ArrayList<String>();

-      Resource[] resources = getFilesInClasspath(complString, "xml");

-      for (Resource resource : resources) {

-        try {

-          UIMAFramework.getXMLParser().parseTypeSystemDescription(

-                  new XMLInputSource(resource.getURL()));

-          String string = getScriptRepresentation(resource, "xml");

-          if (string != null) {

-            tss.add(string);

-          }

-        } catch (Exception e) {

-          // do not report the exceptions

-        }

-      }

-      if (StringUtils.isAllUpperCase(complString)) {

-        // fallback for camel case

-        List<IFolder> descriptorFolders = RutaProjectUtils.getAllDescriptorFolders(sourceModule

-                .getModelElement().getScriptProject().getProject());

-        for (IFolder folder : descriptorFolders) {

-          try {

-            tss.addAll(collectTypeSystems(folder, ""));

-          } catch (CoreException e) {

-          }

-        }

-      }

-      for (String string : tss) {

-        if (match(complString, string)) {

-          addProposal(complString, string, CompletionProposal.PACKAGE_REF);

-        }

-      }

-    }

-  }

-

-  private Resource[] getFilesInClasspath(String prefix, String extension) throws IOException {

-    String pack = prefix.replaceAll("[.]", "/");

-    if (pack.endsWith("/")) {

-      pack = pack.substring(0, pack.length() - 1);

-    }

-    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(

-            classloader);

-    String p = "classpath*:";

-    String suffix = "/**/*." + extension;

-    String pattern = p + pack + suffix;

-    Resource[] resources = resolver.getResources(pattern);

-    return resources;

-  }

-

-  private String getScriptRepresentation(Resource resource, String suffix) throws IOException {

-    URL url = resource.getURL();

-    URL[] urLs = classloader.getURLs();

-    String externalForm = url.toExternalForm();

-    for (URL each : urLs) {

-      String eachExternalForm = each.toExternalForm();

-      if (externalForm.startsWith("jar:")) {

-        eachExternalForm = "jar:" + eachExternalForm + "!/";

-      }

-      if (externalForm.startsWith(eachExternalForm)) {

-        String name = externalForm.substring(eachExternalForm.length(), externalForm.length()

-                - (suffix.length() + 1));

-        name = name.replaceAll("[/]", ".");

-        return name;

-      }

-    }

-    return null;

-  }

-

-  private List<String> collectEngines(IFolder folder, String prefix) throws CoreException {

-    List<String> result = new ArrayList<String>();

-    IResource[] members = folder.members();

-    for (IResource iResource : members) {

-      if (iResource instanceof IFolder) {

-        IFolder folder2 = (IFolder) iResource;

-        String newPrefix = prefix + folder2.getProjectRelativePath().lastSegment() + ".";

-        result.addAll(collectEngines(folder2, newPrefix));

-      } else if (iResource instanceof IFile) {

-        IFile file = (IFile) iResource;

-        if (file.getFileExtension().equals("xml")) {

-          File f = new File(file.getLocation().toPortableString());

-          if (f.exists()) {

-            try {

-              UIMAFramework.getXMLParser().parseAnalysisEngineDescription(new XMLInputSource(f));

-              result.add(prefix + file.getName().substring(0, file.getName().length() - 4));

-            } catch (Exception e) {

-            }

-          }

-        }

-      }

-    }

-    return result;

-  }

-

-  private List<String> collectTypeSystems(IFolder folder, String prefix) throws CoreException {

-    List<String> result = new ArrayList<String>();

-    IResource[] members = folder.members();

-    for (IResource iResource : members) {

-      if (iResource instanceof IFolder) {

-        IFolder folder2 = (IFolder) iResource;

-        String newPrefix = prefix + folder2.getProjectRelativePath().lastSegment() + ".";

-        result.addAll(collectTypeSystems(folder2, newPrefix));

-      } else if (iResource instanceof IFile) {

-        IFile file = (IFile) iResource;

-        String fileExtension = file.getFileExtension();

-        if (fileExtension != null && fileExtension.equals("xml")) {

-          File f = new File(file.getLocation().toPortableString());

-          if (f.exists()) {

-            try {

-              UIMAFramework.getXMLParser().parseTypeSystemDescription(new XMLInputSource(f));

-              result.add(prefix + file.getName().substring(0, file.getName().length() - 4));

-            } catch (Exception e) {

-            }

-          }

-        }

-      }

-    }

-    return result;

-  }

-

-  private List<String> collectScripts(IFolder folder, String prefix) throws CoreException {

-    List<String> result = new ArrayList<String>();

-    IResource[] members = folder.members();

-    for (IResource iResource : members) {

-      if (iResource instanceof IFolder) {

-        IFolder folder2 = (IFolder) iResource;

-        String newPrefix = prefix + folder2.getProjectRelativePath().lastSegment() + ".";

-        result.addAll(collectScripts(folder2, newPrefix));

-      } else if (iResource instanceof IFile) {

-        IFile file = (IFile) iResource;

-        if (file.getFileExtension().equals("ruta")) {

-          result.add(prefix + file.getName().substring(0, file.getName().length() - 5));

-        }

-      }

-    }

-    return result;

-  }

-

-  private void doCompletionOnDeclaration(IModuleSource cu, String startPart) {

-    String[] keywords = RutaKeywordsManager.getKeywords(IRutaKeywords.DECLARATION);

-    for (String string : keywords) {

-      if (match(startPart, string)) {

-        addProposal(startPart, string, CompletionProposal.KEYWORD);

-      }

-    }

-  }

-

-

-  private Set<String> getTypes(IPath typeSystemDescriptorPath) throws InvalidXMLException,

-          IOException {

-    Set<String> types = new HashSet<String>();

-    URL url = URIUtil.toURI(typeSystemDescriptorPath.toPortableString()).toURL();

-    try {

-      ResourceManager resMgr = new ResourceManager_impl(classloader);

-      types = getTypes(url, resMgr);

-    } catch (MalformedURLException e) {

-      e.printStackTrace();

-    }

-    return types;

-  }

-

-  private Set<String> getTypes(URL resource, ResourceManager resMgr) throws IOException,

-          InvalidXMLException {

-    Set<String> types = new HashSet<String>();

-    TypeSystemDescription typeSysDescr = null;

-    typeSysDescr = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-            new XMLInputSource(resource));

-    typeSysDescr.resolveImports(resMgr);

-    for (TypeDescription each : typeSysDescr.getTypes()) {

-      String name = each.getName();

-      String[] nameSpace = name.split("[.]");

-      types.add(nameSpace[nameSpace.length - 1]);

-      types.add(name);

-    }

-    return types;

-  }

-

-  private IFile getFile(IFolder folder, String filePath) {

-    int lastDot = filePath.lastIndexOf('.');

-    int sndLastDot = filePath.lastIndexOf('.', lastDot - 1);

-    String fName = filePath;

-    if (sndLastDot >= 0) {

-      String subFolder = filePath.substring(0, sndLastDot);

-      folder = folder.getFolder(subFolder);

-      fName = filePath.substring(sndLastDot + 1);

-    }

-    return folder.getFile(fName);

-  }

-

-  private void doCompletionOnAction(IModuleSource cu, RutaModuleDeclaration parsed,

-          String startPart, int type, String complString) {

-    String[] keywords = RutaKeywordsManager.getKeywords(IRutaKeywords.ACTION);

-    for (String string : keywords) {

-      if (match(complString, string)) {

-        addProposal(complString, string + "()", string, CompletionProposal.METHOD_NAME_REFERENCE);

-      }

-    }

-  }

-

-  private void doCompletionOnCondition(IModuleSource cu, RutaModuleDeclaration parsed,

-          String startPart, int type, String complString) {

-    if (complString.startsWith("-")) {

-      complString = complString.substring(1, complString.length());

-    }

-    String[] keywords = RutaKeywordsManager.getKeywords(IRutaKeywords.CONDITION);

-    for (String string : keywords) {

-      if (match(complString, string)) {

-        addProposal(complString, string + "()", string, CompletionProposal.METHOD_NAME_REFERENCE);

-      }

-    }

-  }

-

-  private void doCompletionOnVarRef(IModuleSource cu, RutaModuleDeclaration parsed,

-          String startPart, int type, String complString) {

-    Collection<String> types = new HashSet<String>();

-    if (type == RutaTypeConstants.RUTA_TYPE_AT) {

-      try {

-        IPath path = sourceModule.getModelElement().getResource().getLocation();

-        IPath typeSystemDescriptorPath = RutaProjectUtils.getTypeSystemDescriptorPath(path, sourceModule.getModelElement().getScriptProject().getProject());

-        types = getTypes(typeSystemDescriptorPath);

-      } catch (Exception e) {

-      }

-      for (String string : types) {

-        if (match(startPart, string)) {

-          addProposal(startPart, string, CompletionProposal.TYPE_REF);

-        }

-      }

-    } else {

-      IModelElement modelElement = sourceModule.getModelElement();

-      if (modelElement instanceof SourceModule) {

-        SourceModule sm = (SourceModule) modelElement;

-        try {

-          IField[] fields = sm.getFields();

-          for (IField iField : fields) {

-            SourceField f = (SourceField) iField;

-            int fieldType = RutaParseUtils.getTypeOfIModelElement(f);

-            if (RutaTypeConstants.RUTA_TYPE_N == type) {

-              if (fieldType == RutaTypeConstants.RUTA_TYPE_N

-                      || fieldType == RutaTypeConstants.RUTA_TYPE_I

-                      || fieldType == RutaTypeConstants.RUTA_TYPE_D

-                      || fieldType == RutaTypeConstants.RUTA_TYPE_F) {

-                addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);

-              }

-            } else if (type == fieldType) {

-              addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);

-            }

-

-          }

-        } catch (ModelException e) {

-        }

-

-      }

-    }

-  }

-

-  private boolean match(String complString, String string) {

-    return string.toLowerCase().startsWith(complString.toLowerCase())

-            || removeLowerCase(string).startsWith(complString);

-  }

-

-  private void collectFields(SourceMethod sm, List<IField> fields) throws ModelException {

-    IModelElement[] children = sm.getChildren();

-    for (IModelElement me : children) {

-      if (me instanceof SourceMethod) {

-        collectFields((SourceMethod) me, fields);

-      } else if (me instanceof SourceField) {

-        fields.add((IField) me);

-      }

-    }

-  }

-

-  private void collectBlocks(SourceMethod sm, List<IMethod> blocks) throws ModelException {

-    blocks.add(sm);

-    IModelElement[] children = sm.getChildren();

-    for (IModelElement me : children) {

-      if (me instanceof SourceMethod) {

-        collectBlocks((SourceMethod) me, blocks);

-      }

-    }

-  }

-

-  private String removeLowerCase(String string) {

-    String replaceAll = string.replaceAll("\\p{Lower}|[.]", "");

-    return replaceAll;

-  }

-

-  @SuppressWarnings({ "unchecked" })

-  private void doCompletionOnEmptyStatement(IModuleSource cu, int position, int i) {

-    int kind = CompletionProposal.LOCAL_VARIABLE_REF;

-    if (!super.requestor.isIgnored(kind)) {

-      suggestFields(cu);

-    }

-  }

-

-  /**

-   * @param cu

-   */

-  private void suggestFields(IModuleSource cu) {

-    // try {

-    // if (cu != null) {

-    // IField[] fieldsArray = sourceModule.getFields();

-    // for (IField field : fieldsArray) {

-    // int relevance = RelevanceConstants.R_EXACT_EXPECTED_TYPE;

-    // // accept result

-    // super.noProposal = false;

-    // int kind = CompletionProposal.LOCAL_VARIABLE_REF;

-    // if (!super.requestor.isIgnored(kind)) {

-    // CompletionProposal proposal = super.createProposal(kind, actualCompletionPosition);

-    // proposal.setRelevance(relevance);

-    // proposal.setModelElement(field);

-    // proposal.setName(field.getElementName());

-    // proposal.setCompletion(field.getElementName());

-    // proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition

-    // - this.offset);

-    // try {

-    // proposal.setFlags(field.getFlags());

-    // } catch (ModelException e) {

-    // }

-    // this.requestor.accept(proposal);

-    // if (DEBUG) {

-    // this.printDebug(proposal);

-    // }

-    // }

-    // }

-    // }

-    // } catch (ModelException e) {

-    // }

-  }

-

-  /**

-   * @param complString

-   * @param names

-   * @param field

-   */

-  private void addProposal(String complString, List names, IField field) {

-    char[] fieldName = field.getElementName().toCharArray();

-    char[] complFragment = complString.toCharArray();

-

-    if (CharOperation.camelCaseMatch(complString.toCharArray(), fieldName)

-            || match(complString, field.getElementName())) {

-

-      int relevance = RelevanceConstants.R_DEFAULT + 1;

-      relevance += computeRelevanceForCaseMatching(complFragment, field.getElementName());

-

-      // accept result

-      super.noProposal = false;

-      int kind = CompletionProposal.LOCAL_VARIABLE_REF;

-      if (!super.requestor.isIgnored(kind)) {

-        CompletionProposal proposal = super.createProposal(kind, actualCompletionPosition);

-        proposal.setRelevance(relevance);

-        proposal.setModelElement(field);

-        proposal.setName(field.getElementName());

-        proposal.setCompletion(field.getElementName());

-        proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);

-        try {

-          proposal.setFlags(field.getFlags());

-        } catch (ModelException e) {

-        }

-        this.requestor.accept(proposal);

-        if (DEBUG) {

-          this.printDebug(proposal);

-        }

-      }

-    }

-  }

-

-  private void addProposal(String complString, String string, int kind) {

-    addProposal(complString, string, string, kind);

-  }

-

-  private void addProposal(String complString, String string, String name, int kind) {

-    char[] fieldName = string.toCharArray();

-    char[] complFragment = complString.toCharArray();

-

-    char[] pattern = null;

-    if (complString.length() > 0) {

-      pattern = complString.toCharArray();

-    }

-    if (CharOperation.camelCaseMatch(pattern, fieldName) || match(complString, string)) {

-

-      int relevance = RelevanceConstants.R_DEFAULT + 1;

-      relevance += computeRelevanceForCaseMatching(complFragment, string);

-

-      // accept result

-      super.noProposal = false;

-      if (!super.requestor.isIgnored(kind)) {

-        CompletionProposal proposal = super.createProposal(kind, actualCompletionPosition);

-        proposal.setRelevance(relevance);

-        proposal.setName(name);

-        proposal.setCompletion(string);

-        proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);

-        // try {

-        // proposal.setFlags(field.getFlags());

-        // } catch (ModelException e) {

-        // }

-        this.requestor.accept(proposal);

-        if (DEBUG) {

-          this.printDebug(proposal);

-        }

-      }

-    }

-  }

-

-  private void doCompletionOnKeyword(int position, int pos, String startPart) {

-    List<String> keywords = new ArrayList<String>();

-    for (int i = 0; i < IRutaKeywords.END_INDEX; i++) {

-      keywords.addAll(Arrays.asList(RutaKeywordsManager.getKeywords(i)));

-    }

-    char[][] keyWordsArray = new char[keywords.size()][];

-    for (int a = 0; a < keywords.size(); a++) {

-      keyWordsArray[a] = keywords.get(a).toCharArray();

-    }

-    findKeywords(startPart.toCharArray(), keywords.toArray(new String[0]), true);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaCompletionParser.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaCompletionParser.java
deleted file mode 100644
index fe85fb1..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaCompletionParser.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.core.extensions.ICompletionExtension;

-import org.apache.uima.ruta.ide.core.parser.RutaParseUtils;

-import org.apache.uima.ruta.ide.parser.ast.RutaStatement;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.declarations.TypeDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.ast.statements.Block;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.codeassist.complete.CompletionNodeFound;

-import org.eclipse.dltk.compiler.env.IModuleSource;

-

-public class RutaCompletionParser extends RutaAssistParser {

-  private static class RutaEmptyCompleteStatement extends RutaStatement {

-    public RutaEmptyCompleteStatement(List expressions) {

-      super(expressions);

-    }

-  }

-

-  private ICompletionExtension[] extensions;

-

-  public RutaCompletionParser(ICompletionExtension[] extensions) {

-    this.extensions = extensions;

-  }

-

-  /**

-   * Called then element could not be found.

-   */

-  public void handleNotInElement(ASTNode node, int position) {

-    if (node != null && node.sourceStart() <= position && position <= node.sourceEnd()) {

-      // this is empty module case

-      if (node instanceof ModuleDeclaration) {

-        ModuleDeclaration unit = (ModuleDeclaration) node;

-        List exprs = new ArrayList();

-        exprs.add(new SimpleReference(position, position, ""));

-        RutaEmptyCompleteStatement statement = new RutaEmptyCompleteStatement(exprs);

-        unit.addStatement(statement);

-        this.parseBlockStatements(statement, unit, position);

-      } else if (node instanceof MethodDeclaration) {

-        // empty keyword like completion.

-        MethodDeclaration method = (MethodDeclaration) node;

-        List exprs = new ArrayList();

-        exprs.add(new SimpleReference(position, position, ""));

-        RutaEmptyCompleteStatement statement = new RutaEmptyCompleteStatement(exprs);

-        method.getStatements().add(statement);

-        this.parseBlockStatements(statement, method, position);

-      } else if (node instanceof TypeDeclaration) {

-        // empty keyword like completion.

-        TypeDeclaration type = (TypeDeclaration) node;

-        List exprs = new ArrayList();

-        exprs.add(new SimpleReference(position, position, ""));

-        RutaEmptyCompleteStatement statement = new RutaEmptyCompleteStatement(exprs);

-        type.getStatements().add(statement);

-        // this.assistNodeParent = node;

-        this.parseBlockStatements(statement, type, position);

-        // } else if (node instanceof RutaExecuteExpression) {

-        // // empty keyword like completion.

-        // List exprs = new ArrayList();

-        // exprs.add(new SimpleReference(position, position, ""));

-        // RutaEmptyCompleteStatement statement = new

-        // RutaEmptyCompleteStatement(

-        // exprs);

-        // this.parseBlockStatements(statement, node, position);

-      }

-    }

-  }

-

-  /*

-   * (non-Javadoc)

-   * 

-   * @see

-   * org.eclipse.dltk.codeassist.IAssistParser#parseBlockStatements(org.eclipse.dltk.ast.ASTNode,

-   * org.eclipse.dltk.ast.ASTNode, int)

-   */

-  public void parseBlockStatements(ASTNode node, ASTNode inNode, int position) {

-    // if (node instanceof RutaStatement) {

-    // RutaStatement statement = (RutaStatement) node;

-    // List expressions = statement.getExpressions();

-    // int len = expressions.size();

-    // boolean first = false;

-    // String completionToken = null;

-    // ASTNode completionNode = null;

-    // for (int i = 0; i < len; ++i) {

-    // ASTNode n = (ASTNode) expressions.get(i);

-    // if (n.sourceStart() <= position && n.sourceEnd() >= position

-    // || (node instanceof RutaEmptyCompleteStatement)) {

-    // if (i == 0) {

-    // first = true;

-    // }

-    // completionNode = n;

-    // }

-    // }

-    // if (completionNode == null) {

-    // // TODO: Add inner completion here.

-    // if (len > 0) {

-    // // ASTNode firstNode = (ASTNode) expressions.get(0);

-    // // if (position > firstNode.sourceEnd()) {

-    // // // This could be variable completion.

-    // // boolean provideDollar =

-    // // !checkVariableWithoutDollarCompletion(

-    // // statement, position);

-    // // this.assistNodeParent = inNode;

-    // // SimpleReference ref = new SimpleReference(position,

-    // // position, "");

-    // // ASTNode nde = new CompletionOnVariable("", ref, node,

-    // // inNode, true, provideDollar);

-    // // throw new CompletionNodeFound(nde, null);

-    // // }

-    // String[] keywords = checkKeywords(completionToken, MODULE);

-    // ASTNode nde = new CompletionOnKeywordArgumentOrFunctionArgument("",

-    // (RutaStatement) node, keywords, position);

-    // this.assistNodeParent = inNode;

-    // throw new CompletionNodeFound(nde, null/* ((TypeDeclaration)inNode).scope */);

-    //

-    // } else {

-    // completionToken = "";

-    // }

-    // } else if (completionNode instanceof SimpleReference) {

-    // int maxLen = position - completionNode.sourceStart();

-    // completionToken = ((SimpleReference) completionNode).getName();

-    // // We need to cut some sumbols if node is begger then position.

-    // if (completionToken.length() > maxLen && maxLen > 0) {

-    // completionToken = completionToken.substring(0, maxLen);

-    // }

-    // } /*

-    // * else if (completionNode instanceof RutaBlockExpression) { RutaBlockExpression

-    // * block = (RutaBlockExpression) completionNode;

-    // *

-    // * List s = block.parseBlock(); if (s != null) { int slen = s.size(); for (int u = 0; u <

-    // * slen; ++u) { ASTNode n = (ASTNode) s.get(u); n.setStart(n.sourceStart() -

-    // * block.sourceStart()); n.setEnd(n.sourceEnd() - block.sourceStart());

-    // * RutaASTUtil.extendStatement(n, block.getBlock()); n.setStart(n.sourceStart() +

-    // * block.sourceStart()); n.setEnd(n.sourceEnd() + block.sourceStart()); if (n != null &&

-    // * n.sourceStart() <= position && n.sourceEnd() >= position) { parseBlockStatements(n,

-    // * inNode, position); } } } handleNotInElement(inNode, position); }

-    // */

-    // if (completionNode instanceof StringLiteral) {

-    // int maxLen = position - completionNode.sourceStart();

-    // int pos = maxLen;

-    // SimpleReference tok = RutaParseUtils.extractVariableFromString(

-    // (StringLiteral) completionNode, pos);

-    // if (tok != null) {

-    // this.assistNodeParent = inNode;

-    // ASTNode nde = new CompletionOnVariable(tok.getName(), tok, node, inNode, false);

-    // throw new CompletionNodeFound(nde, null);

-    // } else {

-    // this.assistNodeParent = inNode;

-    // SimpleReference ref = new SimpleReference(position, position, "");

-    // ASTNode nde = new CompletionOnVariable("", ref, node, inNode, true);

-    // throw new CompletionNodeFound(nde, null);

-    // }

-    // }

-    // // if (completionNode instanceof RutaExecuteExpression) {

-    // // RutaExecuteExpression expr = (RutaExecuteExpression)

-    // // completionNode;

-    // // List exprs = expr.parseExpression();

-    // // for (int i = 0; i < exprs.size(); ++i) {

-    // // ASTNode n = (ASTNode) exprs.get(i);

-    // // if (n.sourceStart() <= position

-    // // && n.sourceEnd() >= position) {

-    // // parseBlockStatements(n, expr, position);

-    // // }

-    // // }

-    // // handleNotInElement(expr, position);

-    // // }

-    // if (completionToken != null && completionToken.startsWith("$")) {

-    // // Argument name completion...

-    // this.assistNodeParent = inNode;

-    // ASTNode nde = new CompletionOnVariable(completionToken, completionNode, node, inNode, false);

-    // throw new CompletionNodeFound(nde, null);

-    // } else {

-    // // This is keyword or function completion.

-    // if (inNode instanceof ModuleDeclaration && completionNode != null && first) {

-    // String[] keywords = checkKeywords(completionToken, MODULE);

-    // ASTNode nde = new CompletionOnKeywordOrFunction(completionToken, completionNode, node,

-    // keywords);

-    // this.assistNodeParent = inNode;

-    // throw new CompletionNodeFound(nde, ((ModuleDeclaration) inNode).scope);

-    // } else if (inNode instanceof MethodDeclaration && completionNode != null && first) {

-    // String[] keywords = checkKeywords(completionToken, FUNCTION);

-    // ASTNode nde = new CompletionOnKeywordOrFunction(completionToken, completionNode, node,

-    // keywords);

-    // this.assistNodeParent = inNode;

-    // throw new CompletionNodeFound(nde, ((MethodDeclaration) inNode).scope);

-    // } else if (inNode instanceof TypeDeclaration && completionNode != null && first) {

-    // String[] keywords = checkKeywords(completionToken, NAMESPACE);

-    // ASTNode nde = new CompletionOnKeywordOrFunction(completionToken, completionNode, node,

-    // keywords);

-    // this.assistNodeParent = inNode;

-    // throw new CompletionNodeFound(nde, null/* ((TypeDeclaration)inNode).scope */);

-    // // } else if (inNode instanceof RutaExecuteExpression

-    // // && completionNode != null && first) {

-    // // String[] keywords = checkKeywords(completionToken,

-    // // EXEC_EXPRESSION);

-    // // ASTNode nde = new CompletionOnKeywordOrFunction(

-    // // completionToken, completionNode, node, keywords);

-    // // this.assistNodeParent = inNode;

-    // // throw new CompletionNodeFound(nde, null/*

-    // // ((TypeDeclaration)inNode).scope */);

-    // } else {

-    // if (completionNode != null) {

-    // String[] keywords = checkKeywords(completionToken, MODULE);

-    //

-    // ASTNode nde = new CompletionOnKeywordArgumentOrFunctionArgument(completionToken,

-    // completionNode, (RutaStatement) node, keywords);

-    // this.assistNodeParent = inNode;

-    // throw new CompletionNodeFound(nde, null/* ((TypeDeclaration)inNode).scope */);

-    // } else {

-    // String[] keywords = checkKeywords(completionToken, MODULE);

-    // if (completionToken == null) {

-    // completionToken = "";

-    // }

-    // ASTNode nde = new CompletionOnKeywordArgumentOrFunctionArgument(completionToken,

-    // (RutaStatement) node, keywords, position);

-    // this.assistNodeParent = inNode;

-    // throw new CompletionNodeFound(nde, null/* ((TypeDeclaration)inNode).scope */);

-    // }

-    // }

-    // }

-    // // if (checkVariableWithoutDollarCompletion(statement, position)

-    // // && completionToken != null) {

-    // // this.assistNodeParent = inNode;

-    // // SimpleReference ref = new SimpleReference(completionNode

-    // // .sourceStart(), completionNode.sourceEnd(),

-    // // completionToken);

-    // // ASTNode nde = new CompletionOnVariable(completionToken, ref,

-    // // node, inNode, true);

-    // // throw new CompletionNodeFound(nde, null);

-    // // }

-    //

-    // } else if (node instanceof MethodDeclaration) {

-    // MethodDeclaration method = (MethodDeclaration) node;

-    // List statements = method.getStatements();

-    // boolean inStatement = false;

-    // if (statements != null) {

-    // int length = statements.size();

-    // for (int i = 0; i < length; i++) {

-    // ASTNode nde = (ASTNode) statements.get(i);

-    // if (nde.sourceStart() <= position && nde.sourceEnd() >= position) {

-    // inStatement = true;

-    // parseBlockStatements(nde, method, position);

-    // }

-    // }

-    // }

-    // if (!inStatement) {

-    // this.handleNotInElement(method, position);

-    // }

-    // } else {

-    // visitElements(node, position);

-    // }

-  }

-

-  public class CompletionVisitor extends ASTVisitor {

-    protected int position;

-

-    protected ModuleDeclaration module;

-

-    public CompletionVisitor(int position, ModuleDeclaration module) {

-      this.position = position;

-      this.module = module;

-    }

-

-    @Override

-    public boolean visit(Statement s) throws Exception {

-      // if (s.sourceStart() <= position && s.sourceEnd() >= position) {

-      // for (int i = 0; i < extensions.length; i++) {

-      // extensions[i].visit(s, RutaCompletionParser.this,

-      // position);

-      // }

-      // if (s instanceof RutaStatement) {

-      // ASTNode inNode = RutaParseUtil.getScopeParent(module, s);

-      // RutaCompletionParser.this.parseBlockStatements(s, inNode,

-      // position);

-      // }

-      // if (s instanceof RutaPackageDeclaration) {

-      // RutaPackageDeclaration decl =

-      // (RutaPackageDeclaration) s;

-      // if (decl.getNameStart() <= position

-      // && position <= decl.getNameEnd()) {

-      // ASTNode inNode = RutaParseUtil.getScopeParent(module, s);

-      // assistNodeParent = inNode;

-      // throw new CompletionNodeFound(decl, null/*

-      // ((TypeDeclaration)inNode).scope */);

-      // }

-      // }

-      // }

-      return super.visit(s);

-    }

-

-    @Override

-    public boolean visit(Expression s) throws Exception {

-      if (s.sourceStart() <= position && s.sourceEnd() >= position) {

-        for (int i = 0; i < extensions.length; i++) {

-          extensions[i].visit(s, RutaCompletionParser.this, position);

-        }

-      }

-      return super.visit(s);

-    }

-

-    @Override

-    public boolean endvisit(Expression s) throws Exception {

-      if (s instanceof Block && s.sourceStart() <= position && s.sourceEnd() >= position) {

-        // We are in block, and no in node completion are done.

-        String[] keywords = checkKeywords("", MODULE);

-        ASTNode inNode = RutaParseUtils.getScopeParent(module, s);

-        ASTNode nde = new CompletionOnKeywordOrFunction("", inNode, s, keywords);

-        assistNodeParent = inNode;

-        throw new CompletionNodeFound(nde, null);

-      }

-      return super.endvisit(s);

-    }

-  };

-

-  protected CompletionVisitor createCompletionVisitor(int position) {

-    return new CompletionVisitor(position, this.getModule());

-  }

-

-  private void visitElements(ASTNode node, int position) {

-    if (!(node instanceof RutaStatement)) {

-      CompletionVisitor visitor = createCompletionVisitor(position);

-      try {

-        node.traverse(visitor);

-      } catch (CompletionNodeFound e) {

-        throw e;

-      } catch (Exception e) {

-        e.printStackTrace();

-      }

-    }

-  }

-

-  private boolean checkVariableWithoutDollarCompletion(RutaStatement statement, int position) {

-    // TODO: Add more compecated check.

-    Expression e = statement.getAt(0);

-    if (e instanceof SimpleReference) {

-      SimpleReference ref = (SimpleReference) e;

-      String name = ref.getName();

-      if (name.equals("set")) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  public String[] checkKeywords(String completionToken, int type) {

-    // String[] keywords = RutaKeywordsManager.getKeywords(type);

-    // // TODO: Possible require cases.

-    // if (type == MODULE || type == FUNCTION || type == NAMESPACE

-    // || type == EXEC_EXPRESSION) {

-    // // Suppose we can handle all keywords.

-    // String[] kw = new String[keywords.length];

-    // for (int i = 0; i < keywords.length; ++i) {

-    // kw[i] = keywords[i];

-    // }

-    // return kw;

-    // }

-    return null;

-  }

-

-  public void setAssistNodeParent(ASTNode prevParent) {

-    this.assistNodeParent = prevParent;

-  }

-

-  public ModuleDeclaration parse(IModuleSource sourceModule) {

-    ModuleDeclaration module = (ModuleDeclaration) this.parser.parse(sourceModule, null);

-    module.rebuild();

-    return module;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaModelElementView.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaModelElementView.java
deleted file mode 100644
index 5d98192..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaModelElementView.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-public interface RutaModelElementView {

-

-  void setModelElement(Object element);

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaReferenceDeclarationVisitor.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaReferenceDeclarationVisitor.java
deleted file mode 100644
index 461d990..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaReferenceDeclarationVisitor.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.ruta.ide.core.codeassist;
-
-import org.apache.uima.ruta.ide.parser.ast.RutaDeclarationsStatement;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.declarations.FieldDeclaration;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.ast.statements.Statement;
-
-public class RutaReferenceDeclarationVisitor extends ASTVisitor {
-  private ASTNode result = null;
-
-  private int start = 0;
-
-  public RutaReferenceDeclarationVisitor(int start) {
-    this.start = start;
-  }
-
-  @Override
-  public boolean visitGeneral(ASTNode node) throws Exception {
-    if (node.sourceStart() <= start && start <= node.sourceEnd()) {
-      return true;
-    }
-    return false;
-  }
-
-  @Override
-  public boolean visit(Statement s) throws Exception {
-    if (s instanceof RutaDeclarationsStatement || s instanceof FieldDeclaration) {
-      return true && super.visit(s);
-    }
-    return false;
-  }
-
-  @Override
-  public boolean visit(Expression s) throws Exception {
-    if (s instanceof RutaVariableReference) {
-      result = s;
-    }
-    return super.visit(s);
-  }
-
-  public ASTNode getResult() {
-    return result;
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaReferenceVisitor.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaReferenceVisitor.java
deleted file mode 100644
index 0cefa97..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaReferenceVisitor.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.ruta.ide.core.codeassist;
-
-import org.apache.uima.ruta.ide.parser.ast.ComponentDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.ComponentReference;
-import org.apache.uima.ruta.ide.parser.ast.RutaAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;
-import org.apache.uima.ruta.ide.parser.ast.RutaExpression;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaReferenceVisitor extends ASTVisitor {
-  private ASTNode result = null;
-
-  private int start = 0;
-
-  public RutaReferenceVisitor(int start) {
-    this.start = start;
-  }
-
-  @Override
-  public boolean visitGeneral(ASTNode node) throws Exception {
-    if (result == null && node.sourceStart() <= start && start <= node.sourceEnd()) {
-      return true;
-    }
-    return false;
-  }
-
-  @Override
-  public boolean visit(Expression s) throws Exception {
-    if (result != null) {
-      return false;
-    }
-    int sourceStart = s.sourceStart();
-    int sourceEnd = s.sourceEnd();
-    if ((s instanceof RutaVariableReference || s instanceof ComponentDeclaration || s instanceof ComponentReference)
-            && sourceStart <= start && sourceEnd >= start) {
-      result = s;
-    } else if (s instanceof RutaAction && ((RutaAction) s).getNameStart() <= start
-            && start <= ((RutaAction) s).getNameEnd()) {
-      result = s;
-    } else if (s instanceof RutaAction && ((RutaAction) s).getNameStart() - 1 == start
-            && start == ((RutaAction) s).getNameEnd() - 1) {
-      result = s;
-    } else if (s instanceof RutaCondition && ((RutaCondition) s).getNameStart() <= start
-            && start <= ((RutaCondition) s).getNameEnd()) {
-      result = s;
-    } else if (s instanceof RutaCondition && ((RutaCondition) s).getNameStart() - 1 == start
-            && start == ((RutaCondition) s).getNameEnd() - 1) {
-      result = s;
-    } else if (s instanceof RutaExpression && s.sourceStart() == start && s.sourceEnd() == start) {
-      result = s;
-    }
-    return super.visit(s);
-  }
-
-  public ASTNode getResult() {
-    return result;
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaResolver.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaResolver.java
deleted file mode 100644
index 33b88eb..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaResolver.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.uima.ruta.ide.core.parser.RutaParseUtils;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.Modifiers;

-import org.eclipse.dltk.ast.declarations.FieldDeclaration;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.declarations.TypeDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.statements.Block;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IField;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.IParent;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.IType;

-import org.eclipse.dltk.core.ModelException;

-

-public class RutaResolver {

-  private IResolveElementParent resolver;

-

-  private ModuleDeclaration moduleDeclaration;

-

-  private ISourceModule sourceModule;

-

-  public RutaResolver(ISourceModule sourceModule, ModuleDeclaration moduleDeclaration,

-          IResolveElementParent resolver) {

-    this(sourceModule, moduleDeclaration);

-    this.resolver = resolver;

-  }

-

-  public RutaResolver(ISourceModule sourceModule, ModuleDeclaration moduleDeclaration) {

-    this.sourceModule = sourceModule;

-    this.moduleDeclaration = moduleDeclaration;

-  }

-

-  public IModelElement findModelElementFrom(ASTNode node) {

-    List statements = moduleDeclaration.getStatements();

-    List elements = new ArrayList();

-    searchAddElementsTo(statements, node, sourceModule, elements);

-    if (elements.size() == 1) {

-      return (IModelElement) elements.get(0);

-    }

-    return null;

-  }

-

-  public interface IResolveElementParent {

-    IModelElement findElementParent(ASTNode node, String name, IParent parent);

-  }

-

-  public void searchAddElementsTo(List statements, final ASTNode node, IParent element,

-          List selectionElements) {

-    if (statements == null || element == null) {

-      return;

-    }

-    Iterator i = statements.iterator();

-    while (i.hasNext()) {

-      ASTNode nde = (ASTNode) i.next();

-      if (nde.equals(node)) {

-        if (node instanceof MethodDeclaration) {

-          String oName = ((MethodDeclaration) node).getName();

-          if (oName.indexOf("::") != -1) {

-            String pName = oName.substring(0, oName.lastIndexOf("::"));

-            pName = pName.replaceAll("::", "\\$");

-

-            if (pName.startsWith("$")) {

-              if (pName.equals("$")) {

-                element = sourceModule;

-              } else {

-                try {

-                  element = findTypeFrom(sourceModule.getChildren(), "", pName, '$');

-                } catch (ModelException e) {

-                  if (DLTKCore.DEBUG) {

-                    e.printStackTrace();

-                  }

-                }

-              }

-            } else {

-              pName = "$" + pName;

-              try {

-                element = findTypeFrom(element.getChildren(), "", pName, '$');

-                if (element == null) {

-                  return;

-                }

-              } catch (ModelException e) {

-                e.printStackTrace();

-                return;

-              }

-            }

-          }

-        }

-        String nodeName = getNodeChildName(node);

-        if (nodeName != null) {

-          IModelElement e = null;

-          if (nodeName.startsWith("::")) {

-            nodeName = nodeName.substring(2);

-            e = findChildrenByName(nodeName, sourceModule);

-          } else {

-            e = findChildrenByName(nodeName, element);

-          }

-          if (e == null && resolver != null) {

-            e = resolver.findElementParent(node, nodeName, element);

-

-          }

-          if (e != null) {

-            List toRemove = new ArrayList();

-            for (int k = 0; k < selectionElements.size(); ++k) {

-              IModelElement ke = (IModelElement) selectionElements.get(k);

-              String keName = ke.getElementName();

-              if (keName.equals(nodeName)) {

-                toRemove.add(ke);

-              }

-            }

-            for (int k = 0; k < toRemove.size(); ++k) {

-              selectionElements.remove(toRemove.get(k));

-            }

-            selectionElements.add(e);

-          }

-        }

-        return;

-      }

-      if (nde.sourceStart() <= node.sourceStart() && node.sourceEnd() <= nde.sourceEnd()) {

-        if (element instanceof IParent) {

-          if (nde instanceof TypeDeclaration) {

-            TypeDeclaration type = (TypeDeclaration) nde;

-            String typeName = getNodeChildName(type);

-            IModelElement e = findChildrenByName(typeName, element);

-            if (e == null && type.getName().startsWith("::")) {

-              try {

-                e = (IModelElement) findTypeFrom(sourceModule.getChildren(), "", type.getName()

-                        .replaceAll("::", "\\$"), '$');

-              } catch (ModelException e1) {

-                // TODO Auto-generated catch block

-                e1.printStackTrace();

-              }

-            }

-            if (e instanceof IParent) {

-              // was: if (e != null || e instanceof IParent)

-              List stats = ((TypeDeclaration) nde).getStatements();

-              searchAddElementsTo(stats, node, (IParent) e, selectionElements);

-            }

-          } else if (nde instanceof MethodDeclaration) {

-            searchInMethod(node, element, nde, selectionElements);

-          } /*

-             * else if (nde instanceof RutaStatement) { RutaStatement s = (RutaStatement) nde;

-             * Expression commandId = s.getAt(0); final IParent e = element; if (commandId != null

-             * && commandId instanceof SimpleReference) { String qname = ((SimpleReference)

-             * commandId) .getName(); } }

-             */

-          else {

-            final IParent e = element;

-            List statements2 = findExtractBlocks(nde);

-            if (statements2.size() > 0) {

-              searchAddElementsTo(statements2, node, e, selectionElements);

-            }

-          }

-        }

-        return;

-      }

-    }

-  }

-

-  public static IModelElement findChildrenByName(String childName, IParent element) {

-    try {

-      if (element == null) {

-        return null;

-      }

-      String nextName = null;

-      int pos;

-      if ((pos = childName.indexOf("::")) != -1) {

-        nextName = childName.substring(pos + 2);

-        childName = childName.split("::")[0];

-      }

-      IModelElement[] children = element.getChildren();

-      if (children != null) {

-        for (int i = 0; i < children.length; ++i) {

-          String name = children[i].getElementName();

-          if (children[i] instanceof IField && name.indexOf('(') != -1) {

-            name = name.substring(0, name.indexOf('('));

-          }

-          if (name.equals(childName)) {

-            if (nextName == null) {

-              return children[i];

-            } else if (children[i] instanceof IParent) {

-              return findChildrenByName(nextName, (IParent) children[i]);

-            }

-          }

-        }

-      }

-    } catch (ModelException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return null;

-  }

-

-  public static IParent findTypeFrom(IModelElement[] childs, String name, String parentName,

-          char delimiter) {

-    try {

-      for (int i = 0; i < childs.length; ++i) {

-        if (childs[i] instanceof IType) {

-          if ((((IType) childs[i]).getFlags() & Modifiers.AccNameSpace) == 0) {

-            continue;

-          }

-          IType type = (IType) childs[i];

-          String qname = name + delimiter + type.getElementName();

-          if (qname.equals(parentName)) {

-            return type;

-          }

-          IParent val = findTypeFrom(type.getChildren(), qname, parentName, delimiter);

-          if (val != null) {

-            return val;

-          }

-        }

-      }

-    } catch (ModelException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return null;

-  }

-

-  public static String getNodeChildName(ASTNode node) {

-    if (node instanceof MethodDeclaration) {

-      MethodDeclaration method = (MethodDeclaration) node;

-      String name = method.getName();

-      if (name.indexOf("::") != -1) {

-        return name.substring(name.lastIndexOf("::") + 2);

-      }

-      return name;

-    } else if (node instanceof TypeDeclaration) {

-      TypeDeclaration type = (TypeDeclaration) node;

-      String name = type.getName();

-      /*

-       * if (name.startsWith("::")) { return name.substring(2); }

-       */

-      return name;

-    } else if (node instanceof Statement) {

-      String[] var = RutaParseUtils.returnVariable((Statement) node);

-      if (var != null) {

-        return var[0];

-      }

-    } else if (node instanceof FieldDeclaration) {

-      return ((FieldDeclaration) node).getName();

-    }

-    return null;

-  }

-

-  public void searchInMethod(final ASTNode node, IParent element, ASTNode nde,

-          List selectionElements) {

-    MethodDeclaration method = (MethodDeclaration) nde;

-    String methodName = method.getName();

-    if (methodName.indexOf("::") != -1) {

-      String pName = methodName.substring(0, methodName.lastIndexOf("::"));

-      pName = pName.replaceAll("::", "\\$");

-      if (pName.equals("$")) {

-        element = sourceModule;

-      } else {

-        try {

-          element = RutaResolver.findTypeFrom(sourceModule.getChildren(), "", pName, '$');

-          if (element == null) {

-            return;

-          }

-        } catch (ModelException e) {

-          e.printStackTrace();

-          return;

-        }

-      }

-      methodName = RutaResolver.getNodeChildName(nde);

-    }

-    IModelElement e = RutaResolver.findChildrenByName(methodName, element);

-    if (e != null && e instanceof IParent) {

-      List stats = ((MethodDeclaration) nde).getStatements();

-      searchAddElementsTo(stats, node, (IParent) e, selectionElements);

-    }

-  }

-

-  public static List findExtractBlocks(ASTNode node) {

-    final List statements2 = new ArrayList();

-    ASTVisitor visitor = new ASTVisitor() {

-      @Override

-      public boolean visit(Expression s) throws Exception {

-        if (s instanceof Block) {

-          statements2.addAll(((Block) s).getStatements());

-        }

-        return super.visit(s);

-      }

-    };

-    try {

-      node.traverse(visitor);

-    } catch (Exception e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return statements2;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaRuleIdVisitor.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaRuleIdVisitor.java
deleted file mode 100644
index b1847c7..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaRuleIdVisitor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.apache.uima.ruta.ide.parser.ast.RutaRule;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.statements.Statement;

-

-public class RutaRuleIdVisitor extends ASTVisitor {

-

-  private int id;

-

-  private RutaRule result;

-

-  public RutaRuleIdVisitor(int id) {

-    super();

-    this.id = id;

-  }

-

-  @Override

-  public boolean visit(Statement s) throws Exception {

-    if (result != null) {

-      return false;

-    }

-    if (s instanceof RutaRule) {

-      RutaRule rule = (RutaRule) s;

-      if (id == rule.getId()) {

-        result = rule;

-      }

-    }

-    return true;

-  }

-

-  public RutaRule getResult() {

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaSelectionEngine.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaSelectionEngine.java
deleted file mode 100644
index aa959b3..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaSelectionEngine.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.ide.core.parser.RutaParseUtils;

-import org.apache.uima.ruta.ide.parser.ast.RutaActionConstants;

-import org.apache.uima.ruta.ide.parser.ast.RutaImportStatement;

-import org.apache.uima.ruta.ide.parser.ast.RutaStatementConstants;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.eclipse.core.resources.IFile;

-import org.eclipse.core.resources.IFolder;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.declarations.TypeDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.ast.references.VariableReference;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.codeassist.ScriptSelectionEngine;

-import org.eclipse.dltk.compiler.env.IModuleSource;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IDLTKLanguageToolkit;

-import org.eclipse.dltk.core.IField;

-import org.eclipse.dltk.core.IMethod;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.IModelElementVisitor;

-import org.eclipse.dltk.core.IOpenable;

-import org.eclipse.dltk.core.IScriptFolder;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ModelException;

-

-public class RutaSelectionEngine extends ScriptSelectionEngine {

-

-  private class ModelElementFinder extends ASTVisitor {

-    private int offset;

-

-    private List results;

-

-    private Set<String> engines;

-

-    private Set<String> typesystems;

-

-    private Map<String, org.eclipse.dltk.core.ISourceModule> scripts;

-

-    private Map<String, IField> impFields;

-

-    private String curFileName;

-

-    public ModelElementFinder(int offset, List results, String curFileName) {

-      super();

-      this.offset = offset;

-      this.results = results;

-      this.engines = new HashSet<String>();

-      this.typesystems = new HashSet<String>();

-      this.scripts = new HashMap<String, org.eclipse.dltk.core.ISourceModule>();

-      this.impFields = new HashMap<String, IField>();

-      this.curFileName = curFileName;

-      try {

-        importScript(parseFileName(curFileName));

-      } catch (Exception e) {

-      }

-    }

-

-    private String parseFileName(String curFileName2) {

-      int i = curFileName2.indexOf("script");

-      String s = curFileName2.substring(i + "scripts".length() - 1);

-      s = s.replace('/', '.');

-      if (s.endsWith(RutaEngine.SCRIPT_FILE_EXTENSION)) {

-        s = s.substring(1, s.length() - 5);

-      }

-      return s;

-    }

-

-    @Override

-    public boolean visit(Statement s) throws Exception {

-      if (s instanceof RutaImportStatement) {

-        // handle engine imports

-        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_ENGINE) {

-          SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();

-          importEngine(sRef.getName());

-        }

-        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_ENGINE) {

-          SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();

-          importEngine(sRef.getName());

-        }

-        // handle script imports

-        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_SCRIPT) {

-          importScript(s);

-        }

-        // handle type system imports

-        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_TYPESYSTEM) {

-          importTypesystem(s);

-        }

-        return false;

-      }

-      return true;

-    }

-

-    @Override

-    public boolean visit(Expression s) throws Exception {

-      if (s.sourceStart() <= offset && offset <= s.sourceEnd()) {

-        if (s instanceof VariableReference) {

-          VariableReference ref = (VariableReference) s;

-          // TODO refactor: extern declaration always checked, even if

-          // local decl found

-          String name = ((VariableReference) s).getName();

-          findLocalDeclaration(name, results, IField.class);

-          if (impFields.containsKey(name)) {

-            results.add(impFields.get(name));

-          }

-        }

-        if (s != null && s.getKind() == RutaActionConstants.A_CALL) {

-          SimpleReference sr = (SimpleReference) s.getChilds().get(0);

-          if (sr != null) {

-            String name = sr.getName();

-            if (engines.contains(name)) {

-              // referenceEngineCall(name);

-            } else if (scripts.containsKey(name)) {

-              findImportedDeclaration(name, results, IMethod.class);

-            } else {

-              checkInnerBlockRef(name, "");

-              name = name.substring(name.lastIndexOf('.') + 1);

-              findLocalDeclaration(name, results, IMethod.class);

-            }

-          }

-        }

-      }

-      return super.visit(s);

-    }

-

-    @Override

-    public boolean visit(MethodDeclaration s) throws Exception {

-      if (s.getNameStart() <= offset && offset <= s.getNameEnd()) {

-        findLocalDeclaration(s.getName(), results, IMethod.class);

-      }

-      return super.visit(s);

-    }

-

-    @Override

-    public boolean visit(TypeDeclaration s) throws Exception {

-      if (s.getNameStart() <= offset && offset <= s.getNameEnd()) {

-        findLocalDeclaration(s.getName(), results, IField.class);

-        // TODO ??

-      }

-      return super.visit(s);

-    }

-

-    private void checkInnerBlockRef(String head, String tail) {

-      int li = head.lastIndexOf('.');

-      if (li > 0) {

-        String frontPart = head.substring(0, li);

-        if (StringUtils.isEmpty(tail)) {

-          tail = head.substring(li + 1);

-        }

-        if (scripts.containsKey(frontPart)) {

-          findDeclaration(scripts.get(frontPart), tail, results, IMethod.class);

-        } else {

-          checkInnerBlockRef(frontPart, tail);

-        }

-      }

-    }

-

-    private void importEngine(String name) {

-      engines.add(name);

-      int i = name.lastIndexOf('.');

-      if (i > 1) {

-        String lastPart = name.substring(i + 1);

-        if (lastPart != null && lastPart.length() != 0) {

-          engines.add(lastPart);

-        }

-      }

-    }

-

-

-    public IFile getFile(IFolder folder, String filePath) {

-      int lastDot = filePath.lastIndexOf('.');

-      int sndLastDot = filePath.lastIndexOf('.', lastDot - 1);

-      String fName = filePath;

-      if (sndLastDot >= 0) {

-        String subFolder = filePath.substring(0, sndLastDot);

-        folder = folder.getFolder(subFolder);

-        fName = filePath.substring(sndLastDot + 1);

-      }

-      return folder.getFile(fName);

-    }

-

-

-    /**

-     * @param s

-     * @throws ModelException

-     */

-    private void importScript(Statement s) throws ModelException {

-      SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();

-      String sRefName = sRef.getName();

-      importScript(sRefName);

-    }

-

-    private void importTypesystem(Statement s) {

-      SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();

-

-      // TODO not working yet

-      // importTypesystem(sRefName);

-

-    }

-

-

-    /**

-     * @param sRefName

-     * @throws ModelException

-     */

-    private void importScript(String sRefName) throws ModelException {

-      int lastDot = sRefName.lastIndexOf('.');

-      String fileNameShort = sRefName.substring(lastDot + 1);

-      String fileName = fileNameShort + RutaEngine.SCRIPT_FILE_EXTENSION;

-

-      org.eclipse.dltk.core.ISourceModule sm = null;

-      IScriptFolder[] scriptFolders = sourceModule.getScriptProject().getScriptFolders();

-      for (int i = 0; i < scriptFolders.length; i++) {

-        sm = scriptFolders[i].getSourceModule(fileName);

-        if (sm.exists() && sm.getResource() != null && sm.getResource().exists()) {

-          scripts.put(sRefName, sm);

-          scripts.put(fileNameShort, sm);

-          importFields(sm.getFields());

-          break;

-        }

-      }

-    }

-

-    private void importFields(IField[] fields) {

-      if (fields == null) {

-        return;

-      }

-      for (int i = 0; i < fields.length; i++) {

-        if (fields[i] == null) {

-          continue;

-        }

-        IField iField = fields[i];

-        IPath path = iField.getPath();

-        String fullyQualifiedName = parseFileName(path.toString());

-        impFields.put(iField.getElementName(), iField);

-        impFields.put(fullyQualifiedName + "." + iField.getElementName(), iField);

-      }

-    }

-

-    @SuppressWarnings("unchecked")

-    private void findImportedDeclaration(final String name, final List results, final Class type) {

-      org.eclipse.dltk.core.ISourceModule module = this.scripts.get(name);

-      if (module != null && module.exists()) {

-        results.add(module);

-        // findDeclaration(module, name, results, type);

-      }

-    }

-

-    @SuppressWarnings("unchecked")

-    private void findDeclaration(org.eclipse.dltk.core.ISourceModule sm, final String name,

-            final List results, final Class type) {

-      try {

-        sm.accept(new IModelElementVisitor() {

-          public boolean visit(IModelElement element) {

-            Class e = element.getClass();

-            boolean classCheck = type.isAssignableFrom(e);

-            if (element.getElementName().equals(name) && classCheck) {

-              results.add(element);

-              return false;

-            }

-            return true;

-          }

-        });

-      } catch (ModelException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      }

-    }

-

-    @SuppressWarnings("unchecked")

-    private void findLocalDeclaration(final String name, final List results, final Class type) {

-      try {

-        sourceModule.accept(new IModelElementVisitor() {

-          public boolean visit(IModelElement element) {

-            Class e = element.getClass();

-            boolean classCheck = type.isAssignableFrom(e);

-            if (element.getElementName().equals(name) && classCheck) {

-              results.add(element);

-            }

-            return true;

-          }

-        });

-      } catch (ModelException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      }

-    }

-  }

-

-  public static boolean DEBUG = DLTKCore.DEBUG_SELECTION;

-

-  protected int actualSelectionStart;

-

-  protected int actualSelectionEnd;

-

-  protected List selectionElements = new ArrayList();

-

-  protected RutaSelectionParser parser = new RutaSelectionParser();

-

-  protected org.eclipse.dltk.core.ISourceModule sourceModule;

-

-  protected IDLTKLanguageToolkit toolkit;

-

-  public IModelElement[] select(IModuleSource module, final int offset, int i) {

-    sourceModule = (org.eclipse.dltk.core.ISourceModule) module.getModelElement();

-    ModuleDeclaration moduleDeclaration = this.parser.parse(module);

-

-    final List results = new ArrayList();

-    try {

-      moduleDeclaration.traverse(new ModelElementFinder(offset, results, module.getFileName()));

-    } catch (Exception e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return (IModelElement[]) results.toArray(new IModelElement[results.size()]);

-  }

-

-  protected boolean checkSelection(String source, int selectionSourceStart, int selectionSourceEnd) {

-

-    boolean cheat = false;

-    if (selectionSourceEnd < selectionSourceStart) {

-      selectionSourceEnd = selectionSourceStart;

-      cheat = true;

-    }

-

-    int start = RutaParseUtils.startLineOrNoSymbol(selectionSourceStart, source);

-    int end = RutaParseUtils.endLineOrNoSymbol(selectionSourceEnd, source);

-    if (end <= start) {

-      if (cheat)

-        return checkSelection(source, selectionSourceEnd - 1, selectionSourceEnd - 1);

-      return false;

-    }

-    if (start > source.length() || end > source.length()) {

-      if (cheat)

-        return checkSelection(source, selectionSourceEnd - 1, selectionSourceEnd - 1);

-      return false;

-    }

-

-    String sub = source.substring(start, end);

-

-    // If contain tabs or spaces, then from start.

-    if ((sub.indexOf(' ') != -1 || sub.indexOf('\t') != -1 || sub.indexOf('\n') != -1)) {

-      if (cheat)

-        return checkSelection(source, selectionSourceEnd - 1, selectionSourceEnd - 1);

-      return false;

-    }

-    this.actualSelectionStart = start;

-    this.actualSelectionEnd = end;

-    return true;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaSelectionParser.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaSelectionParser.java
deleted file mode 100644
index 521bad1..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/RutaSelectionParser.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.compiler.env.IModuleSource;

-

-public class RutaSelectionParser extends RutaAssistParser {

-

-  public void handleNotInElement(ASTNode unit, int position) {

-

-  }

-

-  public void parseBlockStatements(ASTNode node, ASTNode unit, int position) {

-

-  }

-

-  public ModuleDeclaration parse(IModuleSource sourceModule) {

-    ModuleDeclaration module = (ModuleDeclaration) this.parser.parse(sourceModule, null);

-    module.rebuild();

-    return module;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnAST.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnAST.java
deleted file mode 100644
index ab7407e..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnAST.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class SelectionOnAST extends SimpleReference {

-

-  private ASTNode method;

-

-  public SelectionOnAST(ASTNode token) {

-    super(token.sourceStart(), token.sourceEnd(), "");

-    this.method = token;

-  }

-

-  public ASTNode getNode() {

-    return method;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnKeywordOrFunction.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnKeywordOrFunction.java
deleted file mode 100644
index 97189b0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnKeywordOrFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class SelectionOnKeywordOrFunction extends SimpleReference {

-  private ASTNode originalNode;

-

-  public SelectionOnKeywordOrFunction(String completionToken, ASTNode completionNode, ASTNode node) {

-    super(completionNode.sourceStart(), completionNode.sourceEnd(), completionToken);

-    this.originalNode = node;

-  }

-

-  public ASTNode getOriginalNode() {

-    return this.originalNode;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnNode.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnNode.java
deleted file mode 100644
index 72919e5..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/SelectionOnNode.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class SelectionOnNode extends SimpleReference {

-  private ASTNode node;

-

-  private int position;

-

-  public SelectionOnNode(ASTNode token) {

-    super(token.sourceStart(), token.sourceEnd(), "");

-    this.node = token;

-  }

-

-  public ASTNode getNode() {

-    return this.node;

-  }

-

-  public void setPosition(int position) {

-    this.position = position;

-  }

-

-  public int getPosition() {

-    return this.position;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/TMAutoCompletionToolkit.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/TMAutoCompletionToolkit.java
deleted file mode 100644
index 48e4d38..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/codeassist/TMAutoCompletionToolkit.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*

- * 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.ruta.ide.core.codeassist;

-

-public class TMAutoCompletionToolkit {

-

-  private int wordOffset;

-

-  private int currentOffset;

-

-  private int relativeReplacementStart;

-

-  private String wordPrefix;

-

-  public TMAutoCompletionToolkit(String text, int offset) {

-    this.currentOffset = offset;

-    wordOffset = getWordOffset(text, offset) + 1;

-    wordPrefix = text.substring(wordOffset, offset);

-    relativeReplacementStart = offset - wordOffset;

-

-  }

-

-  private int getWordOffset(String text, int offset) {

-    for (int i = offset - 1; i > 0; i--) {

-      switch (text.charAt(i)) {

-        case ' ': {

-          return i;

-        }

-        case '\n': {

-          return i;

-        }

-        case '\r': {

-          return i;

-        }

-        case '\t': {

-          return i;

-        }

-        case '[': {

-          return i;

-        }

-        case ']': {

-          return i;

-        }

-        case '(': {

-          return i;

-        }

-        case ')': {

-          return i;

-        }

-        case '{': {

-          return i;

-        }

-        case '}': {

-          return i;

-        }

-        case ',': {

-          return i;

-        }

-        case ';': {

-          return i;

-        }

-      }

-    }

-    return -1;

-  }

-

-  public int getWordOffset() {

-    return this.wordOffset;

-  }

-

-  public int getCurrentOffset() {

-    return this.currentOffset;

-  }

-

-  public int getRelativeReplacementStart() {

-    return relativeReplacementStart;

-  }

-

-  public String getWordPrefix() {

-    return wordPrefix;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ICompletionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ICompletionExtension.java
deleted file mode 100644
index ebe9157..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ICompletionExtension.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-import java.util.Set;

-

-import org.apache.uima.ruta.ide.core.codeassist.CompletionOnKeywordArgumentOrFunctionArgument;

-import org.apache.uima.ruta.ide.core.codeassist.CompletionOnKeywordOrFunction;

-import org.apache.uima.ruta.ide.core.codeassist.RutaCompletionEngine;

-import org.apache.uima.ruta.ide.core.codeassist.RutaCompletionParser;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.core.CompletionRequestor;

-

-public interface ICompletionExtension {

-  boolean visit(Expression s, RutaCompletionParser parser, int position);

-

-  boolean visit(Statement s, RutaCompletionParser parser, int position);

-

-  void completeOnKeywordOrFunction(CompletionOnKeywordOrFunction key, ASTNode astNodeParent,

-          RutaCompletionEngine engine);

-

-  void completeOnKeywordArgumentsOne(String name,

-          CompletionOnKeywordArgumentOrFunctionArgument compl, Set methodNames, Statement st,

-          RutaCompletionEngine tmCompletionEngine);

-

-  void setRequestor(CompletionRequestor requestor);

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEActionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEActionExtension.java
deleted file mode 100644
index fab1839..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEActionExtension.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IIDEActionExtension extends IRutaExtension {

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEBlockExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEBlockExtension.java
deleted file mode 100644
index 69c68b0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEBlockExtension.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.ruta.ide.core.extensions;
-
-public interface IIDEBlockExtension extends IRutaExtension {
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEBooleanFunctionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEBooleanFunctionExtension.java
deleted file mode 100644
index 3c1a917..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEBooleanFunctionExtension.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IIDEBooleanFunctionExtension extends IRutaExtension {

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEConditionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEConditionExtension.java
deleted file mode 100644
index f79e6ed..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEConditionExtension.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IIDEConditionExtension extends IRutaExtension {

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDENumberFunctionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDENumberFunctionExtension.java
deleted file mode 100644
index 0734775..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDENumberFunctionExtension.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IIDENumberFunctionExtension extends IRutaExtension {

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEStringFunctionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEStringFunctionExtension.java
deleted file mode 100644
index b2fc093..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDEStringFunctionExtension.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IIDEStringFunctionExtension extends IRutaExtension {

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDETypeFunctionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDETypeFunctionExtension.java
deleted file mode 100644
index c95633e..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IIDETypeFunctionExtension.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IIDETypeFunctionExtension extends IRutaExtension {

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IMatchLocatorExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IMatchLocatorExtension.java
deleted file mode 100644
index 62cc758..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IMatchLocatorExtension.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.core.search.matching.PatternLocator;

-import org.eclipse.dltk.internal.core.search.matching.MatchingNodeSet;

-

-public interface IMatchLocatorExtension {

-  // This is match locator feature extension

-  public void visitGeneral(ASTNode node, PatternLocator locator, MatchingNodeSet nodeSet);

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IMixinBuildVisitorExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IMixinBuildVisitorExtension.java
deleted file mode 100644
index 9854c0b..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IMixinBuildVisitorExtension.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IMixinBuildVisitorExtension {

-  //

-  // /**

-  // * If method return true, then other checks will not be provided and

-  // * original visit will return true

-  // */

-  // boolean visit(MethodDeclaration s, RutaMixinBuildVisitor original);

-  //

-  // /**

-  // * If method return true, then other checks will not be provided and

-  // * original visit will return true

-  // */

-  // boolean visit(TypeDeclaration s, RutaMixinBuildVisitor

-  // tmMixinBuildVisitor);

-  //

-  // /**

-  // * If method return true, then other checks will not be provided and

-  // * original visit will return <b>false</b>

-  // */

-  // boolean visit(Statement s, RutaMixinBuildVisitor

-  // tmMixinBuildVisitor);

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaCheckerProblemFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaCheckerProblemFactory.java
deleted file mode 100644
index fc97b70..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaCheckerProblemFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.ruta.ide.core.extensions;
-
-import java.util.List;
-
-import org.apache.uima.ruta.ide.parser.ast.RutaAbstractDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaAction;
-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;
-import org.apache.uima.ruta.ide.parser.ast.RutaFeatureDeclaration;
-import org.apache.uima.ruta.ide.parser.ast.RutaFunction;
-import org.apache.uima.ruta.ide.parser.ast.RutaVariableReference;
-import org.eclipse.dltk.ast.ASTNode;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.compiler.problem.IProblem;
-import org.eclipse.dltk.compiler.problem.ProblemSeverity;
-import org.eclipse.dltk.core.ISourceModule;
-
-public interface IRutaCheckerProblemFactory {
-
-   IProblem createIdConflictsWithVariableProblem(RutaAbstractDeclaration varRef);
-   IProblem createIdConflictsWithTypeProblem(RutaAbstractDeclaration varRef);
-   IProblem createFileNotFoundProblem(ASTNode node, String localPath);
-   IProblem createFileNotFoundProblem(ASTNode fileNode);
-   IProblem createDuplicateShortNameInImported(ASTNode node, String localPath,
-          List<String> checkDuplicateShortNames, ProblemSeverity severity);
-   IProblem createDuplicateShortName(RutaAbstractDeclaration var, ProblemSeverity severity) ;
-   IProblem createXMLProblem(ASTNode node, String localPath);
-   IProblem createTypeProblem(RutaVariableReference ref, ISourceModule currentFile);
-   IProblem createUnknownFeatureTypeProblem(RutaFeatureDeclaration var);
-   IProblem createUnknownFeatureProblem(Expression var, String matchedType);
-   IProblem createWrongArgumentTypeProblem(Expression was, String expected);
-   IProblem createInheritenceFinalProblem(RutaVariableReference parent);
-   IProblem createUnknownConditionProblem(RutaCondition cond);
-   IProblem createUnknownActionProblem(RutaAction action);
-   IProblem createWrongNumberOfArgumentsProblem(String name, Expression element, int expected);
-   IProblem createUnknownFunctionProblem(RutaFunction f);
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaExtension.java
deleted file mode 100644
index 856d4ff..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaExtension.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-import org.antlr.runtime.RecognitionException;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-

-public interface IRutaExtension {

-

-  String[] getKnownExtensions();

-

-  boolean checkSyntax(Expression element, IRutaCheckerProblemFactory problemFactory,

-          IProblemReporter rep) throws RecognitionException;

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaLanguageExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaLanguageExtension.java
deleted file mode 100644
index 4086cc9..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/IRutaLanguageExtension.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-public interface IRutaLanguageExtension {

-  String getName();

-

-  ISourceElementRequestVisitorExtension createSourceElementRequestVisitorExtension();

-

-  IMixinBuildVisitorExtension createMixinBuildVisitorExtension();

-

-  IMatchLocatorExtension createMatchLocatorExtension();

-

-  ICompletionExtension createCompletionExtension();

-

-  ISelectionExtension createSelectionExtension();

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ISelectionExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ISelectionExtension.java
deleted file mode 100644
index ca8c827..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ISelectionExtension.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-import org.apache.uima.ruta.ide.core.codeassist.RutaSelectionEngine;

-import org.apache.uima.ruta.ide.core.codeassist.SelectionOnKeywordOrFunction;

-import org.eclipse.dltk.ast.ASTNode;

-

-public interface ISelectionExtension {

-

-  void selectionOnKeywordOrFunction(SelectionOnKeywordOrFunction key,

-          RutaSelectionEngine tmSelectionEngine);

-

-  void selectionOnAST(ASTNode node, RutaSelectionEngine tmSelectionEngine);

-

-  void selectionOnNode(ASTNode node, int position, RutaSelectionEngine tmSelectionEngine);

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ISourceElementRequestVisitorExtension.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ISourceElementRequestVisitorExtension.java
deleted file mode 100644
index fc45141..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/ISourceElementRequestVisitorExtension.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-import org.eclipse.dltk.ast.declarations.Declaration;

-

-public interface ISourceElementRequestVisitorExtension {

-

-  int getModifiers(Declaration s);

-

-  // boolean visit(Statement statement, RutaSourceElementRequestVisitor

-  // original);

-  //

-  // boolean extendedExitRequired(MethodDeclaration method,

-  // RutaSourceElementRequestVisitor tmSourceElementRequestVisitor);

-  //

-  // ExitFromType getExitExtended(MethodDeclaration method,

-  // RutaSourceElementRequestVisitor tmSourceElementRequestVisitor);

-  //

-  // ExitFromType processField(FieldDeclaration decl,

-  // RutaSourceElementRequestVisitor tmSourceElementRequestVisitor);

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/RutaExternalFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/RutaExternalFactory.java
deleted file mode 100644
index a7d8d76..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/extensions/RutaExternalFactory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*

- * 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.ruta.ide.core.extensions;

-

-import java.util.List;

-

-import org.antlr.runtime.RecognitionException;

-import org.antlr.runtime.Token;

-import org.apache.uima.ruta.ide.parser.ast.ActionFactory;

-import org.apache.uima.ruta.ide.parser.ast.ConditionFactory;

-import org.apache.uima.ruta.ide.parser.ast.ExpressionFactory;

-import org.apache.uima.ruta.ide.parser.ast.RutaAction;

-import org.apache.uima.ruta.ide.parser.ast.RutaCondition;

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class RutaExternalFactory {

-

-  public RutaExternalFactory() {

-    super();

-  }

-

-  public RutaCondition createExternalCondition(Token id, List<Expression> args)

-          throws RecognitionException {

-    return ConditionFactory.createCondition(id, args);

-  }

-

-  public RutaAction createExternalAction(Token id, List<Expression> args)

-          throws RecognitionException {

-    return ActionFactory.createAction(id, args);

-  }

-

-  public Expression createExternalNumberFunction(Token id, List<Expression> args)

-          throws RecognitionException {

-    return ExpressionFactory.createNumberFunction(id, args);

-  }

-

-  public Expression createExternalBooleanFunction(Token id, List<Expression> args)

-          throws RecognitionException {

-    return ExpressionFactory.createBooleanFunction(id, args);

-  }

-

-  public Expression createExternalStringFunction(Token id, List<Expression> args)

-          throws RecognitionException {

-    return ExpressionFactory.createStringFunction(id, args);

-  }

-

-  public Expression createExternalTypeFunction(Token id, List<Expression> args)

-          throws RecognitionException {

-    return ExpressionFactory.createTypeFunction(id, args);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/DLTKRutaHelper.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/DLTKRutaHelper.java
deleted file mode 100644
index f503fc0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/DLTKRutaHelper.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*

- * 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.ruta.ide.core.packages;

-

-import java.io.BufferedReader;

-import java.io.ByteArrayInputStream;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.InputStreamReader;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import javax.xml.parsers.DocumentBuilder;

-import javax.xml.parsers.DocumentBuilderFactory;

-import javax.xml.parsers.ParserConfigurationException;

-

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.environment.IDeployment;

-import org.eclipse.dltk.core.environment.IExecutionEnvironment;

-import org.eclipse.dltk.core.environment.IFileHandle;

-import org.eclipse.dltk.launching.EnvironmentVariable;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.InterpreterConfig;

-import org.eclipse.dltk.launching.ScriptLaunchUtil;

-import org.w3c.dom.Document;

-import org.w3c.dom.Element;

-import org.w3c.dom.Node;

-import org.w3c.dom.NodeList;

-import org.xml.sax.SAXException;

-import org.xml.sax.helpers.DefaultHandler;

-

-public class DLTKRutaHelper {

-

-  private static final String DLTK_RUTA = "scripts/dltk" + RutaEngine.SCRIPT_FILE_EXTENSION; //$NON-NLS-1$

-

-  public static List getScriptOutput(InputStream stream) {

-    final List elements = new ArrayList();

-    final BufferedReader input = new BufferedReader(new InputStreamReader(stream));

-    Thread t = new Thread(new Runnable() {

-      public void run() {

-        try {

-          while (true) {

-            String line;

-            line = input.readLine();

-            if (line == null) {

-              break;

-            }

-            elements.add(line);

-          }

-        } catch (IOException e) {

-          if (DLTKCore.DEBUG) {

-            e.printStackTrace();

-          }

-        }

-      }

-    });

-    t.start();

-    try {

-      t.join(50000);// No more then 50 seconds

-    } catch (InterruptedException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return elements;

-  }

-

-  private static List deployExecute(IExecutionEnvironment exeEnv, String installLocation,

-          String[] arguments, EnvironmentVariable[] env) {

-    IDeployment deployment = exeEnv.createDeployment();

-    IFileHandle script = deploy(deployment);

-    if (script == null) {

-      return null;

-    }

-

-    IFileHandle workingDir = script.getParent();

-    InterpreterConfig config = ScriptLaunchUtil.createInterpreterConfig(exeEnv, script, workingDir,

-            env);

-    // For wish

-    config.removeEnvVar("DISPLAY"); //$NON-NLS-1$

-

-    if (arguments != null) {

-      config.addScriptArgs(arguments);

-    }

-

-    Process process = null;

-    try {

-      process = ScriptLaunchUtil.runScriptWithInterpreter(exeEnv, installLocation, config);

-    } catch (CoreException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    if (process == null) {

-      return new ArrayList();

-    }

-    List output = getScriptOutput(process.getInputStream());

-    getScriptOutput(process.getErrorStream());

-    process.destroy();

-    deployment.dispose();

-    return output;

-  }

-

-  private static IFileHandle deploy(IDeployment deployment) {

-    IFileHandle script;

-    try {

-      IPath path = deployment.add(RutaIdeCorePlugin.getDefault().getBundle(), DLTK_RUTA);

-      script = deployment.getFile(path);

-    } catch (IOException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-      return null;

-    }

-    return script;

-  }

-

-  public static String[] getDefaultPath(IFileHandle installLocation,

-          EnvironmentVariable[] environment) {

-    // Process process = deployExecute(installLocation.getAbsolutePath(),

-    // new String[] { "get-paths" }, environment);

-    // List content = getScriptOutput(process);

-    // String[] autoPath = getAutoPath(content);

-    // for (int i = 0; i < autoPath.length; i++) {

-    // Path p = new Path(autoPath[i]);

-    // if (p.lastSegment().startsWith("tcl8.")) {

-    // return new String[] { autoPath[i] };

-    // }

-    // }

-    // process.destroy();

-    return new String[0];

-    // return autoPath;

-  }

-

-  public static RutaPackage[] getSrcs(IExecutionEnvironment exeEnv, IFileHandle installLocation,

-          EnvironmentVariable[] environment, String packageName) {

-    IDeployment deployment = exeEnv.createDeployment();

-    IFileHandle script = deploy(deployment);

-    if (script == null) {

-      return null;

-    }

-

-    IFileHandle workingDir = script.getParent();

-    InterpreterConfig config = ScriptLaunchUtil.createInterpreterConfig(exeEnv, script, workingDir,

-            environment);

-    String names = packageName;

-    ByteArrayInputStream bais = new ByteArrayInputStream(names.getBytes());

-    IPath packagesPath = null;

-    try {

-      packagesPath = deployment.add(bais, "packages.txt"); //$NON-NLS-1$

-    } catch (IOException e1) {

-      if (DLTKCore.DEBUG) {

-        e1.printStackTrace();

-      }

-      return null;

-    }

-    IFileHandle file = deployment.getFile(packagesPath);

-    // For wish

-    config.removeEnvVar("DISPLAY"); //$NON-NLS-1$

-    String[] arguments = new String[] { "get-srcs", "-fpkgs", //$NON-NLS-1$ //$NON-NLS-2$

-        file.toOSString() };

-

-    config.addScriptArgs(arguments);

-

-    Process process = null;

-    try {

-      process = ScriptLaunchUtil.runScriptWithInterpreter(exeEnv, installLocation.toOSString(),

-              config);

-    } catch (CoreException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    if (process == null) {

-      return null;

-    }

-    List output = getScriptOutput(process.getInputStream());

-    getScriptOutput(process.getErrorStream());

-    process.destroy();

-    deployment.dispose();

-    return getPackagePath(output);

-  }

-

-  private static boolean isElementName(Node nde, String name) {

-    if (nde != null) {

-      if (nde.getNodeType() == Node.ELEMENT_NODE) {

-        if (name.equalsIgnoreCase(nde.getNodeName())) {

-          return true;

-        }

-      }

-    }

-    return false;

-  }

-

-  private static String[] getAutoPath(List content) {

-    String text = getXMLContent(content);

-    Document document = getDocument(text);

-

-    Set paths = new HashSet();

-    if (document != null) {

-      Element element = document.getDocumentElement();

-      NodeList childNodes = element.getChildNodes();

-      int len = childNodes.getLength();

-      for (int i = 0; i < len; i++) {

-        Node nde = childNodes.item(i);

-        if (isElementName(nde, "path")) { //$NON-NLS-1$

-          Element el = (Element) nde;

-          String path = el.getAttribute("name"); //$NON-NLS-1$

-          if (path.length() > 0) {

-            paths.add(path);

-          }

-        }

-      }

-    }

-    return (String[]) paths.toArray(new String[paths.size()]);

-  }

-

-  public static class RutaPackage {

-    private String name;

-

-    private Set paths = new HashSet();

-

-    private Set dependencies = new HashSet();

-

-    public RutaPackage(String name) {

-      this.name = name;

-    }

-

-    @Override

-    public int hashCode() {

-      final int prime = 31;

-      int result = 1;

-      result = prime * result + ((name == null) ? 0 : name.hashCode());

-      return result;

-    }

-

-    @Override

-    public boolean equals(Object obj) {

-      if (this == obj)

-        return true;

-      if (obj == null)

-        return false;

-      if (getClass() != obj.getClass())

-        return false;

-      RutaPackage other = (RutaPackage) obj;

-      if (name == null) {

-        if (other.name != null)

-          return false;

-      } else if (!name.equals(other.name))

-        return false;

-      return true;

-    }

-

-    public String getName() {

-      return name;

-    }

-

-    public void setName(String name) {

-      this.name = name;

-    }

-

-    public Set getPaths() {

-      return paths;

-    }

-

-    public void setPaths(Set paths) {

-      this.paths = paths;

-    }

-

-    public Set getDependencies() {

-      return dependencies;

-    }

-

-    public void setDependencies(Set dependencies) {

-      this.dependencies = dependencies;

-    }

-

-    @Override

-    public String toString() {

-      StringBuffer sb = new StringBuffer(128);

-      sb.append("RutaPackage"); //$NON-NLS-1$

-      sb.append('{');

-      sb.append("name=").append(name); //$NON-NLS-1$

-      sb.append(' ');

-      sb.append("paths=").append(paths); //$NON-NLS-1$

-      sb.append(' ');

-      sb.append("dependencies=").append(dependencies); //$NON-NLS-1$

-      sb.append('}');

-      return sb.toString();

-    }

-  };

-

-  public static RutaPackage[] getPackagePath(List content) {

-    String text = getXMLContent(content);

-    Document document = getDocument(text);

-

-    Map packages = new HashMap();

-    if (document != null) {

-      Element element = document.getDocumentElement();

-      NodeList childNodes = element.getChildNodes();

-      int len = childNodes.getLength();

-      for (int i = 0; i < len; i++) {

-        Node nde = childNodes.item(i);

-        if (isElementName(nde, "path")) { //$NON-NLS-1$

-          Element el = (Element) nde;

-          NodeList elChilds = el.getChildNodes();

-          for (int j = 0; j < elChilds.getLength(); j++) {

-            Node pkgNde = elChilds.item(j);

-            if (isElementName(pkgNde, "package")) { //$NON-NLS-1$

-              populatePackage(packages, pkgNde);

-            }

-          }

-        }

-      }

-    }

-    return (RutaPackage[]) packages.values().toArray(new RutaPackage[packages.size()]);

-  }

-

-  private static void populatePackage(Map packages, Node pkgNde) {

-    Element pkg = (Element) pkgNde;

-    String pkgName = pkg.getAttribute("name"); //$NON-NLS-1$

-    RutaPackage tclPackage = new RutaPackage(pkgName);

-    if (packages.containsKey(tclPackage)) {

-      tclPackage = (RutaPackage) packages.get(tclPackage);

-    } else {

-      packages.put(tclPackage, tclPackage);

-    }

-    NodeList childs = pkg.getChildNodes();

-    for (int i = 0; i < childs.getLength(); i++) {

-      Node nde = childs.item(i);

-      if (isElementName(nde, "source")) { //$NON-NLS-1$

-        Element el = (Element) nde;

-        String name = el.getAttribute("name"); //$NON-NLS-1$

-        IPath path = new Path(name).removeLastSegments(1);

-        tclPackage.getPaths().add(path);

-      } else if (isElementName(nde, "require")) { //$NON-NLS-1$

-        Element el = (Element) nde;

-        String name = el.getAttribute("name"); //$NON-NLS-1$

-        tclPackage.getDependencies().add(name);

-      }

-    }

-  }

-

-  private static Document getDocument(String text) {

-    try {

-      DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();

-      parser.setErrorHandler(new DefaultHandler());

-      Document document = parser.parse(new ByteArrayInputStream(text.getBytes()));

-      return document;

-    } catch (IOException e) {

-

-    } catch (ParserConfigurationException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    } catch (SAXException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return null;

-  }

-

-  private static String getXMLContent(List content) {

-    StringBuffer newList = new StringBuffer();

-    if (content != null) {

-      for (Iterator iterator = content.iterator(); iterator.hasNext();) {

-        String line = (String) iterator.next();

-        if (line.trim().startsWith("<")) { //$NON-NLS-1$

-          newList.append(line).append("\n"); //$NON-NLS-1$

-        }

-      }

-    }

-    return newList.toString();

-  }

-

-  public static Set getPackages(IInterpreterInstall install) {

-    IExecutionEnvironment exeEnv = install.getExecEnvironment();

-    List content = deployExecute(exeEnv, install.getInstallLocation().toOSString(),

-            new String[] { "get-pkgs" }, install //$NON-NLS-1$

-                    .getEnvironmentVariables());

-    Set packages = new HashSet();

-    RutaPackage[] packagePath = getPackagePath(content);

-    for (int i = 0; i < packagePath.length; i++) {

-      packages.add(packagePath[i].getName());

-    }

-    return packages;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/Messages.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/Messages.java
deleted file mode 100644
index a139e31..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/Messages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * 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.ruta.ide.core.packages;

-

-import org.eclipse.osgi.util.NLS;

-

-public class Messages extends NLS {

-  private static final String BUNDLE_NAME = "org.apache.uima.ruta.ide.core.packages.messages"; //$NON-NLS-1$

-

-  public static String RutaCheckBuilder_interpreterNotFound;

-

-  public static String RutaCheckBuilder_processing;

-

-  public static String RutaCheckBuilder_retrievePackages;

-

-  public static String RutaCheckBuilder_unknownPackage;

-

-  public static String RutaCheckBuilder_unresolvedDependencies;

-  static {

-    // initialize resource bundle

-    NLS.initializeMessages(BUNDLE_NAME, Messages.class);

-  }

-

-  private Messages() {

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/PackagesManager.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/PackagesManager.java
deleted file mode 100644
index bc38ba7..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/PackagesManager.java
+++ /dev/null
@@ -1,618 +0,0 @@
-/*

- * 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.ruta.ide.core.packages;

-

-import java.io.BufferedInputStream;

-import java.io.BufferedOutputStream;

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileNotFoundException;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import javax.xml.parsers.DocumentBuilder;

-import javax.xml.parsers.DocumentBuilderFactory;

-import javax.xml.parsers.ParserConfigurationException;

-import javax.xml.transform.OutputKeys;

-import javax.xml.transform.Transformer;

-import javax.xml.transform.TransformerException;

-import javax.xml.transform.TransformerFactory;

-import javax.xml.transform.dom.DOMSource;

-import javax.xml.transform.stream.StreamResult;

-

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.core.packages.DLTKRutaHelper.RutaPackage;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.w3c.dom.Document;

-import org.w3c.dom.Element;

-import org.w3c.dom.Node;

-import org.w3c.dom.NodeList;

-import org.xml.sax.SAXException;

-

-/**

- * This class persistently holds all required information for specified interpreter package to path

- * associations.

- */

-public class PackagesManager {

-  private static final String DEPENDENCY_TAG = "dependency"; //$NON-NLS-1$

-

-  private static final String INTERPRETER_TAG = "interpreter"; //$NON-NLS-1$

-

-  private static final String VALUE_ATTR = "value"; //$NON-NLS-1$

-

-  private static final String PACKAGES_FILE = "packages.txt"; //$NON-NLS-1$

-

-  private static final String PACKAGES_TAG = "packages"; //$NON-NLS-1$

-

-  private static final String PACKAGE_TAG = "package"; //$NON-NLS-1$

-

-  private static final String INTERPRETER_ATTR = INTERPRETER_TAG;

-

-  private static final String NAME_ATTR = "name"; //$NON-NLS-1$

-

-  private static final String PATH_TAG = "path"; //$NON-NLS-1$

-

-  private static PackagesManager manager;

-

-  /**

-   * Contains association of PackageKey to PackageInformation

-   */

-  private Map packages = new HashMap();

-

-  /**

-   * Contains set of interpreter to list of packages association.

-   */

-  private Map interpreterToPackages = new HashMap();

-

-  private Map packsWithDeps = new HashMap();

-

-  public static synchronized PackagesManager getInstance() {

-    if (manager == null) {

-      manager = new PackagesManager();

-    }

-    return manager;

-  }

-

-  private PackagesManager() {

-    initialize();

-  }

-

-  private static class PackageKey {

-    private String packageName;

-

-    private String interpreterPath;

-

-    @Override

-    public int hashCode() {

-      final int prime = 31;

-      int result = 1;

-      result = prime * result + ((interpreterPath == null) ? 0 : interpreterPath.hashCode());

-      result = prime * result + ((packageName == null) ? 0 : packageName.hashCode());

-      return result;

-    }

-

-    @Override

-    public boolean equals(Object obj) {

-      if (this == obj)

-        return true;

-      if (obj == null)

-        return false;

-      if (getClass() != obj.getClass())

-        return false;

-      PackageKey other = (PackageKey) obj;

-      if (interpreterPath == null) {

-        if (other.interpreterPath != null)

-          return false;

-      } else if (!interpreterPath.equals(other.interpreterPath))

-        return false;

-      if (packageName == null) {

-        if (other.packageName != null)

-          return false;

-      } else if (!packageName.equals(other.packageName))

-        return false;

-      return true;

-    }

-

-    public String getPackageName() {

-      return packageName;

-    }

-

-    public void setPackageName(String packageName) {

-      this.packageName = packageName;

-    }

-

-    public String getInterpreterPath() {

-      return interpreterPath;

-    }

-

-    public void setInterpreterPath(String interpreterPath) {

-      this.interpreterPath = interpreterPath;

-    }

-  }

-

-  public static class PackageInformation {

-    private final Set paths = new HashSet();

-

-    private final Set dependencies = new HashSet();

-

-    public Set getPaths() {

-      return paths;

-    }

-

-    public Set getDependencies() {

-      return dependencies;

-    }

-  }

-

-  private void initialize() {

-    IPath packagesPath = RutaIdeCorePlugin.getDefault().getStateLocation().append(PACKAGES_FILE);

-    File packagesFile = packagesPath.toFile();

-    if (packagesFile.exists()) {

-      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

-      DocumentBuilder builder;

-      try {

-        builder = factory.newDocumentBuilder();

-        Document document = builder.parse(new BufferedInputStream(

-                new FileInputStream(packagesFile), 2048));

-        populate(document.getDocumentElement());

-      } catch (ParserConfigurationException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      } catch (FileNotFoundException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      } catch (SAXException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      } catch (IOException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-      }

-    }

-  }

-

-  private void save() {

-    IPath packagesPath = RutaIdeCorePlugin.getDefault().getStateLocation().append(PACKAGES_FILE);

-    File packagesFile = packagesPath.toFile();

-    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

-    DocumentBuilder builder;

-    try {

-      builder = factory.newDocumentBuilder();

-      Document document = builder.newDocument();

-      save(document);

-

-      FileOutputStream fos = new FileOutputStream(packagesFile, false);

-      BufferedOutputStream bos = new BufferedOutputStream(fos, 2048);

-

-      TransformerFactory serFactory = TransformerFactory.newInstance();

-      Transformer transformer = serFactory.newTransformer();

-      transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$

-      transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$

-

-      DOMSource source = new DOMSource(document);

-      StreamResult outputTarget = new StreamResult(bos);

-      transformer.transform(source, outputTarget);

-      bos.close();

-      fos.close();

-

-    } catch (ParserConfigurationException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    } catch (FileNotFoundException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    } catch (IOException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    } catch (TransformerException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-  }

-

-  private synchronized void save(Document doc) {

-    Element packagesElement = doc.createElement(PACKAGES_TAG);

-    doc.appendChild(packagesElement);

-    for (Iterator iterator = this.packages.keySet().iterator(); iterator.hasNext();) {

-      PackageKey key = (PackageKey) iterator.next();

-

-      Element packageElement = doc.createElement(PACKAGE_TAG);

-      packageElement.setAttribute(NAME_ATTR, key.getPackageName());

-      packageElement.setAttribute(INTERPRETER_ATTR, key.getInterpreterPath());

-

-      PackageInformation info = (PackageInformation) this.packages.get(key);

-      Set paths = info.getPaths();

-      for (Iterator iterator2 = paths.iterator(); iterator2.hasNext();) {

-        IPath path = (IPath) iterator2.next();

-        Element pathElement = doc.createElement(PATH_TAG);

-        pathElement.setAttribute(VALUE_ATTR, path.toOSString());

-        packageElement.appendChild(pathElement);

-      }

-      Set deps = info.getDependencies();

-      for (Iterator iterator2 = deps.iterator(); iterator2.hasNext();) {

-        String pkgName = (String) iterator2.next();

-        Element pkgElement = doc.createElement(DEPENDENCY_TAG);

-        pkgElement.setAttribute(NAME_ATTR, pkgName);

-        packageElement.appendChild(pkgElement);

-      }

-      packagesElement.appendChild(packageElement);

-    }

-    for (Iterator iterator = this.interpreterToPackages.keySet().iterator(); iterator.hasNext();) {

-      String interpreter = (String) iterator.next();

-

-      Element interpreterElement = doc.createElement(INTERPRETER_TAG);

-      interpreterElement.setAttribute(NAME_ATTR, interpreter);

-      Set pkgs = (Set) this.interpreterToPackages.get(interpreter);

-      for (Iterator iterator2 = pkgs.iterator(); iterator2.hasNext();) {

-        String pkgName = (String) iterator2.next();

-        Element pathElement = doc.createElement(PACKAGE_TAG);

-        pathElement.setAttribute(VALUE_ATTR, pkgName);

-        interpreterElement.appendChild(pathElement);

-      }

-      packagesElement.appendChild(interpreterElement);

-    }

-  }

-

-  private synchronized void populate(Element documentElement) {

-    NodeList childNodes = documentElement.getChildNodes();

-    int length = childNodes.getLength();

-    for (int i = 0; i < length; i++) {

-      Node child = childNodes.item(i);

-      if (child.getNodeType() == Node.ELEMENT_NODE) {

-        if (child.getNodeName().equalsIgnoreCase(PACKAGE_TAG)) {

-          Element e = (Element) child;

-          String packageName = e.getAttribute(NAME_ATTR);

-          String interpreter = e.getAttribute(INTERPRETER_ATTR);

-          PackageInformation packageInfo = new PackageInformation();

-          NodeList childrens = e.getChildNodes();

-          for (int j = 0; j < childrens.getLength(); j++) {

-            Node path = childrens.item(j);

-            if (path.getNodeType() == Node.ELEMENT_NODE) {

-              if (path.getNodeName().equalsIgnoreCase(PATH_TAG)) {

-                String pathValue = ((Element) path).getAttribute(VALUE_ATTR);

-                packageInfo.getPaths().add(new Path(pathValue));

-              } else if (path.getNodeName().equalsIgnoreCase(DEPENDENCY_TAG)) {

-                String pkgName = ((Element) path).getAttribute(NAME_ATTR);

-                packageInfo.getDependencies().add(pkgName);

-              }

-            }

-          }

-          this.packages.put(makeKey(packageName, interpreter), packageInfo);

-        } else if (child.getNodeName().equalsIgnoreCase(INTERPRETER_TAG)) {

-          Element e = (Element) child;

-          String interpreter = e.getAttribute(NAME_ATTR);

-          NodeList paths = e.getChildNodes();

-          Set packagesSet = new HashSet();

-          for (int j = 0; j < paths.getLength(); j++) {

-            Node packageNode = paths.item(j);

-            if (packageNode.getNodeType() == Node.ELEMENT_NODE) {

-              if (packageNode.getNodeName().equalsIgnoreCase(PACKAGE_TAG)) {

-                String packageNameValue = ((Element) packageNode).getAttribute(VALUE_ATTR);

-                packagesSet.add(packageNameValue);

-              }

-            }

-          }

-          this.interpreterToPackages.put(interpreter, packagesSet);

-        }

-      }

-    }

-  }

-

-  private PackageKey makeKey(String packageName, String interpreter) {

-    PackageKey key = new PackageKey();

-    key.setPackageName(packageName);

-    key.setInterpreterPath(interpreter);

-    return key;

-  }

-

-  /**

-   * Return paths specific only for selected package.

-   */

-  public synchronized IPath[] getPathsForPackage(IInterpreterInstall install, String packageName) {

-    PackageKey key = makeKey(packageName, getInterpreterKey(install));

-    if (this.packages.containsKey(key)) {

-      PackageInformation info = (PackageInformation) this.packages.get(key);

-      Set els = info.getPaths();

-      return (IPath[]) els.toArray(new IPath[els.size()]);

-    }

-    // Retrieve paths from interpreter with all dependencies.

-    RutaPackage[] srcs = DLTKRutaHelper.getSrcs(install.getExecEnvironment(),

-            install.getInstallLocation(), install.getEnvironmentVariables(), packageName);

-

-    PackageInformation resultInfo = null;

-    for (int i = 0; i < srcs.length; i++) {

-      Set paths2 = srcs[i].getPaths();

-      PackageKey okey = makeKey(srcs[i].getName(), getInterpreterKey(install));

-      PackageInformation info;

-      if (this.packages.containsKey(okey)) {

-        info = (PackageInformation) this.packages.get(okey);

-      } else {

-        info = new PackageInformation();

-      }

-      info.getPaths().addAll(paths2);

-      info.getDependencies().addAll(srcs[i].getDependencies());

-      this.packages.put(okey, info);

-      if (okey.equals(key)) {

-        resultInfo = info;

-      }

-    }

-    // Follow all dependencies

-    if (resultInfo == null) {

-      this.packages.put(key, new PackageInformation());

-      return new IPath[0];

-    }

-

-    Set resultPaths = new HashSet();

-    resultPaths.addAll(resultInfo.getPaths());

-

-    save();

-    return (IPath[]) resultPaths.toArray(new IPath[resultPaths.size()]);

-  }

-

-  public synchronized Map getDependencies(String pkgName, IInterpreterInstall install) {

-    Set checkedPackages = new HashSet();

-    Map packagesSet = new HashMap();

-    PackageKey key = makeKey(pkgName, install);

-    PackageInformation info = (PackageInformation) this.packages.get(key);

-    if (info != null) {

-      traverseDependencies(packagesSet, checkedPackages, info, install);

-    }

-    return packagesSet;

-  }

-

-  private PackageKey makeKey(String pkgName, IInterpreterInstall install) {

-    return makeKey(pkgName, getInterpreterKey(install));

-  }

-

-  private synchronized void traverseDependencies(Map packagesSet, Set checkedPackages,

-          PackageInformation resultInfo, IInterpreterInstall install) {

-    Set dependencies = resultInfo.getDependencies();

-    for (Iterator iterator = dependencies.iterator(); iterator.hasNext();) {

-      String pkgName = (String) iterator.next();

-      if (!checkedPackages.contains(pkgName)) {

-        checkedPackages.add(pkgName);

-        PackageKey pkgKey = makeKey(pkgName, getInterpreterKey(install));

-        if (this.packages.containsKey(pkgKey)) {

-          PackageInformation depInfo = (PackageInformation) this.packages.get(pkgKey);

-          packagesSet.put(pkgName, depInfo);

-          traverseDependencies(packagesSet, checkedPackages, depInfo, install);

-        }

-      }

-    }

-  }

-

-  public synchronized Set getPackageNames(IInterpreterInstall install) {

-    String key = getInterpreterKey(install);

-    if (this.interpreterToPackages.containsKey(key)) {

-      Set set = (Set) this.interpreterToPackages.get(key);

-      return set;

-    }

-    // Evaluate

-    Set packs = DLTKRutaHelper.getPackages(install);

-    this.interpreterToPackages.put(key, packs);

-    save();

-    return packs;

-  }

-

-  private String getInterpreterKey(IInterpreterInstall install) {

-    if (install == null) {

-      return "";

-    }

-    return install.getInstallLocation().toOSString() + ":" //$NON-NLS-1$

-            + install.getEnvironment().getId();

-  }

-

-  private String getInterpreterProjectKey(IInterpreterInstall install, String projectName) {

-    return "internal|||" + projectName + "|||" //$NON-NLS-1$ //$NON-NLS-2$

-            + getInterpreterKey(install);

-  }

-

-  public Set getInternalPackageNames(IInterpreterInstall install, IScriptProject project) {

-    return getInternalPackageNames(install, project.getElementName());

-  }

-

-  public synchronized Set getInternalPackageNames(IInterpreterInstall install, IProject project) {

-    return getInternalPackageNames(install, project.getName());

-  }

-

-  public synchronized Set getInternalPackageNames(IInterpreterInstall install, String projectName) {

-    final String key = getInterpreterProjectKey(install, projectName);

-    if (this.interpreterToPackages.containsKey(key)) {

-      return (Set) this.interpreterToPackages.get(key);

-    }

-    return Collections.EMPTY_SET;

-  }

-

-  public synchronized void setInternalPackageNames(IInterpreterInstall install,

-          IScriptProject project, Set names) {

-    String key = getInterpreterProjectKey(install, project.getElementName());

-    // TODO compare and save only if there are changes

-    this.interpreterToPackages.put(key, new HashSet(names));

-    save();

-  }

-

-  /**

-   * Return all packages paths in one call.

-   */

-  public synchronized IPath[] getPathsForPackages(IInterpreterInstall install, Set packagesInBuild) {

-

-    StringBuffer buf = new StringBuffer();

-    String[] pkgs = (String[]) packagesInBuild.toArray(new String[packagesInBuild.size()]);

-    for (int i = 0; i < pkgs.length; i++) {

-      buf.append(pkgs[i]).append(" "); //$NON-NLS-1$

-    }

-    PackageKey key = makeKey(buf.toString(), getInterpreterKey(install));

-

-    if (this.packages.containsKey(key)) {

-      PackageInformation info = (PackageInformation) this.packages.get(key);

-      Set paths = info.getPaths();

-      return (IPath[]) paths.toArray(new IPath[paths.size()]);

-    }

-    // Retrieve paths from interpreter with all dependencies.

-    RutaPackage[] srcs = DLTKRutaHelper.getSrcs(install.getExecEnvironment(),

-            install.getInstallLocation(), install.getEnvironmentVariables(), buf.toString());

-    Set result = new HashSet();

-    if (srcs == null) {

-      return new IPath[0];

-    }

-    for (int i = 0; i < srcs.length; i++) {

-      Set paths2 = srcs[i].getPaths();

-      PackageKey okey = makeKey(srcs[i].getName(), getInterpreterKey(install));

-      PackageInformation info = null;

-      if (this.packages.containsKey(okey)) {

-        info = (PackageInformation) this.packages.get(okey);

-      } else {

-        info = new PackageInformation();

-      }

-      result.addAll(paths2);

-      info.getPaths().addAll(paths2);

-      info.getDependencies().addAll(srcs[i].getDependencies());

-      this.packages.put(okey, info);

-    }

-

-    PackageInformation info = new PackageInformation();

-    info.getPaths().addAll(result);

-    this.packages.put(key, info);

-

-    for (int i = 0; i < pkgs.length; i++) {

-      PackageKey lkey = makeKey(pkgs[i], getInterpreterKey(install));

-      if (!this.packages.containsKey(lkey)) {

-        this.packages.put(lkey, new PackageInformation());

-      }

-    }

-    save();

-

-    return (IPath[]) result.toArray(new IPath[result.size()]);

-  }

-

-  public IPath[] getAllPaths(String pkgName, IInterpreterInstall install) {

-    Set result = new HashSet();

-    IPath[] paths = this.getPathsForPackage(install, pkgName);

-    result.addAll(Arrays.asList(paths));

-    Map dependencies = this.getDependencies(pkgName, install);

-    for (Iterator iterator = dependencies.keySet().iterator(); iterator.hasNext();) {

-      String packageName = (String) iterator.next();

-      PackageInformation info = (PackageInformation) dependencies.get(packageName);

-      result.addAll(info.getPaths());

-    }

-    return (IPath[]) result.toArray(new IPath[result.size()]);

-  }

-

-  /**

-   * This method removes all information about specified interpreter.

-   * 

-   * @param install

-   */

-  public synchronized void removeInterprterInfo(IInterpreterInstall install) {

-    // Remove interpreter to packages set

-    String interpreterPath = getInterpreterKey(install);

-    this.interpreterToPackages.remove(interpreterPath);

-    // Remove all values stored for interpreter packages

-    for (Iterator iterator = this.packages.keySet().iterator(); iterator.hasNext();) {

-      PackageKey key = (PackageKey) iterator.next();

-      String path = key.getInterpreterPath();

-      if (path.equals(interpreterPath)) {

-        iterator.remove();

-      }

-    }

-    save();

-  }

-

-  /**

-   * Clears all cached information.

-   */

-  public synchronized void clearCache() {

-    this.interpreterToPackages.clear();

-    this.packages.clear();

-    this.packsWithDeps.clear();

-    save();

-  }

-

-  public IPath[] getPathsForPackageWithDeps(IInterpreterInstall install, String name) {

-    Set result = new HashSet();

-    IPath[] paths = this.getPathsForPackage(install, name);

-    result.addAll(Arrays.asList(paths));

-

-    Map dependencies = getDependencies(name, install);

-    for (Iterator iterator = dependencies.keySet().iterator(); iterator.hasNext();) {

-      String pkgName = (String) iterator.next();

-      result.addAll(Arrays.asList(getPathsForPackage(install, pkgName)));

-    }

-    return (IPath[]) result.toArray(new IPath[result.size()]);

-  }

-

-  public IPath[] getPathsForPackagesWithDeps(IInterpreterInstall install, Set packagesSet) {

-

-    String pkey = makePKey(packagesSet);

-    if (this.packsWithDeps.containsKey(pkey)) {

-      return (IPath[]) this.packsWithDeps.get(pkey);

-    }

-

-    Set result = new HashSet();

-    IPath[] paths = this.getPathsForPackages(install, packagesSet);

-    result.addAll(Arrays.asList(paths));

-

-    for (Iterator jiterator = packagesSet.iterator(); jiterator.hasNext();) {

-      String name = (String) jiterator.next();

-      Map dependencies = getDependencies(name, install);

-      for (Iterator iterator = dependencies.keySet().iterator(); iterator.hasNext();) {

-        String pkgName = (String) iterator.next();

-        result.addAll(Arrays.asList(getPathsForPackage(install, pkgName)));

-      }

-    }

-    IPath[] array = (IPath[]) result.toArray(new IPath[result.size()]);

-    this.packsWithDeps.put(pkey, array);

-    return array;

-  }

-

-  private String makePKey(Set packagesSet) {

-    StringBuffer buffer = new StringBuffer();

-    List l = new ArrayList();

-    l.addAll(packagesSet);

-    Collections.sort(l);

-    for (Iterator iterator = l.iterator(); iterator.hasNext();) {

-      String object = (String) iterator.next();

-      buffer.append(object);

-    }

-    return buffer.toString();

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaBuildPathPackageCollector.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaBuildPathPackageCollector.java
deleted file mode 100644
index 49de52b..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaBuildPathPackageCollector.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*

- * 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.ruta.ide.core.packages;

-

-import java.util.ArrayList;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Set;

-

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.parser.ast.RutaPackageDeclaration;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.statements.Statement;

-

-public class RutaBuildPathPackageCollector extends ASTVisitor {

-

-  private final List requireDirectives = new ArrayList();

-

-  private final Set packagesRequired = new HashSet();

-

-  private final Set packagesProvided = new HashSet();

-

-  public void process(ModuleDeclaration declaration) {

-    try {

-      declaration.traverse(this);

-    } catch (Exception e) {

-      RutaIdeCorePlugin.error(e);

-    }

-  }

-

-  @Override

-  public boolean visit(Statement s) throws Exception {

-    if (s instanceof RutaPackageDeclaration) {

-      final RutaPackageDeclaration pkg = (RutaPackageDeclaration) s;

-      packagesProvided.add(pkg.getName());

-      return false;

-    }

-    return super.visit(s);

-  }

-

-  /**

-   * @return the requireDirectives

-   */

-  public List getRequireDirectives() {

-    return requireDirectives;

-  }

-

-  /**

-   * @return the packagesRequired

-   */

-  public Set getPackagesRequired() {

-    return packagesRequired;

-  }

-

-  /**

-   * @return the packagesProvided

-   */

-  public Set getPackagesProvided() {

-    return packagesProvided;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaCheckBuilder.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaCheckBuilder.java
deleted file mode 100644
index 1942c9e..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaCheckBuilder.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*

- * 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.ruta.ide.core.packages;

-

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.core.CodeModel;

-import org.apache.uima.ruta.ide.core.RutaProblems;

-import org.apache.uima.ruta.ide.parser.ast.RutaPackageDeclaration;

-import org.eclipse.core.resources.IProject;

-import org.eclipse.core.resources.IWorkspaceRoot;

-import org.eclipse.core.resources.ResourcesPlugin;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IPath;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.compiler.problem.DefaultProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-import org.eclipse.dltk.compiler.problem.ProblemSeverities;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.IBuildpathEntry;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.core.builder.IBuildChange;

-import org.eclipse.dltk.core.builder.IBuildContext;

-import org.eclipse.dltk.core.builder.IBuildParticipant;

-import org.eclipse.dltk.core.builder.IBuildParticipantExtension;

-import org.eclipse.dltk.core.builder.IBuildParticipantExtension2;

-import org.eclipse.dltk.core.builder.IBuildState;

-import org.eclipse.dltk.core.environment.EnvironmentPathUtils;

-import org.eclipse.dltk.launching.IInterpreterInstall;

-import org.eclipse.dltk.launching.ScriptRuntime;

-import org.eclipse.osgi.util.NLS;

-

-public class RutaCheckBuilder implements IBuildParticipant, IBuildParticipantExtension,

-        IBuildParticipantExtension2 {

-

-  private final IScriptProject project;

-

-  private final IInterpreterInstall install;

-

-  private final PackagesManager manager = PackagesManager.getInstance();

-

-  private final RutaBuildPathPackageCollector packageCollector = new RutaBuildPathPackageCollector();

-

-  private final Map codeModels = new HashMap();

-

-  private final Map resourceToModuleInfos = new HashMap();

-

-  private final Set knownPackageNames;

-

-  private final Set buildpath;

-

-  private static class ModuleInfo {

-    final List requireDirectives;

-

-    final IProblemReporter reporter;

-

-    public ModuleInfo(IProblemReporter reporter, List requireDirectives) {

-      this.reporter = reporter;

-      this.requireDirectives = requireDirectives;

-    }

-

-  }

-

-  /**

-   * @param project

-   * @throws CoreException

-   * @throws IllegalStateException

-   *           if associated interpreter could not be found

-   */

-  public RutaCheckBuilder(IScriptProject project) throws CoreException, IllegalStateException {

-    this.project = project;

-    install = ScriptRuntime.getInterpreterInstall(project);

-    if (install == null) {

-      // thrown exception is caught in the RutaPackageCheckerType

-      throw new IllegalStateException(NLS.bind(Messages.RutaCheckBuilder_interpreterNotFound,

-              project.getElementName()));

-    }

-    knownPackageNames = manager.getPackageNames(install);

-    buildpath = getBuildpath(project);

-  }

-

-  private int buildType;

-

-  public boolean beginBuild(int buildType) {

-    this.buildType = buildType;

-    if (buildType != FULL_BUILD) {

-      // retrieve packages provided by this project

-      packageCollector.getPackagesProvided().addAll(

-              manager.getInternalPackageNames(install, project));

-    }

-    loadProvidedPackagesFromRequiredProjects();

-    return true;

-  }

-

-  private void loadProvidedPackagesFromRequiredProjects() {

-    final IBuildpathEntry[] resolvedBuildpath;

-    try {

-      resolvedBuildpath = project.getResolvedBuildpath(true);

-    } catch (ModelException e) {

-      RutaIdeCorePlugin.error(e);

-      return;

-    }

-    final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();

-    for (int i = 0; i < resolvedBuildpath.length; i++) {

-      final IBuildpathEntry entry = resolvedBuildpath[i];

-      if (entry.getEntryKind() == IBuildpathEntry.BPE_PROJECT) {

-        final IPath path = entry.getPath();

-        final IProject project = workspaceRoot.getProject(path.lastSegment());

-        if (project.exists()) {

-          packageCollector.getPackagesProvided().addAll(

-                  manager.getInternalPackageNames(install, project));

-        }

-      }

-    }

-  }

-

-  public void buildExternalModule(IBuildContext context) throws CoreException {

-    final ModuleDeclaration ast = (ModuleDeclaration) context

-            .get(IBuildContext.ATTR_MODULE_DECLARATION);

-    if (ast != null) {

-      packageCollector.getRequireDirectives().clear();

-      packageCollector.process(ast);

-    }

-  }

-

-  public void build(IBuildContext context) throws CoreException {

-    ModuleDeclaration ast = (ModuleDeclaration) context.get(ModuleDeclaration.class.getName());

-    if (ast == null) {

-      return;

-    }

-    packageCollector.getRequireDirectives().clear();

-    packageCollector.process(ast);

-    if (!packageCollector.getRequireDirectives().isEmpty()) {

-      resourceToModuleInfos.put(

-              context.getSourceModule(),

-              new ModuleInfo(context.getProblemReporter(), new ArrayList(packageCollector

-                      .getRequireDirectives())));

-    }

-  }

-

-  public void endBuild(IProgressMonitor monitor) {

-    if (buildType != RECONCILE_BUILD) {

-      // Save packages provided by the project

-      manager.setInternalPackageNames(install, project, packageCollector.getPackagesProvided());

-    }

-    monitor.subTask(Messages.RutaCheckBuilder_retrievePackages);

-    // initialize manager caches after they are collected

-    final Set requiredPackages = packageCollector.getPackagesRequired();

-    if (!requiredPackages.isEmpty()) {

-      manager.getPathsForPackages(install, requiredPackages);

-      manager.getPathsForPackagesWithDeps(install, requiredPackages);

-    }

-    // process all modules

-    int remainingWork = resourceToModuleInfos.size();

-    for (Iterator i = resourceToModuleInfos.entrySet().iterator(); i.hasNext();) {

-      final Map.Entry entry = (Map.Entry) i.next();

-      final ISourceModule module = (ISourceModule) entry.getKey();

-      final ModuleInfo info = (ModuleInfo) entry.getValue();

-      monitor.subTask(NLS.bind(Messages.RutaCheckBuilder_processing, module.getElementName(),

-              Integer.toString(remainingWork)));

-      codeModels.clear();

-      --remainingWork;

-    }

-  }

-

-  private CodeModel getCodeModel(ISourceModule module) {

-    CodeModel model = (CodeModel) codeModels.get(module);

-    if (model == null) {

-      try {

-        model = new CodeModel(module.getSource());

-        codeModels.put(module, model);

-      } catch (ModelException e) {

-        if (DLTKCore.DEBUG) {

-          e.printStackTrace();

-        }

-        return null;

-      }

-    }

-    return model;

-  }

-

-  private static Set getBuildpath(IScriptProject project) {

-    final IBuildpathEntry[] resolvedBuildpath;

-    try {

-      resolvedBuildpath = project.getResolvedBuildpath(true);

-    } catch (ModelException e1) {

-      RutaIdeCorePlugin.error(e1);

-      return Collections.EMPTY_SET;

-    }

-    final Set buildpath = new HashSet();

-    for (int i = 0; i < resolvedBuildpath.length; i++) {

-      final IBuildpathEntry entry = resolvedBuildpath[i];

-      if (entry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY && entry.isExternal()) {

-        buildpath.add(EnvironmentPathUtils.getLocalPath(entry.getPath()));

-      }

-    }

-    return buildpath;

-  }

-

-  private void reportPackageProblem(RutaPackageDeclaration pkg, IProblemReporter reporter,

-          ISourceModule module, String message, String pkgName) {

-    final CodeModel model = getCodeModel(module);

-    if (model == null) {

-      return;

-    }

-    reporter.reportProblem(new DefaultProblem(message, RutaProblems.UNKNOWN_REQUIRED_PACKAGE,

-            new String[] { pkgName }, ProblemSeverities.Error, pkg.sourceStart(), pkg.sourceEnd(),

-            model.getLineNumber(pkg.sourceStart(), pkg.sourceEnd())));

-  }

-

-  private void checkPackage(ISourceModule module, RutaPackageDeclaration pkg,

-          IProblemReporter reporter) {

-    final String packageName = pkg.getName();

-

-    if (packageCollector.getPackagesProvided().contains(packageName)) {

-      return;

-    }

-    if (!isValidPackageName(packageName)) {

-      return;

-    }

-

-    // Report unknown packages

-    if (!knownPackageNames.contains(packageName)) {

-      reportPackageProblem(pkg, reporter, module,

-              NLS.bind(Messages.RutaCheckBuilder_unknownPackage, packageName), packageName);

-      return;

-    }

-

-    // Receive main package and it paths.

-    if (checkPackage(packageName)) {

-      reportPackageProblem(pkg, reporter, module,

-              NLS.bind(Messages.RutaCheckBuilder_unresolvedDependencies, packageName), packageName);

-      return;

-    }

-

-    final Set dependencies = manager.getDependencies(packageName, install).keySet();

-    for (Iterator i = dependencies.iterator(); i.hasNext();) {

-      String pkgName = (String) i.next();

-      if (checkPackage(pkgName)) {

-        reportPackageProblem(pkg, reporter, module,

-                NLS.bind(Messages.RutaCheckBuilder_unresolvedDependencies, packageName),

-                packageName);

-        return;

-      }

-    }

-  }

-

-  static boolean isValidPackageName(String packageName) {

-    return packageName != null && packageName.length() != 0 && packageName.indexOf('$') == -1

-            && packageName.indexOf('[') == -1 && packageName.indexOf(']') == -1;

-  }

-

-  /**

-   * returns <code>true</code> on error

-   * 

-   * @param packageName

-   * @return

-   */

-  private boolean checkPackage(String packageName) {

-    if (packageCollector.getPackagesProvided().contains(packageName)) {

-      return false;

-    }

-    return isOnBuildpath(buildpath, manager.getPathsForPackage(install, packageName));

-  }

-

-  private static boolean isOnBuildpath(Set buildpath, IPath path) {

-    if (!buildpath.contains(path)) {

-      for (Iterator i = buildpath.iterator(); i.hasNext();) {

-        IPath pp = (IPath) i.next();

-        if (pp.isPrefixOf(path)) {

-          return true;

-        }

-      }

-      return false;

-    }

-    return true;

-  }

-

-  private static boolean isOnBuildpath(Set buildpath, IPath[] paths) {

-    if (paths != null) {

-      for (int i = 0; i < paths.length; i++) {

-        final IPath path = paths[i];

-        if (!isOnBuildpath(buildpath, path)) {

-          return true;

-        }

-      }

-    }

-    return false;

-  }

-

-  public void prepare(IBuildChange buildChange, IBuildState buildState) throws CoreException {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaPackageCheckerType.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaPackageCheckerType.java
deleted file mode 100644
index cc72cdd..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/packages/RutaPackageCheckerType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * 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.ruta.ide.core.packages;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.builder.AbstractBuildParticipantType;

-import org.eclipse.dltk.core.builder.IBuildParticipant;

-

-public class RutaPackageCheckerType extends AbstractBuildParticipantType {

-

-  @Override

-  public IBuildParticipant createBuildParticipant(IScriptProject project) throws CoreException {

-    try {

-      return new RutaCheckBuilder(project);

-    } catch (IllegalStateException e) {

-      return null;

-    }

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/DLTKRutaErrorReporter.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/DLTKRutaErrorReporter.java
deleted file mode 100644
index 70641a0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/DLTKRutaErrorReporter.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.antlr.runtime.CommonToken;

-import org.antlr.runtime.FailedPredicateException;

-import org.antlr.runtime.MismatchedTokenException;

-import org.antlr.runtime.NoViableAltException;

-import org.antlr.runtime.RecognitionException;

-import org.antlr.runtime.Token;

-import org.antlr.runtime.TokenStream;

-import org.eclipse.dltk.ast.DLTKToken;

-import org.eclipse.dltk.compiler.problem.DefaultProblem;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-import org.eclipse.dltk.compiler.problem.ProblemSeverities;

-

-public class DLTKRutaErrorReporter {

-  IProblemReporter reporter;

-

-  DLTKTokenConverter converter;

-

-  RutaParser parser;

-

-  List problems = new ArrayList();

-

-  public DLTKRutaErrorReporter(DLTKTokenConverter converter, IProblemReporter reporter,

-          RutaParser parser) {

-    this.converter = converter;

-    this.reporter = reporter;

-    this.parser = parser;

-  }

-

-  public void reportError(RecognitionException re) {

-    if (reporter == null) {

-      return;

-    }

-    if (re.token == null) {

-      System.out.println("Token is null in ErrorReporter");

-      return;

-    }

-    Token token = re.token;

-    int line = re.token.getLine();

-    int index = token.getTokenIndex();

-    if (index < 0) {

-      index = re.index;

-      TokenStream tokenStream = parser.getTokenStream();

-      if (index > 0) {

-        token = tokenStream.get(index - 1);

-        line = token.getLine();

-      }

-    }

-

-    String message = re.getMessage();

-    String m = "";

-    if (message != null) {

-      m = message;

-    }

-    String tokenText = token.getText() == null ? "" : token.getText();

-

-    int bounds[] = RutaParseUtils.getBounds(token);

-    int st = bounds[0];

-    int et = bounds[1];

-

-    String errorPrefix = "";

-

-    //

-    //

-    if (re instanceof NoViableAltException) {

-      NoViableAltException nvae = (NoViableAltException) re;

-      errorPrefix = "Syntax error: ";

-      m = errorPrefix + tokenText + nvae.grammarDecisionDescription;

-      reportProblem(line, m, st, et);

-    } else if (re instanceof MismatchedTokenException) {

-

-      errorPrefix = "Mismatched Input: ";

-      MismatchedTokenException mte = (MismatchedTokenException) re;

-      int expecting = mte.expecting;

-      String expectedToken = "";

-      if (expecting > 0) {

-        expectedToken = parser.getTokenNames()[expecting];

-        errorPrefix = errorPrefix + "Expecting \"" + expectedToken;

-        String msg = errorPrefix + "\" but found \"" + tokenText + "\".";

-        reportProblem(line, msg, st, et);

-      } else {

-        reportDefaultProblem(line, m, tokenText, st, et, errorPrefix);

-      }

-

-    } else if (re instanceof FailedPredicateException) {

-

-      errorPrefix = "Failed predicate: ";

-      reportDefaultProblem(line, m, tokenText, st, et, errorPrefix);

-

-    } else {

-      // TODO handle default syntax errors smarter:

-      String[] messages = { "Syntax Error:" + message, message };

-      if (message == null) {

-        messages[0] = re.toString();

-      }

-      DLTKToken convert = this.converter.convert(re.token);

-      // reporter.handle(CompilerOptions.OFFSET, messages, messages,

-      // st, et);

-      DefaultProblem defaultProblem = new DefaultProblem("", messages[0], 0, new String[] {},

-              ProblemSeverities.Error, st, et, re.token.getLine());

-      if (!problems.contains(defaultProblem)) {

-        reporter.reportProblem(defaultProblem);

-        problems.add(defaultProblem);

-        System.out.println(messages[0] + " ### line " + re.token.getLine());

-      }

-    }

-  }

-

-  /**

-   * @param line

-   * @param m

-   * @param tokenText

-   * @param st

-   * @param et

-   * @param errorPrefix

-   */

-  private void reportDefaultProblem(int line, String m, String tokenText, int st, int et,

-          String errorPrefix) {

-    String msg = errorPrefix + m + " : " + tokenText;

-    reportProblem(line, msg, st, et);

-  }

-

-  private void reportProblem(int line, String msg, int st, int et) {

-    DefaultProblem defaultProblem = createDefaultProblem(msg, st, et, line);

-    if (!problems.contains(defaultProblem)) {

-      reporter.reportProblem(defaultProblem);

-      problems.add(defaultProblem);

-    }

-  }

-

-  private DefaultProblem createDefaultProblem(String m, int st, int et, int line) {

-    // TODO handle filename

-    return new DefaultProblem("", m, 0, new String[] {}, ProblemSeverities.Error, st, et, line);

-  }

-

-  public void reportThrowable(Throwable extre) {

-    extre.printStackTrace();

-    // String message = extre.getLocalizedMessage();

-    // DefaultProblem defaultProblem = new DefaultProblem("", message,

-    // 0, new String[] {}, ProblemSeverities.Error, 0, 10,

-    // 0);

-    // if (!problems.contains(defaultProblem)) {

-    // reporter.reportProblem(defaultProblem);

-    // problems.add(defaultProblem);

-    // }

-  }

-

-  public void reportMessage(String msg) {

-  }

-

-  public void reportErrorOld(RecognitionException re) {

-    if (reporter == null) {

-      return;

-    }

-    if (re.token == null) {

-      System.out.println("Token is null in ErrorReporter");

-      return;

-    }

-    Token token = re.token;

-    int line = re.token.getLine();

-    int index = token.getTokenIndex();

-    if (index < 0) {

-      index = re.index;

-      TokenStream tokenStream = parser.getTokenStream();

-      try {

-        token = tokenStream.get(index - 1);

-        line = token.getLine();

-      } catch (ArrayIndexOutOfBoundsException e) {

-        e.printStackTrace();

-      }

-    }

-

-    String message = re.getMessage();

-    String m = "unknown error";

-    if (message != null) {

-      m = message;

-    }

-

-    if (re instanceof NoViableAltException) {

-      NoViableAltException ec = (NoViableAltException) re;

-      if (message == null || ec.token.getText() == null) {

-        m = ec.toString();

-      } else {

-        m = "Syntax Error:" + message + " : " + ec.token.getText();

-      }

-      String[] messages = { m };

-      int st = converter.convert(ec.token.getLine(), ec.token.getCharPositionInLine());

-      String sm = ec.token.getText();

-      int et = st + ec.token.getText().length();

-      if (st == -1)

-        return;

-      DefaultProblem defaultProblem = new DefaultProblem("", messages[0], 0, new String[] {},

-              ProblemSeverities.Error, st, et, ec.token.getLine());

-      if (!problems.contains(defaultProblem)) {

-        reporter.reportProblem(defaultProblem);

-        problems.add(defaultProblem);

-        System.out.println(messages[0] + " ### line " + ec.token.getLine());

-      }

-    } else if (re instanceof MismatchedTokenException) {

-      MismatchedTokenException ec = (MismatchedTokenException) re;

-      if (message == null || ec.token.getText() == null) {

-        m = ec.toString();

-      } else {

-        m = "mismatched input: " + message + " : " + ec.token.getText();

-      }

-      // if (message == null) {

-      // message = "mismatched input "

-      // + this.parser.getTokenErrorDisplay(ec.token);

-      // // return;

-      // }

-      String[] messages = { m }; // "Syntax Error:" + message, message,

-      // ec.token.getText() };

-      // this.converter.convert(ec.token).getColumn() - 1;

-      // String sm = ec.token.getText();

-      // st + ((sm != null) ? sm.length() : 1);

-      // TODO martin: "rewrite converter"

-      int st = converter.convert(ec.token.getLine(), ec.token.getCharPositionInLine());

-      // String sm = ec.token.getText();

-      int et = st;

-      if (ec.token.getText() != null) {

-        et = ec.token.getText().length() + st;

-        if (et >= this.converter.length()) {

-          et = this.converter.length() - 1;

-          st -= 2;

-        }

-      } else {

-        st = ((CommonToken) token).getStartIndex();

-        et = ((CommonToken) token).getStopIndex();

-      }

-      // reporter.handle(CompilerOptions.OFFSET, messages, messages,

-      // st, et);

-      DefaultProblem defaultProblem = new DefaultProblem("", messages[0], 0, new String[] {},

-              ProblemSeverities.Error, st, et, ec.line);

-      if (!problems.contains(defaultProblem)) {

-        reporter.reportProblem(defaultProblem);

-        problems.add(defaultProblem);

-        System.out.println(messages[0] + " ### line " + ec.line);

-      }

-    } else if (re instanceof FailedPredicateException) {

-      String[] messages = { "Syntax Error:" + message, message };

-      if (message == null) {

-        messages[0] = re.toString();

-      }

-      DLTKToken convert = this.converter.convert(re.token);

-      int st = convert.getColumn();

-      int et = convert.getColumn() + convert.getText().length();

-      // reporter.handle(CompilerOptions.OFFSET, messages, messages,

-      // st, et);

-      DefaultProblem defaultProblem = new DefaultProblem("", "Type not defined in this script: "

-              + convert.getText(), 0, new String[] {}, ProblemSeverities.Warning, st, et,

-              re.token.getLine());

-      if (!problems.contains(defaultProblem)) {

-        reporter.reportProblem(defaultProblem);

-        problems.add(defaultProblem);

-        System.out.println(messages[0] + " ### line " + re.token.getLine());

-      }

-    } else {

-      String[] messages = { "Syntax Error:" + message, message };

-      if (message == null) {

-        messages[0] = re.toString();

-      }

-      DLTKToken convert = this.converter.convert(re.token);

-      int st = convert.getColumn();

-      int et = convert.getColumn() + convert.getText().length();

-      // reporter.handle(CompilerOptions.OFFSET, messages, messages,

-      // st, et);

-      DefaultProblem defaultProblem = new DefaultProblem("", messages[0], 0, new String[] {},

-              ProblemSeverities.Error, st, et, re.token.getLine());

-      if (!problems.contains(defaultProblem)) {

-        reporter.reportProblem(defaultProblem);

-        problems.add(defaultProblem);

-        System.out.println(messages[0] + " ### line " + re.token.getLine());

-      }

-    }

-    // } catch (CoreException e) {

-    // if (DLTKCore.DEBUG) {

-    // e.printStackTrace();

-    // }

-    // }

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/DLTKTokenConverter.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/DLTKTokenConverter.java
deleted file mode 100644
index 87e28d4..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/DLTKTokenConverter.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import org.antlr.runtime.Token;

-import org.eclipse.dltk.ast.DLTKToken;

-

-public class DLTKTokenConverter {

-  String content;

-

-  CodeModel model;

-

-  private static class CodeModel {

-    private String[] codeLines;

-

-    private int[] codeLineLengths;

-

-    public CodeModel(String code) {

-      this.codeLines = code.split("\n");

-      int count = this.codeLines.length;

-

-      this.codeLineLengths = new int[count];

-

-      int sum = 0;

-      for (int i = 0; i < count; ++i) {

-        this.codeLineLengths[i] = sum;

-        sum += this.codeLines[i].length() + 1;

-      }

-    }

-

-    public int[] getBounds(int lineNumber) {

-      String codeLine = codeLines[lineNumber];

-

-      int start = codeLineLengths[lineNumber];

-      int end = start + codeLine.length();

-

-      return new int[] { start, end };

-    }

-  }

-

-  public DLTKTokenConverter(char[] content0) {

-    this.content = new String(content0);

-    this.model = new CodeModel(content);

-  }

-

-  @Deprecated

-  public DLTKToken convert(Token token) {

-    if (token == null) {

-      DLTKToken t = new DLTKToken(0, "");

-      t.setLine(1);

-      return t;

-    }

-    int line = token.getLine() - 1;

-    if (line < 0) {

-      line = 0;

-    }

-    int[] bounds = this.model.getBounds(line);

-    DLTKToken t = new DLTKToken(token.getType(), token.getText());

-    int offset = token.getCharPositionInLine();

-    if (offset < 0) {

-      offset = 0;

-    }

-    t.setColumn(bounds[0] + offset);

-    t.setLine(line);

-    return t;

-  }

-

-  public int convert(int line, int offset) {

-    if (line > 0) {

-      int[] bounds = this.model.getBounds(line - 1);

-      return bounds[0] + offset;

-    }

-    return offset;

-  }

-

-  @Deprecated

-  public int length() {

-    return this.content.length();

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaParseUtils.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaParseUtils.java
deleted file mode 100644
index 1eb522b..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaParseUtils.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import org.antlr.runtime.CommonToken;

-import org.antlr.runtime.Token;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.expressions.StringLiteral;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.core.IField;

-import org.eclipse.dltk.core.IMember;

-import org.eclipse.dltk.core.IMethod;

-import org.eclipse.dltk.core.IType;

-import org.eclipse.dltk.core.ModelException;

-

-public class RutaParseUtils {

-

-  public static boolean isAtLineStart(ASTNode node, String content) {

-    boolean blockStart = false;

-    int sourceStart = node.sourceStart();

-    while (sourceStart >= 0) {

-      sourceStart--;

-      char c = content.charAt(sourceStart);

-      if (Character.isWhitespace(c)) {

-        continue;

-      }

-      if (c == '\n' || c == '\r' || c == ';') {

-        return true;

-      } else if (c == '{') {

-        blockStart = true;

-      } else if (c == '}' && blockStart) {

-        return true;

-      } else {

-        return false;

-      }

-    }

-    return false;

-  }

-

-  public static int endLineOrSymbol(int from, String content) {

-    int pos = 0;

-    for (pos = from; pos < content.length(); ++pos) {

-      char c = content.charAt(pos);

-      if (c == '\n' || c == '\r' || c == ';') {

-        return pos;

-      }

-      if (!Character.isWhitespace(c)) {

-        return pos;

-      }

-    }

-    if (pos == content.length()) {

-      return pos;

-    }

-    return from;

-  }

-

-  public static int startLineOrSymbol(int from, String content) {

-    if (from == -1) {

-      from = 0;

-    }

-    if (from >= content.length())

-      from--;

-    for (int pos = from - 1; pos > 0; --pos) {

-      char c = content.charAt(pos);

-      if (c == '\n' || c == '\r' || c == ';') {

-        return pos + 1;

-      }

-      if (!Character.isWhitespace(c)) {

-        return pos + 1;

-      }

-    }

-    return from;

-  }

-

-  public static int endLineOrNoSymbol(int from, String content) {

-    int pos = 0;

-    if (from == -1) {

-      from = 0;

-    }

-    if (from >= content.length())

-      from--;

-    for (pos = from; pos < content.length(); ++pos) {

-      if (checkBounds(content, pos)) {

-        return pos;

-      }

-    }

-    if (pos == content.length()) {

-      return pos;

-    }

-    return pos;

-  }

-

-  private static boolean checkBounds(String content, int pos) {

-    char[] syms = { ' ', '\t', '\n', '\r', ']', '[', '}', '{', '(', ')' };

-    char c = content.charAt(pos);

-    for (int i = 0; i < syms.length; ++i) {

-      if (syms[i] == c) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  public static int startLineOrNoSymbol(int from, String content) {

-    if (from == -1) {

-      from = 0;

-    }

-    if (from >= content.length())

-      from--;

-    int pos;

-    for (pos = from; pos > 0; --pos) {

-      if (checkBounds(content, pos)) {

-        return pos + 1;

-      }

-    }

-    return pos;

-  }

-

-  public static String[] returnVariable(Statement node) {

-    return null;

-  }

-

-  public static SimpleReference extractVariableFromString(int sourceStart, int sourceEnd, int i,

-          String name) {

-    return null;

-  }

-

-  public static SimpleReference extractVariableFromString(StringLiteral completionNode, int pos) {

-    return null;

-  }

-

-  public static ASTNode getScopeParent(ModuleDeclaration module, Expression s) {

-    return null;

-  }

-

-  public static String processFieldName(IField field, String token) {

-    return null;

-  }

-

-  public static String processMethodName(IMethod method, String token) {

-    return null;

-  }

-

-  public static String processTypeName(IType method, String token) {

-    return null;

-  }

-

-  /**

-   * @param token

-   * @return (start, end)

-   * @throws IllegalArgumentException

-   *           when token==null or !(token instanceof CommonToken)

-   */

-  public static final int[] getBounds(Token token) throws IllegalArgumentException {

-    if (token == null) {

-      throw new IllegalArgumentException();

-    }

-    if (!(token instanceof CommonToken)) {

-      throw new IllegalArgumentException();

-    }

-    CommonToken ct = (CommonToken) token;

-    int[] bounds = { ct.getStartIndex(), ct.getStopIndex() + 1 };

-    return bounds;

-  }

-

-  /**

-   * @param tokenA

-   *          startToken

-   * @param tokenB

-   *          endToken

-   * @return positions of a.start // b.end

-   * @throws IllegalArgumentException

-   *           when some token is null or not instanceof CommonToken

-   */

-  public static final int[] getBounds(Token tokenA, Token tokenB) throws IllegalArgumentException {

-    if (!((tokenA instanceof CommonToken) && (tokenB instanceof CommonToken || tokenB == null))) {

-      throw new IllegalArgumentException();

-    }

-    CommonToken ctA = (CommonToken) tokenA;

-    if (tokenB == null) {

-      int[] bounds = { ctA.getStartIndex(), ctA.getStopIndex() + 1 };

-      return bounds;

-    } else {

-      CommonToken ctB = (CommonToken) tokenB;

-      int[] bounds = { ctA.getStartIndex(), ctB.getStopIndex() + 1 };

-      return bounds;

-    }

-  }

-

-  /**

-   * @param member

-   * @return see {@link RutaTypeConstants}, -1 if not valid

-   */

-  public static final int getTypeOfIModelElement(IMember member) {

-    int type;

-    try {

-      type = member.getFlags();

-    } catch (ModelException e) {

-      return -1;

-    }

-    type &= RutaTypeConstants.RUTA_TYPE_BITMASK;

-    return type;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceElementParser.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceElementParser.java
deleted file mode 100644
index 37a94ea..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceElementParser.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import org.apache.uima.ruta.ide.core.RutaNature;

-import org.eclipse.dltk.compiler.SourceElementRequestVisitor;

-import org.eclipse.dltk.core.AbstractSourceElementParser;

-

-public class RutaSourceElementParser extends AbstractSourceElementParser {

-

-  /*

-   * @see org.eclipse.dltk.core.AbstractSourceElementParser#createVisitor()

-   */

-  @Override

-  protected SourceElementRequestVisitor createVisitor() {

-    return new RutaSourceElementRequestVisitor(getRequestor());

-  }

-

-  /*

-   * @see org.eclipse.dltk.core.AbstractSourceElementParser#getNatureId()

-   */

-  @Override

-  protected String getNatureId() {

-    return RutaNature.NATURE_ID;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceElementRequestVisitor.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceElementRequestVisitor.java
deleted file mode 100644
index 331e23f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceElementRequestVisitor.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-

-import org.apache.uima.ruta.ide.parser.ast.RutaBasicAnnotationType;

-import org.apache.uima.ruta.ide.parser.ast.RutaImportStatement;

-import org.apache.uima.ruta.ide.parser.ast.RutaPackageDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeConstants;

-import org.apache.uima.ruta.ide.parser.ast.RutaTypeDeclaration;

-import org.apache.uima.ruta.ide.parser.ast.RutaVariableDeclaration;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.Modifiers;

-import org.eclipse.dltk.ast.PositionInformation;

-import org.eclipse.dltk.ast.declarations.Argument;

-import org.eclipse.dltk.ast.declarations.FieldDeclaration;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.ast.references.VariableReference;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.compiler.ISourceElementRequestor;

-import org.eclipse.dltk.compiler.SourceElementRequestVisitor;

-

-public class RutaSourceElementRequestVisitor extends SourceElementRequestVisitor {

-

-  private static class TypeField {

-    private String fName;

-

-    private String fInitValue;

-

-    private PositionInformation fPos;

-

-    private Expression fExpression;

-

-    private ASTNode fToNode;

-

-    private ASTNode declaredIn; // The node where the declaration was found

-

-    // (should be either class or method node)

-    TypeField(String name, String initValue, PositionInformation pos, Expression expression,

-            ASTNode toNode, ASTNode declaredIn) {

-

-      this.fName = name;

-      this.fInitValue = initValue;

-      this.fPos = pos;

-      this.fExpression = expression;

-      this.fToNode = toNode;

-      this.declaredIn = declaredIn;

-    }

-

-    String getName() {

-

-      return this.fName;

-    }

-

-    String getInitValue() {

-

-      return this.fInitValue;

-    }

-

-    PositionInformation getPos() {

-

-      return this.fPos;

-    }

-

-    Expression getExpression() {

-

-      return this.fExpression;

-    }

-

-    ASTNode getToNode() {

-

-      return this.fToNode;

-    }

-

-    @Override

-    public boolean equals(Object obj) {

-

-      if (obj instanceof TypeField) {

-        TypeField second = (TypeField) obj;

-        return second.fName.equals(this.fName) && second.fToNode.equals(this.fToNode);

-      }

-      return super.equals(obj);

-    }

-

-    @Override

-    public String toString() {

-

-      return this.fName;

-    }

-

-    public ASTNode getDeclaredIn() {

-      return declaredIn;

-    }

-

-  }

-

-  private static String ANONYMOUS_LAMBDA_FORM_MARKER = "<anonymous>";

-

-  // Used to prehold fields if adding in methods.

-  private List fNotAddedFields = new ArrayList();

-

-  private String lastLambdaFormName = ANONYMOUS_LAMBDA_FORM_MARKER;

-

-  /**

-   * Used to determine duplicate names.

-   */

-  private Map fTypeVariables = new HashMap();

-

-  //

-  public RutaSourceElementRequestVisitor(ISourceElementRequestor requestor) {

-    super(requestor);

-  }

-

-  protected String makeLanguageDependentValue(Expression value) {

-    String outValue = "";

-    return outValue;

-  }

-

-  @Override

-  protected void onEndVisitMethod(MethodDeclaration method) {

-    if (fNotAddedFields.size() >= 1) {

-      TypeField typeField = (TypeField) fNotAddedFields.get(0);

-      if (null != typeField && typeField.getDeclaredIn().equals(method)) {

-        Iterator i = this.fNotAddedFields.iterator();

-        while (i.hasNext()) {

-          TypeField field = (TypeField) i.next();

-          if (canAddVariables(field.getToNode(), field.getName())) {

-

-            PositionInformation pos = field.getPos();

-

-            ISourceElementRequestor.FieldInfo info = new ISourceElementRequestor.FieldInfo();

-            info.modifiers = Modifiers.AccStatic;

-            info.name = field.getName();

-            info.nameSourceEnd = pos.nameEnd - 2;

-            info.nameSourceStart = pos.nameStart;

-            info.declarationStart = pos.sourceStart;

-            this.fRequestor.enterField(info);

-            this.fRequestor.exitField(pos.sourceEnd);

-

-          }

-        }

-        this.fNotAddedFields.clear();

-      }

-    }

-  }

-

-  @Override

-  public boolean visit(Statement statement) throws Exception {

-    super.visit(statement);

-    if (statement instanceof RutaPackageDeclaration) {

-      this.processPackage(statement);

-      super.fNodes.pop();

-      return false;

-    }

-    if (statement instanceof FieldDeclaration) {

-      FieldDeclaration fieldDecl = (FieldDeclaration) statement;

-      processFieldDeclaration(fieldDecl.getRef(), fieldDecl);

-      super.fNodes.pop();

-      return false;

-    }

-    // TODO handle tm-import statement

-    if (statement instanceof RutaImportStatement) {

-      RutaImportStatement tmImport = (RutaImportStatement) statement;

-      super.fNodes.pop();

-      return false;

-    }

-    return true;

-  }

-

-  @Override

-  public boolean visit(Expression expression) throws Exception {

-    if (expression instanceof VariableReference) {

-      VariableReference varRef = (VariableReference) expression;

-      this.fRequestor.acceptFieldReference(varRef.getName(), varRef.sourceStart());

-    }

-    return super.visit(expression);

-  }

-

-  private void processPackage(Statement statement) {

-    RutaPackageDeclaration pack = (RutaPackageDeclaration) statement;

-    this.fRequestor.acceptPackage(pack.getNameStart(), pack.getNameEnd(), pack.getName());

-  }

-

-  private void processFieldDeclaration(SimpleReference variableIDRef, Statement fullDeclaration) {

-    int modifier = Modifiers.AccDefault;

-    if (fullDeclaration instanceof RutaVariableDeclaration) {

-      modifier = Modifiers.AccPrivate;

-      modifier |= ((RutaVariableDeclaration) fullDeclaration).getKind();

-    } else if (fullDeclaration instanceof RutaBasicAnnotationType) {

-      modifier = Modifiers.AccConstant;

-      modifier |= RutaTypeConstants.RUTA_TYPE_AT;

-    } else if (fullDeclaration instanceof RutaTypeDeclaration) {

-      modifier = Modifiers.AccPublic;

-      modifier |= RutaTypeConstants.RUTA_TYPE_AT;

-    }

-    if (canAddVariables((ASTNode) this.fNodes.peek(), variableIDRef.getName())) {

-      ISourceElementRequestor.FieldInfo info = new ISourceElementRequestor.FieldInfo();

-      info.modifiers = modifier;

-      info.name = variableIDRef.getName();

-      info.nameSourceEnd = variableIDRef.sourceEnd() - 1;

-      info.nameSourceStart = variableIDRef.sourceStart();

-      info.declarationStart = variableIDRef.sourceStart();

-      this.fRequestor.enterField(info);

-      if (fullDeclaration != null) {

-        this.fRequestor.exitField(fullDeclaration.sourceEnd());

-      } else {

-        this.fRequestor.exitField(variableIDRef.sourceEnd());

-      }

-    }

-  }

-

-  private boolean canAddVariables(ASTNode type, String name) {

-    if (this.fTypeVariables.containsKey(type)) {

-      List variables = (List) this.fTypeVariables.get(type);

-      if (variables.contains(name)) {

-        return false;

-      }

-      variables.add(name);

-      return true;

-    } else {

-      List variables = new ArrayList();

-      variables.add(name);

-      this.fTypeVariables.put(type, variables);

-      return true;

-    }

-  }

-

-  @Override

-  public boolean endvisit(Statement s) throws Exception {

-    return true;

-  }

-

-  @Override

-  public boolean visit(MethodDeclaration method) throws Exception {

-    this.fNodes.push(method);

-    List<Argument> args = method.getArguments();

-    String[] parameter = new String[args.size()];

-    for (int a = 0; a < args.size(); a++) {

-      Argument arg = args.get(a);

-      parameter[a] = arg.getName();

-    }

-

-    ISourceElementRequestor.MethodInfo mi = new ISourceElementRequestor.MethodInfo();

-    mi.parameterNames = parameter;

-    mi.name = method.getName();

-    mi.modifiers = method.getModifiers();

-    mi.nameSourceStart = method.getNameStart();

-    mi.nameSourceEnd = method.getNameEnd() - 1;

-    mi.declarationStart = method.sourceStart();

-

-    this.fInMethod = true;

-    this.fCurrentMethod = method;

-    this.fRequestor.enterMethod(mi);

-    return true;

-  }

-

-  @Override

-  public boolean visit(ModuleDeclaration declaration) throws Exception {

-    return super.visit(declaration);

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceParser.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceParser.java
deleted file mode 100644
index 92d872f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceParser.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import java.io.File;

-import java.util.ArrayList;

-import java.util.Arrays;

-import java.util.Collection;

-import java.util.List;

-import java.util.Map;

-

-import org.antlr.runtime.ANTLRStringStream;

-import org.antlr.runtime.CharStream;

-import org.antlr.runtime.CommonTokenStream;

-import org.antlr.runtime.Token;

-import org.apache.uima.ruta.descriptor.RutaDescriptorInformation;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.extensions.IRutaBlockExtension;

-import org.apache.uima.ruta.ide.core.IRutaKeywords;

-import org.apache.uima.ruta.ide.core.RutaExtensionManager;

-import org.apache.uima.ruta.ide.core.RutaKeywords;

-import org.apache.uima.ruta.ide.core.RutaKeywordsManager;

-import org.apache.uima.ruta.ide.parser.ast.RutaModuleDeclaration;

-import org.apache.uima.ruta.parser.RutaLexer;

-import org.eclipse.dltk.ast.parser.AbstractSourceParser;

-import org.eclipse.dltk.ast.parser.IModuleDeclaration;

-import org.eclipse.dltk.compiler.env.IModuleSource;

-import org.eclipse.dltk.compiler.problem.IProblemReporter;

-import org.eclipse.dltk.core.DLTKCore;

-

-public class RutaSourceParser extends AbstractSourceParser {

-

-  private CommonTokenStream tokenStream;

-

-  private IProblemReporter problemReporter = null;

-

-  public RutaSourceParser(/* IProblemReporter reporter */) {

-    // this.problemReporter = reporter;

-  }

-

-  public static class TMLexer extends RutaLexer {

-    public TMLexer(CharStream lexer) {

-      super(lexer);

-    }

-

-    @Override

-    public Token nextToken() {

-      startPos = getCharPositionInLine();

-      return super.nextToken();

-    }

-  }

-

-  public IModuleDeclaration parse(IModuleSource input, IProblemReporter reporter) {

-    return parse(input.getFileName(), input.getSourceContents(), reporter);

-  }

-

-  public IModuleDeclaration parse(String fileName, String content, IProblemReporter reporter) {

-    this.problemReporter = reporter;

-

-    RutaModuleDeclaration moduleDeclaration = new RutaModuleDeclaration(content.length(), true);

-

-    CharStream st = new ANTLRStringStream(content);

-    RutaLexer lexer = new TMLexer(st);

-

-    CommonTokenStream tokens = new CommonTokenStream(lexer);

-    this.tokenStream = tokens;

-

-    RutaParser parser = new RutaParser(this.tokenStream);

-

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.BASIC)) {

-      parser.addPredefinedType(each);

-    }

-    // TODO refacor , also in grammar

-    List<String> variables = parser.getVariables();

-    Map<String, String> variableTypes = parser.getVariableTypes();

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.CONDITION)) {

-      variables.add(each);

-      variableTypes.put(each, "CONDITION");

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.ACTION)) {

-      variables.add(each);

-      variableTypes.put(each, "ACTION");

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.BOOLEANFUNCTION)) {

-      variables.add(each);

-      variableTypes.put(each, "BOOLEANFUNCTION");

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.NUMBERFUNCTION)) {

-      variables.add(each);

-      variableTypes.put(each, "NUMBERFUNCTION");

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.STRINGFUNCTION)) {

-      variables.add(each);

-      variableTypes.put(each, "STRINGFUNCTION");

-    }

-    for (String each : RutaKeywordsManager.getKeywords(IRutaKeywords.TYPEFUNCTION)) {

-      variables.add(each);

-      variableTypes.put(each, "TYPEFUNCTION");

-    }

-    Collection<String> knownExternalBlocks = new ArrayList<String>();

-    IRutaBlockExtension[] blockExtensions = RutaExtensionManager.getDefault()

-            .getRutaBlockExtensions();

-    for (IRutaBlockExtension each : blockExtensions) {

-      String[] knownExtensions = each.getKnownExtensions();

-      knownExternalBlocks.addAll(Arrays.asList(knownExtensions));

-    }

-    parser.setKnownExternalBlocks(knownExternalBlocks);

-    parser.addPredefinedType("Document");

-    parser.addPredefinedType("Annotation");

-

-    parser.md = moduleDeclaration;

-    parser.length = content.length();

-    parser.converter = new DLTKTokenConverter(content.toCharArray());

-    parser.reporter = new DLTKRutaErrorReporter(parser.converter, problemReporter, parser);

-

-    parser.descriptor = new RutaDescriptorInformation();

-

-    moduleDeclaration.descriptorInfo = parser.descriptor;

-

-    String name = "Dynamic";

-    if (fileName != null) {

-      File fn = new File(fileName);

-      name = fn.getName();

-      int lastIndexOf = name.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);

-      if (lastIndexOf > 0) {

-        name = name.substring(0, lastIndexOf);

-      }

-    }

-    parser.descriptor.setScriptName(name);

-    try {

-      parser.file_input(name);

-    } catch (Throwable e) {

-      if (DLTKCore.DEBUG_PARSER) {

-        e.printStackTrace();

-      }

-    }

-    return moduleDeclaration;

-  }

-

-  public CommonTokenStream getTokenStream() {

-    return tokenStream;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceParserFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceParserFactory.java
deleted file mode 100644
index 6f3fb34..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaSourceParserFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import org.eclipse.dltk.ast.parser.ISourceParser;

-import org.eclipse.dltk.ast.parser.ISourceParserFactory;

-

-public class RutaSourceParserFactory implements ISourceParserFactory {

-

-  public ISourceParser createSourceParser() {

-    return new RutaSourceParser();

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaTodoParserType.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaTodoParserType.java
deleted file mode 100644
index ece1b7d..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/parser/RutaTodoParserType.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * 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.ruta.ide.core.parser;

-

-import org.apache.uima.ruta.ide.RutaIdeCorePlugin;

-import org.apache.uima.ruta.ide.parser.ast.RutaScriptBlock;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.compiler.task.ITodoTaskPreferences;

-import org.eclipse.dltk.compiler.task.TodoTaskPreferences;

-import org.eclipse.dltk.core.IScriptProject;

-import org.eclipse.dltk.core.builder.AbstractTodoTaskBuildParticipantType;

-import org.eclipse.dltk.core.builder.IBuildParticipant;

-

-public class RutaTodoParserType extends AbstractTodoTaskBuildParticipantType {

-

-  // @Override

-  // protected ITodoTaskPreferences getPreferences(IScriptProject project) {

-  // return new TodoTaskPreferencesOnPreferenceLookupDelegate(RutaIdePlugin.PLUGIN_ID,

-  // project);

-  // }

-

-  @Override

-  protected ITodoTaskPreferences getPreferences(IScriptProject project) {

-    return new TodoTaskPreferences(RutaIdeCorePlugin.getDefault().getPluginPreferences());

-  }

-

-  @Override

-  protected IBuildParticipant getBuildParticipant(ITodoTaskPreferences preferences) {

-    return new RutaTodoTaskAstParser(preferences);

-  }

-

-  private static class RutaTodoTaskAstParser extends TodoTaskBuildParticipant implements

-          IBuildParticipant {

-

-    public RutaTodoTaskAstParser(ITodoTaskPreferences preferences) {

-      super(preferences);

-    }

-

-    @Override

-    protected boolean isSimpleNode(ASTNode node) {

-      if (node instanceof RutaScriptBlock) {

-        return true;

-      }

-      return super.isSimpleNode(node);

-    }

-

-    @Override

-    protected int findCommentStart(char[] content, int begin, int end) {

-      if (!isCheckRanges()) {

-        return super.findCommentStart(content, begin, end);

-      }

-      for (int i = begin; i < end - 1; ++i) {

-        if (content[i] == '/' && isValid(i)) {

-          return i + 2;

-        }

-      }

-      return -1;

-    }

-

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/search/RutaCallProcessor.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/search/RutaCallProcessor.java
deleted file mode 100644
index cb60bac..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/search/RutaCallProcessor.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*

- * 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.ruta.ide.core.search;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.core.DLTKCore;

-import org.eclipse.dltk.core.ICallProcessor;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.ModelException;

-import org.eclipse.dltk.core.search.IDLTKSearchConstants;

-import org.eclipse.dltk.core.search.IDLTKSearchScope;

-import org.eclipse.dltk.core.search.SearchEngine;

-import org.eclipse.dltk.core.search.SearchMatch;

-import org.eclipse.dltk.core.search.SearchParticipant;

-import org.eclipse.dltk.core.search.SearchPattern;

-import org.eclipse.dltk.core.search.SearchRequestor;

-

-public class RutaCallProcessor implements ICallProcessor {

-  public final static int GENERICS_AGNOSTIC_MATCH_RULE = SearchPattern.R_EXACT_MATCH

-          | SearchPattern.R_CASE_SENSITIVE | SearchPattern.R_ERASURE_MATCH;

-

-  private SearchEngine searchEngine = new SearchEngine();

-

-  public Map process(final IModelElement parent, IModelElement element, IDLTKSearchScope scope,

-          IProgressMonitor monitor) {

-    final Map elements = new HashMap();

-    SearchRequestor requestor = new SearchRequestor() {

-

-      @Override

-      public void acceptSearchMatch(SearchMatch match) {

-        if ((match.getAccuracy() != SearchMatch.A_ACCURATE)) {

-          return;

-        }

-

-        if (match.isInsideDocComment()) {

-          return;

-        }

-

-        if (match.getElement() != null && match.getElement() instanceof IModelElement) {

-          IModelElement member = (IModelElement) match.getElement();

-          ISourceModule module = (ISourceModule) member.getAncestor(IModelElement.SOURCE_MODULE);

-          SimpleReference ref = new SimpleReference(match.getOffset(), match.getOffset()

-                  + match.getLength(), "");

-          try {

-            IModelElement[] e = module.codeSelect(match.getOffset(), 1);

-            for (int j = 0; j < e.length; ++j) {

-              if (e[j].equals(parent)) {

-                elements.put(ref, member);

-              }

-            }

-

-          } catch (ModelException e) {

-            e.printStackTrace();

-          }

-        }

-      }

-    };

-

-    SearchPattern pattern = SearchPattern.createPattern(element.getElementName(),

-            IDLTKSearchConstants.METHOD, IDLTKSearchConstants.REFERENCES,

-            GENERICS_AGNOSTIC_MATCH_RULE, scope.getLanguageToolkit());

-    try {

-      searchEngine.search(pattern,

-              new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, scope,

-              requestor, monitor);

-    } catch (CoreException e) {

-      if (DLTKCore.DEBUG) {

-        e.printStackTrace();

-      }

-    }

-    return elements;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/search/RutaMatchLocator.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/search/RutaMatchLocator.java
deleted file mode 100644
index 3f208de..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/core/search/RutaMatchLocator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*

- * 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.ruta.ide.core.search;

-

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.core.IMethod;

-import org.eclipse.dltk.core.IModelElement;

-import org.eclipse.dltk.core.IParent;

-import org.eclipse.dltk.core.ISourceModule;

-import org.eclipse.dltk.core.IType;

-import org.eclipse.dltk.core.search.matching.MatchLocator;

-import org.eclipse.dltk.internal.core.BuiltinSourceModule;

-import org.eclipse.dltk.internal.core.ExternalSourceModule;

-import org.eclipse.dltk.internal.core.Openable;

-import org.eclipse.dltk.internal.core.SourceModule;

-

-public class RutaMatchLocator extends MatchLocator {

-

-  public RutaMatchLocator() {

-    super();

-  }

-

-  @Override

-  protected IModelElement createMethodHandle(ISourceModule module, String methodName) {

-    IMethod methodHandle = null;

-    // resolveDuplicates(methodHandle);

-    return methodHandle;

-  }

-

-  @Override

-  protected IModelElement createHandle(MethodDeclaration method, IModelElement parent) {

-    if (parent instanceof IType) {

-      IType type = (IType) parent;

-      return createMethodHandle(type, new String(method.getName()));

-    } else if (parent instanceof ISourceModule) {

-      if (method.getDeclaringTypeName() != null) {

-        return createMethodHandle((ISourceModule) parent,

-                method.getDeclaringTypeName() + method.getName());

-      } else {

-        return createMethodHandle((ISourceModule) parent, method.getName());

-      }

-    }

-    return null;

-  }

-

-  @Override

-  protected IModelElement createTypeHandle(IType parent, String name) {

-    return super.createTypeHandle(parent, name);

-  }

-

-  @Override

-  protected IType createTypeHandle(String name) {

-    Openable openable = this.currentPossibleMatch.openable;

-    if (openable instanceof SourceModule || openable instanceof ExternalSourceModule

-            || openable instanceof BuiltinSourceModule) {

-      IParent e = ((IParent) openable);

-      if (name.indexOf("::") != -1) {

-        String[] split = name.split("::");

-        for (int i = 0; i < split.length; i++) {

-          if (e instanceof ISourceModule) {

-            e = ((ISourceModule) e).getType(split[i]);

-          } else if (e instanceof IType) {

-            e = ((IType) e).getType(split[i]);

-          } else {

-            e = null;

-          }

-          if (e == null) {

-            return null;

-          }

-        }

-        if (e != null && e instanceof IType) {

-          return (IType) e;

-        }

-      }

-    }

-    return super.createTypeHandle(name);

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/AbstractFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/AbstractFactory.java
deleted file mode 100644
index 38938de..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/AbstractFactory.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.List;
-
-import org.antlr.runtime.Token;
-import org.apache.uima.ruta.ide.core.parser.RutaParseUtils;
-import org.eclipse.dltk.ast.ASTNode;
-
-public abstract class AbstractFactory {
-
-  /**
-   * @param token
-   * @return (start, end)
-   * @throws IllegalArgumentException
-   *           when token==null or !(token instanceof CommonToken)
-   */
-  protected static final int[] getBounds(Token token) throws IllegalArgumentException {
-    return RutaParseUtils.getBounds(token);
-  }
-
-  /**
-   * @param tokenA
-   *          startToken
-   * @param tokenB
-   *          endToken
-   * @return positions of a.start // b.end
-   * @throws IllegalArgumentException
-   *           when some token is null or not instanceof CommonToken
-   */
-  protected static final int[] getBounds(Token tokenA, Token tokenB)
-          throws IllegalArgumentException {
-    return RutaParseUtils.getBounds(tokenA, tokenB);
-  }
-
-  /**
-   * 
-   * @param a
-   * @param b
-   * @return indexarray a.start // b.end
-   */
-  protected static final int[] getBounds(Token a, ASTNode b) {
-    int[] bounds = { 0, 0 };
-    if (a == null && b == null) {
-      return bounds;
-    }
-    if (b != null) {
-      bounds[0] = b.sourceStart();
-      bounds[1] = b.sourceEnd();
-    }
-    if (a != null) {
-      bounds[0] = Math.min(bounds[0], getBounds(a)[0]);
-      bounds[1] = Math.max(bounds[1], getBounds(a)[1]);
-    }
-    return bounds;
-  }
-
-  protected static final int[] getBounds(ASTNode a, ASTNode b) {
-    int[] bounds = { 0, 0 };
-    if (a == null && b == null) {
-      return bounds;
-    }
-    if (a != null) {
-      bounds[0] = a.sourceStart();
-      bounds[1] = a.sourceEnd();
-    }
-    if (b != null) {
-      bounds[0] = Math.min(bounds[0], b.sourceStart());
-      bounds[1] = Math.max(bounds[1], b.sourceEnd());
-    }
-    return bounds;
-  }
-
-  /**
-   * @param head
-   *          first element. determines bounds[0].
-   * @param astnodeListArray
-   *          in ascending elements order
-   * @return bounds of arguments
-   */
-  protected static final int[] getSurroundingBounds(ASTNode head, List... astnodeListArray) {
-    int bounds[] = { Integer.MAX_VALUE, -1 };
-    if (head != null) {
-      bounds[0] = head.sourceStart();
-      bounds[1] = head.sourceEnd();
-    }
-    if (astnodeListArray != null) {
-      for (int i = 0; i < astnodeListArray.length; i++) {
-        List<ASTNode> list = astnodeListArray[i];
-        if (list == null || list.isEmpty()) {
-          continue;
-        }
-        ASTNode firstNode = list.get(0);
-        if (firstNode != null) {
-          bounds[0] = Math.min(bounds[0], firstNode.sourceStart());
-        }
-
-        ASTNode lastNode = list.get(list.size() - 1);
-        if (lastNode != null) {
-          bounds[1] = Math.max(bounds[0], lastNode.sourceEnd());
-        }
-      }
-    }
-    return bounds;
-  }
-
-  protected static final void setMaxEnd(int[] bounds, Token end) {
-    if (end != null && bounds != null && bounds.length >= 1) {
-      bounds[1] = Math.max(bounds[1], getBounds(end)[1]);
-    }
-  }
-
-  protected static final void setMinBegin(int[] bounds, Token begin) {
-    if (begin != null && bounds != null && bounds.length >= 1) {
-      bounds[0] = Math.min(bounds[0], getBounds(begin)[1]);
-    }
-  }
-
-  /**
-   * Applies start/end positions of <code>Token token</code> to <code>Node node</code>
-   * 
-   * @param node
-   * @param token
-   */
-  protected static final void setBounds(ASTNode node, Token token) {
-    if (node == null || token == null) {
-      return;
-    }
-    int[] bounds = getBounds(token);
-    if (bounds == null) {
-      return;
-    }
-    node.setStart(bounds[0]);
-    node.setEnd(bounds[1]);
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ActionFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ActionFactory.java
deleted file mode 100644
index eef72c9..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ActionFactory.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.LinkedHashMap;

-import java.util.List;

-import java.util.Map;

-

-import org.antlr.runtime.Token;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.expressions.ExpressionConstants;

-

-public class ActionFactory extends AbstractFactory {

-

-  public static final String IMPLICIT = "Implicit";

-  

-  public static RutaAction createAction(Token type, List exprsRaw) {

-    int bounds[] = getBounds(type);

-    int nameStart = bounds[0];

-    int nameEnd = bounds[1];

-    List<Expression> exprs = new ArrayList<Expression>();

-    if (exprsRaw != null) {

-      for (Object expressionObj : exprsRaw) {

-        Expression expr = (Expression) expressionObj;

-        if (expr != null) {

-          exprs.add(expr);

-        }

-      }

-      if (!exprs.isEmpty()) {

-        Expression lastExpr = (Expression) exprs.get(exprs.size() - 1);

-        bounds[1] = Math.max(bounds[1], lastExpr.sourceEnd());

-      }

-    }

-    return new RutaAction(bounds[0], bounds[1], exprs, ExpressionConstants.USER_EXPRESSION_START

-            + type.getType(), type.getText(), nameStart, nameEnd);

-  }

-

-  public static RutaAction createAction(Token type, Expression... exprsArray) {

-    List<Expression> listOfExpressions = new ArrayList<Expression>();

-    if (exprsArray != null) {

-      for (int i = 0; i < exprsArray.length; i++) {

-        Expression expression = exprsArray[i];

-        if (expression != null) {

-          listOfExpressions.add(expression);

-        }

-      }

-    }

-    return createAction(type, listOfExpressions);

-  }

-

-  public static RutaAction createEmptyAction(Token token) {

-    int bounds[] = getBounds(token);

-    return new RutaAction(bounds[0], bounds[1], new ArrayList<Expression>(),

-            RutaConditionConstants.CONSTANT_OFFSET, "", bounds[0], bounds[1]);

-  }

-

-  public static RutaAction createAction(Token type, Map<Expression, Expression> map,

-          Expression... exprsArray) {

-    List<Expression> listOfExpressions = new ArrayList<Expression>();

-    // TODO add map

-    if (exprsArray != null) {

-      for (int i = 0; i < exprsArray.length; i++) {

-        Expression expression = exprsArray[i];

-        if (expression != null) {

-          listOfExpressions.add(expression);

-        }

-      }

-    }

-    return createAction(type, listOfExpressions);

-  }

-

-  public static RutaAction createCallAction(Token callToken, ComponentReference ref) {

-    return createAction(callToken, ref);

-  }

-

-  public static RutaAction createCallAction(Token callToken, ComponentReference ref, Expression list, Expression view) {

-    return createAction(callToken, ref, list, view);

-  }

-

-  public static RutaAction createStructureAction(Token type, Expression structure,

-          List<Expression> indexes, List<Expression> left, List<Expression> right) {

-    List<Expression> args = new ArrayList<Expression>();

-    if (indexes != null) {

-      args.addAll(indexes);

-    }

-    return createStructureAction(type, args, left, right, structure);

-  }

-

-  /**

-   * @param left

-   * @param bounds

-   * @param exprs

-   */

-  private static void filterNullObjsAndSetBounds(List left, int[] bounds, List<Expression> exprs) {

-    if (left != null) {

-      for (Object expressionObj : left) {

-        Expression expr = (Expression) expressionObj;

-        if (expr != null) {

-          exprs.add(expr);

-        }

-      }

-      if (!exprs.isEmpty()) {

-        Expression lastExpr = exprs.get(exprs.size() - 1);

-        bounds[1] = Math.max(bounds[1], lastExpr.sourceEnd());

-      }

-    }

-  }

-

-  public static RutaAction createLogAction(Token type, Expression logString, Token level) {

-    int[] nameBounds = getBounds(type);

-    int[] bounds;

-    int levelBounds[] = new int[] { -1, -1 };

-    if (level != null) {

-      levelBounds = getBounds(level);

-      bounds = getBounds(type, level);

-    } else {

-      bounds = getBounds(type);

-    }

-    if (logString != null) {

-      bounds[1] = Math.max(bounds[1], logString.sourceEnd());

-    }

-    List exprs = new ArrayList();

-    exprs.add(logString);

-    return new RutaLogAction(bounds[0], bounds[1], type.getText(), nameBounds[0], nameBounds[1],

-            exprs, levelBounds[0], levelBounds[1]);

-  }

-

-  public static RutaAction createStructureAction(Token type, Expression structure,

-          Expression index, Expression table, List left, List right) {

-    int bounds[] = getBounds(type);

-    int nameStart = bounds[0];

-    int nameEnd = bounds[1];

-    List<Expression> numExprs = new ArrayList<Expression>();

-    Map<Expression, Expression> assignments = new LinkedHashMap<Expression, Expression>();

-    List<Expression> indexes = new ArrayList<Expression>();

-    indexes.add(table);

-    indexes.add(index);

-    indexes.add(structure);

-    filterNullObjsAndSetBounds(indexes, bounds, numExprs);

-    if (left != null && right != null) {

-      Iterator<Expression> keysIt = left.iterator();

-      Iterator<Expression> valsIt = right.iterator();

-      Expression val = null;

-      while (keysIt.hasNext()) {

-        Expression key = keysIt.next();

-        if (!valsIt.hasNext()) {

-          break;

-        }

-        val = valsIt.next();

-        assignments.put(key, val);

-      }

-      if (val != null) {

-        bounds[1] = val.sourceEnd();

-      }

-    }

-    return new RutaStructureAction(bounds[0], bounds[1], numExprs,

-            ExpressionConstants.USER_EXPRESSION_START + type.getType(), type.getText(), nameStart,

-            nameEnd, assignments, structure);

-  }

-

-  public static RutaAction createAction(Token name, Expression f, List<Expression> list) {

-    List<Expression> list2 = new ArrayList<Expression>();

-    list2.add(f);

-    list2.addAll(list);

-    return createAction(name, list2);

-  }

-

-  public static RutaAction createAction(Token name, Expression a1, Expression a2,

-          List<Expression> list) {

-    List<Expression> complete = new ArrayList<Expression>();

-    complete.add(a1);

-    complete.add(a2);

-    complete.addAll(list);

-    return createAction(name, complete);

-  }

-

-  public static RutaAction createConfigureAction(Token name, ComponentReference ns,

-          List<Expression> left, List<Expression> right) {

-    List<Expression> exprs = new ArrayList<Expression>();

-    exprs.add(ns);

-    if (left != null && right != null) {

-      for (int i = 0; i < Math.min(left.size(), right.size()); i++) {

-        exprs.add(left.get(i));

-        exprs.add(right.get(i));

-      }

-    }

-    return createAction(name, exprs);

-  }

-

-  public static RutaAction createStructureAction(Token name, List<Expression> args,

-          List<Expression> left, List<Expression> right, Expression structure) {

-    int bounds[] = getBounds(name);

-    int nameStart = bounds[0];

-    int nameEnd = bounds[1];

-    List<Expression> numExprs = new ArrayList<Expression>();

-    Map<Expression, Expression> assignments = new LinkedHashMap<Expression, Expression>();

-    filterNullObjsAndSetBounds(args, bounds, numExprs);

-    if (left != null && right != null) {

-      Iterator<Expression> keysIt = left.iterator();

-      Iterator<Expression> valsIt = right.iterator();

-      Expression val = null;

-      while (keysIt.hasNext()) {

-        Expression key = keysIt.next();

-        if (!valsIt.hasNext()) {

-          break;

-        }

-        val = valsIt.next();

-        assignments.put(key, val);

-      }

-      if (val != null) {

-        bounds[1] = val.sourceEnd();

-      }

-    }

-    return new RutaStructureAction(bounds[0], bounds[1], numExprs,

-            ExpressionConstants.USER_EXPRESSION_START + name.getType(), name.getText(), nameStart,

-            nameEnd, assignments, structure);

-  }

-

-  public static RutaAction createAction(Expression... exprsArray) {

-    List<Expression> exprL = new ArrayList<Expression>();

-    if (exprsArray != null) {

-      for (int i = 0; i < exprsArray.length; i++) {

-        Expression expression = exprsArray[i];

-        if (expression != null) {

-          exprL.add(expression);

-        }

-      }

-    }

-    int[] bounds = getBounds(exprL.get(0), exprL.get(exprL.size() - 1));

-    return new RutaAction(bounds[0], bounds[1], exprL, ExpressionConstants.USER_EXPRESSION_START,

-            IMPLICIT, bounds[0], bounds[1]);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComponentDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComponentDeclaration.java
deleted file mode 100644
index ba4e58f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComponentDeclaration.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class ComponentDeclaration extends SimpleReference {

-

-  public static int SCRIPT = 1;

-

-  public static int ENGINE = 2;

-

-  public static int TYPESYSTEM = 3;

-

-  public static int UIMAFIT_ENGINE = 4;

-

-  private int type;

-

-  public ComponentDeclaration(int start, int end, String name) {

-    super(start, end, name);

-  }

-

-  public int getType() {

-    return type;

-  }

-

-  public void setType(int type) {

-    this.type = type;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComponentReference.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComponentReference.java
deleted file mode 100644
index af36eb0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComponentReference.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class ComponentReference extends SimpleReference {

-

-  public static int SCRIPT = 1;

-

-  public static int ENGINE = 2;

-

-  public static int TYPESYSTEM = 3;

-

-  private int type;

-

-  public ComponentReference(int start, int end, String name) {

-    super(start, end, name);

-  }

-

-  public int getType() {

-    return type;

-  }

-

-  public void setType(int type) {

-    this.type = type;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComposedRuleElement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComposedRuleElement.java
deleted file mode 100644
index ee0e942..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ComposedRuleElement.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.expressions.ExpressionConstants;

-

-public class ComposedRuleElement extends RutaRuleElement {

-  List<Expression> elements;

-

-  private Boolean disjunctive;

-

-  public ComposedRuleElement(int start, int end, List<Expression> elements,

-          List<Expression> quantifierExpressions, List<RutaCondition> conditionExpressions,

-          List<RutaAction> actionExpressions, Boolean disjunctive) {

-    super(start, end, null, quantifierExpressions, conditionExpressions, actionExpressions);

-    if (elements != null) {

-      this.elements = elements;

-    }

-    this.disjunctive = disjunctive;

-  }

-

-  @Override

-  public int getKind() {

-    return ExpressionConstants.E_CALL;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if (elements != null) {

-        for (Expression e : elements) {

-          e.traverse(visitor);

-        }

-      }

-      if (quantifierExpressions != null) {

-        for (Expression qpe : quantifierExpressions) {

-          qpe.traverse(visitor);

-        }

-      }

-      if (conditions != null) {

-        for (Expression cond : conditions) {

-          cond.traverse(visitor);

-        }

-      }

-      if (actions != null) {

-        for (Expression action : actions) {

-          action.traverse(visitor);

-        }

-      }

-      if(inlinedRules != null) {

-        for (RutaRule rule : inlinedRules) {

-          rule.traverse(visitor);

-        }

-      }

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public Expression getHead() {

-    return head;

-  }

-

-  public List<Expression> getElements() {

-    return elements;

-  }

-

-  public Boolean isDisjunctive() {

-    return disjunctive;

-  }

-

-  public void setDisjunctive(Boolean disjunctive) {

-    this.disjunctive = disjunctive;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ConditionFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ConditionFactory.java
deleted file mode 100644
index d77a8af..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ConditionFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.antlr.runtime.Token;

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class ConditionFactory extends AbstractFactory {

-

-  public static final String IMPLICIT = "Implicit";

-

-  public static RutaCondition createCondition(Token type, List exprs) {

-    int wholeConditionBounds[] = getBounds(type);

-    int nameStart = wholeConditionBounds[0];

-    int nameEnd = wholeConditionBounds[1];

-    if (exprs == null) {

-      exprs = new ArrayList<Expression>();

-    }

-    if (!exprs.isEmpty()) {

-      Expression lastExpr = (Expression) exprs.get(exprs.size() - 1);

-      if (lastExpr != null) {

-        wholeConditionBounds[1] = Math.max(wholeConditionBounds[1], lastExpr.sourceEnd());

-      }

-    }

-    return new RutaCondition(wholeConditionBounds[0], wholeConditionBounds[1], exprs,

-            RutaConditionConstants.CONSTANT_OFFSET + type.getType(), type.getText(), nameStart,

-            nameEnd);

-  }

-

-  public static RutaCondition createCondition(Expression... exprsArray) {

-    List<Expression> exprL = new ArrayList<Expression>();

-    if (exprsArray != null) {

-      for (int i = 0; i < exprsArray.length; i++) {

-        Expression expression = exprsArray[i];

-        if (expression != null) {

-          exprL.add(expression);

-        }

-      }

-    }

-    int[] bounds = getBounds(exprL.get(0), exprL.get(exprL.size() - 1));

-    return new RutaCondition(bounds[0], bounds[1], exprL, RutaConditionConstants.CONSTANT_OFFSET,

-            IMPLICIT, bounds[0], bounds[1]);

-  }

-

-  public static RutaCondition createCondition(Token type, Expression... exprsArray) {

-    List<Expression> exprL = new ArrayList<Expression>();

-    if (exprsArray != null) {

-      for (int i = 0; i < exprsArray.length; i++) {

-        Expression expression = exprsArray[i];

-        if (expression != null) {

-          exprL.add(expression);

-        }

-      }

-    }

-    return createCondition(type, exprL);

-  }

-

-  public static RutaCondition createEmptyCondition(Token token) {

-    if(token != null && token.getText().equals("->")) {

-      return null;

-    }

-    int bounds[] = getBounds(token);

-    return new RutaCondition(bounds[0], bounds[1], new ArrayList<Expression>(),

-            RutaConditionConstants.CONSTANT_OFFSET, "", bounds[0], bounds[1]);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java
deleted file mode 100644
index 59b3952..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.antlr.runtime.CommonToken;

-import org.antlr.runtime.Token;

-import org.apache.uima.ruta.parser.RutaLexer;

-import org.eclipse.dltk.ast.expressions.BooleanLiteral;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.expressions.ExpressionConstants;

-import org.eclipse.dltk.ast.expressions.FloatNumericLiteral;

-import org.eclipse.dltk.ast.expressions.NumericLiteral;

-import org.eclipse.dltk.ast.expressions.StringLiteral;

-import org.eclipse.dltk.ast.references.VariableReference;

-

-public class ExpressionFactory extends AbstractFactory implements ExpressionConstants {

-

-  /**

-   * @param ref

-   * @param kind

-   *          see {@link RutaExpressionConstants}

-   * @return

-   */

-  private static VariableReference newVariableReference(Token ref, int kind) {

-    int bounds[] = getBounds(ref);

-    return new RutaVariableReference(bounds[0], bounds[1], ref.getText(), kind);

-  }

-

-  public static VariableReference createGenericVariableReference(Token ref) {

-    return newVariableReference(ref, RutaTypeConstants.RUTA_TYPE_G);

-  }

-

-  public static RutaQuantifierLiteralExpression createQuantifierLiteralExpression(Token q, Token q2) {

-    int bounds[] = getBounds(q);

-    if (q2 != null) {

-      bounds[1] = Math.max(bounds[1], getBounds(q2)[1]);

-    }

-    return new RutaQuantifierLiteralExpression(bounds[0], bounds[1], q.getText());

-  }

-

-  // =====> BOOLEAN-EXPRESSIONS <======

-  public static Expression createBooleanExpression(Expression e) {

-    if (e == null)

-      return null;

-    return new RutaExpression(e.sourceStart(), e.sourceEnd(), e, RutaTypeConstants.RUTA_TYPE_B);

-  }

-

-  public static RutaBooleanNumberExpression createBooleanNumberExpression(Expression e1, Token op,

-          Expression e2) {

-    int lexerOpID = op.getType(); // Integer.valueOf(op.getText());

-    int operatorID = 0;

-    // convert lexer-opId to dltk-opId:

-    switch (lexerOpID) {

-      case RutaLexer.LESS:

-        operatorID = E_LT;

-        break;

-      case RutaLexer.LESSEQUAL:

-        operatorID = E_LE;

-        break;

-      case RutaLexer.GREATER:

-        operatorID = E_GT;

-        break;

-      case RutaLexer.GREATEREQUAL:

-        operatorID = E_GE;

-        break;

-      case RutaLexer.EQUAL:

-        operatorID = E_EQUAL;

-        break;

-      case RutaLexer.NOTEQUAL:

-        operatorID = E_NOT_EQUAL;

-        break;

-      default:

-        break;

-    }

-    return new RutaBooleanNumberExpression(e1.sourceStart(), e2.sourceEnd(), operatorID, e1, e2);

-  }

-

-  public static VariableReference createBooleanVariableReference(Token variableId) {

-    // int bounds[] = getBounds(variableId);

-    return newVariableReference(variableId, RutaTypeConstants.RUTA_TYPE_B);

-  }

-

-  public static BooleanLiteral createSimpleBooleanExpression(Token bToken) {

-    int bounds[] = getBounds(bToken);

-    boolean value = Boolean.valueOf(bToken.getText());

-    return new BooleanLiteral(bounds[0], bounds[1], value);

-  }

-

-  // =====> TYPE-EXPRESSIONS <======

-  public static Expression createTypeExpression(Expression e) {

-    if (e != null) {

-      return new RutaExpression(e.sourceStart(), e.sourceEnd(), e, RutaTypeConstants.RUTA_TYPE_AT);

-    }

-    return null;

-  }

-

-  public static Expression createEmptyTypeExpression(Token token) {

-    int bounds[] = getBounds(token);

-    return new RutaVariableReference(bounds[0], bounds[1], "", RutaTypeConstants.RUTA_TYPE_AT);

-  }

-

-  public static Expression createEmptyStringExpression(Token token) {

-    int bounds[] = getBounds(token);

-    return new RutaVariableReference(bounds[0], bounds[1], "", RutaTypeConstants.RUTA_TYPE_S);

-  }

-

-  public static Expression createEmptyNumberExpression(Token token) {

-    int bounds[] = getBounds(token);

-    return new RutaVariableReference(bounds[0], bounds[1], "", RutaTypeConstants.RUTA_TYPE_N);

-  }

-

-  public static Expression createEmptyBooleanExpression(Token token) {

-    int bounds[] = getBounds(token);

-    return new RutaVariableReference(bounds[0], bounds[1], "", RutaTypeConstants.RUTA_TYPE_B);

-  }

-

-  // public static Expression createSimpleTypeExpression(Token at, RutaBlock env) {

-  // int bounds[] = getBounds(at);

-  // return new RutaSimpleTypeExpression(bounds[0], bounds[1], at.getText());

-  // }

-

-  public static VariableReference createAnnotationTypeVariableReference(Token atRef) {

-    return newVariableReference(atRef, RutaTypeConstants.RUTA_TYPE_AT);

-  }

-

-  public static Expression createAnnotationTypeConstantReference(Token atBasic) {

-    int bounds[] = getBounds(atBasic);

-    return new RutaVariableReference(bounds[0], bounds[1], atBasic.getText(),

-            RutaTypeConstants.RUTA_TYPE_AT);

-    // RutaBasicAnnotationType(atBasic.getText(),bounds[0],bounds[1],bounds[0],bounds[1]);

-  }

-

-  // =====> STRING-EXPRESSIONS <======

-  public static RutaStringExpression createStringExpression(List<Expression> exprList) {

-    if (exprList == null) {

-      exprList = new ArrayList<Expression>();

-    }

-    int start = 0;

-    int end = 0;

-    if (!exprList.isEmpty()) {

-      start = exprList.get(0).sourceStart();

-      end = exprList.get(exprList.size() - 1).sourceEnd();

-    }

-    return new RutaStringExpression(start, end, exprList);

-  }

-

-  public static StringLiteral createSimpleString(Token stringToken) {

-    int bounds[] = getBounds(stringToken);

-    return new StringLiteral(bounds[0], bounds[1], stringToken.getText());

-  }

-

-  // public static RessourceReference createRessourceReference

-

-  public static VariableReference createStringVariableReference(Token variableId) {

-    return newVariableReference(variableId, RutaTypeConstants.RUTA_TYPE_S);

-  }

-

-  // =====> NUMBER-EXPRESSIONS <======

-  public static RutaExpression createNumberExpression(Expression e) {

-    return new RutaExpression(e.sourceStart(), e.sourceEnd(), e, RutaTypeConstants.RUTA_TYPE_N);

-  }

-

-  public static NumericLiteral createDecimalLiteral(Token decLit, Token minus) {

-    int bounds[] = getBounds(decLit);

-    int value = Integer.valueOf(decLit.getText()); // .getInteger(decLit.getText());

-    if (minus != null) {

-      value = -value;

-      bounds[0] = ((CommonToken) minus).getStartIndex();

-    }

-    return new NumericLiteral(bounds[0], bounds[1], value);

-  }

-

-  public static FloatNumericLiteral createFloatingPointLiteral(Token fpLit, Token minus) {

-    int bounds[] = getBounds(fpLit);

-    double value;

-    try {

-      value = Double.parseDouble(fpLit.getText());

-    } catch (NumberFormatException e) {

-      value = 0.0;

-    }

-    if (minus != null) {

-      value = -value;

-      bounds[0] = ((CommonToken) minus).getStartIndex();

-    }

-    return new FloatNumericLiteral(bounds[0], bounds[1], value);

-  }

-

-  /**

-   * Creates (local) NumberVariableReference

-   * 

-   * @param numVarRef

-   * @return new VariableReference of Token

-   */

-  public static VariableReference createNumberVariableReference(Token numVarRef) {

-    return newVariableReference(numVarRef, RutaTypeConstants.RUTA_TYPE_N);

-  }

-

-  public static Expression createNegatedNumberExpression(Token minus, Expression expr) {

-    int bounds[] = getSurroundingBounds(expr, (List<?>) null);

-    if (minus != null) {

-      bounds[0] = ((CommonToken) minus).getStartIndex();

-    }

-    return new RutaExpression(bounds[0], bounds[1], expr, RutaTypeConstants.RUTA_TYPE_N);

-  }

-

-  public static RutaBinaryArithmeticExpression createBinaryArithmeticExpr(Expression exprA,

-          Expression exprB, Token op) {

-    int bounds[] = getBounds(exprA, exprB);

-    int lexerOpID = op.getType();

-    int operatorID = 0;

-    // convert lexer-opId to dltk-opId:

-    switch (lexerOpID) {

-      case RutaLexer.STAR:

-        operatorID = ExpressionConstants.E_MULT;

-        break;

-      case RutaLexer.SLASH:

-        operatorID = ExpressionConstants.E_DIV;

-        break;

-      case RutaLexer.PERCENT:

-        operatorID = ExpressionConstants.E_MOD;

-        break;

-      case RutaLexer.PLUS:

-        operatorID = ExpressionConstants.E_PLUS;

-        break;

-      case RutaLexer.MINUS:

-        operatorID = ExpressionConstants.E_MINUS;

-        break;

-      default:

-        break;

-    }

-    return new RutaBinaryArithmeticExpression(bounds[0], bounds[1], exprA, exprB, operatorID);

-  }

-

-  public static Expression createUnaryArithmeticExpr(Expression expr, Token op) {

-    int bounds[] = getBounds(op);

-    if (expr != null) {

-      bounds[1] = expr.sourceEnd();

-    }

-    int opID = convertOpToInt(op);

-    return new RutaUnaryArithmeticExpression(bounds[0], bounds[1], expr, opID);

-  }

-

-  private static int convertOpToInt(Token opToken) {

-    return RutaExpressionConstants.opIDs.get(opToken.getText());

-  }

-

-  // TODO

-  public static Expression createBooleanFunction(Token op, Expression e1, Expression e2) {

-    return new RutaExpression(e1.sourceStart(), e2.sourceEnd(), null, RutaTypeConstants.RUTA_TYPE_B);

-  }

-

-  public static Expression createListVariableReference(Token id) {

-    return newVariableReference(id, RutaTypeConstants.RUTA_TYPE_WL);

-  }

-

-  public static Expression createTableVariableReference(Token id) {

-    return newVariableReference(id, RutaTypeConstants.RUTA_TYPE_WT);

-  }

-

-  public static Expression createRessourceReference(Token path) {

-    int bounds[] = getBounds(path);

-    String pathWithoutQuotes = path.getText();

-    pathWithoutQuotes = pathWithoutQuotes.substring(1, pathWithoutQuotes.length() - 1);

-    return new RutaRessourceReference(bounds[0], bounds[1], pathWithoutQuotes);

-  }

-

-  public static Expression createInnerListExpression(Token lBrak, List<String> inner, Token rBrak) {

-    int boundsA[] = getBounds(lBrak, rBrak);

-    StringBuffer s = new StringBuffer();

-    s.append(lBrak);

-    for (String el : inner) {

-      s.append(el);

-    }

-    s.append(rBrak);

-    return new RutaInnerListExpression(boundsA[0], boundsA[1], s.toString());

-  }

-

-  public static Expression createBooleanTypeExpression(Expression e1, Token op, Expression e2) {

-    int lexerOpID = op.getType(); // Integer.valueOf(op.getText());

-    int operatorID = 0;

-    // convert lexer-opId to dltk-opId:

-    switch (lexerOpID) {

-      case RutaLexer.EQUAL:

-        operatorID = E_EQUAL;

-        break;

-      case RutaLexer.NOTEQUAL:

-        operatorID = E_NOT_EQUAL;

-        break;

-      default:

-        break;

-    }

-    if (e1 != null && e2 != null) {

-      return new RutaBooleanTypeExpression(e1.sourceStart(), e2.sourceEnd(), operatorID, e1, e2);

-    }

-    return null;

-  }

-

-  public static Expression createListExpression(List<Expression> exprList, int type) {

-    if (exprList == null) {

-      exprList = new ArrayList<Expression>();

-    }

-    int start = 0;

-    int end = 0;

-    if (!exprList.isEmpty()) {

-      start = exprList.get(0).sourceStart();

-      Expression expression = exprList.get(exprList.size() - 1);

-      if (expression != null) {

-        end = expression.sourceEnd();

-      } else {

-        exprList.get(0).sourceEnd();

-      }

-    }

-    return new RutaListExpression(start, end, exprList, type);

-  }

-

-  public static Expression createListExpression(Token var, int type) {

-    return newVariableReference(var, type);

-  }

-

-  public static Expression createStringFunction(Token name, Expression var, List<Expression> list) {

-    list.add(0, var);

-    return createStringFunction(name, list);

-  }

-

-  public static Expression createFeatureMatch(Token feature, Token comp, Expression value) {

-    int bounds[] = getBounds(feature);

-    int end = bounds[1];

-    if (value != null) {

-      end = value.sourceEnd();

-    }

-    return new FeatureMatchExpression(bounds[0], end, feature, comp, value);

-  }

-

-  public static Expression createBooleanFunction(Token id, List<Expression> args) {

-    return createFunction(id, args, RutaTypeConstants.RUTA_TYPE_B);

-  }

-

-  public static Expression createNumberFunction(Token id, List<Expression> args) {

-    return createFunction(id, args, RutaTypeConstants.RUTA_TYPE_N);

-  }

-

-  public static Expression createStringFunction(Token id, List<Expression> args) {

-    return createFunction(id, args, RutaTypeConstants.RUTA_TYPE_S);

-  }

-

-  public static Expression createTypeFunction(Token id, List<Expression> args) {

-    return createFunction(id, args, RutaTypeConstants.RUTA_TYPE_AT);

-  }

-

-  public static RutaFunction createFunction(Token type, List<Expression> exprsRaw, int kind) {

-    int bounds[] = getBounds(type);

-    int nameStart = bounds[0];

-    int nameEnd = bounds[1];

-    List<Expression> exprs = new ArrayList<Expression>();

-    if (exprsRaw != null) {

-      for (Object expressionObj : exprsRaw) {

-        Expression expr = (Expression) expressionObj;

-        if (expr != null) {

-          exprs.add(expr);

-        }

-      }

-      if (!exprs.isEmpty()) {

-        Expression lastExpr = (Expression) exprs.get(exprs.size() - 1);

-        bounds[1] = Math.max(bounds[1], lastExpr.sourceEnd());

-      }

-    }

-    return new RutaFunction(bounds[0], bounds[1], exprs, kind, type.getText(), nameStart, nameEnd);

-  }

-

-  public static Expression createFeatureExpression(Token f) {

-    return createFeatureMatch(f, null, null);

-  }

-

-  public static Expression createStringExpression(Expression fe) {

-    List<Expression> list = new ArrayList<Expression>(1);

-    list.add(fe);

-    return createStringExpression(list);

-  }

-  public static Expression createNullExpression(Token t) {

-    int bounds[] = getBounds(t);

-    return new NullExpression(bounds[0], bounds[1]);

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/FeatureMatchExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/FeatureMatchExpression.java
deleted file mode 100644
index af32b3c..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/FeatureMatchExpression.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.antlr.runtime.Token;
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class FeatureMatchExpression extends Expression {
-
-  private final Token feature;
-
-  private final Expression value;
-
-  private Token comp;
-
-  public FeatureMatchExpression(int sourceStart, int sourceEnd, Token feature, Token comp,
-          Expression value) {
-    super(sourceStart, sourceEnd);
-    this.feature = feature;
-    this.comp = comp;
-    this.value = value;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      if (value != null) {
-        value.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  @Override
-  public int getKind() {
-    if (value == null) {
-      return -1;
-    }
-    return value.getKind();
-  }
-
-  public Token getFeature() {
-    return feature;
-  }
-  
-  public Token getComparator() {
-    return comp;
-  }
-
-  public Expression getValue() {
-    return value;
-  }
-
-  @Override
-  public String toString() {
-    return feature.getText() + (comp == null ? "" : comp.getText())
-            + (value == null ? "" : value.toString());
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/NullExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/NullExpression.java
deleted file mode 100644
index 8653b11..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/NullExpression.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-public class NullExpression extends RutaVariableReference {
-
-  public NullExpression(int start, int end) {
-    super(start, end, "null", RutaTypeConstants.RUTA_TYPE_S);
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaAbstractDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaAbstractDeclaration.java
deleted file mode 100644
index 87203efa..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaAbstractDeclaration.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.declarations.FieldDeclaration;
-import org.eclipse.dltk.ast.references.SimpleReference;
-
-public abstract class RutaAbstractDeclaration extends FieldDeclaration {
-  private SimpleReference ref;
-
-  public RutaAbstractDeclaration(String name, int nameStart, int nameEnd, int declStart,
-          int declEnd, SimpleReference ref) {
-    super(name, nameStart, nameEnd, declStart, declEnd);
-    this.setName(name);
-    this.ref = ref;
-  }
-
-  @Override
-  public SimpleReference getRef() {
-    return this.ref;
-  }
-
-  @Override
-  public int getKind() {
-    return D_VAR_DECL;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      this.ref.traverse(visitor);
-      visitor.endvisit(this);
-    }
-  }
-
-  @Override
-  public int matchStart() {
-    return this.getNameStart();
-  }
-
-  @Override
-  public int matchLength() {
-    return this.getName().length();
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaAction.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaAction.java
deleted file mode 100644
index 6bb76b4..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaAction.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaAction extends Expression {
-  protected List<Expression> exprs;
-
-  protected int kind;
-
-  private int nameStart;
-
-  public int getNameStart() {
-    return nameStart;
-  }
-
-  public int getNameEnd() {
-    return nameEnd;
-  }
-
-  private int nameEnd;
-
-  private String name;
-
-  /**
-   * @param start
-   * @param end
-   * @param exprs
-   * @param kind
-   */
-  public RutaAction(int start, int end, List<Expression> exprs, int kind, String name,
-          int nameStart, int nameEnd) {
-    super(start, end);
-    if (exprs != null) {
-      this.exprs = exprs;
-    } else {
-      this.exprs = new ArrayList<Expression>();
-    }
-    this.kind = kind;
-    this.name = name;
-    this.nameStart = nameStart;
-    this.nameEnd = nameEnd;
-  }
-
-  /**
-   * Copy-Constructor
-   * 
-   * @param source
-   */
-  public RutaAction(RutaAction source) {
-    super(source.sourceStart(), source.sourceEnd());
-    this.exprs = source.exprs;
-    this.kind = source.kind;
-  }
-
-  @Override
-  public int getKind() {
-    return this.kind;
-  }
-
-  public String getName() {
-    return this.name;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      for (Expression expr : exprs) {
-        if (expr != null) {
-          expr.traverse(visitor);
-        }
-
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  @Override
-  public List<Expression> getChilds() {
-    return exprs;
-  }
-
-  public String toString() {
-    return this.getClass().getSimpleName() + " : " + super.toString();
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaActionConstants.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaActionConstants.java
deleted file mode 100644
index aadbab3..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaActionConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.apache.uima.ruta.ide.core.parser.RutaParser;
-import org.eclipse.dltk.ast.expressions.ExpressionConstants;
-
-public interface RutaActionConstants {
-  public static final int A_CALL = ExpressionConstants.USER_EXPRESSION_START + RutaParser.CALL;
-  
-  public static final int A_EXEC = ExpressionConstants.USER_EXPRESSION_START + RutaParser.EXEC;
-
-  public static final int A_ASSIGN = ExpressionConstants.USER_EXPRESSION_START + RutaParser.ASSIGN;
-
-  public static final int A_CREATE = ExpressionConstants.USER_EXPRESSION_START + RutaParser.CREATE;
-
-  public static final int A_FILL = ExpressionConstants.USER_EXPRESSION_START + RutaParser.FILL;
-
-  public static final int A_LOG = ExpressionConstants.USER_EXPRESSION_START + RutaParser.LOG;
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBasicAnnotationType.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBasicAnnotationType.java
deleted file mode 100644
index d9bc610..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBasicAnnotationType.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.declarations.TypeDeclaration;
-
-public class RutaBasicAnnotationType extends TypeDeclaration {
-
-  public RutaBasicAnnotationType(String name, int nameStart, int nameEnd, int start, int end) {
-    super(name, nameStart, nameEnd, start, end);
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBinaryArithmeticExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBinaryArithmeticExpression.java
deleted file mode 100644
index 4e27e80..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBinaryArithmeticExpression.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.utils.CorePrinter;
-
-public class RutaBinaryArithmeticExpression extends Expression {
-  private Expression exprA;
-
-  private Expression exprB;
-
-  /**
-   * Classifies the type of Expression represented (+,-,*,...).
-   */
-  private int kind;
-
-  public RutaBinaryArithmeticExpression(int start, int end, Expression exprA, Expression exprB,
-          int kind) {
-    super(start, end);
-    this.exprA = exprA;
-    this.exprB = exprB;
-    this.kind = kind;
-  }
-
-  @Override
-  public int getKind() {
-    return this.kind;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      if (exprA != null) {
-        exprA.traverse(visitor);
-      }
-      if (exprB != null) {
-        exprB.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  @Override
-  public void printNode(CorePrinter output) {
-    output.formatPrintLn("[" + exprA.toString() + " " + getOperator() + " " + exprB.toString()
-            + "]");
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBlock.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBlock.java
deleted file mode 100644
index e3872fe..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBlock.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.List;

-

-import org.apache.commons.lang3.StringUtils;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class RutaBlock extends MethodDeclaration {

-

-  private RutaRule rule;

-

-  private String namespace;

-

-  private List<Expression> args;

-

-  public RutaBlock(String name, String namespace, int nameStart, int nameEnd, int declStart,

-          int declEnd) {

-    super(name, nameStart, nameEnd, declStart, declEnd);

-    this.namespace = StringUtils.isEmpty(namespace) ? name : namespace + "." + name;

-  }

-

-

-  public String getNamespace() {

-    return namespace;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if (rule != null) {

-        rule.traverse(visitor);

-      }

-      if(args != null) {

-        for (Expression each : args) {

-          each.traverse(visitor);

-        }

-      }

-      traverseChildNodes(visitor);

-      visitor.endvisit(this);

-    }

-  }

-

-  /**

-   * @param rule

-   *          the ruleElement to set

-   */

-  public void setRule(RutaRule rule) {

-    this.rule = rule;

-  }

-

-  /**

-   * @return the ruleElement

-   */

-  public RutaRule getRule() {

-    return rule;

-  }

-

-  public String toString() {

-    return this.getClass().getSimpleName() + " : " + super.toString();

-  }

-

-

-  public void setArguments(List<Expression> args) {

-    this.args = args;

-    

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBlockDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBlockDeclaration.java
deleted file mode 100644
index d8f64aa..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBlockDeclaration.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import org.eclipse.dltk.ast.DLTKToken;

-import org.eclipse.dltk.ast.declarations.MethodDeclaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class RutaBlockDeclaration extends MethodDeclaration {

-

-  private Expression ruleElement;

-

-  public RutaBlockDeclaration(DLTKToken type, DLTKToken name, Expression re) {

-    super(type, name);

-    this.ruleElement = re;

-  }

-

-  public Expression getRuleElement() {

-    return ruleElement;

-  }

-

-  public void setRuleElement(Expression ruleElement) {

-    this.ruleElement = ruleElement;

-  }

-

-  public String toString() {

-    return this.getClass().getSimpleName() + " : " + super.toString();

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBooleanNumberExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBooleanNumberExpression.java
deleted file mode 100644
index 309ea5c..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBooleanNumberExpression.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.utils.CorePrinter;
-
-public class RutaBooleanNumberExpression extends Expression {
-  /**
-   * <,<=,>,>=,==,...
-   */
-  private int kind;
-
-  private Expression e1;
-
-  private Expression e2;
-
-  public RutaBooleanNumberExpression(int start, int end, int operatorID, Expression e1,
-          Expression e2) {
-    super(start, end);
-    this.kind = operatorID;
-    // List list = new ArrayList<Expression>();
-    // list.add(e1);
-    // list.add(e2);
-    // exprs = new ASTListNode(start, end, list);
-    this.e1 = e1;
-    this.e2 = e2;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ast.statements.Statement#getKind()
-   */
-  @Override
-  public int getKind() {
-    return kind;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      // exprs.traverse(visitor);
-      if (e1 != null) {
-        e1.traverse(visitor);
-      }
-      if (e2 != null) {
-        e2.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  public Expression getE1() {
-    return e1;
-  }
-
-  public Expression getE2() {
-    return e2;
-  }
-
-  @Override
-  public void printNode(CorePrinter output) {
-    // exprs.printNode(output);
-    output.print("(");
-    e1.printNode(output);
-    output.print(" " + getOperator() + " ");
-    e2.printNode(output);
-    output.print(")");
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBooleanTypeExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBooleanTypeExpression.java
deleted file mode 100644
index 5711978..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaBooleanTypeExpression.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.utils.CorePrinter;
-
-public class RutaBooleanTypeExpression extends Expression {
-  /**
-   * <,<=,>,>=,==,...
-   */
-  private int kind;
-
-  private Expression e1;
-
-  private Expression e2;
-
-  public RutaBooleanTypeExpression(int start, int end, int operatorID, Expression e1, Expression e2) {
-    super(start, end);
-    this.kind = operatorID;
-    this.e1 = e1;
-    this.e2 = e2;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ast.statements.Statement#getKind()
-   */
-  @Override
-  public int getKind() {
-    return kind;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      // exprs.traverse(visitor);
-      if (e1 != null) {
-        e1.traverse(visitor);
-      }
-      if (e2 != null) {
-        e2.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  public Expression getE1() {
-    return e1;
-  }
-
-  public Expression getE2() {
-    return e2;
-  }
-
-  @Override
-  public void printNode(CorePrinter output) {
-    // exprs.printNode(output);
-    output.print("(");
-    e1.printNode(output);
-    output.print(" " + getOperator() + " ");
-    e2.printNode(output);
-    output.print(")");
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaCondition.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaCondition.java
deleted file mode 100644
index f58182b..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaCondition.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class RutaCondition extends Expression {

-  protected List<Expression> exprs;

-

-  protected int kind;

-

-  private int nameStart;

-

-  private int nameEnd;

-

-  private String name;

-

-  /**

-   * @param start

-   * @param end

-   * @param exprs

-   * @param kind

-   */

-  public RutaCondition(int start, int end, List<Expression> exprs, int kind, String name,

-          int nameStart, int nameEnd) {

-    super(start, end);

-    if (exprs != null) {

-      this.exprs = exprs;

-    } else {

-      this.exprs = new ArrayList<Expression>();

-    }

-    this.kind = kind;

-    this.name = name;

-    this.nameStart = nameStart;

-    this.nameEnd = nameEnd;

-  }

-

-  @Override

-  public int getKind() {

-    return this.kind;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      for (Iterator<Expression> iterator = exprs.iterator(); iterator.hasNext();) {

-        Expression expr = iterator.next();

-        if (expr != null) {

-          expr.traverse(visitor);

-        }

-      }

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public List<Expression> getChilds() {

-    return exprs;

-  }

-

-  public String toString() {

-    return this.getClass().getSimpleName() + " : " + super.toString();

-  }

-

-  public String getName() {

-    return name;

-  }

-

-  public int getNameStart() {

-    return nameStart;

-  }

-

-  public int getNameEnd() {

-    return nameEnd;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaConditionConstants.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaConditionConstants.java
deleted file mode 100644
index 47a1d6a..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaConditionConstants.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.apache.uima.ruta.ide.core.parser.RutaParser;
-import org.eclipse.dltk.ast.expressions.ExpressionConstants;
-
-public class RutaConditionConstants {
-  public static final int CONSTANT_OFFSET = ExpressionConstants.USER_EXPRESSION_START;
-
-  // important for formatter to handle the only condition without parantheses
-  public static final int COND_MINUS = CONSTANT_OFFSET + RutaParser.MINUS;
-
-  // public static int getConditionConstant(String str) {
-  // // RutaParser.tokenNames;
-  // return 0;
-  // }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaDeclarationsStatement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaDeclarationsStatement.java
deleted file mode 100644
index 7a45fe0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaDeclarationsStatement.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.statements.Statement;

-

-/**

- * Container for declarations,<br>

- * i.e.:<br>

- * "INT a, b, c = 2;"<br>

- * is a RutaDeclarationsStatement with 3 RutaVariableDeclarations.

- * 

- * 

- */

-public class RutaDeclarationsStatement extends Statement {

-  private List<RutaAbstractDeclaration> declarations;

-

-  private int typeTokenStart;

-

-  private int typeTokenEnd;

-

-  private Expression initExpr;

-

-  // public RutaDeclarationsStatement(int declStart, int declEnd,

-  // List<RutaAbstractDeclaration> declarations, Expression init) {

-  // this(declStart, declEnd, declarations, init, 0, 0);

-  // }

-

-  public RutaDeclarationsStatement(int stmtStart, int stmtEnd,

-          List<RutaAbstractDeclaration> declarations, Expression init, int typeTokenStart,

-          int typeTokenEnd) {

-    super(stmtStart, stmtEnd);

-    this.declarations = declarations == null ? new ArrayList<RutaAbstractDeclaration>()

-            : declarations;

-    this.initExpr = init;

-    this.typeTokenStart = typeTokenStart;

-    this.typeTokenEnd = typeTokenEnd;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if (declarations != null) {

-        for (RutaAbstractDeclaration decl : declarations) {

-          decl.traverse(visitor);

-        }

-      }

-      if (initExpr != null) {

-        initExpr.traverse(visitor);

-      }

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public int getKind() {

-    return RutaStatementConstants.S_DECLARATIONS;

-  }

-

-  public void addDeclaration(RutaAbstractDeclaration decl) {

-    if (decl != null) {

-      this.declarations.add(decl);

-    }

-  }

-

-  public int getDeclarationsCount() {

-    return this.declarations == null ? 0 : this.declarations.size();

-  }

-

-  public List<RutaAbstractDeclaration> getDeclarations() {

-    return declarations;

-  }

-

-  public Expression getInitExpr() {

-    return initExpr;

-  }

-

-  public int getTypeTokenStart() {

-    return typeTokenStart;

-  }

-

-  public int getTypeTokenEnd() {

-    return typeTokenEnd;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaDeclareDeclarationsStatement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaDeclareDeclarationsStatement.java
deleted file mode 100644
index 1af22fd..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaDeclareDeclarationsStatement.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-

-public class RutaDeclareDeclarationsStatement extends RutaDeclarationsStatement {

-  private ASTNode parent;

-  private List<RutaFeatureDeclaration> features;

-

-  public RutaDeclareDeclarationsStatement(int stmtStart, int stmtEnd,

-          List<RutaAbstractDeclaration> declarations, ASTNode parent, int typeTokenStart,

-          int typeTokenEnd, List<RutaFeatureDeclaration> features) {

-    super(stmtStart, stmtEnd, declarations, null, typeTokenStart, typeTokenEnd);

-    this.parent = parent;

-    this.features = features;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if (parent != null) {

-        parent.traverse(visitor);

-      }

-      if (getDeclarations() != null) {

-        for (RutaAbstractDeclaration decl : getDeclarations()) {

-          decl.traverse(visitor);

-        }

-      }

-      if(features != null) {

-        for (RutaFeatureDeclaration feat : features) {

-          feat.traverse(visitor);

-        }

-      }

-      

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public int getKind() {

-    return RutaStatementConstants.S_DECLARATIONS;

-  }

-

-  public ASTNode getParent() {

-    return parent;

-  }

-

-  public List<RutaFeatureDeclaration> getFeatures() {

-    return features;

-  }

-

-  public void setFeatures(List<RutaFeatureDeclaration> features) {

-    this.features = features;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpression.java
deleted file mode 100644
index 957a39f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpression.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-/**
- * Wrapper for top level expressions like number, boolean, string, type..
- * 
- * 
- */
-public class RutaExpression extends Expression {
-  private Expression expression;
-
-  private boolean inParantheses;
-
-  /**
-   * see {@link RutaTypeConstants}
-   */
-  private int type;
-
-  public RutaExpression(int sourceStart, int sourceEnd, Expression expression, int type) {
-    super(sourceStart, sourceEnd);
-    this.expression = expression;
-    this.type = type;
-    this.inParantheses = false;
-    if (expression instanceof RutaExpression) {
-      this.inParantheses = ((RutaExpression) expression).isInParantheses();
-    }
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      if (expression != null) {
-        expression.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  public Expression getExpression() {
-    return this.expression == null ? this : this.expression;
-  }
-
-  @Override
-  public int getKind() {
-    return type;
-  }
-
-  public boolean isInParantheses() {
-    return inParantheses;
-  }
-
-  public void setInParantheses(boolean inParantheses) {
-    this.inParantheses = inParantheses;
-  }
-
-  public String toString() {
-    return this.getClass().getSimpleName() + " : " + super.toString();
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpressionConstants.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpressionConstants.java
deleted file mode 100644
index 9ccc748..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpressionConstants.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.ruta.parser.RutaLexer;
-import org.eclipse.dltk.ast.expressions.ExpressionConstants;
-
-public final class RutaExpressionConstants implements ExpressionConstants {
-  public static final int E_EXP = USER_EXPRESSION_START + RutaLexer.EXP;
-
-  public static final int E_LOGN = USER_EXPRESSION_START + RutaLexer.LOGN;
-
-  public static final int E_SIN = USER_EXPRESSION_START + RutaLexer.SIN;
-
-  public static final int E_COS = USER_EXPRESSION_START + RutaLexer.COS;
-
-  public static final int E_TAN = USER_EXPRESSION_START + RutaLexer.TAN;
-
-  public static final int E_QUANTIFIER_LIT = USER_EXPRESSION_START + RutaLexer.QUESTION;
-
-  public static final int E_INNERLIST = USER_EXPRESSION_START + RutaLexer.RBRACK;
-
-  public static final int E_RESSOURCE = USER_EXPRESSION_START + RutaLexer.RessourceLiteral;
-
-  public static final String E_EXP_STR = "EXP";
-
-  public static final String E_LOGN_STR = "LOGN";
-
-  public static final String E_SIN_STR = "SIN";
-
-  public static final String E_COS_STR = "COS";
-
-  public static final String E_TAN_STR = "TAN";
-
-  public static final String E_RESSOURCE_STR = "RESSOURCE";
-
-  public static final String E_QUANTIFIER_LIT_STR = "QUANTIFIER";
-
-  public static final String E_INNERLIST_STR = "INNERLIST";
-
-  public static final Map<String, Integer> opIDs = new HashMap<String, Integer>();
-
-  static {
-    opIDs.put(E_EXP_STR, Integer.valueOf(E_EXP));
-    opIDs.put(E_LOGN_STR, Integer.valueOf(E_LOGN));
-    opIDs.put(E_SIN_STR, Integer.valueOf(E_SIN));
-    opIDs.put(E_COS_STR, Integer.valueOf(E_COS));
-    opIDs.put(E_TAN_STR, Integer.valueOf(E_TAN));
-    opIDs.put(E_RESSOURCE_STR, Integer.valueOf(E_RESSOURCE));
-    opIDs.put(E_QUANTIFIER_LIT_STR, Integer.valueOf(E_QUANTIFIER_LIT));
-    opIDs.put(E_INNERLIST_STR, Integer.valueOf(E_INNERLIST));
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpressionList.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpressionList.java
deleted file mode 100644
index 8e2d91d..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaExpressionList.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.statements.StatementConstants;

-import org.eclipse.dltk.utils.CorePrinter;

-

-public class RutaExpressionList extends Expression {

-  private List<Expression> expressions;

-

-  /**

-   * Statement with bounds from first to last expression.

-   * 

-   * @param expressions

-   */

-  public RutaExpressionList(List<Expression> expressions) {

-    if (!expressions.isEmpty()) {

-      // First

-      Expression first = expressions.get(0);

-      if (first != null) {

-        this.setStart(first.sourceStart());

-      }

-      // Last

-      Expression last = expressions.get(expressions.size() - 1);

-      if (last != null) {

-        this.setEnd(last.sourceEnd());

-      }

-    }

-    this.expressions = expressions;

-  }

-

-  /**

-   * Statement with specified bounds and expression list.

-   * 

-   * @param start

-   * @param end

-   * @param expressions

-   */

-  public RutaExpressionList(int start, int end, List<Expression> expressions) {

-    super(start, end);

-    if (expressions == null) {

-      this.expressions = new ArrayList<Expression>();

-    } else {

-      this.expressions = expressions;

-    }

-  }

-

-  public List<Expression> getExpressions() {

-    return this.expressions;

-  }

-

-  public Expression getAt(int index) {

-    if (index >= 0 && index < this.expressions.size()) {

-      return this.expressions.get(index);

-    }

-

-    return null;

-  }

-

-  public int getCount() {

-    return this.expressions.size();

-  }

-

-  @Override

-  public int getKind() {

-    return StatementConstants.S_BLOCK;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if (this.expressions != null) {

-        for (int i = 0; i < this.expressions.size(); i++) {

-          ASTNode node = this.expressions.get(i);

-          if (node != null) {

-            node.traverse(visitor);

-          }

-        }

-      }

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public void printNode(CorePrinter output) {

-    if (this.expressions != null) {

-      output.formatPrintLn("");

-      Iterator i = this.expressions.iterator();

-      while (i.hasNext()) {

-        ASTNode node = (ASTNode) i.next();

-        node.printNode(output);

-        output.formatPrintLn(" ");

-      }

-    }

-  }

-

-  @Override

-  public String toString() {

-    String value = "";

-    if (this.expressions != null) {

-      Iterator i = this.expressions.iterator();

-      while (i.hasNext()) {

-        ASTNode node = (ASTNode) i.next();

-        value += node.toString();

-        value += " ";

-      }

-    }

-

-    return value;

-  }

-

-  public void setExpressions(List<Expression> asList) {

-    if (asList != null) {

-      this.expressions = asList;

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaFeatureDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaFeatureDeclaration.java
deleted file mode 100644
index 56c05e4..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaFeatureDeclaration.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class RutaFeatureDeclaration extends RutaAbstractDeclaration {

-

-  private String type;

-

-  private ASTNode declType;

-  

-  public RutaFeatureDeclaration(String name, String type, int nameStart, int nameEnd,

-          int declStart, int declEnd, SimpleReference ref, Object declType) {

-    super(name, nameStart, nameEnd, declStart, declEnd, ref);

-    this.type = type;

-    if(declType instanceof ASTNode) {

-      this.declType = (ASTNode) declType;

-    }

-  }

-

-  

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if(declType != null) {

-        declType.traverse(visitor);

-      }

-      getRef().traverse(visitor);

-      visitor.endvisit(this);

-    }

-  }

-

-  

-  public void setType(String type) {

-    this.type = type;

-  }

-

-  public String getType() {

-    return type;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaFunction.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaFunction.java
deleted file mode 100644
index a2c9584..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaFunction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaFunction extends Expression {
-  protected List<Expression> exprs;
-
-  protected int kind;
-
-  private int nameStart;
-
-  private int nameEnd;
-
-  private String name;
-
-  /**
-   * @param start
-   * @param end
-   * @param exprs
-   * @param kind
-   */
-  public RutaFunction(int start, int end, List<Expression> exprs, int kind, String name,
-          int nameStart, int nameEnd) {
-    super(start, end);
-    if (exprs != null) {
-      this.exprs = exprs;
-    } else {
-      this.exprs = new ArrayList<Expression>();
-    }
-    this.kind = kind;
-    this.name = name;
-    this.nameStart = nameStart;
-    this.nameEnd = nameEnd;
-  }
-
-  /**
-   * Copy-Constructor
-   * 
-   * @param source
-   */
-  public RutaFunction(RutaFunction source) {
-    super(source.sourceStart(), source.sourceEnd());
-    this.exprs = source.exprs;
-    this.kind = source.kind;
-  }
-
-  @Override
-  public int getKind() {
-    return this.kind;
-  }
-
-  public String getName() {
-    return this.name;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      for (Expression expr : exprs) {
-        if (expr != null) {
-          expr.traverse(visitor);
-        }
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  @Override
-  public List<Expression> getChilds() {
-    return exprs;
-  }
-
-  public String toString() {
-    return this.getClass().getSimpleName() + " : " + super.toString();
-  }
-
-  public int getNameStart() {
-    return nameStart;
-  }
-
-  public int getNameEnd() {
-    return nameEnd;
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportExpression.java
deleted file mode 100644
index 532c3fb..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportExpression.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.expressions.ExpressionConstants;
-import org.eclipse.dltk.ast.references.SimpleReference;
-
-public class RutaImportExpression extends SimpleReference {
-
-  public RutaImportExpression(int start, int end, String name) {
-    super(start, end, name);
-  }
-
-  @Override
-  public int getKind() {
-    return ExpressionConstants.E_IMPORT;
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportStatement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportStatement.java
deleted file mode 100644
index 3d31ec9..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportStatement.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.Modifiers;
-import org.eclipse.dltk.ast.references.SimpleReference;
-
-public class RutaImportStatement extends RutaSimpleStatement {
-  private int type;
-
-  public RutaImportStatement(int sourceStart, int sourceEnd, SimpleReference importRef, int type) {
-    super(sourceStart, sourceEnd, importRef);
-    this.type = type;
-  }
-
-  @Override
-  public int getKind() {
-    return Modifiers.AccNameSpace;
-  }
-
-  /**
-   * See {@link RutaStatementConstants}
-   * 
-   * @return type of import
-   */
-  public int getType() {
-    return this.type;
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportTypesStatement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportTypesStatement.java
deleted file mode 100644
index 7b9c9f4..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaImportTypesStatement.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.antlr.runtime.Token;
-
-/**
- * AST Node for more compley statement that import type system, their types, or packages and
- * additionally consider an alias for them
- * 
- */
-public class RutaImportTypesStatement extends RutaImportStatement {
-
-  private Token typeToken;
-
-  private Token pkgToken;
-
-  private Token aliasToken;
-
-  public RutaImportTypesStatement(int sourceStart, int sourceEnd, ComponentDeclaration ts,
-          Token typeToken, Token pkgToken, Token aliasToken) {
-    super(sourceStart, sourceEnd, ts, RutaStatementConstants.S_IMPORT_TYPESYSTEM);
-    this.typeToken = typeToken;
-    this.pkgToken = pkgToken;
-    this.aliasToken = aliasToken;
-  }
-
-  public Token getTypeToken() {
-    return typeToken;
-  }
-
-  public void setTypeToken(Token typeToken) {
-    this.typeToken = typeToken;
-  }
-
-  public Token getPkgToken() {
-    return pkgToken;
-  }
-
-  public void setPkgToken(Token pkgToken) {
-    this.pkgToken = pkgToken;
-  }
-
-  public Token getAliasToken() {
-    return aliasToken;
-  }
-
-  public void setAliasToken(Token aliasToken) {
-    this.aliasToken = aliasToken;
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaInnerListExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaInnerListExpression.java
deleted file mode 100644
index 896b0c6..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaInnerListExpression.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaInnerListExpression extends Expression {
-  private String innerList;
-
-  /**
-   * @param start
-   * @param end
-   */
-  public RutaInnerListExpression(int start, int end, String inner) {
-    super(start, end);
-    this.innerList = inner == null ? "" : inner;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      visitor.endvisit(this);
-    }
-  }
-
-  @Override
-  public String getOperator() {
-    return RutaExpressionConstants.E_INNERLIST_STR;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ast.statements.Statement#getKind()
-   */
-  @Override
-  public int getKind() {
-    return RutaExpressionConstants.E_INNERLIST;
-  }
-
-  /**
-   * @param innerList
-   *          the innerList to set
-   */
-  public void setInnerList(String innerList) {
-    this.innerList = innerList;
-  }
-
-  /**
-   * @return the innerList
-   */
-  public String getInnerList() {
-    return innerList;
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaListExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaListExpression.java
deleted file mode 100644
index 9d4310f..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaListExpression.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTListNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.expressions.ExpressionConstants;

-import org.eclipse.dltk.utils.CorePrinter;

-

-public class RutaListExpression extends RutaExpression {

-  private ASTListNode exprs;

-

-  private int type;

-

-  public RutaListExpression(int start, int end, List<Expression> exprList, int type) {

-    super(start, end, null, RutaTypeConstants.RUTA_TYPE_S);

-    this.setExprs(new ASTListNode(start, end, exprList));

-    this.type = type;

-  }

-

-  @Override

-  public int getKind() {

-    return ExpressionConstants.E_CONCAT;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      this.getExprs().traverse(visitor);

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public void printNode(CorePrinter output) {

-    getExprs().printNode(output);

-  }

-

-  @Override

-  public String getOperator() {

-    return ",";

-  }

-

-  public void setExprs(ASTListNode exprs) {

-    this.exprs = exprs;

-  }

-

-  public ASTListNode getExprs() {

-    return exprs;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaLogAction.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaLogAction.java
deleted file mode 100644
index bc72f80..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaLogAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.List;
-
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaLogAction extends RutaAction {
-  int[] logLevelBounds;
-
-  boolean logLevelAssigned;
-
-  public RutaLogAction(int exprStart, int exprEnd, String name, int nameStart, int nameEnd,
-          List<Expression> exprs, int levelStart, int levelEnd) {
-    super(exprStart, exprEnd, exprs, RutaActionConstants.A_LOG, name, nameStart, nameEnd);
-    logLevelBounds = new int[2];
-    logLevelBounds[0] = levelStart;
-    logLevelBounds[1] = levelEnd;
-    if (levelStart > 0 && levelEnd > 0) {
-      logLevelAssigned = true;
-    }
-  }
-
-  /**
-   * @return may throw nullpointer if no level assigned
-   */
-  public int getLogLevelStart() {
-    return logLevelBounds[0];
-  }
-
-  /**
-   * @return may throw nullpointer if no level assigned
-   */
-  public int getLogLevelEnd() {
-    return logLevelBounds[1];
-  }
-
-  public boolean isLogLevelAssigned() {
-    return logLevelAssigned;
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaModuleDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaModuleDeclaration.java
deleted file mode 100644
index 9e05f7b..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaModuleDeclaration.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import org.apache.uima.ruta.descriptor.RutaDescriptorInformation;

-import org.eclipse.dltk.ast.declarations.ModuleDeclaration;

-

-public class RutaModuleDeclaration extends ModuleDeclaration {

-

-  public RutaDescriptorInformation descriptorInfo;

-

-  public RutaModuleDeclaration(int sourceLength) {

-    super(sourceLength);

-  }

-

-  public RutaModuleDeclaration(int length, boolean rebuild) {

-    super(length, rebuild);

-  }

-

-  public String toString() {

-    return this.getClass().getSimpleName() + " : " + super.toString();

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaPackageDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaPackageDeclaration.java
deleted file mode 100644
index 3f64c17..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaPackageDeclaration.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import org.eclipse.dltk.ast.declarations.Declaration;

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class RutaPackageDeclaration extends Declaration {

-  SimpleReference ref;

-

-  public RutaPackageDeclaration(int start, int end, SimpleReference ref) {

-    super(start, end);

-    this.setName(ref.getName());

-    this.setNameStart(ref.sourceStart());

-    this.setNameEnd(ref.sourceEnd());

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaQuantifierLiteralExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaQuantifierLiteralExpression.java
deleted file mode 100644
index 07d6b73..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaQuantifierLiteralExpression.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaQuantifierLiteralExpression extends Expression {
-  private String operator;
-
-  public RutaQuantifierLiteralExpression(int start, int end, String operator) {
-    super(start, end);
-    this.operator = operator == null ? "" : operator;
-  }
-
-  @Override
-  public String getOperator() {
-    return this.operator;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ast.statements.Statement#getKind()
-   */
-  @Override
-  public int getKind() {
-    return RutaExpressionConstants.E_QUANTIFIER_LIT;
-  }
-
-  
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      visitor.endvisit(this);
-    }
-  }
-  
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRegExpRule.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRegExpRule.java
deleted file mode 100644
index 72f158a..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRegExpRule.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.List;

-import java.util.Map;

-

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class RutaRegExpRule extends RutaRule {

-

-  private Map<Expression, Map<Expression, Expression>> feats;

-

-  public RutaRegExpRule(List<Expression> exprs, Map<Expression, Map<Expression, Expression>> fa,

-          int i) {

-    super(exprs, i);

-    this.feats = fa;

-  }

-

-  public Map<Expression, Map<Expression, Expression>> getFeats() {

-    return feats;

-  }

-

-  public void setFeats(Map<Expression, Map<Expression, Expression>> feats) {

-    this.feats = feats;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRessourceReference.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRessourceReference.java
deleted file mode 100644
index ac83da7..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRessourceReference.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.expressions.StringLiteral;
-
-public class RutaRessourceReference extends StringLiteral {
-
-  public RutaRessourceReference(int start, int end, String value) {
-    super(start, end, value);
-  }
-
-  @Override
-  public int getKind() {
-    return RutaExpressionConstants.E_RESSOURCE;
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRule.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRule.java
deleted file mode 100644
index 9a0abe5..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRule.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.List;

-

-import org.eclipse.dltk.ast.expressions.Expression;

-

-public class RutaRule extends RutaStatement {

-

-  private final int id;

-

-  public RutaRule(List<Expression> expressions, int id) {

-    super(expressions);

-    this.id = id;

-  }

-

-  public String toString() {

-    return this.getClass().getSimpleName() + " : " + super.toString();

-  }

-

-  public int getId() {

-    return id;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRuleElement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRuleElement.java
deleted file mode 100644
index 20a9ccb..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaRuleElement.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.antlr.runtime.Token;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.expressions.ExpressionConstants;

-

-public class RutaRuleElement extends Expression {

-  protected List<RutaCondition> conditions;

-

-  protected List<RutaAction> actions;

-

-  protected Expression head;

-

-  protected List<Expression> quantifierExpressions;

-  

-  protected List<RutaRule> inlinedRules;

-

-  private String inlineMode;

-

-  private boolean afterConcat;

-

-  private boolean wildcard;

-

-  // TODO to be removed

-  public RutaRuleElement(int start, int end) {

-    super(start, end);

-  }

-

-  public RutaRuleElement(int start, int end, Expression head,

-          List<Expression> quantifierPartExpressions, List<RutaCondition> conditions,

-          List<RutaAction> actions) {

-    super(start, end);

-    if (conditions != null) {

-      this.conditions = conditions;

-    } else {

-      this.conditions = new ArrayList<RutaCondition>();

-    }

-    if (actions != null) {

-      this.actions = actions;

-    } else {

-      this.actions = new ArrayList<RutaAction>();

-    }

-    if (quantifierPartExpressions != null) {

-      this.quantifierExpressions = quantifierPartExpressions;

-    } else {

-      this.quantifierExpressions = new ArrayList<Expression>();

-    }

-    this.head = head;

-  }

-

-  @Override

-  public int getKind() {

-    return ExpressionConstants.E_CALL;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if (head != null) {

-        head.traverse(visitor);

-      }

-      if (quantifierExpressions != null) {

-        for (Expression qpe : quantifierExpressions) {

-          qpe.traverse(visitor);

-        }

-      }

-      if (conditions != null) {

-        for (Expression cond : conditions) {

-          cond.traverse(visitor);

-        }

-      }

-      if (actions != null) {

-        for (Expression action : actions) {

-          action.traverse(visitor);

-        }

-      }

-      if(inlinedRules != null) {

-        for (RutaRule rule : inlinedRules) {

-          rule.traverse(visitor);

-        }

-      }

-      visitor.endvisit(this);

-    }

-  }

-

-  public Expression getHead() {

-    return head;

-  }

-

-  public List<RutaAction> getActions() {

-    return actions;

-  }

-

-  public List<RutaCondition> getConditions() {

-    return conditions;

-  }

-

-  public List<Expression> getQuantifierExpressions() {

-    return quantifierExpressions;

-  }

-

-  public String toString() {

-    return this.getClass().getSimpleName() + " : " + super.toString();

-  }

-

-  public List<RutaRule> getInlinedRules() {

-    return inlinedRules;

-  }

-

-  public void setInlinedRules(List<RutaRule> inlinedRules) {

-    if(inlinedRules != null && !inlinedRules.isEmpty()) {

-      RutaRule last = inlinedRules.get(inlinedRules.size()-1);

-      if(last != null) {

-        setEnd(last.sourceEnd());

-      }

-    }

-    this.inlinedRules = inlinedRules;

-  }

-

-  public void setInlineMode(String mode) {

-    this.inlineMode = mode;

-  }

-

-  public String getInlineMode() {

-    return inlineMode;

-  }

-

-  public void setAfterConcat(Token p) {

-    this.afterConcat = p != null;

-  }

-

-  public boolean isAfterConcat() {

-    return afterConcat;

-  }

-

-  public void setAfterConcat(boolean afterConcat) {

-    this.afterConcat = afterConcat;

-  }

-

-  public boolean isWildcard() {

-    return wildcard;

-  }

-

-  public void setWildcard(boolean wildcard) {

-    this.wildcard = wildcard;

-  }

-  

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaScript.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaScript.java
deleted file mode 100644
index bfd7533..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaScript.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-public class RutaScript {

-

-  public RutaScript(RutaScriptBlock rootBlock) {

-    // TODO Auto-generated constructor stub

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaScriptBlock.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaScriptBlock.java
deleted file mode 100644
index 5edf0cb..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaScriptBlock.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-

-public class RutaScriptBlock extends RutaBlock {

-

-  public RutaScriptBlock(String name, String namespace, int nameStart, int nameEnd, int declStart,

-          int declEnd) {

-    super(name, namespace, nameStart, nameEnd, declStart, declEnd);

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaSimpleStatement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaSimpleStatement.java
deleted file mode 100644
index 6e33d1c..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaSimpleStatement.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.ast.statements.Statement;
-
-/**
- * Simple statement with just one expression argument.
- * 
- */
-public abstract class RutaSimpleStatement extends Statement {
-  private Expression expression;
-
-  public RutaSimpleStatement(int sourceStart, int sourceEnd, Expression expression) {
-    super(sourceStart, sourceEnd);
-    this.expression = expression;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ast.statements.Statement#getKind()
-   */
-  @Override
-  public abstract int getKind();
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      if(expression != null) {
-        expression.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  public Expression getExpression() {
-    return this.expression;
-  }
-
-  public String toString() {
-    return this.getClass().getSimpleName() + " : " + super.toString();
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStatement.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStatement.java
deleted file mode 100644
index 85868ab..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStatement.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.statements.Statement;

-import org.eclipse.dltk.ast.statements.StatementConstants;

-import org.eclipse.dltk.utils.CorePrinter;

-

-public class RutaStatement extends Statement {

-  private List<Expression> expressions;

-

-  /**

-   * Statement with bounds from first to last expression.

-   * 

-   * @param expressions

-   */

-  public RutaStatement(List<Expression> expressions) {

-    if (!expressions.isEmpty()) {

-      // First

-      Expression first = expressions.get(0);

-      if (first != null) {

-        this.setStart(first.sourceStart());

-      }

-      // Last

-      Expression last = expressions.get(expressions.size() - 1);

-      if (last != null) {

-        this.setEnd(last.sourceEnd());

-      }

-    }

-    this.expressions = expressions;

-  }

-

-  /**

-   * Statement with specified bounds and expression list.

-   * 

-   * @param start

-   * @param end

-   * @param expressions

-   */

-  public RutaStatement(int start, int end, List<Expression> expressions) {

-    super(start, end);

-    if (expressions == null) {

-      this.expressions = new ArrayList<Expression>();

-    } else {

-      this.expressions = expressions;

-    }

-  }

-

-  public List<Expression> getExpressions() {

-    return this.expressions;

-  }

-

-  public Expression getAt(int index) {

-    if (index >= 0 && index < this.expressions.size()) {

-      return this.expressions.get(index);

-    }

-

-    return null;

-  }

-

-  public int getCount() {

-    return this.expressions.size();

-  }

-

-  @Override

-  public int getKind() {

-    return StatementConstants.S_BLOCK;

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      if (this.expressions != null) {

-        for (int i = 0; i < this.expressions.size(); i++) {

-          ASTNode node = this.expressions.get(i);

-          if (node != null) {

-            node.traverse(visitor);

-          }

-        }

-      }

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public void printNode(CorePrinter output) {

-    if (this.expressions != null) {

-      output.formatPrintLn("");

-      Iterator i = this.expressions.iterator();

-      while (i.hasNext()) {

-        ASTNode node = (ASTNode) i.next();

-        node.printNode(output);

-        output.formatPrintLn(" ");

-      }

-    }

-  }

-

-  @Override

-  public String toString() {

-    String value = "";

-    if (this.expressions != null) {

-      Iterator i = this.expressions.iterator();

-      while (i.hasNext()) {

-        ASTNode node = (ASTNode) i.next();

-        value += node.toString();

-        value += " ";

-      }

-    }

-

-    return value;

-  }

-

-  public void setExpressions(List<Expression> asList) {

-    this.expressions = asList;

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStatementConstants.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStatementConstants.java
deleted file mode 100644
index fc87eb0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStatementConstants.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-public interface RutaStatementConstants {
-  public static final int S_USERSTART = 1;
-
-  public static final int S_IMPORT = S_USERSTART;
-
-  public static final int S_IMPORT_TYPESYSTEM = S_IMPORT | 1 << 1;
-
-  public static final int S_IMPORT_SCRIPT = S_IMPORT | 1 << 2;
-
-  public static final int S_IMPORT_ENGINE = S_IMPORT | 1 << 3;
-
-  public static final int S_DECLARATIONS = S_USERSTART | 1 << 4;
-
-  public static final int S_IMPORT_UIMAFIT_ENGINE = S_IMPORT | 1 << 5;
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStringExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStringExpression.java
deleted file mode 100644
index 81b9b63..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStringExpression.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTListNode;

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.utils.CorePrinter;

-

-/**

- * Simple string literal or concatenation of strings / string expressions

- * 

- * 

- */

-public class RutaStringExpression extends RutaExpression {

-  private ASTListNode exprs;

-

-  public RutaStringExpression(int start, int end, List<Expression> exprList) {

-    super(start, end, null, RutaTypeConstants.RUTA_TYPE_S);

-    this.exprs = new ASTListNode(start, end, exprList);

-  }

-

-  @Override

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      this.exprs.traverse(visitor);

-    }

-  }

-

-  @Override

-  public void printNode(CorePrinter output) {

-    exprs.printNode(output);

-  }

-

-  @Override

-  public String getOperator() {

-    return "+";

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStructureAction.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStructureAction.java
deleted file mode 100644
index 2dd76d1..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaStructureAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaStructureAction extends RutaAction {
-  private Expression structure;
-
-  private Map<Expression, Expression> assignments;
-
-  public RutaStructureAction(int start, int end, List<Expression> exprs, int kind, String name,
-          int nameStart, int nameEnd, Map<Expression, Expression> assignments, Expression structure) {
-    super(start, end, exprs, kind, name, nameStart, nameEnd);
-    this.assignments = assignments;
-    this.structure = structure;
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      for (Expression e : super.exprs) {
-        e.traverse(visitor);
-      }
-      Iterator<Entry<Expression, Expression>> it = assignments.entrySet().iterator();
-      while (it.hasNext()) {
-        Map.Entry<Expression, Expression> pairs = it.next();
-        if (pairs.getKey() == null || pairs.getValue() == null) {
-          break;
-        }
-        ((Expression) pairs.getKey()).traverse(visitor);
-        ((Expression) pairs.getValue()).traverse(visitor);
-      }
-    }
-  }
-
-  @Override
-  public List<Expression> getChilds() {
-    List<Expression> l = new ArrayList<Expression>();
-    l.addAll(super.getChilds());
-    l.addAll(assignments.keySet());
-    l.addAll(assignments.values());
-    return l;
-  }
-
-  public Map<Expression, Expression> getAssignments() {
-    return assignments;
-  }
-
-  public Expression getStructure() {
-    return structure;
-  }
-
-  public List<Expression> getExpressions() {
-    return super.exprs;
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaTypeConstants.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaTypeConstants.java
deleted file mode 100644
index 1d0b8ef..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaTypeConstants.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public final class RutaTypeConstants {
-  public static final int RUTA_TYPE_BITMASK = ~((2 << 17) - 1);
-
-  /**
-   * number
-   */
-  public static final int RUTA_TYPE_N = 2 << 17;
-
-  /**
-   * integer
-   */
-  public static final int RUTA_TYPE_I = RUTA_TYPE_N | 2 << 18;
-
-  /**
-   * double
-   */
-  public static final int RUTA_TYPE_D = RUTA_TYPE_N | 2 << 19;
-
-  /**
-   * float
-   */
-  public static final int RUTA_TYPE_F = RUTA_TYPE_N | 2 << 28;
-
-  /**
-   * string
-   */
-  public static final int RUTA_TYPE_S = 2 << 20;
-
-  /**
-   * boolean
-   */
-  public static final int RUTA_TYPE_B = 2 << 21;
-
-  /**
-   * AnnotationType
-   */
-  public static final int RUTA_TYPE_AT = 2 << 22;
-
-  /**
-   * Generic
-   */
-  public static final int RUTA_TYPE_G = 2 << 23;
-
-  /**
-   * condition
-   */
-  public static final int RUTA_TYPE_C = 2 << 24;
-
-  /**
-   * external condition
-   */
-  public static final int RUTA_TYPE_CE = RUTA_TYPE_C | 2 << 25;
-
-  /**
-   * action
-   */
-  public static final int RUTA_TYPE_A = 2 << 26;
-
-  /**
-   * List
-   */
-  public static final int RUTA_TYPE_WL = 2 << 27;
-
-  /**
-   * Table
-   */
-  public static final int RUTA_TYPE_WT = (2 << 17) + 1;
-
-  public static final int RUTA_TYPE_BL = (2 << 17) + 2;
-
-  public static final int RUTA_TYPE_NL = (2 << 17) + 3;
-
-  public static final int RUTA_TYPE_SL = (2 << 17) + 4;
-
-  public static final int RUTA_TYPE_TL = (2 << 17) + 5;
-
-  public static final int RUTA_TYPE_UTL = (2 << 17) + 6;
-
-  public static final Map<Integer, String> typeStringOfInt;
-
-  static {
-    typeStringOfInt = new HashMap<Integer, String>();
-    typeStringOfInt.put(RUTA_TYPE_A, "ACTION");
-    typeStringOfInt.put(RUTA_TYPE_B, "BOOLEAN");
-    typeStringOfInt.put(RUTA_TYPE_C, "CONDITION");
-    typeStringOfInt.put(RUTA_TYPE_D, "DOUBLE");
-    typeStringOfInt.put(RUTA_TYPE_F, "FLOAT");
-    typeStringOfInt.put(RUTA_TYPE_N, "NUMBER");
-    typeStringOfInt.put(RUTA_TYPE_I, "INT");
-    typeStringOfInt.put(RUTA_TYPE_S, "STRING");
-    typeStringOfInt.put(RUTA_TYPE_WL, "WORDLIST");
-    typeStringOfInt.put(RUTA_TYPE_WT, "WORDTABLE");
-    typeStringOfInt.put(RUTA_TYPE_BL, "BOOLEANLIST");
-    typeStringOfInt.put(RUTA_TYPE_NL, "NUMBERLIST");
-    typeStringOfInt.put(RUTA_TYPE_SL, "STRINGLIST");
-    typeStringOfInt.put(RUTA_TYPE_TL, "TYPELIST");
-    typeStringOfInt.put(RUTA_TYPE_AT, "ANNOTATION_TYPE");
-    typeStringOfInt.put(RUTA_TYPE_G, "GENERIC");
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaTypeDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaTypeDeclaration.java
deleted file mode 100644
index 13d6fc0..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaTypeDeclaration.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.dltk.ast.ASTVisitor;

-import org.eclipse.dltk.ast.references.SimpleReference;

-

-public class RutaTypeDeclaration extends RutaAbstractDeclaration {

-

-  private List<RutaFeatureDeclaration> features = new ArrayList<RutaFeatureDeclaration>();

-

-  public RutaTypeDeclaration(String name, int nameStart, int nameEnd, int declStart, int declEnd,

-          SimpleReference ref) {

-    super(name, nameStart, nameEnd, declStart, declEnd, ref);

-  }

-

-  public RutaTypeDeclaration(String name, int nameStart, int nameEnd, int declStart, int declEnd,

-          SimpleReference ref, List<RutaFeatureDeclaration> features) {

-    super(name, nameStart, nameEnd, declStart, declEnd, ref);

-    this.setFeatures(features);

-  }

-

-  public void traverse(ASTVisitor visitor) throws Exception {

-    if (visitor.visit(this)) {

-      getRef().traverse(visitor);

-      for (RutaFeatureDeclaration each : getFeatures()) {

-        each.traverse(visitor);

-      }

-      visitor.endvisit(this);

-    }

-  }

-

-  @Override

-  public int getKind() {

-    return RutaTypeConstants.RUTA_TYPE_AT;

-  }

-

-  public void setFeatures(List<RutaFeatureDeclaration> features) {

-    this.features = features;

-  }

-

-  public List<RutaFeatureDeclaration> getFeatures() {

-    return features;

-  }

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaUnaryArithmeticExpression.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaUnaryArithmeticExpression.java
deleted file mode 100644
index 416d532..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaUnaryArithmeticExpression.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-
-public class RutaUnaryArithmeticExpression extends Expression {
-  private int opID;
-
-  private Expression expr;
-
-  public RutaUnaryArithmeticExpression(int start, int end, Expression expr, int opID) {
-    super(start, end);
-    this.opID = opID;
-    this.expr = expr;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.dltk.ast.statements.Statement#getKind()
-   */
-  @Override
-  public int getKind() {
-    return opID;
-  }
-
-  @Override
-  public String getOperator() {
-    Map<String, Integer> map = RutaExpressionConstants.opIDs;
-    for (Iterator iterator = map.keySet().iterator(); iterator.hasNext();) {
-      String key = (String) iterator.next();
-      Integer intID = map.get(key);
-      if (intID.equals(opID)) {
-        return key;
-      }
-    }
-    return super.getOperator();
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      if (expr != null) {
-        this.expr.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaVariableDeclaration.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaVariableDeclaration.java
deleted file mode 100644
index 9b682de..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaVariableDeclaration.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.ASTVisitor;
-import org.eclipse.dltk.ast.expressions.Expression;
-import org.eclipse.dltk.ast.references.SimpleReference;
-
-public class RutaVariableDeclaration extends RutaAbstractDeclaration {
-
-  private int type;
-
-  private boolean hasInitExpression;
-
-  private Expression initExpression;
-
-  public RutaVariableDeclaration(String name, int nameStart, int nameEnd, int declStart,
-          int declEnd, SimpleReference ref, int type) {
-    super(name, nameStart, nameEnd, declStart, declEnd, ref);
-    this.type = type;
-    hasInitExpression = false;
-  }
-
-  public RutaVariableDeclaration(String name, int nameStart, int nameEnd, int declStart,
-          int declEnd, SimpleReference ref, int type, Expression initExpression) {
-    this(name, nameStart, nameEnd, declStart, declEnd, ref, type);
-    this.initExpression = initExpression;
-    if (initExpression != null) {
-      hasInitExpression = true;
-    }
-  }
-
-  @Override
-  public void traverse(ASTVisitor visitor) throws Exception {
-    if (visitor.visit(this)) {
-      getRef().traverse(visitor);
-      if (hasInitExpression) {
-        initExpression.traverse(visitor);
-      }
-      visitor.endvisit(this);
-    }
-  }
-
-  @Override
-  public String toString() {
-    return this.getName() + ":: RutaIntVariable :: " + super.toString();
-  }
-
-  @Override
-  public int getKind() {
-    return type;
-  }
-
-  public boolean hasInitExpression() {
-    return hasInitExpression;
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaVariableReference.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaVariableReference.java
deleted file mode 100644
index 9009ba6..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/RutaVariableReference.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.ruta.ide.parser.ast;
-
-import org.eclipse.dltk.ast.references.VariableReference;
-
-public class RutaVariableReference extends VariableReference {
-  private int typeId;
-
-  /**
-   * @param start
-   * @param end
-   * @param name
-   * @param typedId
-   *          raw type id from {@link RutaTypeConstants}
-   */
-  public RutaVariableReference(int start, int end, String name, int typedId) {
-    super(start, end, name);
-    this.typeId = typedId;
-  }
-
-  public int getType() {
-    return this.typeId;
-  }
-
-  public void setType(int type) {
-    this.typeId = type;
-  }
-}
diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ScriptFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ScriptFactory.java
deleted file mode 100644
index 9b45bb9..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ScriptFactory.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.antlr.runtime.Token;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.statements.Block;

-import org.eclipse.dltk.ast.statements.Statement;

-

-public class ScriptFactory extends AbstractFactory {

-

-  private int idCounter;

-

-  public void resetRuleCounter() {

-    idCounter = 0;

-  }

-

-  public RutaRule createRule(RutaRuleElement element) {

-    List<Expression> elements = new ArrayList<Expression>();

-    elements.add(element);

-    return createRule(elements, null);

-  }

-

-  public RutaRule createImplicitRule(List<RutaAction> actions, Token end) {

-    List<Expression> elements = new ArrayList<Expression>();

-    RutaRuleElement element = createRuleElement(null, null, null, actions, end);

-    if(actions != null && !actions.isEmpty()) {

-      element.setStart(actions.get(0).sourceStart());

-    }

-    elements.add(element);

-    return createRule(elements, null);

-  }

-

-  

-  public RutaRule createRule(List<Expression> elements, Token s, boolean updateCounter) {

-    RutaRule rule = new RutaRule(elements, idCounter);

-    if (updateCounter) {

-      idCounter++;

-    }

-    if (s != null) {

-      int[] bounds = getBounds(s);

-      rule.setEnd(bounds[1]);

-    }

-    return rule;

-  }

-

-  public RutaRule createRule(List<Expression> elements, Token s) {

-    return createRule(elements, s, true);

-  }

-

-  public RutaRule createRegExpRule(List<Expression> exprs,

-          Map<Expression, Map<Expression, Expression>> fa, Token s) {

-    List<Expression> expressions = new ArrayList<Expression>();

-    for (Expression each : exprs) {

-      if (each != null) {

-        expressions.add(each);

-        Collection<Map<Expression, Expression>> values = fa.values();

-        for (Map<Expression, Expression> map : values) {

-          Set<Entry<Expression, Expression>> entrySet = map.entrySet();

-          for (Entry<Expression, Expression> entry : entrySet) {

-            expressions.add(entry.getKey());

-            expressions.add(entry.getValue());

-          }

-        }

-      }

-    }

-    RutaRegExpRule rule = new RutaRegExpRule(expressions, fa, idCounter++);

-    if (s != null) {

-      int[] bounds = getBounds(s);

-      rule.setEnd(bounds[1]);

-    }

-    return rule;

-  }

-

-  public ComposedRuleElement createComposedRuleElement(List<Expression> res, List<Expression> q,

-          List<RutaCondition> c, List<RutaAction> a, Boolean disjunctive, RutaBlock env,

-          Token... tokens) {

-    int bounds[] = getSurroundingBounds((ASTNode) null, res);

-    // taking care of null statements - errors should have been recognized

-    // in parser

-    filterNullObjects(res);

-    filterNullObjects(q);

-    filterNullObjects(c);

-    filterNullObjects(a);

-    ASTNode quantifierPart = null;

-    if (q != null && !q.isEmpty()) {

-      quantifierPart = q.get(q.size() - 1);

-    }

-    if (quantifierPart != null) {

-      bounds[1] = Math.max(bounds[1], quantifierPart.sourceEnd());

-    }

-    if (c != null && !c.isEmpty()) {

-      bounds[1] = Math.max(bounds[1], c.get(c.size() - 1).sourceEnd());

-    }

-    if (a != null && !a.isEmpty()) {

-      bounds[1] = Math.max(bounds[1], a.get(a.size() - 1).sourceEnd());

-    }

-

-    if (tokens != null && tokens.length > 0) {

-      bounds[0] = Math.min(bounds[0], getBounds(tokens[0])[0]);

-    }

-    if (tokens != null && tokens.length == 2 && tokens[1] != null) {

-      bounds[1] = Math.max(bounds[1], getBounds(tokens[1])[1]);

-    }

-    if (tokens != null && tokens.length == 3 && tokens[2] != null) {

-      bounds[1] = Math.max(bounds[1], getBounds(tokens[2])[1]);

-    }

-

-    return new ComposedRuleElement(bounds[0], bounds[1], res, q, c, a, disjunctive);

-  }

-

-  public RutaRuleElement createRuleElement(Expression head,

-          List<Expression> quantifierPartExpressions, List<RutaCondition> conditions,

-          List<RutaAction> actions, Token end) {

-    int bounds[] = getSurroundingBounds(head, conditions, actions);

-    setMaxEnd(bounds, end);

-    // taking care of null statements - errors should have been recognized

-    // in parser

-    filterNullObjects(quantifierPartExpressions);

-    filterNullObjects(conditions);

-    filterNullObjects(actions);

-    ASTNode quantifierPart = null;

-    if (quantifierPartExpressions != null && !quantifierPartExpressions.isEmpty()) {

-      quantifierPart = quantifierPartExpressions.get(quantifierPartExpressions.size() - 1);

-    }

-    if (quantifierPart != null) {

-      bounds[1] = Math.max(bounds[1], quantifierPart.sourceEnd());

-    }

-    return new RutaRuleElement(bounds[0], bounds[1], head, quantifierPartExpressions, conditions,

-            actions);

-  }

-

-  public RutaRuleElement createRuleElement(Token w, List<RutaCondition> c, List<RutaAction> a,

-          Token end) {

-    int bounds[] = getSurroundingBounds(null, c, a);

-    setMinBegin(bounds, w);

-    filterNullObjects(c);

-    filterNullObjects(a);

-    RutaRuleElement rutaRuleElement = new RutaRuleElement(bounds[0], bounds[1], null, null, c, a);

-    if (w != null && w.getText().equals("#")) {

-      rutaRuleElement.setWildcard(true);

-    }

-    return rutaRuleElement;

-  }

-

-  /**

-   * Creates Root-Block.

-   * 

-   * @param declStart

-   * @param declEnd

-   * @param nameStart

-   * @param nameEnd

-   * @param string

-   * @param res

-   * @param block

-   * @param packageString

-   * @return new RutaScriptBlock

-   */

-  public RutaScriptBlock createScriptBlock(int declStart, int declEnd, int nameStart, int nameEnd,

-          String string, List<RutaRuleElement> res, Block block, String packageString) {

-    createRule(new ArrayList<Expression>(), null);

-    return new RutaScriptBlock(string, packageString, nameStart, nameEnd, declStart, declEnd);

-  }

-

-  /**

-   * Creates Method-Blocks.<br>

-   * Please call finalizeScriptBlock afterwards.

-   * 

-   * @param id

-   * @param type

-   * @param rutaBlock

-   * @return RutaBlock

-   */

-  public RutaBlock createScriptBlock(Token id, Token type, RutaBlock rutaBlock) {

-    int[] bounds = getBounds(type, id);

-    int[] nameBounds = getBounds(id);

-    if (rutaBlock == null) {

-      RutaBlock block = new RutaBlock(id.getText(), "error", nameBounds[0], nameBounds[1],

-              bounds[0], bounds[1]);

-      return block;

-    } else {

-      RutaBlock block = new RutaBlock(id.getText(), rutaBlock.getNamespace(), nameBounds[0],

-              nameBounds[1], bounds[0], bounds[1]);

-      return block;

-    }

-  }

-

-  /**

-   * Creates an AST element for an external block construct

-   * @param type

-   * @param parent block

-   * @return new external block construct

-   */

-  public RutaBlock createExternalBlock(Token type, RutaBlock parent) {

-    int[] bounds = getBounds(type);

-    int[] nameBounds = getBounds(type);

-    RutaBlock block = new RutaBlock(type.getText(), type.getText(), nameBounds[0], nameBounds[1],

-            bounds[0], bounds[1]);

-    return block;

-  }

-

-  public void finalizeBlock(RutaBlock block, Token rc, RutaRule rule, List<Statement> body) {

-    // taking care of null statements - errors should have been recognized

-    // in parser

-    filterNullObjects(body);

-    int innerStart = 0;

-    int innerEnd = 0;

-    if (body != null && !body.isEmpty()) {

-      innerStart = body.get(0).sourceStart();

-      innerEnd = body.get(body.size() - 1).sourceEnd();

-    }

-    Block inner = new Block(innerStart, innerEnd, body);

-    block.acceptBody(inner, false);

-    block.setRule(rule);

-    block.setEnd(rc != null ? getBounds(rc)[1] : rule.sourceEnd());

-  }

-

-  /**

-   * @param body

-   */

-  private void filterNullObjects(List<?> body) {

-    if (body == null) {

-      return;

-    }

-    for (int i = 0; i < body.size(); i++) {

-      Object obj = body.get(i);

-      if (obj == null) {

-        body.remove(i);

-        i--;

-      }

-    }

-  }

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/StatementFactory.java b/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/StatementFactory.java
deleted file mode 100644
index 013d8d8..0000000
--- a/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/StatementFactory.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*

- * 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.ruta.ide.parser.ast;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.antlr.runtime.CommonToken;

-import org.antlr.runtime.Token;

-import org.eclipse.dltk.ast.ASTNode;

-import org.eclipse.dltk.ast.declarations.Declaration;

-import org.eclipse.dltk.ast.expressions.Expression;

-import org.eclipse.dltk.ast.references.SimpleReference;

-import org.eclipse.dltk.ast.statements.Statement;

-

-public class StatementFactory extends AbstractFactory {

-  /**

-   * @param component

-   * @param impString - import string

-   * @param type - type of import

-   * @return new Import-Statement

-   */

-  public static RutaImportStatement createImport(ComponentDeclaration component, Token impString,

-          int type) {

-    int bounds[] = getBounds(impString, component);

-    return new RutaImportStatement(bounds[0], bounds[1], component, type);

-  }

-

-  public static ComponentDeclaration createEmptyComponentDeclaration(Token t) {

-    int bounds[] = getBounds(t);

-    bounds[0] = bounds[1] + 1;

-    bounds[1] = bounds[0];

-    return new ComponentDeclaration(bounds[0], bounds[1], "");

-  }

-

-  public static RutaImportStatement createImportTypeSystem(ComponentDeclaration dottedId,

-          Token impString) {

-    dottedId.setType(ComponentDeclaration.TYPESYSTEM);

-    return createImport(dottedId, impString, RutaStatementConstants.S_IMPORT_TYPESYSTEM);

-  }

-

-  public static Statement createImportType(Token importToken, Token type, ComponentDeclaration ts,

-          Token alias) {

-    int bounds[] = getBounds(importToken, type);

-    if(ts != null) {

-      bounds = getBounds(importToken, ts);

-    }

-    if(alias != null) {

-      bounds = getBounds(importToken, alias);

-    }

-    return new RutaImportTypesStatement(bounds[0], bounds[1], ts, type, null, alias);

-  }

-

-  public static Statement createImportAllPackagew(Token importToken, ComponentDeclaration ts, Token alias) {

-    int bounds[] = getBounds(importToken, ts);

-    if(alias != null) {

-      bounds = getBounds(importToken, alias);

-    }

-    return new RutaImportTypesStatement(bounds[0], bounds[1], ts, null, null, alias);

-  }

-

-  public static Statement createImportPackage(Token importToken, Token pkg, ComponentDeclaration ts,

-          Token alias) {

-    int bounds[] = getBounds(importToken, pkg);

-    if(ts != null) {

-      bounds = getBounds(importToken, ts);

-    }

-    if(alias != null) {

-      bounds = getBounds(importToken, alias);

-    }

-    return new RutaImportTypesStatement(bounds[0], bounds[1], ts, null, pkg, alias);

-  }

-  

-  

-  public static RutaImportStatement createImportScript(ComponentDeclaration dottedId,

-          Token impString) {

-    if (dottedId != null) {

-      dottedId.setType(ComponentDeclaration.SCRIPT);

-    }

-    return createImport(dottedId, impString, RutaStatementConstants.S_IMPORT_SCRIPT);

-  }

-

-  public static RutaImportStatement createImportEngine(ComponentDeclaration dottedId,

-          Token impString) {

-    dottedId.setType(ComponentDeclaration.ENGINE);

-    int kind = RutaStatementConstants.S_IMPORT_ENGINE;

-    if (impString != null) {

-      String text = impString.getText();

-      if ("UIMAFIT".equals(text)) {

-        kind = RutaStatementConstants.S_IMPORT_UIMAFIT_ENGINE;

-        dottedId.setType(ComponentDeclaration.UIMAFIT_ENGINE);

-      }

-    }

-    return createImport(dottedId, impString, kind);

-  }

-

-  /**

-   * @param pString

-   *          Antlr-Token "PACKAGE"

-   * @param dottedId

-   *          Antlr-Token (dotted-identifier/id)

-   * @return new RutaPackageDeclaration

-   */

-  public static RutaPackageDeclaration createPkgDeclaration(Token dottedId, Token pString) {

-    int bounds[] = getBounds(pString, dottedId);

-    int nameBounds[] = new int[2];

-    if (dottedId != null) {

-      nameBounds = getBounds(dottedId);

-    }

-    SimpleReference ref = new SimpleReference(nameBounds[0], nameBounds[1], dottedId == null ? ""

-            : dottedId.getText());

-    return new RutaPackageDeclaration(bounds[0], bounds[1], ref);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  private static RutaVariableDeclaration createVariable(Token id, Token typeToken, int type) {

-    return createVariable(id, typeToken, type, null);

-  }

-

-  private static RutaVariableDeclaration createVariable(Token id, Token typeToken, int type,

-          Expression expr) {

-    int declBounds[] = getBounds(typeToken, id);

-    int nameBounds[] = getBounds(id);

-    // FieldDeclaration

-    SimpleReference ref = new RutaVariableReference(nameBounds[0], nameBounds[1], id.getText(),

-            type);

-    return new RutaVariableDeclaration(id.getText(), nameBounds[0], nameBounds[1], declBounds[0],

-            declBounds[1], ref, type, expr);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  public static RutaVariableDeclaration createIntVariable(Token id, Token type) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_I);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new variable

-   */

-  public static Object createFloatVariable(Token id, Token type) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_F);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  public static RutaVariableDeclaration createDoubleVariable(Token id, Token type) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_D);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  public static RutaVariableDeclaration createStringVariable(Token id, Token type) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_S);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  public static RutaVariableDeclaration createBooleanVariable(Token id, Token type) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_B);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  public static RutaVariableDeclaration createTypeVariable(Token id, Token type) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_AT);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  public static RutaVariableDeclaration createListVariable(Token id, Token type, Expression expr) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_WL, expr);

-  }

-

-  /**

-   * @param id

-   * @param type

-   * @return new RutaVariableDeclaration

-   */

-  public static RutaVariableDeclaration createTableVariable(Token id, Token type, Expression expr) {

-    return createVariable(id, type, RutaTypeConstants.RUTA_TYPE_WT, expr);

-  }

-

-  /**

-   * @param id

-   * @param declareToken

-   * @param type

-   * @param features

-   * @return new Declaration

-   */

-

-  public static Declaration createAnnotationType(Token id, Token declareToken, Expression type,

-          List<RutaFeatureDeclaration> features) {

-

-    int declBounds[] = getBounds(declareToken, id);

-    if (features != null && !features.isEmpty()) {

-      declBounds = getBounds(declareToken, features.get(features.size() - 1));

-    }

-    int nameBounds[] = getBounds(id);

-    // FieldDeclarartion

-

-    SimpleReference ref = new RutaVariableReference(nameBounds[0], nameBounds[1], id.getText(),

-            RutaTypeConstants.RUTA_TYPE_AT);

-    return new RutaTypeDeclaration(id.getText(), nameBounds[0], nameBounds[1], declBounds[0],

-            declBounds[1], ref, features);

-  }

-

-  public static Declaration createAnnotationType(Token id, Token declareToken) {

-    int declBounds[] = getBounds(declareToken, id);

-    int nameBounds[] = getBounds(id);

-

-    SimpleReference ref = new RutaVariableReference(nameBounds[0], nameBounds[1], id.getText(),

-            RutaTypeConstants.RUTA_TYPE_AT);

-    return new RutaTypeDeclaration(id.getText(), nameBounds[0], nameBounds[1], declBounds[0],

-            declBounds[1], ref);

-  }

-

-  public static RutaFeatureDeclaration createFeatureDeclaration(Object eachTO, Token eachName) {

-    int declBounds[] = { 0, 0 };

-    String type = "";

-    if (eachTO instanceof ASTNode) {

-      ASTNode node = (ASTNode) eachTO;

-      type = node.toString();

-      declBounds = getBounds(eachName, node);

-    } else if (eachTO instanceof Token) {

-      Token token = (Token) eachTO;

-      type = token.getText();

-      declBounds = getBounds(eachName, token);

-    }

-    int nameBounds[] = getBounds(eachName);

-    SimpleReference ref = new SimpleReference(nameBounds[0], nameBounds[1], eachName.getText());

-    return new RutaFeatureDeclaration(eachName.getText(), type, nameBounds[0], nameBounds[1],

-            declBounds[0], declBounds[1], ref, eachTO);

-  }

-

-  @SuppressWarnings("unchecked")

-  public static Statement createDeclareDeclarationsStatement(Token declareToken, List declarations,

-          ASTNode parent) {

-    return createDeclareDeclarationsStatement(declareToken, declarations, parent, new ArrayList<RutaFeatureDeclaration>(0));

-  }

-  

-  public static Statement createDeclareDeclarationsStatement(Token declareToken, List declarations,

-          ASTNode parent, List<RutaFeatureDeclaration> features) {

-    List<RutaAbstractDeclaration> decls = declarations;

-    for (RutaAbstractDeclaration d : decls) {

-      if (d == null) {

-        decls.remove(d);

-      }

-    }

-    int declBounds[] = getBounds(declareToken);

-    int statementBounds[] = getBounds(declareToken);

-    if (parent != null) {

-      statementBounds[1] = Math.max(statementBounds[1], parent.sourceEnd());

-    } else {

-      int end = decls.get(decls.size() - 1).sourceEnd();

-      statementBounds[1] = Math.max(statementBounds[1], end);

-    }

-    if(features != null && !features.isEmpty()) {

-      int end = features.get(features.size() - 1).sourceEnd();

-      statementBounds[1] = Math.max(statementBounds[1], end);

-    }

-    return new RutaDeclareDeclarationsStatement(statementBounds[0], statementBounds[1],

-            decls, parent, declBounds[0], declBounds[1], features);

-  }

-  

-

-  @SuppressWarnings("unchecked")

-  public static Statement createDeclarationsStatement(Token declareToken, List declarations,

-          Expression init) {

-    List<RutaAbstractDeclaration> decls = declarations;

-    for (RutaAbstractDeclaration d : decls) {

-      if (d == null) {

-        decls.remove(d);

-      }

-    }

-    int declBounds[] = getBounds(declareToken);

-    int statementBounds[] = getBounds(declareToken);

-    if (init != null) {

-      statementBounds[1] = Math.max(statementBounds[1], init.sourceEnd());

-    } else {

-      int end = decls.get(decls.size() - 1).sourceEnd();

-      statementBounds[1] = Math.max(statementBounds[1], end);

-    }

-    return new RutaDeclarationsStatement(statementBounds[0], statementBounds[1], declarations,

-            init, declBounds[0], declBounds[1]);

-  }

-

-  @SuppressWarnings("unchecked")

-  public static Statement createDeclarationsStatement(Token declareToken, List declarations) {

-    return createDeclarationsStatement(declareToken, declarations, null);

-  }

-

-  @SuppressWarnings("unchecked")

-  public static Statement createDeclarationsStatement(Token declareToken,

-          RutaAbstractDeclaration declaration, Expression init) {

-    List decl = new ArrayList<RutaAbstractDeclaration>();

-    return createDeclarationsStatement(declareToken, decl, init);

-  }

-

-  public static Statement createComposedVariableConditionDeclaration(Token id,

-          List<RutaCondition> conditions) {

-    return null;

-  }

-

-  public static Statement createComposedVariableActionDeclaration(Token id, List<RutaAction> actions) {

-    return null;

-  }

-

-  public static Object createVarListVariable(Token id, Token token, Expression expr, int type) {

-    return createVariable(id, token, type, expr);

-  }

-

-  public static ComponentReference createComponentReference(CommonToken ct) {

-    int nameBounds[] = getBounds(ct);

-    return new ComponentReference(nameBounds[0], nameBounds[1], ct.getText());

-  }

-

-  public static ComponentReference createEmtpyComponentReference(Token t) {

-    int nameBounds[] = getBounds(t);

-    nameBounds[0] = nameBounds[1];

-    nameBounds[1] = nameBounds[0];

-    return new ComponentReference(nameBounds[0], nameBounds[1], "");

-  }

-

-  public static ComponentDeclaration createComponentDeclaration(Token ct) {

-    int nameBounds[] = getBounds(ct);

-    String text = ct.getText();

-    return new ComponentDeclaration(nameBounds[0], nameBounds[0] + text.length(), text);

-  }

-

-

-

-}

diff --git a/trunk/ruta-ep-ide/src/main/readme_bin/LICENSE b/trunk/ruta-ep-ide/src/main/readme_bin/LICENSE
deleted file mode 100644
index 042b481..0000000
--- a/trunk/ruta-ep-ide/src/main/readme_bin/LICENSE
+++ /dev/null
@@ -1,205 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/core/packages/messages.properties b/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/core/packages/messages.properties
deleted file mode 100644
index ee3634f..0000000
--- a/trunk/ruta-ep-ide/src/main/resources/org/apache/uima/ruta/ide/core/packages/messages.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# ***************************************************************

-#  * 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.

-# ***************************************************************

-

-RutaCheckBuilder_interpreterNotFound=Interpreter associated with the {0} project is not found

-RutaCheckBuilder_processing=processing {1}: {0}

-RutaCheckBuilder_retrievePackages=retrieve package paths...

-RutaCheckBuilder_unknownPackage=Unknown package: {0}

-RutaCheckBuilder_unresolvedDependencies=Package {0} has unresolved dependencies.

diff --git a/trunk/ruta-ep-textruler/icons/PlayStop.png b/trunk/ruta-ep-textruler/icons/PlayStop.png
deleted file mode 100755
index e195279..0000000
--- a/trunk/ruta-ep-textruler/icons/PlayStop.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/add.png b/trunk/ruta-ep-textruler/icons/add.png
deleted file mode 100755
index 6332fef..0000000
--- a/trunk/ruta-ep-textruler/icons/add.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/config.gif b/trunk/ruta-ep-textruler/icons/config.gif
deleted file mode 100755
index 6cd12da..0000000
--- a/trunk/ruta-ep-textruler/icons/config.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/delete.png b/trunk/ruta-ep-textruler/icons/delete.png
deleted file mode 100755
index 08f2493..0000000
--- a/trunk/ruta-ep-textruler/icons/delete.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/down.gif b/trunk/ruta-ep-textruler/icons/down.gif
deleted file mode 100755
index 072b184..0000000
--- a/trunk/ruta-ep-textruler/icons/down.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/feature.gif b/trunk/ruta-ep-textruler/icons/feature.gif
deleted file mode 100755
index 06d38f5..0000000
--- a/trunk/ruta-ep-textruler/icons/feature.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/folder.png b/trunk/ruta-ep-textruler/icons/folder.png
deleted file mode 100755
index 784e8fa..0000000
--- a/trunk/ruta-ep-textruler/icons/folder.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/folder_edit.png b/trunk/ruta-ep-textruler/icons/folder_edit.png
deleted file mode 100755
index ad669cc..0000000
--- a/trunk/ruta-ep-textruler/icons/folder_edit.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/information.gif b/trunk/ruta-ep-textruler/icons/information.gif
deleted file mode 100755
index 21325ca..0000000
--- a/trunk/ruta-ep-textruler/icons/information.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/learner.png b/trunk/ruta-ep-textruler/icons/learner.png
deleted file mode 100755
index d22fde8..0000000
--- a/trunk/ruta-ep-textruler/icons/learner.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/lineal.png b/trunk/ruta-ep-textruler/icons/lineal.png
deleted file mode 100755
index dba3edc..0000000
--- a/trunk/ruta-ep-textruler/icons/lineal.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/start.png b/trunk/ruta-ep-textruler/icons/start.png
deleted file mode 100755
index 967cf0f..0000000
--- a/trunk/ruta-ep-textruler/icons/start.png
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/stop.gif b/trunk/ruta-ep-textruler/icons/stop.gif
deleted file mode 100755
index fbf1686..0000000
--- a/trunk/ruta-ep-textruler/icons/stop.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/testing.gif b/trunk/ruta-ep-textruler/icons/testing.gif
deleted file mode 100755
index 1b8fe00..0000000
--- a/trunk/ruta-ep-textruler/icons/testing.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/icons/up.gif b/trunk/ruta-ep-textruler/icons/up.gif
deleted file mode 100755
index 0716475..0000000
--- a/trunk/ruta-ep-textruler/icons/up.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/ruta-ep-textruler/marker-file-identifying-eclipse-plugin b/trunk/ruta-ep-textruler/marker-file-identifying-eclipse-plugin
deleted file mode 100644
index e69de29..0000000
--- a/trunk/ruta-ep-textruler/marker-file-identifying-eclipse-plugin
+++ /dev/null
diff --git a/trunk/ruta-ep-textruler/plugin.xml b/trunk/ruta-ep-textruler/plugin.xml
deleted file mode 100755
index 08f0266..0000000
--- a/trunk/ruta-ep-textruler/plugin.xml
+++ /dev/null
@@ -1,258 +0,0 @@
-<?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.

--->

-<?eclipse version="3.4"?>

-<plugin>

-<extension-point id="learners" name="TextRuler Learner" schema="schema/learners.exsd"/>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            allowMultiple="false"

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.textruler.ui.TextRulerView"

-            icon="icons/lineal.png"

-            id="org.apache.uima.ruta.ml.MainView"

-            name="TextRuler"

-            restorable="true">

-      </view>

-      <view

-            allowMultiple="true"

-            category="org.apache.uima.ruta.ide.ui"

-            class="org.apache.uima.ruta.textruler.ui.TextRulerResultsView"

-            icon="icons/lineal.png"

-            id="org.apache.uima.ruta.textruler.TextRulerResultsView"

-            name="TextRuler Results"

-            restorable="false">

-      </view>

-   </extension>

-   <extension

-         point="org.eclipse.ui.commands">

-      <command

-            defaultHandler="org.apache.uima.ruta.textruler.ui.StartStopHandler"

-            id="org.apache.uima.ruta.ml.startstop"

-            name="StartStop">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.textruler.ui.ConfigureLearnersHandler"

-            id="org.apache.uima.ruta.textruler.configure"

-            name="Configure Learners">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.textruler.ui.StartHandler"

-            id="org.apache.uima.ruta.ml.start"

-            name="Start">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.textruler.ui.StopHandler"

-            id="org.apache.uima.ruta.ml.stop"

-            name="Stop">

-      </command>

-      <command

-            defaultHandler="org.apache.uima.ruta.textruler.ui.TestHandler"

-            id="org.apache.uima.ruta.ml.test"

-            name="Test">

-      </command>

-   </extension>

-   <extension

-         point="org.eclipse.ui.menus">

-      <menuContribution

-            locationURI="toolbar:org.apache.uima.ruta.ml.MainView">

-         <!--

-         <command

-               commandId="org.apache.uima.ruta.ml.startstop"

-               icon="icons/PlayStop.png"

-               id="MLStartStopCommand"

-               label="Start/Stop"

-               style="push">

-         </command>

-         -->

-         <command

-               commandId="org.apache.uima.ruta.ml.start"

-               icon="icons/start.png"

-               id="MLStartCommand"

-               label="Start"

-               style="push">

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.ml.stop"

-               icon="icons/stop.gif"

-               id="MLStopCommand"

-               label="Stop"

-               style="push">

-         </command>

-         <command

-               commandId="org.apache.uima.ruta.textruler.configure"

-               icon="icons/config.gif"

-               id="MLConfigCommand"

-               label="Configure Learners"

-               style="push">

-            <visibleWhen

-                  checkEnabled="true">

-            </visibleWhen>

-         </command>

-      </menuContribution>

-      <menuContribution

-            locationURI="toolbar:org.apache.uima.ruta.textruler.TextRulerResultsView">

-         <command

-               commandId="org.apache.uima.ruta.ml.test"

-               icon="icons/testing.gif"

-               id="MLTestCommand"

-               label="Test"

-               style="push">

-               <visibleWhen

-                  checkEnabled="false">

-            </visibleWhen>

-         </command>

-      </menuContribution>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.ide.preferences"

-            class="org.apache.uima.ruta.textruler.preferences.ConfigPreferencePage"

-            id="org.apache.uima.ruta.textruler"

-            name="TextRuler">

-      </page>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.textruler.learners">

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.lp2.OptimizedLP2Factory"

-            id="org.apache.uima.ruta.textruler.lp2opt"

-            name="LP2 (optimized)">

-      </learner>

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.lp2.NaiveLP2Factory"

-            id="org.apache.uima.ruta.textruler.lp2naive"

-            name="LP2 (naive)">

-      </learner>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.textruler"

-            class="org.apache.uima.ruta.textruler.learner.lp2.NaiveLP2PreferencePage"

-            id="org.apache.uima.ruta.textruler.preference.lp2naive"

-            name="LP2 (naive)">

-      </page>

-      <page

-            category="org.apache.uima.ruta.textruler"

-            class="org.apache.uima.ruta.textruler.learner.lp2.OptimizedLP2PreferencePage"

-            id="org.apache.uima.ruta.textruler.preference.lp2opt"

-            name="LP2 (optimized)">

-      </page>

-   </extension>

-   <!--

-   <extension

-         point="org.apache.uima.ruta.textruler.learners">

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.wien.WienFactory"

-            id="org.apache.uima.ruta.textruler.wien"

-            name="WIEN">

-      </learner>

-   </extension>

-   -->

-      <extension

-         point="org.apache.uima.ruta.textruler.learners">

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.whisk.token.WhiskFactory"

-            id="org.apache.uima.ruta.textruler.whisk.token"

-            name="WHISK (token)">

-      </learner>

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.whisk.generic.WhiskFactory"

-            id="org.apache.uima.ruta.textruler.whisk.generic"

-            name="WHISK (generic)">

-      </learner>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.textruler"

-            class="org.apache.uima.ruta.textruler.learner.whisk.generic.WhiskGenericPreferencePage"

-            id="org.apache.uima.ruta.textruler.preference.whisk.generic"

-            name="Whisk (generic)">

-      </page>

-      <page

-            category="org.apache.uima.ruta.textruler"

-            class="org.apache.uima.ruta.textruler.learner.whisk.token.WhiskTokenPreferencePage"

-            id="org.apache.uima.ruta.textruler.preference.whisk.token"

-            name="Whisk (token)">

-      </page>

-   </extension>

-   <!--

-   <extension

-         point="org.apache.uima.ruta.textruler.learners">

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.rapier.RapierFactory"

-            id="org.apache.uima.ruta.textruler.rapier"

-            name="RAPIER">

-      </learner>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.textruler"

-            class="org.apache.uima.ruta.textruler.learner.rapier.RapierPreferencePage"

-            id="org.apache.uima.ruta.textruler.preference.rapier"

-            name="Rapier">

-      </page>

-   </extension>

-   -->

-   <extension

-         point="org.apache.uima.ruta.textruler.learners">

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.trabal.TrabalFactory"

-            id="org.apache.uima.ruta.textruler.trabal"

-            name="TraBaL">

-      </learner>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.textruler"

-            class="org.apache.uima.ruta.textruler.learner.trabal.TrabalPreferencePage"

-            id="org.apache.uima.ruta.textruler.trabal"

-            name="TraBaL">

-      </page>

-   </extension>

-   <extension

-         point="org.eclipse.ui.preferencePages">

-      <page

-            category="org.apache.uima.ruta.textruler"

-            class="org.apache.uima.ruta.textruler.learner.kep.KEPPreferencePage"

-            id="org.apache.uima.ruta.textruler.kep"

-            name="KEP">

-      </page>

-   </extension>

-   <extension

-         point="org.apache.uima.ruta.textruler.learners">

-      <learner

-            class="org.apache.uima.ruta.textruler.learner.kep.KEPFactory"

-            id="org.apache.uima.ruta.textruler.kep"

-            name="KEP">

-      </learner>

-   </extension>

-   <extension

-         point="org.eclipse.core.runtime.preferences">

-      <initializer

-            class="org.apache.uima.ruta.textruler.preferences.TextRulerPreferenceInitializer">

-      </initializer>

-   </extension>

-</plugin>

diff --git a/trunk/ruta-ep-textruler/pom.xml b/trunk/ruta-ep-textruler/pom.xml
deleted file mode 100644
index cee8d97..0000000
--- a/trunk/ruta-ep-textruler/pom.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?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.    

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>ruta-ep-textruler</artifactId>

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>ruta-parent</artifactId>

-    <version>2.3.0</version>

-    <relativePath>../ruta-parent/pom.xml</relativePath>

-  </parent>

-  <properties>

-    <uimaScmProject>${project.artifactId}</uimaScmProject>

-  </properties>

-  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

-  <url>${uimaWebsiteUrl}</url>

-  <description>UIMA Ruta TextRuler plugin for rule learning</description>

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-core</artifactId>

-      <version>${project.parent.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide</artifactId>

-      <version>${project.parent.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>ruta-ep-ide-ui</artifactId>

-      <version>${project.parent.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.equinox</groupId>

-      <artifactId>app</artifactId>

-      <version>[1.3.0,2.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.jface</groupId>

-      <artifactId>text</artifactId>

-      <version>[3.3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.ui</groupId>

-      <artifactId>views</artifactId>

-      <version>[3.3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.swt</groupId>

-      <artifactId>org.eclipse.swt.win32.win32.x86</artifactId>

-      <version>[3.2.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>launching</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.validators</groupId>

-      <artifactId>core</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.validators</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>console</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.console</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>debug</artifactId>

-      <version>[3.0.1,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk.debug</groupId>

-      <artifactId>ui</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>formatter</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.dltk</groupId>

-      <artifactId>testing</artifactId>

-      <version>[3.0.0,5.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.eclipse.emf.ecore</groupId>

-      <artifactId>xmi</artifactId>

-      <version>[2.7.0,3.0.0)</version>

-      <scope>provided</scope>

-    </dependency>

-  </dependencies>

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-ep-textruler</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-textruler</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-ep-textruler</developerConnection>

-  </scm>

-  <build>

-    <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

-    <finalName>org.apache.uima.ruta.textruler_${parsedVersion.osgiVersion}</finalName>

-    <resources>

-      <resource>

-        <directory>.</directory>

-        <includes>

-          <include>plugin.xml</include>

-          <include>icons/**/*.*</include>

-        </includes>

-      </resource>

-      <resource>

-        <directory>src/main/resources</directory>

-      </resource>

-      <resource>

-        <directory>src/main/readme_src</directory>

-      </resource>

-    </resources>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.rat</groupId>

-          <artifactId>apache-rat-plugin</artifactId>

-          <executions>

-            <execution>

-              <id>default-cli</id>

-              <configuration>

-                <excludes>

-                  <exclude>release.properties</exclude> <!-- release generated artifact -->

-                  <exclude>marker-file-identifying-*</exclude>

-                  <exclude>issuesFixed/**</exclude>

-                </excludes>

-              </configuration>

-            </execution>

-          </executions>

-        </plugin>

-      </plugins>

-    </pluginManagement>

-

-    <plugins>

-      <plugin>

-        <groupId>org.apache.felix</groupId>

-        <artifactId>maven-bundle-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>uima-bundle</id>

-            <configuration>

-              <instructions>

-                <Bundle-SymbolicName>org.apache.uima.ruta.textruler;singleton:=true</Bundle-SymbolicName>

-                <Bundle-Activator>org.apache.uima.ruta.textruler.TextRulerPlugin</Bundle-Activator>

-                <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>

-                <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>

-                <_nouses>true</_nouses>

-                <Export-Package>

-                  org.apache.uima.ruta.textruler.*

-                </Export-Package>

-                <Require-Bundle>

-                  org.apache.uima.runtime,

-                  org.apache.uima.ruta.ide,

-                  org.apache.uima.ruta.ide.ui,

-                  org.apache.uima.ruta.engine,

-                  org.eclipse.core.runtime,

-                  org.eclipse.core.resources,

-                  org.eclipse.ui,

-                  org.eclipse.dltk.core,

-                  org.eclipse.dltk.ui,

-                  org.eclipse.jface.text,

-                  org.eclipse.ui.editors,

-                  org.eclipse.search,

-                  org.eclipse.debug.ui,

-                  org.eclipse.ui.console

-                </Require-Bundle>

-                <Import-Package>

-                </Import-Package>

-              </instructions>

-            </configuration>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-

-</project>
\ No newline at end of file
diff --git a/trunk/ruta-ep-textruler/schema/learners.exsd b/trunk/ruta-ep-textruler/schema/learners.exsd
deleted file mode 100755
index bd0976f..0000000
--- a/trunk/ruta-ep-textruler/schema/learners.exsd
+++ /dev/null
@@ -1,134 +0,0 @@
-<?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.

--->

-

-<schema targetNamespace="org.apache.uima.ruta.textruler" xmlns="http://www.w3.org/2001/XMLSchema">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.apache.uima.ruta.textruler" id="learners" name="Ruta ML"/>

-      </appInfo>

-      <documentation>

-         [Enter description of this extension point.]

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <annotation>

-         <appInfo>

-            <meta.element />

-         </appInfo>

-      </annotation>

-      <complexType>

-         <sequence minOccurs="0" maxOccurs="unbounded">

-            <element ref="learner"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute translatable="true"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="learner">

-      <complexType>

-         <attribute name="id" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  

-               </documentation>

-               <appInfo>

-                  <meta.attribute kind="java" basedOn=":org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory"/>

-               </appInfo>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="since"/>

-      </appInfo>

-      <documentation>

-         [Enter the first release in which this extension point appears.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

-         [Enter extension point usage example here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiinfo"/>

-      </appInfo>

-      <documentation>

-         [Enter API information here.]

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         [Enter information about supplied implementation of this extension point.]

-      </documentation>

-   </annotation>

-

-

-</schema>

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/TextRulerPlugin.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/TextRulerPlugin.java
deleted file mode 100755
index 3d1e637..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/TextRulerPlugin.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.ruta.textruler;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- */
-public class TextRulerPlugin extends AbstractUIPlugin {
-
-  // The plug-in ID
-  public static final String PLUGIN_ID = "org.apache.uima.ruta.textruler";
-
-  // The shared instance
-  private static TextRulerPlugin plugin;
-
-  /**
-   * The constructor
-   */
-  public TextRulerPlugin() {
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext )
-   */
-  @Override
-  public void start(BundleContext context) throws Exception {
-    super.start(context);
-    plugin = this;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext )
-   */
-  @Override
-  public void stop(BundleContext context) throws Exception {
-    plugin = null;
-    super.stop(context);
-  }
-
-  /**
-   * Returns the shared instance
-   * 
-   * @return the shared instance
-   */
-  public static TextRulerPlugin getDefault() {
-    return plugin;
-  }
-
-  public static ImageDescriptor getImageDescriptor(String path) {
-    return imageDescriptorFromPlugin(PLUGIN_ID, path);
-  }
-  
-  public static void error(String message, Throwable t) {
-    plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, t));
-  }
-
-  public static void error(Throwable t) {
-    error(t.getMessage(), t);
-  }
-  
-  
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/CasCache.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/CasCache.java
deleted file mode 100755
index b356fd3..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/CasCache.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-
-import org.apache.uima.cas.CAS;
-
-/**
- * 
- * CasCache works as a "most recently used" cache since the input documents CASes (usually loaded
- * from XMI files) are too big for the heap memory if there are too many of them.
- * 
- * MLExmapleDocumentSet creates one for you, so you should not have to use this class manually.
- * 
- * The key of a cache entry is usually the file path of the XMI file.
- */
-public class CasCache {
-
-  private static final boolean DISABLE_CACHE = false; // for test purposes.
-
-  // every CAS gets loaded
-  // every time if this is
-  // TRUE!
-  private static CAS reuseCASforDisabledCache = null;
-
-  private static class MLCacheEntry {
-
-    public String key;
-
-    public CAS cas;
-
-    public MLCacheEntry prev;
-
-    public MLCacheEntry next;
-
-    @Override
-    public String toString() {
-      return key;
-    }
-  }
-
-  // private long misses = 0; for test purposes;
-
-  private CasCacheLoader casLoader;
-
-  private int cacheSize;
-
-  // a linked list for the "most recently used" policy
-  private MLCacheEntry tail = null;
-
-  private MLCacheEntry head = null;
-
-  // a hashMap for fast cache access
-  private HashMap<String, MLCacheEntry> map;
-
-  public CasCache(int size, CasCacheLoader casLoader) {
-    this.cacheSize = size;
-    this.map = new HashMap<String, MLCacheEntry>(size);
-    this.casLoader = casLoader;
-  }
-
-  public void logDebugInfo(String str) {
-    if (!TextRulerToolkit.DEBUG)
-      return;
-    TextRulerToolkit.log("--- " + str);
-    MLCacheEntry e = tail;
-    while (e != null) {
-      TextRulerToolkit.log(e.key);
-      e = e.next;
-    }
-    TextRulerToolkit.log("---");
-
-  }
-
-  public boolean containsElementWithKey(String key) {
-    return map.containsKey(key);
-  }
-
-  public CAS getCAS(String fileName) {
-    if (DISABLE_CACHE) {
-      reuseCASforDisabledCache = casLoader.loadCAS(fileName, reuseCASforDisabledCache);
-      return reuseCASforDisabledCache;
-    }
-    MLCacheEntry entry = map.get(fileName);
-    if (entry != null) // cache HIT
-    {
-      if (entry != head) {
-        // move entry from its current location to head:
-
-        MLCacheEntry newTail = entry == tail ? tail.next : tail;
-
-        if (entry.prev != null)
-          entry.prev.next = entry.next;
-        if (entry.next != null)
-          entry.next.prev = entry == tail ? null : entry.prev;
-        tail = newTail;
-        head.next = entry;
-        entry.next = null;
-        entry.prev = head;
-        head = entry;
-      }
-      if (TextRulerToolkit.DEBUG) {
-        debugList();
-      }
-    } else // cache MISS
-    {
-      // misses++; test
-
-      // if (TextRulerToolkit.DEBUG)
-      // debugList();
-
-      entry = new MLCacheEntry();
-      entry.key = fileName;
-      entry.prev = head;
-      entry.next = null;
-      if (head != null)
-        head.next = entry;
-      head = entry;
-      CAS reuseCAS = null;
-      if (map.size() >= cacheSize) {
-        // remove oldest entry (the tail)
-        tail.cas.reset(); // TODO loadCAS below also does a reset. are
-        // subsequent reset calls expensive ?
-        reuseCAS = tail.cas;
-        tail.cas = null;
-        map.remove(tail.key);
-        tail = tail.next;
-        tail.prev = null;
-      } else {
-        if (tail == null)
-          tail = head;
-      }
-
-      entry.cas = casLoader.loadCAS(fileName, reuseCAS); // if
-      // reuseCAS==null,
-      // loadCAS
-      // creates a new
-      // one!
-
-      map.put(fileName, entry);
-      if (map.size() > cacheSize) {
-        TextRulerToolkit.logIfDebug("[CASCACHE] ERROR, CACHE SIZE EXCEEDED!");
-      }
-      if (TextRulerToolkit.DEBUG) {
-        debugList();
-      }
-    }
-    return entry.cas;
-  }
-
-  private void debugList() {
-    if (tail == null)
-      return;
-    MLCacheEntry e = tail;
-    int i = 1;
-    while (e.next != null) {
-      e = e.next;
-      i++;
-      if (i > map.size()) {
-        TextRulerToolkit.log("[CASCACHE] ERROR, INNER LENGTH INCOSISTENCY! " + i + "   vs. "
-                + map.size());
-      }
-    }
-    if (i != map.size())
-      TextRulerToolkit.log("[CASCACHE] ERROR, LENGTH INCOSISTENCY! " + i + "   vs. " + map.size());
-  }
-
-  public Collection<CAS> getCachedCASes() {
-    ArrayList<CAS> result = new ArrayList<CAS>();
-    for (MLCacheEntry e : map.values())
-      result.add(e.cas);
-    return result;
-  }
-
-  public void clear() {
-    tail = null;
-    head = null;
-    for (MLCacheEntry ce : map.values()) {
-      ce.cas.reset();
-      GlobalCASSource.releaseCAS(ce.cas); // ce.cas.release();
-    }
-    map.clear();
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/CasCacheLoader.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/CasCacheLoader.java
deleted file mode 100755
index 1100aa3..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/CasCacheLoader.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import org.apache.uima.cas.CAS;
-
-/**
- * Helper-Inferface for CasCache. The user of CasCache has to provide a method for loading a CAS
- * e.g. from a XMI-file.
- */
-public interface CasCacheLoader {
-
-  public CAS loadCAS(String fileName, CAS reuseCAS);
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/GlobalCASSource.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/GlobalCASSource.java
deleted file mode 100755
index a2cf28a..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/GlobalCASSource.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-
-/**
- * 
- * This class tries to be a workaround for a potential UIMA CAS Memory Leak. We have to keep the
- * total count of CAS objects constant, even if we call the whole TextRulerController machinery
- * multiple times in a batch-like row!
- * 
- * The idea is: Everybody that needs a CAS does not create one itself but asks this static class
- * here. If it is done with the CAS, it releases it here again, but it is held in memory and reused
- * when somebody else needs a reset CAS again.
- * 
- * Clients are for example CasCache, TextRulerBasicLearner, ...
- * 
- */
-public class GlobalCASSource {
-
-  public static int CAS = 0;
-
-  private static List<CAS> free = new ArrayList<CAS>();
-
-  private static List<CAS> inUsage = new ArrayList<CAS>();
-
-  public static synchronized CAS allocCAS(AnalysisEngine ae) {
-    if (free.size() > 0) {
-      CAS result = free.get(free.size() - 1);
-      free.remove(free.size() - 1);
-      inUsage.add(result);
-      return result;
-    } else {
-      try {
-        CAS newCas = ae.newCAS();
-        CAS++;
-        System.out.println("####### CAS: " + CAS);
-        inUsage.add(newCas);
-        return newCas;
-      } catch (Exception e) {
-        TextRulerPlugin.error(e);
-        return null;
-      }
-    }
-  }
-
-  public static synchronized void releaseCAS(CAS cas) {
-    if (inUsage.contains(cas)) {
-      cas.reset();
-      inUsage.remove(cas);
-      free.add(cas);
-      // TextRulerToolkit.log("[GlobalCASSource] RELEASED CAS, total CAS count = "+count);
-    } else {
-      if (free.contains(cas)) {
-        cas.reset();
-      } else {
-        cas.release();
-        TextRulerToolkit
-                .log("[GlobalCASSource.release] Error, tried to release an unknown CAS object!");
-      }
-    }
-  }
-
-  public static void clear() {
-    for (CAS each : free) {
-      each.release();
-      each = null;
-    }
-    free.clear();
-    for (CAS each : inUsage) {
-      each.release();
-      each = null;
-    }
-    inUsage.clear();
-    CAS = 0;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerAnnotation.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerAnnotation.java
deleted file mode 100755
index 1b27a2d..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerAnnotation.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.UIMAConstants;
-
-/**
- * 
- * This class encapsulates the for us important information about an Annotation, since AnnotationFS
- * keeps its corresponding CAS alive or gets killed when the CAS gets reset.
- * 
- */
-public class TextRulerAnnotation {
-
-  private TextRulerExampleDocument document; // we also keep a reference to
-
-  // our document, but this does
-  // not hold the CAS forever, it
-  // loads it on demand!
-  private int begin;
-
-  private int end;
-
-  private Type type;
-
-  private String coveredText;
-
-  private Map<String, String> featureMap = new HashMap<String, String>();
-
-  public TextRulerAnnotation(AnnotationFS afs, TextRulerExampleDocument document,
-          List<String> consideredFeatures) {
-    this.document = document;
-    this.begin = afs.getBegin();
-    this.end = afs.getEnd();
-    this.type = afs.getType();
-    this.coveredText = afs.getCoveredText();
-    if (consideredFeatures != null) {
-      for (String string : consideredFeatures) {
-        Feature feature = afs.getType().getFeatureByBaseName(string);
-        if (feature != null && feature.getRange().isPrimitive()) {
-          String valueAsString = afs.getFeatureValueAsString(feature);
-          if(feature.getRange().getName().equals(UIMAConstants.TYPE_STRING)) {
-            valueAsString = "\""+valueAsString+"\"";
-          }
-          featureMap.put(string, valueAsString);
-        }
-      }
-    }
-  }
-
-  public TextRulerAnnotation(AnnotationFS afs, TextRulerExampleDocument document) {
-    this(afs, document, null);
-  }
-
-  public TextRulerAnnotation(AnnotationFS afs) {
-    this(afs, null);
-  }
-
-  public TextRulerExampleDocument getDocument() {
-    return document;
-  }
-
-  public int getBegin() {
-    return begin;
-  }
-
-  public int getEnd() {
-    return end;
-  }
-
-  public Type getType() {
-    return type;
-  }
-
-  public String getCoveredText() {
-    return coveredText;
-  }
-
-  @Override
-  public String toString() {
-    return getCoveredText();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    TextRulerAnnotation a = (TextRulerAnnotation) o;
-    return (document == a.document) && (begin == a.begin) && (end == a.end)
-            && coveredText.equals(a.coveredText);
-  }
-
-  @Override
-  public int hashCode() {
-    return begin * 17 * end + coveredText.hashCode();
-  }
-
-  public Map<String, String> getFeatureMap() {
-    return featureMap;
-  }
-
-  public void setFeatureMap(Map<String, String> featureMap) {
-    this.featureMap = featureMap;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerBasicLearner.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerBasicLearner.java
deleted file mode 100755
index bfaa066..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerBasicLearner.java
+++ /dev/null
@@ -1,627 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.resource.ResourceConfigurationException;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.preferences.TextRulerPreferences;
-import org.apache.uima.ruta.textruler.tools.MemoryWatch;
-import org.apache.uima.util.FileUtils;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-/**
- * 
- * This class provides basic and shared functionality for all the implemented ML algorithms. New
- * algorithms can subclass this class and use the whole framework for faster development.
- * 
- */
-public abstract class TextRulerBasicLearner implements TextRulerLearner, CasCacheLoader {
-
-  protected TextRulerLearnerDelegate delegate;
-
-  protected AnalysisEngine ae;
-
-  protected TextRulerExampleDocumentSet exampleDocuments;
-
-  protected String inputDirectory;
-
-  protected String tempDirectory;
-
-  protected String preprocessorFile;
-
-  protected Set<String> filterSet;
-
-  protected Set<String> filterSetWithSlotNames;
-
-  protected String[] slotNames;
-
-  protected CasCache casCache;
-
-  protected CAS algTestCAS;
-
-  private boolean skip;
-
-  protected boolean useDynamicAnchoring = false;
-
-  private boolean useDefaultFiltering;
-
-  protected boolean supportBoundaries = false;
-
-  private double maxErrorRate = 5;
-
-  private Map<String, TextRulerStatisticsCollector> inducedRules = new TreeMap<String, TextRulerStatisticsCollector>();
-
-  public TextRulerBasicLearner(String inputDir, String prePropTMFile, String tmpDir,
-          String[] slotNames, Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super();
-    this.preprocessorFile = prePropTMFile;
-    this.tempDirectory = tmpDir;
-    this.slotNames = slotNames;
-    this.inputDirectory = inputDir;
-    this.skip = skip;
-    this.delegate = delegate;
-    this.filterSet = filterSet;
-    filterSetWithSlotNames = new HashSet<String>(filterSet);
-    filterSetWithSlotNames.add(RutaEngine.BASIC_TYPE);
-    for (String s : slotNames) {
-      filterSetWithSlotNames.add(s);
-      filterSetWithSlotNames.add(TextRulerTarget.getSingleSlotTypeName(
-              MLTargetType.SINGLE_LEFT_BOUNDARY, s));
-      filterSetWithSlotNames.add(TextRulerTarget.getSingleSlotTypeName(
-              MLTargetType.SINGLE_RIGHT_BOUNDARY, s));
-    }
-
-    useDefaultFiltering = true;
-    useDefaultFiltering &= filterSet.size() == 4;
-    useDefaultFiltering &= filterSet.contains("org.apache.uima.ruta.type.SPACE");
-    useDefaultFiltering &= filterSet.contains("org.apache.uima.ruta.type.BREAK");
-    useDefaultFiltering &= filterSet.contains("org.apache.uima.ruta.type.NBSP");
-    useDefaultFiltering &= filterSet.contains("org.apache.uima.ruta.type.MARKUP");
-
-    IPreferenceStore store = TextRulerPlugin.getDefault().getPreferenceStore();
-    maxErrorRate = store.getInt(TextRulerPreferences.MAX_ERROR_RATE);
-    int casChacheSize = store.getInt(TextRulerPreferences.CAS_CACHE);
-    this.casCache = new CasCache(casChacheSize, this);
-  }
-
-  protected String tempDirectory() {
-    return TextRulerToolkit.addTrailingSlashToPath(tempDirectory);
-  }
-
-  protected boolean shouldAbort() {
-    if (delegate != null)
-      return delegate.shouldAbort();
-    else
-      return false;
-  }
-
-  public AnalysisEngine getAnalysisEngine() {
-    if (ae == null) {
-      updateAE();
-    }
-    return ae;
-  }
-
-  private void updateAE() {
-    IPath analysisEngineDescriptorPath = null;
-    try {
-      analysisEngineDescriptorPath = RutaProjectUtils
-              .getAnalysisEngineDescriptorPath(preprocessorFile);
-    } catch (CoreException e1) {
-      sendStatusUpdateToDelegate("Failed to locate descriptor.",
-              TextRulerLearnerState.ML_INITIALIZING, false);
-    }
-    String descriptorFile = analysisEngineDescriptorPath.toPortableString();
-    sendStatusUpdateToDelegate("loading AE...", TextRulerLearnerState.ML_INITIALIZING, false);
-
-    AnalysisEngineDescription description = TextRulerToolkit
-            .getAnalysisEngineDescription(descriptorFile);
-    if (description == null) {
-      sendStatusUpdateToDelegate("Failed to load descriptor. Please rebuild the project.",
-              TextRulerLearnerState.ML_INITIALIZING, false);
-      return;
-    }
-    TextRulerToolkit.addBoundaryTypes(description, slotNames);
-    ae = TextRulerToolkit.loadAnalysisEngine(description);
-
-    // set filters to NO filtering so that we can add it manually with
-    // the FILTERTYPE expression!
-    String tempRulesFileName = getTempRulesFileName();
-    IPath path = new Path(tempRulesFileName);
-    ae.setConfigParameterValue(RutaEngine.PARAM_MAIN_SCRIPT, path.removeFileExtension()
-            .lastSegment());
-    String portableString = path.removeLastSegments(1).toPortableString();
-    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { portableString });
-    ae.setConfigParameterValue(RutaEngine.PARAM_ADDITIONAL_SCRIPTS, new String[0]);
-    ae.setConfigParameterValue(RutaEngine.PARAM_RELOAD_SCRIPT, true);
-    if (useDynamicAnchoring) {
-      ae.setConfigParameterValue(RutaEngine.PARAM_DYNAMIC_ANCHORING, true);
-    }
-    IPreferenceStore store = TextRulerPlugin.getDefault().getPreferenceStore();
-    boolean lowMemoryProfile = store.getBoolean(TextRulerPreferences.LOW_MEMORY_PROFILE);
-    boolean removeBasics = store.getBoolean(TextRulerPreferences.REMOVE_BASICS);
-    ae.setConfigParameterValue(RutaEngine.PARAM_LOW_MEMORY_PROFILE, lowMemoryProfile);
-    ae.setConfigParameterValue(RutaEngine.PARAM_REMOVE_BASICS, removeBasics);
-
-    try {
-      ae.reconfigure();
-    } catch (ResourceConfigurationException e) {
-      TextRulerPlugin.error(e);
-    }
-  }
-
-  protected boolean checkForMandatoryTypes() {
-    // check if all passed slot types are present:
-    CAS someCas = getTestCAS();
-    if (someCas == null) {
-      return false;
-    }
-    TypeSystem ts = someCas.getTypeSystem();
-    // GlobalCASSource.releaseCAS(someCas);
-    boolean result = true;
-    List<String> missingTypes = new ArrayList<String>();
-    for (String s : slotNames) {
-      if (ts.getType(s) == null) {
-        missingTypes.add(s);
-        result = false;
-      }
-    }
-    String missingString = "";
-    for (String string : missingTypes) {
-      missingString += string + ", ";
-    }
-    if (!StringUtils.isEmpty(missingString)) {
-      missingString = missingString.substring(0, missingString.length() - 2);
-    }
-    if (!result) {
-      sendStatusUpdateToDelegate("Error: Some Slot- or Helper-Types were not found in TypeSystem: "
-              + missingString, TextRulerLearnerState.ML_ERROR, false);
-    }
-    return result;
-  }
-
-  protected boolean createTempDirIfNeccessary() {
-    File dir = new File(tempDirectory());
-    if (dir.exists() && dir.isDirectory())
-      return true;
-    else
-      return dir.mkdir();
-  }
-
-  public void run() {
-    if (createTempDirIfNeccessary()) {
-      updateAE();
-      if (ae == null) {
-        return;
-      }
-      inducedRules.clear();
-      if (!checkForMandatoryTypes()) {
-
-      } else {
-        sendStatusUpdateToDelegate("Finding documents...", TextRulerLearnerState.ML_INITIALIZING,
-                false);
-        exampleDocuments = new TextRulerExampleDocumentSet(inputDirectory, casCache);
-        if (!shouldAbort()) {
-          sendStatusUpdateToDelegate("Starting...", TextRulerLearnerState.ML_RUNNING, true);
-
-          try {
-            doRun();
-          } catch (Exception e) {
-            TextRulerPlugin.error(e);
-            sendStatusUpdateToDelegate("Aborted due to exception!", TextRulerLearnerState.ML_ERROR,
-                    true);
-          }
-
-          if (TextRulerToolkit.DEBUG) {
-            try {
-              File file = new File(tempDirectory() + "results" + RutaEngine.SCRIPT_FILE_EXTENSION);
-              FileUtils.saveString2File(getResultString(), file);
-            } catch (Exception e) {
-              TextRulerPlugin.error(e);
-            }
-          }
-          cleanUp();
-        }
-      }
-      casCache.clear();
-      casCache = null;
-      exampleDocuments = null; // clear reference
-      if (algTestCAS != null) {
-        algTestCAS.reset();
-        GlobalCASSource.releaseCAS(algTestCAS); // algTestCAS.release();
-        algTestCAS = null;
-      }
-      if (shouldAbort())
-        sendStatusUpdateToDelegate("Aborted!", TextRulerLearnerState.ML_ABORTED, false);
-    } else {
-      sendStatusUpdateToDelegate("ERROR CREATING TEMPORARY DIRECTORY!",
-              TextRulerLearnerState.ML_ERROR, false);
-    }
-  }
-
-  public CAS loadCAS(String fileName, CAS reuseCAS) {
-    return TextRulerToolkit.readCASfromXMIFile(fileName, ae, reuseCAS);
-  }
-
-  protected void sendStatusUpdateToDelegate(String statusString, TextRulerLearnerState state,
-          boolean ruleBaseChanged) {
-    if (delegate != null)
-      delegate.algorithmStatusUpdate(this, statusString, state, ruleBaseChanged);
-  }
-
-  protected abstract void doRun(); // needs to be implemented by concrete
-
-  // algorithm subclasses !
-
-  protected void cleanUp() {
-
-  }
-
-  public String getTempRulesFileName() {
-    return tempDirectory() + "rules" + RutaEngine.SCRIPT_FILE_EXTENSION;
-  }
-
-  public String getIntermediateRulesFileName() {
-    return tempDirectory() + "intermediaterules" + RutaEngine.SCRIPT_FILE_EXTENSION;
-  }
-
-  public void compareOriginalDocumentWithTestCAS(TextRulerExampleDocument originalDoc, CAS testCas,
-          TextRulerTarget target, TextRulerStatisticsCollector c, boolean collectNegativeExamples) {
-    // standard implementation - may be overwritten by concrete subclasses
-    // if needed
-    List<TextRulerExample> originalPositives = originalDoc.getPositiveExamples();
-    List<TextRulerExample> testPositives = originalDoc.createSlotInstancesForCAS(testCas, target,
-            false);
-
-    // TODO if you need false negatives (missing annotations), please
-    // reactivate
-    // the code commented out with FALSENEGATIVES
-
-    for (TextRulerExample e : testPositives) {
-      TextRulerExample coveredExample = TextRulerToolkit.exampleListContainsAnnotation(
-              originalPositives, e.getAnnotation());
-      if (coveredExample != null) {
-        c.addCoveredPositive(coveredExample); // add covered example and
-        // increment positive
-        // counter
-        // FALSENEGATIVES originalPositives.remove(coveredExample);
-      } else {
-        if (collectNegativeExamples) {
-          e.setPositive(false);
-          c.addCoveredNegative(e);
-        } else
-          c.incCoveredNegatives(1);
-      }
-    }
-
-    // FALSENEGATIVES c.incMissingPositives(originalPositives.size());
-  }
-
-  public abstract boolean collectNegativeCoveredInstancesWhenTesting();
-
-  public void testRuleOnDocument(final TextRulerRule rule, final TextRulerExampleDocument doc,
-          final TextRulerStatisticsCollector c) {
-    CAS testCAS = getTestCAS();
-    doc.resetAndFillTestCAS(testCAS, rule.getTarget());
-    testRuleOnDocument(rule, doc, c, testCAS);
-    testCAS.reset();
-    // GlobalCASSource.releaseCAS(testCAS);
-  }
-
-  public void testRuleOnDocument(final TextRulerRule rule, final TextRulerExampleDocument doc,
-          final TextRulerStatisticsCollector c, CAS testCas) {
-    if (TextRulerToolkit.DEBUG) {
-      MemoryWatch.watch();
-    }
-    try {
-      rule.saveToRulesFile(getTempRulesFileName());
-      if (TextRulerToolkit.DEBUG) {
-        TextRulerToolkit.writeCAStoXMIFile(testCas, tempDirectory() + "testCas.xmi");
-      }
-      ae.process(testCas);
-      if (TextRulerToolkit.DEBUG) {
-        TextRulerToolkit.writeCAStoXMIFile(testCas, tempDirectory() + "testCasProcessed.xmi");
-      }
-      compareOriginalDocumentWithTestCAS(doc, testCas, rule.getTarget(), c,
-              collectNegativeCoveredInstancesWhenTesting());
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-    }
-  }
-
-  // if you have many rules to test, please use testRulesOnDocumentSet for
-  // performance issues !!
-  public void testRuleOnDocumentSet(final TextRulerRule rule,
-          final TextRulerExampleDocumentSet documents) {
-    TextRulerStatisticsCollector sum = new TextRulerStatisticsCollector();
-    TextRulerExampleDocument[] sortedDocs = documents.getSortedDocumentsInCacheOptimizedOrder();
-
-    for (TextRulerExampleDocument theDoc : sortedDocs) {
-      testRuleOnDocument(rule, theDoc, sum);
-      if (shouldAbort())
-        break;
-    }
-    rule.setCoveringStatistics(sum);
-  }
-
-  public CAS applyScriptOnDocument(String script, final TextRulerExampleDocument doc,
-          TextRulerTarget target) {
-    String tempRulesFileName = getTempRulesFileName();
-    try {
-      FileUtils.saveString2File(script, new File(tempRulesFileName));
-    } catch (IOException e) {
-      TextRulerPlugin.error(e);
-    }
-    AnalysisEngine analysisEngine = getAnalysisEngine();
-    CAS testCAS = getTestCAS();
-    doc.resetAndFillTestCAS(testCAS, target);
-    try {
-      analysisEngine.process(testCAS);
-    } catch (AnalysisEngineProcessException e) {
-      TextRulerPlugin.error(e);
-    }
-    return testCAS;
-  }
-
-  public void testRulesOnDocumentSet(final List<? extends TextRulerRule> rules,
-          final TextRulerExampleDocumentSet documents) {
-    if (rules.isEmpty())
-      return;
-    List<TextRulerStatisticsCollector> sums = new ArrayList<TextRulerStatisticsCollector>();
-    TextRulerExampleDocument[] sortedDocs = documents.getSortedDocumentsInCacheOptimizedOrder();
-    TextRulerTarget target = rules.get(0).getTarget();
-
-    for (@SuppressWarnings("unused")
-    TextRulerRule r : rules) {
-      // crate a collector for each rule
-      sums.add(new TextRulerStatisticsCollector());
-    }
-
-    CAS theTestCAS = getTestCAS();
-    for (int ruleIndex = 0; ruleIndex < rules.size(); ruleIndex++) {
-      TextRulerRule theRule = rules.get(ruleIndex);
-      String ruleString = theRule.getRuleString();
-      System.out.println("testing: " + ruleString);
-      if (inducedRules.containsKey(ruleString)) {
-        theRule.setCoveringStatistics(inducedRules.get(ruleString));
-        System.out.println("skipped with " + inducedRules.get(ruleString));
-      } else {
-        TextRulerStatisticsCollector sumC = sums.get(ruleIndex);
-        for (TextRulerExampleDocument theDoc : sortedDocs) {
-          theDoc.resetAndFillTestCAS(theTestCAS, target);
-          testRuleOnDocument(theRule, theDoc, sumC, theTestCAS);
-          double errorRate = sumC.n / Math.max(sumC.p, 1);
-          if (errorRate > maxErrorRate) {
-            System.out.println("stopped:" + sumC);
-            break;
-          }
-          if (shouldAbort())
-            return;
-        }
-        inducedRules.put(ruleString, sumC);
-      }
-    }
-    theTestCAS.reset();
-    // GlobalCASSource.releaseCAS(theTestCAS);
-    // do not release the shared test-cas ! only reset it ! it gets released
-    // at the end of the
-    // whole algorithm !
-    for (int ruleIndex = 0; ruleIndex < rules.size(); ruleIndex++)
-      rules.get(ruleIndex).setCoveringStatistics(sums.get(ruleIndex));
-  }
-
-  public void testRulesOnDocument(final List<? extends TextRulerRule> rules,
-          final TextRulerExampleDocument document) {
-    if (rules.isEmpty())
-      return;
-    List<TextRulerStatisticsCollector> sums = new ArrayList<TextRulerStatisticsCollector>();
-    TextRulerTarget target = rules.get(0).getTarget();
-    for (@SuppressWarnings("unused")
-    TextRulerRule r : rules) {
-      // crate a collector for each rule
-      sums.add(new TextRulerStatisticsCollector());
-    }
-    CAS theTestCAS = getTestCAS();
-    for (int ruleIndex = 0; ruleIndex < rules.size(); ruleIndex++) {
-      TextRulerRule theRule = rules.get(ruleIndex);
-      TextRulerStatisticsCollector sumC = sums.get(ruleIndex);
-
-      if (TextRulerToolkit.DEBUG && !target.equals(theRule.getTarget())) {
-        TextRulerToolkit
-                .log("[TextRulerBasicLearner.testRulesOnTrainingsSet] ERROR, ALL RULES MUST HAVE THE SAME LEARNING TARGET !");
-      }
-      document.resetAndFillTestCAS(theTestCAS, target);
-      testRuleOnDocument(theRule, document, sumC, theTestCAS);
-      if (shouldAbort())
-        return;
-    }
-    theTestCAS.reset();
-    // GlobalCASSource.releaseCAS(theTestCAS);
-    // do not release the shared test-cas ! only reset it ! it gets released
-    // at the end of the
-    // whole algorithm !
-    for (int ruleIndex = 0; ruleIndex < rules.size(); ruleIndex++)
-      rules.get(ruleIndex).setCoveringStatistics(sums.get(ruleIndex));
-  }
-
-  public String getFileHeaderString(boolean complete) {
-    return getPackageString() + getScriptImport(complete) + getFilterCommandString()
-            + getUseDynamicAnchoring(complete) + getBoundaryDeclarations(complete);
-  }
-
-  private String getBoundaryDeclarations(boolean complete) {
-    if (complete && supportBoundaries && slotNames.length > 0) {
-      StringBuilder sb = new StringBuilder();
-      sb.append("DECLARE ");
-      int count = 0;
-      for (String slot : slotNames) {
-        String[] split = slot.split("[.]");
-        String shortName = split[split.length - 1];
-        sb.append(shortName);
-        sb.append("START");
-        sb.append(", ");
-        sb.append(shortName);
-        sb.append("END");
-        if (count < slotNames.length - 1) {
-          sb.append(", ");
-        }
-        count++;
-      }
-      sb.append(";\n");
-      return sb.toString();
-    }
-    return "";
-  }
-
-  private String getUseDynamicAnchoring(boolean complete) {
-    if (useDynamicAnchoring && complete) {
-      return "Document{-> DYNAMICANCHORING(true)};\n";
-    } else {
-      return "";
-    }
-  }
-
-  private String getScriptImport(boolean complete) {
-    if (complete) {
-      IPath path = Path.fromOSString(preprocessorFile);
-      IPath removeLastSegments = path.removeLastSegments(1);
-      IContainer containerForLocation = ResourcesPlugin.getWorkspace().getRoot()
-              .getContainerForLocation(removeLastSegments);
-      IProject project = containerForLocation.getProject();
-      String scriptWithPackage = null;
-      try {
-        scriptWithPackage = RutaProjectUtils.getScriptWithPackage(path, project);
-      } catch (CoreException e) {
-      }
-      String moduleName = RutaProjectUtils.getModuleName(path);
-      if (scriptWithPackage != null) {
-        String importString = "SCRIPT " + scriptWithPackage + ";\n";
-        if (!skip) {
-          importString += "Document{-> CALL(" + moduleName + ")};\n";
-        }
-        return importString;
-      }
-    }
-    return "";
-  }
-
-  public String getPackageString() {
-    IPath path = Path.fromOSString(preprocessorFile);
-    IPath removeLastSegments = path.removeLastSegments(1);
-    IContainer containerForLocation = ResourcesPlugin.getWorkspace().getRoot()
-            .getContainerForLocation(removeLastSegments);
-    IPath removeFirstSegments = containerForLocation.getProjectRelativePath()
-            .removeFirstSegments(1);
-    String replaceAll = removeFirstSegments.toPortableString().replaceAll("/", ".");
-    return "PACKAGE " + replaceAll + ";\n\n";
-  }
-
-  public String getFilterCommandString() {
-    if (filterSet != null && filterSet.size() > 0 && !isDefaultFiltering()) {
-      String fs = "";
-      for (String s : filterSet)
-        if (fs.length() == 0)
-          fs += TextRulerToolkit.getTypeShortName(s);
-        else
-          fs += ", " + TextRulerToolkit.getTypeShortName(s);
-
-      return "Document{->FILTERTYPE(" + fs + ")};\n\n";
-    } else
-      return "";
-  }
-
-  private boolean isDefaultFiltering() {
-    return useDefaultFiltering;
-  }
-
-  public CAS getTestCAS() {
-    // one big memory problem occured as we .reset+.release old CASes and
-    // created new ones
-    // for every test and (e.g. in CasCache for every loaded XMI). Maybe
-    // this is a
-    // UIMA memory issue ? Changing this to an almost static amount of CAS
-    // objects and reusing
-    // them works without leaking, so we prefer this now since it also
-    // brought a performance
-    // boost!
-
-    if (algTestCAS == null) {
-      try {
-        algTestCAS = GlobalCASSource.allocCAS(ae);
-      } catch (Exception e) {
-        TextRulerPlugin.error(e);
-        return null;
-      }
-
-    }
-    return algTestCAS;
-  }
-
-  protected void saveParametersToTempFolder(Map<String, Object> params) {
-    if (createTempDirIfNeccessary()) {
-      String str = "\nSettings:\n\n";
-
-      str += "inputDir: " + inputDirectory;
-      str += "\ntempDir: " + tempDirectory;
-      str += "\npreprocessTMFile: " + preprocessorFile;
-      str += "\n";
-
-      for (Entry<String, Object> e : params.entrySet()) {
-        str += e.getKey() + " = " + e.getValue() + "\n";
-      }
-      if (createTempDirIfNeccessary())
-        TextRulerToolkit.appendStringToFile(tempDirectory() + "settings.txt", str);
-    }
-  }
-
-  public Set<String> getFilterSet() {
-    return filterSet;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExample.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExample.java
deleted file mode 100755
index 9073db7..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExample.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-
-
-/**
- * 
- * TextRulerExample encapsulates a single-slot, multi-slot or single-slot-boundary problem instance.
- * This can be positive or negative examples from a example document, or it can be coverings of a
- * rule or multiple rules that were applied to a document...
- * 
- *         hint: this could be renamed to MLInstance ?
- * 
- */
-public class TextRulerExample {
-
-  protected TextRulerExampleDocument document;
-
-  protected TextRulerAnnotation annotations[]; // single-slot has only one
-
-  // annotation...
-  protected boolean isPositive;
-
-  protected TextRulerTarget target;
-
-  public TextRulerExample(TextRulerExampleDocument document, TextRulerAnnotation annotation,
-          boolean isPositive, TextRulerTarget target) {
-    TextRulerAnnotation singleAnnot[] = { annotation };
-    this.document = document;
-    this.isPositive = isPositive;
-    this.target = target;
-    this.annotations = singleAnnot;
-  }
-
-  public TextRulerExample(TextRulerExampleDocument document, TextRulerAnnotation annotations[],
-          boolean isPositive, TextRulerTarget target) {
-    this.document = document;
-    this.isPositive = isPositive;
-    this.target = target;
-    this.annotations = annotations;
-  }
-
-  public TextRulerExampleDocument getDocument() {
-    return document;
-  }
-
-  public CAS getDocumentCAS() {
-    return document.getCAS();
-  }
-
-  public TextRulerAnnotation getAnnotation() {
-    return annotations[0];
-  }
-
-  public TextRulerAnnotation[] getAnnotations() {
-    return annotations;
-  }
-
-  public boolean isPositive() {
-    return isPositive;
-  }
-
-  public void setPositive(boolean flag) {
-    isPositive = flag;
-  }
-
-  public TextRulerTarget getTarget() {
-    return target;
-  }
-
-  @Override
-  public String toString() {
-    if (target.type != MLTargetType.MULTI_SLOT) {
-      if (annotations != null) {
-        if (target.type == MLTargetType.SINGLE_WHOLE_SLOT)
-          return getAnnotation().getCoveredText();
-        else
-          return "START at " + getAnnotation().getBegin(); // +","+getAnnotation().getEnd();
-      } else
-        return "<no text>";
-    } else {
-      String str = "";
-      for (TextRulerAnnotation a : annotations) {
-        if (a == null)
-          str += "<NULL>";
-        else
-          str += a.getType().getShortName() + ":" + a.getCoveredText() + ";";
-      }
-      return str;
-    }
-  }
-
-  @Override
-  public boolean equals(Object ob) {
-    TextRulerExample o = (TextRulerExample) ob;
-
-    boolean result = document.getCasFileName().equals(o.document.getCasFileName())
-            && (isPositive == o.isPositive) && target.equals(o.target);
-
-    if (!result)
-      return false;
-
-    if (annotations.length != o.annotations.length)
-      return false;
-
-    for (int i = 0; i < annotations.length; i++) {
-      if (!annotations[i].equals(o.annotations[i]))
-        return false;
-    }
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = document.getCasFileName().hashCode()
-            * (isPositive ? 2 : 1)
-            * (target.type == MLTargetType.MULTI_SLOT ? 1
-                    : (target.type == MLTargetType.SINGLE_WHOLE_SLOT ? 2
-                            : (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY ? 3 : 4)));
-    int i = 1;
-    for (TextRulerAnnotation a : annotations) {
-      result *= i * (a.getBegin() + 1) * (a.getEnd() + 1);
-      i++;
-    }
-
-    return result;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocument.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocument.java
deleted file mode 100755
index b85bbf6..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocument.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.util.CasCopier;
-
-/**
- * 
- * TextRulerExampleDocument stands for one document usually loaded from an XMI file. It uses the
- * given CasCache for storing its CAS with the XMI filename as the key.
- * 
- * It holds ArrayLists for positive and negative MLExamples which can be filled on demand for a
- * given learning target. E.g. single slot algorithms learn rules for each slot separately, so the
- * work-flow is to clear the current examples and create new for the next slot target. The same is
- * with single slot boundary algorithms like LP2: It first creates all left boundary examples,
- * learns from them, clears the examples and creates the right boundary examples and so on.
- * 
- * This class also provides the functionality extract and created MLExmaples of a given document or
- * test CAS for a given TextRulerTarget.
- * 
- * Especially for boundary algorithms you can call createBoundaryAnnotationsForCas to get boundary
- * annotations at the beginnings and endings of an example slot.
- * 
- * Caution (this is quite a bit inconvenient at the moment!): If a CAS gets loaded from the
- * casCache, you have to call createBoundaryAnnotationsForCas again, so your casLoader must be aware
- * of that (see BasicLP2 for an example) !
- * 
- * hint: this could be renamed to MLDocument instead of TextRulerExampleDocument ?
- */
-public class TextRulerExampleDocument {
-
-  protected String casFileName;
-
-  protected CasCache casCache;
-
-  protected List<TextRulerExample> positiveExamples = new ArrayList<TextRulerExample>();
-
-  protected List<TextRulerExample> negativeExamples = new ArrayList<TextRulerExample>();
-
-  public TextRulerExampleDocument(String casFileName, CasCache casCache) {
-    this.casCache = casCache;
-    this.casFileName = casFileName;
-  }
-
-  public CAS getCAS() {
-    // ask CACHE
-    return casCache.getCAS(casFileName);
-  }
-
-  public List<TextRulerExample> getPositiveExamples() {
-    return positiveExamples;
-  }
-
-  public List<TextRulerExample> getNegativeExamples() {
-    return negativeExamples;
-  }
-
-  protected void createPositiveExamplesForTarget(TextRulerTarget target) {
-    positiveExamples = createSlotInstancesForCAS(getCAS(), target, true);
-  }
-
-  public List<TextRulerExample> createSlotInstancesForCAS(CAS aCas, TextRulerTarget target,
-          boolean createFromRawTypeName) {
-    List<TextRulerExample> result = new ArrayList<TextRulerExample>();
-
-    if (target.isMultiSlot()) {
-      TypeSystem ts = aCas.getTypeSystem();
-      int currentSlotIndex = 0;
-      TextRulerAnnotation[] currentAnnotations = new TextRulerAnnotation[target.slotNames.length];
-      List<Type> slotTypes = new ArrayList<Type>();
-      for (String s : target.slotNames)
-        slotTypes.add(ts.getType(s));
-
-      for (FSIterator<AnnotationFS> it = aCas.getAnnotationIndex().iterator(true); it.isValid(); it
-              .moveToNext()) {
-        AnnotationFS fs = (AnnotationFS) it.get();
-        Type theType = fs.getType();
-        if (slotTypes.contains(theType)) {
-          int idx = slotTypes.indexOf(theType);
-          if (idx < currentSlotIndex) // the previous example was not
-          // complete, so we have to write
-          // it down:
-          {
-            result.add(new TextRulerExample(this, currentAnnotations, true, target));
-            currentAnnotations = new TextRulerAnnotation[target.slotNames.length];
-          }
-          currentAnnotations[idx] = new TextRulerAnnotation(fs, this);
-          if (idx >= target.slotNames.length - 1) {
-            result.add(new TextRulerExample(this, currentAnnotations, true, target));
-            currentAnnotations = new TextRulerAnnotation[target.slotNames.length];
-            currentSlotIndex = 0;
-          } else
-            currentSlotIndex = idx + 1;
-        }
-      }
-      if (currentSlotIndex > 0) {
-        result.add(new TextRulerExample(this, currentAnnotations, true, target));
-      }
-
-    } else if (target.isLeftCorrection() || target.isRightCorrection()) {
-      // TODO
-      TextRulerBasicLearner learner = target.getLearner();
-      Set<String> filterSet = learner.getFilterSet();
-      CAS testCAS = learner.getTestCAS();
-      TextRulerStatisticsCollector c = new TextRulerStatisticsCollector();
-      resetAndFillTestCAS(testCAS, target);
-      CAS docCAS = getCAS();
-      TypeSystem ts = docCAS.getTypeSystem();
-      Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
-      AnalysisEngine analysisEngine = learner.getAnalysisEngine();
-      try {
-        analysisEngine.process(testCAS);
-      } catch (AnalysisEngineProcessException e) {
-        // TODO add log here
-      }
-      TextRulerTarget newTarget = new TextRulerTarget(target.slotNames, target.getLearner());
-      if (target.isLeftCorrection()) {
-        newTarget.type = TextRulerTarget.MLTargetType.SINGLE_LEFT_BOUNDARY;
-      } else {
-        newTarget.type = TextRulerTarget.MLTargetType.SINGLE_RIGHT_BOUNDARY;
-      }
-      createExamplesForTarget(newTarget);
-      learner.compareOriginalDocumentWithTestCAS(this, testCAS, newTarget, c, true);
-      List<TextRulerExample> correctTags = getPositiveExamples();
-      List<TextRulerExample> wrongTags = new ArrayList<TextRulerExample>(
-              c.getCoveredNegativeExamples());
-      for (TextRulerExample wrongTag : wrongTags) {
-        // test, if there's a corresponding positive example
-        // somewhere around (within maxDistance)
-        List<AnnotationFS> left = TextRulerToolkit.getAnnotationsBeforePosition(docCAS, wrongTag
-                .getAnnotation().getBegin(), target.getMaxShiftDistance(), TextRulerToolkit
-                .getFilterSetWithSlotNames(target.slotNames, filterSet), tokensRootType);
-        List<AnnotationFS> right = TextRulerToolkit.getAnnotationsAfterPosition(docCAS, wrongTag
-                .getAnnotation().getEnd(), target.getMaxShiftDistance() + 1, TextRulerToolkit
-                .getFilterSetWithSlotNames(target.slotNames, filterSet), tokensRootType);
-
-        right.remove(0);
-
-        // TODO stop after the first found match or create one bad
-        // example for each found occurence ??!!
-        // for now: stop after one ! so create only ONE bad
-        // example...
-        int leftDistance = 0;
-        TextRulerExample leftCorrectTag = null;
-        for (int i = left.size() - 1; i >= 0; i--) {
-          leftDistance++;
-          TextRulerAnnotation needle = TextRulerToolkit.convertToTargetAnnotation(left.get(i),
-                  this, target, docCAS.getTypeSystem());
-          // Only checks the beginning of needle
-          leftCorrectTag = TextRulerExampleDocument.exampleListContainsAnnotation(correctTags,
-                  needle);
-          if (leftCorrectTag != null)
-            break;
-        }
-
-        int rightDistance = 0;
-        TextRulerExample rightCorrectTag = null;
-        for (AnnotationFS fs : right) {
-          rightDistance++;
-          TextRulerAnnotation needle = TextRulerToolkit.convertToTargetAnnotation(fs, this, target,
-                  docCAS.getTypeSystem());
-          // Only checks the beginning of needle
-          rightCorrectTag = TextRulerExampleDocument.exampleListContainsAnnotation(correctTags,
-                  needle);
-          if (rightCorrectTag != null)
-            break;
-        }
-
-        TextRulerExample theCorrectTag = null;
-        if (rightDistance < leftDistance && rightCorrectTag != null)
-          theCorrectTag = rightCorrectTag;
-        else if (rightDistance > leftDistance && leftCorrectTag != null)
-          theCorrectTag = leftCorrectTag;
-        else // use the one that would lie in the slot filler:
-        {
-          if (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY && rightCorrectTag != null)
-            theCorrectTag = rightCorrectTag;
-          else
-            theCorrectTag = leftCorrectTag;
-        }
-
-        if (theCorrectTag != null) {
-          TextRulerToolkit.log("FOUND BAD EXAMPLE FOR SHIFTING !!");
-          TextRulerShiftExample shiftExample = new TextRulerShiftExample(this,
-                  wrongTag.getAnnotation(), theCorrectTag.getAnnotation(), true, target);
-          result.add(shiftExample);
-        }
-      }
-      // GlobalCASSource.releaseCAS(testCAS);
-    } else {
-      List<AnnotationFS> slots = TextRulerToolkit.extractAnnotationsForSlotName(
-              aCas,
-              createFromRawTypeName ? target.getSingleSlotRawTypeName() : target
-                      .getSingleSlotTypeName()); // do not use
-      // boundary type
-      // here since we
-      // seek for the
-      // orignial slot
-      // !
-      for (AnnotationFS a : slots) {
-        result.add(new TextRulerExample(this, TextRulerToolkit.convertToTargetAnnotation(a, this,
-                target, aCas.getTypeSystem()), true, target));
-      }
-    }
-    return result;
-  }
-
-  protected void createNegativeExamplesForTarget(TextRulerTarget target) {
-    // the default implementation does not support negative examples,
-    // subclasses can overwrite
-    // this if needed... or we could pass this as an argument to the
-    // constructor....
-  }
-
-  public void createExamplesForTarget(TextRulerTarget target) {
-    createPositiveExamplesForTarget(target);
-    createNegativeExamplesForTarget(target);
-  }
-
-  public void clearCurrentExamples() {
-    positiveExamples.clear();
-    negativeExamples.clear();
-  }
-
-  // pass your test CAS object and the corresponding learning target to get a
-  // filled
-  // test-CAS for testing e.g. rule or rule set..
-  // caution: testCas gets reset fist!
-  public void resetAndFillTestCAS(CAS testCas, TextRulerTarget target) {
-    testCas.reset();
-    CAS docCas = getCAS();
-
-    CasCopier cc = new CasCopier(docCas, testCas);
-    testCas.setDocumentText(docCas.getDocumentText());
-
-    // copy all annotations except the target-annotations:
-    TypeSystem ts = docCas.getTypeSystem();
-
-    List<Type> slotTypes = new ArrayList<Type>();
-
-    for (String s : target.getSlotTypeNames())
-      slotTypes.add(ts.getType(s));
-
-    if (target.isBoundary()) {
-      // add the base types (without START and END markers) also !
-      for (String s : target.slotNames)
-        slotTypes.add(ts.getType(s));
-    }
-
-    for (AnnotationFS fs : docCas.getAnnotationIndex()) {
-      if (!slotTypes.contains(fs.getType())
-              && !fs.getType().equals(docCas.getDocumentAnnotation().getType())) {
-        FeatureStructure copyFs = cc.copyFs(fs);
-        testCas.addFsToIndexes(copyFs);
-      }
-    }
-  }
-
-  public String getCasFileName() {
-    return casFileName;
-  }
-
-  public static void createBoundaryAnnotationsForCas(CAS aCas, String slotName,
-          Set<String> tokenFilterSet) {
-    List<AnnotationFS> slots = TextRulerToolkit.extractAnnotationsForSlotName(aCas, slotName);
-    TypeSystem ts = aCas.getTypeSystem();
-    for (AnnotationFS a : slots) {
-
-      List<AnnotationFS> slotTokens = TextRulerToolkit.getAnnotationsWithinBounds(aCas,
-              a.getBegin(), a.getEnd(),
-              TextRulerToolkit.getFilterSetWithSlotName(slotName, tokenFilterSet),
-              ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME));
-      if (!slotTokens.isEmpty()) {
-        AnnotationFS first = slotTokens.get(0);
-        AnnotationFS last = slotTokens.get(slotTokens.size() - 1);
-        Type typeLB = ts.getType(slotName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION);
-        aCas.addFsToIndexes(aCas.createAnnotation(typeLB, first.getBegin(), first.getEnd()));
-        Type typeRB = ts.getType(slotName + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION);
-        aCas.addFsToIndexes(aCas.createAnnotation(typeRB, last.getBegin(), last.getEnd()));
-      }
-    }
-  }
-
-  public static void removeBoundaryAnnotationsFromCas(CAS aCas, String slotName) {
-    // this method is not tested yet!
-    TypeSystem ts = aCas.getTypeSystem();
-    Type startType = ts.getType(slotName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION);
-    Type endType = ts.getType(slotName + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION);
-    List<AnnotationFS> removeList = new ArrayList<AnnotationFS>();
-    for (FSIterator<AnnotationFS> it = aCas.getAnnotationIndex(startType).iterator(true); it
-            .isValid(); it.moveToNext()) {
-      AnnotationFS fs = it.get();
-      removeList.add(fs);
-    }
-    for (FSIterator<AnnotationFS> it = aCas.getAnnotationIndex(endType).iterator(true); it
-            .isValid(); it.moveToNext()) {
-      AnnotationFS fs = it.get();
-      removeList.add(fs);
-    }
-    for (AnnotationFS fs : removeList)
-      aCas.removeFsFromIndexes(fs);
-  }
-
-  public static synchronized TextRulerExample exampleListContainsAnnotation(
-          List<TextRulerExample> list, TextRulerAnnotation ann) {
-    TextRulerExample needle = new TextRulerExample(null, ann, true, null);
-
-    int index = Collections.binarySearch(list, needle, new Comparator<TextRulerExample>() {
-      public int compare(TextRulerExample o1, TextRulerExample o2) {
-        TextRulerAnnotation afs1 = o1.getAnnotation();
-        TextRulerAnnotation afs2 = o2.getAnnotation();
-        if (afs1.getBegin() < afs2.getBegin())
-          return -1;
-        else if (afs1.getBegin() > afs2.getBegin())
-          return 1;
-        else
-          return 0;
-      }
-    });
-    if (index >= 0)
-      return list.get(index);
-    else
-      return null;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocumentSet.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocumentSet.java
deleted file mode 100755
index 3a5d48c..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerExampleDocumentSet.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-
-/**
- * 
- * TextRulerExampleDocumentSet encapsulates an input set of documents, e.g. examples for a learning
- * algorithm. It creates an instance of TextRulerExampleDocument for each found XMI file of the
- * passed input folder
- * 
- * For loading CASes you have to provide an CasCache. If you use TextRulerBasicLearner, this is done
- * for you automatically.
- * 
- *         hint: this could be renamed to MLDocumentSet instead of TextRulerExampleDocumentSet ?
- */
-public class TextRulerExampleDocumentSet {
-
-  protected List<TextRulerExampleDocument> documents;
-
-  protected CasCache casCache;
-
-  public TextRulerExampleDocumentSet(String xmiFolderName, CasCache casCache) {
-    super();
-    documents = new ArrayList<TextRulerExampleDocument>();
-    this.casCache = casCache;
-    File trainingFolder = new File(xmiFolderName);
-    File[] files = trainingFolder.listFiles(new FilenameFilter() {
-      public boolean accept(File dir, String name) {
-        return (name.endsWith(".xmi"));
-      }
-    });
-
-    for (File file : files) {
-      TextRulerToolkit.log("found document XMI file: " + file.getName());
-      documents.add(new TextRulerExampleDocument(file.getAbsolutePath(), casCache));
-    }
-  }
-
-  // for subset creations:
-  protected TextRulerExampleDocumentSet(String[] inputXmiFiles, CasCache casCache) {
-    super();
-    this.casCache = casCache;
-    documents = new ArrayList<TextRulerExampleDocument>();
-    for (String fileName : inputXmiFiles)
-      documents.add(new TextRulerExampleDocument(fileName, casCache));
-  }
-
-  public void createExamplesForTarget(TextRulerTarget target) {
-    TextRulerExampleDocument[] sortedDocs = getSortedDocumentsInCacheOptimizedOrder();
-    for (TextRulerExampleDocument doc : sortedDocs) {
-      doc.createExamplesForTarget(target);
-    }
-  }
-
-  public void clearCurrentExamples() {
-    for (TextRulerExampleDocument doc : documents)
-      doc.clearCurrentExamples();
-  }
-
-  public Collection<CAS> getCachedCASes() {
-    return casCache.getCachedCASes();
-  }
-
-  public boolean casCacheContainsKey(String key) {
-    return casCache.containsElementWithKey(key);
-  }
-
-  public List<TextRulerExample> getAllExamples() {
-    return getAllExamples(false);
-  }
-
-  public List<TextRulerExample> getAllPositiveExamples() {
-    return getAllExamples(true);
-  }
-
-  public List<TextRulerExample> getAllExamples(boolean onlyPositives) {
-    List<TextRulerExample> result = new ArrayList<TextRulerExample>();
-    for (TextRulerExampleDocument doc : documents) {
-      result.addAll(doc.getPositiveExamples());
-      if (!onlyPositives)
-        result.addAll(doc.getNegativeExamples());
-    }
-    return result;
-  }
-
-  public List<TextRulerExampleDocument> getDocuments() {
-    return documents;
-  }
-
-  public TextRulerExampleDocument[] getSortedDocumentsInCacheOptimizedOrder(
-          Collection<TextRulerExampleDocument> documents) {
-    Set<TextRulerExampleDocument> docsLeft = new HashSet<TextRulerExampleDocument>(documents);
-    TextRulerExampleDocument[] sortedDocs = new TextRulerExampleDocument[documents.size()];
-
-    // "sort" the currently cached documents to the front of the document
-    // list, so that
-    // we can use them directly and do not have to reload all docs everytime
-    // we come here!
-    int i = 0;
-    for (TextRulerExampleDocument doc : documents) {
-      if (casCacheContainsKey(doc.getCasFileName())) {
-        docsLeft.remove(doc);
-        sortedDocs[i] = doc;
-        i++;
-      }
-    }
-    for (TextRulerExampleDocument doc : docsLeft) {
-      sortedDocs[i] = doc;
-      i++;
-    }
-    if (TextRulerToolkit.DEBUG) {
-      TextRulerToolkit.logIf(i != documents.size(), "ERROR, SIZE MISMATCH!");
-    }
-
-    return sortedDocs;
-  }
-
-  public TextRulerExampleDocument[] getSortedDocumentsInCacheOptimizedOrder() {
-    return getSortedDocumentsInCacheOptimizedOrder(documents);
-  }
-
-  public List<Integer> getTokenCountHistogrammForSlotName(String slotName, Set<String> filterSet) {
-    HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
-    int maxLen = 0;
-
-    TextRulerExampleDocument[] sortedDocs = getSortedDocumentsInCacheOptimizedOrder(documents);
-
-    for (TextRulerExampleDocument doc : sortedDocs) {
-      CAS aCas = doc.getCAS();
-      List<AnnotationFS> slots = TextRulerToolkit.extractAnnotationsForSlotName(aCas, slotName);
-      TypeSystem ts = aCas.getTypeSystem();
-      for (AnnotationFS a : slots) {
-
-        List<AnnotationFS> slotTokens = TextRulerToolkit.getAnnotationsWithinBounds(aCas, a
-                .getBegin(), a.getEnd(), TextRulerToolkit.getFilterSetWithSlotName(slotName,
-                filterSet), ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME));
-        int len = slotTokens.size();
-        if (len > maxLen)
-          maxLen = len;
-        Integer key = new Integer(len);
-        int current = map.containsKey(key) ? map.get(key) : 0;
-        map.put(key, len + current);
-      }
-    }
-    List<Integer> resultList = new ArrayList<Integer>(maxLen + 1);
-    for (int i = 0; i <= maxLen; i++) {
-      int value = map.containsKey(i) ? map.get(i) : 0;
-      resultList.add(value);
-    }
-    return resultList;
-  }
-
-  public CAS getCAS(String key) {
-    return casCache.getCAS(key);
-  }
-
-  public int size() {
-    return documents.size();
-  }
-
-  public TextRulerExampleDocument getDocumentForFileName(String fileName) {
-    for (TextRulerExampleDocument doc : documents)
-      if (doc.getCasFileName().equals(fileName))
-        return doc;
-    return null;
-  }
-
-  // TODO this is not tested yet!
-  public List<TextRulerExampleDocumentSet> partitionIntoSubsets(int[] percentages) {
-    List<TextRulerExampleDocumentSet> result = new ArrayList<TextRulerExampleDocumentSet>();
-
-    int sum = 0;
-    for (int p : percentages) {
-      if (p == 0) {
-        TextRulerToolkit
-                .log("[TextRulerExampleDocumentSet.partitionIntoSubsets] a percentage must not be zero!");
-        return null;
-      }
-      sum += p;
-    }
-    if (sum != 100) {
-      TextRulerToolkit
-              .log("[TextRulerExampleDocumentSet.partitionIntoSubsets] percentages has to be 100 in total!");
-      return null;
-    }
-
-    int rest = size();
-    int docIndex = 0;
-
-    for (int i = 0; i < percentages.length; i++) {
-      int partSize;
-      if (i == percentages.length - 1) {
-        partSize = Math.round((((percentages[i] * size()) / 100.0f)));
-        if (partSize == 0)
-          partSize = 1;
-      } else
-        partSize = rest;
-
-      if (partSize == 0) {
-        TextRulerToolkit
-                .log("[TextRulerExampleDocumentSet.partitionIntoSubsets] a percentage must not be zero! too few example documents for your partition?");
-        return null;
-      }
-      String[] fileNames = new String[partSize];
-      for (int doc = 0; doc < partSize; doc++)
-        fileNames[doc] = documents.get(doc + docIndex).getCasFileName();
-      docIndex += partSize;
-      result.add(new TextRulerExampleDocumentSet(fileNames, casCache));
-      rest -= partSize;
-    }
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerMultiSlotRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerMultiSlotRule.java
deleted file mode 100755
index bdcaf78..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerMultiSlotRule.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem.MLRuleItemType;
-
-
-/**
- * 
- * TextRulerMultiSlotRule adds multi-slot specific stuff to the basic class TextRulerRule.
- * 
- * A multi-slot-rule consists of an TextRulerSlotPattern for each slot which of each consists of
- * three patterns: prefiller, filler an postfiller (see TextRulerSlotPattern).
- * 
- */
-public class TextRulerMultiSlotRule extends TextRulerRule {
-
-  protected List<TextRulerSlotPattern> slotPatterns = new ArrayList<TextRulerSlotPattern>();
-
-  public TextRulerMultiSlotRule(TextRulerMultiSlotRule copyFrom) {
-    super(copyFrom);
-
-    for (TextRulerSlotPattern origP : copyFrom.slotPatterns)
-      slotPatterns.add(origP.copy());
-  }
-
-  public String getMarkName(int slotIndex) {
-    return TextRulerToolkit.getTypeShortName(target.getMultiSlotTypeName(slotIndex));
-  }
-
-  public TextRulerMultiSlotRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target) {
-    super(parentAlgorithm, target);
-  }
-
-  protected String getInterslotWildCard() {
-    return "# ";
-  }
-
-  @Override
-  public void compileRuleString() {
-    String ruleString = "";
-
-    int totalSize = 0;
-    int totalIndex = 0;
-    int interSlotWildcards = slotPatterns.size() - 1;
-    if (interSlotWildcards < 0)
-      interSlotWildcards = 0;
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      totalSize += sp.preFillerPattern.size();
-      totalSize += sp.fillerPattern.size();
-      totalSize += sp.postFillerPattern.size();
-    }
-    totalSize += interSlotWildcards;
-
-    for (int slotIndex = 0; slotIndex < slotPatterns.size(); slotIndex++) {
-      TextRulerSlotPattern sPattern = slotPatterns.get(slotIndex);
-      int index = 0;
-      for (TextRulerRuleItem item : sPattern.preFillerPattern) {
-        ruleString += item.getStringForRuleString(this, MLRuleItemType.PREFILLER, index,
-                sPattern.preFillerPattern.size(), totalIndex, totalSize, slotIndex)
-                + " ";
-        index++;
-        totalIndex++;
-      }
-      index = 0;
-      for (TextRulerRuleItem item : sPattern.fillerPattern) {
-        ruleString += item.getStringForRuleString(this, MLRuleItemType.FILLER, index,
-                sPattern.fillerPattern.size(), totalIndex, totalSize, slotIndex)
-                + " ";
-        index++;
-        totalIndex++;
-      }
-
-      index = 0;
-      for (TextRulerRuleItem item : sPattern.postFillerPattern) {
-        ruleString += item.getStringForRuleString(this, MLRuleItemType.POSTFILLER, index,
-                sPattern.postFillerPattern.size(), totalIndex, totalSize, slotIndex)
-                + " ";
-        index++;
-        totalIndex++;
-      }
-
-      if (slotPatterns.size() > 1 && slotIndex < slotPatterns.size() - 1) {
-        // add interslot wildcard:
-        ruleString += getInterslotWildCard();
-        totalIndex++;
-      }
-    }
-
-    ruleString = ruleString.trim();
-    ruleString += ";";
-    this.ruleString = ruleString;
-    setNeedsCompile(false);
-  }
-
-  public List<TextRulerSlotPattern> getPatterns() {
-    return slotPatterns;
-  }
-
-  @Override
-  public TextRulerMultiSlotRule copy() {
-    return new TextRulerMultiSlotRule(this);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRule.java
deleted file mode 100755
index 1b08e42..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRule.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.io.File;
-
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.util.FileUtils;
-
-/**
- * 
- * TextRulerRule is the basic class for any kind of Ruta-Rule representation for any learning
- * algorithm. A rule usually has a parent algorithm (that created it) and a learning target
- * (TextRulerTarget).
- * 
- * The subclasses TextRulerSingleSlotRule and TextRulerMultiSlotRule add slot specific issues to it
- * and every algorithm then has to subclass on of those two and provide a class that implements
- * TextRulerRuleItem.
- * 
- */
-public abstract class TextRulerRule {
-
-  protected TextRulerBasicLearner algorithm;
-
-  protected boolean needsCompile = true;
-
-  protected String ruleString;
-
-  protected TextRulerTarget target;
-
-  protected TextRulerStatisticsCollector coveringStatistics;
-
-  // copy constructor:
-  public TextRulerRule(TextRulerRule copyFrom) {
-    algorithm = copyFrom.algorithm;
-    needsCompile = copyFrom.needsCompile;
-    ruleString = copyFrom.ruleString;
-    target = new TextRulerTarget(copyFrom.target, algorithm);
-    coveringStatistics = copyFrom.coveringStatistics != null ? copyFrom.coveringStatistics.copy()
-            : null;
-  }
-
-  public TextRulerRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target) {
-    super();
-    algorithm = parentAlgorithm;
-    this.target = target;
-  }
-
-  public String getRuleString() {
-    if (needsCompile)
-      compileRuleString();
-    return ruleString;
-  }
-
-  public TextRulerTarget getTarget() {
-    return target;
-  }
-
-  public abstract void compileRuleString();
-
-  public void setNeedsCompile(boolean flag) {
-    needsCompile = flag;
-  }
-
-  public String getRulesFileContent() {
-    return algorithm.getFileHeaderString(false) + getRuleString() + "\n";
-  }
-
-  public void saveToRulesFile(String filename) {
-    File file = new File(filename);
-    String str = getRulesFileContent();
-    try {
-      FileUtils.saveString2File(str, file);
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-    }
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    return this.getRuleString().equals(((TextRulerRule) obj).getRuleString());
-  }
-
-  @Override
-  public int hashCode() {
-    return this.getRuleString().hashCode();
-  }
-
-  public void setCoveringStatistics(TextRulerStatisticsCollector c) {
-    coveringStatistics = c.copy();
-  }
-
-  public TextRulerStatisticsCollector getCoveringStatistics() {
-    return coveringStatistics;
-  }
-
-  public abstract TextRulerRule copy();
-
-  @Override
-  public String toString() {
-    return ruleString == null ? "<not compiled>" : ruleString; // don't
-    // compile if
-    // neccessary!
-    // just
-    // return the
-    // current
-    // rulestring!
-  }
-
-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRuleItem.java
deleted file mode 100755
index e354c22..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRuleItem.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-/**
- * 
- * Every rule pattern (TextRulerRulePattern) consists of items. Those have to implement the
- * interface TextRulerRuleItem.
- * 
- *         hint: maybe we should change this to an abstract class instead of an interface ?!
- */
-public interface TextRulerRuleItem {
-
-  public enum MLRuleItemType {
-    PREFILLER, FILLER, POSTFILLER
-  };
-
-  public String getStringForRuleString(TextRulerRule rule, MLRuleItemType type,
-          int numberInPattern, int patternSize, int numberInRule, int ruleSize, int slotIndex);
-
-  public boolean equals(TextRulerRuleItem o);
-
-  public TextRulerRuleItem copy();
-
-  public String toString();
-
-  public int hashCode();
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRuleList.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRuleList.java
deleted file mode 100755
index 30a62dd..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRuleList.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.util.FileUtils;
-
-/**
- * 
- * TextRulerRuleList can hold a list of rules and provides some extra functionality like saving them
- * to a Ruta rule file...
- * 
- */
-public class TextRulerRuleList extends ArrayList<TextRulerRule> {
-
-  private static final long serialVersionUID = 1L;
-
-  public void saveToRulesFile(String filename, String fileHeader) {
-    File file = new File(filename);
-    try {
-      FileUtils.saveString2File(getTMFileString(fileHeader), file);
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-    }
-  }
-
-  public boolean addRule(TextRulerRule rule) {
-    if (!this.contains(rule)) {
-      this.add(rule);
-      return true;
-    }
-    return false;
-  }
-
-  public String getRulesString(String linePrefix) {
-    return getRulesString(linePrefix, Integer.MAX_VALUE);
-  }
-
-  public String getRulesString(String linePrefix, int maxRuleStringLength) {
-    StringBuffer str = new StringBuffer();
-    for (TextRulerRule rule : this) {
-      String theRuleString = rule.getRuleString();
-      String rStr = theRuleString.length() > maxRuleStringLength ? "<too long to display>"
-              : theRuleString;
-      str.append(linePrefix + rStr + "\t// " + rule.getCoveringStatistics() + "\n");
-    }
-    return str.toString();
-  }
-
-  public String getTMFileString(String header) {
-    return header + getRulesString("", Integer.MAX_VALUE);
-  }
-
-  public String getTMFileString(String header, int maxRuleStringLength) {
-    return header + getRulesString("", maxRuleStringLength);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRulePattern.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRulePattern.java
deleted file mode 100755
index f420c94..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerRulePattern.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.ArrayList;
-
-/**
- * 
- * TextRulerRulePattern is an ordered list of rule items and provides some special functionality for
- * dealing with rule patterns like finding sub patterns or such.
- * 
- *         hint: this is a very basic implementation and could surely be optimized ;-)
- */
-public class TextRulerRulePattern extends ArrayList<TextRulerRuleItem> {
-
-  private static final long serialVersionUID = 1L;
-
-  @Override
-  public String toString() {
-    String result = "";
-    for (TextRulerRuleItem i : this)
-      result += " " + i;
-    return result.trim();
-  }
-
-  public int find(TextRulerRulePattern subPattern) {
-    if (subPattern.size() == 0)
-      return -1;
-    if (size() < subPattern.size())
-      return -1;
-    int maxIndex = size() - subPattern.size();
-    for (int i = 0; i <= maxIndex; i++)
-      if (get(i).toString().equals(subPattern.get(0).toString())) {
-        // test the rest of the items:
-        boolean isEqual = true;
-        for (int i2 = 1; i2 < subPattern.size(); i2++) {
-          if (!get(i + i2).toString().equals(subPattern.get(i2).toString())) {
-            isEqual = false;
-            break;
-          }
-        }
-        if (isEqual)
-          return i;
-
-      }
-    return -1;
-  }
-
-  public TextRulerRulePattern subPattern(int start, int length) {
-    TextRulerRulePattern result = new TextRulerRulePattern();
-    if (length < 0)
-      length = size();
-    for (int i = 0; i < length; i++) {
-      int theIndex = start + i;
-      if (theIndex >= size())
-        break;
-      result.add(get(theIndex));
-    }
-    return result;
-  }
-
-  public TextRulerRulePattern copy() {
-    TextRulerRulePattern result = new TextRulerRulePattern();
-    for (TextRulerRuleItem i : this)
-      result.add(i.copy());
-    return result;
-  }
-
-  public TextRulerRuleItem lastItem() {
-    if (size() > 0)
-      return get(size() - 1);
-    else
-      return null;
-  }
-
-  public TextRulerRuleItem firstItem() {
-    if (size() > 0)
-      return get(0);
-    else
-      return null;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerShiftExample.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerShiftExample.java
deleted file mode 100755
index 9acbfce..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerShiftExample.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-/**
- * 
- * This class introduces the special additional information of an example for learning
- * LP2-Correction Rules. It needs besides the original, correct slot boundary annotation the wrong
- * annotation, or the other way round, it needs the correct annotation where to shift the boundary
- * tag.
- * 
- * Since TextRulerExample provides a possibility to store more than one Annotation for
- * MultiSlot-Exmaples, we easily can use this storage for those two annotations. But for the sake of
- * code reading and better understanding, this additional class with named accessors is created.
- * 
- */
-public class TextRulerShiftExample extends TextRulerExample {
-
-  public TextRulerShiftExample(TextRulerExampleDocument document,
-          TextRulerAnnotation wrongAnnotation, TextRulerAnnotation correctAnnotation,
-          boolean isPositive, TextRulerTarget target) {
-    super(document, (TextRulerAnnotation[]) null, isPositive, target);
-    annotations = new TextRulerAnnotation[2];
-    annotations[0] = wrongAnnotation;
-    annotations[1] = correctAnnotation;
-  }
-
-  public TextRulerAnnotation wrongAnnotation() {
-    return annotations[0];
-  }
-
-  public TextRulerAnnotation correctAnnotation() {
-    return annotations[1];
-  }
-
-  @Override
-  public String toString() {
-    String wrongStr = "" + wrongAnnotation().getBegin();
-    String correctStr = "" + correctAnnotation().getBegin();
-    return wrongStr + " --> " + correctStr;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerSingleSlotRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerSingleSlotRule.java
deleted file mode 100755
index 3a03c8a..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerSingleSlotRule.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem.MLRuleItemType;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-
-/**
- * 
- * TextRulerSingleSlotRule adds single-slot specific stuff to the basic class TextRulerRule.
- * 
- * A single-slot-rule consists of one TextRulerSlotPattern which each consists of three patterns:
- * prefiller, filler an postfiller (see TextRulerSlotPattern).
- * 
- */
-public class TextRulerSingleSlotRule extends TextRulerRule {
-
-  protected TextRulerSlotPattern slotPattern = new TextRulerSlotPattern();
-
-  public TextRulerSingleSlotRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target) {
-    super(parentAlgorithm, target);
-  }
-
-  public TextRulerSingleSlotRule(TextRulerSingleSlotRule copyFrom) {
-    super(copyFrom);
-    slotPattern = copyFrom.slotPattern.copy();
-  }
-
-  public TextRulerRulePattern getPreFillerPattern() {
-    return slotPattern.preFillerPattern;
-  }
-
-  public TextRulerRulePattern getFillerPattern() {
-    return slotPattern.fillerPattern;
-  }
-
-  public TextRulerRulePattern getPostFillerPattern() {
-    return slotPattern.postFillerPattern;
-  }
-
-  public String getMarkName() {
-    return TextRulerToolkit.getTypeShortName(target.getSingleSlotTypeName());
-  }
-
-  @Override
-  public void compileRuleString() {
-    String ruleString = "";
-    int preCount = slotPattern.preFillerPattern.size();
-    int postCount = slotPattern.postFillerPattern.size();
-    int fillerCount = slotPattern.fillerPattern.size();
-    int totalSize = preCount + postCount + fillerCount;
-    int index = 0;
-    int totalIndex = 0;
-    for (TextRulerRuleItem item : slotPattern.preFillerPattern) {
-      ruleString += item.getStringForRuleString(this, MLRuleItemType.PREFILLER, index, preCount,
-              totalIndex, totalSize, 0)
-              + " ";
-      index++;
-      totalIndex++;
-    }
-
-    index = 0;
-    for (TextRulerRuleItem item : slotPattern.fillerPattern) {
-      ruleString += item.getStringForRuleString(this, MLRuleItemType.FILLER, index, fillerCount,
-              totalIndex, totalSize, 0)
-              + " ";
-      index++;
-      totalIndex++;
-    }
-
-    index = 0;
-    for (TextRulerRuleItem item : slotPattern.postFillerPattern) {
-      ruleString += item.getStringForRuleString(this, MLRuleItemType.POSTFILLER, index, postCount,
-              totalIndex, totalSize, 0)
-              + " ";
-      index++;
-      totalIndex++;
-    }
-
-    ruleString = ruleString.trim();
-    ruleString += ";";
-    this.ruleString = ruleString;
-    setNeedsCompile(false);
-  }
-
-  public void addPreFillerItem(TextRulerRuleItem item) {
-    slotPattern.preFillerPattern.add(0, item);
-    setNeedsCompile(true);
-  }
-
-  public void addPreFillerItemWithNormalOrder(TextRulerRuleItem item) {
-    slotPattern.preFillerPattern.add(item);
-    setNeedsCompile(true);
-  }
-
-  public void addPostFillerItem(TextRulerRuleItem item) {
-    slotPattern.postFillerPattern.add(item);
-    setNeedsCompile(true);
-  }
-
-  public void addFillerItem(TextRulerRuleItem item) {
-    if (target.type == MLTargetType.SINGLE_WHOLE_SLOT) {
-      slotPattern.fillerPattern.add(item);
-      setNeedsCompile(true);
-    } else {
-      throw new RuntimeException("[TextRulerRule] BOUNDARY SLOT RULES CANNOT HAVE FILLER ITEMS!");
-    }
-  }
-
-  public TextRulerRuleItem getOutermostPreFillerItem() {
-    if (slotPattern.preFillerPattern.size() == 0)
-      return null;
-    else
-      return slotPattern.preFillerPattern.get(0);
-  }
-
-  public TextRulerRuleItem getOutermostPostFillerItem() {
-    if (slotPattern.postFillerPattern.size() == 0)
-      return null;
-    else
-      return slotPattern.postFillerPattern.get(slotPattern.postFillerPattern.size() - 1);
-  }
-
-  public void removeOutermostPreFillerItem() {
-    if (slotPattern.preFillerPattern.size() > 0) {
-      slotPattern.preFillerPattern.remove(0);
-      setNeedsCompile(true);
-    }
-  }
-
-  public void removeOutermostPostFillerItem() {
-    if (slotPattern.postFillerPattern.size() > 0) {
-      slotPattern.postFillerPattern.remove(slotPattern.postFillerPattern.size() - 1);
-      setNeedsCompile(true);
-    }
-  }
-
-  public TextRulerRuleItem getRuleItemWithIndex(int index) {
-    int i = index;
-    if (i < slotPattern.preFillerPattern.size())
-      return slotPattern.preFillerPattern.get(i);
-    else
-      i -= slotPattern.preFillerPattern.size();
-
-    if (i < slotPattern.fillerPattern.size())
-      return slotPattern.fillerPattern.get(i);
-    else
-      i -= slotPattern.fillerPattern.size();
-
-    if (i < slotPattern.postFillerPattern.size())
-      return slotPattern.postFillerPattern.get(i);
-    else
-      return null;
-  }
-
-  public int totalItemCount() {
-    return slotPattern.preFillerPattern.size() + slotPattern.fillerPattern.size()
-            + slotPattern.postFillerPattern.size();
-  }
-
-  @Override
-  public TextRulerSingleSlotRule copy() {
-    return new TextRulerSingleSlotRule(this);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerSlotPattern.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerSlotPattern.java
deleted file mode 100755
index b9bfa65..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerSlotPattern.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-/**
- * 
- * TextRulerSlotPattern holds the three slot patterns we usually have for a Ruta-Rule: a
- * preFiller pattern, a filler pattern and a post filler pattern
- * 
- */
-public class TextRulerSlotPattern {
-
-  public TextRulerRulePattern preFillerPattern = new TextRulerRulePattern();
-
-  public TextRulerRulePattern fillerPattern = new TextRulerRulePattern();
-
-  public TextRulerRulePattern postFillerPattern = new TextRulerRulePattern();
-
-  public TextRulerSlotPattern() {
-    super();
-  }
-
-  public TextRulerSlotPattern(TextRulerSlotPattern copyFrom) {
-    super();
-    for (TextRulerRuleItem i : copyFrom.preFillerPattern)
-      preFillerPattern.add(i.copy());
-    for (TextRulerRuleItem i : copyFrom.fillerPattern)
-      fillerPattern.add(i.copy());
-    for (TextRulerRuleItem i : copyFrom.postFillerPattern)
-      postFillerPattern.add(i.copy());
-  }
-
-  public TextRulerSlotPattern copy() {
-    return new TextRulerSlotPattern(this);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerStatisticsCollector.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerStatisticsCollector.java
deleted file mode 100755
index 3280851..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerStatisticsCollector.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * 
- * TextRulerStatisticsCollector is used for collecting data while e.g. testing a rule.
- * 
- * It holds a HashMap for the covered positive and negative MLExamples of e.g. the training
- * documents, counts the true positives (coveredPositives), false positives (coveredNegatives), ...
- * 
- * Currently false negatives (missedPositives) are not counted (see
- * TextRulerExampleDocument.compareOriginalDocumentWithTestCAS) but this functionality can be easily
- * added (since it exists as commented out code)
- * 
- */
-public class TextRulerStatisticsCollector {
-
-  protected int p = 0; // covered positive examples (true positives)
-
-  protected int n = 0; // covered negative examples (false positives)
-
-  // protected int missedPositives = 0; // (false negatives)
-
-  protected Set<TextRulerExample> coveredPositives = new HashSet<TextRulerExample>();
-
-  protected Set<TextRulerExample> coveredNegatives = new HashSet<TextRulerExample>();
-
-  public TextRulerStatisticsCollector() {
-    super();
-  }
-
-  public TextRulerStatisticsCollector(TextRulerStatisticsCollector c) {
-    p = c.p;
-    n = c.n;
-    coveredPositives.addAll(c.coveredPositives);
-    coveredNegatives.addAll(c.coveredNegatives);
-  }
-
-  public int getTotalCoveredExamples() {
-    return p + n;
-  }
-
-  public int getCoveredPositivesCount() {
-    if (TextRulerToolkit.DEBUG && p != coveredPositives.size()) {
-      TextRulerToolkit.log("WHY is P different from coveredPositives.size() ??");
-    }
-    return p;
-  }
-
-  public int getCoveredNegativesCount() {
-    return n;
-  }
-
-  public Set<TextRulerExample> getCoveredPositiveExamples() {
-    return coveredPositives;
-  }
-
-  public Set<TextRulerExample> getCoveredNegativeExamples() {
-    return coveredNegatives;
-  }
-
-  // public int getMissedPositives()
-  // {
-  // return missedPositives;
-  // }
-
-  public void reflectCountsFromCoveredExamples() {
-    p = coveredPositives.size();
-    n = coveredNegatives.size();
-  }
-
-  public void reset() {
-    p = 0;
-    n = 0;
-    // missedPositives = 0 ;
-    // coveredDocuments = 0;
-    coveredPositives.clear();
-    coveredNegatives.clear();
-  }
-
-  public void incCoveredPositives(int count) {
-    p += count;
-  }
-
-  public void incCoveredNegatives(int count) {
-    n += count;
-  }
-
-  public void addCoveredPositive(TextRulerExample e) {
-    if (coveredPositives.add(e))
-      incCoveredPositives(1);
-    else
-      TextRulerToolkit.logIfDebug("TRIED TO ADD A POSITIVE COVERED EXAMPLE TWICE !!");
-  }
-
-  public void addCoveredNegative(TextRulerExample e) {
-    if (coveredNegatives.add(e))
-      incCoveredNegatives(1);
-    else
-      TextRulerToolkit.logIfDebug("TRIED TO ADD A NEGATIVE COVERED EXAMPLE TWICE !!");
-  }
-
-  public TextRulerStatisticsCollector copy() {
-    return new TextRulerStatisticsCollector(this);
-  }
-
-  public void add(TextRulerStatisticsCollector c) {
-    incCoveredNegatives(c.n);
-    incCoveredPositives(c.p);
-    coveredPositives.addAll(c.coveredPositives);
-    coveredNegatives.addAll(c.coveredNegatives);
-  }
-
-  @Override
-  public String toString() {
-    return "p=" + p + "; n=" + n;
-  }
-
-  // public void incCoveredMissedPositives(int count)
-  // {
-  // missedPositives += count;
-  // }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerTarget.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerTarget.java
deleted file mode 100755
index a5041e4..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerTarget.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.util.Arrays;
-
-/**
- * 
- * TextRulerTarget encapsulates a learning target of an ML-algorithm. It currently can be
- * 
- * * multi slot (full slots, not boundary!) * single slot (full slot) * single boundary (single slot
- * left or right boundary)
- * 
- * An TextRulerRule for example is induced for an TextRulerTarget or a testCAS for a given
- * TextRulerExampleDocument is created especially for a given target.
- * 
- */
-public class TextRulerTarget {
-
-  public enum MLTargetType {
-    MULTI_SLOT, SINGLE_WHOLE_SLOT, SINGLE_LEFT_BOUNDARY, SINGLE_RIGHT_BOUNDARY, SINGLE_LEFT_CORRECTION, SINGLE_RIGHT_CORRECTION
-  };
-
-  public String slotNames[];
-
-  public MLTargetType type;
-
-  private TextRulerBasicLearner learner;
-
-  private int maxShiftDistance = 0;
-
-  // copy constructor
-  public TextRulerTarget(TextRulerTarget copyFrom, TextRulerBasicLearner owner) {
-    this.slotNames = copyFrom.slotNames.clone();
-    this.type = copyFrom.type;
-    this.learner = owner;
-  }
-
-  public TextRulerTarget(String slotNames[], TextRulerBasicLearner owner) {
-    this.slotNames = slotNames;
-    type = MLTargetType.MULTI_SLOT;
-    this.learner = owner;
-  }
-
-  public TextRulerTarget(String slotName, TextRulerBasicLearner owner) {
-    slotNames = new String[1];
-    slotNames[0] = slotName;
-    type = MLTargetType.SINGLE_WHOLE_SLOT;
-    this.learner = owner;
-  }
-
-  public TextRulerBasicLearner getLearner() {
-    return learner;
-  }
-
-  public TextRulerTarget(String slotName, MLTargetType type, TextRulerBasicLearner owner) {
-    slotNames = new String[1];
-    slotNames[0] = slotName;
-    this.type = type;
-    this.learner = owner;
-  }
-
-  public String getMultiSlotTypeName(int slotIndex) {
-    return slotNames[slotIndex];
-  }
-
-  public String getSingleSlotRawTypeName() {
-    return slotNames[0];
-  }
-
-  public String getSingleSlotTypeName() {
-    return getSingleSlotTypeName(type, slotNames[0]);
-    // if (type == MLTargetType.MULTI_SLOT)
-    // return null;
-    // if (type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-    // return slotNames[0]+TextRulerToolkit.LEFT_BOUNDARY_EXTENSION;
-    // else if (type == MLTargetType.SINGLE_RIGHT_BOUNDARY)
-    // return slotNames[0]+TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION;
-    // else
-    // return slotNames[0];
-  }
-
-  public static String getSingleSlotTypeName(MLTargetType t, String slotName) {
-    if (t == MLTargetType.MULTI_SLOT)
-      return null;
-    if (t == MLTargetType.SINGLE_LEFT_BOUNDARY)
-      return slotName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION;
-    else if (t == MLTargetType.SINGLE_RIGHT_BOUNDARY)
-      return slotName + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION;
-    else
-      return slotName;
-  }
-
-  public String[] getRawSlotNames() {
-    return slotNames;
-  }
-
-  public String[] getSlotTypeNames() {
-    if (type == MLTargetType.MULTI_SLOT)
-      return slotNames;
-    else {
-      String result[] = new String[1];
-      result[0] = getSingleSlotTypeName();
-      return result;
-    }
-  }
-
-  public boolean isMultiSlot() {
-    return type == MLTargetType.MULTI_SLOT;
-  }
-
-  public boolean isBoundary() {
-    return type == MLTargetType.SINGLE_LEFT_BOUNDARY || type == MLTargetType.SINGLE_RIGHT_BOUNDARY;
-  }
-
-  public boolean isLeftBoundary() {
-    return type == MLTargetType.SINGLE_LEFT_BOUNDARY;
-  }
-
-  public boolean isRightBoundary() {
-    return type == MLTargetType.SINGLE_RIGHT_BOUNDARY;
-  }
-
-  public boolean isLeftCorrection() {
-    return type == MLTargetType.SINGLE_LEFT_CORRECTION;
-  }
-
-  public boolean isRightCorrection() {
-    return type == MLTargetType.SINGLE_RIGHT_CORRECTION;
-  }
-
-  public TextRulerTarget getCounterPartBoundaryTarget() {
-    if (!isBoundary())
-      return null;
-    else if (type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-      return new TextRulerTarget(slotNames[0], MLTargetType.SINGLE_RIGHT_BOUNDARY, learner);
-    else
-      return new TextRulerTarget(slotNames[0], MLTargetType.SINGLE_LEFT_BOUNDARY, learner);
-  }
-
-  public int getMaxShiftDistance() {
-    return maxShiftDistance;
-  }
-
-  public void setMaxShiftDistance(int maxShiftDistance) {
-    this.maxShiftDistance = maxShiftDistance;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    TextRulerTarget t = (TextRulerTarget) o;
-    if (t.slotNames.length != slotNames.length)
-      return false;
-    for (int i = 0; i < slotNames.length; i++)
-      if (!slotNames[i].equals(t.slotNames[i]))
-        return false;
-    return type == t.type;
-  }
-
-  @Override
-  public int hashCode() {
-    return Arrays.asList(slotNames).hashCode() * type.hashCode();
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerToolkit.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerToolkit.java
deleted file mode 100755
index 5a4ed48..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerToolkit.java
+++ /dev/null
@@ -1,571 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.URL;
-import java.text.CharacterIterator;
-import java.text.StringCharacterIterator;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.impl.XmiCasDeserializer;
-import org.apache.uima.cas.impl.XmiCasSerializer;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.resource.metadata.TypeDescription;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.util.XMLInputSource;
-import org.apache.uima.util.XMLSerializer;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- * 
- * This static class provides all kinds of helper methods and constants that are useful for all
- * kinds of stuff in this project.
- */
-public class TextRulerToolkit {
-
-  public static final boolean LOGGING_ENABLED = true;
-
-  public static final boolean DEBUG = false;
-
-  public static final String RUTA_ALL_TYPE_NAME = "org.apache.uima.ruta.type.ALL";
-
-  public static final String RUTA_ANY_TYPE_NAME = "org.apache.uima.ruta.type.ANY";
-
-  public static final String RUTA_WORD_TYPE_NAME = "org.apache.uima.ruta.type.W";
-
-  public static final String RUTA_BREAK_TYPE_NAME = "org.apache.uima.ruta.type.BREAK";
-
-  public static final String RUTA_SPACE_TYPE_NAME = "org.apache.uima.ruta.type.SPACE";
-
-  public static final String RUTA_NUM_TYPE_NAME = "org.apache.uima.ruta.type.NUM";
-
-  public static final String RUTA_MARKUP_TYPE_NAME = "org.apache.uima.ruta.type.MARKUP";
-
-  public static final String RUTA_SPECIAL_TYPE_NAME = "org.apache.uima.ruta.type.SPECIAL";
-
-  public static final String RUTA_NBSP_TYPE_NAME = "org.apache.uima.ruta.type.NBSP";
-
-  public static final String LEFT_BOUNDARY_EXTENSION = "START";
-
-  public static final String RIGHT_BOUNDARY_EXTENSION = "END";
-
-  public static void log(String str) {
-    if (LOGGING_ENABLED)
-      System.out.println(str);
-  }
-
-  public static void logIfDebug(String str) {
-    if (DEBUG)
-      log(str);
-  }
-
-  public static void logIf(boolean condition, String str) {
-    if (LOGGING_ENABLED && condition)
-      System.out.println(str);
-  }
-
-  public static URL getResourceURL(String name) {
-    return FileLocator.find(TextRulerPlugin.getDefault().getBundle(), new Path(name), null);
-  }
-
-  public static AnalysisEngineDescription getAnalysisEngineDescription(String descFile) {
-    AnalysisEngineDescription result = null;
-    try {
-      XMLInputSource in = new XMLInputSource(descFile);
-      result = (AnalysisEngineDescription) UIMAFramework.getXMLParser().parseResourceSpecifier(in);
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-      result = null;
-    }
-    return result;
-  }
-
-  public static AnalysisEngineDescription getAnalysisEngineDescription(URL fileURL) {
-    AnalysisEngineDescription result = null;
-    try {
-      XMLInputSource in = new XMLInputSource(fileURL);
-      result = (AnalysisEngineDescription) UIMAFramework.getXMLParser().parseResourceSpecifier(in);
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-      result = null;
-    }
-    return result;
-  }
-
-  public static AnalysisEngine loadAnalysisEngine(AnalysisEngineDescription desc) {
-    AnalysisEngine result = null;
-    try {
-      result = UIMAFramework.produceAnalysisEngine(desc);
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-      result = null;
-    }
-    return result;
-  }
-
-  public static void addBoundaryTypes(AnalysisEngineDescription description, String[] slotNames) {
-    List<String> list = new ArrayList<String>();
-    for (String eachSlot : slotNames) {
-      list.add(eachSlot + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION);
-      list.add(eachSlot + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION);
-    }
-    TypeSystemDescription typeSystem = description.getAnalysisEngineMetaData().getTypeSystem();
-    for (String string : list) {
-      TypeDescription type = typeSystem.getType(string);
-      if (type == null) {
-        typeSystem.addType(string, "", "uima.tcas.Annotation");
-      }
-    }
-  }
-
-  public static CAS readCASfromXMIFile(String filename, AnalysisEngine ae, CAS reuseCAS) {
-    return readCASfromXMIFile(new File(filename), ae, reuseCAS);
-  }
-
-  public static CAS readCASfromXMIFile(File file, AnalysisEngine ae, CAS reuseCAS) {
-    FileInputStream inputStream = null;
-    try {
-      CAS resultCas;
-      inputStream = new FileInputStream(file);
-      if (reuseCAS != null) {
-        reuseCAS.reset();
-        resultCas = reuseCAS;
-      } else {
-        resultCas = GlobalCASSource.allocCAS(ae); // ae.newCAS();
-      }
-      XmiCasDeserializer.deserialize(inputStream, resultCas, true);
-      return resultCas;
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-    } finally {
-      try {
-        if (inputStream != null)
-          inputStream.close();
-      } catch (Exception e) {
-        TextRulerPlugin.error(e);
-      }
-    }
-    return null;
-  }
-
-  public static void writeCAStoXMIFile(CAS aCas, String filename)// throws
-  // IOException,
-  // SAXException
-  {
-    File newFile = new File(filename);
-    FileOutputStream out = null;
-
-    try {
-      // write XMI
-      out = new FileOutputStream(newFile);
-      XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());
-      XMLSerializer xmlSer = new XMLSerializer(out, false);
-      ser.serialize(aCas, xmlSer.getContentHandler());
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-    } finally {
-      if (out != null) {
-        try {
-          out.close();
-        } catch (Exception e) {
-          TextRulerPlugin.error(e);
-        }
-
-      }
-    }
-  }
-
-  public static List<AnnotationFS> extractAnnotationsForSlotName(CAS aCas, String slotName) {
-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();
-    TypeSystem ts = aCas.getTypeSystem();
-    Type slotType = ts.getType(slotName);
-    FSIterator<AnnotationFS> it = aCas.getAnnotationIndex(slotType).iterator(true);
-    if (!it.isValid()) {
-      // System.out.println("##### -> iterator not valid for slots!!");
-    }
-    while (it.isValid()) {
-      AnnotationFS fs = it.get();
-
-      AnnotationFS previous = result.size() > 0 ? result.get(result.size() - 1) : null;
-      if (previous == null || previous.getBegin() != fs.getBegin()
-              || previous.getEnd() != fs.getEnd())
-        result.add(fs);
-      else {
-        logIfDebug("******** QUANTIFIER BUG ?? Multiple annotation: " + fs.getType().getName());
-      }
-      it.moveToNext();
-    }
-
-    return result;
-  }
-
-  private static List<AnnotationFS> getAnnotationWithinBounds(CAS aCas, int posStart, int posEnd,
-          Set<String> filterSet, Type rootType) {
-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();
-    TypeSystem ts = aCas.getTypeSystem();
-    try {
-
-      AnnotationFS boundaryAnnotation = aCas.createAnnotation(ts.getType("uima.tcas.Annotation"),
-              posStart > 0 ? posStart - 1 : 0, posEnd); // TODO ist das
-      FSIterator<AnnotationFS> it = aCas.getAnnotationIndex().subiterator(boundaryAnnotation, true,
-              true);
-      while (it.isValid()) {
-        AnnotationFS fs = it.get();
-        if (fs.getBegin() < posStart || fs.getEnd() > posEnd) {
-          it.moveToNext();
-          continue;
-        }
-        if (rootType != null) {
-          if (!ts.subsumes(rootType, fs.getType())) {
-            it.moveToNext();
-            continue;
-          }
-        }
-        if (filterSet == null || !filterSet.contains(fs.getType().getName())) {
-          result.add(fs);
-        }
-
-        it.moveToNext();
-      }
-
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-    }
-    return result;
-  }
-
-  public static List<AnnotationFS> getAnnotationsBeforePosition(CAS aCas, int position,
-          int maxCount, Set<String> filterSet, Type rootType) {
-    List<AnnotationFS> result = getAnnotationWithinBounds(aCas, 0, position, filterSet, rootType);
-    if (maxCount > 0) {
-      while (result.size() > maxCount)
-        result.remove(0); // remove from front of queue !
-    }
-    return result;
-  }
-
-  public static List<AnnotationFS> getAnnotationsAfterPosition(CAS aCas, int position,
-          int maxCount, Set<String> filterSet, Type rootType) {
-    int maxPos = aCas.getDocumentText().length() - 1;
-    List<AnnotationFS> result = getAnnotationWithinBounds(aCas, position, maxPos, filterSet,
-            rootType);
-    if (maxCount > 0) {
-      while (result.size() > maxCount)
-        result.remove(result.size() - 1); // remove from end of queue!
-    }
-    return result;
-  }
-
-  public static List<AnnotationFS> getAnnotationsWithinBounds(CAS aCas, int start, int end,
-          Set<String> filterSet, Type rootType) {
-    return getAnnotationWithinBounds(aCas, start, end, filterSet, rootType);
-  }
-
-  public static List<AnnotationFS> getOtherAnnotationsOverToken(CAS aCas,
-          AnnotationFS tokenAnnotation, Set<String> filterSet) {
-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();
-    // filter out document annotation!!
-    FSIterator<AnnotationFS> it = aCas.getAnnotationIndex().iterator();
-    Type tokenType = tokenAnnotation.getType();
-    FSIterator<AnnotationFS> leftIt = null;
-    FSIterator<AnnotationFS> rightIt = null;
-    TypeSystem ts = aCas.getTypeSystem();
-    Type rootType = ts.getType(RUTA_ALL_TYPE_NAME);
-    Set<String> allFilters = new HashSet<String>();
-    allFilters.add("uima.tcas.DocumentAnnotation");
-    allFilters.add(RutaEngine.BASIC_TYPE);
-    if (filterSet != null)
-      allFilters.addAll(filterSet);
-    for (; it.isValid(); it.moveToNext()) {
-      AnnotationFS fs = (AnnotationFS) it.get();
-      if (fs.getBegin() == tokenAnnotation.getBegin()
-              && fs.getEnd() == tokenAnnotation.getEnd() && fs.getType().equals(tokenType)) {
-        leftIt = it;
-
-        rightIt = it.copy();
-        break;
-      }
-    }
-    if (leftIt == null)
-      return null; // the token annotation was not found !
-    if (leftIt.isValid())
-      leftIt.moveToPrevious(); // leave our token annotation behind us...
-    // search from the token annotation to the left
-    for (; leftIt.isValid(); leftIt.moveToPrevious()) {
-      AnnotationFS fs = (AnnotationFS) leftIt.get();
-      if (fs.getEnd() <= tokenAnnotation.getBegin())
-        break; // if that happens we are out of reach and can stop
-      if (fs.getBegin() <= tokenAnnotation.getBegin()
-              && fs.getEnd() >= tokenAnnotation.getEnd()
-              && !allFilters.contains(fs.getType().getName())
-              && !ts.subsumes(rootType, fs.getType()))
-        result.add(fs);
-    }
-
-    // search from the token annotation to the right
-    if (rightIt.isValid())
-      rightIt.moveToNext(); // leave our token annotation behind us...
-    for (; rightIt.isValid(); rightIt.moveToNext()) {
-      AnnotationFS fs = (AnnotationFS) rightIt.get();
-      if (fs.getBegin() >= tokenAnnotation.getEnd())
-        break; // if that happens we are out of reach and can stop
-      if (fs.getBegin() <= tokenAnnotation.getBegin()
-              && fs.getEnd() >= tokenAnnotation.getEnd()
-              && !allFilters.contains(fs.getType().getName())
-              && !ts.subsumes(rootType, fs.getType()))
-        result.add(fs);
-    }
-    return result;
-  }
-
-  public static synchronized Set<String> getFilterSetWithSlotNames(String[] slotNames,
-          Set<String> otherFilters) {
-    Set<String> result = new HashSet<String>(otherFilters);
-    result.add(RutaEngine.BASIC_TYPE);
-    if (slotNames != null)
-      for (String s : slotNames)
-        result.add(s);
-    return result;
-  }
-
-  public static synchronized Set<String> getFilterSetWithSlotName(String slotName,
-          Set<String> otherFilters) {
-    String[] sn = { slotName };
-    return getFilterSetWithSlotNames(sn, otherFilters);
-  }
-
-  public static synchronized String getStandardFilterSetString() {
-    String str = "";
-    for (String s : getStandardFilterSet(null))
-      if (str.length() == 0)
-        str += s;
-      else
-        str += ", " + s;
-    return str;
-  }
-
-  public static synchronized Set<String> getStandardFilterSet(String[] slotNames) {
-    Set<String> filterSet = new HashSet<String>();
-    if (slotNames != null) {
-      for (String s : slotNames)
-        filterSet.add(s);
-    }
-    filterSet.add(RUTA_SPACE_TYPE_NAME);
-    filterSet.add(RUTA_BREAK_TYPE_NAME);
-    filterSet.add(RUTA_MARKUP_TYPE_NAME);
-    filterSet.add(RUTA_NBSP_TYPE_NAME);
-    return filterSet;
-  }
-
-  public static synchronized Set<String> getStandardFeatureFilterSet() {
-    Set<String> filterSet = new HashSet<String>();
-
-    filterSet.add("uima.cas.AnnotationBase:sofa");
-    filterSet.add("uima.tcas.Annotation:begin");
-    filterSet.add("uima.tcas.Annotation:end");
-    filterSet.add("org.apache.uima.ruta.type.RutaBasic:Replacement");
-    return filterSet;
-  }
-
-  // return the example of the list if found, null otherwise
-  public static synchronized TextRulerExample exampleListContainsAnnotation(
-          List<TextRulerExample> list, TextRulerAnnotation ann) {
-    TextRulerExample needle = new TextRulerExample(null, ann, true, null);
-    int index = Collections.binarySearch(list, needle, new Comparator<TextRulerExample>() {
-      public int compare(TextRulerExample o1, TextRulerExample o2) {
-        TextRulerAnnotation afs1 = o1.getAnnotation();
-        TextRulerAnnotation afs2 = o2.getAnnotation();
-        if (afs1.getBegin() < afs2.getBegin())
-          return -1;
-        else if (afs1.getBegin() > afs2.getBegin())
-          return 1;
-        else if (afs1.getEnd() > afs2.getEnd())
-          return -1;
-        else if (afs1.getEnd() < afs2.getEnd())
-          return 1;
-        else
-          return 0;
-      }
-    });
-    if (index >= 0)
-      return list.get(index);
-    else
-      return null;
-  }
-
-  public static synchronized String addTrailingSlashToPath(String path) {
-    if (!(path.endsWith("/") || path.endsWith("\\")))
-      path = path + System.getProperty("file.separator");
-    return path;
-  }
-
-  public static synchronized String createTemporaryDirectory() throws IOException {
-
-    final File temp;
-
-    temp = File.createTempFile("temp", Long.toString(System.nanoTime()));
-    if (!(temp.delete()))
-      return null;
-    if (!(temp.mkdir()))
-      return null;
-    temp.deleteOnExit();
-    return addTrailingSlashToPath(temp.getPath());
-  }
-
-  public static synchronized String getTypeShortName(String typeName) {
-    if (typeName.indexOf(".") >= 0) {
-      String components[] = typeName.split("\\.");
-      return components[components.length - 1];
-    } else
-      return typeName;
-  }
-
-
-  public static synchronized String escapeForRegExp(String aRegexFragment) {
-    final StringBuilder result = new StringBuilder();
-
-    final StringCharacterIterator iterator = new StringCharacterIterator(aRegexFragment);
-    char character = iterator.current();
-    while (character != CharacterIterator.DONE) {
-      /*
-       * All literals need to have backslashes doubled.
-       */
-      if (character == '.') {
-        result.append("\\.");
-      } else if (character == '\\') {
-        result.append("\\\\");
-      } else if (character == '?') {
-        result.append("\\?");
-      } else if (character == '*') {
-        result.append("\\*");
-      } else if (character == '+') {
-        result.append("\\+");
-      } else if (character == '&') {
-        result.append("\\&");
-      } else if (character == ':') {
-        result.append("\\:");
-      } else if (character == '{') {
-        result.append("\\{");
-      } else if (character == '}') {
-        result.append("\\}");
-      } else if (character == '[') {
-        result.append("\\[");
-      } else if (character == ']') {
-        result.append("\\]");
-      } else if (character == '(') {
-        result.append("\\(");
-      } else if (character == ')') {
-        result.append("\\)");
-      } else if (character == '^') {
-        result.append("\\^");
-      } else if (character == '$') {
-        result.append("\\$");
-      } else {
-        // the char is not a special one
-        // add it to the result as is
-        result.append(character);
-      }
-      character = iterator.next();
-    }
-    return result.toString();
-  }
-
-  public static synchronized String escapeForStringParameter(String stringFragment) {
-    final StringBuilder result = new StringBuilder();
-
-    final StringCharacterIterator iterator = new StringCharacterIterator(stringFragment);
-    char character = iterator.current();
-    while (character != CharacterIterator.DONE) {
-      if (character == '"') {
-        result.append("\\\"");
-      } else if (character == '\\') {
-        result.append("\\\\");
-      } else {
-        result.append(character);
-      }
-      character = iterator.next();
-    }
-    return result.toString();
-  }
-
-  public static synchronized void appendStringToFile(String fileName, String str) {
-    try {
-      File f = new File(fileName);
-      BufferedWriter output;
-      if (!f.exists())
-        output = new BufferedWriter(new FileWriter(fileName));
-      else
-        output = new BufferedWriter(new FileWriter(fileName, true));
-      output.append(str);
-      output.close();
-    } catch (IOException e) {
-      TextRulerPlugin.error(e);
-    }
-  }
-
-  public static synchronized TextRulerAnnotation convertToTargetAnnotation(AnnotationFS fs,
-          TextRulerExampleDocument doc, TextRulerTarget target, TypeSystem ts) {
-    AnnotationFS theAnnotation;
-    if (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-      theAnnotation = fs.getCAS().createAnnotation(ts.getType(target.getSingleSlotTypeName()),
-              fs.getBegin(), fs.getBegin());
-    else if (target.type == MLTargetType.SINGLE_RIGHT_BOUNDARY)
-      theAnnotation = fs.getCAS().createAnnotation(ts.getType(target.getSingleSlotTypeName()),
-              fs.getEnd(), fs.getEnd());
-    else
-      theAnnotation = fs;
-    return new TextRulerAnnotation(theAnnotation, doc);
-  }
-
-  public static synchronized List<Feature> getFilteredAnnotationFeatures(AnnotationFS afs) {
-    List<Feature> result = new ArrayList<Feature>();
-    List<Feature> theFeatures = afs.getType().getFeatures();
-    Set<String> filters = getStandardFeatureFilterSet();
-    for (Feature f : theFeatures)
-      if (!filters.contains(f.getName()))
-        result.add(f);
-    return result;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerWordConstraint.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerWordConstraint.java
deleted file mode 100755
index c41db1b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/core/TextRulerWordConstraint.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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.ruta.textruler.core;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-
-/**
- * 
- * This class was moved from one of the algorithms to the core framework since it gets used in
- * almost every algorithm. It encapsulates the word constraint e.g. of a Ruta rule item.
- */
-public class TextRulerWordConstraint {
-
-  // TODO add a preference for it or include it in the learner
-  private static final boolean AUTO_REGEXP = true;
-
-  protected TextRulerAnnotation tokenAnnotation;
-
-  protected boolean isRegExpType; // indicates wheter this token can have
-
-  // different contens according to its type
-
-  // (PERIOD e.g. is NOT such a token, it is bound to the content '.'; NUM is
-  // such a token, it can be any number!
-
-  public TextRulerWordConstraint(TextRulerWordConstraint copyFrom) {
-    super();
-    tokenAnnotation = copyFrom.tokenAnnotation;
-    isRegExpType = copyFrom.isRegExpType;
-  }
-
-  public TextRulerWordConstraint(TextRulerAnnotation tokenAnnotation) {
-    super();
-    this.tokenAnnotation = tokenAnnotation;
-    if (AUTO_REGEXP) {
-      CAS cas = tokenAnnotation.getDocument().getCAS();
-      TypeSystem ts = cas.getTypeSystem();
-      Type wType = ts.getType(TextRulerToolkit.RUTA_WORD_TYPE_NAME);
-      Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
-      Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
-      Type specialType = ts.getType(TextRulerToolkit.RUTA_SPECIAL_TYPE_NAME);
-      isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
-              || ts.subsumes(markupType, tokenAnnotation.getType())
-              || ts.subsumes(numType, tokenAnnotation.getType())
-              || ts.subsumes(specialType, tokenAnnotation.getType());
-    }
-  }
-
-  protected TextRulerWordConstraint(TextRulerAnnotation tokenAnnotation, boolean isRegExpType) {
-    this.tokenAnnotation = tokenAnnotation;
-    this.isRegExpType = isRegExpType;
-  }
-
-  public Type annotationType() {
-    return tokenAnnotation.getType();
-  }
-
-  public String typeShortName() {
-    return tokenAnnotation.getType().getShortName();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == null)
-      return false;
-    return toString().equals(((TextRulerWordConstraint) o).toString());
-  }
-
-  @Override
-  public int hashCode() {
-    return toString().hashCode();
-  }
-
-  public boolean isRegExpConstraint() {
-    return isRegExpType;
-  }
-
-  @Override
-  public String toString() {
-    if (isRegExpConstraint())
-      return TextRulerToolkit.escapeForStringParameter(TextRulerToolkit
-              .escapeForRegExp(tokenAnnotation.getCoveredText()));
-    else
-      return tokenAnnotation.getType().getShortName();
-  }
-
-  public TextRulerWordConstraint copy() {
-    return new TextRulerWordConstraint(this);
-  }
-
-  public TextRulerAnnotation getTokenAnnotation() {
-    return tokenAnnotation;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerController.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerController.java
deleted file mode 100755
index 43bbd63..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerController.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * The static class TextRulerController is the heart of the eclipse plug-in extension. It cares
- * about the extension point and creates TextRulerLearnerController objects for the found algorithms
- * and is the link to a UI that can build upon this controller (see .ui package).
- * 
- * A UI (or whoever) is notified about e.g. status updates via the TextRulerControllerDelegate
- * interface.
- */
-public class TextRulerController {
-
-  protected static ArrayList<TextRulerLearnerController> learners = null;
-
-  protected static String currentTempDir = null;
-
-  protected static String[] currentSlotNames = null;
-
-  protected static Set<String> currentFilters = null;
-
-  protected static TextRulerControllerDelegate currentDelegate = null;
-
-  protected static Thread preprocessorThread = null;
-
-  protected static boolean shouldAbort = false;
-
-  protected static String currentPreprocessorTMFile = null;
-
-  protected static boolean skip;
-
-  protected static Map<String, Map<String, Object>> currentAlgorithmParams;
-
-  private static boolean anAlgorithmIsRunning() {
-    for (TextRulerLearnerController i : getAvailableControllers()) {
-      if (i.isRunning())
-        return true;
-    }
-
-    return false;
-  }
-
-  public static int enabledAlgorithmsCount() {
-    int cnt = 0;
-    for (TextRulerLearnerController c : learners) {
-      if (c.isEnabled())
-        cnt++;
-    }
-    return cnt;
-  }
-
-  private static void preprocessorDidEnd(String algorithmsInputFolder, String additionalFolder) {
-    if (shouldAbort()) {
-      if (currentDelegate != null)
-        currentDelegate.globalStatusUpdate("Aborted!");
-      cleanUp();
-    } else {
-      if (currentDelegate != null)
-        currentDelegate.globalStatusUpdate("Running...");
-      // start algorithms
-      for (TextRulerLearnerController c : learners) {
-        if (c.isEnabled())
-          c.runInNewThread(algorithmsInputFolder, additionalFolder, currentPreprocessorTMFile,
-                  currentSlotNames, currentFilters, currentTempDir, currentDelegate, skip,
-                  currentAlgorithmParams.get(c.getID()));
-      }
-
-    }
-    preprocessorThread = null;
-  }
-
-  private static void cleanUp() {
-    // cleaning up
-    // TODO delete all temporary files and directories?! this data are good
-    // for debugging...
-    currentTempDir = null;
-    currentPreprocessorTMFile = null;
-    currentSlotNames = null;
-    currentFilters = null;
-    currentDelegate = null;
-    currentAlgorithmParams = null;
-    shouldAbort = false;
-  }
-
-  protected static void saveParametersToTempFolder(String inFolder, boolean skipPreprocessing) {
-    String str = "\nSettings:\n\n";
-
-    str += "inputDir: " + inFolder;
-    str += "\npreprocessTMFile: " + currentPreprocessorTMFile;
-    str += "\nslotnames : ";
-    for (String s : currentSlotNames)
-      str += s + "; ";
-    str += "\nfilters: " + currentFilters;
-    str += "\nskip preproc: " + skipPreprocessing;
-    str += "\n";
-
-    TextRulerToolkit.appendStringToFile(TextRulerToolkit.addTrailingSlashToPath(currentTempDir)
-            + "settings.txt", str);
-  }
-
-  public static boolean start(final String inFolder, final String additionalFolder,
-          final String preprocessorFile, final String[] slotNames, Set<String> filters,
-          final TextRulerControllerDelegate delegate, Map<String, Map<String, Object>> algParams,
-          boolean skipPreprocessing) {
-    if (isRunning() || enabledAlgorithmsCount() == 0)
-      return false;
-
-    shouldAbort = false;
-
-    String outFolder = null;
-    try {
-      currentTempDir = TextRulerToolkit.createTemporaryDirectory();
-      outFolder = currentTempDir + "input";
-      File outputFolder = new File(outFolder);
-      outputFolder.mkdir();
-    } catch (IOException e) {
-      TextRulerPlugin.error(e);
-      return false;
-    }
-
-    IPath analysisEngineDescriptorPath = null;
-    try {
-      analysisEngineDescriptorPath = RutaProjectUtils.getAnalysisEngineDescriptorPath(preprocessorFile);
-    } catch (CoreException e) {
-      TextRulerPlugin.error(e);
-    }
-    
-    if (analysisEngineDescriptorPath == null) {
-      return false;
-    }
-
-    currentPreprocessorTMFile = preprocessorFile;
-    currentSlotNames = slotNames;
-    currentFilters = filters;
-    currentDelegate = delegate;
-    currentAlgorithmParams = algParams;
-    skip = skipPreprocessing;
-
-    saveParametersToTempFolder(inFolder, skipPreprocessing);
-    for (TextRulerLearnerController c : learners)
-      c.resetStatusString();
-
-    if (skipPreprocessing)
-      preprocessorDidEnd(inFolder, additionalFolder); // just use the original input folder
-    // as real input folder!
-    else {
-      preprocessorThread = new Thread(new Runnable() {
-        public void run() {
-          TextRulerPreprocessor p = new TextRulerPreprocessor();
-          String algorithmsInputFolder = p.run(inFolder, currentPreprocessorTMFile, currentTempDir,
-                  currentSlotNames, new TextRulerPreprocessorDelegate() {
-
-                    public void preprocessorStatusUpdate(TextRulerPreprocessor p,
-                            String statusString) {
-                      currentDelegate.preprocessorStatusUpdate(p, statusString);
-                    }
-
-                    public boolean shouldAbort() {
-                      return TextRulerController.shouldAbort();
-                    }
-
-                  });
-          String algorithmsAdditionalFolder = p.run(additionalFolder, "additional", currentPreprocessorTMFile, currentTempDir,
-                  currentSlotNames, new TextRulerPreprocessorDelegate() {
-
-                    public void preprocessorStatusUpdate(TextRulerPreprocessor p,
-                            String statusString) {
-                      currentDelegate.preprocessorStatusUpdate(p, statusString);
-                    }
-
-                    public boolean shouldAbort() {
-                      return TextRulerController.shouldAbort();
-                    }
-
-                  });
-          preprocessorDidEnd(algorithmsInputFolder, algorithmsAdditionalFolder);
-        }
-      });
-      if (currentDelegate != null)
-        currentDelegate.globalStatusUpdate("Preprocessing...");
-
-      preprocessorThread.setPriority(Thread.NORM_PRIORITY);
-      preprocessorThread.start();
-    }
-    return true;
-  }
-
-  public static TextRulerLearnerController getControllerForID(String id) {
-    for (TextRulerLearnerController c : getAvailableControllers())
-      if (c.getID().equals(id))
-        return c;
-    return null;
-  }
-
-  public static ArrayList<TextRulerLearnerController> getAvailableControllers() {
-    if (learners == null) {
-      learners = new ArrayList<TextRulerLearnerController>();
-      IExtensionRegistry reg = Platform.getExtensionRegistry();
-      if (reg == null)
-        return null;
-      IConfigurationElement[] extensions = reg
-              .getConfigurationElementsFor("org.apache.uima.ruta.textruler.learners");
-      for (IConfigurationElement element : extensions) {
-        try {
-          TextRulerLearnerFactory factory = (TextRulerLearnerFactory) element
-                  .createExecutableExtension("class");
-          learners.add(new TextRulerLearnerController(element.getAttribute("id"), element
-                  .getAttribute("name"), factory));
-        } catch (CoreException e) {
-          TextRulerPlugin.error(e);
-        }
-      }
-    }
-    return learners;
-  }
-
-  // gets called from TextRulerLearnerController when the algorithm thread did
-  // end
-  public static void anAlgorithmDidEnd(TextRulerLearnerController algController) {
-    if (!anAlgorithmIsRunning()) // all algorithms have finished
-    {
-      if (currentDelegate != null)
-        currentDelegate.globalStatusUpdate(shouldAbort ? "Aborted!" : "Done.");
-      cleanUp();
-    }
-  }
-
-  public static boolean isRunning() {
-    return preprocessorThread != null || anAlgorithmIsRunning();
-  }
-
-  public static synchronized boolean shouldAbort() {
-    return shouldAbort;
-  }
-
-  public static synchronized void abort() {
-    shouldAbort = true;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerControllerDelegate.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerControllerDelegate.java
deleted file mode 100755
index e5d74af..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerControllerDelegate.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner.TextRulerLearnerState;
-
-/**
- * TextRulerControllerDelegate provides some useful notificaion methods e.g. a UI class can
- * implement to get some important information.
- */
-public interface TextRulerControllerDelegate {
-
-  public void algorithmDidEnd(TextRulerLearnerController algController);
-
-  public void algorithmStatusUpdate(TextRulerLearnerController algController, String statusString,
-          TextRulerLearnerState state, boolean ruleBaseChanged);
-
-  public void preprocessorStatusUpdate(TextRulerPreprocessor p, String statusString);
-
-  public void globalStatusUpdate(String str);
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearner.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearner.java
deleted file mode 100755
index 5dd5b10..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearner.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-import java.util.Map;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.cas.CAS;
-
-/**
- * If you want to add an own algorithm to the TextRuler-System, you can do this by providing two
- * classes:
- * 
- * One algorithm class that implements the interface
- * 
- * TextRulerLearner
- * 
- * And one factory class that can create an instance of that algorithm. This factory has to
- * implement the interface
- * 
- * MLAlgoriothmFactory
- * 
- * which gets created and used by adding an extension point to
- * 
- * org.apache.uima.ruta.textruler.algorithms
- * 
- */
-public interface TextRulerLearner {
-
-  enum TextRulerLearnerState {
-    ML_UNDEFINED, ML_INITIALIZING, ML_RUNNING, ML_ERROR, ML_ABORTED, ML_DONE
-  };
-
-  /**
-   * There the magic has to be placed...
-   */
-  void run();
-
-  /**
-   * this method gets called from the UI and passes a hashMap with key value coded parameters that
-   * your corresponding TextRulerLearnerFactory declared by its getAlgorithmParameters method.
-   */
-  void setParameters(Map<String, Object> params);
-
-  /**
-   * If any Ruta-Rules result is available (yet), the system asks your algorithm for it by
-   * calling this method.
-   */
-  String getResultString();
-
-  /**
-   * 
-   * @return analysis engine
-   */
-  AnalysisEngine getAnalysisEngine();
-
-  /**
-   * 
-   * @return CAS
-   */
-  CAS getTestCAS();
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerController.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerController.java
deleted file mode 100755
index c85d8f5..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerController.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner.TextRulerLearnerState;
-
-
-/**
- * This class encapsulates the functionality for administrating an algorithm that was added via the
- * eclipse extension point. It e.g. holds the three extension point parameters name, factory class
- * and the id, cares about running the algorithm in an own thread, act as the algorithm's delegate,
- * hold the algorithms results and status string and pass it to a possible UI
- * (TextRulerControllerDelegate), ...
- * 
- */
-public class TextRulerLearnerController implements TextRulerLearnerDelegate {
-
-  // these three are extracted from the extension points:
-  protected String name; // name of the algorithm
-
-  protected TextRulerLearnerFactory algoritmFactory; // the factory that can create an instance of
-
-  // it
-
-  protected String id; // the id of this algorithm
-
-  // other member variables:
-  protected boolean enabled; // flag if this algorithm is enabled for learning
-
-  protected TextRulerLearner algorithm; // the algorithm, null if it is not running currently
-
-  protected Thread thread; // the thread in which we run the algorithm, null if not running
-
-  protected TextRulerControllerDelegate delegate; // the delegate for status notifications, etc.
-
-  protected String currentStatusString; // the current status String that the algorithm reported to
-
-  // us
-
-  protected TextRulerLearnerState algorithmState = TextRulerLearnerState.ML_UNDEFINED; // the
-
-  // current
-  // state
-
-  protected String resultString; // the current rules result string
-
-  public TextRulerLearnerController(String id, String name, TextRulerLearnerFactory factory) {
-    super();
-    this.id = id;
-    this.name = name;
-    this.algoritmFactory = factory;
-  }
-
-  public String getID() {
-    return id;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  @Override
-  public String toString() // give back a status string that the UI can directly print or
-  // whatever...
-  {
-    if (currentStatusString != null)
-      return getName() + " - " + currentStatusString;
-    else
-      return getName();
-  }
-
-  public boolean isEnabled() {
-    return enabled;
-  }
-
-  public void setEnabled(boolean value) {
-    enabled = value;
-  }
-
-  public boolean isRunning() {
-    return thread != null;
-  }
-
-  private void sendUpdateToDelegate(boolean ruleBaseChanged) {
-    if (delegate != null)
-      delegate.algorithmStatusUpdate(this, currentStatusString, algorithmState, ruleBaseChanged);
-  }
-
-  // TextRulerLearnerDelegate Methods
-  public boolean shouldAbort() {
-    return TextRulerController.shouldAbort();
-  }
-
-  public void algorithmStatusUpdate(TextRulerLearner alg, String statusString,
-          TextRulerLearnerState state, boolean ruleBaseChanged) {
-    resultString = alg.getResultString();
-    algorithmState = state;
-    currentStatusString = statusString;
-    sendUpdateToDelegate(ruleBaseChanged);
-  }
-
-  public String getCurrentResultString() {
-    if (algorithm != null)
-      resultString = algorithm.getResultString();
-    return resultString;
-  }
-
-  private void algorithmDidEnd() {
-    thread = null;
-    if (delegate != null)
-      delegate.algorithmDidEnd(this);
-    delegate = null;
-    algorithm = null;
-    TextRulerController.anAlgorithmDidEnd(this);
-  }
-
-  public boolean runInNewThread(final String inputFolderPath, final String additionalFolderPath,
-          final String preprocessorTMfile, final String[] slotNames, final Set<String> filters,
-          final String tempBaseDirectory, TextRulerControllerDelegate delegate, final boolean skip,
-          final Map<String, Object> algorithmParams) {
-    if (thread == null) {
-      final TextRulerLearnerDelegate algDelegate = this;
-      this.delegate = delegate;
-      thread = new Thread(new Runnable() {
-        public void run() {
-          String tmpDir = TextRulerToolkit.addTrailingSlashToPath(tempBaseDirectory + getID());
-          algorithm = algoritmFactory.createAlgorithm(inputFolderPath, additionalFolderPath,
-                  preprocessorTMfile, tmpDir, slotNames, filters, skip, algDelegate);
-          algorithm.setParameters(algorithmParams);
-          algorithm.run();
-          algorithmDidEnd();
-          System.gc();
-        }
-      }
-
-      );
-      thread.setPriority(Thread.NORM_PRIORITY);
-      thread.start();
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  public void resetStatusString() {
-    currentStatusString = null;
-  }
-
-  public TextRulerLearnerFactory getFactory() {
-    return algoritmFactory;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerDelegate.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerDelegate.java
deleted file mode 100755
index 7d13238..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerDelegate.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner.TextRulerLearnerState;
-
-/**
- * 
- * An TextRulerLearnerDelegate is used for an TextRulerLearner so that it can e.g. send status
- * updates to some one that might be interested (in our case the controller and though the UI). In
- * addition to that, the algorithm can ask the delegate if he should abort his work (e.g. because
- * the user clicked the abort button).
- * 
- */
-public interface TextRulerLearnerDelegate {
-
-  public void algorithmStatusUpdate(TextRulerLearner alg, String statusString,
-          TextRulerLearnerState state, boolean ruleBaseChanged);
-
-  public boolean shouldAbort();
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerFactory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerFactory.java
deleted file mode 100755
index bf17ba1..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-import java.util.Map;
-import java.util.Set;
-
-/**
- * The TextRuler system uses this interface to create an algorithm you added to it via the extension
- * point.
- * 
- * Please see TextRulerLearner for more detailed information.
- */
-public interface TextRulerLearnerFactory {
-
-  /**
-   * @param inputFolderPath
-   *          the input folder path where e.g. example XMIs are located
-   * @param additionalFolderPath
-   * @param preprocessorTMfile
-   *          the preprocessing Ruta file (this is important for finding the type system and
-   *          analysis engine descriptor file)
-   * @param tempFolderPath
-   *          a folder name that you can use as temporary folder (caution: you need to create it if
-   *          you want to use it!)
-   * @param fullSlotTypeNames
-   *          an array with the slot-names to learn (full qualified UIMA type names)
-   * @param filterSet
-   *          Ruta filter set (full qualified UIMA type names)
-   * @param skip
-   * @param delegate
-   *          a delegate that can be notified for status updates and asked for aborting the
-   *          algorithm
-   * @return the algorithm of your class that implements TextRulerLearner
-   */
-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,
-          String preprocessorTMfile, String tempFolderPath, String[] fullSlotTypeNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate);
-
-  /**
-   * @return null or an array with MLAlgorithmParameters your TextRulerLearner wants to get from the
-   *         GUI
-   */
-  public TextRulerLearnerParameter[] getAlgorithmParameters();
-
-  /**
-   * @return null or a key value set for the standard values of your algorithm's parameters
-   */
-  public Map<String, Object> getAlgorithmParameterStandardValues();
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerParameter.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerParameter.java
deleted file mode 100755
index 3d82c78..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerLearnerParameter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-/**
- * With your TextRulerLearnerFactory-class you can specify some parameters your algorithm has (e.g.
- * a window size for extracting features around a token or such). This is done with an array of
- * 
- * TextRulerLearnerParameter
- * 
- * objects. In the TextRuler UI in Eclipse some widgets get automatically created for those
- * parameters if the algorithm is selected in the algorithm list.
- */
-public class TextRulerLearnerParameter {
-
-  public enum MLAlgorithmParamType {
-    ML_STRING_PARAM, ML_BOOL_PARAM, ML_INT_PARAM, ML_FLOAT_PARAM, ML_SELECT_PARAM, ML_DOUBLE_PARAM
-  };
-
-  public static class MLParameterSelectValue {
-    public String id;
-
-    public String name;
-
-    public MLParameterSelectValue(String id, String name) {
-      this.id = id;
-      this.name = name;
-    }
-  }
-
-  public String id;
-
-  public String name;
-
-  public MLAlgorithmParamType type;
-
-  public MLParameterSelectValue[] selectValues;
-
-  public TextRulerLearnerParameter(String id, String name, MLAlgorithmParamType type) {
-    this.id = id;
-    this.name = name;
-    this.type = type;
-    selectValues = null;
-  }
-
-  public TextRulerLearnerParameter(String id, String name, MLAlgorithmParamType type,
-          MLParameterSelectValue[] values) {
-    this.id = id;
-    this.name = name;
-    this.type = type;
-    this.selectValues = values;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessor.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessor.java
deleted file mode 100755
index 6f5fc72..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessor.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-import java.io.File;
-import java.io.FilenameFilter;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.GlobalCASSource;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-
-/**
- * This "algorithm" gets executed right before the real algorithms get started. It preprocesses the
- * input XMI files with the given Ruta preprocessing file and stores the results in a temporary
- * folder. Those new XMI files are then passed as input documents to the MLAlgorithms.
- * 
- */
-public class TextRulerPreprocessor {
-
-  public String run(String inFolder, String rutaFile, String tmpDir, String[] currentSlotNames,
-          TextRulerPreprocessorDelegate delegate) {
-    return run(inFolder, "input", rutaFile, tmpDir, currentSlotNames, delegate);
-  }
-
-  public String run(String inFolder, String docType, String rutaFile, String tmpDir,
-          String[] currentSlotNames, TextRulerPreprocessorDelegate delegate) {
-    if(StringUtils.isBlank(inFolder)) {
-      return inFolder;
-    }
-    
-    AnalysisEngineDescription analysisEngineDescription = null;
-    try {
-      analysisEngineDescription = TextRulerToolkit
-              .getAnalysisEngineDescription(RutaProjectUtils
-                      .getAnalysisEngineDescriptorPath(rutaFile).toPortableString());
-    } catch (CoreException e) {
-      TextRulerPlugin.error(e);
-    }
-    if(analysisEngineDescription == null) {
-      delegate.preprocessorStatusUpdate(this, "Descriptor is missing. Please rebuild the project.");
-      return null;
-    }
-    
-    // we want to reuse these cases, so extend the type system in case a boundary-based learner is
-    // called
-    TextRulerToolkit.addBoundaryTypes(analysisEngineDescription, currentSlotNames);
-    AnalysisEngine ae = TextRulerToolkit.loadAnalysisEngine(analysisEngineDescription);
-
-    // preprocess input XMIs
-    File inputFolder = new File(inFolder);
-    File outputFolder = new File(tmpDir + docType);
-    File[] files = inputFolder.listFiles(new FilenameFilter() {
-      public boolean accept(File dir, String name) {
-        return (name.endsWith(".xmi"));
-      }
-    });
-
-    try {
-      outputFolder.mkdir();
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-      return null;
-    }
-
-    CAS cas = null;
-    for (File file : files) {
-      if (delegate != null && delegate.shouldAbort()) {
-        TextRulerToolkit.log("[PREPROCESSOR] ABORT");
-        break;
-      }
-      TextRulerToolkit.log("Load INPUT XMI file: " + file.getName());
-      if (delegate != null)
-        delegate.preprocessorStatusUpdate(this,
-                "Loading input XMI file (" + docType + "): " + file.getName());
-      cas = TextRulerToolkit.readCASfromXMIFile(file, ae, cas);
-      System.out.print("Processing...");
-      try {
-        ae.process(cas);
-        TextRulerToolkit.log(" OK");
-        TextRulerToolkit.writeCAStoXMIFile(cas, outputFolder + "/processed_" + file.getName());
-      } catch (Exception e) {
-        TextRulerPlugin.error(e);
-        TextRulerToolkit.log(" ERROR!");
-      }
-      cas.reset();
-      if (delegate != null)
-        delegate.preprocessorStatusUpdate(this, "Done");
-    }
-    if (cas != null) {
-      cas.reset();
-      GlobalCASSource.releaseCAS(cas);
-    }
-    return tmpDir + docType;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessorDelegate.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessorDelegate.java
deleted file mode 100755
index be88b33..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/extension/TextRulerPreprocessorDelegate.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.ruta.textruler.extension;
-
-/**
- * Small helper class for possible UI implementations for the preprocessor (see .ui)
- * 
- */
-public interface TextRulerPreprocessorDelegate {
-
-  public void preprocessorStatusUpdate(TextRulerPreprocessor p, String statusString);
-
-  public boolean shouldAbort();
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPFactory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPFactory.java
deleted file mode 100644
index 8e7ad72..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * 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.ruta.textruler.learner.kep;

-

-import java.util.HashMap;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter.MLAlgorithmParamType;

-

-public class KEPFactory implements TextRulerLearnerFactory {

-

-  public KEPFactory() {

-  }

-

-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,

-          String preprocessorTMfile, String tempFolderPath, String[] fullSlotTypeNames,

-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {

-    return new KEPLearner(inputFolderPath, preprocessorTMfile, tempFolderPath, fullSlotTypeNames,

-            filterSet, skip, delegate);

-  }

-

-  public Map<String, Object> getAlgorithmParameterStandardValues() {

-    Map<String, Object> result = new HashMap<String, Object>();

-//    result.put(KEPLearner.FILLER_WINDOW, KEPLearner.DEFAULT_FILLER_WINDOW);

-//    result.put(KEPLearner.MAX_FILLER_LENGTH, KEPLearner.DEFAULT_MAX_FILLER_LENGTH);

-    result.put(KEPLearner.MAX_EXPAND_RULES, KEPLearner.DEFAULT_MAX_EXPAND_RULES);

-    result.put(KEPLearner.MAX_INFILLER_RULES, KEPLearner.DEFAULT_MAX_INFILLER_RULES);

-    return result;

-  }

-

-  public TextRulerLearnerParameter[] getAlgorithmParameters() {

-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[2];

-//    result[0] = new TextRulerLearnerParameter(KEPLearner.FILLER_WINDOW,

-//            "fillerWindow", MLAlgorithmParamType.ML_INT_PARAM);

-//    result[1] = new TextRulerLearnerParameter(KEPLearner.MAX_FILLER_LENGTH,

-//            "maxFillerLength", MLAlgorithmParamType.ML_INT_PARAM);

-    result[0] = new TextRulerLearnerParameter(KEPLearner.MAX_EXPAND_RULES,

-            "Maximum number of \"Expand Rules\"", MLAlgorithmParamType.ML_INT_PARAM);

-    result[1] = new TextRulerLearnerParameter(KEPLearner.MAX_INFILLER_RULES,

-            "Maximum number of \"Infiller Rules\"", MLAlgorithmParamType.ML_INT_PARAM);

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPLearner.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPLearner.java
deleted file mode 100644
index ca2d2a4..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPLearner.java
+++ /dev/null
@@ -1,1216 +0,0 @@
-/*

- * 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.ruta.textruler.learner.kep;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.Comparator;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.ConstraintFactory;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.FSMatchConstraint;

-import org.apache.uima.cas.FSTypeConstraint;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.engine.RutaEngine;

-import org.apache.uima.ruta.textruler.core.GlobalCASSource;

-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;

-import org.apache.uima.ruta.textruler.core.TextRulerExample;

-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocument;

-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;

-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;

-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;

-import org.apache.uima.ruta.textruler.learner.kep.KEPRuleItemCondition.Condition;

-

-public class KEPLearner extends TextRulerBasicLearner {

-

-  public static final String MAX_EXPAND_RULES = "maxExpandRules";

-

-  public static final String MAX_INFILLER_RULES = "maxInfillerRules";

-

-  public static final String FILLER_WINDOW = "fillerWindow";

-

-  public static final String MAX_FILLER_LENGTH = "maxFillerLength";

-

-  public static final int DEFAULT_MAX_EXPAND_RULES = 50;

-

-  public static final int DEFAULT_MAX_INFILLER_RULES = 10;

-

-  public static final int DEFAULT_FILLER_WINDOW = 5;

-

-  public static final int DEFAULT_MAX_FILLER_LENGTH = 3;

-

-  private int fillerWindow;

-

-  private int maxFillerLength;

-

-  private int maxInfillerRules;

-

-  private int maxExpandRules;

-

-  private Map<String, List<KEPRule>> ruleLists = new HashMap<String, List<KEPRule>>();

-

-  private Map<String, List<KEPRule>> correctionRules = new HashMap<String, List<KEPRule>>();

-

-  private Map<String, List<TextRulerExample>> coveredExamples = new HashMap<String, List<TextRulerExample>>();

-

-  private Map<String, Type> blocks = new HashMap<String, Type>();

-

-  private String[] slotNamesWithBoundaries;

-

-  private Map<String, Boolean> hasPerfectRules = new HashMap<String, Boolean>();

-

-  public KEPLearner(String inputDir, String prePropTMFile, String tmpDir, String[] slotNames,

-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {

-    super(inputDir, prePropTMFile, tmpDir, slotNames, filterSet, skip, delegate);

-    supportBoundaries = true;

-  }

-

-  @Override

-  protected void doRun() {

-

-    long startTime = System.nanoTime();

-

-    this.exampleDocuments.clearCurrentExamples();

-    prepareCachedCASesWithBoundaries();

-    this.slotNamesWithBoundaries = new String[slotNames.length * 3];

-    for (int i = 0; i < this.slotNames.length; i++) {

-      this.slotNamesWithBoundaries[i * 3] = slotNames[i] + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION;

-      this.slotNamesWithBoundaries[i * 3 + 1] = slotNames[i]

-              + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION;

-      this.slotNamesWithBoundaries[i * 3 + 2] = slotNames[i];

-

-    }

-    for (int i = 0; i < this.slotNamesWithBoundaries.length; i++) {

-      if (!filterSetWithSlotNames.contains(slotNamesWithBoundaries[i]))

-        this.filterSetWithSlotNames.add(slotNamesWithBoundaries[i]);

-      initializeMapEntries(this.slotNamesWithBoundaries[i]);

-    }

-    for (int i = 0; i < slotNamesWithBoundaries.length; i++) {

-      String currentSlot = slotNamesWithBoundaries[i];

-      if (isCompleteSlot(currentSlot)) {

-        if (hasPerfectRules.get(slotNamesWithBoundaries[i - 1])

-                && hasPerfectRules.get(slotNamesWithBoundaries[i - 2])) {

-          filterSetWithSlotNames.remove(slotNamesWithBoundaries[i]);

-          continue;

-        }

-      }

-      runForSlot(currentSlot);

-      if (hasPerfectRules.get(currentSlot)) {

-        filterSetWithSlotNames.remove(currentSlot);

-      }

-      if (shouldAbort())

-        return;

-    }

-    removeBadRules();

-    for (int i = 0; i < this.slotNamesWithBoundaries.length; i++) {

-      List<KEPRule> list = this.ruleLists.get(slotNamesWithBoundaries[i]);

-      if (!shouldAbort() && list != null && !list.isEmpty()) {

-        this.exampleDocuments.createExamplesForTarget(list.get(0).getTarget());

-        if (!hasPerfectRules.get(slotNamesWithBoundaries[i]))

-          makeRemovalRules(list.get(0).getTarget());

-        list = getOptimalRuleCombination(list);

-      }

-    }

-    removeBadRules();

-

-    long estimatedTime = (System.nanoTime() - startTime) / 1000000000;

-    System.out.println(estimatedTime + " seconds needed to learn all rules");

-    sendStatusUpdateToDelegate("Done", TextRulerLearnerState.ML_DONE, true);

-

-  }

-

-  private boolean isCompleteSlot(String slot) {

-    return !slot.endsWith(TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION)

-            && !slot.endsWith(TextRulerToolkit.LEFT_BOUNDARY_EXTENSION);

-  }

-

-  /**

-   * Execute algorithms for slot denoted by slotName

-   * 

-   * @param slotName

-   *          the name of a slot

-   */

-  private void runForSlot(String slotName) {

-

-    sendStatusUpdateToDelegate("Working on " + slotName, TextRulerLearnerState.ML_RUNNING, true);

-    TextRulerTarget target = new TextRulerTarget(slotName,

-            TextRulerTarget.MLTargetType.SINGLE_WHOLE_SLOT, this);

-    this.exampleDocuments.createExamplesForTarget(target);

-    if (!shouldAbort())

-      blocks.put(slotName, getBlocks());

-    if (!shouldAbort())

-      learnRules(target);

-    this.ruleLists.put(slotName, getOptimalRuleCombination(this.ruleLists.get(slotName)));

-    sendStatusUpdateToDelegate(slotName + " done", TextRulerLearnerState.ML_RUNNING, true);

-  }

-

-  private Type getBlocks() {

-    sendStatusUpdateToDelegate("Searching for Blocks", TextRulerLearnerState.ML_RUNNING, false);

-    Map<String, List<TextRulerExample>> exampleMap = new HashMap<String, List<TextRulerExample>>();

-    Map<String, Double> lengthMap = new HashMap<String, Double>();

-    Map<String, Integer> countMap = new HashMap<String, Integer>();

-    for (TextRulerExampleDocument exampleDocument : exampleDocuments.getDocuments()) {

-      for (AnnotationFS annotation : exampleDocument.getCAS().getAnnotationIndex()) {

-        for (TextRulerExample example : exampleDocument.getPositiveExamples()) {

-          if (annotation.getBegin() <= example.getAnnotation().getBegin()

-                  && annotation.getEnd() >= example.getAnnotation().getEnd()

-                  && annotation.getEnd() - annotation.getBegin() > example.getAnnotation().getEnd()

-                          - example.getAnnotation().getBegin()

-                  && !filterSetWithSlotNames.contains(annotation.getType().getName())) {

-            List<TextRulerExample> list = exampleMap.get(annotation.getType().getName());

-            if (list == null)

-              list = new ArrayList<TextRulerExample>();

-            if (!list.contains(example))

-              list.add(example);

-            exampleMap.put(annotation.getType().getName(), list);

-          }

-        }

-        double aLength = (double) (annotation.getEnd() - annotation.getBegin());

-        lengthMap.put(

-                annotation.getType().getName(),

-                lengthMap.get(annotation.getType().getName()) == null ? aLength : lengthMap

-                        .get(annotation.getType().getName()) + aLength);

-        countMap.put(

-                annotation.getType().getName(),

-                countMap.get(annotation.getType().getName()) == null ? 1 : countMap.get(annotation

-                        .getType().getName()) + 1);

-      }

-    }

-

-    List<Type> result = new ArrayList<Type>();

-    for (String typeString : exampleMap.keySet()) {

-      if (exampleMap.get(typeString).size() == exampleDocuments.getAllPositiveExamples().size())

-        result.add(exampleDocuments.getDocuments().get(0).getCAS().getTypeSystem()

-                .getType(typeString));

-    }

-    double exLength = 0;

-    for (TextRulerExample ex : exampleDocuments.getAllPositiveExamples()) {

-      exLength += (double) (ex.getAnnotation().getEnd() - ex.getAnnotation().getBegin());

-    }

-    double bestRatio = 0;

-    Type bestType = null;

-    for (Type type : result) {

-      if ((exLength / lengthMap.get(type.getName()) > bestRatio && countMap.get(type.getName()) <= exampleDocuments

-              .getAllPositiveExamples().size())

-              || (exLength / lengthMap.get(type.getName()) == bestRatio

-                      && countMap.get(type.getName()) > countMap.get(bestType.getName()) && countMap

-                      .get(type.getName()) <= exampleDocuments.getAllPositiveExamples().size())) {

-        bestType = type;

-        bestRatio = exLength / lengthMap.get(type.getName());

-      }

-

-    }

-    sendStatusUpdateToDelegate("Searching for Blocks done", TextRulerLearnerState.ML_RUNNING, true);

-    return bestType;

-  }

-

-  private void learnRules(TextRulerTarget target) {

-

-    List<KEPRule> ruleList = this.ruleLists.get(target.getSingleSlotTypeName());

-    List<TextRulerExample> coveredExamples = this.coveredExamples.get(target

-            .getSingleSlotTypeName());

-    List<TextRulerExample> positiveExamples = this.exampleDocuments.getAllPositiveExamples();

-

-    for (TextRulerExample e : positiveExamples) {

-      if (!coveredExamples.contains(e)) {

-        ruleList.addAll(makeInFillerRulesForExample(e));

-        // ruleList.addAll(generalizeForRepitition(ruleList));

-      }

-      for (KEPRule rule : ruleList)

-        for (TextRulerExample ex : rule.getCoveringStatistics().getCoveredPositiveExamples())

-          if (!coveredExamples.contains(ex))

-            coveredExamples.add(ex);

-

-      if (shouldAbort())

-        return;

-    }

-    ruleList.addAll(getCandidateClassificationRules(target));

-    ruleList = getBestAndOptimalRules(ruleList);

-    ruleList.addAll(makePostFillers(ruleList, true));

-    ruleList = getOptimalRuleCombination(ruleList);

-    this.ruleLists.put(target.getSingleSlotTypeName(), ruleList);

-  }

-

-  private List<KEPRule> makeInFillerRulesForExample(TextRulerExample e) {

-    sendStatusUpdateToDelegate(

-            "Searching for Infiller Rules for "

-                    + e.getTarget().getSingleSlotTypeName()

-                            .substring(e.getTarget().getSingleSlotTypeName().lastIndexOf(".") + 1),

-            TextRulerLearnerState.ML_RUNNING, false);

-    Collection<KEPRule> rules = new HashSet<KEPRule>();

-

-    rules = new HashSet<KEPRule>();

-    rules = expandInFillerRules(e, rules, true);

-    if (rules.size() > maxInfillerRules) {

-      List<KEPRule> list = new ArrayList<KEPRule>(rules);

-      Collections.sort(list, new KEPRuleComparator(e.getDocumentCAS()));

-      // TODO this is a parameter!

-      rules = new HashSet<KEPRule>(list.subList(0, maxInfillerRules));

-    }

-    List<KEPRule> result = new ArrayList<KEPRule>(rules);

-    if (shouldAbort())

-      return result;

-

-    testRulesOnDocumentSet(result, exampleDocuments);

-    sendStatusUpdateToDelegate(

-            "Searching for Infiller Rules for "

-                    + e.getTarget().getSingleSlotTypeName()

-                            .substring(e.getTarget().getSingleSlotTypeName().lastIndexOf(".") + 1)

-                    + " done", TextRulerLearnerState.ML_RUNNING, true);

-    return new ArrayList<KEPRule>(rules);

-  }

-

-  private Collection<KEPRule> expandInFillerRules(TextRulerExample e, Collection<KEPRule> rules,

-          boolean expanding) {

-

-    if (rules.size() > maxExpandRules) {

-      List<KEPRule> list = new ArrayList<KEPRule>(rules);

-      Collections.sort(list, new KEPRuleComparator(e.getDocumentCAS()));

-      rules = new HashSet<KEPRule>(list.subList(0, maxExpandRules));

-    }

-    if (!expanding) {

-      return rules;

-    }

-

-    Collection<KEPRule> expandedRules = new HashSet<KEPRule>();

-    if (rules.isEmpty()) {

-      List<AnnotationFS> seeds = getAnnotationsStartingAt(e.getDocumentCAS(), e.getAnnotation()

-              .getBegin(), e.getAnnotation().getEnd());

-      if (seeds.isEmpty()) {

-        expanding = false;

-      }

-      for (AnnotationFS each : seeds) {

-        KEPRuleItem item = new KEPRuleItem(each);

-        KEPRule rule = new KEPRule(this, e.getTarget());

-        rule.addInFillerItem(item);

-        expandedRules.add(rule);

-      }

-    } else {

-      expanding = false;

-      for (KEPRule eachRule : rules) {

-        TextRulerRulePattern inFiller = eachRule.getInFiller();

-        KEPRuleItem lastItem = (KEPRuleItem) inFiller.get(inFiller.size() - 1);

-        int end = lastItem.getEnd();

-        if (end >= e.getAnnotation().getEnd()) {

-          if (!expandedRules.contains(eachRule)) {

-            expandedRules.add(eachRule);

-          }

-        } else {

-          List<AnnotationFS> annotationsStartingAt = getAnnotationsStartingAt(e.getDocumentCAS(),

-                  end, e.getAnnotation().getEnd());

-          if (annotationsStartingAt.isEmpty() && !expandedRules.contains(eachRule)) {

-            expandedRules.add(eachRule);

-          } else {

-            expanding = true;

-            for (AnnotationFS eachFS : annotationsStartingAt) {

-              if (eachFS.getType().getName().equals(lastItem.getType().getName())) {

-                lastItem.setAnnotation(eachFS);

-                lastItem.setMax(lastItem.getMax() + 1).setReluctant(true);

-                expandedRules.add(eachRule);

-              } else {

-                KEPRule newRule = new KEPRule(eachRule);

-                KEPRuleItem newItem = new KEPRuleItem(eachFS);

-                newRule.addInFillerItem(newItem);

-                expandedRules.add(newRule);

-              }

-            }

-          }

-        }

-      }

-    }

-    return expandInFillerRules(e, expandedRules, expanding);

-  }

-

-  private List<KEPRule> getCandidateClassificationRules(TextRulerTarget target) {

-    sendStatusUpdateToDelegate(

-            "Searching for Candidate Classification Rules for "

-                    + target.getSingleSlotTypeName().substring(

-                            target.getSingleSlotTypeName().lastIndexOf(".") + 1),

-            TextRulerLearnerState.ML_RUNNING, false);

-    List<KEPRule> result = new ArrayList<KEPRule>();

-    List<Type> types = getTokensInNExamples(exampleDocuments.getAllPositiveExamples(),

-            exampleDocuments.getAllPositiveExamples().size() / 2, true);

-

-    for (Type type : types) {

-      result.add(new KEPRule(this, target).addInFillerItem(new KEPRuleItem(type)));

-    }

-    testRulesOnDocumentSet(result, exampleDocuments);

-    // result = getBestAndOptimalRules(result);

-    result = addConditions(result, target);

-    sendStatusUpdateToDelegate(

-            "Searching for Candidate Classification Rules for "

-                    + target.getSingleSlotTypeName().substring(

-                            target.getSingleSlotTypeName().lastIndexOf(".") + 1) + " done",

-            TextRulerLearnerState.ML_RUNNING, true);

-    return result;

-  }

-

-  private List<KEPRule> addConditions(List<KEPRule> rules, TextRulerTarget target) {

-    List<KEPRule> result = new ArrayList<KEPRule>();

-    List<TextRulerExample> allCoveredExamples = getCoveredExamples(rules);

-

-    List<Type> containedTypes = getTokensInNExamples(exampleDocuments.getAllPositiveExamples(),

-            exampleDocuments.getAllPositiveExamples().size() / 3, false);

-    if (!containedTypes.isEmpty()) {

-      for (KEPRule rule : rules) {

-        KEPRuleItem ruleItem = (KEPRuleItem) rule.getInFiller().get(0);

-        for (Type type : containedTypes) {

-          if (!type.getName().equals(ruleItem.getType().getName())

-                  && !ruleItem.containsAndCondition(type)) {

-            result.add(new KEPRule(this, target).addInFillerItem(ruleItem.copy().addAndCondition(

-                    new KEPRuleItemCondition(type, Condition.CONTAINS, false))));

-          }

-        }

-      }

-    }

-

-    testRulesOnDocumentSet(result, exampleDocuments);

-    result = getBestAndOptimalRules(result);

-    List<KEPRule> toRefine = new ArrayList<KEPRule>();

-    List<KEPRule> toRemove = new ArrayList<KEPRule>();

-    for (KEPRule rule : result) {

-      if (rule.getCoveringStatistics().getCoveredPositivesCount() == 0)

-        toRemove.add(rule);

-      else if (rule.getCoveringStatistics().getCoveredNegativesCount() > 0

-              && rule.getPostFiller().size() < 5)

-        toRefine.add(rule);

-    }

-    result.removeAll(toRemove);

-    result.removeAll(toRefine);

-    result = getBestAndOptimalRules(result);

-    if (getCoveredExamples(result).size() == allCoveredExamples.size()) {

-      return result;

-    }

-    if (toRefine.size() > 0) {

-      result.addAll(addConditions(toRefine, target));

-    }

-    sendStatusUpdateToDelegate(

-            "Adding conditions to rules for "

-                    + target.getSingleSlotTypeName().substring(

-                            target.getSingleSlotTypeName().lastIndexOf(".") + 1) + " done",

-            TextRulerLearnerState.ML_RUNNING, true);

-    return result;

-  }

-

-  private List<KEPRule> makePostFillers(List<KEPRule> baseRules, boolean changed) {

-    if (!baseRules.isEmpty() && !shouldAbort()) {

-      sendStatusUpdateToDelegate(

-              "Adding postfillers to rules for "

-                      + baseRules

-                              .get(0)

-                              .getTarget()

-                              .getSingleSlotTypeName()

-                              .substring(

-                                      baseRules.get(0).getTarget().getSingleSlotTypeName()

-                                              .lastIndexOf(".") + 1),

-              TextRulerLearnerState.ML_RUNNING, true);

-    } else {

-      return new ArrayList<KEPRule>();

-    }

-    // List<TextRulerExample> allCoveredExamples = getCoveredExamples(baseRules);

-    Set<KEPRule> result = new HashSet<KEPRule>();

-    for (KEPRule rule : baseRules) {

-      for (TextRulerExample e : rule.getCoveringStatistics().getCoveredPositiveExamples()) {

-        if (rule.getCoveringStatistics().getCoveredNegativesCount() > 0) {

-          KEPRuleItem lastItem = ((KEPRuleItem) rule.getPostFiller().lastItem());

-          int end = e.getAnnotation().getEnd();

-          if (lastItem != null) {

-            end = lastItem.getEnd();

-          }

-          List<AnnotationFS> annotations = getAnnotationsStartingAt(e.getDocumentCAS(), end, e

-                  .getDocumentCAS().getDocumentText().length());

-          boolean blockBoundaryHit = false;

-          for (AnnotationFS annotationFS : annotations) {

-            if (annotationFS.getType().equals(

-                    blocks.get(baseRules.get(0).getTarget().getSingleSlotTypeName()))) {

-              blockBoundaryHit = true;

-              break;

-            }

-          }

-          if (blockBoundaryHit) {

-            continue;

-          }

-          for (AnnotationFS annotationFS : annotations) {

-            if (annotationFS.getType().getName()

-                    .equals(lastItem != null ? lastItem.getType().getName() : null)) {

-              lastItem.setReluctant(true).setMax(lastItem.getMax() + 1).setAnnotation(annotationFS);

-            } else {

-              result.add(rule.copy().addPostFillerItem(new KEPRuleItem(annotationFS)));

-            }

-            if (rule.getPreFiller().isEmpty())

-              result.add(rule);

-          }

-        } else {

-          result.add(rule);

-        }

-      }

-    }

-    List<KEPRule> resultList = new ArrayList<KEPRule>(result);

-    testRulesOnDocumentSet(resultList, exampleDocuments);

-    resultList.addAll(baseRules);

-    resultList = getBestAndOptimalRules(resultList);

-    if (baseRules.containsAll(resultList)) {

-      if (!changed)

-        return resultList;

-      else

-        changed = false;

-    } else {

-      changed = true;

-    }

-    resultList.addAll(makePreFillers(resultList, changed));

-    sendStatusUpdateToDelegate(

-            "Adding postfillers to rules for "

-                    + baseRules

-                            .get(0)

-                            .getTarget()

-                            .getSingleSlotTypeName()

-                            .substring(

-                                    baseRules.get(0).getTarget().getSingleSlotTypeName()

-                                            .lastIndexOf(".") + 1) + " done",

-            TextRulerLearnerState.ML_RUNNING, true);

-    return resultList;

-  }

-

-  private List<KEPRule> makePreFillers(List<KEPRule> baseRules, boolean changed) {

-    if (!baseRules.isEmpty() && !shouldAbort()) {

-      sendStatusUpdateToDelegate(

-              "Adding prefillers to rules for "

-                      + baseRules

-                              .get(0)

-                              .getTarget()

-                              .getSingleSlotTypeName()

-                              .substring(

-                                      baseRules.get(0).getTarget().getSingleSlotTypeName()

-                                              .lastIndexOf(".") + 1),

-              TextRulerLearnerState.ML_RUNNING, true);

-    } else {

-      return new ArrayList<KEPRule>();

-    }

-    // List<TextRulerExample> allCoveredExamples = getCoveredExamples(baseRules);

-    Set<KEPRule> result = new HashSet<KEPRule>();

-    for (KEPRule rule : baseRules) {

-      for (TextRulerExample e : rule.getCoveringStatistics().getCoveredPositiveExamples()) {

-        if (rule.getCoveringStatistics().getCoveredNegativesCount() > 0) {

-          int begin = e.getAnnotation().getBegin();

-          KEPRuleItem firstItem = (KEPRuleItem) rule.getPreFiller().firstItem();

-          if (firstItem != null) {

-            begin = firstItem.getBegin();

-          }

-          List<AnnotationFS> annotations = getAnnotationsEndingAt(begin, e.getDocumentCAS());

-          boolean blockBoundaryHit = false;

-          for (AnnotationFS annotationFS : annotations) {

-            if (annotationFS.getType().equals(

-                    blocks.get(baseRules.get(0).getTarget().getSingleSlotTypeName()))) {

-              blockBoundaryHit = true;

-              break;

-            }

-          }

-          if (blockBoundaryHit) {

-            continue;

-          }

-          for (AnnotationFS annotationFS : annotations) {

-            if (annotationFS.getType().getName()

-                    .equals(firstItem != null ? firstItem.getType().getName() : null)) {

-              firstItem.setReluctant(true).setMax(firstItem.getMax() + 1)

-                      .setAnnotation(annotationFS);

-            } else {

-              result.add(rule.copy().addPreFillerItem(new KEPRuleItem(annotationFS)));

-            }

-          }

-        } else {

-          result.add(rule);

-        }

-      }

-    }

-    List<KEPRule> resultList = new ArrayList<KEPRule>(result);

-    testRulesOnDocumentSet(resultList, exampleDocuments);

-    resultList.addAll(baseRules);

-    resultList = getBestAndOptimalRules(resultList);

-    if (baseRules.containsAll(resultList)) {

-      if (!changed)

-        return resultList;

-      else

-        changed = false;

-    } else {

-      changed = true;

-    }

-    resultList.addAll(makePostFillers(resultList, changed));

-

-    sendStatusUpdateToDelegate(

-            "Adding prefillers to rules for "

-                    + baseRules

-                            .get(0)

-                            .getTarget()

-                            .getSingleSlotTypeName()

-                            .substring(

-                                    baseRules.get(0).getTarget().getSingleSlotTypeName()

-                                            .lastIndexOf(".") + 1) + " done",

-            TextRulerLearnerState.ML_RUNNING, true);

-    return resultList;

-  }

-

-  private void removeBadRules() {

-    for (int i = 0; i < slotNames.length; i++) {

-      if (!hasPerfectRules.get(slotNames[i])

-              && hasPerfectRules.get(slotNamesWithBoundaries[3 * i + 1])

-              && hasPerfectRules.get(slotNamesWithBoundaries[3 * i + 2])) {

-        List<KEPRule> list = new ArrayList<KEPRule>();

-        for (KEPRule kepRule : ruleLists.get(slotNames[i])) {

-          List<TextRulerExample> exList = new ArrayList<TextRulerExample>(kepRule

-                  .getCoveringStatistics().getCoveredNegativeExamples());

-          exList.removeAll(getCorrectedExamples(slotNames[i]));

-          if (exList.size() == 0) {

-            list.add(kepRule);

-          }

-        }

-        ruleLists.put(slotNames[i], list);

-      } else {

-        if (!hasPerfectRules.get(slotNamesWithBoundaries[3 * i + 1])) {

-          List<KEPRule> list = new ArrayList<KEPRule>();

-          for (KEPRule kepRule : ruleLists.get(slotNamesWithBoundaries[3 * i + 1])) {

-            List<TextRulerExample> exList = new ArrayList<TextRulerExample>(kepRule

-                    .getCoveringStatistics().getCoveredNegativeExamples());

-            exList.removeAll(getCorrectedExamples(slotNamesWithBoundaries[3 * i + 1]));

-            if (exList.size() == 0) {

-              list.add(kepRule);

-            }

-          }

-        }

-        if (!hasPerfectRules.get(slotNamesWithBoundaries[3 * i + 2])) {

-          List<KEPRule> list = new ArrayList<KEPRule>();

-          for (KEPRule kepRule : ruleLists.get(slotNamesWithBoundaries[3 * i + 2])) {

-            List<TextRulerExample> exList = new ArrayList<TextRulerExample>(kepRule

-                    .getCoveringStatistics().getCoveredNegativeExamples());

-            exList.removeAll(getCorrectedExamples(slotNamesWithBoundaries[3 * i + 2]));

-            if (exList.size() == 0) {

-              list.add(kepRule);

-            }

-          }

-        }

-      }

-    }

-  }

-

-  private List<KEPRule> makeRemovalRules(TextRulerTarget target) {

-    sendStatusUpdateToDelegate(

-            "Searching for Removal Rules for "

-                    + target.getSingleSlotTypeName().substring(

-                            target.getSingleSlotTypeName().lastIndexOf(".") + 1),

-            TextRulerLearnerState.ML_RUNNING, false);

-    if (!hasFalsePositives(target.getSingleSlotTypeName()))

-      return new ArrayList<KEPRule>();

-    List<KEPRule> result = correctionRules.get(target.getSingleSlotTypeName());

-    Type targetType = exampleDocuments.getDocuments().get(0).getCAS().getTypeSystem()

-            .getType(target.getSingleSlotTypeName());

-

-    List<Type> containedTypes = getTokensInNExamples(exampleDocuments.getAllPositiveExamples(),

-            exampleDocuments.getAllPositiveExamples().size(), false);

-    List<Type> notContainedTypes = getTokensInNoExample(exampleDocuments.getAllPositiveExamples());

-    // notContainedTypes.retainAll(getTokensInNExamples(getFalsePositives(target), 1, false));

-    if (!containedTypes.isEmpty()) {

-      KEPRuleItem containsRuleItem = new KEPRuleItem(targetType);

-      for (Type type : containedTypes) {

-        result.add(new KEPRule(this, target).addInFillerItem(

-                containsRuleItem.copy().addAndCondition(

-                        new KEPRuleItemCondition(type, Condition.CONTAINS, true)))

-                .setCorrectionRule(true));

-      }

-    }

-    if (!notContainedTypes.isEmpty()) {

-      KEPRuleItem notContainsRuleItem = new KEPRuleItem(targetType);

-      for (Type type : notContainedTypes) {

-        result.add(new KEPRule(this, target).addInFillerItem(

-                notContainsRuleItem.copy().addAndCondition(

-                        new KEPRuleItemCondition(type, Condition.CONTAINS, false)))

-                .setCorrectionRule(true));

-      }

-    }

-    testCorrectionRules(target);

-    List<KEPRule> toRemove = new ArrayList<KEPRule>();

-    List<KEPRuleItemCondition> toMerge = new ArrayList<KEPRuleItemCondition>();

-    for (KEPRule rule : result) {

-      if (!(rule.getCoveringStatistics().getCoveredPositivesCount() == 0)

-              || !(rule.getCoveringStatistics().getCoveredNegativesCount() > 0)) {

-        toRemove.add(rule);

-      } else {

-        toMerge.addAll(((KEPRuleItem) rule.getInFiller().get(0)).getConditions().get(0));

-        toRemove.add(rule);

-      }

-    }

-    result.removeAll(toRemove);

-    if (!toMerge.isEmpty()) {

-      result.add(new KEPRule(this, target).addInFillerItem(

-              new KEPRuleItem(targetType).addConditions(toMerge)).setCorrectionRule(true));

-      testCorrectionRules(target);

-    }

-    sendStatusUpdateToDelegate(

-            "Searching for Removal Rules for "

-                    + target.getSingleSlotTypeName().substring(

-                            target.getSingleSlotTypeName().lastIndexOf(".") + 1) + " done",

-            TextRulerLearnerState.ML_RUNNING, true);

-    return result;

-  }

-

-  private void initializeMapEntries(String slotName) {

-    this.ruleLists.put(slotName, new ArrayList<KEPRule>());

-    this.correctionRules.put(slotName, new ArrayList<KEPRule>());

-    this.coveredExamples.put(slotName, new ArrayList<TextRulerExample>());

-    this.hasPerfectRules.put(slotName, false);

-  }

-

-  private List<AnnotationFS> getAnnotationsEndingAt(int end, CAS cas) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    FSIterator<AnnotationFS> it = cas.getAnnotationIndex(

-            cas.getTypeSystem().getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME)).iterator();

-    while (it.isValid() && it.get().getBegin() < end) {

-      it.moveToNext();

-    }

-    do

-      it.moveToPrevious();

-    while (it.isValid()

-            && (it.get().getBegin() >= end || filterSetWithSlotNames.contains(it.get().getType()

-                    .getName())));

-    if (!it.isValid())

-      return result;

-    end = it.get().getEnd();

-    it = cas.getAnnotationIndex().iterator();

-    while (it.isValid() && it.get().getBegin() <= end) {

-      if (it.get().getEnd() == end

-              && !filterSetWithSlotNames.contains(it.get().getType().getName()))

-        result.add(it.get());

-      it.moveToNext();

-    }

-    return result;

-  }

-

-  private List<AnnotationFS> getAnnotationsStartingAt(CAS cas, int begin, int till) {

-    List<AnnotationFS> result = new ArrayList<AnnotationFS>();

-    if (begin > cas.getDocumentText().length()) {

-      return new ArrayList<AnnotationFS>();

-    }

-    if (begin == 0) {

-      begin++;

-    }

-    AnnotationFS pointer = cas.createAnnotation(cas.getAnnotationType(), begin - 1, begin);

-    FSIterator<AnnotationFS> it = cas.getAnnotationIndex().iterator(pointer);

-    FSMatchConstraint constraint = getConstraint(cas);

-    FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(it, constraint);

-    iterator.moveTo(pointer);

-

-    int firstBegin = -1;

-    while (iterator.isValid()) {

-      AnnotationFS fs = iterator.get();

-      if (firstBegin == -1 && fs.getBegin() >= begin) {

-        firstBegin = fs.getBegin();

-      }

-      if (firstBegin >= 0) {

-        if (fs.getBegin() > firstBegin) {

-          break;

-        } else if (fs.getBegin() == firstBegin && fs.getEnd() <= till) {

-          if (!filterSetWithSlotNames.contains(fs.getType().getName())) {

-            result.add(fs);

-          }

-        }

-      }

-      iterator.moveToNext();

-    }

-    return result;

-  }

-

-  private List<KEPRule> getOptimalRuleCombination(List<KEPRule> rules) {

-

-    if (rules.isEmpty()) {

-      return new ArrayList<KEPRule>();

-    }

-    List<KEPRule> tmpList = new ArrayList<KEPRule>();

-    List<TextRulerExample> coveredExamples = new ArrayList<TextRulerExample>();

-    List<TextRulerExample> positiveExamples = exampleDocuments.getAllPositiveExamples();

-    List<TextRulerExample> correctedExamples = getCorrectedExamples(rules.get(0).getTarget()

-            .getSingleSlotTypeName());

-    for (KEPRule rule : rules) {

-      List<TextRulerExample> uncorrectedExamples = new ArrayList<TextRulerExample>(rule

-              .getCoveringStatistics().getCoveredNegativeExamples());

-      uncorrectedExamples.removeAll(correctedExamples);

-      if (uncorrectedExamples.size() == 0

-              && rule.getCoveringStatistics().getCoveredPositivesCount() > 0)

-        tmpList.add(rule);

-    }

-    tmpList = getBestRules(tmpList);

-    for (KEPRule rule : tmpList) {

-      coveredExamples.addAll(rule.getCoveringStatistics().getCoveredPositiveExamples());

-    }

-    if (coveredExamples.containsAll(exampleDocuments.getAllPositiveExamples()))

-      hasPerfectRules.put(rules.get(0).getTarget().getSingleSlotTypeName(), true);

-    else

-      hasPerfectRules.put(rules.get(0).getTarget().getSingleSlotTypeName(), false);

-    List<KEPRule> bestRules = getBestRules(rules);

-    while (!coveredExamples.containsAll(positiveExamples) && !bestRules.isEmpty()) {

-      KEPRule bestRule = bestRules.get(0);

-      if (!coveredExamples.containsAll(bestRule.getCoveringStatistics()

-              .getCoveredPositiveExamples())) {

-        coveredExamples.removeAll(bestRule.getCoveringStatistics().getCoveredPositiveExamples());

-        coveredExamples.addAll(bestRule.getCoveringStatistics().getCoveredPositiveExamples());

-        tmpList.add(bestRule);

-      }

-      bestRules.remove(0);

-    }

-    return tmpList;

-

-  }

-

-  private List<KEPRule> getBestRules(List<KEPRule> rules) {

-    if (rules.isEmpty())

-      return new ArrayList<KEPRule>();

-    final class AComparator implements Comparator<KEPRule> {

-      public int compare(KEPRule r1, KEPRule r2) {

-        if (r1.getCoveringStatistics().getCoveredPositivesCount() < r2.getCoveringStatistics()

-                .getCoveredPositivesCount())

-          return 1;

-        else if (r1.getCoveringStatistics().getCoveredPositivesCount() > r2.getCoveringStatistics()

-                .getCoveredPositivesCount())

-          return -1;

-        else if (r1.getCoveringStatistics().getCoveredNegativesCount() > r2.getCoveringStatistics()

-                .getCoveredNegativesCount())

-          return 1;

-        else if (r1.getCoveringStatistics().getCoveredNegativesCount() < r2.getCoveringStatistics()

-                .getCoveredNegativesCount())

-          return -1;

-        else if (r1.getPreFiller().size() + r1.getInFiller().size() + r1.getPostFiller().size() < r2

-                .getPreFiller().size() + r2.getInFiller().size() + r2.getPostFiller().size())

-          return -1;

-        return 0;

-      }

-    }

-

-    Collections.sort(rules, new AComparator());

-    List<KEPRule> result = new ArrayList<KEPRule>();

-    List<TextRulerExample> positiveExamples = exampleDocuments.getAllPositiveExamples();

-    List<TextRulerExample> coveredExamples = new ArrayList<TextRulerExample>();

-    for (int i = 0; i < rules.size(); i++) {

-      KEPRule rule = rules.get(i);

-      if ((3 * rule.getCoveringStatistics().getCoveredPositivesCount() >= rule

-              .getCoveringStatistics().getCoveredNegativesCount())

-              && (rule.getCoveringStatistics().getCoveredPositivesCount() >= positiveExamples

-                      .size() || !coveredExamples.containsAll(rule.getCoveringStatistics()

-                      .getCoveredPositiveExamples()))) {

-        result.add(rule);

-        coveredExamples.addAll(rule.getCoveringStatistics().getCoveredPositiveExamples());

-

-        if (coveredExamples.containsAll(positiveExamples))

-          return result;

-      }

-    }

-    for (int i = 0; i < rules.size(); i++) {

-      KEPRule rule = rules.get(i);

-      if (rule.getCoveringStatistics().getCoveredPositivesCount() >= positiveExamples.size()

-              || !coveredExamples.containsAll(rule.getCoveringStatistics()

-                      .getCoveredPositiveExamples())) {

-        result.add(rule);

-        coveredExamples.addAll(rule.getCoveringStatistics().getCoveredPositiveExamples());

-

-        if (coveredExamples.containsAll(positiveExamples))

-          return result;

-      }

-    }

-    return result;

-  }

-

-  private List<KEPRule> getBestAndOptimalRules(List<KEPRule> rules) {

-    List<KEPRule> result = new ArrayList<KEPRule>();

-

-    result.addAll(getBestRules(rules));

-    List<KEPRule> tmp = getOptimalRuleCombination(rules);

-    for (KEPRule rule : tmp)

-      if (!result.contains(rule))

-        result.add(rule);

-    return result;

-  }

-

-  private List<Type> getTokensInNExamples(List<TextRulerExample> examples, int n,

-          boolean countOnlyCoveringTokens) {

-    if (examples.isEmpty())

-      return new ArrayList<Type>();

-    List<Type> result = new ArrayList<Type>();

-    Map<String, List<TextRulerExample>> countMap = new HashMap<String, List<TextRulerExample>>();

-    for (TextRulerExample example : examples) {

-      for (AnnotationFS a : TextRulerToolkit.getAnnotationsWithinBounds(example.getDocumentCAS(),

-              example.getAnnotation().getBegin(), example.getAnnotation().getEnd(),

-              filterSetWithSlotNames, null)) {

-        if (!filterSetWithSlotNames.contains(a.getType().getName()))

-          if (((!countOnlyCoveringTokens) && (a.getBegin() >= example.getAnnotation().getBegin() && a

-                  .getEnd() <= example.getAnnotation().getEnd()))

-                  || (a.getBegin() == example.getAnnotation().getBegin() && a.getEnd() == example

-                          .getAnnotation().getEnd())) {

-            List<TextRulerExample> list = countMap.get(a.getType().getName());

-            if (list == null) {

-              list = new ArrayList<TextRulerExample>();

-              list.add(example);

-            } else if (!list.contains(example))

-              list.add(example);

-            countMap.put(a.getType().getName(), list);

-          }

-      }

-    }

-    for (String typeString : countMap.keySet()) {

-      if (countMap.get(typeString).size() >= n)

-        result.add(examples.get(0).getDocumentCAS().getTypeSystem().getType(typeString));

-    }

-    return result;

-  }

-

-  private List<Type> getTokensInNoExample(List<TextRulerExample> examples) {

-    List<String> types = new ArrayList<String>();

-    for (TextRulerExampleDocument doc : exampleDocuments.getDocuments()) {

-      for (AnnotationFS a : doc.getCAS().getAnnotationIndex()) {

-        if (!types.contains(a.getType().getName())

-                && !filterSetWithSlotNames.contains(a.getType().getName()))

-          types.add(a.getType().getName());

-      }

-    }

-    List<Type> containedTypes = getTokensInNExamples(examples, 1, false);

-    for (Type type : containedTypes) {

-      types.remove(type.getName());

-    }

-    List<Type> result = new ArrayList<Type>();

-    for (String typeString : types) {

-      result.add(examples.get(0).getDocumentCAS().getTypeSystem().getType(typeString));

-    }

-    return result;

-  }

-

-  public String getResultString() {

-    StringBuffer ruleStrings = new StringBuffer();

-    if (slotNamesWithBoundaries == null || slotNamesWithBoundaries.length == 0)

-      return "No results available yet!";

-

-    for (int i = 0; i < slotNamesWithBoundaries.length; i++) {

-      List<KEPRule> ruleList = this.ruleLists.get(slotNamesWithBoundaries[i]);

-      Type blockType = blocks.get(slotNamesWithBoundaries[i]);

-      if (blockType != null

-              && !(i > 0 && blocks.get(slotNamesWithBoundaries[i - 1]) != null && blocks

-                      .get(slotNamesWithBoundaries[i - 1]).getName().equals(blockType.getName()))) {

-        ruleStrings.append("BLOCK(" + blockType.getShortName() + ") " + blockType.getShortName()

-                + "{} { \n");

-      }

-      if (ruleList == null || ruleList.isEmpty()) {

-        if (blockType != null

-                && !(i < slotNamesWithBoundaries.length - 1

-                        && blocks.get(slotNamesWithBoundaries[i + 1]) != null && blocks

-                        .get(slotNamesWithBoundaries[i + 1]).getName().equals(blockType.getName())))

-          ruleStrings.append("} \n");

-        continue;

-      }

-      ruleStrings.append("// " + slotNamesWithBoundaries[i] + " RULES \n");

-      for (KEPRule rule : new ArrayList<KEPRule>(ruleList)) {

-        ruleStrings.append((blockType != null ? "\t" : "") + rule.getRuleString() + "\t// "

-                + rule.getCoveringStatistics() + "\n");

-      }

-      if (blockType != null

-              && !(i < slotNamesWithBoundaries.length - 1

-                      && blocks.get(slotNamesWithBoundaries[i + 1]) != null && blocks

-                      .get(slotNamesWithBoundaries[i + 1]).getName().equals(blockType.getName())))

-        ruleStrings.append("}");

-      ruleStrings.append("\n");

-    }

-    StringBuffer boundaryCorrectors = new StringBuffer();

-    StringBuffer wholeSlotCorrectors = new StringBuffer();

-    boundaryCorrectors.append("\n // BOUNDARY CORRECTION RULES: \n");

-    wholeSlotCorrectors.append("\n // CORRECTION RULES: \n");

-    for (int i = 0; i < slotNamesWithBoundaries.length; i++) {

-      List<KEPRule> ruleList = this.correctionRules.get(slotNamesWithBoundaries[i]);

-      if (ruleList == null || ruleList.isEmpty())

-        continue;

-      for (KEPRule rule : ruleList) {

-        if (slotNamesWithBoundaries[i].contains(TextRulerToolkit.LEFT_BOUNDARY_EXTENSION)

-                || slotNamesWithBoundaries[i].contains(TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION)) {

-          boundaryCorrectors.append(rule.getRuleString() + "\t// " + rule.getCoveringStatistics()

-                  + "\n");

-        } else {

-          wholeSlotCorrectors.append(rule.getRuleString() + "\t// " + rule.getCoveringStatistics()

-                  + "\n");

-        }

-      }

-    }

-    return getFileHeaderString(true) + ruleStrings + boundaryCorrectors + "\n // CONNECTORS: \n"

-            + getConnectorsRuleString() + wholeSlotCorrectors;

-  }

-

-  private String getAnnotationRulesString(String slotName) {

-    StringBuffer result = new StringBuffer();

-    result.append(getPackageString());

-    result.append("// " + slotName + " RULES \n");

-    Type blockType = blocks.get(slotName);

-    if (blockType != null) {

-      result.append("BLOCK(" + blockType.getShortName() + ") " + blockType.getShortName()

-              + "{} { \n");

-    }

-    List<KEPRule> ruleList = this.ruleLists.get(slotName);

-    if (ruleList != null && !ruleList.isEmpty()) {

-

-      for (KEPRule rule : ruleList) {

-        String theRuleString = rule.getRuleString();

-        result.append((blockType != null ? "\t" : "") + theRuleString + "\t// "

-                + rule.getCoveringStatistics() + "\n");

-      }

-    }

-    if (blockType != null) {

-      result.append("}");

-    }

-    result.append("\n");

-

-    if (!slotName.contains(TextRulerToolkit.LEFT_BOUNDARY_EXTENSION)

-            && !slotName.contains(TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION)) {

-      result.append(getAnnotationRulesString(slotName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION));

-      result.append(getAnnotationRulesString(slotName + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION));

-      if (blockType != null) {

-        result.append("BLOCK(" + blockType.getShortName() + "Correction) "

-                + blockType.getShortName() + "{} { \n");

-      }

-      String shortName = slotName.substring(slotName.lastIndexOf(".") + 1);

-      String str = shortName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION + "{->MARKONCE("

-              + shortName + ",1,3)} ANY*? " + shortName + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION

-              + ";" + "\n";

-      str += shortName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION + "{IS(" + shortName

-              + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION + ")->MARKONCE(" + shortName + ")} "

-              + ";" + "\n";

-      result.append(str);

-      if (blockType != null) {

-        result.append("}");

-      }

-    }

-

-    return result.toString();

-  }

-

-  private String getConnectorsRuleString() {

-

-    Map<Type, StringBuffer> connectorBlocks = new HashMap<Type, StringBuffer>();

-    StringBuffer noBlockConnectorRules = new StringBuffer();

-    StringBuffer result = new StringBuffer();

-

-    for (int i = 0; i < this.slotNames.length; i++) {

-      Type slotBlock = blocks.get(slotNames[i]);

-      String shortName = slotNames[i].substring(slotNames[i].lastIndexOf(".") + 1);

-      String str = (slotBlock == null ? "" : "\t") + shortName

-              + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION + "{->MARKONCE(" + shortName

-              + ",1,3)} ANY*? " + shortName + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION + ";"

-              + "\n";

-      str += (slotBlock == null ? "" : "\t") + shortName + TextRulerToolkit.LEFT_BOUNDARY_EXTENSION

-              + "{IS(" + shortName + TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION + ")->MARKONCE("

-              + shortName + ")} " + ";" + "\n";

-      if (slotBlock != null) {

-        if (connectorBlocks.get(slotBlock) == null) {

-          connectorBlocks.put(slotBlock, new StringBuffer());

-        }

-        connectorBlocks.get(slotBlock).append(str);

-      } else {

-        noBlockConnectorRules.append(str);

-      }

-    }

-

-    for (Type block : connectorBlocks.keySet()) {

-      result.append("BLOCK(" + block.getShortName() + "Connectors) " + block.getShortName()

-              + "{} { \n" + connectorBlocks.get(block) + "} \n");

-    }

-    result.append(noBlockConnectorRules);

-    return result.toString();

-  }

-

-  private List<TextRulerExample> getCoveredExamples(List<KEPRule> rules) {

-    List<TextRulerExample> result = new ArrayList<TextRulerExample>();

-    for (KEPRule rule : rules)

-      for (TextRulerExample ex : rule.getCoveringStatistics().getCoveredPositiveExamples())

-        if (!result.contains(ex))

-          result.add(ex);

-    return result;

-  }

-

-  private List<TextRulerExample> getCorrectedExamples(String slotName) {

-    List<TextRulerExample> result = new ArrayList<TextRulerExample>();

-    for (KEPRule rule : correctionRules.get(slotName))

-      for (TextRulerExample ex : rule.getCoveringStatistics().getCoveredNegativeExamples())

-        if (!result.contains(ex))

-          result.add(ex);

-    return result;

-  }

-

-  private boolean hasFalsePositives(String singleSlotTypeName) {

-    List<KEPRule> list = this.ruleLists.get(singleSlotTypeName);

-    if (list == null || list.isEmpty())

-      return false;

-    for (KEPRule kepRule : list) {

-      if (kepRule.getCoveringStatistics().getCoveredNegativesCount() > 0)

-        return true;

-    }

-    return false;

-  }

-

-  public void testCorrectionRules(TextRulerTarget target) {

-    if (shouldAbort())

-      return;

-    String rStr = getAnnotationRulesString(target.getSingleSlotTypeName());

-    for (TextRulerExampleDocument doc : exampleDocuments.getDocuments()) {

-      CAS processedCAS = applyScriptOnDocument(rStr, doc, target);

-      TextRulerStatisticsCollector scriptStatistics = new TextRulerStatisticsCollector();

-      compareOriginalDocumentWithTestCAS(doc, processedCAS, target, scriptStatistics,

-              collectNegativeCoveredInstancesWhenTesting());

-      for (KEPRule cRule : correctionRules.get(target.getSingleSlotTypeName())) {

-        if (shouldAbort())

-          break;

-        if (cRule.getCoveringStatistics() == null) {

-          cRule.setCoveringStatistics(new TextRulerStatisticsCollector());

-        }

-        processedCAS = applyScriptOnDocument(rStr, doc, target);

-        TextRulerStatisticsCollector correctedStats = new TextRulerStatisticsCollector();

-        testRuleOnDocument(cRule, doc, correctedStats, processedCAS);

-        for (TextRulerExample ex : scriptStatistics.getCoveredNegativeExamples()) {

-          if (!correctedStats.getCoveredNegativeExamples().contains(ex)) {

-            cRule.getCoveringStatistics().addCoveredNegative(ex);

-          }

-        }

-        for (TextRulerExample ex : scriptStatistics.getCoveredPositiveExamples()) {

-          if (!correctedStats.getCoveredPositiveExamples().contains(ex)) {

-            cRule.getCoveringStatistics().addCoveredPositive(ex);

-          }

-        }

-        cRule.getCoveringStatistics().reflectCountsFromCoveredExamples();

-      }

-    }

-  }

-

-  private void prepareCASWithBoundaries(CAS cas) {

-    for (String slotName : slotNames)

-      if (!(slotName.contains(TextRulerToolkit.LEFT_BOUNDARY_EXTENSION) || slotName

-              .contains(TextRulerToolkit.RIGHT_BOUNDARY_EXTENSION)))

-        TextRulerExampleDocument.createBoundaryAnnotationsForCas(cas, slotName, filterSet);

-  }

-

-  @Override

-  public CAS loadCAS(String fileName, CAS reuseCAS) {

-    CAS cas = super.loadCAS(fileName, reuseCAS);

-    prepareCASWithBoundaries(cas);

-    return cas;

-  }

-

-  private void prepareCachedCASesWithBoundaries() {

-    for (CAS cas : exampleDocuments.getCachedCASes())

-      prepareCASWithBoundaries(cas);

-  }

-

-  @Override

-  public boolean collectNegativeCoveredInstancesWhenTesting() {

-    return true;

-  }

-

-  public void setParameters(Map<String, Object> params) {

-    if (TextRulerToolkit.DEBUG)

-      saveParametersToTempFolder(params);

-

-    // TODO try catch

-    if (params.containsKey(FILLER_WINDOW))

-      fillerWindow = (Integer) params.get(FILLER_WINDOW);

-

-    if (params.containsKey(MAX_EXPAND_RULES))

-      maxExpandRules = (Integer) params.get(MAX_EXPAND_RULES);

-

-    if (params.containsKey(MAX_FILLER_LENGTH))

-      maxFillerLength = (Integer) params.get(MAX_FILLER_LENGTH);

-

-    if (params.containsKey(MAX_INFILLER_RULES))

-      maxInfillerRules = (Integer) params.get(MAX_INFILLER_RULES);

-

-  }

-

-  protected FSMatchConstraint getConstraint(CAS cas) {

-    ConstraintFactory cf = cas.getConstraintFactory();

-    final FSTypeConstraint constraint = cf.createTypeConstraint();

-

-    for (String each : getFilterSet()) {

-      constraint.add(each);

-    }

-    constraint.add(RutaEngine.BASIC_TYPE);

-    // TODO check if this is a legal alternative to "new NotConstraint(constraint)":

-    FSMatchConstraint result = new FSMatchConstraint() {

-      private static final long serialVersionUID = -6744378612440830298L;

-

-      private final FSTypeConstraint c = constraint;

-

-      public boolean match(FeatureStructure fs) {

-        return !c.match(fs);

-      }

-    };

-    return result;

-  }

-

-  public class KEPRuleComparator implements Comparator<KEPRule> {

-

-    private CAS cas;

-

-    public KEPRuleComparator(CAS cas) {

-      super();

-      this.cas = cas;

-    }

-

-    public int compare(KEPRule o1, KEPRule o2) {

-      ArrayList<TextRulerRuleItem> items1 = o1.getInFiller();

-      items1.addAll(o1.getPostFiller());

-      items1.addAll(o1.getPreFiller());

-      double occ1 = 0;

-      double occ2 = 0;

-      for (TextRulerRuleItem each : items1) {

-        KEPRuleItem eachItem = (KEPRuleItem) each;

-        int ratio = exampleDocuments.getAllPositiveExamples().size()

-                / cas.getAnnotationIndex(eachItem.getType()).size();

-        occ1 += (ratio < 1) ? 1 : ratio;

-      }

-      ArrayList<TextRulerRuleItem> items2 = o2.getInFiller();

-      items2.addAll(o2.getPostFiller());

-      items2.addAll(o2.getPreFiller());

-      for (TextRulerRuleItem each : items2) {

-        KEPRuleItem eachItem = (KEPRuleItem) each;

-        int ratio = exampleDocuments.getAllPositiveExamples().size()

-                / cas.getAnnotationIndex(eachItem.getType()).size();

-        occ2 += (ratio < 1) ? 1 : ratio;

-      }

-      double v1 = occ1;

-      double v2 = occ2;

-      if (v1 > v2) {

-        return 1;

-      } else if (v2 > v1) {

-        return -1;

-      } else {

-        return 0;

-      }

-    }

-  }

-

-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPPreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPPreferencePage.java
deleted file mode 100644
index 7be2a1b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPPreferencePage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.textruler.learner.kep;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class KEPPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.preference.kep";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public KEPPreferencePage() {

-    TextRulerLearnerController ctrl = TextRulerController

-            .getControllerForID("org.apache.uima.ruta.textruler.kep");

-    this.algorithmController = ctrl;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  @Override

-  protected Control createContents(Composite parent) {

-    Composite top = new Composite(parent, SWT.LEFT);

-    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    top.setLayout(new GridLayout());

-

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_INT_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-    return top;

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRule.java
deleted file mode 100644
index f0eba8b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRule.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * 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.ruta.textruler.learner.kep;
-
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerMultiSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerSlotPattern;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-
-public class KEPRule extends TextRulerMultiSlotRule {
-
-  private boolean isCorrectionRule = false;
-
-  public KEPRule(KEPRule copyFrom) {
-    super(copyFrom);
-    this.isCorrectionRule = copyFrom.isCorrectionRule;
-  }
-
-  public KEPRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target) {
-    super(parentAlgorithm, target);
-    slotPatterns.add(new TextRulerSlotPattern());
-  }
-
-  @Override
-  public KEPRule copy() {
-    return new KEPRule(this);
-  }
-
-  public double getLaplacian() {
-    int e = 0;
-    int n = 0;
-
-    if (coveringStatistics != null) {
-      e = coveringStatistics.getCoveredNegativesCount();
-      n = coveringStatistics.getCoveredNegativesCount()
-              + coveringStatistics.getCoveredPositivesCount();
-    }
-    return ((double) e + 1) / ((double) n + 1);
-  }
-
-  public boolean containsTerm(KEPRuleItem term) {
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      for (TextRulerRuleItem i : sp.preFillerPattern)
-        if (i.equals(term))
-          return true;
-      for (TextRulerRuleItem i : sp.fillerPattern)
-        if (i.equals(term))
-          return true;
-      for (TextRulerRuleItem i : sp.postFillerPattern)
-        if (i.equals(term))
-          return true;
-    }
-    return false;
-  }
-
-  public KEPRuleItem searchNeighborOfItem(KEPRuleItem item, boolean goToLeft) {
-    int slotIndex = -1;
-    int patternIndex = -1;
-    int slotI = 0;
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      for (TextRulerRuleItem it : sp.preFillerPattern) {
-        if (it == item) {
-          slotIndex = slotI;
-          patternIndex = 0; // 0=preFiller
-          break;
-        }
-      }
-      if (slotIndex < 0) {
-        for (TextRulerRuleItem it : sp.fillerPattern) {
-          if (it == item) {
-            slotIndex = slotI;
-            patternIndex = 1; // 1=filler
-            break;
-          }
-        }
-      }
-      if (slotIndex < 0) {
-        for (TextRulerRuleItem it : sp.postFillerPattern) {
-          if (it == item) {
-            slotIndex = slotI;
-            patternIndex = 2; // 2=postFiller
-            break;
-          }
-        }
-      }
-      if (slotIndex >= 0) {
-        break;
-      }
-    }
-    if (slotIndex < 0) // we didn't even find the item in our rule ?! how
-      // can this happen ?
-      return null;
-
-    TextRulerRulePattern currentPattern = getPattern(slotIndex, patternIndex);
-    while (currentPattern != null) {
-      int startIndex = currentPattern.indexOf(item); // this is only >= 0
-      // for the first
-      // pattern...
-      if (!goToLeft) // walk forward...
-      {
-        int startSearchFromIndex = startIndex + 1;
-        if (startSearchFromIndex < currentPattern.size())
-          return (KEPRuleItem) currentPattern.get(startSearchFromIndex);
-        else // skip to next pattern
-        {
-          patternIndex++;
-          if (patternIndex > 2) {
-            patternIndex = 0;
-            slotIndex++;
-            if (slotIndex >= slotPatterns.size())
-              return null; // not found!
-          }
-          currentPattern = getPattern(slotIndex, patternIndex);
-        }
-      } else {
-        int startSearchFromIndex = startIndex >= 0 ? startIndex - 1 : currentPattern.size() - 1;
-        if (startSearchFromIndex >= 0 && currentPattern.size() > 0)
-          return (KEPRuleItem) currentPattern.get(startSearchFromIndex);
-        else // skip to previous pattern
-        {
-          patternIndex--;
-          if (patternIndex < 0) {
-            patternIndex = 2;
-            slotIndex--;
-            if (slotIndex < 0)
-              return null; // not found!
-          }
-          currentPattern = getPattern(slotIndex, patternIndex);
-        }
-      }
-    }
-    return null;
-  }
-
-  private TextRulerRulePattern getPattern(int slotIndex, int patternIndex) {
-    TextRulerSlotPattern sp = slotPatterns.get(slotIndex);
-    if (patternIndex == 0)
-      return sp.preFillerPattern;
-    else if (patternIndex == 1)
-      return sp.fillerPattern;
-    else if (patternIndex == 2)
-      return sp.postFillerPattern;
-    else
-      return null;
-  }
-
-  public KEPRule addPostFillerItem(KEPRuleItem item) {
-    this.getPostFiller().add(item);
-    setNeedsCompile(true);
-    return this;
-  }
-
-  public KEPRule addInFillerItem(KEPRuleItem item) {
-    this.getInFiller().add(item);
-    setNeedsCompile(true);
-    return this;
-  }
-
-  public KEPRule addPreFillerItem(KEPRuleItem item) {
-    this.getPreFiller().add(0, item);
-    setNeedsCompile(true);
-    return this;
-  }
-
-  public TextRulerRulePattern getPreFiller() {
-    return this.slotPatterns.get(0).preFillerPattern;
-  }
-
-  public void setPreFiller(TextRulerRulePattern preFiller) {
-    this.slotPatterns.get(0).preFillerPattern = preFiller;
-    setNeedsCompile(true);
-  }
-
-  public TextRulerRulePattern getInFiller() {
-    return this.slotPatterns.get(0).fillerPattern;
-  }
-
-  public void setInFiller(TextRulerRulePattern inFiller) {
-    this.slotPatterns.get(0).fillerPattern = inFiller;
-    setNeedsCompile(true);
-  }
-
-  public TextRulerRulePattern getPostFiller() {
-    return this.slotPatterns.get(0).postFillerPattern;
-  }
-
-  public void setPostFiller(TextRulerRulePattern postFiller) {
-    this.slotPatterns.get(0).postFillerPattern = postFiller;
-    setNeedsCompile(true);
-  }
-
-  public KEPRule setCorrectionRule(boolean isCorrectionRule) {
-    this.isCorrectionRule = isCorrectionRule;
-    setNeedsCompile(true);
-    return this;
-  }
-
-  public boolean isCorrectionRule() {
-    return isCorrectionRule;
-  }
-
-  public TextRulerTarget getTarget() {
-    return this.target;
-  }
-
-  public void setTarget(TextRulerTarget target) {
-    this.target = target;
-    setNeedsCompile(true);
-  }
-
-  public boolean coversSameExamples(KEPRule otherRule) {
-    if (otherRule.getCoveringStatistics().getCoveredPositivesCount() != this
-            .getCoveringStatistics().getCoveredPositivesCount()
-            || !otherRule.getCoveringStatistics().getCoveredPositiveExamples().containsAll(
-                    this.getCoveringStatistics().getCoveredPositiveExamples()))
-      return false;
-    return true;
-  }
-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRuleItem.java
deleted file mode 100644
index a5f9509..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRuleItem.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * 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.ruta.textruler.learner.kep;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-
-public class KEPRuleItem implements TextRulerRuleItem {
-
-  private boolean isStarWildCard = false;
-
-  private boolean isReluctant = false;
-
-  private Type type;
-
-  private TextRulerAnnotation annotation;
-
-  private int min = 1;
-
-  private int max = 1;
-
-  private List<List<KEPRuleItemCondition>> conditions = new ArrayList<List<KEPRuleItemCondition>>();
-
-  public KEPRuleItem(KEPRuleItem copyFrom) {
-    super();
-    this.annotation = copyFrom.annotation;
-    this.isStarWildCard = copyFrom.isStarWildCard;
-    this.type = copyFrom.type;
-    this.conditions = new ArrayList<List<KEPRuleItemCondition>>();
-    for (List<KEPRuleItemCondition> cList : copyFrom.conditions) {
-      this.conditions.add(new ArrayList<KEPRuleItemCondition>(cList));
-    }
-    this.isReluctant = copyFrom.isReluctant;
-    this.min = copyFrom.min;
-    this.max = copyFrom.max;
-  }
-
-  public KEPRuleItem(Type type) {
-    super();
-    this.type = type;
-  }
-
-  public KEPRuleItem(TextRulerAnnotation a) {
-    super();
-    this.type = a.getType();
-    this.annotation = a;
-  }
-
-  public KEPRuleItem(AnnotationFS afs) {
-    super();
-    this.annotation = new TextRulerAnnotation(afs);
-    this.type = this.annotation.getType();
-  }
-
-  public KEPRuleItem(Type type, String regExpString) {
-    super();
-    this.type = type;
-    List<KEPRuleItemCondition> list = new ArrayList<KEPRuleItemCondition>();
-    list.add(new KEPRuleItemCondition(regExpString));
-    this.conditions.add(list);
-  }
-
-  public KEPRuleItem() {
-    this.type = null;
-  }
-
-  public KEPRuleItem copy() {
-    return new KEPRuleItem(this);
-  }
-
-  public String getStringForRuleString(TextRulerRule rule, MLRuleItemType type,
-          int numberInPattern, int patternSize, int numberInRule, int ruleSize, int slotIndex) {
-
-    String mark = "";
-    KEPRule kepRule = (KEPRule) rule;
-    boolean isMarkingItem = type == MLRuleItemType.FILLER && numberInPattern == 0;
-    String cStr = "";
-
-    String anchor = (this.type == null ? "ANY" : this.type.getShortName())
-            + (isStarWildCard ? "*" : "")
-            + ((min == 1 && max == 1) ? "" : ("[" + min + "," + max + "]"))
-            + (isReluctant ? "?" : "") + ((isMarkingItem || !this.conditions.isEmpty()) ? "{" : "");
-
-    if (!this.conditions.isEmpty() && !this.conditions.get(0).isEmpty()) {
-      for (List<KEPRuleItemCondition> cList : this.conditions) {
-        if (cList.size() == 1) {
-          cStr += cList.get(0) + ", ";
-        } else {
-          cStr += "OR(";
-          for (KEPRuleItemCondition condition : cList) {
-            cStr += condition + ", ";
-          }
-          cStr = cStr.substring(0, cStr.lastIndexOf(","));
-          cStr += "), ";
-        }
-      }
-      cStr = cStr.substring(0, cStr.lastIndexOf(","));
-    }
-
-    if (isMarkingItem) {
-      if (kepRule.isCorrectionRule())
-        mark += "->UNMARK(" + kepRule.getMarkName(slotIndex);
-      else
-        mark += "->MARKONCE(" + kepRule.getMarkName(slotIndex);
-      if (patternSize > 1)
-        mark += ", " + (numberInRule + 1) + ", " + (numberInRule + patternSize);
-      mark += ")";
-    }
-    return anchor + cStr + mark + ((isMarkingItem || !this.conditions.isEmpty()) ? "}" : "");
-  }
-
-  @Override
-  public String toString() {
-    return getStringForRuleString(null, null, 0, 0, 0, 0, 0);
-  }
-
-  public boolean isStarWildCard() {
-    return isStarWildCard;
-  }
-
-  public KEPRuleItem setStarWildCard(boolean isStarWildCard) {
-    this.isStarWildCard = isStarWildCard;
-    if (isStarWildCard) {
-      this.min = 1;
-      this.max = 1;
-    }
-    return this;
-  }
-
-  public Type getType() {
-    return type;
-  }
-
-  public void setType(Type type) {
-    this.type = type;
-  }
-
-  public boolean equals(TextRulerRuleItem o) {
-    return o.toString().equals(this.toString());
-  }
-
-  public int getBegin() {
-    return this.annotation.getBegin();
-  }
-
-  public int getEnd() {
-    return this.annotation.getEnd();
-  }
-
-  public int getMin() {
-    return min;
-  }
-
-  public KEPRuleItem setMin(int min) {
-    this.min = min;
-    if (min > this.max)
-      this.max = min;
-    isStarWildCard = false;
-    return this;
-  }
-
-  public int getMax() {
-    return max;
-  }
-
-  public KEPRuleItem setMax(int max) {
-    this.max = max;
-    if (max < this.min)
-      this.min = max;
-    isStarWildCard = false;
-    return this;
-  }
-
-  public boolean isReluctant() {
-    return isReluctant;
-  }
-
-  public KEPRuleItem setReluctant(boolean isReluctant) {
-    this.isReluctant = isReluctant;
-    return this;
-  }
-
-  public KEPRuleItem addAndCondition(KEPRuleItemCondition condition) {
-    List<KEPRuleItemCondition> list = new ArrayList<KEPRuleItemCondition>();
-    list.add(condition);
-    this.conditions.add(list);
-    return this;
-  }
-
-  public List<List<KEPRuleItemCondition>> getConditions() {
-    return this.conditions;
-  }
-
-  public void setAnnotation(AnnotationFS afs) {
-    this.annotation = new TextRulerAnnotation(afs);
-    this.type = this.annotation.getType();
-  }
-
-  public KEPRuleItem setConditions(List<List<KEPRuleItemCondition>> conditions) {
-    this.conditions = conditions;
-    return this;
-  }
-
-  public KEPRuleItem addConditions(List<KEPRuleItemCondition> toMerge) {
-    this.conditions.add(toMerge);
-    return this;
-  }
-
-  public boolean containsAndCondition(Type type2) {
-    for (List<KEPRuleItemCondition> list : this.conditions) {
-      if (list.size() == 1)
-        for (KEPRuleItemCondition c : list) {
-          if (c.equals(type2))
-            return true;
-        }
-    }
-    return false;
-  }
-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRuleItemCondition.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRuleItemCondition.java
deleted file mode 100644
index a256c5f..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/kep/KEPRuleItemCondition.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.ruta.textruler.learner.kep;
-
-import org.apache.uima.cas.Type;
-
-public class KEPRuleItemCondition {
-
-  public enum Condition {
-    IS, PARTOF, CONTAINS, REGEXP
-  }
-
-  private Type type;
-
-  private Condition condition;
-
-  private boolean isNot;
-
-  private String regExp;
-
-  public KEPRuleItemCondition(Type type, Condition condition, boolean isNot) {
-    this.type = type;
-    this.condition = condition;
-    this.isNot = isNot;
-    this.regExp = "";
-  }
-
-  public KEPRuleItemCondition(String regExp) {
-    this.regExp = regExp;
-    this.condition = Condition.REGEXP;
-    this.isNot = false;
-  }
-
-  public String toString() {
-    return (isNot ? "-" : "") + this.condition.toString() + "("
-            + (regExp + type == null ? "" : type.getShortName()) + ")";
-  }
-
-  public boolean equals(Object o) {
-    if (o instanceof KEPRuleItemCondition) {
-      KEPRuleItemCondition other = (KEPRuleItemCondition) o;
-      if (this.condition == Condition.REGEXP && other.condition == Condition.REGEXP
-              && this.regExp.equals(other.regExp) && this.isNot == other.isNot)
-        return true;
-      if (this.type.toString().equals(other.type.toString()) && this.isNot == other.isNot
-              && this.condition == other.condition)
-        return true;
-    } else if (o instanceof Type) {
-      if (this.type.toString().equals(((Type) o).toString()))
-        return true;
-    }
-    return false;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/BasicLP2.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/BasicLP2.java
deleted file mode 100755
index ee7b4fb..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/BasicLP2.java
+++ /dev/null
@@ -1,614 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.GlobalCASSource;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocument;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleList;
-import org.apache.uima.ruta.textruler.core.TextRulerShiftExample;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.util.FileUtils;
-
-public abstract class BasicLP2 extends TextRulerBasicLearner {
-
-  public static final String WINDOW_SIZE_KEY = "windowSize";
-
-  public static final String CURRENT_BEST_RULES_SIZE_KEY = "currentBestRulesSize";
-
-  public static final String CURRENT_CONTEXTUAL_RULES_SIZE_KEY = "currentContextualRulesSize";
-
-  public static final String MIN_COVERED_POSITIVES_PER_RULE_KEY = "minCoveredPositivesPerRule";
-
-  public static final String MAX_ERROR_THRESHOLD_KEY = "maxErrorThreshold";
-
-  public static final int STANDARD_WINDOW_SIZE = 2;
-
-  public static final int STANDARD_MAX_CURRENT_BEST_RULES_COUNT = 4;
-
-  public static final int STANDARD_MAX_CONTEXTUAL_RULES_COUNT = 4;
-
-  public static final int STANDARD_MIN_COVERED_POSITIVES_PER_RULE = 1;
-
-  public static final float STANDARD_MAX_ERROR_THRESHOLD = 0.1f;
-
-  public static final String CORRECTION_ANNOTATION_NAME = "lp2shift";
-
-  private static final int STANDARD_SHIFT_SIZE = 2;
-
-  protected int maxCurrentBestRulesCount = STANDARD_MAX_CURRENT_BEST_RULES_COUNT;
-
-  protected int maxCurrentContextualRulesCount = STANDARD_MAX_CONTEXTUAL_RULES_COUNT;
-
-  protected int windowSize = STANDARD_WINDOW_SIZE;
-
-  protected int shiftSize = STANDARD_SHIFT_SIZE;
-
-  protected int minCoveredPositives = STANDARD_MIN_COVERED_POSITIVES_PER_RULE;
-
-  protected float maxErrorThreshold = STANDARD_MAX_ERROR_THRESHOLD;
-
-  protected List<TextRulerExample> examples;
-
-  protected Set<TextRulerExample> coveredExamples;
-
-  protected Map<String, Integer> slotMaximumTokenCountMap = new TreeMap<String, Integer>();
-
-  protected LP2CurrentBestRulesQueue currentBestRules;
-
-  protected LP2CurrentBestRulesQueue currentContextualRules;
-
-  protected Map<String, TextRulerRuleList> bestRulesPoolMap = new TreeMap<String, TextRulerRuleList>();
-
-  protected Map<String, TextRulerRuleList> contextRulesPoolMap = new TreeMap<String, TextRulerRuleList>();
-
-  protected Map<String, String> leftBoundaryBestRulesMap = new TreeMap<String, String>();
-
-  protected Map<String, String> rightBoundaryBestRulesMap = new TreeMap<String, String>();
-
-  protected Map<String, String> leftBoundaryContextualRulesMap = new TreeMap<String, String>();
-
-  protected Map<String, String> rightBoundaryContextualRulesMap = new TreeMap<String, String>();
-
-  public BasicLP2(String inputDir, String prePropTMFile, String tmpDir, String[] slotNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super(inputDir, prePropTMFile, tmpDir, slotNames, filterSet, skip, delegate);
-    supportBoundaries = true;
-  }
-
-  protected TextRulerRuleList learnTaggingRules(TextRulerTarget target,
-          TextRulerRuleList contextualRules) {
-    if (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-      sendStatusUpdateToDelegate("Creating Left-Boundary Examples...",
-              TextRulerLearnerState.ML_RUNNING, false);
-    else if (target.type == MLTargetType.SINGLE_RIGHT_BOUNDARY)
-      sendStatusUpdateToDelegate("Creating Right-Boundary Examples...",
-              TextRulerLearnerState.ML_RUNNING, false);
-    else if (target.type == MLTargetType.SINGLE_LEFT_CORRECTION)
-      sendStatusUpdateToDelegate("Creating Left Correction Examples...",
-              TextRulerLearnerState.ML_RUNNING, false);
-    else
-      // if (target.type == MLTargetType.SINGLE_RIGHT_CORRECTION)
-      sendStatusUpdateToDelegate("Creating Right Correction Examples...",
-              TextRulerLearnerState.ML_RUNNING, false);
-    exampleDocuments.clearCurrentExamples();
-    exampleDocuments.createExamplesForTarget(target);
-    examples = exampleDocuments.getAllPositiveExamples();
-
-    if (shouldAbort())
-      return null;
-    TextRulerRuleList bestRulesPool = new TextRulerRuleList();
-    TextRulerRuleList contextRulesPool = new TextRulerRuleList();
-    String slotName = target.getSingleSlotRawTypeName();
-    bestRulesPoolMap.put(slotName, bestRulesPool);
-    contextRulesPoolMap.put(slotName, contextRulesPool);
-
-    coveredExamples = new HashSet<TextRulerExample>();
-    int roundNumber = 0;
-    for (TextRulerExample e : examples)
-      if (!coveredExamples.contains(e)) {
-        if (shouldAbort())
-          break;
-        roundNumber++;
-        currentBestRules = new LP2CurrentBestRulesQueue(maxCurrentBestRulesCount);
-        currentContextualRules = new LP2CurrentBestRulesQueue(maxCurrentContextualRulesCount);
-        // TextRulerToolkit.log("Example: "+e.getAnnotation().getBegin()+" : "+e.getAnnotation().getEnd());
-
-        induceRulesFromExample(e, roundNumber);
-
-        // TextRulerToolkit.log("Best Rules from this Seed: "+currentBestRules.size());
-        // if (TextRulerToolkit.DEBUG && currentBestRules.size()>1)
-        // {
-        // for (TextRulerRule r : currentBestRules)
-        // {
-        // TextRulerToolkit.log("\tp="+r.getCoveringStatistics().getCoveredPositivesCount()+"; n="+r.getCoveringStatistics().getCoveredNegativesCount()+";  "+r.getRuleString());
-        // for (TextRulerExample ex :
-        // r.getCoveringStatistics().getCoveredPositiveExamples())
-        // {
-        // TextRulerToolkit.log("\t\te="+ex.getAnnotation().getBegin());
-        //
-        // }
-        // }
-        // }
-        for (LP2Rule bestRule : currentBestRules) {
-          addToFinalBestRulesPool(bestRule);
-        }
-        for (LP2Rule ctxRule : currentContextualRules) {
-          addToFinalContextRulesPool(ctxRule);
-        }
-        sendStatusUpdateToDelegate("New Rules added.", TextRulerLearnerState.ML_RUNNING, true);
-      }
-    if (TextRulerToolkit.DEBUG) {
-      bestRulesPool.saveToRulesFile(getIntermediateRulesFileName(), getFileHeaderString(true));
-      // for (TextRulerRule r : bestRulesPool)
-      // {
-      // TextRulerToolkit.log("p="+r.getCoveringStatistics().getCoveredPositivesCount()+"; n="+r.getCoveringStatistics().getCoveredNegativesCount()+";  "+r.getRuleString());
-      // }
-    }
-
-    TextRulerRuleList result = bestRulesPool;
-    if (contextualRules != null)
-      for (TextRulerRule r : contextRulesPool)
-        contextualRules.add(r);
-    return result;
-  }
-
-  @Override
-  public CAS loadCAS(String fileName, CAS reuseCAS) {
-    CAS cas = super.loadCAS(fileName, reuseCAS);
-    prepareCASWithBoundaries(cas);
-    return cas;
-  }
-
-  public void prepareCASWithBoundaries(CAS cas) {
-    for (String slotName : slotNames)
-      TextRulerExampleDocument.createBoundaryAnnotationsForCas(cas, slotName, filterSet);
-  }
-
-  public void prepareCachedCASesWithBoundaries() {
-    for (CAS cas : exampleDocuments.getCachedCASes())
-      prepareCASWithBoundaries(cas);
-  }
-
-  @Override
-  protected void cleanUp() {
-    super.cleanUp();
-    examples = null;
-    coveredExamples = null;
-    currentBestRules = null;
-    currentContextualRules = null;
-    bestRulesPoolMap.clear();
-    contextRulesPoolMap.clear();
-  }
-
-  @Override
-  protected void doRun() {
-    TextRulerToolkit.logIfDebug("--- LP2 START");
-
-    prepareCachedCASesWithBoundaries(); // if some cases are already loaded,
-    // prepare them! all others get prepared when loaded (see loadCAS)
-
-    for (int i = 0; i < slotNames.length; i++) {
-      runForSlotName(slotNames[i]);
-    }
-
-    sendStatusUpdateToDelegate("Done", TextRulerLearnerState.ML_DONE, true);
-    TextRulerToolkit.logIfDebug("--- LP2 END");
-  }
-
-  protected void runForSlotName(String slotName) {
-    // 1. get slot length histogram in order to find maximum slot length
-    // (counted in tokens)
-
-    sendStatusUpdateToDelegate("Creating slot length histogram...",
-            TextRulerLearnerState.ML_RUNNING, false);
-    List<Integer> histogram = exampleDocuments.getTokenCountHistogrammForSlotName(slotName,
-            TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet));
-    if (shouldAbort())
-      return;
-    slotMaximumTokenCountMap.put(slotName, histogram.size() - 1); // -1 since the
-    // zero-histogram point
-    // also needs a place!
-
-    TextRulerRuleList ctxRules = new TextRulerRuleList();
-    TextRulerRuleList bestRules = learnTaggingRules(new TextRulerTarget(slotName,
-            MLTargetType.SINGLE_LEFT_BOUNDARY, this), ctxRules); // learn
-    // left
-    // boundary
-    // best
-    // rules
-    if (bestRules != null) {
-      leftBoundaryBestRulesMap.put(slotName, bestRules.getRulesString(""));
-      leftBoundaryContextualRulesMap.put(slotName, ctxRules.getRulesString("\t"));
-      bestRules.clear(); // free som memory/references
-    }
-    if (shouldAbort())
-      return;
-    ctxRules.clear();
-    bestRules = learnTaggingRules(new TextRulerTarget(slotName, MLTargetType.SINGLE_RIGHT_BOUNDARY,
-            this), ctxRules); // learn
-    // right
-    // boundary best
-    // rules
-    if (bestRules != null) {
-      rightBoundaryBestRulesMap.put(slotName, bestRules.getRulesString(""));
-      rightBoundaryContextualRulesMap.put(slotName, ctxRules.getRulesString("\t"));
-    }
-
-    // TODO add correction rule learn stuff
-    // testTaggingRulesAndCreateCorrectionRulesExamples(null, STANDARD_MAX_CONTEXTUAL_RULES_COUNT)
-
-    // correct left start
-    TextRulerTarget lsTarget = new TextRulerTarget(slotName, MLTargetType.SINGLE_LEFT_CORRECTION,
-            this);
-    lsTarget.setMaxShiftDistance(shiftSize);
-    TextRulerRuleList correctLeftRules = learnTaggingRules(lsTarget, null);
-
-    // resultString = "CAP{REGEXP(\"PM\")} ALL{->MARKONCE(stimeEND)};";
-    // try {
-    // FileUtils.saveString2File(resultString, file);
-    // } catch (IOException e) {
-    // }
-
-    // correct right start
-    // TextRulerTarget rsTarget = new TextRulerTarget(slotName,
-    // MLTargetType.SINGLE_RIGHT_CORRECTION,
-    // this);
-    // rsTarget.setMaxShiftDistance(shiftSize);
-    // TextRulerRuleList correctRightRules = learnTaggingRules(rsTarget, null);
-    //
-    sendStatusUpdateToDelegate("SLOT Done", TextRulerLearnerState.ML_RUNNING, true);
-    TextRulerToolkit.logIfDebug("--- LP2 END FOR SLOT:" + slotName);
-  }
-
-  protected abstract void induceRulesFromExample(TextRulerExample e, int roundNumber);
-
-  protected void addToFinalContextRulesPool(LP2Rule rule) {
-    if (TextRulerToolkit.DEBUG)
-      TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxpool"
-              + RutaEngine.SCRIPT_FILE_EXTENSION, rule.getRuleString() + "\n");
-    String slotName = rule.getTarget().getSingleSlotRawTypeName();
-    if (!contextRulesPoolMap.get(slotName).contains(rule)) {
-      contextRulesPoolMap.get(slotName).add(rule);
-      // TextRulerToolkit.log("CONTEXT RULE: "+rule.getRuleString()+" ; "+rule.getCoveringStatistics());
-    } else {
-      if (TextRulerToolkit.DEBUG) {
-        TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxpool"
-                + RutaEngine.SCRIPT_FILE_EXTENSION, "\tDUPLICATE\n");
-      }
-    }
-
-  }
-
-  protected void addToFinalBestRulesPool(LP2Rule rule) {
-    if (TextRulerToolkit.DEBUG && false)
-      TextRulerToolkit.appendStringToFile(tempDirectory() + "bestpool"
-              + RutaEngine.SCRIPT_FILE_EXTENSION, rule.getRuleString() + "\n");
-    String slotName = rule.getTarget().getSingleSlotRawTypeName();
-    if (!bestRulesPoolMap.get(slotName).contains(rule)) {
-      bestRulesPoolMap.get(slotName).add(rule);
-      // TextRulerToolkit.log("BEST RULE: "+rule.getRuleString());
-      // add all covered positives to covering set
-      coveredExamples.addAll(rule.getCoveringStatistics().getCoveredPositiveExamples());
-      if (TextRulerToolkit.DEBUG)
-        bestRulesPoolMap.get(slotName).saveToRulesFile(getIntermediateRulesFileName(),
-                getFileHeaderString(false));
-    } else {
-      if (TextRulerToolkit.DEBUG && false) {
-        TextRulerToolkit.log("KANN SOWAS PASSIEREN ??");
-        TextRulerToolkit.appendStringToFile(tempDirectory() + "bestpool"
-                + RutaEngine.SCRIPT_FILE_EXTENSION, "\tDUPLICATE\n");
-      }
-    }
-
-  }
-
-  public String getResultString() {
-    StringBuilder sb = new StringBuilder();
-    String header = getFileHeaderString(true);
-    sb.append(header);
-
-    for (String eachSlot : slotNames) {
-
-      String leftBoundaryBestRulesString = leftBoundaryBestRulesMap.get(eachSlot);
-      String rightBoundaryBestRulesString = rightBoundaryBestRulesMap.get(eachSlot);
-      String leftBoundaryContextualRulesString = leftBoundaryContextualRulesMap.get(eachSlot);
-      String rightBoundaryContextualRulesString = rightBoundaryContextualRulesMap.get(eachSlot);
-      TextRulerRuleList bestRulesPool = bestRulesPoolMap.get(eachSlot);
-      TextRulerRuleList contextRulesPool = contextRulesPoolMap.get(eachSlot);
-
-      sb.append("\n// Slot: " + TextRulerToolkit.getTypeShortName(eachSlot) + "\n");
-      sb.append("// LEFT BOUNDARY RULES:\n");
-      if (leftBoundaryBestRulesString != null) {
-        sb.append(leftBoundaryBestRulesString);
-        sb.append("\n// RIGHT BOUNDARY RULES:\n");
-        if (rightBoundaryBestRulesString != null)
-          sb.append(rightBoundaryBestRulesString);
-        else if (bestRulesPool != null)
-          sb.append(bestRulesPool.getRulesString(""));
-
-        sb.append("\nBLOCK(contextualRules_" + TextRulerToolkit.getTypeShortName(eachSlot)
-                + ") Document{} {\n"
-                + "\tDocument{->ASSIGN(redoContextualRules, false)}; // reset flag\n");
-        sb.append("\n\t// LEFT BOUNDARY CONTEXTUAL RULES:\n");
-        sb.append(leftBoundaryContextualRulesString);
-
-        sb.append("\n\t// RIGHT BOUNDARY CONTEXTUAL RULES:\n");
-        if (rightBoundaryBestRulesString != null)
-          sb.append(rightBoundaryContextualRulesString);
-        else if (contextRulesPool != null)
-          sb.append(contextRulesPool.getRulesString("\t"));
-
-        sb.append("\n\t//Document{IF(redoContextualRules)->CALL(thisFile.contextualRules_"
-                + TextRulerToolkit.getTypeShortName(eachSlot) + ")};\n}\n");
-      } else if (bestRulesPool != null) {
-        sb.append(bestRulesPool.getRulesString(""));
-        sb.append("\n\t// LEFT BOUNDARY CONTEXTUAL RULES:\n");
-        if (contextRulesPool != null)
-          sb.append(contextRulesPool.getRulesString(""));
-      }
-    }
-
-    for (String eachSlot : slotNames) {
-      String leftBoundary = TextRulerToolkit.getTypeShortName((new TextRulerTarget(eachSlot,
-              MLTargetType.SINGLE_LEFT_BOUNDARY, this)).getSingleSlotTypeName());
-      String rightBoundary = TextRulerToolkit.getTypeShortName((new TextRulerTarget(eachSlot,
-              MLTargetType.SINGLE_RIGHT_BOUNDARY, this)).getSingleSlotTypeName());
-      String slotMarkName = TextRulerToolkit.getTypeShortName(eachSlot);
-      int maxInnerLength = (getMaxTokens(eachSlot) * 3) - 2;
-      sb.append("\n//slot-building rules:\n");
-      sb.append(leftBoundary + "{IS(" + rightBoundary + ")->UNMARK(" + leftBoundary + "), UNMARK("
-              + rightBoundary + "), MARKONCE(" + slotMarkName + ")};\n");
-      sb.append(leftBoundary + "{->UNMARK(" + leftBoundary + ")} ");
-      if (maxInnerLength > 0) {
-        sb.append("ANY[0, " + maxInnerLength + "]? ");
-        sb.append(rightBoundary + "{->UNMARK(" + rightBoundary + "), MARKONCE(" + slotMarkName
-                + ", 1, 3)};\n");
-      } else
-        sb.append(rightBoundary + "{->UNMARK(" + rightBoundary + "), MARKONCE(" + slotMarkName
-                + ", 1, 2)};\n");
-
-      sb.append("\n//cleaning up:\n" + leftBoundary + "{->UNMARK(" + leftBoundary + ")};\n"
-              + rightBoundary + "{->UNMARK(" + rightBoundary + ")};\n");
-    }
-
-    return sb.toString();
-  }
-
-  private Integer getMaxTokens(String slot) {
-    if (slotMaximumTokenCountMap.get(slot) == null) {
-      return 0;
-    }
-    return slotMaximumTokenCountMap.get(slot);
-  }
-
-  public void setParameters(Map<String, Object> params) {
-    if (TextRulerToolkit.DEBUG)
-      saveParametersToTempFolder(params);
-
-    // TODO try catch
-    if (params.containsKey(WINDOW_SIZE_KEY))
-      windowSize = (Integer) params.get(WINDOW_SIZE_KEY);
-
-    if (params.containsKey(CURRENT_BEST_RULES_SIZE_KEY))
-      maxCurrentBestRulesCount = (Integer) params.get(CURRENT_BEST_RULES_SIZE_KEY);
-
-    if (params.containsKey(CURRENT_CONTEXTUAL_RULES_SIZE_KEY))
-      maxCurrentContextualRulesCount = (Integer) params.get(CURRENT_CONTEXTUAL_RULES_SIZE_KEY);
-
-    if (params.containsKey(MIN_COVERED_POSITIVES_PER_RULE_KEY))
-      minCoveredPositives = (Integer) params.get(MIN_COVERED_POSITIVES_PER_RULE_KEY);
-
-    if (params.containsKey(MAX_ERROR_THRESHOLD_KEY))
-      maxErrorThreshold = (Float) params.get(MAX_ERROR_THRESHOLD_KEY);
-  }
-
-  protected String correctionRulesInputDirectory(TextRulerTarget target) {
-    if (target.isLeftBoundary())
-      return tempDirectory() + "leftCorrectionDocs";
-    else
-      return tempDirectory() + "rightCorrectionDocs";
-  }
-
-  protected boolean testTaggingRulesAndCreateCorrectionRulesExamples(TextRulerTarget target,
-          int maxDistance) {
-    try {
-      File dir = new File(correctionRulesInputDirectory(target));
-      if (!dir.exists())
-        dir.mkdir();
-      exampleDocuments.clearCurrentExamples();
-      exampleDocuments.createExamplesForTarget(target);
-      examples = exampleDocuments.getAllPositiveExamples();
-
-      TextRulerExampleDocument[] sortedDocs = exampleDocuments
-              .getSortedDocumentsInCacheOptimizedOrder();
-      TypeSystem ts = sortedDocs[0].getCAS().getTypeSystem();
-      Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
-
-      // String allRulesContent = getResultString();
-      String allRulesContent = FileUtils.file2String(new File("/testinput/testrules/rules"
-              + RutaEngine.SCRIPT_FILE_EXTENSION));
-      FileUtils.saveString2File(allRulesContent, new File(getTempRulesFileName()));
-
-      CAS testCAS = getTestCAS();
-      for (TextRulerExampleDocument doc : sortedDocs) {
-        TextRulerStatisticsCollector c = new TextRulerStatisticsCollector();
-        doc.resetAndFillTestCAS(testCAS, target);
-        CAS docCAS = doc.getCAS();
-        ae.process(testCAS);
-        compareOriginalDocumentWithTestCAS(doc, testCAS, target, c, true); // test whole ruleset and
-        // collect negative
-        // examples
-
-        // now we have some covered positive examples that are good, and
-        // maybe some negative examples
-        // for that we might create Correction Rules... in order to do
-        // that we have to create
-        // ShiftExamples and map negative examples (incorrect inserted
-        // boundaries) with a specific
-        // distance to an original positive example...
-
-        // TODO should that be done in both directions ? left and right
-        // ?! what happes if we
-        // find two potential examples, one left, one right ? --> for
-        // now: use the nearer one. if
-        // exactly the same distance, use the one where the wrong tag
-        // would be IN the slot filler!
-        List<TextRulerExample> correctTags = doc.getPositiveExamples();
-        List<TextRulerExample> wrongTags = new ArrayList<TextRulerExample>(
-                c.getCoveredNegativeExamples());
-        List<TextRulerShiftExample> newExamples = new ArrayList<TextRulerShiftExample>();
-        for (TextRulerExample wrongTag : wrongTags) {
-          // test, if there's a corresponding positive example
-          // somewhere around (within maxDistance)
-          List<AnnotationFS> left = TextRulerToolkit.getAnnotationsBeforePosition(docCAS, wrongTag
-                  .getAnnotation().getBegin(), maxDistance, TextRulerToolkit
-                  .getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-          List<AnnotationFS> right = TextRulerToolkit.getAnnotationsAfterPosition(docCAS, wrongTag
-                  .getAnnotation().getEnd(), maxDistance, TextRulerToolkit
-                  .getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-
-          // TODO stop after the first found match or create one bad
-          // example for each found occurence ??!!
-          // for now: stop after one ! so create only ONE bad
-          // example...
-          int leftDistance = 0;
-          TextRulerExample leftCorrectTag = null;
-          for (int i = left.size() - 1; i >= 0; i--) {
-            leftDistance++;
-            TextRulerAnnotation needle = TextRulerToolkit.convertToTargetAnnotation(left.get(i),
-                    doc, target, docCAS.getTypeSystem());
-            leftCorrectTag = TextRulerToolkit.exampleListContainsAnnotation(correctTags, needle);
-            if (leftCorrectTag != null)
-              break;
-          }
-
-          int rightDistance = 0;
-          TextRulerExample rightCorrectTag = null;
-          for (AnnotationFS fs : right) {
-            rightDistance++;
-            TextRulerAnnotation needle = TextRulerToolkit.convertToTargetAnnotation(fs, doc,
-                    target, docCAS.getTypeSystem());
-            rightCorrectTag = TextRulerToolkit.exampleListContainsAnnotation(correctTags, needle);
-            if (rightCorrectTag != null)
-              break;
-          }
-
-          TextRulerExample theCorrectTag = null;
-          if (rightDistance < leftDistance && rightCorrectTag != null)
-            theCorrectTag = rightCorrectTag;
-          else if (rightDistance > leftDistance && leftCorrectTag != null)
-            theCorrectTag = leftCorrectTag;
-          else // use the one that would lie in the slot filler:
-          {
-            if (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY && rightCorrectTag != null)
-              theCorrectTag = rightCorrectTag;
-            else
-              theCorrectTag = leftCorrectTag;
-          }
-
-          if (theCorrectTag != null) {
-            TextRulerToolkit.log("FOUND BAD EXAMPLE FOR SHIFTING !!");
-            TextRulerShiftExample shiftExample = new TextRulerShiftExample(doc,
-                    wrongTag.getAnnotation(), theCorrectTag.getAnnotation(), true, target);
-            newExamples.add(shiftExample);
-          }
-        }
-        TextRulerToolkit
-                .writeCAStoXMIFile(testCAS, dir + File.pathSeparator + doc.getCasFileName());
-      }
-      testCAS.reset();
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-      return false;
-    }
-
-    return true;
-  }
-
-  @Override
-  public String getFileHeaderString(boolean complete) {
-    return super.getFileHeaderString(complete) + "BOOLEAN redoContextualRules;\n\n";
-  }
-
-  @Override
-  protected boolean checkForMandatoryTypes() {
-    if (!super.checkForMandatoryTypes()) {
-      return false;
-    }
-
-    CAS someCas = getTestCAS();
-    TypeSystem ts = someCas.getTypeSystem();
-//    GlobalCASSource.releaseCAS(someCas);
-    // check if all helper types are present:
-    List<String> list = new ArrayList<String>();
-
-    for (String eachSlot : slotNames) {
-      list.add(new TextRulerTarget(eachSlot, MLTargetType.SINGLE_LEFT_BOUNDARY, this)
-              .getSingleSlotTypeName());
-      list.add(new TextRulerTarget(eachSlot, MLTargetType.SINGLE_RIGHT_BOUNDARY, this)
-              .getSingleSlotTypeName());
-    }
-
-    boolean result = true;
-    List<String> missingTypes = new ArrayList<String>();
-    for (String s : list) {
-      if (ts.getType(s) == null) {
-        missingTypes.add(s);
-        result = false;
-      }
-    }
-    String missingString = "";
-    for (String string : missingTypes) {
-      missingString += string + ", ";
-    }
-    if (!StringUtils.isEmpty(missingString)) {
-      missingString = missingString.substring(0, missingString.length() - 2);
-    }
-    if (!result) {
-      sendStatusUpdateToDelegate("Error: Some Slot- or Helper-Types were not found in TypeSystem: "
-              + missingString, TextRulerLearnerState.ML_ERROR, false);
-    }
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2CurrentBestRulesQueue.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2CurrentBestRulesQueue.java
deleted file mode 100755
index 2ac635a..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2CurrentBestRulesQueue.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.PriorityQueue;
-
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-
-public class LP2CurrentBestRulesQueue implements Iterable<LP2Rule> {
-
-  private PriorityQueue<LP2Rule> ruleList;
-
-  private PriorityQueue<LP2Rule> reverseRuleList;
-
-  private int maxSize;
-
-  private static int cmpRules(LP2Rule o1, LP2Rule o2) {
-    // 1st criterion: sort by decreasing number of positive matches:
-    if (o1.getCoveringStatistics().getCoveredPositivesCount() > o2.getCoveringStatistics()
-            .getCoveredPositivesCount())
-      return -1;
-    else if (o1.getCoveringStatistics().getCoveredPositivesCount() < o2.getCoveringStatistics()
-            .getCoveredPositivesCount())
-      return 1;
-    else {
-      // 2nd criterion: sort by increasing error rate:
-      if (o1.getErrorRate() < o2.getErrorRate())
-        return -1;
-      else if (o1.getErrorRate() > o2.getErrorRate())
-        return 1;
-      else {
-        // 3rd criterion:
-        // TODO:
-        // if one rule has more positive matches than a threshold then
-        // prefere the one with more generic
-        // conditions; else prefer the other one.
-
-        // test for now: prefer more general rules !
-        int c1 = o1.totalConstraintCount();
-        int c2 = o2.totalConstraintCount();
-        if (c1 < c2)
-          return -1;
-        else if (c1 > c2)
-          return 1;
-        else {
-          return o1.getRuleString().compareTo(o2.getRuleString());
-        }
-      }
-    }
-
-  }
-
-  public LP2CurrentBestRulesQueue(int maxSize) {
-    this.maxSize = Math.max(1, maxSize);
-
-    ruleList = new PriorityQueue<LP2Rule>(this.maxSize, new Comparator<LP2Rule>() {
-      public int compare(LP2Rule o1, LP2Rule o2) {
-        return cmpRules(o1, o2);
-      }
-    });
-    this.reverseRuleList = new PriorityQueue<LP2Rule>(this.maxSize, new Comparator<LP2Rule>() {
-      public int compare(LP2Rule o1, LP2Rule o2) {
-        return -cmpRules(o1, o2);
-      }
-    });
-  }
-
-  public Iterator<LP2Rule> iterator() {
-    return ruleList.iterator();
-  }
-
-  public void clear() {
-    ruleList.clear();
-    reverseRuleList.clear();
-  }
-
-  public void addAll(Collection<LP2Rule> rules) {
-    for (LP2Rule r : rules)
-      add(r);
-  }
-
-  public void add(LP2Rule rule) {
-    ruleList.add(rule);
-    reverseRuleList.add(rule);
-    // TextRulerToolkit.log("ADD TO RULE LIST, SIZE="+ruleList.size()+"    revSize="+reverseRuleList.size());
-    // for (LP2Rule r : ruleList)
-    // {
-    // TextRulerToolkit.log("Rule Value: "+r.getPriority()+"  peek: "+ruleList.peek().getPriority());
-    // }
-  }
-
-  public boolean contains(LP2Rule rule) {
-    return ruleList.contains(rule);
-  }
-
-  // returns the removed objects
-  public Collection<LP2Rule> cutToMaxSize() {
-    ArrayList<LP2Rule> result = new ArrayList<LP2Rule>();
-    while (ruleList.size() > maxSize) {
-      Object tail = reverseRuleList.peek();
-      ruleList.remove(tail);
-      reverseRuleList.remove(tail);
-      result.add((LP2Rule) tail);
-    }
-    return result;
-  }
-
-  public LP2Rule peek() {
-    return ruleList.peek();
-  }
-
-  public void remove(LP2Rule r) {
-    ruleList.remove(r);
-    reverseRuleList.remove(r);
-  }
-
-  public LP2Rule[] toArray() {
-    LP2Rule[] result = new LP2Rule[ruleList.size()];
-    int i = 0;
-    for (LP2Rule r : ruleList) {
-      result[i] = r;
-      i++;
-    }
-    return result;
-  }
-
-  protected void removeSubsumedRules() {
-    ArrayList<LP2Rule> removeList = new ArrayList<LP2Rule>();
-    LP2Rule[] rulesArray = toArray();
-    for (int index1 = 0; index1 < rulesArray.length - 1; index1++) {
-      LP2Rule rule1 = rulesArray[index1];
-      for (int index2 = index1 + 1; index2 < rulesArray.length; index2++) {
-        LP2Rule rule2 = rulesArray[index2];
-        if (rule1.getCoveringStatistics().getCoveredPositiveExamples().containsAll(
-                rule2.getCoveringStatistics().getCoveredPositiveExamples()))
-          removeList.add(rule2);
-      }
-
-    }
-    // if (TextRulerToolkit.DEBUG && removeList.size() > 0)
-    // TextRulerToolkit.log("[removeSubsumedRules] REMOVED "+removeList.size()+" RULES");
-    for (LP2Rule r : removeList)
-      remove(r);
-  }
-
-  public void printDebug() {
-    TextRulerToolkit.log("-------CURRENT BEST RULES:");
-    for (LP2Rule r : ruleList) {
-      TextRulerToolkit.log(r.getRuleString() + " " + r.getCoveringStatistics() + "  error="
-              + r.getErrorRate() + "  constraints=" + r.totalConstraintCount());
-    }
-  }
-
-  public int size() {
-    return ruleList.size();
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2Rule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2Rule.java
deleted file mode 100755
index 04713af..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2Rule.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerSingleSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-
-public class LP2Rule extends TextRulerSingleSlotRule {
-
-  protected float errorRate;
-
-  protected boolean setIsPreFillerStartRule = false;
-
-  protected boolean isContextualRule = false;
-
-  public LP2Rule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target) {
-    super(parentAlgorithm, target);
-
-  }
-
-  // copy constructor:
-  protected LP2Rule(LP2Rule copyFrom) {
-    super(copyFrom);
-    errorRate = copyFrom.errorRate;
-    setIsPreFillerStartRule = copyFrom.setIsPreFillerStartRule;
-    isContextualRule = copyFrom.isContextualRule;
-  }
-
-  @Override
-  public LP2Rule copy() {
-    return new LP2Rule(this);
-  }
-
-  @Override
-  public void setCoveringStatistics(TextRulerStatisticsCollector c) {
-    super.setCoveringStatistics(c);
-    int p = c.getCoveredPositivesCount();
-    int n = c.getCoveredNegativesCount();
-    if (p < 1) {
-      TextRulerToolkit.log("ERROR, A RULE MAY NOT COVER ZERO POSITIVE EXAMPLES! WHAT'S WRONG ?");
-      TextRulerToolkit.log("\tRULE: " + getRuleString());
-      // make sure this rule is rated totally bad:
-      errorRate = Float.MAX_VALUE;
-    } else {
-      errorRate = ((float) n) / ((float) p);
-    }
-  }
-
-  public float getErrorRate() {
-    return errorRate;
-  }
-
-  public int totalConstraintCount() {
-    int result = 0;
-    // every item itself counts 1 (so a wildcard "ANY" item counts also as a
-    // constraint, since it says: HERE HAS TO BE A TOKEN!)
-    // and every constraint on that token also counts 1.
-    for (TextRulerRuleItem i : slotPattern.preFillerPattern)
-      result += 1 + ((LP2RuleItem) i).totalConstraintCount();
-    for (TextRulerRuleItem i : slotPattern.postFillerPattern)
-      result += 1 + ((LP2RuleItem) i).totalConstraintCount();
-    return result;
-  }
-
-  public int totalInnerConstraintCount() // counts only the constraints in the
-  // items, but does not count the
-  // items as a constraint themselves!
-  {
-    int result = 0;
-    for (TextRulerRuleItem i : slotPattern.preFillerPattern)
-      result += ((LP2RuleItem) i).totalConstraintCount();
-    for (TextRulerRuleItem i : slotPattern.postFillerPattern)
-      result += ((LP2RuleItem) i).totalConstraintCount();
-    return result;
-  }
-
-  public boolean isPreFillerStartRule() {
-    return setIsPreFillerStartRule;
-  }
-
-  public void setIsPreFillerStartRule(boolean flag) {
-    setIsPreFillerStartRule = flag;
-  }
-
-  public LP2RuleItem getMarkingRuleItem() {
-    if (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-      return (LP2RuleItem) slotPattern.postFillerPattern.get(0);
-    else
-      return (LP2RuleItem) slotPattern.preFillerPattern
-              .get(slotPattern.preFillerPattern.size() - 1);
-  }
-
-  public boolean isContextualRule() {
-    return isContextualRule;
-  }
-
-  public void setIsContextualRule(boolean flag) {
-    if (flag != isContextualRule) {
-      isContextualRule = flag;
-      setNeedsCompile(true);
-    }
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2RuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2RuleItem.java
deleted file mode 100755
index 2c9d3fc..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/LP2RuleItem.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerSingleSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-
-public class LP2RuleItem implements TextRulerRuleItem {
-
-  protected TextRulerWordConstraint wordConstraint;
-
-  protected MLLP2ContextConstraint contextConstraint;
-
-  protected List<MLLP2OtherConstraint> otherConstraints = new ArrayList<MLLP2OtherConstraint>();
-
-  public static class MLLP2ContextConstraint {
-    private String contextBoundaryName;
-
-    private int contextSize;
-
-    private boolean direction; // false = left; true = right;
-
-    public MLLP2ContextConstraint(int contextSize, LP2Rule parentRule) {
-      super();
-      this.contextSize = contextSize;
-      contextBoundaryName = TextRulerToolkit.getTypeShortName(parentRule.getTarget()
-              .getCounterPartBoundaryTarget().getSingleSlotTypeName());
-      direction = parentRule.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY ? true : false;
-    }
-
-    public MLLP2ContextConstraint(MLLP2ContextConstraint copyFrom) {
-      super();
-      contextBoundaryName = copyFrom.contextBoundaryName;
-      contextSize = copyFrom.contextSize;
-      direction = copyFrom.direction;
-    }
-
-    public MLLP2ContextConstraint copy() {
-      return new MLLP2ContextConstraint(this);
-    }
-
-    @Override
-    public String toString() {
-      return "NEAR(" + contextBoundaryName + ", 0," + contextSize + ","
-              + (direction ? "true" : "false") + ",true)";
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      return toString().equals(((MLLP2ContextConstraint) o).toString());
-    }
-
-    @Override
-    public int hashCode() {
-      return toString().hashCode();
-    }
-
-  }
-
-  public static class MLLP2OtherConstraint {
-
-    TextRulerAnnotation tokenAnnotation;
-
-    TextRulerAnnotation constraintAnnotation;
-
-    boolean canBeAnchor;
-
-    Type type;
-
-    public MLLP2OtherConstraint(TextRulerAnnotation tokenAnnotation,
-            TextRulerAnnotation constraintAnnotation) {
-      this.tokenAnnotation = tokenAnnotation;
-      this.constraintAnnotation = constraintAnnotation;
-      this.type = constraintAnnotation.getType();
-      canBeAnchor = (tokenAnnotation.getBegin() == constraintAnnotation.getBegin())
-              && (tokenAnnotation.getEnd() == constraintAnnotation.getEnd());
-      // TODO is the matching END also a requirement ?
-    }
-
-    public boolean isTMBasicTypeTokenConstraint() {
-      return tokenAnnotation == constraintAnnotation;
-    }
-
-    public boolean canBeAnchorConstraint() {
-      return canBeAnchor;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      MLLP2OtherConstraint co = (MLLP2OtherConstraint) o;
-
-      return toString().equals(co.toString()) && (canBeAnchor == co.canBeAnchor);
-    }
-
-    @Override
-    public int hashCode() {
-      return toString().hashCode() * (canBeAnchor ? 2 : 1);
-    }
-
-    @Override
-    public String toString() {
-      return type.getShortName();
-    }
-
-    public MLLP2OtherConstraint copy() {
-      return new MLLP2OtherConstraint(tokenAnnotation, constraintAnnotation);
-    }
-
-  }
-
-  public LP2RuleItem(LP2RuleItem copyFrom) {
-    super();
-    if (copyFrom.wordConstraint != null)
-      wordConstraint = copyFrom.wordConstraint.copy();
-    if (copyFrom.contextConstraint != null)
-      contextConstraint = copyFrom.contextConstraint.copy();
-    for (MLLP2OtherConstraint c : copyFrom.otherConstraints)
-      otherConstraints.add(c.copy());
-  }
-
-  public LP2RuleItem() {
-    super();
-  }
-
-  public LP2RuleItem copy() {
-    return new LP2RuleItem(this);
-  }
-
-  @Override
-  public int hashCode() {
-    return toString().hashCode();
-  }
-
-  public boolean equals(TextRulerRuleItem o) {
-    return toString().equals(((LP2RuleItem) o).toString());
-  }
-
-  @Override
-  public String toString() {
-    return getStringForRuleString(null, null, 0, 0, 0, 0, 0);
-  }
-
-  public MLLP2OtherConstraint getTMBasicTypeTokenConstraint() {
-    for (MLLP2OtherConstraint c : otherConstraints)
-      if (c.isTMBasicTypeTokenConstraint())
-        return c;
-    return null;
-  }
-
-  public String getStringForRuleString(TextRulerRule rule, MLRuleItemType type,
-          int numberInPattern, int patternSize, int numberInRule, int ruleSize, int slotIndex) {
-
-    String result = "";
-    LP2Rule lp2Rule = (LP2Rule) rule;
-    boolean isMarkingItem = (rule != null)
-            && (((rule.getTarget().type == MLTargetType.SINGLE_RIGHT_BOUNDARY)
-                    && (type == MLRuleItemType.PREFILLER) && (numberInPattern == patternSize - 1)) || ((rule
-                    .getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-                    && (type == MLRuleItemType.POSTFILLER) && (numberInPattern == 0)));
-
-    ArrayList<String> constraints = new ArrayList<String>();
-
-    String anchor = null;
-
-    if (wordConstraint == null)
-      anchor = "ANY";
-    else {
-      if (wordConstraint.isRegExpConstraint()) {
-        anchor = wordConstraint.typeShortName();
-        constraints.add("REGEXP(\"" + wordConstraint + "\")");
-      } else
-        anchor = wordConstraint.toString();
-    }
-
-    if (isMarkingItem && lp2Rule.isContextualRule())
-      constraints.add("-IS(" + ((TextRulerSingleSlotRule) rule).getMarkName() + ")");
-
-    if (contextConstraint != null)
-      constraints.add(contextConstraint.toString());
-
-    MLLP2OtherConstraint anchorConstraint = null;
-    if (wordConstraint == null) {
-
-      // prefer the basic Ruta constraint as the anchor
-      anchorConstraint = getTMBasicTypeTokenConstraint(); // returns null
-      // if we don't
-      // have one...
-
-      if (anchorConstraint == null) {
-        for (MLLP2OtherConstraint c : otherConstraints)
-          if (c.canBeAnchorConstraint()) {
-            anchorConstraint = c;
-            break;
-          }
-      }
-      for (MLLP2OtherConstraint oc : otherConstraints) {
-        if (oc != anchorConstraint) {
-          if (oc.canBeAnchorConstraint())
-            constraints.add("IS(" + oc + ")");
-          else
-            constraints.add("PARTOF(" + oc + ")");
-        }
-      }
-      if (anchorConstraint != null)
-        anchor = anchorConstraint.toString();
-    }
-
-    if (constraints.size() > 0) {
-      String cStr = "";
-      for (String constraintStr : constraints) {
-        if (cStr.length() > 0)
-          cStr += ", ";
-        cStr += constraintStr;
-      }
-      result += "{" + cStr;
-    }
-
-    if ((rule != null)
-            && (((rule.getTarget().type == MLTargetType.SINGLE_RIGHT_BOUNDARY)
-                    && (type == MLRuleItemType.PREFILLER) && (numberInPattern == patternSize - 1)) || ((rule
-                    .getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-                    && (type == MLRuleItemType.POSTFILLER) && (numberInPattern == 0)))) {
-      // result +=
-      // "(MARKONCE, "+((TextRulerSingleSlotRule)rule).getMarkName()+", "+(numberInRule+1);
-      if (constraints.size() == 0)
-        result += "{";
-      result += "->MARKONCE(" + ((TextRulerSingleSlotRule) rule).getMarkName() + ")";
-      if (lp2Rule.isContextualRule())
-        result += ", ASSIGN(redoContextualRules, true)";
-      result += "}";
-    } else {
-      if (constraints.size() != 0)
-        result += "}";
-    }
-    return anchor + result;
-  }
-
-  public void addOtherConstraint(MLLP2OtherConstraint c) {
-    if (!otherConstraints.contains(c))
-      otherConstraints.add(c);
-  }
-
-  public List<MLLP2OtherConstraint> getOtherConstraints() {
-    return otherConstraints;
-  }
-
-  public void setWordConstraint(TextRulerAnnotation tokenAnnotation) {
-    setWordConstraint(new TextRulerWordConstraint(tokenAnnotation));
-  }
-
-  public void setContextConstraint(MLLP2ContextConstraint c) {
-    contextConstraint = c;
-  }
-
-  public MLLP2ContextConstraint getContextConstraint() {
-    return contextConstraint;
-  }
-
-  public void setWordConstraint(TextRulerWordConstraint c) {
-    wordConstraint = c;
-  }
-
-  public TextRulerWordConstraint getWordConstraint() {
-    return wordConstraint;
-  }
-
-  public int totalConstraintCount() {
-    return otherConstraints.size() + (wordConstraint != null ? 1 : 0)
-            + (contextConstraint != null ? 1 : 0);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2.java
deleted file mode 100755
index 59e534c..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint;
-import org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2OtherConstraint;
-import org.apache.uima.util.FileUtils;
-
-public class NaiveLP2 extends BasicLP2 {
-
-  public NaiveLP2(String inputDir, String prePropTMFile, String tmpDir, String[] slotNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super(inputDir, prePropTMFile, tmpDir, slotNames, filterSet, skip, delegate);
-  }
-
-  public static final boolean SAVE_DEBUG_INFO_IN_TEMPFOLDER = false;
-
-  @Override
-  protected void induceRulesFromExample(TextRulerExample e, int roundNumber) {
-    LP2Rule baseRule = createInitialRuleForPositiveExample(e);
-    List<LP2Rule> genRules = generalizeRule(baseRule);
-
-    if (shouldAbort())
-      return;
-
-    List<LP2Rule> test = new ArrayList<LP2Rule>();
-
-    // int i=1;
-    // for (LP2Rule newRule : genRules)
-    // {
-    // if (shouldAbort())
-    // return;
-    // sendStatusUpdateToDelegate("Round "+roundNumber+" - Testing proposed generalization "+i+"/"+(genRules.size())+
-    // "    - uncovered examples: "+
-    // (examples.size()-coveredExamples.size() + " / "+examples.size()),
-    // TextRulerLearnerState.ML_RUNNING, false);
-    // i++;
-    // testRuleOnDocumentSet(newRule, exampleDocuments);
-    //
-    // checkAndHandleNewRule(newRule);
-    //
-    // if (TextRulerToolkit.DEBUG)
-    // test.add(newRule);
-    // }
-    // new cache and testCAS optimized rule testing:
-
-    sendStatusUpdateToDelegate(
-            "Round " + roundNumber + " - Testing " + (genRules.size())
-                    + "generalizations... - uncovered examples: "
-                    + (examples.size() - coveredExamples.size() + " / " + examples.size()),
-            TextRulerLearnerState.ML_RUNNING, false);
-    testRulesOnDocumentSet(new ArrayList<TextRulerRule>(genRules), exampleDocuments);
-
-    for (LP2Rule newRule : genRules) {
-      checkAndHandleNewRule(newRule);
-      if (TextRulerToolkit.DEBUG)
-        test.add(newRule);
-    }
-
-    if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER) {
-      Collections.sort(test, new Comparator<LP2Rule>() {
-
-        public int compare(LP2Rule o1, LP2Rule o2) {
-          return o1.getRuleString().compareTo(o2.getRuleString());
-        }
-
-      });
-
-      String startend = e.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY ? "left_"
-              : "right_";
-      File file = new File(tempDirectory() + startend + "generalizations" + roundNumber + RutaEngine.SCRIPT_FILE_EXTENSION);
-      StringBuffer str = new StringBuffer();
-      for (TextRulerRule rule : test) {
-        str.append(rule.getCoveringStatistics() + "\t\t" + rule.getRuleString() + "\n");
-      }
-      try {
-        FileUtils.saveString2File(str.toString(), file);
-      } catch (Exception ex) {
-        TextRulerPlugin.error(ex);
-      }
-    }
-
-  }
-
-  protected void checkAndHandleNewRule(LP2Rule rule) {
-    boolean tooFewPositives = rule.getCoveringStatistics().getCoveredPositivesCount() < minCoveredPositives;
-    boolean tooManyErrors = rule.getErrorRate() > maxErrorThreshold;
-
-    boolean isBestRule = !(tooFewPositives || tooManyErrors);
-
-    if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
-      TextRulerToolkit.appendStringToFile(tempDirectory() + "bestcandidates"+RutaEngine.SCRIPT_FILE_EXTENSION,
-              rule.getRuleString() + "\n");
-
-    if (isBestRule) {
-      currentBestRules.add(rule);
-      currentBestRules.removeSubsumedRules();
-      currentBestRules.cutToMaxSize();
-    } else if (!tooFewPositives) {
-
-      // test in context
-      // in our TM representation, we simply can add a NEAR condition in
-      // the MARKing rule item and retest it on the
-      // corpus. we should do that for all kinds of tags we have, but
-      // currently we only do it for the corresponding opening/closing
-      // tag, since we do not have any information about other slots yet!
-      // // TODO use all other slot tags! (see optimized version as well)
-
-      if (true) {
-        rule = rule.copy();
-        LP2RuleItem item = rule.getMarkingRuleItem();
-        // TextRulerToolkit.log("CONTEXTUAL RULE CANDIDATE: "+rule.getRuleString()+"  ;  "+rule.getCoveringStatistics());
-        item.setContextConstraint(new MLLP2ContextConstraint(slotMaximumTokenCountMap.get(rule
-                .getTarget().getSingleSlotRawTypeName()), rule));
-        rule.setIsContextualRule(true);
-
-        rule.setNeedsCompile(true);
-
-        if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
-          TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxcandidates"+RutaEngine.SCRIPT_FILE_EXTENSION,
-                  rule.getRuleString());
-
-        testRuleOnDocumentSet(rule, exampleDocuments); // not very
-        // fast... but
-        // works!
-        boolean ctxTooFewPositives = rule.getCoveringStatistics().getCoveredPositivesCount() < minCoveredPositives;
-        boolean ctxTooManyErrors = rule.getErrorRate() > maxErrorThreshold;
-        boolean isGoodContextRule = !(ctxTooFewPositives || ctxTooManyErrors);
-        if (isGoodContextRule) {
-          currentContextualRules.add(rule);
-          currentContextualRules.removeSubsumedRules();
-          currentContextualRules.cutToMaxSize();
-        }
-      }
-
-    }
-  }
-
-  protected List<LP2Rule> generalizeRule(LP2Rule baseRule) {
-    List<LP2Rule> result = new ArrayList<LP2Rule>();
-    TextRulerRulePattern rulePattern = new TextRulerRulePattern();
-    TextRulerRulePattern prePattern = baseRule.getPreFillerPattern();
-
-    for (int i = prePattern.size() - 1; i >= 0; i--) // we have to reverse
-    // the order again!
-    {
-      rulePattern.add(prePattern.get(i));
-    }
-    rulePattern.addAll(baseRule.getPostFillerPattern());
-
-    recursiveGeneralizeRule(baseRule, rulePattern, new TextRulerRulePattern(), result);
-    TextRulerToolkit.log("GENERALIZATIONS: " + result.size());
-
-    for (LP2Rule r : result)
-      removeOutermostWildCardItemsFromRule(r);
-
-    // for (LP2Rule r : result)
-    // {
-    // TextRulerToolkit.log("NEWRULE = "+r.getRuleString());
-    // }
-
-    return result;
-  }
-
-  protected LP2Rule createInitialRuleForPositiveExample(TextRulerExample example) {
-    TextRulerTarget target = example.getTarget();
-    LP2Rule rule = new LP2Rule(this, example.getTarget());
-    CAS docCas = example.getDocumentCAS();
-    TextRulerAnnotation exampleAnnotation = example.getAnnotation();
-    TypeSystem ts = docCas.getTypeSystem();
-    Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
-    int thePosition = target.type == MLTargetType.SINGLE_LEFT_BOUNDARY ? exampleAnnotation
-            .getBegin() : exampleAnnotation.getEnd();
-
-    List<AnnotationFS> leftContext = TextRulerToolkit.getAnnotationsBeforePosition(docCas,
-            thePosition, windowSize,
-            TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-    List<AnnotationFS> rightContext = TextRulerToolkit.getAnnotationsAfterPosition(docCas,
-            thePosition, windowSize,
-            TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-
-    // the left context has to be reversed since we get the arrayList from
-    // the slot's point of view!
-    for (int i = leftContext.size() - 1; i >= 0; i--) {
-      TextRulerAnnotation annot = new TextRulerAnnotation(leftContext.get(i), example.getDocument());
-      LP2RuleItem item = new LP2RuleItem();
-      item.setWordConstraint(annot);
-      if (item.getWordConstraint().isRegExpConstraint())
-        item.addOtherConstraint(new MLLP2OtherConstraint(annot, annot));
-      rule.addPreFillerItem(item);
-    }
-
-    for (AnnotationFS afs : rightContext) {
-      TextRulerAnnotation annot = new TextRulerAnnotation(afs, example.getDocument());
-      LP2RuleItem item = new LP2RuleItem();
-      item.setWordConstraint(annot);
-      if (item.getWordConstraint().isRegExpConstraint())
-        item.addOtherConstraint(new MLLP2OtherConstraint(annot, annot));
-
-      rule.addPostFillerItem(item);
-    }
-    TextRulerToolkit.log("INITIAL RULE: " + rule.getRuleString());
-    return rule;
-  }
-
-  protected void recursiveGeneralizeRule(LP2Rule baseRule, TextRulerRulePattern allItems,
-          TextRulerRulePattern currentPattern, List<LP2Rule> resultList) {
-    if (currentPattern.size() == allItems.size()) {
-      // create new Rule
-      LP2Rule newRule = new LP2Rule(this, baseRule.getTarget());
-      int preCount = baseRule.getPreFillerPattern().size();
-      for (int i = 0; i < currentPattern.size(); i++) {
-        if (i < preCount)
-          newRule.addPreFillerItem(currentPattern.get(i));
-        else
-          newRule.addPostFillerItem(currentPattern.get(i));
-      }
-      // TextRulerToolkit.log("GEN: "+newRule.getRuleString());
-      if (newRule.totalInnerConstraintCount() > 0) // skip the ANY ANY ANY
-        // ANY... rule ! this
-        // makes no sense in no
-        // application!!
-        resultList.add(newRule);
-    } else {
-      int index = currentPattern.size();
-      TextRulerRuleItem baseItem = allItems.get(index);
-      List<TextRulerRuleItem> itemGeneralizations = generalizeRuleItem((LP2RuleItem) baseItem);
-      for (TextRulerRuleItem newItem : itemGeneralizations) {
-        currentPattern.add(newItem);
-        recursiveGeneralizeRule(baseRule, allItems, currentPattern, resultList);
-        currentPattern.remove(currentPattern.size() - 1);
-      }
-    }
-  }
-
-  protected void recursiveGeneralizeRuleItem(LP2RuleItem baseItem,
-          List<MLLP2OtherConstraint> otherConstraints, int currentConstraintIndex,
-          List<MLLP2OtherConstraint> currentConstraintTuple, List<TextRulerRuleItem> result) {
-    if (currentConstraintIndex > otherConstraints.size() - 1) {
-      LP2RuleItem newItem;
-      newItem = new LP2RuleItem();
-      for (MLLP2OtherConstraint c : currentConstraintTuple)
-        newItem.addOtherConstraint(c.copy());
-      result.add(newItem);
-    } else {
-      MLLP2OtherConstraint currentConstraint = otherConstraints.get(currentConstraintIndex);
-      // recurse WITH and WITHOUT this key:
-      recursiveGeneralizeRuleItem(baseItem, otherConstraints, currentConstraintIndex + 1,
-              currentConstraintTuple, result);
-      currentConstraintTuple.add(currentConstraint);
-      recursiveGeneralizeRuleItem(baseItem, otherConstraints, currentConstraintIndex + 1,
-              currentConstraintTuple, result);
-      currentConstraintTuple.remove(currentConstraintTuple.size() - 1);
-    }
-  }
-
-  protected List<TextRulerRuleItem> generalizeRuleItem(LP2RuleItem baseItem) {
-    List<TextRulerRuleItem> result = new ArrayList<TextRulerRuleItem>();
-
-    // one with word constraint
-    if (baseItem.getWordConstraint() != null) {
-      LP2RuleItem newItem = new LP2RuleItem();
-      newItem.setWordConstraint(baseItem.getWordConstraint().copy());
-      result.add(newItem);
-    }
-
-    // all other combinations without word constraint
-    // List<String> keys = new
-    // ArrayList<String>(baseItem.getOtherConstraints().keySet());
-    List<MLLP2OtherConstraint> constraints = baseItem.getOtherConstraints();
-    recursiveGeneralizeRuleItem(baseItem, constraints, 0, new ArrayList<MLLP2OtherConstraint>(),
-            result);
-    return result;
-  }
-
-  protected void removeOutermostWildCardItemsFromRule(LP2Rule rule) {
-    while (true) {
-      LP2RuleItem item = (LP2RuleItem) rule.getOutermostPreFillerItem();
-      if (item == null) // no more items left
-        break;
-
-      // if this rule is a RIGHT BOUNDARY rule, we must not remove the
-      // last remaining pre filler item,
-      // since this is used for marking the SLOT END BOUNDARY (= RIGHT
-      // BOUNDARY)
-      if ((rule.getTarget().type == MLTargetType.SINGLE_RIGHT_BOUNDARY)
-              && (rule.getPreFillerPattern().size() == 1))
-        break;
-
-      if (item.totalConstraintCount() == 0)
-        rule.removeOutermostPreFillerItem();
-      else
-        break;
-    }
-    while (true) {
-      LP2RuleItem item = (LP2RuleItem) rule.getOutermostPostFillerItem();
-      if (item == null) // no more items left
-        break;
-
-      // if this rule is a LEFT BOUNDARY rule, we must not remove the last
-      // remaining post filler item,
-      // since this is used for marking the SLOT START BOUNDARY (= LEFT
-      // BOUNDARY)
-      if ((rule.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-              && (rule.getPostFillerPattern().size() == 1))
-        break;
-
-      if (item.totalConstraintCount() == 0)
-        rule.removeOutermostPostFillerItem();
-      else
-        break;
-    }
-  }
-
-  @Override
-  public boolean collectNegativeCoveredInstancesWhenTesting() {
-    return false;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2Factory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2Factory.java
deleted file mode 100755
index 6719a74..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2Factory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter.MLAlgorithmParamType;
-
-public class NaiveLP2Factory implements TextRulerLearnerFactory {
-
-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,
-          String prePropTMFile, String tempFolderPath, String[] fullSlotTypeNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    return new NaiveLP2(inputFolderPath, prePropTMFile, tempFolderPath, fullSlotTypeNames,
-            filterSet, skip, delegate);
-  }
-
-  public TextRulerLearnerParameter[] getAlgorithmParameters() {
-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[5];
-
-    result[0] = new TextRulerLearnerParameter(BasicLP2.WINDOW_SIZE_KEY,
-            "Context Window Size (to the left and right)", MLAlgorithmParamType.ML_INT_PARAM);
-    result[1] = new TextRulerLearnerParameter(BasicLP2.CURRENT_BEST_RULES_SIZE_KEY,
-            "Best Rules List Size", MLAlgorithmParamType.ML_INT_PARAM);
-    result[2] = new TextRulerLearnerParameter(BasicLP2.MIN_COVERED_POSITIVES_PER_RULE_KEY,
-            "Minimum Covered Positives per Rule", MLAlgorithmParamType.ML_INT_PARAM);
-    result[3] = new TextRulerLearnerParameter(BasicLP2.MAX_ERROR_THRESHOLD_KEY,
-            "Maximum Error Threshold", MLAlgorithmParamType.ML_FLOAT_PARAM);
-    result[4] = new TextRulerLearnerParameter(BasicLP2.CURRENT_CONTEXTUAL_RULES_SIZE_KEY,
-            "Contextual Rules List Size", MLAlgorithmParamType.ML_INT_PARAM);
-
-    return result;
-  }
-
-  public Map<String, Object> getAlgorithmParameterStandardValues() {
-    Map<String, Object> result = new HashMap<String, Object>();
-    result.put(BasicLP2.WINDOW_SIZE_KEY, BasicLP2.STANDARD_WINDOW_SIZE);
-    result.put(BasicLP2.CURRENT_BEST_RULES_SIZE_KEY, BasicLP2.STANDARD_MAX_CURRENT_BEST_RULES_COUNT);
-    result.put(BasicLP2.MIN_COVERED_POSITIVES_PER_RULE_KEY,
-            BasicLP2.STANDARD_MIN_COVERED_POSITIVES_PER_RULE);
-    result.put(BasicLP2.MAX_ERROR_THRESHOLD_KEY, BasicLP2.STANDARD_MAX_ERROR_THRESHOLD);
-    result.put(BasicLP2.CURRENT_CONTEXTUAL_RULES_SIZE_KEY,
-            BasicLP2.STANDARD_MAX_CONTEXTUAL_RULES_COUNT);
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2PreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2PreferencePage.java
deleted file mode 100755
index d89be2d..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/NaiveLP2PreferencePage.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*

- * 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.ruta.textruler.learner.lp2;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class NaiveLP2PreferencePage extends PreferencePage implements IWorkbenchPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.preference.lp2naive";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public NaiveLP2PreferencePage() {

-    TextRulerLearnerController ctrl = TextRulerController

-            .getControllerForID("org.apache.uima.ruta.textruler.lp2naive");

-    this.algorithmController = ctrl;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  @Override

-  protected Control createContents(Composite parent) {

-    Composite top = new Composite(parent, SWT.LEFT);

-    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    top.setLayout(new GridLayout());

-

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_INT_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-    return top;

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2.java
deleted file mode 100755
index 5f7175b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleList;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget.MLTargetType;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2ContextConstraint;
-import org.apache.uima.ruta.textruler.learner.lp2.LP2RuleItem.MLLP2OtherConstraint;
-import org.apache.uima.util.FileUtils;
-
-public class OptimizedLP2 extends BasicLP2 {
-
-  public static final boolean SAVE_DEBUG_INFO_IN_TEMPFOLDER = false;
-
-  private Map<String, TextRulerStatisticsCollector> cachedTestedStartRuleStatistics = new HashMap<String, TextRulerStatisticsCollector>();
-
-  private long cachedTestedStartRuleStatisticsHitCounter = 0;
-
-  public OptimizedLP2(String inputDir, String prePropTMFile, String tmpDir, String[] slotNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super(inputDir, prePropTMFile, tmpDir, slotNames, filterSet, skip, delegate);
-  }
-
-  @Override
-  protected TextRulerRuleList learnTaggingRules(TextRulerTarget target,
-          TextRulerRuleList contextualRules) {
-    cachedTestedStartRuleStatisticsHitCounter = 0;
-    cachedTestedStartRuleStatistics.clear();
-    TextRulerRuleList result = super.learnTaggingRules(target, contextualRules);
-    TextRulerToolkit
-            .log("[OptimizedLP2.learnTaggingRules] saved rule testings due to start rule results cache: "
-                    + cachedTestedStartRuleStatisticsHitCounter);
-    TextRulerToolkit.log("[OptimizedLP2.learnTaggingRules] cacheSize at end of induction: "
-            + cachedTestedStartRuleStatistics.size());
-    cachedTestedStartRuleStatistics.clear();
-    return result;
-  }
-
-  @Override
-  protected void induceRulesFromExample(final TextRulerExample e, final int roundNumber) {
-    // in order to get cache optimized contextual start rules testing, we
-    // simply create
-    // and add the ctxStartRules HERE (not when we want to create a
-    // contextual rule!) to
-    // all startRules, test those startRules + ctxStartRules cacheOptimized
-    // on the trainings-Set
-    // and then have their results in our covering-statistics-cache for
-    // later ctx rules creation!
-    List<LP2Rule> startRules = createStartRulesForExample(e);
-    if (startRules.size() < 1)
-      return;
-    List<LP2Rule> ctxStartRules = new ArrayList<LP2Rule>();
-    // TODO set isCorrectionRuleMode = true ?!
-    if (!(e.getTarget().isLeftCorrection() || e.getTarget().isRightCorrection()))
-      ctxStartRules = createContextStartRulesForStartRule(startRules.get(0));
-    List<LP2Rule> rulesToTest = new ArrayList<LP2Rule>(ctxStartRules.size() + startRules.size());
-    rulesToTest.addAll(startRules);
-    rulesToTest.addAll(ctxStartRules);
-
-    sendStatusUpdateToDelegate(
-            "Round " + roundNumber + " - Testing " + rulesToTest.size() + " start rules... "
-                    + " - uncovered examples: "
-                    + (examples.size() - coveredExamples.size() + " / " + examples.size())
-                    + " cs: " + cachedTestedStartRuleStatistics.size(),
-            TextRulerLearnerState.ML_RUNNING, false);
-    testStartRulesIfNotCached(rulesToTest);
-    if (shouldAbort())
-      return;
-    // int i=0;
-    // for (LP2Rule r : startRules)
-    // {
-    // i++;
-    // sendStatusUpdateToDelegate("Round "+roundNumber+" - Testing start rule "+i+"/"+startRules.size()+
-    // "     - uncovered examples: "+
-    // (examples.size()-coveredExamples.size() + " / "+examples.size())+
-    // "cs:"+cachedTestedStartRuleStatistics.size(),
-    // TextRulerLearnerState.ML_RUNNING, false);
-    // testStartRuleIfNotCached(r);
-    // if (shouldAbort())
-    // return;
-    // if (TextRulerToolkit.DEBUG)
-    // {
-    // if
-    // (!r.getCoveringStatistics().getCoveredPositiveExamples().contains(e))
-    // {
-    // TextRulerToolkit.log("A START RULE MUST (!) COVER ITs POSITIVE EXAMPLE! OTHEREWISE, THERE IS SOMETHING WRONG!!");
-    // }
-    // }
-    // }
-
-    Comparator<LP2Rule> cmp = new Comparator<LP2Rule>() {
-
-      public int compare(LP2Rule o1, LP2Rule o2) {
-        return o1.getCoveringStatistics().getCoveredPositivesCount()
-                - o2.getCoveringStatistics().getCoveredPositivesCount();
-      }
-
-    };
-    // sort from low to high positive coverage in order to higher the
-    // pruning probability while recursion:
-    Collections.sort(startRules, cmp);
-    Collections.sort(ctxStartRules, cmp);
-
-    while ((startRules.size() > 0)
-            && (startRules.get(0).getCoveringStatistics().getCoveredPositivesCount() < minCoveredPositives))
-      startRules.remove(0);
-
-    while ((ctxStartRules.size() > 0)
-            && (ctxStartRules.get(0).getCoveringStatistics().getCoveredPositivesCount() < minCoveredPositives))
-      ctxStartRules.remove(0);
-
-    sendStatusUpdateToDelegate("Round " + roundNumber + " - Creating all generalizations..."
-            + "     - uncovered examples: "
-            + (examples.size() - coveredExamples.size() + " / " + examples.size()),
-            TextRulerLearnerState.ML_RUNNING, false);
-
-    // only for debugging purposes: List<LP2Rule> resultRules = new
-    // ArrayList<LP2Rule>();
-
-    ArrayList<LP2Rule> debugRuleCollector = null;
-
-    if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER) {
-      debugRuleCollector = new ArrayList<LP2Rule>();
-    }
-
-    if (!recursiveCreateAllRuleCombinations(startRules, ctxStartRules, 0, new ArrayList<LP2Rule>(),
-            null, debugRuleCollector))
-      return; // aborted!
-
-    if (TextRulerToolkit.DEBUG && debugRuleCollector != null && SAVE_DEBUG_INFO_IN_TEMPFOLDER) {
-      // TextRulerToolkit.log("all combinations: "+debugRuleCollector.size());
-
-      Collections.sort(debugRuleCollector, new Comparator<LP2Rule>() {
-
-        public int compare(LP2Rule o1, LP2Rule o2) {
-          return o1.getRuleString().compareTo(o2.getRuleString());
-        }
-
-      });
-      String startend = e.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY ? "left_"
-              : "right_";
-      File file = new File(tempDirectory() + startend + "generalizations" + roundNumber
-              + RutaEngine.SCRIPT_FILE_EXTENSION);
-      StringBuffer str = new StringBuffer();
-      for (TextRulerRule rule : debugRuleCollector) {
-        str.append(rule.getCoveringStatistics() + "\t\t" + rule.getRuleString() + "\n");
-      }
-      try {
-        FileUtils.saveString2File(str.toString(), file);
-      } catch (Exception ex) {
-        TextRulerPlugin.error(ex);
-      }
-      // TextRulerToolkit.log("----");
-    }
-  }
-
-  protected void testStartRulesIfNotCached(List<LP2Rule> startRules) {
-    List<TextRulerRule> rulesToTest = new ArrayList<TextRulerRule>();
-
-    for (LP2Rule r : startRules) {
-      String key = r.getRuleString();
-      if (cachedTestedStartRuleStatistics.containsKey(key)) {
-        r.setCoveringStatistics(cachedTestedStartRuleStatistics.get(key).copy());
-        cachedTestedStartRuleStatisticsHitCounter++;
-      } else
-        rulesToTest.add(r);
-    }
-
-    if (rulesToTest.size() > 0) {
-      testRulesOnDocumentSet(rulesToTest, exampleDocuments);
-      if (shouldAbort())
-        return;
-      for (TextRulerRule r : rulesToTest) {
-        String key = r.getRuleString();
-        cachedTestedStartRuleStatistics.put(key, r.getCoveringStatistics().copy());
-      }
-    }
-  }
-
-  protected LP2Rule combineRulesToOneRule(List<LP2Rule> ruleList,
-          TextRulerStatisticsCollector covering) {
-    // TextRulerToolkit.log("----------------------------------------------");
-    // for (LP2Rule r : ruleList)
-    // TextRulerToolkit.log(r+" ; "+r.getCoveringStatistics());
-
-    LP2Rule rule = new LP2Rule(this, ruleList.get(0).getTarget());
-
-    int maxPreCount = 0;
-    int maxPostCount = 0;
-    for (LP2Rule r : ruleList) {
-      if (r.getPreFillerPattern().size() > maxPreCount)
-        maxPreCount = r.getPreFillerPattern().size();
-      if (r.getPostFillerPattern().size() > maxPostCount)
-        maxPostCount = r.getPostFillerPattern().size();
-    }
-
-    for (int i = 0; i < maxPreCount; i++) {
-      LP2RuleItem newItem = new LP2RuleItem();
-      for (LP2Rule r : ruleList)
-        if (i < r.getPreFillerPattern().size()) {
-          LP2RuleItem rItem = (LP2RuleItem) r.getPreFillerPattern().get(
-                  r.getPreFillerPattern().size() - i - 1);
-          if (rItem.getWordConstraint() != null)
-            newItem.setWordConstraint(rItem.getWordConstraint().copy());
-          if (rItem.getContextConstraint() != null)
-            newItem.setContextConstraint(rItem.getContextConstraint().copy());
-          // for (String key : rItem.getOtherConstraints().keySet())
-          // newItem.setOtherConstraint(key,
-          // rItem.getOtherConstraints().get(key).copy());
-          for (MLLP2OtherConstraint c : rItem.getOtherConstraints())
-            newItem.addOtherConstraint(c.copy());
-
-        }
-      rule.addPreFillerItem(newItem);
-    }
-
-    for (int i = 0; i < maxPostCount; i++) {
-      LP2RuleItem newItem = new LP2RuleItem();
-      for (LP2Rule r : ruleList)
-        if (i < r.getPostFillerPattern().size()) {
-          LP2RuleItem rItem = (LP2RuleItem) r.getPostFillerPattern().get(i);
-          if (rItem.getWordConstraint() != null)
-            newItem.setWordConstraint(rItem.getWordConstraint().copy());
-          if (rItem.getContextConstraint() != null)
-            newItem.setContextConstraint(rItem.getContextConstraint().copy());
-          // for (String key : rItem.getOtherConstraints().keySet())
-          // newItem.setOtherConstraint(key,
-          // rItem.getOtherConstraints().get(key).copy());
-          for (MLLP2OtherConstraint c : rItem.getOtherConstraints())
-            newItem.addOtherConstraint(c.copy());
-        }
-      rule.addPostFillerItem(newItem);
-    }
-
-    rule.setCoveringStatistics(covering.copy());
-
-    return rule;
-  }
-
-  protected boolean recursiveCreateAllRuleCombinations(final List<LP2Rule> startRules,
-          final List<LP2Rule> ctxStartRules, final int index, final List<LP2Rule> currentRuleTuple,
-          final TextRulerStatisticsCollector currentCovering, final List<LP2Rule> debugRuleCollector) {
-    if (index > startRules.size() - 1) {
-      if (shouldAbort())
-        return false;
-      if (currentRuleTuple.size() > 0) {
-        LP2Rule newRule = createAndCheckRuleFromStartRules(currentRuleTuple, currentCovering,
-                ctxStartRules);
-        if (debugRuleCollector != null)
-          debugRuleCollector.add(newRule);
-      }
-    } else {
-      // recurse WITHOUT and WITH this start rule:
-      if (!recursiveCreateAllRuleCombinations(startRules, ctxStartRules, index + 1,
-              currentRuleTuple, currentCovering, debugRuleCollector))
-        return false;
-
-      // only recurse WITH this rule, if the constraint it adds does
-      // really create a new rule!
-      // if a word constraint of the same item is already present, we do
-      // not need to add any other constraint of that
-      // token, since it does not make sense to add more constraints to
-      // the obviously most specific rule !
-
-      LP2Rule candidateRule = startRules.get(index);
-      boolean isPre = candidateRule.isPreFillerStartRule();
-      boolean containsWordConstraint = false;
-      for (LP2Rule r : currentRuleTuple)
-        if (r.isPreFillerStartRule() == isPre) {
-          if (isPre)
-            containsWordConstraint = r.getPreFillerPattern().size() == candidateRule
-                    .getPreFillerPattern().size();
-          else
-            containsWordConstraint = r.getPostFillerPattern().size() == candidateRule
-                    .getPostFillerPattern().size();
-          if (containsWordConstraint)
-            break;
-        }
-      if (!containsWordConstraint) {
-        // and calculate intersection of coverings:
-        TextRulerStatisticsCollector newCovering;
-        if (currentCovering != null)
-          newCovering = getCoveringIntersection(currentCovering,
-                  candidateRule.getCoveringStatistics());
-        else
-          newCovering = candidateRule.getCoveringStatistics();
-
-        // prune all rules that go below our minCoveredPositives
-        // threshold!
-        if (newCovering.getCoveredPositivesCount() >= minCoveredPositives) {
-          // add rule to configuration tuple
-          currentRuleTuple.add(candidateRule);
-
-          if (!recursiveCreateAllRuleCombinations(startRules, ctxStartRules, index + 1,
-                  currentRuleTuple, newCovering, debugRuleCollector))
-            return false;
-          currentRuleTuple.remove(currentRuleTuple.size() - 1);
-        }
-      }
-    }
-    return true;
-  }
-
-  protected TextRulerStatisticsCollector getCoveringIntersection(
-          final TextRulerStatisticsCollector c1, final TextRulerStatisticsCollector c2) {
-    // calculate intersections of coverings:
-    TextRulerStatisticsCollector resultC = new TextRulerStatisticsCollector(c1);
-
-    resultC.getCoveredPositiveExamples().retainAll(c2.getCoveredPositiveExamples());
-    resultC.getCoveredNegativeExamples().retainAll(c2.getCoveredNegativeExamples());
-    resultC.reflectCountsFromCoveredExamples();
-
-    return resultC;
-  }
-
-  protected LP2Rule createAndCheckRuleFromStartRules(final List<LP2Rule> startRules,
-          final TextRulerStatisticsCollector covering, final List<LP2Rule> ctxStartRules) {
-    LP2Rule newRule = combineRulesToOneRule(startRules, covering);
-    // TextRulerToolkit.log("COMBINED RULE: "+newRule.getRuleString()+" ; "+newRule.getCoveringStatistics());
-    boolean tooFewPositives = newRule.getCoveringStatistics().getCoveredPositivesCount() < minCoveredPositives;
-    boolean tooManyErrors = newRule.getErrorRate() > maxErrorThreshold;
-    boolean isBestRule = !(tooFewPositives || tooManyErrors);
-
-    if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
-      TextRulerToolkit.appendStringToFile(tempDirectory() + "bestcandidates"
-              + RutaEngine.SCRIPT_FILE_EXTENSION, newRule.getRuleString() + "\n");
-
-    if (isBestRule) {
-      currentBestRules.add(newRule);
-      currentBestRules.removeSubsumedRules();
-      currentBestRules.cutToMaxSize();
-    } else if (!tooFewPositives && (ctxStartRules.size() > 0)) {
-      // new: use precalculated ctx startrules:
-      for (LP2Rule ctxStartRule : ctxStartRules) {
-
-        MLLP2ContextConstraint ctxConstraint = ctxStartRule.getMarkingRuleItem()
-                .getContextConstraint();
-        LP2Rule newCTXRule = newRule.copy();
-        newCTXRule.setIsContextualRule(true);
-        newCTXRule.getMarkingRuleItem().setContextConstraint(ctxConstraint.copy());
-        newCTXRule.setNeedsCompile(true);
-        newCTXRule.compileRuleString();
-        newCTXRule.setCoveringStatistics(getCoveringIntersection(newRule.getCoveringStatistics(),
-                ctxStartRule.getCoveringStatistics()));
-        // if
-        // (newCTXRule.getCoveringStatistics().getCoveredPositivesCount()
-        // < 1)
-        // {
-        // TextRulerToolkit.log("ERROR!");
-        // }
-
-        boolean ctxTooFewPositives = newCTXRule.getCoveringStatistics().getCoveredPositivesCount() < minCoveredPositives;
-        boolean ctxTooManyErrors = newCTXRule.getErrorRate() > maxErrorThreshold;
-        boolean isGoodCTXRule = !(ctxTooFewPositives || ctxTooManyErrors);
-        // TextRulerToolkit.log("CTXRULE :  "+newCTXRule.getRuleString()
-        // + " ; "+newCTXRule.getCoveringStatistics());
-
-        if (TextRulerToolkit.DEBUG && SAVE_DEBUG_INFO_IN_TEMPFOLDER)
-          TextRulerToolkit.appendStringToFile(tempDirectory() + "ctxcandidates"
-                  + RutaEngine.SCRIPT_FILE_EXTENSION, newCTXRule.getRuleString() + "\n");
-
-        if (isGoodCTXRule) {
-          currentContextualRules.add(newCTXRule);
-          currentContextualRules.removeSubsumedRules();
-          currentContextualRules.cutToMaxSize();
-        }
-      }
-    }
-
-    return newRule;
-  }
-
-  protected LP2Rule createStartRuleForConstraint(final TextRulerTarget target,
-          final int contextSize, final boolean isLeftContext, final LP2RuleItem constraintItem) {
-    LP2Rule newRule = new LP2Rule(this, target);
-
-    // add contextSize-1 ANY items
-    for (int j = 0; j < contextSize - 1; j++)
-      if (isLeftContext)
-        newRule.addPreFillerItem(new LP2RuleItem());
-      else
-        newRule.addPostFillerItem(new LP2RuleItem());
-
-    // add 1 constraint item:
-    if (isLeftContext)
-      newRule.addPreFillerItem(constraintItem);
-    else
-      newRule.addPostFillerItem(constraintItem);
-
-    // if we are building the left context start rules for LEFT BOUNDARIES,
-    // we need at least ONE
-    // empty ANY item as the marking item:
-    if (isLeftContext
-            && (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY || target.type == MLTargetType.SINGLE_LEFT_CORRECTION))
-      newRule.addPostFillerItem(new LP2RuleItem());
-    // otherwise, if we build the right context rules for RIGHT BOUNDARY
-    // RULES, we need at least ONE
-    // empty ANY item on the LEFT as the marking item:
-    else if (!isLeftContext
-            && (target.type == MLTargetType.SINGLE_RIGHT_BOUNDARY || target.type == MLTargetType.SINGLE_RIGHT_CORRECTION))
-      newRule.addPreFillerItem(new LP2RuleItem());
-
-    newRule.setIsPreFillerStartRule(isLeftContext);
-    // if (isLeftContext)
-    // newRule.setStartRuleItemIndex(0);
-    // else
-    // newRule.setStartRuleItemIndex(newRule.getPreFillerPattern().size()+newRule.getPostFillerPattern().size()-1);
-    return newRule;
-  }
-
-  protected List<LP2Rule> createContextStartRulesForStartRule(final LP2Rule aStartRule) {
-    List<LP2Rule> result = new ArrayList<LP2Rule>();
-
-    // TODO make all other tags contextual tags here. for now we take only
-    // the counterpart
-    // tag of the current learning process: (opening/closing tags)
-
-    LP2RuleItem ctxItem = new LP2RuleItem();
-    MLLP2ContextConstraint ctxConstraint = new MLLP2ContextConstraint(
-            slotMaximumTokenCountMap.get(aStartRule.getTarget().getSingleSlotRawTypeName()),
-            aStartRule);
-    ctxItem.setContextConstraint(ctxConstraint);
-    LP2Rule ctxStartRule = new LP2Rule(this, aStartRule.getTarget());
-    ctxStartRule.setIsContextualRule(true);
-    if (aStartRule.getTarget().type == MLTargetType.SINGLE_LEFT_BOUNDARY)
-      ctxStartRule.addPostFillerItem(ctxItem);
-    else
-      ctxStartRule.addPreFillerItem(ctxItem);
-    result.add(ctxStartRule);
-    return result;
-  }
-
-  protected List<LP2Rule> createStartRulesForExample(final TextRulerExample example) {
-    TextRulerTarget target = example.getTarget();
-    List<LP2Rule> result = new ArrayList<LP2Rule>();
-    CAS docCas = example.getDocumentCAS();
-    TextRulerAnnotation exampleAnnotation = example.getAnnotation();
-    TypeSystem ts = docCas.getTypeSystem();
-    Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
-
-    boolean isLeftBoundary = (target.type == MLTargetType.SINGLE_LEFT_BOUNDARY || target.type == MLTargetType.SINGLE_LEFT_CORRECTION);
-    int thePosition = isLeftBoundary ? exampleAnnotation.getBegin() : exampleAnnotation.getEnd();
-    List<AnnotationFS> leftContext = TextRulerToolkit.getAnnotationsBeforePosition(docCas,
-            thePosition, windowSize,
-            TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-
-    List<AnnotationFS> rightContext;
-    if (target.type == MLTargetType.SINGLE_LEFT_CORRECTION
-            || target.type == MLTargetType.SINGLE_RIGHT_CORRECTION) {
-      rightContext = TextRulerToolkit.getAnnotationsAfterPosition(docCas, thePosition,
-              windowSize + 1, TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet),
-              tokensRootType);
-      rightContext.remove(0);
-    } else {
-      rightContext = TextRulerToolkit.getAnnotationsAfterPosition(docCas, thePosition, windowSize,
-              TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-    }
-
-    int totalCount = leftContext.size() + rightContext.size();
-
-    // LEFT CONTEXT (PRE FILLER PATTERN)
-    // result.add(createStartRuleForConstraint(example, 0, true, null));
-
-    for (int index = 0; index < totalCount; index++) {
-      boolean isPre = index < leftContext.size();
-      int prePostIndex = isPre ? index : index - leftContext.size();
-      AnnotationFS tokenAFS = isPre ? leftContext.get(leftContext.size() - 1 - prePostIndex)
-              : rightContext.get(prePostIndex);
-      TextRulerAnnotation tokenAnnotation = new TextRulerAnnotation(tokenAFS, example.getDocument());
-      LP2RuleItem wordItem = new LP2RuleItem();
-
-      // one rule with only the word constraint:
-      wordItem.setWordConstraint(tokenAnnotation);
-      result.add(createStartRuleForConstraint(example.getTarget(), prePostIndex + 1, isPre,
-              wordItem));
-
-      if (wordItem.getWordConstraint().isRegExpConstraint()) {
-        LP2RuleItem basicItem = new LP2RuleItem();
-        // basicItem.setOtherConstraint("basicTM", new
-        // MLLP2OtherConstraint(tokenAnnotation, tokenAnnotation));
-        basicItem.addOtherConstraint(new MLLP2OtherConstraint(tokenAnnotation, tokenAnnotation));
-        result.add(createStartRuleForConstraint(example.getTarget(), prePostIndex + 1, isPre,
-                basicItem));
-      }
-
-      // // POS-Tags created by our test hmm tagger.
-      // Type posTagsRootType = ts.getType("org.apache.uima.ml.ML.postag");
-      // if (posTagsRootType != null)
-      // {
-      // List<AnnotationFS> posTagAnnotations =
-      // TextRulerToolkit.getAnnotationsWithinBounds(example.getDocumentCAS(),
-      // tokenAnnotation.getBegin(), tokenAnnotation.getEnd(), null,
-      // posTagsRootType);
-      // if (posTagAnnotations.size()>0)
-      // {
-      // if (TextRulerToolkit.DEBUG && posTagAnnotations.size()>1)
-      // {
-      // TextRulerToolkit.logIfDebug("HOW CAN ONE TOKEN HAVE MORE THAN ONE POS TAG ?? "+tokenAnnotation.getBegin()+":"+tokenAnnotation.getEnd()+"="+tokenAnnotation.getCoveredText());
-      // for (AnnotationFS afs : posTagAnnotations)
-      // {
-      // System.out.print(afs.getType().getShortName()+":"+afs.getCoveredText()+" "+afs.getBegin()+":"+afs.getEnd()+"\n");
-      // }
-      // TextRulerToolkit.logIfDebug("");
-      // }
-      //
-      // TextRulerAnnotation posTagAnnotation = new
-      // TextRulerAnnotation(posTagAnnotations.get(0),
-      // example.getDocument());
-      // LP2RuleItem basicItem = new LP2RuleItem();
-      // basicItem.setOtherConstraint("postag", new
-      // MLLP2OtherConstraint(posTagAnnotation, posTagAnnotation));
-      // result.add(createStartRuleForConstraint(example.getTarget(),
-      // prePostIndex+1, isPre, basicItem));
-      // }
-      // }
-
-      // new dynamic system: grab everything we get from the annotation
-      // index that lies over this token:
-      // (annotations WITHIN (with smaller bounds than the token itself)
-      // are ignored for now! we could
-      // add using them with the CONTAINS constraint. but our
-      // MLLP2OtherConstraint is not yet capable of this!
-
-      List<AnnotationFS> featureAnnotations = TextRulerToolkit.getOtherAnnotationsOverToken(docCas,
-              tokenAFS, filterSetWithSlotNames);
-      if (TextRulerToolkit.DEBUG && featureAnnotations.size() > 1) {
-        TextRulerToolkit.log("FOUND MORE THAN ONE EXTRA TOKEN FEATURE ANNOTATION !");
-        for (AnnotationFS featA : featureAnnotations)
-          TextRulerToolkit.log(featA.toString());
-        TextRulerToolkit.log("--------------------------------");
-      }
-      for (AnnotationFS featA : featureAnnotations) {
-        TextRulerAnnotation featureAnnot = new TextRulerAnnotation(featA, example.getDocument());
-        LP2RuleItem basicItem = new LP2RuleItem();
-        basicItem.addOtherConstraint(new MLLP2OtherConstraint(tokenAnnotation, featureAnnot));
-        result.add(createStartRuleForConstraint(example.getTarget(), prePostIndex + 1, isPre,
-                basicItem));
-      }
-
-    }
-
-    // for (TextRulerRule r : result)
-    // {
-    // TextRulerToolkit.log("STARTRULE = "+r.getRuleString());
-    // }
-
-    return result;
-  }
-
-  @Override
-  public boolean collectNegativeCoveredInstancesWhenTesting() {
-    return true;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2Factory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2Factory.java
deleted file mode 100755
index c8bc2e0..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2Factory.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.ruta.textruler.learner.lp2;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter.MLAlgorithmParamType;
-
-public class OptimizedLP2Factory implements TextRulerLearnerFactory {
-
-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,
-          String prePropTMFile, String tempFolderPath, String[] fullSlotTypeNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    return new OptimizedLP2(inputFolderPath, prePropTMFile, tempFolderPath, fullSlotTypeNames,
-            filterSet,skip, delegate);
-  }
-
-  public TextRulerLearnerParameter[] getAlgorithmParameters() {
-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[5];
-
-    result[0] = new TextRulerLearnerParameter(BasicLP2.WINDOW_SIZE_KEY,
-            "Context Window Size (to the left and right)", MLAlgorithmParamType.ML_INT_PARAM);
-    result[1] = new TextRulerLearnerParameter(BasicLP2.CURRENT_BEST_RULES_SIZE_KEY,
-            "Best Rules List Size", MLAlgorithmParamType.ML_INT_PARAM);
-    result[2] = new TextRulerLearnerParameter(BasicLP2.MIN_COVERED_POSITIVES_PER_RULE_KEY,
-            "Minimum Covered Positives per Rule", MLAlgorithmParamType.ML_INT_PARAM);
-    result[3] = new TextRulerLearnerParameter(BasicLP2.MAX_ERROR_THRESHOLD_KEY,
-            "Maximum Error Threshold", MLAlgorithmParamType.ML_FLOAT_PARAM);
-    result[4] = new TextRulerLearnerParameter(BasicLP2.CURRENT_CONTEXTUAL_RULES_SIZE_KEY,
-            "Contextual Rules List Size", MLAlgorithmParamType.ML_INT_PARAM);
-
-    return result;
-  }
-
-  public Map<String, Object> getAlgorithmParameterStandardValues() {
-    Map<String, Object> result = new HashMap<String, Object>();
-    result.put(BasicLP2.WINDOW_SIZE_KEY, BasicLP2.STANDARD_WINDOW_SIZE);
-    result
-            .put(BasicLP2.CURRENT_BEST_RULES_SIZE_KEY,
-                    BasicLP2.STANDARD_MAX_CURRENT_BEST_RULES_COUNT);
-    result.put(BasicLP2.MIN_COVERED_POSITIVES_PER_RULE_KEY,
-            BasicLP2.STANDARD_MIN_COVERED_POSITIVES_PER_RULE);
-    result.put(BasicLP2.MAX_ERROR_THRESHOLD_KEY, BasicLP2.STANDARD_MAX_ERROR_THRESHOLD);
-    result.put(BasicLP2.CURRENT_CONTEXTUAL_RULES_SIZE_KEY,
-            BasicLP2.STANDARD_MAX_CONTEXTUAL_RULES_COUNT);
-    return result;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2PreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2PreferencePage.java
deleted file mode 100755
index c61ce8e..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/lp2/OptimizedLP2PreferencePage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.textruler.learner.lp2;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class OptimizedLP2PreferencePage extends PreferencePage implements IWorkbenchPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.preference.lp2opt";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public OptimizedLP2PreferencePage() {

-    TextRulerLearnerController ctrl = TextRulerController

-            .getControllerForID("org.apache.uima.ruta.textruler.lp2opt");

-    this.algorithmController = ctrl;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  @Override

-  protected Control createContents(Composite parent) {

-    Composite top = new Composite(parent, SWT.LEFT);

-    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    top.setLayout(new GridLayout());

-

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_INT_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-    return top;

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/Rapier.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/Rapier.java
deleted file mode 100755
index 6893b01..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/Rapier.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleList;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-
-public class Rapier extends TextRulerBasicLearner {
-
-  public final static String COMPRESSION_FAIL_MAX_COUNT_KEY = "compressionFailMaxCount";
-
-  public final static String RULELIST_SIZE_KEY = "ruleListSize";
-
-  public final static String PAIR_COUNT_KEY = "pairCount";
-
-  public final static String LIM_NO_IMPROVEMENTS_KEY = "limNoImprovements";
-
-  public final static String NOISE_THESHOLD_KEY = "noiseThreshold";
-
-  public final static String POSTAG_ROOTTYPE_KEY = "posTagRootType";
-
-  public final static String MIN_COVERED_POSITIVES_KEY = "minCoveredPositives";
-
-  public final static String USE_ALL_GENSETS_AT_SPECIALIZATION_KEY = "useAllGenSetsAtSpecialization";
-
-  public final static int STANDARD_COMPRESSION_FAIL_MAX_COUNT = 3;
-
-  public final static int STANDARD_RULELIST_SIZE = 50;
-
-  public final static int STANDARD_PAIR_COUNT = 4;
-
-  public final static int STANDARD_LIM_NO_IMPROVEMENTS = 3;
-
-  public final static float STANDARD_NOISE_THREHSOLD = 0.9f;
-
-  public final static String STANDARD_POSTAG_ROOTTYPE = "org.apache.uima.ml.ML.postag";
-
-  public final static int STANDARD_MIN_COVERED_POSITIVES = 1;
-
-  public final static boolean STANDARD_USE_ALL_GENSETS_AT_SPECIALIZATION = true;
-
-  private int compressionFailMaxCount = STANDARD_COMPRESSION_FAIL_MAX_COUNT;
-
-  private int ruleListSize = STANDARD_RULELIST_SIZE;
-
-  private int pairCount = STANDARD_PAIR_COUNT;
-
-  private int limNoImprovements = STANDARD_LIM_NO_IMPROVEMENTS;
-
-  private float noiseThreshold = STANDARD_NOISE_THREHSOLD;
-
-  private String posTagRootTypeName = STANDARD_POSTAG_ROOTTYPE;
-
-  private int minCoveredPositives = STANDARD_MIN_COVERED_POSITIVES;
-
-  private boolean useAllGenSetsAtSpecialization = STANDARD_USE_ALL_GENSETS_AT_SPECIALIZATION;
-
-  private Map<String, TextRulerStatisticsCollector> cachedTestedRuleStatistics = new HashMap<String, TextRulerStatisticsCollector>();
-
-  private int initialRuleBaseSize;
-
-  private List<TextRulerExample> examples;
-
-  private TextRulerRuleList slotRules;
-
-  private RapierRulePriorityQueue ruleList;
-
-  private String currentSlotName;
-
-  public Rapier(String inputDir, String prePropTMFile, String tmpDir, String[] slotNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super(inputDir, prePropTMFile, tmpDir, slotNames, filterSet, skip, delegate);
-  }
-
-  @Override
-  protected void doRun() {
-    for (int i = 0; i < slotNames.length; i++) {
-      int compressionFailCount = 0;
-
-      // only working for one slot yet !
-      currentSlotName = slotNames[i];
-      cachedTestedRuleStatistics.clear();
-      exampleDocuments.createExamplesForTarget(new TextRulerTarget(currentSlotName, this));
-      examples = exampleDocuments.getAllPositiveExamples();
-
-      if (shouldAbort())
-        return;
-
-      slotRules = new TextRulerRuleList();
-      ruleList = new RapierRulePriorityQueue(ruleListSize);
-
-      TextRulerToolkit.log("--- RAPIER START for Slot " + currentSlotName);
-
-      sendStatusUpdateToDelegate("Creating initial rule base...",
-              TextRulerLearnerState.ML_INITIALIZING, false);
-
-      fillSlotRulesWithMostSpecificRules();
-
-      updateCompressionStatusString();
-
-      if (TextRulerToolkit.DEBUG) {
-        slotRules.saveToRulesFile(getIntermediateRulesFileName(), getFileHeaderString(true));
-      }
-
-      while (compressionFailCount < compressionFailMaxCount) {
-        TextRulerToolkit.log("***** NEW COMPRESSION ROUND; FailCount = " + compressionFailCount);
-        if (shouldAbort()) {
-          return;
-        }
-
-        RapierRule bestRule = findNewRule();
-        if (bestRule != null
-                && (bestRule.getCoveringStatistics().getCoveredPositivesCount() >= minCoveredPositives)
-                && (bestRule.noiseValue() >= noiseThreshold) && (!slotRules.contains(bestRule))) {
-          addRuleAndRemoveEmpiricallySubsumedRules(bestRule);
-          if (TextRulerToolkit.DEBUG)
-            slotRules.saveToRulesFile(getIntermediateRulesFileName(), getFileHeaderString(true));
-        } else {
-          compressionFailCount++;
-        }
-      }
-
-      if (TextRulerToolkit.DEBUG) {
-        slotRules.saveToRulesFile(getIntermediateRulesFileName(), getFileHeaderString(true));
-      }
-    }
-
-    sendStatusUpdateToDelegate("Done", TextRulerLearnerState.ML_DONE, true);
-    cachedTestedRuleStatistics.clear();
-    TextRulerToolkit.log("--- RAPIER END");
-
-  }
-
-  private void updateCompressionStatusString() {
-    double percent = Math.round((slotRules.size() / (double) initialRuleBaseSize) * 100.0);
-    sendStatusUpdateToDelegate("Compressing... (Rules = " + slotRules.size() + "/"
-            + initialRuleBaseSize + "  = " + percent + " % ratio)",
-            TextRulerLearnerState.ML_RUNNING, true);
-    // TODO also show round numbers and compression fail count and such
-    // things!
-  }
-
-  private void addAvailablePosTagConstraintToItem(RapierRuleItem item,
-          AnnotationFS tokenAnnotation, TextRulerExample example) {
-
-    if (posTagRootTypeName != null && posTagRootTypeName.length() > 0) {
-      CAS cas = example.getDocumentCAS();
-      TypeSystem ts = cas.getTypeSystem();
-      Type posTagsRootType = ts.getType(posTagRootTypeName);
-      if (ts != null) {
-        List<AnnotationFS> posTagAnnotations = TextRulerToolkit.getAnnotationsWithinBounds(cas,
-                tokenAnnotation.getBegin(), tokenAnnotation.getEnd(), null, posTagsRootType);
-        if (posTagAnnotations.size() > 0) {
-          AnnotationFS posTag = posTagAnnotations.get(0);
-          if (posTag.getBegin() == tokenAnnotation.getBegin()
-                  && posTag.getEnd() == tokenAnnotation.getEnd())
-            item.addTagConstraint(posTag.getType().getShortName());
-        }
-      }
-    }
-  }
-
-  private void fillSlotRulesWithMostSpecificRules() {
-    slotRules.clear();
-    for (TextRulerExample example : examples) {
-      RapierRule rule = new RapierRule(this, example.getTarget());
-      TextRulerAnnotation slotAnnotation = example.getAnnotation();
-      CAS docCas = example.getDocumentCAS();
-      TypeSystem ts = docCas.getTypeSystem();
-      Type tokensRootType = ts.getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
-
-      // first, get all words/tokens:
-      List<AnnotationFS> before = TextRulerToolkit.getAnnotationsBeforePosition(
-              example.getDocumentCAS(), slotAnnotation.getBegin(), -1,
-              TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-      List<AnnotationFS> after = TextRulerToolkit.getAnnotationsAfterPosition(
-              example.getDocumentCAS(), slotAnnotation.getEnd(), -1,
-              TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-      List<AnnotationFS> inside = TextRulerToolkit.getAnnotationsWithinBounds(
-              example.getDocumentCAS(), slotAnnotation.getBegin(), slotAnnotation.getEnd(),
-              TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokensRootType);
-
-      // the before annotations have to be reversed:
-      for (int i = before.size() - 1; i >= 0; i--) {
-        AnnotationFS afs = before.get(i);
-        RapierRuleItem ruleItem = new RapierRuleItem();
-        ruleItem.addWordConstraint(new TextRulerWordConstraint(new TextRulerAnnotation(afs, example
-                .getDocument())));
-        addAvailablePosTagConstraintToItem(ruleItem, afs, example);
-        rule.addPreFillerItem(ruleItem);
-      }
-
-      for (AnnotationFS afs : inside) {
-        RapierRuleItem ruleItem = new RapierRuleItem();
-        ruleItem.addWordConstraint(new TextRulerWordConstraint(new TextRulerAnnotation(afs, example
-                .getDocument())));
-        addAvailablePosTagConstraintToItem(ruleItem, afs, example);
-        rule.addFillerItem(ruleItem);
-      }
-      for (AnnotationFS afs : after) {
-        RapierRuleItem ruleItem = new RapierRuleItem();
-        ruleItem.addWordConstraint(new TextRulerWordConstraint(new TextRulerAnnotation(afs, example
-                .getDocument())));
-        addAvailablePosTagConstraintToItem(ruleItem, afs, example);
-        rule.addPostFillerItem(ruleItem);
-      }
-
-      // TextRulerToolkit.log("RULE: "+rule.getRuleString());
-      // testRuleOnTrainingsSet(rule, exampleDocuments.getDocuments());
-
-      // this rule has to at least cover its seed example!!
-      TextRulerStatisticsCollector c = new TextRulerStatisticsCollector();
-      c.addCoveredPositive(example);
-      rule.setCoveringStatistics(c);
-      slotRules.add(rule);
-    }
-    initialRuleBaseSize = slotRules.size();
-  }
-
-  protected void addRuleAndRemoveEmpiricallySubsumedRules(RapierRule rule) {
-    if (!slotRules.contains(rule)) {
-      List<TextRulerRule> rulesToRemove = new ArrayList<TextRulerRule>();
-      Set<TextRulerExample> coveredExamples = rule.getCoveringStatistics()
-              .getCoveredPositiveExamples();
-      for (TextRulerRule r : slotRules) {
-        if (coveredExamples.containsAll(r.getCoveringStatistics().getCoveredPositiveExamples()))
-          rulesToRemove.add(r);
-      }
-      for (TextRulerRule removeR : rulesToRemove)
-        slotRules.remove(removeR);
-      slotRules.add(rule);
-      updateCompressionStatusString();
-    }
-  }
-
-  protected RapierRule findNewRule() {
-    Random rand = new Random(System.currentTimeMillis());
-
-    Set<RapierRule> generalizations = new HashSet<RapierRule>();
-    // 0. initialization
-    ruleList.clear();
-
-    if (slotRules.size() <= 1)
-      return null;
-
-    List<RapierRule> uncompressedRules = new ArrayList<RapierRule>();
-    for (TextRulerRule r : slotRules) {
-      if (((RapierRule) r).isInitialRule())
-        uncompressedRules.add((RapierRule) r);
-    }
-
-    // 1. get generalizations of the two slot filler patterns:
-
-    // create pairs and prefer still uncompressed rules when choosing
-    // "randomly":
-    int pairsLeft = pairCount;
-    if (uncompressedRules.size() == 1) {
-      RapierRule rule1 = uncompressedRules.get(0);
-      RapierRule rule2 = null;
-      while (rule2 == null || rule1 == rule2) {
-        rule2 = (RapierRule) slotRules.get(rand.nextInt(slotRules.size()));
-      }
-      generalizations.addAll(getFillerGeneralizationsForRulePair(rule1, rule2));
-      if (shouldAbort())
-        return null;
-      pairsLeft--;
-    } else if (uncompressedRules.size() == 2) {
-      RapierRule rule1 = uncompressedRules.get(0);
-      RapierRule rule2 = uncompressedRules.get(1);
-      generalizations.addAll(getFillerGeneralizationsForRulePair(rule1, rule2));
-      if (shouldAbort())
-        return null;
-      pairsLeft--;
-    } else if (uncompressedRules.size() > 2) {
-      int uPairCount = pairCount;
-      if (uPairCount > uncompressedRules.size())
-        uPairCount /= 2;
-      for (int i = 0; i < uPairCount; i++) {
-        RapierRule rule1 = uncompressedRules.get(rand.nextInt(uncompressedRules.size()));
-        RapierRule rule2 = null;
-        while (rule2 == null || rule1 == rule2) {
-          rule2 = uncompressedRules.get(rand.nextInt(uncompressedRules.size()));
-        }
-        generalizations.addAll(getFillerGeneralizationsForRulePair(rule1, rule2));
-        pairsLeft--;
-      }
-    }
-
-    for (int i = 0; i < pairsLeft; i++) {
-      // TODO optimize !! don't call the machinery with the same rule pair
-      // two times in one session !!!
-      // randomly pick two rules:
-      RapierRule rule1 = (RapierRule) slotRules.get(rand.nextInt(slotRules.size()));
-      RapierRule rule2 = null;
-      while (rule2 == null || rule1 == rule2) {
-        rule2 = (RapierRule) slotRules.get(rand.nextInt(slotRules.size()));
-      }
-      generalizations.addAll(getFillerGeneralizationsForRulePair(rule1, rule2));
-
-      if (shouldAbort())
-        return null;
-    }
-
-    // if (TextRulerToolkit.DEBUG)
-    // {
-    // TextRulerToolkit.log("Rule Generalizations created: " +
-    // generalizations.size());
-    // for (RapierRule newRule : generalizations)
-    // TextRulerToolkit.log("Rule = "+newRule.getRuleString());
-    // }
-
-    // 2. evaluate an enque to priority list:
-    List<RapierRule> testRules = new ArrayList<RapierRule>(generalizations);
-
-    for (RapierRule r : testRules) {
-      r.combineSenselessPatternListItems();
-    }
-
-    testRulesIfNotCached(testRules);
-    if (shouldAbort())
-      return null;
-
-    for (RapierRule newRule : generalizations) {
-      if (TextRulerToolkit.DEBUG) {
-        if (!RapierDebugHelper.debugCheckIfRuleCoversItsSeedRuleCoverings(newRule)) {
-          TextRulerToolkit
-                  .log("------------------------------------------------------------------------------------------");
-          TextRulerToolkit
-                  .log("ERROR, A RULE HAS TO COVER AT LEAST EVERY POSITIVE EXAMPLE OF ITS TWO SEED RULES!!!");
-          TextRulerToolkit.log("\t RULE: " + newRule.getRuleString());
-          TextRulerToolkit.log("\t Parent1: " + newRule.getParent1().getRuleString());
-          TextRulerToolkit.log("\t Parent2: " + newRule.getParent2().getRuleString());
-          TextRulerToolkit.log("--------");
-          TextRulerToolkit.log("+RuleCovering: "
-                  + newRule.getCoveringStatistics().getCoveredPositiveExamples());
-          TextRulerToolkit.log("+P1Covering  : "
-                  + newRule.getParent1().getCoveringStatistics().getCoveredPositiveExamples());
-          TextRulerToolkit.log("+P2Covering  : "
-                  + newRule.getParent2().getCoveringStatistics().getCoveredPositiveExamples());
-
-        }
-      }
-      ruleList.add(newRule);
-    }
-
-    // 3. specialize pre and post fillers:
-    int n = 0;
-    double bestValue = Double.MAX_VALUE;
-    int noImprovementCounter = 0;
-    while (true) {
-      n++;
-      TextRulerToolkit.log(" --- NEW SPECIALIZATOIN ROUND; n = " + n + "  noImprovementCounter = "
-              + noImprovementCounter);
-      List<RapierRule> newRuleList = new ArrayList<RapierRule>();
-      for (RapierRule curRule : ruleList) {
-
-        List<RapierRule> specTestRules = new ArrayList<RapierRule>(specializePreFiller(curRule, n));
-
-        for (RapierRule r : specTestRules)
-          r.combineSenselessPatternListItems();
-
-        testRulesIfNotCached(specTestRules);
-        if (shouldAbort())
-          return null;
-
-        for (RapierRule r : specTestRules)
-          newRuleList.add(r);
-      }
-      ruleList.addAll(newRuleList);
-
-      newRuleList.clear();
-      for (RapierRule curRule : ruleList) {
-
-        List<RapierRule> specTestRules = new ArrayList<RapierRule>(specializePostFiller(curRule, n));
-
-        for (RapierRule r : specTestRules)
-          r.combineSenselessPatternListItems();
-
-        testRulesIfNotCached(specTestRules);
-        if (shouldAbort())
-          return null;
-
-        for (RapierRule r : specTestRules)
-          newRuleList.add(r);
-      }
-      ruleList.addAll(newRuleList);
-
-      RapierRule bestRule = ruleList.peek();
-
-      if (TextRulerToolkit.DEBUG) {
-        // for (RapierRule r: ruleList)
-        // TextRulerToolkit.log("value="+r.getPriority()+" rule = "+r.getRuleString());
-        TextRulerToolkit.log("------------------------------------");
-        TextRulerToolkit.log("BEST RULE FOR THIS SESSION: " + bestRule.getCoveringStatistics());
-        TextRulerToolkit.log(bestRule.getRuleString());
-        TextRulerToolkit.log("------------------------------------");
-      }
-      if (bestRule.producesOnlyValidFillers())
-        break; // todo: horizon effects ??
-
-      if (bestRule.getPriority() < bestValue) {
-        noImprovementCounter = 0;
-        bestValue = bestRule.getPriority();
-      } else {
-        noImprovementCounter++;
-        if (noImprovementCounter > limNoImprovements)
-          break;
-      }
-    }
-
-    RapierRule bestRule = ruleList.peek();
-    return bestRule;
-  }
-
-  private List<RapierRule> getFillerGeneralizationsForRulePair(RapierRule rule1, RapierRule rule2) {
-    TextRulerToolkit
-            .log("------------------------------------------------------------------------------------------");
-    TextRulerToolkit.log("getFillerGeneralizationsForRulePair:");
-    TextRulerToolkit.log("Rule1: " + rule1.getRuleString());
-    TextRulerToolkit.log("Rule2: " + rule2.getRuleString());
-
-    List<RapierRule> result = new ArrayList<RapierRule>();
-    List<TextRulerRulePattern> genList = RapierGeneralizationHelper
-            .getGeneralizationsForRuleItemPatterns(rule1.getFillerPattern(),
-                    rule2.getFillerPattern());
-    // create rules:
-    for (TextRulerRulePattern pattern : genList) {
-      RapierRule newRule = new RapierRule(this, rule1.getTarget());
-      for (TextRulerRuleItem patternItem : pattern)
-        newRule.addFillerItem(patternItem.copy());
-      newRule.setParent1(rule1.copy());
-      newRule.setParent1PreFiller_n(0);
-      newRule.setParent1PostFiller_n(0);
-      newRule.setParent2(rule2.copy());
-      newRule.setParent2PreFiller_n(0);
-      newRule.setParent2PostFiller_n(0);
-      result.add(newRule);
-      newRule.setNeedsCompile(true);
-      // TextRulerToolkit.log("newRule: "+newRule.getRuleString());
-    }
-    TextRulerToolkit.log("   getGeneralizationsForRulePair result list size = " + result.size());
-    return result;
-  }
-
-  public List<RapierRule> specializePreFiller(RapierRule curRule, int n) {
-    RapierRule baseRule1 = curRule.getParent1();
-    RapierRule baseRule2 = curRule.getParent2();
-    int n1 = curRule.getParent1PreFiller_n();
-    int n2 = curRule.getParent2PreFiller_n();
-    TextRulerRulePattern preFiller1 = baseRule1.getPreFillerPattern();
-    TextRulerRulePattern preFiller2 = baseRule2.getPreFillerPattern();
-    int preFiller1MaxIndex = preFiller1.size() - n1 - 1;
-    int preFiller2MaxIndex = preFiller2.size() - n2 - 1;
-
-    // generate 3 different possible sets for generalizations:
-
-    // 1. n vs. n-1 (n elements of baserule1, n-1 of baserule2)
-    TextRulerRulePattern consideredPreFiller1 = new TextRulerRulePattern();
-    TextRulerRulePattern consideredPreFiller2 = new TextRulerRulePattern();
-    for (int i = preFiller1.size() - n; i >= 0 && i <= preFiller1MaxIndex; i++)
-      consideredPreFiller1.add(preFiller1.get(i));
-    for (int i = preFiller2.size() - n + 1; i >= 0 && i <= preFiller2MaxIndex; i++)
-      consideredPreFiller2.add(preFiller2.get(i));
-    List<TextRulerRulePattern> genList1 = null;
-    if (consideredPreFiller1.size() + consideredPreFiller2.size() > 0)
-      genList1 = RapierGeneralizationHelper.getGeneralizationsForRuleItemPatterns(
-              consideredPreFiller1, consideredPreFiller2);
-
-    List<TextRulerRulePattern> genList2 = null;
-    List<TextRulerRulePattern> genList3 = null;
-
-    if (useAllGenSetsAtSpecialization) // due to performance reasons the
-    // user can switch this off
-    {
-      // 2. n-1 vs. n (n-1 elements of baserule1, n of baserule2)
-      consideredPreFiller1.clear();
-      consideredPreFiller2.clear();
-      for (int i = preFiller1.size() - n + 1; i >= 0 && i <= preFiller1MaxIndex; i++)
-        consideredPreFiller1.add(preFiller1.get(i));
-      for (int i = preFiller2.size() - n; i >= 0 && i <= preFiller2MaxIndex; i++)
-        consideredPreFiller2.add(preFiller2.get(i));
-
-      if (consideredPreFiller1.size() + consideredPreFiller2.size() > 0)
-        genList2 = RapierGeneralizationHelper.getGeneralizationsForRuleItemPatterns(
-                consideredPreFiller1, consideredPreFiller2);
-
-      // 3. n vs. n (n elements of baserule1, n of baserule2)
-      consideredPreFiller1.clear();
-      consideredPreFiller2.clear();
-      for (int i = preFiller1.size() - n; i >= 0 && i <= preFiller1MaxIndex; i++)
-        consideredPreFiller1.add(preFiller1.get(i));
-      for (int i = preFiller2.size() - n; i >= 0 && i <= preFiller2MaxIndex; i++)
-        consideredPreFiller2.add(preFiller2.get(i));
-      if (consideredPreFiller1.size() + consideredPreFiller2.size() > 0)
-        genList3 = RapierGeneralizationHelper.getGeneralizationsForRuleItemPatterns(
-                consideredPreFiller1, consideredPreFiller2);
-    }
-
-    // TODO optimize and don't store all 3 genLists ! but for debugging
-    // purposes we keep them for now !
-    Set<TextRulerRulePattern> genSet = new HashSet<TextRulerRulePattern>();
-    if (genList1 != null)
-      genSet.addAll(genList1);
-    if (genList2 != null)
-      genSet.addAll(genList2);
-    if (genList3 != null)
-      genSet.addAll(genList3);
-
-    List<RapierRule> resultRules = new ArrayList<RapierRule>();
-
-    for (TextRulerRulePattern l : genSet) {
-      RapierRule newRule = curRule.copy();
-      for (int i = l.size() - 1; i >= 0; i--)
-        newRule.addPreFillerItem(l.get(i));
-      newRule.setParent1PreFiller_n(n);
-      newRule.setParent2PreFiller_n(n);
-      resultRules.add(newRule);
-    }
-    return resultRules;
-  }
-
-  // n = 1..maxN
-  public List<RapierRule> specializePostFiller(RapierRule curRule, int n) {
-    if (n == 0) {
-      TextRulerToolkit.log("ERROR ! N SHOULD NOT BE 0!");
-    }
-    RapierRule baseRule1 = curRule.getParent1();
-    RapierRule baseRule2 = curRule.getParent2();
-    int n1 = curRule.getParent1PostFiller_n();
-    int n2 = curRule.getParent2PostFiller_n();
-    TextRulerRulePattern postFiller1 = baseRule1.getPostFillerPattern();
-    TextRulerRulePattern postFiller2 = baseRule2.getPostFillerPattern();
-    int postFiller1MinIndex = n1;
-    int postFiller2MinIndex = n2;
-
-    // generate 3 different possible sets for generalizations:
-
-    // 1. n vs. n-1 (n elements of baserule1, n-1 of baserule2)
-    TextRulerRulePattern consideredPostFiller1 = new TextRulerRulePattern();
-    TextRulerRulePattern consideredPostFiller2 = new TextRulerRulePattern();
-    for (int i = postFiller1MinIndex; i < postFiller1.size() && i < n; i++)
-      consideredPostFiller1.add(postFiller1.get(i));
-    for (int i = postFiller2MinIndex; i < postFiller2.size() && i < n - 1; i++)
-      consideredPostFiller2.add(postFiller2.get(i));
-    List<TextRulerRulePattern> genList1 = null;
-    if (consideredPostFiller1.size() + consideredPostFiller2.size() > 0)
-      genList1 = RapierGeneralizationHelper.getGeneralizationsForRuleItemPatterns(
-              consideredPostFiller1, consideredPostFiller2);
-
-    // 2. n-1 vs. n (n-1 elements of baserule1, n of baserule2)
-    consideredPostFiller1.clear();
-    consideredPostFiller2.clear();
-    for (int i = postFiller1MinIndex; i < postFiller1.size() && i < n - 1; i++)
-      consideredPostFiller1.add(postFiller1.get(i));
-    for (int i = postFiller2MinIndex; i < postFiller2.size() && i < n; i++)
-      consideredPostFiller2.add(postFiller2.get(i));
-    List<TextRulerRulePattern> genList2 = null;
-    if (consideredPostFiller1.size() + consideredPostFiller2.size() > 0)
-      genList2 = RapierGeneralizationHelper.getGeneralizationsForRuleItemPatterns(
-              consideredPostFiller1, consideredPostFiller2);
-
-    // 3. n vs. n (n elements of baserule1, n of baserule2)
-    consideredPostFiller1.clear();
-    consideredPostFiller2.clear();
-    for (int i = postFiller1MinIndex; i < postFiller1.size() && i < n; i++)
-      consideredPostFiller1.add(postFiller1.get(i));
-    for (int i = postFiller2MinIndex; i < postFiller2.size() && i < n; i++)
-      consideredPostFiller2.add(postFiller2.get(i));
-    List<TextRulerRulePattern> genList3 = null;
-    if (consideredPostFiller1.size() + consideredPostFiller2.size() > 0)
-      genList3 = RapierGeneralizationHelper.getGeneralizationsForRuleItemPatterns(
-              consideredPostFiller1, consideredPostFiller2);
-
-    // TODO optimize and don't store all 3 genLists ! but for debugging
-    // purposes we keep them for now !
-    Set<TextRulerRulePattern> genSet = new HashSet<TextRulerRulePattern>();
-    if (genList1 != null)
-      genSet.addAll(genList1);
-    if (genList2 != null)
-      genSet.addAll(genList2);
-    if (genList3 != null)
-      genSet.addAll(genList3);
-
-    List<RapierRule> resultRules = new ArrayList<RapierRule>();
-
-    for (TextRulerRulePattern l : genSet) {
-      RapierRule newRule = curRule.copy();
-      for (TextRulerRuleItem t : l)
-        newRule.addPostFillerItem(t);
-      newRule.setParent1PostFiller_n(n);
-      newRule.setParent2PostFiller_n(n);
-      resultRules.add(newRule);
-    }
-    return resultRules;
-  }
-
-  @Override
-  public boolean collectNegativeCoveredInstancesWhenTesting() {
-    return false;
-  }
-
-  public String getResultString() {
-    if (slotRules != null)
-      return slotRules.getTMFileString(getFileHeaderString(true), 1000); // if
-    // a
-    // rule
-    // is
-    // >100
-    // characters,
-    // it
-    // gets
-    // replaced
-    // by
-    // a
-    // placeholder
-    else
-      return "No results available yet!";
-  }
-
-  public void setParameters(Map<String, Object> params) {
-    if (TextRulerToolkit.DEBUG)
-      saveParametersToTempFolder(params);
-
-    // TODO add try catch
-    if (params.containsKey(COMPRESSION_FAIL_MAX_COUNT_KEY))
-      compressionFailMaxCount = (Integer) params.get(COMPRESSION_FAIL_MAX_COUNT_KEY);
-
-    if (params.containsKey(RULELIST_SIZE_KEY))
-      ruleListSize = (Integer) params.get(RULELIST_SIZE_KEY);
-
-    if (params.containsKey(PAIR_COUNT_KEY))
-      pairCount = (Integer) params.get(PAIR_COUNT_KEY);
-
-    if (params.containsKey(LIM_NO_IMPROVEMENTS_KEY))
-      limNoImprovements = (Integer) params.get(LIM_NO_IMPROVEMENTS_KEY);
-
-    if (params.containsKey(NOISE_THESHOLD_KEY))
-      noiseThreshold = (Float) params.get(NOISE_THESHOLD_KEY);
-
-    if (params.containsKey(POSTAG_ROOTTYPE_KEY))
-      posTagRootTypeName = (String) params.get(POSTAG_ROOTTYPE_KEY);
-
-    if (params.containsKey(MIN_COVERED_POSITIVES_KEY))
-      minCoveredPositives = (Integer) params.get(MIN_COVERED_POSITIVES_KEY);
-
-    if (params.containsKey(USE_ALL_GENSETS_AT_SPECIALIZATION_KEY))
-      useAllGenSetsAtSpecialization = (Boolean) params.get(USE_ALL_GENSETS_AT_SPECIALIZATION_KEY);
-  }
-
-  // TODO share this between algorithms (e.g. LP2 and RAPIER ?) and make a
-  // maximum size of the cache, etc. like CasCache?
-  protected void testRulesIfNotCached(List<RapierRule> rules) {
-    List<TextRulerRule> rulesToTest = new ArrayList<TextRulerRule>();
-
-    for (RapierRule r : rules) {
-      String key = r.getRuleString();
-      if (cachedTestedRuleStatistics.containsKey(key)) {
-        r.setCoveringStatistics(cachedTestedRuleStatistics.get(key).copy());
-        TextRulerToolkit.log("CACHE HIT; size=" + cachedTestedRuleStatistics.size());
-      } else
-        rulesToTest.add(r);
-    }
-
-    if (rulesToTest.size() > 0) {
-      testRulesOnDocumentSet(rulesToTest, exampleDocuments);
-      if (shouldAbort())
-        return;
-      while (cachedTestedRuleStatistics.size() + rulesToTest.size() > 10000) // TODO
-      // lohnt
-      // sich
-      // das
-      // ?
-      // speicher
-      // beobachten
-      // !!
-      {
-        Iterator<String> it = cachedTestedRuleStatistics.keySet().iterator();
-        if (!it.hasNext())
-          break;
-        String removeKey = cachedTestedRuleStatistics.keySet().iterator().next();
-        cachedTestedRuleStatistics.remove(removeKey);
-      }
-
-      for (TextRulerRule r : rulesToTest) {
-        String key = r.getRuleString();
-        cachedTestedRuleStatistics.put(key, r.getCoveringStatistics().copy());
-      }
-    }
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierDebugHelper.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierDebugHelper.java
deleted file mode 100755
index 06f125c..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierDebugHelper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-
-public class RapierDebugHelper {
-
-  public static boolean debugCheckIfRuleCoversItsSeedRuleCoverings(RapierRule rule) {
-    Set<TextRulerExample> parent1Positives = rule.getParent1().getCoveringStatistics()
-            .getCoveredPositiveExamples();
-    Set<TextRulerExample> parent2Positives = rule.getParent2().getCoveringStatistics()
-            .getCoveredPositiveExamples();
-    Set<TextRulerExample> rulePositives = rule.getCoveringStatistics().getCoveredPositiveExamples();
-    return rulePositives.containsAll(parent1Positives)
-            && rulePositives.containsAll(parent2Positives);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierFactory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierFactory.java
deleted file mode 100755
index a425da1..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierFactory.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter.MLAlgorithmParamType;
-
-public class RapierFactory implements TextRulerLearnerFactory {
-
-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,
-          String prePropTMFile, String tempFolderPath, String[] fullSlotTypeNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    return new Rapier(inputFolderPath, prePropTMFile, tempFolderPath, fullSlotTypeNames, filterSet,
-            skip, delegate);
-  }
-
-  public TextRulerLearnerParameter[] getAlgorithmParameters() {
-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[8];
-
-    result[0] = new TextRulerLearnerParameter(Rapier.COMPRESSION_FAIL_MAX_COUNT_KEY,
-            "Maximum Compression Fail Count", MLAlgorithmParamType.ML_INT_PARAM);
-    result[1] = new TextRulerLearnerParameter(Rapier.RULELIST_SIZE_KEY, "Internal Rules List Size",
-            MLAlgorithmParamType.ML_INT_PARAM);
-    result[2] = new TextRulerLearnerParameter(Rapier.PAIR_COUNT_KEY, "Rule Pairs for Generalizing",
-            MLAlgorithmParamType.ML_INT_PARAM);
-    result[3] = new TextRulerLearnerParameter(Rapier.LIM_NO_IMPROVEMENTS_KEY,
-            "Maximum 'No improvement' Count", MLAlgorithmParamType.ML_INT_PARAM);
-    result[4] = new TextRulerLearnerParameter(Rapier.NOISE_THESHOLD_KEY, "Maximum Noise Threshold",
-            MLAlgorithmParamType.ML_FLOAT_PARAM);
-    result[5] = new TextRulerLearnerParameter(Rapier.MIN_COVERED_POSITIVES_KEY,
-            "Minimum Covered Positives Per Rule", MLAlgorithmParamType.ML_INT_PARAM);
-    result[6] = new TextRulerLearnerParameter(Rapier.POSTAG_ROOTTYPE_KEY, "PosTag Root Type",
-            MLAlgorithmParamType.ML_STRING_PARAM);
-    result[7] = new TextRulerLearnerParameter(Rapier.USE_ALL_GENSETS_AT_SPECIALIZATION_KEY,
-            "Use All 3 GenSets at Specialization", MLAlgorithmParamType.ML_BOOL_PARAM);
-    return result;
-  }
-
-  public Map<String, Object> getAlgorithmParameterStandardValues() {
-    Map<String, Object> result = new HashMap<String, Object>();
-    result.put(Rapier.COMPRESSION_FAIL_MAX_COUNT_KEY, Rapier.STANDARD_COMPRESSION_FAIL_MAX_COUNT);
-    result.put(Rapier.RULELIST_SIZE_KEY, Rapier.STANDARD_RULELIST_SIZE);
-    result.put(Rapier.PAIR_COUNT_KEY, Rapier.STANDARD_PAIR_COUNT);
-    result.put(Rapier.LIM_NO_IMPROVEMENTS_KEY, Rapier.STANDARD_LIM_NO_IMPROVEMENTS);
-    result.put(Rapier.NOISE_THESHOLD_KEY, Rapier.STANDARD_NOISE_THREHSOLD);
-    result.put(Rapier.POSTAG_ROOTTYPE_KEY, Rapier.STANDARD_POSTAG_ROOTTYPE);
-    result.put(Rapier.MIN_COVERED_POSITIVES_KEY, Rapier.STANDARD_MIN_COVERED_POSITIVES);
-    result.put(Rapier.USE_ALL_GENSETS_AT_SPECIALIZATION_KEY,
-            Rapier.STANDARD_USE_ALL_GENSETS_AT_SPECIALIZATION);
-    return result;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierGeneralizationHelper.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierGeneralizationHelper.java
deleted file mode 100755
index 0d70554..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierGeneralizationHelper.java
+++ /dev/null
@@ -1,692 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-
-public class RapierGeneralizationHelper {
-
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  // --- ITEM(s) GENERALIZATION
-  // -------------------------------------------------------------------------------------------------------------
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  private static ArrayList<TextRulerRuleItem> getGeneralizationsForRuleItems(
-          TextRulerRuleItem item1, TextRulerRuleItem item2) {
-    ArrayList<TextRulerRuleItem> item1List = new ArrayList<TextRulerRuleItem>();
-    ArrayList<TextRulerRuleItem> item2List = new ArrayList<TextRulerRuleItem>();
-    if (item1 != null)
-      item1List.add(item1);
-    if (item2 != null)
-      item2List.add(item2);
-    return getGeneralizationsForRuleItemLists(item1List, item2List);
-  }
-
-  // generalize two given pattern elements or pattern element lists and return
-  // all possible generalizations as
-  // TextRulerRuleItem objects
-  private static ArrayList<TextRulerRuleItem> getGeneralizationsForRuleItemLists(
-          ArrayList<TextRulerRuleItem> item1List, ArrayList<TextRulerRuleItem> item2List) {
-    ArrayList<RapierRuleItem> proposedWordConstraints = new ArrayList<RapierRuleItem>();
-    ArrayList<RapierRuleItem> proposedTagConstraints = new ArrayList<RapierRuleItem>();
-    ArrayList<RapierRuleItem> proposedClassConstraints = new ArrayList<RapierRuleItem>();
-    ArrayList<TextRulerRuleItem> result = new ArrayList<TextRulerRuleItem>();
-
-    int resultListLen1 = 0;
-    int resultListLen2 = 0;
-    boolean oneListIsEmpty = false;
-
-    if (item1List.size() == 0 && item2List.size() == 0) {
-      TextRulerToolkit.log("ERROR !");
-    }
-    if (item1List.size() == 0 || item2List.size() == 0) {
-      // TextRulerToolkit.log("SPECIAL CASE WITH ONE LIST OF ZERO SIZE");
-      oneListIsEmpty = true;
-    }
-
-    boolean hasEmptyWordList = false;
-    int maxWordCount = 0;
-    boolean hasEmptyTagList = false;
-    int maxTagCount = 0;
-    for (TextRulerRuleItem rt : item2List) {
-      RapierRuleItem t = (RapierRuleItem) rt;
-      resultListLen2 += t.isListItem() ? t.listLen() : 1;
-      if (t.getWordConstraints().size() > maxWordCount)
-        maxWordCount = t.getWordConstraints().size();
-      if (t.getWordConstraints().size() == 0)
-        hasEmptyWordList = true;
-      if (t.getTagConstraints().size() > maxTagCount)
-        maxTagCount = t.getTagConstraints().size();
-      if (t.getTagConstraints().size() == 0)
-        hasEmptyTagList = true;
-    }
-    for (TextRulerRuleItem rt : item1List) {
-      RapierRuleItem t = (RapierRuleItem) rt;
-      resultListLen1 += t.isListItem() ? t.listLen() : 1;
-      if (t.getWordConstraints().size() > maxWordCount)
-        maxWordCount = t.getWordConstraints().size();
-      if (t.getWordConstraints().size() == 0)
-        hasEmptyWordList = true;
-      if (t.getTagConstraints().size() > maxTagCount)
-        maxTagCount = t.getTagConstraints().size();
-      if (t.getTagConstraints().size() == 0)
-        hasEmptyTagList = true;
-    }
-    int resultListLen = resultListLen1 > resultListLen2 ? resultListLen1 : resultListLen2; // take
-    // the
-    // bigger
-    // of
-    // both
-    if (resultListLen == 1 && !oneListIsEmpty)
-      resultListLen = 0; // lists with a length of 1 can only occur when
-    // one itemList is empty! THAT CANNOT HAPPEN
-    // HERE!
-
-    // generalize word constraints:
-    if (hasEmptyWordList) // at least one constraint of both is empty
-    {
-      // do nothing here, proposed.wordItems stays empty
-      proposedWordConstraints.add(new RapierRuleItem());
-    } else // create union of both constraints AND (if both constraints
-    // weren't the same) drop constraint
-    {
-      RapierRuleItem proposed = new RapierRuleItem();
-      for (TextRulerRuleItem t : item1List)
-        proposed.addWordConstraints(((RapierRuleItem) t).getWordConstraints());
-      for (TextRulerRuleItem t : item2List)
-        proposed.addWordConstraints(((RapierRuleItem) t).getWordConstraints());
-
-      proposedWordConstraints.add(proposed);
-
-      // if the union of both constraints is a real union (one does not
-      // subsume the other completely),
-      // we have to add the DROPPING OF THE CONSTRAINT as a second
-      // proposed word constraint
-      if (maxWordCount != proposed.getWordConstraints().size()) // the
-      // union
-      // is a
-      // real
-      // bigger
-      // set
-      // than
-      {
-        proposedWordConstraints.add(new RapierRuleItem());
-      }
-    }
-
-    if (hasEmptyTagList) // at least one constraint of both is empty
-    {
-      // do nothing here, proposed.tagItems stays empty
-      proposedTagConstraints.add(new RapierRuleItem());
-    } else // create union of both constraints AND (if both constraints
-    // weren't the same) drop constraint
-    {
-      RapierRuleItem proposed = new RapierRuleItem();
-      for (TextRulerRuleItem t : item1List)
-        proposed.addTagConstraints(((RapierRuleItem) t).getTagConstraints());
-      for (TextRulerRuleItem t : item2List)
-        proposed.addTagConstraints(((RapierRuleItem) t).getTagConstraints());
-
-      proposedTagConstraints.add(proposed);
-
-      // if the union of both constraints is a real union (one does not
-      // subsume the other completely),
-      // we have to add the DROPPING OF THE CONSTRAINT as a second
-      // proposed tag constraint
-      if (maxTagCount != proposed.getTagConstraints().size()) // the union
-      // is a real
-      // bigger
-      // set than
-      {
-        proposedTagConstraints.add(new RapierRuleItem());
-      }
-    }
-
-    // TODO semantic class generalization
-    proposedClassConstraints.add(new RapierRuleItem()); // add only NO
-    // class
-    // constraint
-    // version for
-    // now!
-
-    // finally, create all combinations of the above proposed items
-    for (RapierRuleItem wt : proposedWordConstraints) {
-      for (RapierRuleItem tt : proposedTagConstraints) {
-        for (RapierRuleItem ct : proposedClassConstraints) {
-          RapierRuleItem newItem = new RapierRuleItem();
-          for (TextRulerWordConstraint wi : wt.getWordConstraints())
-            newItem.addWordConstraint(wi.copy());
-          for (String ti : tt.getTagConstraints())
-            newItem.addTagConstraint(ti);
-          for (String tc : ct.getClassConstraints())
-            newItem.addClassConstraint(tc);
-          newItem.setListLen(resultListLen);
-          newItem.setListBeginsAtZero(oneListIsEmpty && resultListLen > 0);
-          result.add(newItem);
-        }
-      }
-    }
-    return result;
-  }
-
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  // --- EQUAL SIZE PATTERN GENERALIZATION
-  // --------------------------------------------------------------------------------------------------
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  private static ArrayList<TextRulerRulePattern> getGeneralizationsForRuleItemPatternsOfEqualSize(
-          TextRulerRulePattern pattern1, TextRulerRulePattern pattern2) {
-    ArrayList<TextRulerRulePattern> resultList = new ArrayList<TextRulerRulePattern>();
-
-    ArrayList<ArrayList<TextRulerRuleItem>> generalizationTable = new ArrayList<ArrayList<TextRulerRuleItem>>();
-    Iterator<TextRulerRuleItem> it2 = pattern2.iterator();
-    if (pattern1.size() != pattern2.size()) {
-      TextRulerToolkit.log("ERROR!");
-    }
-    for (TextRulerRuleItem item1 : pattern1) {
-      TextRulerRuleItem item2 = it2.next();
-      // get all possible LGGs of the current two elements and save them
-      // into the matrix
-      ArrayList<TextRulerRuleItem> allLGGs = getGeneralizationsForRuleItems(item1, item2);
-      generalizationTable.add(allLGGs);
-      // TextRulerToolkit.log("--- GET GENERALISATIONS FOR TWO TERMS:  --"+t1+"--   --"+t2+"--");
-      // ArrayList<MLRapierRuleTerm> allLGGs =
-      // this.getGeneralizationsForRuleTerms(t1, t2);
-      // for (MLRapierRuleTerm term : allLGGs)
-      // TextRulerToolkit.log("--- "+term);
-      // TextRulerToolkit.log("--- END");
-    }
-
-    // now we have patternSize lists of possible generalizations, one list
-    // per original pattern item pair of
-    // pattern1 and pattern2. we now have to build all possible
-    // combinations. Each combination is a
-    // new pattern
-    recursiveBuildAllRuleItemCombinations(generalizationTable, 0, new TextRulerRulePattern(),
-            resultList);
-    return resultList;
-  }
-
-  private static void recursiveBuildAllRuleItemCombinations(
-          ArrayList<ArrayList<TextRulerRuleItem>> table, int curIndex,
-          TextRulerRulePattern currentPattern, ArrayList<TextRulerRulePattern> resultPatterns) {
-    if (curIndex >= table.size()) {
-      // make a deep copy of the current pattern:
-      TextRulerRulePattern copy = new TextRulerRulePattern();
-      for (TextRulerRuleItem item : currentPattern)
-        copy.add(item.copy());
-      resultPatterns.add(copy);
-    } else {
-      for (TextRulerRuleItem item : table.get(curIndex)) {
-        currentPattern.add(item);
-        recursiveBuildAllRuleItemCombinations(table, curIndex + 1, currentPattern, resultPatterns);
-        currentPattern.remove(currentPattern.size() - 1);
-      }
-    }
-  }
-
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  // --- DISTINCT SIZE PATTERN GENERALIZATION
-  // -----------------------------------------------------------------------------------------------
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-
-  // this is the low level version for patterns of distinct sizes! it creates
-  // ALL possible combinations how to pair/map pattern items
-  // of the shorter with those of the longer pattern. the optimizing version
-  // (getOptimizedGeneralizationsForRuleItemPatternsOfDistinctSize)
-  // uses this method for its pattern segments! (see below)
-  private static ArrayList<TextRulerRulePattern> getGeneralizationsForRuleItemPatternsOfDistinctSize(
-          TextRulerRulePattern pattern1, TextRulerRulePattern pattern2) {
-    ArrayList<TextRulerRulePattern> resultList = new ArrayList<TextRulerRulePattern>();
-    if (pattern1.size() == pattern2.size()) {
-      TextRulerToolkit.log("ERROR! CALL getGeneralizationsForRuleItemPatternsOfEqualSize instead!");
-      if (TextRulerToolkit.DEBUG)
-        return null;
-    }
-
-    TextRulerRulePattern longerPattern = pattern1;
-    TextRulerRulePattern shorterPattern = pattern2;
-    if (pattern2.size() > pattern1.size()) {
-      longerPattern = pattern2;
-      shorterPattern = pattern1;
-    }
-
-    if (longerPattern.size() <= 1 || shorterPattern.size() <= 1) {
-      // Special case 1: one of the pattern terms list is empty AND
-      // special case 2: one has only ONE element
-      if (longerPattern.size() + shorterPattern.size() == 0) {
-        TextRulerToolkit.log("ERROR !! BOTH PATTERNS ARE EMPTY!");
-        if (TextRulerToolkit.DEBUG)
-          return null;
-      }
-
-      // get all possible generalizations of the two patterns. result of
-      // each generalization is ONE rule item, so we
-      // don't use TextRulerRulePattern here since this IS NOT a rule
-      // pattern! it's a list of possible generalizations:
-      ArrayList<TextRulerRuleItem> generalizations = getGeneralizationsForRuleItemLists(
-              longerPattern, shorterPattern);
-      // create a one element result pattern for each:
-      for (TextRulerRuleItem item : generalizations) {
-        TextRulerRulePattern p = new TextRulerRulePattern();
-        p.add(item);
-        resultList.add(p);
-      }
-    }
-    // else SPECIAL CASE 3 // TODO make those values configurable ?
-    else if (((longerPattern.size() - shorterPattern.size()) > 6) || (longerPattern.size() > 10)) {
-      int resultListLen1 = 0;
-      for (TextRulerRuleItem rt : shorterPattern)
-        resultListLen1 += ((RapierRuleItem) rt).isListItem() ? ((RapierRuleItem) rt).listLen() : 1;
-      int resultListLen2 = 0;
-      for (TextRulerRuleItem rt : longerPattern)
-        resultListLen2 += ((RapierRuleItem) rt).isListItem() ? ((RapierRuleItem) rt).listLen() : 1;
-
-      RapierRuleItem singleItem = new RapierRuleItem();
-      singleItem.setListLen(resultListLen1 > resultListLen2 ? resultListLen1 : resultListLen2);
-      TextRulerRulePattern singleItemPattern = new TextRulerRulePattern();
-      singleItemPattern.add(singleItem);
-      resultList.add(singleItemPattern);
-    } else { // sizes are different and both > 1
-      // create all possible generalization combinations, that is: how can
-      // we map elements of the shorter pattern
-      // to the ones of the longer pattern and then generalize each
-      // mapping (each group) of items?
-      ArrayList<ArrayList<RapierPatternItemMapping>> combinationList = new ArrayList<ArrayList<RapierPatternItemMapping>>();
-
-      recursiveBuildAllPossiblePatternMappingSequences(longerPattern, shorterPattern,
-              new ArrayList<RapierPatternItemMapping>(), combinationList);
-
-      for (ArrayList<RapierPatternItemMapping> mappingSequence : combinationList) {
-        resultList.addAll(getGeneralizationsForPatternMappingSequence(mappingSequence));
-      }
-    }
-    return resultList;
-  }
-
-  // creates all possible combinations how to pair together items from the
-  // longer and the shorter source pattern, e.g.
-  // 1 2 3 4 5 vs. 1 2 3 = 1/1+2+3 2/4 3/5, ...
-  private static void recursiveBuildAllPossiblePatternMappingSequences(
-          TextRulerRulePattern longerPattern, TextRulerRulePattern shorterPattern,
-          ArrayList<RapierPatternItemMapping> currentMappingSequence,
-          ArrayList<ArrayList<RapierPatternItemMapping>> resultList) {
-    int windowSize = longerPattern.size() - shorterPattern.size() + 1;
-
-    if (shorterPattern.size() > longerPattern.size()) {
-      TextRulerToolkit.log("ERROR: SHORTER > LONGER !!");
-    }
-    if (longerPattern.size() == 0 || shorterPattern.size() == 0) {
-      TextRulerToolkit.log("ERROR: SHORTER == LONGER == 0!");
-    } else {
-      // if the remaining (sub-)patterns are of equal size or one has only
-      // one element left, create one last item mapping and
-      // a final result mapping sequence:
-      if (shorterPattern.size() == 1 || (longerPattern.size() == shorterPattern.size())) {
-        RapierPatternItemMapping lastMapping = new RapierPatternItemMapping();
-        lastMapping.shorterPattern.addAll(shorterPattern);
-        lastMapping.longerPattern.addAll(longerPattern);
-        ArrayList<RapierPatternItemMapping> newMappingSequence = new ArrayList<RapierPatternItemMapping>();
-        newMappingSequence.addAll(currentMappingSequence);
-        newMappingSequence.add(lastMapping);
-        resultList.add(newMappingSequence);
-      } else { // otherwise we have to create all possible combinations of
-        // the longer and shorter remaining pattern:
-        TextRulerRuleItem firstItem = shorterPattern.get(0);
-        // combine with 0, 0/1, ... 0/1/2/.../windowSize-1
-        for (int maxi = 0; maxi < windowSize; maxi++) {
-          RapierPatternItemMapping newMapping = new RapierPatternItemMapping();
-          newMapping.shorterPattern.add(firstItem);
-          for (int li = 0; li <= maxi; li++)
-            newMapping.longerPattern.add(longerPattern.get(li));
-          currentMappingSequence.add(newMapping);
-          TextRulerRulePattern restLongerPattern = new TextRulerRulePattern();
-          TextRulerRulePattern restShorterPattern = new TextRulerRulePattern();
-          for (int i = 1; i < shorterPattern.size(); i++)
-            restShorterPattern.add(shorterPattern.get(i));
-          for (int i = maxi + 1; i < longerPattern.size(); i++)
-            restLongerPattern.add(longerPattern.get(i));
-
-          // recurse:
-          recursiveBuildAllPossiblePatternMappingSequences(restLongerPattern, restShorterPattern,
-                  currentMappingSequence, resultList);
-
-          // remove last segment to get back to the same state as
-          // before the recursion:
-          currentMappingSequence.remove(currentMappingSequence.size() - 1);
-        }
-      }
-    }
-  }
-
-  // here the input is called a MAPPING instead of a pattern segmentation in
-  // order to distinguish between the two levels of
-  // dividing the problem: a pattern segmentation is a special mapping of
-  // equal items in the two to generalize source patterns;
-  // the segments that result through that segmentation still need to be
-  // generalized (see getGeneralizationsForPatternSegmentation)
-  // if sucha semgent has subpattersn of different size,
-  // getGeneralizationsForRuleItemPatternsOfDistinctSize is used to
-  // generalize it, which uses THIS METHOD HERE to get all generalizations for
-  // a special MAPPING. a mapping (in comparison to the
-  // segmentation!) is a mapping between the longer and shorter pattern items
-  // which then get directly generalized here!
-  // in order to show this difference, we use the (inernally exactly the
-  // same!) class RapierPatternItemMapping instead of
-  // RapierPatternSegment!)
-  private static ArrayList<TextRulerRulePattern> getGeneralizationsForPatternMappingSequence(
-          ArrayList<RapierPatternItemMapping> patternMappingSequence) {
-    ArrayList<TextRulerRulePattern> resultList = new ArrayList<TextRulerRulePattern>();
-    ArrayList<ArrayList<TextRulerRuleItem>> generalizationTable = new ArrayList<ArrayList<TextRulerRuleItem>>();
-
-    // every mapping has several possible generalizations, so we store all
-    // of them in that generalizationTable, one list of
-    // generalizations for each mapping:
-    for (RapierPatternItemMapping mapping : patternMappingSequence) {
-      ArrayList<TextRulerRuleItem> lggList = getGeneralizationsForRuleItemLists(
-              mapping.shorterPattern, mapping.longerPattern);
-      generalizationTable.add(lggList);
-    }
-
-    // afterwards we have again to create all possible combinations of those
-    // lists (like in the equalSizeGeneralization):
-    // Each combination is a new pattern
-    recursiveBuildAllRuleItemCombinations(generalizationTable, 0, new TextRulerRulePattern(),
-            resultList);
-    return resultList;
-  }
-
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  // --- FIND MATCHINGS BETWEEN PATTERNS FOR GENERALIZATION
-  // -----------------------------------------------------------------------------------------------
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-
-  // find matches in two patterns by comparing the items of the patterns and
-  // return all possible segmentations of those two patterns.
-  private static void recursiveFindPatternSegmentsByMatchingPatternItems(
-          TextRulerRulePattern longerPattern, TextRulerRulePattern shorterPattern,
-          ArrayList<RapierPatternSegment> currentSegmentation,
-          ArrayList<ArrayList<RapierPatternSegment>> resultList) {
-    int cmpWindowSize = longerPattern.size() - shorterPattern.size() + 1;
-
-    // is one
-    // (rest-)pattern
-    // empty ?
-    if (longerPattern.size() == 0 || shorterPattern.size() == 0) {
-      // create result segmentation
-      ArrayList<RapierPatternSegment> newSegmentation = new ArrayList<RapierPatternSegment>();
-      newSegmentation.addAll(currentSegmentation); // add current
-      // add rest if
-      // recursive state
-      // anything is
-      // left one of
-      // the
-      // patterns
-      if (longerPattern.size() + shorterPattern.size() > 0) {
-        RapierPatternSegment lastSegment = new RapierPatternSegment();
-        for (TextRulerRuleItem i : shorterPattern)
-          lastSegment.shorterPattern.add(i);
-        for (TextRulerRuleItem i : longerPattern)
-          lastSegment.longerPattern.add(i);
-        newSegmentation.add(lastSegment);
-      }
-      resultList.add(newSegmentation);
-    } else {
-      boolean matched = false;
-      for (int si = 0; si < shorterPattern.size(); si++) {
-        // compare element si with si, si+1, ... si+cmpWindowSize-1
-        for (int li = si; li < si + cmpWindowSize; li++) {
-          if (longerPattern.get(li).equals(shorterPattern.get(si))) {
-            // matched pair found!
-            matched = true;
-            // --> calculate pattern segments, add them to the
-            // current one and pass the rest of the
-            // patterns to the next recursion level:
-            RapierPatternSegment newSegment = new RapierPatternSegment();
-            for (int i = 0; i < si; i++)
-              newSegment.shorterPattern.add(shorterPattern.get(i));
-            for (int i = 0; i < li; i++)
-              newSegment.longerPattern.add(longerPattern.get(i));
-
-            boolean addedLeftSegmentation = false;
-            if (newSegment.longerPattern.size() > 0 || newSegment.shorterPattern.size() > 0) {
-              // only add if the segmentation is not empty!
-              currentSegmentation.add(newSegment);
-              addedLeftSegmentation = true;
-            }
-
-            RapierPatternSegment matchedSegment = new RapierPatternSegment();
-            matchedSegment.shorterPattern.add(shorterPattern.get(si));
-            matchedSegment.longerPattern.add(longerPattern.get(li));
-            currentSegmentation.add(matchedSegment);
-
-            // the rest is now the rest to the right of both (so
-            // li+1 and si+1 to the ends...)
-            TextRulerRulePattern restLongerPattern = new TextRulerRulePattern();
-            TextRulerRulePattern restShorterPattern = new TextRulerRulePattern();
-            for (int i = li + 1; i < longerPattern.size(); i++)
-              restLongerPattern.add(longerPattern.get(i));
-            for (int i = si + 1; i < shorterPattern.size(); i++)
-              restShorterPattern.add(shorterPattern.get(i));
-
-            // recurse...
-            if (restLongerPattern.size() > restShorterPattern.size())
-              recursiveFindPatternSegmentsByMatchingPatternItems(restLongerPattern,
-                      restShorterPattern, currentSegmentation, resultList);
-            else
-              recursiveFindPatternSegmentsByMatchingPatternItems(restShorterPattern,
-                      restLongerPattern, currentSegmentation, resultList);
-
-            // remove added segments so that we are in the same
-            // state as before the recursion:
-            if (addedLeftSegmentation)
-              currentSegmentation.remove(currentSegmentation.size() - 1); // remove the left side
-            // segment
-            currentSegmentation.remove(currentSegmentation.size() - 1); // remove
-            // the
-            // matched
-            // segment
-          }
-        }
-      }
-      if (!matched) // add remaining items of both lists in one pattern
-      // segment
-      {
-        ArrayList<RapierPatternSegment> newSegmentation = new ArrayList<RapierPatternSegment>();
-        newSegmentation.addAll(currentSegmentation);
-
-        RapierPatternSegment lastSegment = new RapierPatternSegment();
-        for (TextRulerRuleItem i : shorterPattern)
-          lastSegment.shorterPattern.add(i);
-        for (TextRulerRuleItem i : longerPattern)
-          lastSegment.longerPattern.add(i);
-        newSegmentation.add(lastSegment);
-        resultList.add(newSegmentation);
-      }
-    }
-  }
-
-  private static ArrayList<TextRulerRulePattern> getGeneralizationsForPatternSegmentation(
-          ArrayList<RapierPatternSegment> patternSegmentation) {
-    // for creating those, we need a table:
-    // each segment of the patternSegmentation creates a bunch of possible
-    // new generalized sub patterns (that's the inner
-    // ArrayList<TextRulerRulePattern>)
-    // since we have a whole sequence of pattern semgents (a whole
-    // segmentation), we need the outer ArrayList to collect
-    // all generalizations of all pattern segments:
-    ArrayList<ArrayList<TextRulerRulePattern>> generalizationTable = new ArrayList<ArrayList<TextRulerRulePattern>>();
-
-    // now, we create all generalizations of each pattern segment and
-    // collect them in that table:
-    for (RapierPatternSegment pSeg : patternSegmentation) {
-      ArrayList<TextRulerRulePattern> pSegGeneralizations;
-
-      if (pSeg.longerPattern.size() == pSeg.shorterPattern.size())
-        pSegGeneralizations = getGeneralizationsForRuleItemPatternsOfEqualSize(pSeg.longerPattern,
-                pSeg.shorterPattern);
-      else
-        pSegGeneralizations = getGeneralizationsForRuleItemPatternsOfDistinctSize(
-                pSeg.longerPattern, pSeg.shorterPattern);
-
-      generalizationTable.add(pSegGeneralizations);
-    }
-
-    // finally, we have to build all combinations of them in form of
-    // MLRulePatterns:
-    ArrayList<TextRulerRulePattern> resultList = new ArrayList<TextRulerRulePattern>(); // the
-    // result
-    // is
-    // a
-    // list
-    // of
-    // new
-    // generalized
-    // patterns
-
-    recursiveBuildAllRuleItemCombinationsFromPatterns(generalizationTable, 0,
-            new TextRulerRulePattern(), resultList);
-
-    return resultList;
-  }
-
-  private static void recursiveBuildAllRuleItemCombinationsFromPatterns(
-          ArrayList<ArrayList<TextRulerRulePattern>> table, int curIndex,
-          TextRulerRulePattern currentPattern, ArrayList<TextRulerRulePattern> resultPatterns) {
-    if (curIndex >= table.size()) {
-      // make a deep copy of the current pattern:
-      TextRulerRulePattern copy = new TextRulerRulePattern();
-      for (TextRulerRuleItem item : currentPattern)
-        copy.add(item.copy());
-      resultPatterns.add(copy);
-    } else {
-      for (TextRulerRulePattern pattern : table.get(curIndex)) {
-        currentPattern.addAll(pattern);
-        recursiveBuildAllRuleItemCombinationsFromPatterns(table, curIndex + 1, currentPattern,
-                resultPatterns);
-        for (int i = 0; i < pattern.size(); i++)
-          currentPattern.remove(currentPattern.size() - 1);
-      }
-    }
-  }
-
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  // --- WORKING ON PATTERNS OF DISTINCT LENGTH - OPTIMIZED
-  // ---------------------------------------------------------------------------------
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-
-  // "optimized", because this method uses the pattern item matching
-  // optimization (search for equal items and make a segmentation, etc.)
-  private static ArrayList<TextRulerRulePattern> getOptimizedGeneralizationsForRuleItemPatternsOfDistinctSize(
-          TextRulerRulePattern pattern1, TextRulerRulePattern pattern2) {
-    ArrayList<ArrayList<RapierPatternSegment>> matchedCombinationList = new ArrayList<ArrayList<RapierPatternSegment>>();
-
-    // in order to reduce the amount of possible combinations how to combine
-    // the elements of the shorter pattern with the
-    // elements of the longer pattern, we first search for equal pattern
-    // items in both patterns. those equal patterns get hardwired
-    // in the combination and the left and right remaining subpatterns stay
-    // as a "divided smaller problem" that needs to be conquered...
-    // the result of the search is a list of possible segmentations of the
-    // patterns. all semgementations are those "smaller"
-    // left problems that we then need to generalize in the original manner.
-    // if no equal items are found, one segmentation with only one segment
-    // (the orignal longer and shoter pattern) is returned and
-    // has to be generalized.
-    if (pattern1.size() > pattern2.size())
-      recursiveFindPatternSegmentsByMatchingPatternItems(pattern1, pattern2,
-              new ArrayList<RapierPatternSegment>(), matchedCombinationList);
-    else
-      recursiveFindPatternSegmentsByMatchingPatternItems(pattern2, pattern1,
-              new ArrayList<RapierPatternSegment>(), matchedCombinationList);
-
-    // if (TextRulerToolkit.DEBUG && matchedCombinationList.size() > 1)
-    // {
-    // TextRulerToolkit.log("PATTERN SEQUENCES FOUND: "+matchedCombinationList.size());
-    // for (ArrayList<RapierPatternSegment> patternSequence :
-    // matchedCombinationList)
-    // {
-    // TextRulerToolkit.log("\tNEXT SEQUENCE");
-    // for (RapierPatternSegment pSeg : patternSequence)
-    // {
-    // TextRulerToolkit.log("\t\t"+pSeg.longerPattern);
-    // TextRulerToolkit.log("\t\t"+pSeg.shorterPattern);
-    // }
-    // }
-    // }
-
-    ArrayList<TextRulerRulePattern> resultList = new ArrayList<TextRulerRulePattern>();
-
-    for (ArrayList<RapierPatternSegment> patternSegmentation : matchedCombinationList) {
-      // TODO filter out possible duplicates ?
-      resultList.addAll(getGeneralizationsForPatternSegmentation(patternSegmentation));
-    }
-    return resultList;
-  }
-
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-  // --- THE FINAL RESULT: a genarlization method
-  // -------------------------------------------------------------------------------------------
-  // ----------------------------------------------------------------------------------------------------------------------------------------
-
-  // input: two sequences of rule items (=patterns) that shall be
-  // generalized... matchings are searched for a optimized search
-  // and to get a not too big count of generalizations...
-  // result: a (probably very large!) list of possible generalizations, e.g.
-  // used for all slotfiller generalizations of two rules...
-  public static ArrayList<TextRulerRulePattern> getGeneralizationsForRuleItemPatterns(
-          TextRulerRulePattern pattern1, TextRulerRulePattern pattern2) {
-    ArrayList<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
-
-    // if (TextRulerToolkit.DEBUG)
-    // {
-    // TextRulerToolkit.log("\tgetGeneralizationsForRuleItemPatterns:");
-    // TextRulerToolkit.log("\tPattern1:"+pattern1);
-    // TextRulerToolkit.log("\tPattern2:"+pattern2);
-    // }
-
-    if (pattern1.size() == 0 && pattern2.size() == 0) {
-      return result; // return empty list
-    } else if (pattern1.size() == pattern2.size()) // both have the same
-    // pattern item count
-    {
-      // generalizing is easy then: simply generalize each pair of items:
-      result = getGeneralizationsForRuleItemPatternsOfEqualSize(pattern1, pattern2);
-    } else {
-      // TextRulerToolkit.logIf(TextRulerToolkit.DEBUG && pattern1.size()
-      // == 0 || pattern2.size() == 0, "SpecialCaseWithZeroLength");
-      result = getOptimizedGeneralizationsForRuleItemPatternsOfDistinctSize(pattern1, pattern2);
-    }
-
-    // if (TextRulerToolkit.DEBUG)
-    // {
-    // TextRulerToolkit.log("\t\tGeneralizations: "+result.size());
-    // for (TextRulerRulePattern lggPattern : result)
-    // TextRulerToolkit.log("\t\t\t"+lggPattern);
-    // }
-
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPatternItemMapping.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPatternItemMapping.java
deleted file mode 100755
index 12b25db..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPatternItemMapping.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-public class RapierPatternItemMapping extends RapierPatternSegment {
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPatternSegment.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPatternSegment.java
deleted file mode 100755
index 5d99671..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPatternSegment.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-
-public class RapierPatternSegment {
-
-  TextRulerRulePattern shorterPattern = new TextRulerRulePattern();
-
-  TextRulerRulePattern longerPattern = new TextRulerRulePattern();
-
-  public void debugOutput() {
-
-    TextRulerToolkit.log("\n-------------\nShorterList: ");
-    for (TextRulerRuleItem t : shorterPattern)
-      System.out.print(t.getStringForRuleString(null, null, 0, 1, 0, 1, 0) + "    ");
-    TextRulerToolkit.log("");
-
-    System.out.print("LongerList: ");
-    for (TextRulerRuleItem t : longerPattern)
-      System.out.print(t.getStringForRuleString(null, null, 0, 1, 0, 1, 0) + "    ");
-    TextRulerToolkit.log("");
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPreferencePage.java
deleted file mode 100755
index 3762a97..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierPreferencePage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*

- * 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.ruta.textruler.learner.rapier;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.FieldEditorPreferencePage;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class RapierPreferencePage extends FieldEditorPreferencePage implements

-        IWorkbenchPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.preference.rapier";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public RapierPreferencePage() {

-    super(FieldEditorPreferencePage.GRID);

-    TextRulerLearnerController ctrl = TextRulerController

-            .getControllerForID("org.apache.uima.ruta.textruler.rapier");

-    this.algorithmController = ctrl;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-  protected void createFieldEditors() {

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, getFieldEditorParent());

-            fields.add(l);

-            addField(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_INT_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, getFieldEditorParent());

-            fields.add(l);

-            addField(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            break;

-          }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRule.java
deleted file mode 100755
index ea774ee..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRule.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import java.util.ArrayList;
-
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerSingleSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-
-
-public class RapierRule extends TextRulerSingleSlotRule {
-
-  protected double priority = 0;
-
-  protected RapierRule parent1 = null;
-
-  protected RapierRule parent2 = null;
-
-  protected int parent1PreFiller_n = 0;
-
-  protected int parent2PreFiller_n = 0;
-
-  protected int parent1PostFiller_n = 0;
-
-  protected int parent2PostFiller_n = 0;
-
-  // copy constructor:
-  protected RapierRule(RapierRule copyFrom) {
-    super(copyFrom);
-    priority = copyFrom.priority;
-    parent1 = copyFrom.parent1;
-    parent2 = copyFrom.parent2;
-    parent1PreFiller_n = copyFrom.parent1PreFiller_n;
-    parent2PreFiller_n = copyFrom.parent2PreFiller_n;
-    parent1PostFiller_n = copyFrom.parent1PostFiller_n;
-    parent2PostFiller_n = copyFrom.parent2PostFiller_n;
-  }
-
-  @Override
-  public RapierRule copy() {
-    return new RapierRule(this);
-  }
-
-  public RapierRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target) {
-    super(parentAlgorithm, target);
-  }
-
-  public boolean producesOnlyValidFillers() {
-    return coveringStatistics.getTotalCoveredExamples() > 0
-            && coveringStatistics.getCoveredNegativesCount() == 0;
-  }
-
-  public double noiseValue() {
-    int p = coveringStatistics.getCoveredPositivesCount();
-    int n = coveringStatistics.getCoveredNegativesCount();
-    return ((double) (p - n)) / ((double) (p + n)); // p-n/p+n in,
-    // p=positive fillers,
-    // n=spurious fillers
-  }
-
-  public static double log2(double z) {
-    return Math.log(z) / Math.log(2.0);
-  }
-
-  @Override
-  public void setCoveringStatistics(TextRulerStatisticsCollector c) {
-    super.setCoveringStatistics(c);
-    int p = c.getCoveredPositivesCount();
-    int n = c.getCoveredNegativesCount();
-    if (p < 1) {
-      TextRulerToolkit.log("ERROR, A RULE MAY NOT COVER ZERO POSITIVE EXAMPLES! WHAT'S WRONG ?");
-      TextRulerToolkit.log("\tRULE: " + getRuleString());
-      // make sure this rule is rated totally bad:
-      priority = Double.MAX_VALUE;
-
-    } else {
-      // priority = -(Math.log( ((double)(p+1)) / ((double)(p+n+2))) /
-      // Math.log( 2 )) + (((double)this.calculateRuleSize()) /
-      // ((double)p*100.0));
-      priority = ((this.calculateRuleSize()) / ((double) p * 100))
-              - log2(((double) (p + 1)) / ((double) (p + n + 2)));
-
-      if (priority > 10000 && p > 0) {
-        TextRulerToolkit.log("STRANGE RULE PRIORITY ! CHECK THIS!");
-      }
-    }
-  }
-
-  public double getPriority() {
-    return priority;
-  }
-
-  public RapierRule getParent1() {
-    return parent1;
-  }
-
-  public RapierRule getParent2() {
-    return parent2;
-  }
-
-  public void setParent1(RapierRule p) {
-    parent1 = p;
-  }
-
-  public void setParent2(RapierRule p) {
-    parent2 = p;
-  }
-
-  public int getParent1PreFiller_n() {
-    return this.parent1PreFiller_n;
-  }
-
-  public int getParent2PreFiller_n() {
-    return this.parent2PreFiller_n;
-  }
-
-  public void setParent1PreFiller_n(int n) {
-    this.parent1PreFiller_n = n;
-  }
-
-  public void setParent2PreFiller_n(int n) {
-    this.parent2PreFiller_n = n;
-  }
-
-  public int getParent1PostFiller_n() {
-    return this.parent1PostFiller_n;
-  }
-
-  public int getParent2PostFiller_n() {
-    return this.parent2PostFiller_n;
-  }
-
-  public void setParent1PostFiller_n(int n) {
-    this.parent1PostFiller_n = n;
-  }
-
-  public void setParent2PostFiller_n(int n) {
-    this.parent2PostFiller_n = n;
-  }
-
-  public double calculateRuleSize() {
-    double result = 0;
-    for (TextRulerRuleItem ri : slotPattern.preFillerPattern)
-      result += ((RapierRuleItem) ri).getRuleSizePoints();
-    for (TextRulerRuleItem ri : slotPattern.fillerPattern)
-      result += ((RapierRuleItem) ri).getRuleSizePoints();
-    for (TextRulerRuleItem ri : slotPattern.postFillerPattern)
-      result += ((RapierRuleItem) ri).getRuleSizePoints();
-    return result / 100.0;
-  }
-
-  public boolean hasListItemAtBorder() {
-    int cnt = totalItemCount();
-    if (cnt == 0)
-      return false;
-    RapierRuleItem ri = (RapierRuleItem) getRuleItemWithIndex(0);
-    if (ri.isListItem())
-      return true;
-    if (cnt <= 1)
-      return false;
-    ri = (RapierRuleItem) getRuleItemWithIndex(cnt - 1);
-    return (ri.isListItem());
-  }
-
-  public ArrayList<RapierRule> createAllTestRules() {
-    if (!hasListItemAtBorder())
-      return null;
-    ArrayList<RapierRule> result = new ArrayList<RapierRule>();
-
-    RapierRule strippedRule = copy();
-
-    int leftType = 0; // 0=none; 1=prefiller; 2=filler; 3=postfiller
-    RapierRuleItem left = null;
-    if (slotPattern.preFillerPattern.size() > 0) {
-      leftType = 1;
-      left = (RapierRuleItem) slotPattern.preFillerPattern.get(0);
-      if (left.isListItem())
-        strippedRule.getPreFillerPattern().remove(0);
-    } else if (slotPattern.fillerPattern.size() > 0) {
-      leftType = 2;
-      left = (RapierRuleItem) slotPattern.fillerPattern.get(0);
-      if (left.isListItem())
-        strippedRule.getFillerPattern().remove(0);
-    } else if (slotPattern.postFillerPattern.size() > 0) {
-      leftType = 3;
-      left = (RapierRuleItem) slotPattern.postFillerPattern.get(0);
-      if (left.isListItem())
-        strippedRule.getPostFillerPattern().remove(0);
-    }
-
-    if (left != null && !left.isListItem()) {
-      left = null;
-      leftType = 0;
-    }
-
-    int rightType = 0; // 0=none; 1=postfiller; 2=filler; 3=prefiller
-    RapierRuleItem right = null;
-    if (totalItemCount() > 1) {
-      if (slotPattern.postFillerPattern.size() > 0) {
-        rightType = 1;
-        right = (RapierRuleItem) slotPattern.postFillerPattern.get(slotPattern.postFillerPattern
-                .size() - 1);
-        if (right.isListItem())
-          strippedRule.getPostFillerPattern()
-                  .remove(strippedRule.getPostFillerPattern().size() - 1);
-      } else if (slotPattern.fillerPattern.size() > 0) {
-        rightType = 2;
-        right = (RapierRuleItem) slotPattern.fillerPattern
-                .get(slotPattern.fillerPattern.size() - 1);
-        if (right.isListItem())
-          strippedRule.getFillerPattern().remove(strippedRule.getFillerPattern().size() - 1);
-      } else if (slotPattern.postFillerPattern.size() > 0) {
-        rightType = 3;
-        right = (RapierRuleItem) slotPattern.preFillerPattern.get(slotPattern.preFillerPattern
-                .size() - 1);
-        if (right.isListItem())
-          strippedRule.getPreFillerPattern().remove(strippedRule.getPreFillerPattern().size() - 1);
-      }
-    }
-    if (right != null && !right.isListItem()) {
-      right = null;
-      rightType = 0;
-    }
-    if (left == null && right == null) {
-      TextRulerToolkit.logIfDebug("HOW CAN THIS BE ?");
-      return null;
-    }
-    int leftCount = left != null ? left.listLen() : 0;
-    int rightCount = right != null ? right.listLen() : 0;
-
-    int leftStart;
-    if (leftCount > 0 && !left.listBeginsAtZero())
-      leftStart = 1;
-    else
-      leftStart = 0;
-    int rightStart;
-    if (rightCount > 0 && !right.listBeginsAtZero())
-      rightStart = 1;
-    else
-      rightStart = 0;
-
-    for (int leftI = leftStart; leftI <= leftCount; leftI++)
-      for (int rightI = rightStart; rightI <= rightCount; rightI++) {
-        RapierRule newRule = strippedRule.copy();
-        if (leftI > 0) {
-          TextRulerRulePattern thePattern = null;
-          if (leftType == 1)
-            thePattern = newRule.getPreFillerPattern();
-          else if (leftType == 2)
-            thePattern = newRule.getFillerPattern();
-          else if (leftType == 3)
-            thePattern = newRule.getPostFillerPattern();
-          for (int i = 0; i < leftI; i++) {
-            RapierRuleItem theItem = left.copy();
-            theItem.setListLen(0); // remove List-Character but add
-            // listI copies instead!!
-            thePattern.add(0, theItem);
-          }
-        }
-        if (rightI > 0) {
-          TextRulerRulePattern thePattern = null;
-          if (rightType == 1)
-            thePattern = newRule.getPostFillerPattern();
-          else if (rightType == 2)
-            thePattern = newRule.getFillerPattern();
-          else if (rightType == 3)
-            thePattern = newRule.getPreFillerPattern();
-          for (int i = 0; i < rightI; i++) {
-            RapierRuleItem theItem = right.copy();
-            theItem.setListLen(0); // remove List-Character but add
-            // listI copies instead!!
-            thePattern.add(theItem);
-          }
-        }
-        newRule.setNeedsCompile(true);
-        if (newRule.totalItemCount() > 0) {
-          // TextRulerToolkit.log(newRule.getRuleString());
-          result.add(newRule);
-        }
-      }
-    return result;
-  }
-
-  @Override
-  public String getRulesFileContent() {
-    String theString;
-    if (hasListItemAtBorder()) {
-      ArrayList<RapierRule> rules = createAllTestRules();
-
-      theString = "// " + getRuleString() + "\n\n";
-      for (RapierRule r : rules)
-        theString += r.getRuleString() + "\n";
-    } else
-      theString = getRuleString() + "\n";
-    ;
-    return algorithm.getFileHeaderString(false) + theString;
-  }
-
-  public boolean isInitialRule() {
-    return parent1 == null || parent2 == null;
-  }
-
-  protected boolean compressFirstOccurenceOfSubsequentEqualPatternLists(TextRulerRulePattern p) {
-    for (int i = 0; i < p.size() - 1; i++) {
-      RapierRuleItem it1 = (RapierRuleItem) p.get(i);
-      RapierRuleItem it2 = (RapierRuleItem) p.get(i + 1);
-      if (it1.toStringAsNonPatternList().equals(it2.toStringAsNonPatternList())) {
-        if (it1.isListItem() || it2.isListItem()) {
-          boolean fromZero = it1.listBeginsAtZero() && it2.listBeginsAtZero();
-          int listLen = (it1.isListItem() ? it1.listLen() : 1)
-                  + (it2.isListItem() ? it2.listLen() : 1);
-          it1.setListLen(listLen);
-          it1.setListBeginsAtZero(fromZero);
-          p.remove(i + 1); // remove i2 !
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  public void combineSenselessPatternListItems() {
-    boolean didCompress = false;
-    // String old = new String(getRuleString());
-
-    while (true) {
-      boolean thisRoundCompressed = compressFirstOccurenceOfSubsequentEqualPatternLists(slotPattern.preFillerPattern);
-      thisRoundCompressed |= compressFirstOccurenceOfSubsequentEqualPatternLists(slotPattern.fillerPattern);
-      thisRoundCompressed |= compressFirstOccurenceOfSubsequentEqualPatternLists(slotPattern.postFillerPattern);
-      didCompress |= thisRoundCompressed;
-      if (!thisRoundCompressed)
-        break;
-    }
-
-    if (didCompress) {
-      setNeedsCompile(true);
-      // TextRulerToolkit.log("old: "+old);
-      // TextRulerToolkit.log("new: "+getRuleString());
-    }
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRuleItem.java
deleted file mode 100755
index c273e72..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRuleItem.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerSingleSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-
-public class RapierRuleItem implements TextRulerRuleItem {
-
-  protected Set<TextRulerWordConstraint> words = new HashSet<TextRulerWordConstraint>(); // direct
-
-  // word
-  // match
-  // constraint(s)
-  protected Set<String> tags = new HashSet<String>(); // pos tag constraint(s)
-
-  protected Set<String> classes = new HashSet<String>(); // semantic classes
-
-  // constraint(s)
-  protected int listLen = 0;
-
-  protected boolean listBeginsAtZero = false; // special case for TM RAPIER
-
-  // interpretation...
-
-  public boolean equals(TextRulerRuleItem o) {
-    return getStringForRuleString(null, null, 0, 1, 0, 1, 0).equals(
-            o.getStringForRuleString(null, null, 0, 1, 0, 1, 0));
-  }
-
-  public String toStringAsNonPatternList() {
-    int original = listLen;
-    listLen = 0;
-    String result = toString();
-    listLen = original;
-    return result;
-  }
-
-  public String getStringForRuleString(TextRulerRule rule, MLRuleItemType type,
-          int numberInPattern, int patternSize, int numberInRule, int ruleSize, int slotIndex) {
-    int listStart = listBeginsAtZero ? 0 : 1;
-    String quantifierString = isListItem() ? "[" + listStart + "," + (listLen) + "]?" : "";
-    String anchor = null;
-    ArrayList<String> constraints = new ArrayList<String>();
-
-    if (words.size() > 0) {
-      ArrayList<TextRulerWordConstraint> regExpConstraints = new ArrayList<TextRulerWordConstraint>();
-      ArrayList<TextRulerWordConstraint> tmTypeConstraints = new ArrayList<TextRulerWordConstraint>();
-      for (TextRulerWordConstraint w : this.words) {
-        if (w.isRegExpConstraint())
-          regExpConstraints.add(w);
-        else
-          tmTypeConstraints.add(w);
-      }
-      int regExpCount = regExpConstraints.size();
-      int tmCount = tmTypeConstraints.size();
-
-      String regExpString = null;
-      for (TextRulerWordConstraint w : regExpConstraints) {
-        if (regExpString == null)
-          regExpString = w.toString();
-        else
-          regExpString += "|" + w.toString();
-      }
-      if (regExpString != null) {
-        regExpString = "REGEXP(\"" + regExpString + "\")";
-      }
-
-      String tmString = null;
-      if (tmCount > 1 || (regExpCount > 0 && tmCount > 0)) {
-        for (TextRulerWordConstraint w : tmTypeConstraints) {
-          if (tmString == null)
-            tmString = "IS(" + w.toString() + ")";
-          else
-            tmString += ",IS(" + w.toString() + ")";
-        }
-        String cString = "OR(" + tmString;
-        if (regExpCount > 0) {
-          if (tmCount > 0)
-            cString += ",";
-          cString += regExpString;
-        }
-        cString += ")";
-        constraints.add(cString);
-      } else { // tmCount can here be 0 or 1,
-        // if it is 1, then regExpCount == 0
-        // if it is 0, regExpCount can be anything
-        if (tmCount == 1)
-          anchor = tmTypeConstraints.get(0).toString(); // +quantifierString;
-        else {
-          if (regExpCount > 0)
-            constraints.add(regExpString);
-        }
-      }
-    }
-
-    if (tags.size() > 0) {
-      if (tags.size() == 1 && anchor == null)
-        anchor = tags.iterator().next().toString();
-      else {
-        String tagsString = null;
-        for (String w : this.tags) {
-          if (tagsString == null)
-            tagsString = "IS(" + w.toString() + ")";
-          else
-            tagsString += ",IS(" + w.toString() + ")";
-        }
-        tagsString = "OR(" + tagsString + ")";
-        constraints.add(tagsString);
-      }
-    }
-
-    if (classes.size() > 0) {
-      if (classes.size() == 1 && anchor == null)
-        anchor = classes.iterator().next().toString();
-      else {
-        String classesString = null;
-        for (String w : this.classes) {
-          if (classesString == null)
-            classesString = "IS(" + w.toString() + ")";
-          else
-            classesString += ",IS(" + w.toString() + ")";
-        }
-        classesString = "OR(" + classesString + ")";
-        constraints.add(classesString);
-      }
-    }
-
-    if (anchor == null)
-      anchor = "ALL";
-
-    String result = anchor + quantifierString;
-
-    if (constraints.size() > 0) {
-      String cStr = null;
-      for (String c : constraints) {
-        if (cStr == null)
-          cStr = c.toString();
-        else
-          cStr += "," + c.toString();
-      }
-      // TODO richtig?
-      result += "{" + cStr;
-    }
-
-    if (type == MLRuleItemType.FILLER && (numberInPattern == 0)) {
-      if (constraints.size() == 0)
-        result += "{";
-      result += "->MARKONCE(" + ((TextRulerSingleSlotRule) rule).getMarkName();
-      if (patternSize > 1)
-        result += ", " + (numberInRule + 1) + ", " + (numberInRule + patternSize);
-      // for(int i=0;i < patternSize;i++) {
-      // result += ","+(i+numberInRule+1);
-      // }
-      result += ")}";
-    } else if (constraints.size() != 0)
-      result += "}";
-    return result;
-  }
-
-  public Set<TextRulerWordConstraint> getWordConstraints() {
-    return words;
-  }
-
-  public Set<String> getTagConstraints() {
-    return tags;
-  }
-
-  public Set<String> getClassConstraints() {
-    return classes;
-  }
-
-  public void setListLen(int val) {
-    this.listLen = val;
-  }
-
-  public void setListBeginsAtZero(boolean flag) {
-    this.listBeginsAtZero = flag;
-  }
-
-  public boolean listBeginsAtZero() {
-    return listBeginsAtZero;
-  }
-
-  public int listLen() {
-    return listLen;
-  }
-
-  public boolean isListItem() {
-    return (listBeginsAtZero && listLen > 0) || (listLen > 1);
-  }
-
-  public RapierRuleItem copy() {
-    RapierRuleItem newItem = new RapierRuleItem();
-    newItem.words = new HashSet<TextRulerWordConstraint>(words);
-    newItem.tags = new HashSet<String>(tags);
-    newItem.classes = new HashSet<String>(classes);
-    newItem.listLen = listLen;
-    newItem.listBeginsAtZero = listBeginsAtZero;
-    return newItem;
-  }
-
-  public int getRuleSizePoints() {
-    int result = this.isListItem() ? 3 : 2; // 3 for a list pattern item. 2
-    // for a normal pattern item
-    if (words.size() > 1)
-      result += (words.size() - 1) * 2; // every disjunct in WORD
-    // constraint counts 2
-    if (tags.size() > 1)
-      result += tags.size() - 1; // every disjunct in POS TAG constraint
-    // counts 1
-    if (classes.size() > 1)
-      result += classes.size() - 1; // every disjunct in CLASS constraint
-    // counts 1
-    return result;
-  }
-
-  public void addWordConstraints(Collection<TextRulerWordConstraint> constraints) {
-    words.addAll(constraints);
-  }
-
-  public void addTagConstraints(Collection<String> constraints) {
-    tags.addAll(constraints);
-  }
-
-  public void addClassConstraints(Collection<String> constraints) {
-    classes.addAll(constraints);
-  }
-
-  public void addWordConstraint(TextRulerWordConstraint constraint) {
-    words.add(constraint);
-  }
-
-  public void addTagConstraint(String constraint) {
-    tags.add(constraint);
-  }
-
-  public void addClassConstraint(String constraint) {
-    classes.add(constraint);
-  }
-
-  @Override
-  public String toString() {
-    return getStringForRuleString(null, null, 0, 0, 0, 0, 0);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRulePriorityQueue.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRulePriorityQueue.java
deleted file mode 100755
index a52ea97..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/rapier/RapierRulePriorityQueue.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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.ruta.textruler.learner.rapier;
-
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.PriorityQueue;
-
-public class RapierRulePriorityQueue implements Iterable<RapierRule> {
-
-  private PriorityQueue<RapierRule> ruleList;
-
-  private PriorityQueue<RapierRule> reverseRuleList;
-
-  private int maxSize;
-
-  public RapierRulePriorityQueue(int maxSize) {
-    this.maxSize = maxSize;
-
-    ruleList = new PriorityQueue<RapierRule>(maxSize, new Comparator<RapierRule>() {
-      public int compare(RapierRule o1, RapierRule o2) {
-        if (o1.getPriority() > o2.getPriority())
-          return 1;
-        else if (o1.getPriority() < o2.getPriority())
-          return -1;
-        else
-          return 0;
-      }
-    });
-    this.reverseRuleList = new PriorityQueue<RapierRule>(maxSize, new Comparator<RapierRule>() {
-      public int compare(RapierRule o1, RapierRule o2) {
-        if (o1.getPriority() < o2.getPriority())
-          return 1;
-        else if (o1.getPriority() > o2.getPriority())
-          return -1;
-        else
-          return 0;
-      }
-    });
-  }
-
-  public Iterator<RapierRule> iterator() {
-    return ruleList.iterator();
-  }
-
-  public void clear() {
-    ruleList.clear();
-    reverseRuleList.clear();
-  }
-
-  public void addAll(Collection<RapierRule> rules) {
-    for (RapierRule r : rules)
-      add(r);
-  }
-
-  public void add(RapierRule rule) {
-    ruleList.add(rule);
-    reverseRuleList.add(rule);
-    while (ruleList.size() > maxSize) {
-      Object tail = reverseRuleList.peek();
-      ruleList.remove(tail);
-      reverseRuleList.remove(tail);
-    }
-    // TextRulerToolkit.log("ADD TO RULE LIST, SIZE="+ruleList.size()+"    revSize="+reverseRuleList.size());
-    // for (RapierRule r : ruleList)
-    // {
-    // TextRulerToolkit.log("Rule Value: "+r.getPriority()+"  peek: "+ruleList.peek().getPriority());
-    // }
-  }
-
-  public RapierRule peek() {
-    return ruleList.peek();
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationError.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationError.java
deleted file mode 100644
index 82642d7..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationError.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import org.apache.uima.ruta.textruler.core.TextRulerExample;

-

-public class AnnotationError implements Comparable<AnnotationError> {

-  private TextRulerExample error;

-

-  private TextRulerExample truth;

-

-  private AnnotationErrorType type;

-

-  public AnnotationError(TextRulerExample error, TextRulerExample truth, AnnotationErrorType type) {

-    this.error = error;

-    this.truth = truth;

-    this.type = type;

-  }

-

-  public TextRulerExample getError() {

-    return error;

-  }

-

-  public TextRulerExample getTruth() {

-    return truth;

-  }

-

-  public AnnotationErrorType getType() {

-    return type;

-  }

-

-  public TrabalAnnotation getAnnotation() {

-    if (error != null)

-      return (TrabalAnnotation) error.getAnnotation();

-    return null;

-  }

-

-  public TrabalAnnotation getTargetAnnotation() {

-    if (truth != null)

-      return (TrabalAnnotation) truth.getAnnotation();

-    return null;

-  }

-

-  @Override

-  public String toString() {

-    if (error != null && truth != null)

-      return type + ": " + error.getAnnotation().getType().getShortName() + "("

-              + error.getAnnotation().getBegin() + ", " + error.getAnnotation().getEnd() + ") -> "

-              + truth.getAnnotation().getType().getShortName() + "("

-              + truth.getAnnotation().getBegin() + ", " + truth.getAnnotation().getEnd() + ")";

-    if (truth != null)

-      return type + ": " + truth.getAnnotation().getType().getShortName() + "("

-              + truth.getAnnotation().getBegin() + ", " + truth.getAnnotation().getEnd() + ")";

-    return type + ": " + error.getAnnotation().getType().getShortName() + "("

-            + error.getAnnotation().getBegin() + ", " + error.getAnnotation().getEnd() + ")";

-  }

-

-  public int compareTo(AnnotationError o) {

-    if (error != null) {

-      if (o.getError() != null) {

-        int comp = error.getAnnotation().getType().toString()

-                .compareTo(o.getError().getAnnotation().getType().toString());

-        if (comp != 0)

-          return comp;

-      } else

-        return 1;

-    } else if (o.getError() != null)

-      return -1;

-    if (truth != null) {

-      if (o.getTruth() != null) {

-        int comp = truth.getAnnotation().getType().toString()

-                .compareTo(o.getTruth().getAnnotation().getType().toString());

-        if (comp != 0)

-          return comp;

-      } else

-        return 1;

-    } else if (o.getTruth() != null)

-      return -1;

-    return type.compareTo(o.getType());

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationErrorType.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationErrorType.java
deleted file mode 100644
index ee3a0e3..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationErrorType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-public enum AnnotationErrorType {

-  CORRECTION, SHIFTING_LEFT, SHIFTING_RIGHT, EXPANSION, DELETION, ANNOTATION

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationRule.java
deleted file mode 100644
index 3248d6a..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/AnnotationRule.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.ArrayList;

-

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-

-public class AnnotationRule extends TrabalRule {

-

-  private TrabalRuleItem frontBoundaryItem;

-

-  private TrabalRuleItem rearBoundaryItem;

-

-  public AnnotationRule(TrabalLearner parentAlgorithm, TextRulerTarget target,

-          TrabalAnnotation targetAnnotation) {

-    super(parentAlgorithm, target);

-    this.targetAnnotation = targetAnnotation;

-    this.errorType = AnnotationErrorType.ANNOTATION;

-    addConditionTypes();

-  }

-

-  public AnnotationRule(AnnotationRule copyFrom) {

-    super((TrabalLearner) copyFrom.algorithm, copyFrom.target);

-    this.targetAnnotation = copyFrom.targetAnnotation;

-    this.errorType = AnnotationErrorType.ANNOTATION;

-    this.frontBoundaryItem = copyFrom.frontBoundaryItem;

-    this.rearBoundaryItem = copyFrom.rearBoundaryItem;

-    this.conditions = new ArrayList<Condition>();

-    for (Condition c : copyFrom.conditions)

-      conditions.add(c.clone());

-    addConditionTypes();

-  }

-

-  private void addConditionTypes() {

-    conditionTypes = new ArrayList<ConditionType>();

-    conditionTypes.add(ConditionType.STARTSWITH);

-    conditionTypes.add(ConditionType.ENDSWITH);

-    conditionTypes.add(ConditionType.CONTAINS);

-    conditionTypes.add(ConditionType.PARTOF);

-  }

-

-  public void compileRuleString() {

-    boolean frontItemInBorders = frontBoundaryItem.getAnnotation().getBegin() == targetAnnotation

-            .getBegin();

-    boolean rearItemInBorders = rearBoundaryItem.getAnnotation().getEnd() == targetAnnotation

-            .getEnd();

-

-    // this string will be attached to the front boundary item

-    String after = parseConditions(ConditionType.AFTER);

-    if (after.length() > 0)

-      after = "{" + after + "}";

-

-    // this string will be attached to the rear boundary item

-    String before = parseConditions(ConditionType.BEFORE);

-    if (before.length() > 0)

-      before = "{" + before + "}";

-

-    // these strings will be attached to the brackets

-    String conditions = parseConditions(conditionTypes);

-    if (conditions.length() > 0)

-      conditions += ", ";

-    String nPartof = "-PARTOF(" + targetAnnotation.getType().getShortName() + ")";

-    String mark;

-    if (((TrabalLearner) algorithm).getEnableFeatures())

-      mark = "-> CREATE(" + targetAnnotation.getType().getShortName() + parseFeatures() + ")";

-    else

-      mark = "-> MARK(" + targetAnnotation.getType().getShortName() + ")";

-    String action = "{" + conditions + nPartof + " " + mark + "}";

-

-    // These are the four possible patterns:

-    // ( frontBoundaryItem after ANY*? rearBoundaryItem before ) action ;

-    // frontBoundaryItem after ( ANY*? rearBoundaryItem before ) action ;

-    // ( frontBoundaryItem after ANY*? ) action rearBoundaryItem before ;

-    // frontBoundaryItem after ( ANY*? ) action rearBoundaryItem before ;

-

-    ruleString = "";

-

-    // If the front item is part of the future annotation, it has to be included in the brackets.

-    if (frontItemInBorders)

-      ruleString += "(" + frontBoundaryItem + after + " ";

-    else

-      ruleString += frontBoundaryItem + after + " (";

-

-    // We include all tokens between the boundaries.

-    ruleString += "ANY*{-PARTOF(" + rearBoundaryItem + ")}"; // like ANY*? but faster

-//    ruleString += "#{-CONTAINS(" + rearBoundaryItem + ")}"; // like ... but faster

-    

-    

-    // Check, if the rear item should be included and mark all tokens between the brackets as the

-    // new annotation.

-    if (rearItemInBorders)

-      ruleString += " " + rearBoundaryItem + before + ")" + action + ";";

-    else

-      ruleString += ")" + action + " " + rearBoundaryItem + before + ";";

-

-    setNeedsCompile(false);

-  }

-

-  public boolean contains(TrabalAnnotation target) {

-    if (target != null) {

-      if (targetAnnotation.getType().getShortName().equals(target.getType().getShortName())) {

-        return true;

-      }

-      if (frontBoundaryItem.getName().equals(target.getType().getShortName()))

-        return true;

-      if (rearBoundaryItem.getName().equals(target.getType().getShortName()))

-        return true;

-      for (Condition each : getConditions())

-        if (each.getItem().getName().equals(target.getType().getShortName()))

-          return true;

-    }

-    return false;

-  }

-

-  public boolean hasSameBasicRule(TrabalRule rule) {

-    if (rule.getAnnotation() != null)

-      return false;

-    if (rule.getTargetAnnotation() == null)

-      return false;

-    if (!rule.getTargetAnnotation().getType().getShortName()

-            .equals(targetAnnotation.getType().getShortName()))

-      return false;

-    return true;

-  }

-

-  @Override

-  public TrabalRuleItem getFrontBoundary() {

-    return frontBoundaryItem;

-  }

-

-  public void setFrontBoundary(TrabalRuleItem item) {

-    frontBoundaryItem = item;

-  }

-

-  @Override

-  public TrabalRuleItem getRearBoundary() {

-    return rearBoundaryItem;

-  }

-

-  public void setRearBoundary(TrabalRuleItem item) {

-    rearBoundaryItem = item;

-  }

-

-  @Override

-  public TrabalRule copy() {

-    return new AnnotationRule(this);

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/Condition.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/Condition.java
deleted file mode 100644
index b8bccc9..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/Condition.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-

-/**

- * Conditions can be attached to TraBaL rules to reduce the chance of overfitting.

- * 

- */

-public class Condition {

-

-  private ConditionType type;

-

-  private TrabalRuleItem item;

-

-  private boolean isNegative = false;

-

-  private boolean isExpansionCondition = false;

-

-  public Condition(ConditionType type, TrabalRuleItem item) {

-    this.type = type;

-    this.item = item;

-  }

-

-  public Condition(ConditionType type, TrabalRuleItem item, boolean isNegative,

-          boolean isExpansionCondition) {

-    this.type = type;

-    this.item = item;

-    this.isNegative = isNegative;

-    this.isExpansionCondition = isExpansionCondition;

-  }

-

-  public ConditionType getType() {

-    return type;

-  }

-

-  public TrabalRuleItem getItem() {

-    return item;

-  }

-

-  public boolean isNegative() {

-    return isNegative;

-  }

-

-  public void setNegative() {

-    isNegative = true;

-  }

-

-  public void setPositive() {

-    isNegative = false;

-  }

-  

-  public void changePosNegValue() {

-    isNegative = !isNegative;

-  }

-

-  public boolean isExpansionCondition() {

-    return isExpansionCondition;

-  }

-

-  public void setExpansionCondition() {

-    isExpansionCondition = true;

-  }

-

-  @Override

-  public boolean equals(Object obj) {

-    if (this == obj)

-      return true;

-    if (obj == null)

-      return false;

-    if (getClass() != obj.getClass())

-      return false;

-    Condition other = (Condition) obj;

-    if (type != other.getType())

-      return false;

-    if (!item.getName().equals(other.getItem().getName()))

-      return false;

-    if (isNegative != other.isNegative)

-      return false;

-    return true;

-  }

-

-  @Override

-  public int hashCode() {

-    return toString().hashCode();

-  }

-

-  @Override

-  public String toString() {

-    if (isNegative)

-      return "-" + type.getConditionString(item.toString());

-    return type.getConditionString(item.toString());

-  }

-

-  @Override

-  public Condition clone() {

-    Condition result = new Condition(type, item, isNegative, isExpansionCondition);

-    return result;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ConditionType.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ConditionType.java
deleted file mode 100644
index 6a852c3..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ConditionType.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-/**

- * The type of a TraBaL condition. The attached comments show the corresponding RUTA-Conditions -

- * see RUTA rules for details.

- * 

- */

-public enum ConditionType {

-

-  STARTSWITH("STARTSWITH(", ")"),

-

-  ENDSWITH("ENDSWITH(", ")"),

-

-  AFTER("NEAR(", ", 1, 1, false, true)"),

-

-  BEFORE("NEAR(", ", 1, 1, true, true)"),

-

-  PARTOF("PARTOF(", ")"),

-

-  CONTAINS("CONTAINS(", ")");

-

-  String prefix, suffix;

-

-  private ConditionType(String prefix, String suffix) {

-    this.prefix = prefix;

-    this.suffix = suffix;

-  }

-

-  public String getConditionString(String annotation) {

-    return prefix + annotation + suffix;

-  }

-  

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/CorrectionRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/CorrectionRule.java
deleted file mode 100644
index cb2ac9d..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/CorrectionRule.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.ArrayList;

-

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-

-public class CorrectionRule extends TrabalRule {

-

-  public CorrectionRule(TrabalLearner parentAlgorithm, TextRulerTarget target,

-          TrabalAnnotation annotation, TrabalAnnotation targetAnnotation) {

-    super(parentAlgorithm, target);

-    this.annotation = annotation;

-    this.targetAnnotation = targetAnnotation;

-    this.errorType = AnnotationErrorType.CORRECTION;

-    addConditionTypes();

-  }

-

-  public CorrectionRule(CorrectionRule copyFrom) {

-    super((TrabalLearner) copyFrom.algorithm, copyFrom.target);

-    this.annotation = copyFrom.annotation;

-    this.targetAnnotation = copyFrom.targetAnnotation;

-    this.errorType = AnnotationErrorType.CORRECTION;

-    this.conditions = new ArrayList<Condition>();

-    for (Condition c : copyFrom.conditions)

-      conditions.add(c.clone());

-    addConditionTypes();

-  }

-

-  private void addConditionTypes() {

-    conditionTypes = new ArrayList<ConditionType>();

-    conditionTypes.add(ConditionType.BEFORE);

-    conditionTypes.add(ConditionType.AFTER);

-    conditionTypes.add(ConditionType.STARTSWITH);

-    conditionTypes.add(ConditionType.ENDSWITH);

-    conditionTypes.add(ConditionType.CONTAINS);

-    conditionTypes.add(ConditionType.PARTOF);

-  }

-

-  public void compileRuleString() {

-    // parse conditions and add space if needed

-    String conditions = parseConditions(conditionTypes);

-    if (conditions.length() > 0)

-      conditions += " ";

-    // assemble rule string

-    if (((TrabalLearner) algorithm).getEnableFeatures()) {

-      ruleString = annotation.getType().getShortName() + "{" + conditions + "-> UNMARK("

-              + annotation.getType().getShortName() + ", true), CREATE("

-              + targetAnnotation.getType().getShortName() + parseFeatures() + ")};";

-    } else {

-      ruleString = annotation.getType().getShortName() + "{" + conditions + "-> UNMARK("

-              + annotation.getType().getShortName() + ", true), MARK("

-              + targetAnnotation.getType().getShortName() + ")};";

-    }

-    setNeedsCompile(false);

-  }

-

-  public boolean contains(TrabalAnnotation target) {

-    if (target == null)

-      return false;

-    if (annotation.getType().getShortName().equals(target.getType().getShortName()))

-      return true;

-    if (targetAnnotation.getType().getShortName().equals(target.getType().getShortName()))

-      return true;

-    for (Condition each : getConditions())

-      if (each.getItem().getName().equals(target.getType().getShortName()))

-        return true;

-    return false;

-  }

-

-  public boolean hasSameBasicRule(TrabalRule rule) {

-    if (rule.getAnnotation() == null)

-      return false;

-    if (!rule.getAnnotation().getType().equals(annotation.getType()))

-      return false;

-    if (rule.getTargetAnnotation() == null)

-      return false;

-    if (!rule.getTargetAnnotation().getType().equals(targetAnnotation.getType()))

-      return false;

-    return true;

-  }

-

-  @Override

-  public TrabalRuleItem getFrontBoundary() {

-    return new TrabalRuleItem(annotation);

-  }

-

-  @Override

-  public TrabalRuleItem getRearBoundary() {

-    return new TrabalRuleItem(annotation);

-  }

-

-  @Override

-  public TrabalRule copy() {

-    return new CorrectionRule(this);

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/DeletionRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/DeletionRule.java
deleted file mode 100644
index ec0199b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/DeletionRule.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.ArrayList;

-

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-

-public class DeletionRule extends TrabalRule {

-

-  public DeletionRule(TrabalLearner parentAlgorithm, TextRulerTarget target,

-          TrabalAnnotation annotation) {

-    super(parentAlgorithm, target);

-    this.annotation = annotation;

-    this.errorType = AnnotationErrorType.DELETION;

-    addConditionTypes();

-  }

-

-  public DeletionRule(DeletionRule copyFrom) {

-    super((TrabalLearner) copyFrom.algorithm, copyFrom.target);

-    this.annotation = copyFrom.annotation;

-    this.errorType = AnnotationErrorType.DELETION;

-    this.conditions = new ArrayList<Condition>();

-    for (Condition c : copyFrom.conditions)

-      conditions.add(c.clone());

-    addConditionTypes();

-  }

-

-  private void addConditionTypes() {

-    conditionTypes = new ArrayList<ConditionType>();

-    conditionTypes.add(ConditionType.BEFORE);

-    conditionTypes.add(ConditionType.AFTER);

-    conditionTypes.add(ConditionType.STARTSWITH);

-    conditionTypes.add(ConditionType.ENDSWITH);

-    conditionTypes.add(ConditionType.CONTAINS);

-    conditionTypes.add(ConditionType.PARTOF);

-  }

-

-  public void compileRuleString() {

-    ruleString = annotation.getType().getShortName() + "{" + parseConditions(conditionTypes)

-            + "-> UNMARK(" + annotation.getType().getShortName() + ", true)};";

-    setNeedsCompile(false);

-  }

-

-  public boolean contains(TrabalAnnotation target) {

-    if (target != null) {

-      if (annotation.getType().getShortName().equals(target.getType().getShortName()))

-        return true;

-      for (Condition each : getConditions())

-        if (each.getItem().getName().equals(target.getType().getShortName()))

-          return true;

-    }

-    return false;

-  }

-

-  public boolean hasSameBasicRule(TrabalRule rule) {

-    if (rule.getTargetAnnotation() != null)

-      return false;

-    if (rule.getAnnotation() == null)

-      return false;

-    if (!rule.getAnnotation().getType().getShortName().equals(annotation.getType().getShortName()))

-      return false;

-    return true;

-  }

-

-  @Override

-  public TrabalRuleItem getFrontBoundary() {

-    return new TrabalRuleItem(annotation);

-  }

-

-  @Override

-  public TrabalRuleItem getRearBoundary() {

-    return new TrabalRuleItem(annotation);

-  }

-

-  @Override

-  public TrabalRule copy() {

-    return new DeletionRule(this);

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ExpansionRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ExpansionRule.java
deleted file mode 100644
index 38dd1c3..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ExpansionRule.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.List;

-

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-

-public class ExpansionRule extends ShiftingRule {

-

-  public ExpansionRule(TrabalLearner parentAlgorithm, TextRulerTarget target,

-          TrabalAnnotation annotation, TrabalAnnotation targetAnnotation,

-          AnnotationErrorType errorType) {

-    super(parentAlgorithm, target, annotation, targetAnnotation, errorType);

-  }

-

-  public ExpansionRule(ExpansionRule copyFrom) {

-    super(copyFrom);

-  }

-

-  @Override

-  public void compileRuleString() {

-    ruleString = "";

-

-    int errorBegin = annotation.getBegin();

-    int truthBegin = targetAnnotation.getBegin();

-    int truthEnd = targetAnnotation.getEnd();

-    boolean expandToLeft = truthBegin < errorBegin;

-

-    if (expandToLeft) // (frontBoundaryItem ANY*? annotation){-> MARK(targetAnnotation)};

-      expandToLeft(truthBegin);

-    else

-      // (annotation ANY*? rearBoundaryItem){-> MARK(targetAnnotation)};

-      expandToRight(truthEnd);

-    setNeedsCompile(false);

-  }

-

-  private void expandToLeft(int truthBegin) {

-    // should the boundary item be part of the new annotation?

-    boolean frontItemInBorders = frontBoundaryItem.getAnnotation().getBegin() == truthBegin;

-

-    // parse the positive conditions

-    String conditions = parseConditions(conditionTypes, true);

-    if (conditions.length() > 0)

-      conditions += " ";

-

-    // parse the negative conditions

-    conditionTypes.add(ConditionType.BEFORE);

-    String negativeConditions = parseConditions(conditionTypes, false);

-    if (negativeConditions.length() > 0)

-      negativeConditions += " ";

-

-    String before = parseConditions(ConditionType.BEFORE, true);

-    if (before.length() > 0 && negativeConditions.length() > 0)

-      negativeConditions = before + ", " + negativeConditions;

-    else if (before.length() > 0)

-      negativeConditions = before + " ";

-

-    // this strings will be attached to the original annotation

-    String unmark = "{" + negativeConditions + "-> UNMARK(" + annotation.getType().getShortName()

-            + ")}";

-

-    // this string will be attached to the front boundary item

-    String after = parseConditions(ConditionType.AFTER);

-    if (after.length() > 0)

-      after = "{" + after + "}";

-

-    // If the front item is part of the future annotation, it has to be included in the brackets.

-    if (frontItemInBorders)

-      ruleString += "(" + frontBoundaryItem + after + " ";

-    else

-      ruleString += frontBoundaryItem + after + " (";

-

-    // We include all tokens between the boundaries.

-    ruleString += "ANY*{-PARTOF(" + annotation.getType().getShortName() + ")} "; // like ANY*? but

-    // faster

-//    ruleString += "#{-CONTAINS(" + annotation.getType().getShortName() + ")} ";

-    

-    // these strings will be attached to the brackets

-    String mark;

-    if (((TrabalLearner) algorithm).getEnableFeatures())

-      mark = "-> CREATE(" + targetAnnotation.getType().getShortName() + parseFeatures() + ")";

-    else

-      mark = "-> MARK(" + targetAnnotation.getType().getShortName() + ")";

-    String action = "{" + conditions + mark + "}";

-

-    // The original annotation represents the rear boundary item

-    ruleString += annotation.getType().getShortName() + unmark + ")" + action + ";";

-  }

-

-  private void expandToRight(int truthEnd) {

-    // should the boundary items be part of the new annotation?

-    boolean rearItemInBorders = rearBoundaryItem.getAnnotation().getEnd() == truthEnd;

-

-    // parse the positive conditions

-    String conditions = parseConditions(conditionTypes, true);

-    if (conditions.length() > 0)

-      conditions += " ";

-

-    // parse the negative conditions

-    conditionTypes.add(ConditionType.AFTER);

-    String negativeConditions = parseConditions(conditionTypes, false);

-    if (negativeConditions.length() > 0)

-      negativeConditions += " ";

-

-    String after = parseConditions(ConditionType.AFTER, true);

-    if (after.length() > 0 && negativeConditions.length() > 0)

-      negativeConditions = after + ", " + negativeConditions;

-    else if (after.length() > 0)

-      negativeConditions = after + " ";

-

-    // this strings will be attached to the original annotation

-    String unmark = "{" + negativeConditions + "-> UNMARK(" + annotation.getType().getShortName()

-            + ")}";

-

-    // The original annotation represents the front boundary item

-    ruleString += "(" + annotation.getType().getShortName() + unmark + " ";

-

-    // We include all tokens between the boundaries.

-    ruleString += "ANY*{-PARTOF(" + rearBoundaryItem + ")}"; // like ANY*? but faster

-//    ruleString += "#{-CONTAINS(" + rearBoundaryItem + ")}"; // like ... but faster

-    

-    // these strings will be attached to the brackets

-    String mark;

-    if (((TrabalLearner) algorithm).getEnableFeatures())

-      mark = "-> CREATE(" + targetAnnotation.getType().getShortName() + parseFeatures() + ")";

-    else

-      mark = "-> MARK(" + targetAnnotation.getType().getShortName() + ")";

-    String action = "{" + conditions + mark + "}";

-

-    // this string will be attached to the rear boundary item

-    String before = parseConditions(ConditionType.BEFORE);

-    if (before.length() > 0)

-      before = "{" + before + "}";

-

-    // If the rear item is part of the future annotation, it has to be included in the brackets

-    if (rearItemInBorders)

-      ruleString += " " + rearBoundaryItem + before + ")" + action + ";";

-    else

-      ruleString += ")" + action + " " + rearBoundaryItem + before + ";";

-  }

-

-  /**

-   * Parse either the positive or the negative conditions without negation mark.

-   * 

-   * @param types

-   *          the types, that should be parsed

-   * @param positive

-   *          true for positive, false for negative conditions

-   * @return String with parsed conditions

-   */

-  private String parseConditions(List<ConditionType> types, boolean positive) {

-    String result = "";

-    for (Condition each : conditions)

-      if (types.contains(each.getType()) && each.isNegative() != positive)

-        if (each.isNegative()) {

-          each.changePosNegValue();

-          result += each + ", ";

-          each.changePosNegValue();

-        } else

-          result += each + ", ";

-    if (result.length() > 0)

-      return result.substring(0, result.length() - 2);

-    return "";

-  }

-

-  /**

-   * Parse either the positive or the negative conditions without negation mark.

-   * 

-   * @param type

-   *          the type, that should be parsed

-   * @param positive

-   *          true for positive, false for negative conditions

-   * @return String with parsed conditions

-   */

-  private String parseConditions(ConditionType type, boolean positive) {

-    String result = "";

-    for (Condition each : conditions)

-      if (each.getType() == type && each.isNegative() != positive)

-        if (each.isNegative()) {

-          each.changePosNegValue();

-          result += each + ", ";

-          each.changePosNegValue();

-        } else

-          result += each + ", ";

-    if (result.length() > 0)

-      return result.substring(0, result.length() - 2);

-    return "";

-  }

-

-  @Override

-  public TrabalRule copy() {

-    return new ExpansionRule(this);

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/RankedList.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/RankedList.java
deleted file mode 100644
index 100aa3e..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/RankedList.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-public class RankedList extends ArrayList<Condition> {

-

-  private static final long serialVersionUID = -5978107285325156323L;

-

-  Map<Condition, Double> ranking;

-

-  Map<String, Double> idf;

-

-  public RankedList(Map<String, Double> i) {

-    super();

-    ranking = new HashMap<Condition, Double>();

-    idf = i;

-  }

-

-  public RankedList(Collection<? extends Condition> c, Map<String, Double> i) {

-    super();

-    ranking = new HashMap<Condition, Double>();

-    idf = i;

-    addAll(c);

-  }

-

-  /**

-   * Adds the item to the list and increases its ranking by one.

-   * 

-   * @return true, if the item was newly inserted into the list.

-   */

-  public boolean add(Condition e) {

-    boolean result;

-    double value;

-    if (idf.containsKey(e.getItem().getAnnotation().getType().getShortName()))

-      value = idf.get(e.getItem().getAnnotation().getType().getShortName());

-    else

-      value = 1.0;

-    if (ranking.containsKey(e)) {

-      Double rank = ranking.get(e);

-      rank = new Double(rank.doubleValue() + value);

-      ranking.put(e, rank);

-      result = false;

-    } else {

-      super.add(e);

-      ranking.put(e, new Double(value));

-      result = true;

-    }

-    return result;

-  }

-

-  /**

-   * Adds the item to the list and increases its ranking by the given number.

-   * 

-   */

-  public void add(double index, Condition e) {

-    if (ranking.containsKey(e)) {

-      Double rank = ranking.get(e);

-      rank = new Double(rank.doubleValue() + index);

-      ranking.put(e, rank);

-    } else {

-      super.add(e);

-      ranking.put(e, new Double(index));

-    }

-  }

-

-  /**

-   * Adds the items to the ranked list and increases their ranking by their value in the given list.

-   * 

-   */

-  public void addAll(RankedList list) {

-    for (Condition each : list) {

-      add(list.rankingOf(each), each);

-    }

-  }

-

-  /**

-   * Adds the items to the list and increases their ranking by one.

-   * 

-   */

-  public boolean addAll(Collection<? extends Condition> c) {

-    for (Condition each : c) {

-      add(each);

-    }

-    return true;

-  }

-

-  /**

-   * Adds the items to the list and increases their ranking by the given number.

-   * 

-   */

-  public boolean addAll(double index, Collection<? extends Condition> c) {

-    for (Condition each : c) {

-      add(index, each);

-    }

-    return true;

-  }

-

-  public Condition remove(int index) {

-    Condition element = super.get(index);

-    if (element != null) {

-      if (ranking.containsKey(element)) {

-        ranking.remove(element);

-        super.remove(index);

-        return element;

-      }

-    }

-    return null;

-  }

-

-  public boolean remove(Object o) {

-    if (size() > 0) {

-      if (contains(o) && ranking.containsKey(o)) {

-        super.remove(o);

-        ranking.remove(o);

-        return true;

-      }

-    }

-    return false;

-  }

-

-  public List<Condition> subList(int start, int end) {

-    return super.subList(start, end);

-  }

-

-  public boolean contains(Object o) {

-    return super.contains(o);

-  }

-

-  public void clear() {

-    super.clear();

-    ranking.clear();

-  }

-

-  public int size() {

-    return super.size();

-  }

-

-  public RankedList clone() {

-    RankedList clone = new RankedList(idf);

-    for (Condition element : subList(0, size())) {

-      clone.add(rankingOf(element), element.clone());

-    }

-    return clone;

-  }

-

-  public Condition get(int i) {

-    return super.get(i);

-  }

-

-  /**

-   * Returns the ranking of the given object.

-   * 

-   * @param each

-   * @return ranking

-   */

-  public double rankingOf(Condition each) {

-    if (contains(each)) {

-      return ranking.get(each).doubleValue();

-    }

-    return 0;

-  }

-

-  public Map<Condition, Double> getRanking() {

-    return ranking;

-  }

-

-  /**

-   * Sorts the elements of the list in order of its ranking.

-   */

-  public void sort() {

-    List<Condition> newList = new ArrayList<Condition>();

-    for (int i = 0; i < size(); i++) {

-      for (int j = 0; j < newList.size(); j++) {

-        if (ranking.get(get(i)).doubleValue() >= ranking.get(newList.get(j)).doubleValue()) {

-          newList.add(j, get(i));

-          break;

-        }

-      }

-      if (!newList.contains(get(i)))

-        newList.add(get(i));

-    }

-    super.clear();

-    super.addAll(newList);

-  }

-

-  /**

-   * Unites the lists and adds their values for common elements.

-   * 

-   * @param list

-   *          A list of the same type.

-   */

-  public RankedList unite(RankedList list) {

-    RankedList clone = clone();

-    for (Condition element : list.subList(0, list.size())) {

-      clone.add(list.rankingOf(element), element.clone());

-    }

-    clone.sort();

-    return clone;

-  }

-

-  /**

-   * Removes all elements that are not part of both lists. Also adds the values of elements that

-   * occur in both lists.

-   * 

-   * @param list

-   *          A list of the same type.

-   */

-  public RankedList cut(RankedList list) {

-    RankedList clone = clone();

-    for (Condition element : subList(0, size())) {

-      if (list.contains(element)) {

-        clone.add(list.rankingOf(element), element.clone());

-      } else {

-        clone.remove(element);

-      }

-    }

-    clone.sort();

-    return clone;

-  }

-

-  /**

-   * Removes all elements of the given list that occur in this list. Also adds the values of

-   * elements that occur in both lists.

-   * 

-   * @param list

-   *          A list of the same type.

-   */

-  public RankedList subtract(RankedList list) {

-    RankedList clone = clone();

-    for (Condition element : subList(0, size())) {

-      if (list.contains(element)) {

-        clone.remove(element);

-      } else {

-        clone.add(list.rankingOf(element), element.clone());

-      }

-    }

-    clone.sort();

-    return clone;

-  }

-

-  @Override

-  public Condition set(int index, Condition element) {

-    if (size() >= index) {

-      double value = ranking.get(get(index));

-      if (contains(element)) {

-        ranking.put(element, new Double(ranking.get(element).doubleValue() + index));

-        super.remove(element);

-      } else

-        ranking.put(element, value);

-      ranking.remove(get(index));

-    }

-    return super.set(index, element);

-  }

-

-  /**

-   * Adds the element to the list and assigns the ranking of the element located at the index. If

-   * the element already exists, it is only assigned the ranking value.

-   */

-  @Override

-  public void add(int index, Condition element) {

-    if (size() >= index) {

-      double value = ranking.get(get(index));

-      if (!contains(element)) {

-        ranking.put(element, value);

-        super.add(index, element);

-      }

-    }

-  }

-

-  @Override

-  public boolean addAll(int index, Collection<? extends Condition> c) {

-    if (size() >= index) {

-      double value = ranking.get(get(index));

-      for (Condition element : c) {

-        if (!contains(element)) {

-          ranking.put(element, value);

-          super.add(index, element);

-          return true;

-        }

-      }

-    }

-    return false;

-  }

-

-  @Override

-  protected void removeRange(int fromIndex, int toIndex) {

-    for (int i = fromIndex; i < toIndex; i++) {

-      ranking.remove(get(i));

-    }

-    super.removeRange(fromIndex, toIndex);

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ShiftAllRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ShiftAllRule.java
deleted file mode 100644
index 3904df5..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ShiftAllRule.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-

-public class ShiftAllRule extends ShiftingRule {

-

-  private TrabalRuleItem errorBoundaryItem;

-

-  public ShiftAllRule(TrabalLearner parentAlgorithm, TextRulerTarget target,

-          TrabalAnnotation annotation, TrabalAnnotation targetAnnotation,

-          AnnotationErrorType errorType) {

-    super(parentAlgorithm, target, annotation, targetAnnotation, errorType);

-  }

-

-  public ShiftAllRule(ShiftAllRule copyFrom) {

-    super(copyFrom);

-    this.errorBoundaryItem = copyFrom.errorBoundaryItem;

-  }

-

-  @Override

-  public void compileRuleString() {

-    ruleString = "";

-

-    // shift to left or right?

-    boolean shiftToLeft = errorType == AnnotationErrorType.SHIFTING_LEFT;

-

-    // should the boundary items be part of the new annotation?

-    boolean frontItemInBorders = frontBoundaryItem.getAnnotation().getBegin() == targetAnnotation

-            .getBegin();

-    boolean rearItemInBorders = rearBoundaryItem.getAnnotation().getEnd() == targetAnnotation

-            .getEnd();

-

-    // this string will be attached to the rear boundary item

-    String before = parseConditions(ConditionType.BEFORE);

-    if (before.length() > 0)

-      before = "{" + before + "}";

-

-    // the action string will be attached to the brackets, containing the conditions and mark action

-    String conditions = parseConditions(conditionTypes);

-    if (conditions.length() > 0)

-      conditions += " ";

-    String mark;

-    if (((TrabalLearner) algorithm).getEnableFeatures())

-      mark = "-> CREATE(" + targetAnnotation.getType().getShortName() + parseFeatures() + ")";

-    else

-      mark = "-> MARK(" + targetAnnotation.getType().getShortName() + ")";

-    String action = "{" + conditions + mark + "}";

-

-    if (errorBoundaryItem == null) {

-      // We only have 2 boundary items (reduction rule, where only the right boundary changes)

-      compileWithoutErrorRuleItem(frontItemInBorders, rearItemInBorders, before, action);

-    } else {

-      // this string will be attached to the front boundary item

-      String after = parseConditions(ConditionType.AFTER);

-      if (after.length() > 0)

-        after = "{" + after + "}";

-

-      // this part will delete the original annotation

-      String unmark = errorBoundaryItem + (frontItemInBorders ? "" : " ANY") +"{STARTSWITH(" + annotation.getType().getShortName()

-              + ") -> UNMARK(" + annotation.getType().getShortName() + ", true)}";

-

-      if (shiftToLeft)

-        compileShiftToLeft(frontItemInBorders, rearItemInBorders, before, after, action, unmark);

-      else

-        compileShiftToRight(frontItemInBorders, rearItemInBorders, before, after, action, unmark);

-    }

-    setNeedsCompile(false);

-  }

-

-  private void compileShiftToLeft(boolean frontItemInBorders, boolean rearItemInBorders,

-          String before, String after, String action, String unmark) {

-    // If the front item is part of the future annotation, it has to be included in the

-    // brackets.

-    if (frontItemInBorders)

-      ruleString += "(" + frontBoundaryItem + after + " ";

-    else

-      ruleString += frontBoundaryItem + after + " (";

-

-    // We include all tokens between the boundaries.

-    ruleString += "ANY*{-PARTOF(" + errorBoundaryItem + ")} " + unmark + " ANY*{-PARTOF("

-            + rearBoundaryItem + ")}"; // like ANY*? but faster

-//    ruleString += "#{-CONTAINS(" + errorBoundaryItem + ")} " + unmark + " #{-CONTAINS("

-//            + rearBoundaryItem + ")}"; // like ANY*? but faster

-    

-    

-    // Check, if the rear item should be included and mark all tokens between the brackets as

-    // the

-    // new annotation.

-    if (rearItemInBorders)

-      ruleString += " " + rearBoundaryItem + before + ")" + action + ";";

-    else

-      ruleString += ")" + action + " " + rearBoundaryItem + before + ";";

-  }

-

-  private void compileShiftToRight(boolean frontItemInBorders, boolean rearItemInBorders,

-          String before, String after, String action, String unmark) {

-    // The old annotation begins before the new annotation

-    ruleString += unmark + " ANY*{-PARTOF(" + frontBoundaryItem + ")} ";

-//    ruleString += unmark + " #{-CONTAINS(" + frontBoundaryItem + ")} ";

-

-    // If the front item is part of the future annotation, it has to be included in the

-    // brackets.

-    if (frontItemInBorders)

-      ruleString += "(" + frontBoundaryItem + after + " ";

-    else

-      ruleString += frontBoundaryItem + after + " (";

-

-    // We include all tokens between the boundaries.

-    ruleString += "ANY*{-PARTOF(" + rearBoundaryItem + ")}"; // like ANY*? but faster

-//    ruleString += "#{-CONTAINS(" + rearBoundaryItem + ")}"; // like ANY*? but faster

-

-    

-    

-    // Check, if the rear item should be included and mark all tokens between the brackets as

-    // the

-    // new annotation.

-    if (rearItemInBorders)

-      ruleString += " " + rearBoundaryItem + before + ")" + action + ";";

-    else

-      ruleString += ")" + action + " " + rearBoundaryItem + before + ";";

-  }

-

-  private void compileWithoutErrorRuleItem(boolean frontItemInBorders, boolean rearItemInBorders,

-          String before, String action) {

-    // this string will be attached to the front boundary item

-    String after = parseConditions(ConditionType.AFTER);

-    if (after.length() > 0)

-      after = ", " + after;

-

-    // this string deletes the original annotation

-    String unmark = "{STARTSWITH(" + annotation.getType().getShortName() + ")" + after

-            + " -> UNMARK(" + annotation.getType().getShortName() + ", true)}";

-

-    if (frontItemInBorders)

-      ruleString += "(" + frontBoundaryItem + unmark + " ";

-    else

-      ruleString += frontBoundaryItem + unmark + " (";

-

-    ruleString += "ANY*{-PARTOF(" + rearBoundaryItem + ")}"; // like ANY*? but faster

-//    ruleString += "#{-CONTAINS(" + rearBoundaryItem + ")}"; // like ANY*? but faster

-

-    // Check, if the rear item should be included and mark all tokens between the brackets as the

-    // new annotation.

-    if (rearItemInBorders)

-      ruleString += " " + rearBoundaryItem + before + ")" + action + ";";

-    else

-      ruleString += ")" + action + " " + rearBoundaryItem + before + ";";

-  }

-

-  @Override

-  public boolean contains(TrabalAnnotation target) {

-    if (target != null) {

-      if (annotation.getType().getShortName().equals(target.getType().getShortName())) {

-        return true;

-      }

-      if (targetAnnotation.getType().getShortName().equals(target.getType().getShortName())) {

-        return true;

-      }

-      if (frontBoundaryItem != null)

-        if (frontBoundaryItem.getAnnotation().equals(target))

-          return true;

-      if (errorBoundaryItem != null)

-        if (errorBoundaryItem.getAnnotation().equals(target))

-          return true;

-      if (rearBoundaryItem != null)

-        if (rearBoundaryItem.getAnnotation().equals(target))

-          return true;

-      for (Condition each : getConditions()) {

-        if (each.getItem().getAnnotation().getType().getShortName()

-                .equals(target.getType().getShortName())) {

-          return true;

-        }

-      }

-    }

-    return false;

-  }

-

-  /**

-   * Sets the boundary item that marks the beginning of the original annotation.

-   * 

-   * @param errorBoundaryItem

-   */

-  public void setErrorBoundaryItem(TrabalRuleItem errorBoundaryItem) {

-    this.errorBoundaryItem = errorBoundaryItem;

-  }

-

-  @Override

-  public TrabalRule copy() {

-    return new ShiftAllRule(this);

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ShiftingRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ShiftingRule.java
deleted file mode 100644
index 0580901..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/ShiftingRule.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.ArrayList;

-

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-

-public abstract class ShiftingRule extends TrabalRule {

-

-  protected TrabalRuleItem frontBoundaryItem;

-

-  protected TrabalRuleItem rearBoundaryItem;

-

-  public ShiftingRule(TrabalLearner parentAlgorithm, TextRulerTarget target,

-          TrabalAnnotation annotation, TrabalAnnotation targetAnnotation,

-          AnnotationErrorType errorType) {

-    super(parentAlgorithm, target);

-    this.annotation = annotation;

-    this.targetAnnotation = targetAnnotation;

-    this.errorType = errorType;

-    addConditionTypes();

-  }

-

-  public ShiftingRule(ShiftingRule copyFrom) {

-    super((TrabalLearner) copyFrom.algorithm, copyFrom.target);

-    this.annotation = copyFrom.annotation;

-    this.targetAnnotation = copyFrom.targetAnnotation;

-    this.errorType = copyFrom.errorType;

-    this.frontBoundaryItem = copyFrom.frontBoundaryItem;

-    this.rearBoundaryItem = copyFrom.rearBoundaryItem;

-    this.conditions = new ArrayList<Condition>();

-    for (Condition c : copyFrom.conditions)

-      conditions.add(c.clone());

-    addConditionTypes();

-  }

-

-  protected void addConditionTypes() {

-    conditionTypes = new ArrayList<ConditionType>();

-    conditionTypes.add(ConditionType.STARTSWITH);

-    conditionTypes.add(ConditionType.ENDSWITH);

-    conditionTypes.add(ConditionType.CONTAINS);

-    conditionTypes.add(ConditionType.PARTOF);

-  }

-

-  public boolean contains(TrabalAnnotation target) {

-    if (target != null) {

-      if (annotation.getType().getShortName().equals(target.getType().getShortName())) {

-        return true;

-      }

-      if (targetAnnotation.getType().getShortName().equals(target.getType().getShortName())) {

-        return true;

-      }

-      if (frontBoundaryItem != null)

-        if (frontBoundaryItem.getAnnotation().equals(target))

-          return true;

-      if (rearBoundaryItem != null)

-        if (rearBoundaryItem.getAnnotation().equals(target))

-          return true;

-      for (Condition each : getConditions()) {

-        if (each.getItem().getAnnotation().getType().getShortName()

-                .equals(target.getType().getShortName())) {

-          return true;

-        }

-      }

-    }

-    return false;

-  }

-

-  public boolean hasSameBasicRule(TrabalRule rule) {

-    if (rule.getAnnotation() == null)

-      return false;

-    if (!rule.getAnnotation().getType().equals(annotation.getType()))

-      return false;

-    if (rule.getTargetAnnotation() == null)

-      return false;

-    if (!rule.getTargetAnnotation().getType().equals(targetAnnotation.getType()))

-      return false;

-    return true;

-  }

-

-  @Override

-  public TrabalRuleItem getFrontBoundary() {

-    if (annotation.getBegin() == targetAnnotation.getBegin())

-      return new TrabalRuleItem(annotation);

-    return frontBoundaryItem;

-  }

-

-  @Override

-  public TrabalRuleItem getRearBoundary() {

-    if (annotation.getEnd() == targetAnnotation.getEnd())

-      return new TrabalRuleItem(annotation);

-    return rearBoundaryItem;

-  }

-

-  public void setFrontBoundaryItem(TrabalRuleItem frontBoundaryItem) {

-    this.frontBoundaryItem = frontBoundaryItem;

-  }

-

-  public void setRearBoundaryItem(TrabalRuleItem rearBoundaryItem) {

-    this.rearBoundaryItem = rearBoundaryItem;

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalAnnotation.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalAnnotation.java
deleted file mode 100644
index 6b2c719..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalAnnotation.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;

-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocument;

-

-public class TrabalAnnotation extends TextRulerAnnotation {

-  private Map<String, String> features;

-

-  private boolean enableFeatures;

-

-  public TrabalAnnotation(AnnotationFS afs, boolean enableFeatures) {

-    super(afs);

-    if (afs.getType().getFeatures() != null) {

-      features = new HashMap<String, String>();

-      this.enableFeatures = enableFeatures;

-      for (Feature f : afs.getType().getFeatures()) {

-        try {

-          if (!TrabalLearner.FILTERED_FEATURES.contains(f.getShortName()))

-            features.put(f.getShortName(), afs.getFeatureValueAsString(f));

-        } catch (Exception e) {

-          e.printStackTrace();

-        }

-      }

-    }

-  }

-

-  public TrabalAnnotation(AnnotationFS afs, TextRulerExampleDocument document,

-          boolean enableFeatures) {

-    super(afs, document);

-    if (afs.getType().getFeatures() != null) {

-      features = new HashMap<String, String>();

-      this.enableFeatures = enableFeatures;

-      for (Feature f : afs.getType().getFeatures()) {

-        try {

-          if (!TrabalLearner.FILTERED_FEATURES.contains(f.getShortName()))

-            features.put(f.getShortName(), afs.getFeatureValueAsString(f));

-        } catch (Exception e) {

-          e.printStackTrace();

-        }

-      }

-    }

-  }

-

-  public Map<String, String> getFeatures() {

-    return features;

-  }

-

-  @Override

-  public String toString() {

-    String result = getType().getShortName();

-    result += "(" + getBegin() + ", " + getEnd() + ")";

-    if (features != null) {

-      result += "[";

-      for (String key : features.keySet()) {

-        result += key + ":" + features.get(key) + ", ";

-      }

-      result = result.substring(0, result.length() - 2);

-      result += "]";

-    }

-    result += " \"" + getCoveredText() + "\"";

-    return result;

-  }

-

-  @Override

-  public boolean equals(Object o) {

-    if (o.getClass().isInstance(this)) {

-      TrabalAnnotation obj = (TrabalAnnotation) o;

-      return getBegin() == obj.getBegin() && getEnd() == obj.getEnd()

-              && getType().getName().equals(obj.getType().getName()) && hasEqualFeatures(obj);

-    }

-    return false;

-  }

-

-  public boolean hasEqualFeatures(TrabalAnnotation obj) {

-    if (enableFeatures) {

-      if (features != null && obj.getFeatures() != null) {

-        if (features.size() != obj.getFeatures().size())

-          return false;

-        for (String key : features.keySet()) {

-          if (!obj.getFeatures().containsKey(key))

-            return false;

-          if (features.get(key) != null && obj.getFeatures().get(key) != null)

-            if (!features.get(key).equals(obj.getFeatures().get(key)))

-              return false;

-        }

-      } else {

-        if (this.features != null || obj.getFeatures() != null)

-          return false;

-      }

-    }

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalFactory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalFactory.java
deleted file mode 100644
index 4a458bb..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalFactory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.HashMap;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter.MLAlgorithmParamType;

-

-public class TrabalFactory implements TextRulerLearnerFactory {

-

-  public TrabalFactory() {

-  }

-

-  public Map<String, Object> getAlgorithmParameterStandardValues() {

-    Map<String, Object> values = new HashMap<String, Object>();

-    values.put(TrabalLearner.ALGORITHM_ITERATIONS_KEY, TrabalLearner.ALGORITHM_ITERATIONS);

-    values.put(TrabalLearner.MAX_NUMBER_OF_BASIC_RULES_KEY, TrabalLearner.MAX_NUMBER_OF_BASIC_RULES);

-    values.put(TrabalLearner.MAX_NUMBER_OF_RULES_KEY, TrabalLearner.MAX_NUMBER_OF_RULES);

-    values.put(TrabalLearner.MAX_NUMBER_OF_ITERATIONS_KEY, TrabalLearner.MAX_NUMBER_OF_ITERATIONS);

-    values.put(TrabalLearner.MAX_ERROR_RATE_KEY, TrabalLearner.MAX_ERROR_RATE);

-    values.put(TrabalLearner.ENABLE_FEATURES_KEY, TrabalLearner.ENABLE_FEATURES);

-    return values;

-  }

-

-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,

-          String preprocessorRutaFile, String tempFolderPath, String[] fullSlotTypeNames,

-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {

-    return new TrabalLearner(inputFolderPath, additionalFolderPath, preprocessorRutaFile,

-            tempFolderPath, fullSlotTypeNames, filterSet, skip, delegate);

-  }

-

-  public TextRulerLearnerParameter[] getAlgorithmParameters() {

-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[6];

-    result[0] = new TextRulerLearnerParameter(TrabalLearner.ALGORITHM_ITERATIONS_KEY,

-            "Number of times, the algorithm iterates.", MLAlgorithmParamType.ML_INT_PARAM);

-    result[1] = new TextRulerLearnerParameter(TrabalLearner.MAX_NUMBER_OF_BASIC_RULES_KEY,

-            "Number of basic rules to be created for one example.",

-            MLAlgorithmParamType.ML_INT_PARAM);

-    result[2] = new TextRulerLearnerParameter(TrabalLearner.MAX_NUMBER_OF_RULES_KEY,

-            "Number of optimized rules to be created for one example.",

-            MLAlgorithmParamType.ML_INT_PARAM);

-    result[3] = new TextRulerLearnerParameter(TrabalLearner.MAX_NUMBER_OF_ITERATIONS_KEY,

-            "Maximum number of iterations, when optimizing rules.",

-            MLAlgorithmParamType.ML_INT_PARAM);

-    result[4] = new TextRulerLearnerParameter(TrabalLearner.MAX_ERROR_RATE_KEY,

-            "Maximum allowed error rate.", MLAlgorithmParamType.ML_DOUBLE_PARAM);

-    result[5] = new TextRulerLearnerParameter(TrabalLearner.ENABLE_FEATURES_KEY,

-            "Correct features in rules and conditions.", MLAlgorithmParamType.ML_BOOL_PARAM);

-    return result;

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java
deleted file mode 100644
index 1453783..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java
+++ /dev/null
@@ -1,2029 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.io.BufferedWriter;

-import java.io.File;

-import java.io.FileWriter;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.Comparator;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.Set;

-import java.util.TreeMap;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

-import org.apache.uima.cas.Feature;

-import org.apache.uima.cas.FeatureStructure;

-import org.apache.uima.cas.Type;

-import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.cas.text.AnnotationIndex;

-import org.apache.uima.ruta.textruler.core.GlobalCASSource;

-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;

-import org.apache.uima.ruta.textruler.core.TextRulerExample;

-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocument;

-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocumentSet;

-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;

-import org.apache.uima.ruta.textruler.tools.MemoryWatch;

-import org.apache.uima.util.CasCopier;

-

-public class TrabalLearner extends TextRulerBasicLearner {

-

-  public final static String ANNOTATION_TYPE_BASIC = "org.apache.uima.ruta.type.RutaBasic";

-

-  public final static String ANNOTATION_TYPE_ANY = "org.apache.uima.ruta.type.ANY";

-

-  public final static String ANNOTATION_TYPE_FRAME = "org.apache.uima.ruta.type.RutaFrame";

-

-  public final static String PACKAGE = "org.apache.uima";

-

-  public final static String TYPESYSTEM = "de.uniwue.tm.citie.CompleteTypeSystemTypeSystem";

-

-  public final static List<String> FILTERED_FEATURES;

-

-  static {

-    ArrayList<String> tmp = new ArrayList<String>();

-    tmp.add("sofa");

-    tmp.add("begin");

-    tmp.add("end");

-    FILTERED_FEATURES = tmp;

-  }

-

-  public final static String MAX_NUMBER_OF_BASIC_RULES_KEY = "maxNumberOfBasicRules";

-

-  public final static String MAX_NUMBER_OF_RULES_KEY = "maxNumberOfRules";

-

-  public final static String MAX_NUMBER_OF_ITERATIONS_KEY = "maxNumberOfIterations";

-

-  public final static String ALGORITHM_ITERATIONS_KEY = "algorithmIterations";

-

-  public final static String MAX_ERROR_RATE_KEY = "maxErrorRate";

-

-  public final static String ENABLE_FEATURES_KEY = "enableFeatures";

-

-  public final static int MAX_NUMBER_OF_BASIC_RULES = 80;

-

-  public final static int MAX_NUMBER_OF_RULES = 150;

-

-  public final static int MAX_NUMBER_OF_ITERATIONS = 2;

-

-  public final static int ALGORITHM_ITERATIONS = 3;

-

-  public final static double MAX_ERROR_RATE = 0.4;

-

-  public final static boolean ENABLE_FEATURES = false;

-

-  private int maxNumberOfBasicRules = MAX_NUMBER_OF_BASIC_RULES;

-

-  private int maxNumberOfRules = MAX_NUMBER_OF_RULES;

-

-  private int maxNumberOfIterations = MAX_NUMBER_OF_ITERATIONS;

-

-  private int algorithmIterations = ALGORITHM_ITERATIONS;

-

-  private double maxErrorRate = MAX_ERROR_RATE;

-

-  public boolean enableFeatures = ENABLE_FEATURES;

-

-  private String result = ""; // actualResult + tempRules

-

-  private String actualResult = "";

-

-  private List<TrabalRule> bestRulesForStatus = new ArrayList<TrabalRule>();

-

-  private String inputDirectory;

-

-  private String additionalFolderPath;

-

-  private TextRulerExampleDocumentSet additionalDocuments;

-

-  private List<AnnotationError> errors;

-

-  private Map<String, RankedList> positiveExamples;

-

-  private Map<String, Double> idf;

-

-  private Map<String, TextRulerStatisticsCollector> inducedRules = new TreeMap<String, TextRulerStatisticsCollector>();

-

-  public TrabalLearner(String inputFolderPath, String additionalFolderPath,

-          String preprocessorTMfile, String tempFolderPath, String[] fullSlotTypeNames,

-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {

-    super(inputFolderPath, preprocessorTMfile, tempFolderPath, fullSlotTypeNames, filterSet, skip,

-            delegate);

-    this.inputDirectory = inputFolderPath;

-    this.additionalFolderPath = additionalFolderPath;

-  }

-

-  /**

-   * Main method. Starts the algorithm.

-   */

-  protected void doRun() {

-    try {

-      getAnalysisEngine();

-      getAdditionalDocuments();

-      if (additionalDocuments == null)

-        throw new Exception("Error: Additional data is missing!");

-      if (exampleDocuments.getDocuments().size() != additionalDocuments.getDocuments().size())

-        throw new Exception("Error: Training data doesn't match additional data!");

-      sendStatusUpdateToDelegate("Loading documents...", TextRulerLearnerState.ML_INITIALIZING,

-              true);

-      sendStatusUpdateToDelegate("Comparing documents...", TextRulerLearnerState.ML_RUNNING, true);

-      for (int i = 0; i < algorithmIterations; i++) {

-        actualResult += "BLOCK(Iteration_" + (i + 1) + ") Document{} {\n";

-        sendStatusUpdateToDelegate("Comparing documents...", TextRulerLearnerState.ML_RUNNING, true);

-        idf = createIDF();

-        Map<String, List<AnnotationError>> errorGrps = createErrorGroups();

-        List<TrabalRule> rules = runAlgorithm(errorGrps);

-        if (rules.size() == 0) {

-          actualResult = actualResult.replace("BLOCK(Iteration_" + (i + 1) + ") Document{} {", "");

-          break;

-        }

-        actualResult += "}\n\n";

-        result = actualResult;

-        sendStatusUpdateToDelegate("Finished " + (i + 1) + ". iteration.",

-                TextRulerLearnerState.ML_DONE, true);

-      }

-      Map<String, List<AnnotationError>> errorGrps = createErrorGroups();

-      if (errorGrps.size() > 0) {

-        actualResult += "// Remaining errors \n";

-        for (List<AnnotationError> list : errorGrps.values()) {

-          for (AnnotationError err : list) {

-            actualResult += "\n// " + err;

-          }

-        }

-      }

-      if (new File(tempDirectory).isDirectory())

-        new File(tempDirectory).delete();

-      result = actualResult;

-      sendStatusUpdateToDelegate("Done!", TextRulerLearnerState.ML_DONE, true);

-    } catch (Exception e) {

-      sendStatusUpdateToDelegate(e.getLocalizedMessage(), TextRulerLearnerState.ML_ERROR, true);

-      e.printStackTrace();

-    }

-  }

-

-  private void removeBasics() {

-    for (TextRulerExampleDocument doc : additionalDocuments.getDocuments()) {

-      CAS cas = doc.getCAS();

-      List<AnnotationFS> basics = new ArrayList<AnnotationFS>();

-      for (AnnotationFS a : cas.getAnnotationIndex()) {

-        if (a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-          basics.add(a);

-        }

-      }

-      for (AnnotationFS a : basics)

-        cas.removeFsFromIndexes(a);

-    }

-  }

-

-  private void removeBasics(CAS cas) {

-    List<AnnotationFS> basics = new ArrayList<AnnotationFS>();

-    for (AnnotationFS a : cas.getAnnotationIndex()) {

-      if (a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-        basics.add(a);

-      }

-    }

-    for (AnnotationFS a : basics)

-      cas.removeFsFromIndexes(a);

-  }

-

-  private Map<String, Double> createIDF() {

-    Map<String, Double> result = new HashMap<String, Double>();

-    List<TextRulerExampleDocument> documents = additionalDocuments.getDocuments();

-    // int counter = 0;

-    Map<String, Integer> annotations = new HashMap<String, Integer>();

-    for (int i = 0; i < documents.size(); i++) {

-      AnnotationIndex<AnnotationFS> index = documents.get(i).getCAS().getAnnotationIndex();

-      FSIterator<AnnotationFS> iterator = index.iterator();

-      while (iterator.isValid()) {

-        AnnotationFS annotation = iterator.next();

-        if (isSlotType(annotation.getType())) {

-          TrabalAnnotation a = new TrabalAnnotation(annotation, enableFeatures);

-          if (annotations.containsKey(a.getType().getShortName())) {

-            annotations.put(a.getType().getShortName(),

-                    new Integer(annotations.get(a.getType().getShortName()).intValue() + 1));

-          } else {

-            annotations.put(a.getType().getShortName(), new Integer(1));

-          }

-          // counter++;

-        }

-      }

-      for (String key : annotations.keySet()) {

-        double d = annotations.get(key).doubleValue();

-        result.put(key, new Double(1 / d));

-      }

-    }

-    return result;

-  }

-

-  /**

-   * Compares the training data to the additional data and creates a mapping of the contained

-   * errors, where the key is a combination of the error type and the names of the concerned

-   * annotations, and the values are lists of errors that can be corrected through the same type of

-   * rule.

-   * 

-   * @return map of errors

-   */

-  private Map<String, List<AnnotationError>> createErrorGroups() {

-    errors = createErrorList();

-    Collections.sort(errors);

-    Map<String, List<AnnotationError>> result = new HashMap<String, List<AnnotationError>>();

-    for (AnnotationError error : errors) {

-      String truthFeatures = "";

-      String errorFeatures = "";

-      if (error.getError() != null && error.getTruth() != null) {

-        if (enableFeatures) {

-          truthFeatures = listFeatures(error.getTruth());

-          errorFeatures = listFeatures(error.getError());

-        }

-        String key = error.getType() + "_" + error.getError().getAnnotation().getType().toString()

-                + errorFeatures + "_" + error.getTruth().getAnnotation().getType().toString()

-                + truthFeatures;

-        if (result.get(key) == null) {

-          result.put(key, new ArrayList<AnnotationError>());

-        }

-        result.get(key).add(error);

-      } else if (error.getTruth() != null) {

-        if (enableFeatures)

-          truthFeatures = listFeatures(error.getTruth());

-        String key = error.getType() + "_" + error.getTruth().getAnnotation().getType().toString()

-                + truthFeatures;

-        if (result.get(key) == null) {

-          result.put(key, new ArrayList<AnnotationError>());

-        }

-        result.get(key).add(error);

-      } else {

-        if (enableFeatures)

-          errorFeatures = listFeatures(error.getError());

-        String key = error.getType() + "_" + error.getError().getAnnotation().getType().toString()

-                + errorFeatures;

-        if (result.get(key) == null) {

-          result.put(key, new ArrayList<AnnotationError>());

-        }

-        result.get(key).add(error);

-      }

-    }

-    return result;

-  }

-

-  private String listFeatures(TextRulerExample example) {

-    String result = "";

-    for (Feature f : example.getAnnotation().getType().getFeatures()) {

-      if (!FILTERED_FEATURES.contains(f.getShortName()))

-        result += "_" + f.toString();

-    }

-    return result;

-  }

-

-  /**

-   * Creates a list of annotation pairs and the fitting type of transformation action.

-   */

-  private List<AnnotationError> createErrorList() {

-    positiveExamples = new HashMap<String, RankedList>();

-    List<AnnotationError> result = new ArrayList<AnnotationError>();

-    List<TrabalAnnotation> matches;

-    Iterator<TrabalAnnotation> iterator;

-    Iterator<TrabalAnnotation> docIterator;

-    List<TextRulerExampleDocument> documents;

-    List<TextRulerExampleDocument> goldStandard;

-    documents = additionalDocuments.getDocuments();

-    goldStandard = exampleDocuments.getDocuments();

-    for (int i = 0; i < goldStandard.size(); i++) {

-      if (shouldAbort())

-        break;

-      matches = new ArrayList<TrabalAnnotation>();

-      AnnotationIndex<AnnotationFS> index = goldStandard.get(i).getCAS().getAnnotationIndex();

-      List<TrabalAnnotation> gold = new ArrayList<TrabalAnnotation>();

-      List<TrabalAnnotation> docs = new ArrayList<TrabalAnnotation>();

-      for (AnnotationFS a : index) {

-        if (isSlotType(a.getType())) {

-          gold.add(new TrabalAnnotation(a, goldStandard.get(i), enableFeatures));

-        }

-      }

-      AnnotationIndex<AnnotationFS> docIndex = documents.get(i).getCAS().getAnnotationIndex();

-      for (AnnotationFS b : docIndex) {

-        if (isSlotType(b.getType())) {

-          docs.add(new TrabalAnnotation(b, documents.get(i), enableFeatures));

-        }

-      }

-      iterator = gold.iterator();

-      docIterator = docs.iterator();

-      TrabalAnnotation a;

-      TrabalAnnotation b;

-      // find correct annotated elements

-      int exampleIndex = 0;

-      while (iterator.hasNext()) {

-        if (shouldAbort())

-          break;

-        exampleIndex++;

-        sendStatusUpdateToDelegate("Comparing documents " + (i + 1) + " of " + goldStandard.size()

-                + ": example " + exampleIndex + " of " + gold.size(),

-                TextRulerLearnerState.ML_RUNNING, false);

-        a = iterator.next();

-        docIterator = docs.iterator();

-        while (docIterator.hasNext()) {

-          b = docIterator.next();

-          if (b.equals(a)) {

-            matches.add(a);

-            matches.add(b);

-            if (positiveExamples.containsKey(a.getType().getShortName())) {

-              RankedList list = positiveExamples.get(a.getType().getShortName());

-              list.addAll(createConditions(a));

-              positiveExamples.put(a.getType().getShortName(), list);

-            } else {

-              RankedList list = new RankedList(idf);

-              list.addAll(createConditions(a));

-              positiveExamples.put(a.getType().getShortName(), list);

-            }

-            break;

-          }

-        }

-      }

-      // create correction type errors

-      iterator = gold.iterator();

-      docIterator = docs.iterator();

-      while (iterator.hasNext()) {

-        a = iterator.next();

-        docIterator = docs.iterator();

-        while (!matches.contains(a) && docIterator.hasNext()) {

-          b = docIterator.next();

-          if (!matches.contains(b)) {

-            if (b.getBegin() == a.getBegin() && b.getEnd() == a.getEnd()) {

-              TextRulerTarget target = new TextRulerTarget(b.getType().getName(), this);

-              TextRulerExample error = new TextRulerExample(b.getDocument(), b, false, target);

-              TextRulerExample truth = new TextRulerExample(a.getDocument(), a, true, target);

-              result.add(new AnnotationError(error, truth, AnnotationErrorType.CORRECTION));

-              matches.add(a);

-              matches.add(b);

-              break;

-            }

-          }

-        }

-      }

-      // create shifting type errors

-      iterator = gold.iterator();

-      docIterator = docs.iterator();

-      List<AnnotationError> tempErrors;

-      int distance;

-      while (iterator.hasNext()) {

-        a = iterator.next();

-        docIterator = docs.iterator();

-        tempErrors = new ArrayList<AnnotationError>();

-        while (!matches.contains(a) && docIterator.hasNext()) {

-          b = docIterator.next();

-          if (!matches.contains(b)) {

-            if (b.getType().getShortName().equals(a.getType().getShortName())

-                    && b.getEnd() >= a.getBegin() && b.getBegin() <= a.getEnd()) {

-              TextRulerTarget target = new TextRulerTarget(a.getType().getName(), this);

-              TextRulerExample error = new TextRulerExample(b.getDocument(), b, false, target);

-              TextRulerExample truth = new TextRulerExample(a.getDocument(), a, true, target);

-              AnnotationErrorType type;

-              if ((b.getBegin() == a.getBegin() && b.getEnd() < a.getEnd())

-                      || (b.getBegin() > a.getBegin() && b.getEnd() == a.getEnd())) {

-                type = AnnotationErrorType.EXPANSION;

-              } else if (b.getBegin() > a.getBegin() || b.getEnd() > a.getEnd()) {

-                type = AnnotationErrorType.SHIFTING_LEFT;

-              } else {

-                type = AnnotationErrorType.SHIFTING_RIGHT;

-              }

-              AnnotationError err = new AnnotationError(error, truth, type);

-              if (!tempErrors.contains(err))

-                tempErrors.add(err);

-            }

-          }

-        }

-        if (tempErrors.size() > 0) {

-          AnnotationError err = tempErrors.get(0);

-          int begin = err.getError().getAnnotation().getBegin();

-          int end = err.getError().getAnnotation().getEnd();

-          distance = Math.abs(begin - a.getBegin()) + Math.abs(end - a.getEnd());

-          for (int j = 1; j < tempErrors.size(); j++) {

-            int begin2 = tempErrors.get(j).getError().getAnnotation().getBegin();

-            int end2 = tempErrors.get(j).getError().getAnnotation().getEnd();

-            if (Math.abs(begin2 - a.getBegin()) + Math.abs(end2 - a.getEnd()) < distance) {

-              distance = Math.abs(begin2 - a.getBegin()) + Math.abs(end2 - a.getEnd());

-              err = tempErrors.get(j);

-            }

-          }

-          result.add(err);

-          matches.add((TrabalAnnotation) err.getTruth().getAnnotation());

-          matches.add((TrabalAnnotation) err.getError().getAnnotation());

-        }

-      }

-      // creating shifting + correction errors

-      iterator = gold.iterator();

-      docIterator = docs.iterator();

-      while (iterator.hasNext()) {

-        a = iterator.next();

-        docIterator = docs.iterator();

-        tempErrors = new ArrayList<AnnotationError>();

-        while (!matches.contains(a) && docIterator.hasNext()) {

-          b = docIterator.next();

-          if (!matches.contains(b)) {

-            if (b.getEnd() >= a.getBegin() && b.getBegin() <= a.getEnd()) {

-              TextRulerTarget target = new TextRulerTarget(b.getType().getName(), this);

-              TextRulerExample error = new TextRulerExample(b.getDocument(), b, false, target);

-              TextRulerExample truth = new TextRulerExample(a.getDocument(), a, true, target);

-              AnnotationErrorType type;

-              if ((b.getBegin() == a.getBegin() && b.getEnd() < a.getEnd())

-                      || (b.getBegin() > a.getBegin() && b.getEnd() == a.getEnd())) {

-                type = AnnotationErrorType.EXPANSION;

-              } else if (b.getBegin() > a.getBegin() || b.getEnd() > a.getEnd()) {

-                type = AnnotationErrorType.SHIFTING_LEFT;

-              } else {

-                type = AnnotationErrorType.SHIFTING_RIGHT;

-              }

-              AnnotationError err = new AnnotationError(error, truth, type);

-              if (!tempErrors.contains(err))

-                tempErrors.add(err);

-            }

-          }

-        }

-        if (tempErrors.size() > 0) {

-          AnnotationError err = tempErrors.get(0);

-          int begin = err.getError().getAnnotation().getBegin();

-          int end = err.getError().getAnnotation().getEnd();

-          distance = Math.abs(begin - a.getBegin()) + Math.abs(end - a.getEnd());

-          for (int j = 1; j < tempErrors.size(); j++) {

-            int begin2 = tempErrors.get(j).getError().getAnnotation().getBegin();

-            int end2 = tempErrors.get(j).getError().getAnnotation().getEnd();

-            if (Math.abs(begin2 - a.getBegin()) + Math.abs(end2 - a.getEnd()) < distance) {

-              distance = Math.abs(begin2 - a.getBegin()) + Math.abs(end2 - a.getEnd());

-              err = tempErrors.get(j);

-            }

-          }

-          result.add(err);

-          matches.add((TrabalAnnotation) err.getTruth().getAnnotation());

-          matches.add((TrabalAnnotation) err.getError().getAnnotation());

-        }

-      }

-      // create deleting type errors

-      docIterator = docs.iterator();

-      while (docIterator.hasNext()) {

-        b = docIterator.next();

-        if (!matches.contains(b)) {

-          TextRulerTarget target = new TextRulerTarget(b.getType().getName(), this);

-          TextRulerExample error = new TextRulerExample(b.getDocument(), b, false, target);

-          result.add(new AnnotationError(error, null, AnnotationErrorType.DELETION));

-          matches.add(b);

-        }

-      }

-      // create annotation type errors

-      iterator = gold.iterator();

-      while (iterator.hasNext()) {

-        a = iterator.next();

-        if (!matches.contains(a)) {

-          TextRulerTarget target = new TextRulerTarget(a.getType().getName(), this);

-          TextRulerExample truth = new TextRulerExample(a.getDocument(), a, true, target);

-          result.add(new AnnotationError(null, truth, AnnotationErrorType.ANNOTATION));

-          matches.add(a);

-        }

-      }

-    }

-    return result;

-  }

-

-  /**

-   * Is called by doRun(). Creates and tests rules for a given list of error groups created by

-   * createErrorGroups().

-   * 

-   * @param errorGrps

-   * @return The best found list of correction rules.

-   */

-  private List<TrabalRule> runAlgorithm(Map<String, List<AnnotationError>> errorGrps) {

-    removeBasics();

-    inducedRules.clear();

-

-    List<TrabalRule> rules = new ArrayList<TrabalRule>();

-    bestRulesForStatus.clear();

-    int i = 1;

-    for (List<AnnotationError> each : errorGrps.values()) {

-      if (shouldAbort()) {

-        break;

-      }

-      Collections.sort(each);

-      String status = each.get(0).toString();

-      sendStatusUpdateToDelegate("Creating basic rules: " + status,

-              TextRulerLearnerState.ML_RUNNING, false);

-      List<TrabalRule> basicRules = removeDuplicateRules(createBasicRules(each));

-      if (basicRules.size() > maxNumberOfBasicRules) {

-        basicRules = basicRules.subList(0, maxNumberOfBasicRules);

-      }

-      sendStatusUpdateToDelegate("Testing basic rules: " + status,

-              TextRulerLearnerState.ML_RUNNING, false);

-      basicRules = testTrabalRulesOnDocumentSet(basicRules, exampleDocuments, additionalDocuments,

-              "basic rules (" + i + " of " + errorGrps.size() + ")");

-      if (basicRules.size() > 0) {

-        Collections.sort(basicRules, basicComparator);

-        bestRulesForStatus.add(basicRules.get(0));

-      }

-      result = actualResult + getRuleStrings(bestRulesForStatus);

-      sendStatusUpdateToDelegate("Testing basic rules: " + status,

-              TextRulerLearnerState.ML_RUNNING, true);

-      List<TrabalRule> learntRules = new ArrayList<TrabalRule>();

-      for (TrabalRule rule : basicRules) {

-        if (rule.getCoveringStatistics().getCoveredPositivesCount() > 0

-                && rule.getCoveringStatistics().getCoveredNegativesCount() == 0) {

-          learntRules.add(rule);

-        }

-      }

-      // Collections.sort(learntRules, basicComparator);

-      List<TrabalRule> enhancedRules = new ArrayList<TrabalRule>();

-      int rank = 1;

-      for (TrabalRule rule : basicRules) {

-        if (rule.getCoveringStatistics().getCoveredPositivesCount() > 0

-                && rule.getCoveringStatistics().getCoveredNegativesCount() > 0) {

-          if (learntRules.size() > 0) {

-            if (rule.getCoveringStatistics().getCoveredPositivesCount() > learntRules.get(0)

-                    .getCoveringStatistics().getCoveredPositivesCount()) {

-              rule.setRating(rank);

-              enhancedRules.add(rule);

-              rank++;

-            }

-          } else {

-            rule.setRating(rank);

-            enhancedRules.add(rule);

-            rank++;

-          }

-        }

-      }

-      basicRules.clear();

-      try {

-        enhancedRules = enhanceRules(enhancedRules, maxNumberOfIterations, new RankedList(idf));

-        Collections.sort(enhancedRules);

-        if (enhancedRules.size() > maxNumberOfRules) {

-          enhancedRules = enhancedRules.subList(0, maxNumberOfRules);

-        }

-      } catch (Exception e) {

-        e.printStackTrace();

-      }

-      sendStatusUpdateToDelegate("Testing enhanced rules: " + status,

-              TextRulerLearnerState.ML_RUNNING, false);

-      enhancedRules = testTrabalRulesOnDocumentSet(enhancedRules, exampleDocuments,

-              additionalDocuments, "enhanced rules (" + i + " of " + errorGrps.size() + ")");

-      for (TrabalRule rule : enhancedRules) {

-        if (rule.getErrorRate() <= maxErrorRate) {

-          learntRules.add(rule);

-        }

-      }

-      enhancedRules.clear();

-      learntRules = removeDuplicateRules(learntRules);

-      if (learntRules.size() > 0) {

-        Collections.sort(learntRules, enhancedComparator);

-        bestRulesForStatus.remove(bestRulesForStatus.size() - 1); // TODO

-        bestRulesForStatus.add(learntRules.get(0));

-        result = actualResult + getRuleStrings(bestRulesForStatus);

-      }

-      sendStatusUpdateToDelegate("Testing optimized rules: " + status,

-              TextRulerLearnerState.ML_RUNNING, true);

-      if (learntRules.size() > maxNumberOfRules)

-        learntRules = learntRules.subList(0, maxNumberOfRules);

-      rules.addAll(learntRules);

-      i++;

-    }

-    return getBest(rules);

-  }

-

-  private List<TrabalRule> enhanceRules(List<TrabalRule> learntRules, int iterations,

-          RankedList conditions) throws Exception {

-    if (shouldAbort() || learntRules.size() == 0)

-      return learntRules;

-    sendStatusUpdateToDelegate("Adding conditions to rules (" + iterations + ". Iteration)... ",

-            TextRulerLearnerState.ML_RUNNING, false);

-    if (iterations > 0) {

-      List<TrabalRule> rules = new ArrayList<TrabalRule>();

-      List<TrabalRule> newRules = new ArrayList<TrabalRule>();

-      if (conditions.size() == 0)

-        conditions = createConditions(learntRules);

-      for (int i = 0; i < learntRules.size(); i++) {

-        rules.add(learntRules.get(i));

-        // TODO amount of conditions? parameter for 50!

-        for (int j = 0; j < conditions.size() && j < 50; j++) {

-          TrabalRule newRule = learntRules.get(i).copy();

-          if (!newRule.getConditions().contains(conditions.get(j))) {

-            newRule.addCondition(conditions.get(j), (j + 1));

-            newRule.getRuleString();

-            newRules.add(newRule);

-          }

-        }

-      }

-      rules.addAll(enhanceRules(newRules, iterations - 1, conditions));

-      return rules;

-    }

-    return learntRules;

-  }

-

-  /**

-   * Chooses the best final rules from the results of runAlgorithm().

-   * 

-   * @param rules

-   * @return A non redundant list of correction rules.

-   */

-  private List<TrabalRule> getBest(List<TrabalRule> rules) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    Collections.sort(rules, enhancedComparator);

-    while (rules.size() > 0) {

-      List<TrabalRule> testRules = new ArrayList<TrabalRule>();

-      List<TrabalRule> newRules = new ArrayList<TrabalRule>();

-      TrabalRule bestRule = rules.get(0);

-      if (bestRule.getErrorRate() > maxErrorRate) {

-        rules.remove(0);

-        continue;

-      }

-      if (bestRule.getCoveringStatistics().getCoveredPositivesCount() == 0) {

-        break;

-      }

-      sendStatusUpdateToDelegate("Chosen rule: " + bestRule, TextRulerLearnerState.ML_RUNNING,

-              false);

-      result.add(bestRule);

-      rules.remove(0);

-      Set<TextRulerExample> coveredExamples = bestRule.getCoveringStatistics()

-              .getCoveredPositiveExamples();

-      for (TrabalRule rule : rules) {

-        TextRulerStatisticsCollector collector = rule.getCoveringStatistics();

-        Iterator<TextRulerExample> iterator = coveredExamples.iterator();

-        while (iterator.hasNext()) {

-          TextRulerExample example = iterator.next();

-          if (collector.getCoveredPositiveExamples().contains(example)) {

-            collector.getCoveredPositiveExamples().remove(example);

-            // if (rule.getErrorType() == ErrorType.ANNOTATION

-            // || rule.getErrorType() == ErrorType.DELETING) {

-            // collector.incCoveredPositives(-1);

-            // } else {

-            collector.incCoveredPositives(-1);

-            // }

-          }

-          if (collector.getCoveredPositivesCount() <= 0) {

-            break;

-          }

-        }

-        if (rule.getErrorRate() > maxErrorRate

-                || rule.getCoveringStatistics().getCoveredPositivesCount() <= 0) {

-          if (bestRulesForStatus.contains(rule))

-            bestRulesForStatus.remove(rule);

-          this.result = actualResult + getRuleStrings(bestRulesForStatus);

-          continue;

-        } else if (rule.contains(bestRule.getAnnotation())

-                || rule.contains(bestRule.getTargetAnnotation())) {

-          testRules.add(rule.copy());

-        } else {

-          newRules.add(rule);

-        }

-      }

-      rules = new ArrayList<TrabalRule>();

-      updateDocumentData(bestRule);

-      removeBasics();

-      testRules = testTrabalRulesOnDocumentSet(testRules, exampleDocuments, additionalDocuments,

-              "final rules ");

-      for (TrabalRule rule : testRules) {

-        if (rule.getErrorRate() <= maxErrorRate

-                && rule.getCoveringStatistics().getCoveredPositivesCount() > 0) {

-          rules.add(rule);

-        }

-      }

-      rules.addAll(newRules);

-      Collections.sort(rules, enhancedComparator);

-    }

-    this.result = actualResult;

-    return result;

-  }

-

-  /**

-   * Is called from getBest(). Applies the chosen rules to the additional documents, so the learner

-   * can ignore the already corrected errors in the next interation.

-   * 

-   * @param rule

-   */

-  private void updateDocumentData(TrabalRule rule) {

-    try {

-      sendStatusUpdateToDelegate("Writing rules...", TextRulerLearnerState.ML_RUNNING, false);

-      rule.saveToRulesFile(getTempRulesFileName());

-      for (TextRulerExampleDocument doc : additionalDocuments.getDocuments()) {

-        ae.process(doc.getCAS());

-      }

-      if (bestRulesForStatus.contains(rule)) {

-        bestRulesForStatus.remove(rule);

-      }

-      actualResult += rule.toString();

-      result = actualResult + getRuleStrings(bestRulesForStatus);

-      sendStatusUpdateToDelegate("Writing rules...", TextRulerLearnerState.ML_RUNNING, true);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-  }

-

-  /**

-   * Creates basic rules for the given types of errors.

-   * 

-   * @param errors

-   * @return list of basic rules

-   */

-  public List<TrabalRule> createBasicRules(List<AnnotationError> errors) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    for (AnnotationError each : errors) {

-      switch (each.getType()) {

-        case SHIFTING_LEFT:

-        case SHIFTING_RIGHT:

-        case EXPANSION:

-          result.addAll(createShiftingRules(each));

-          break;

-        case CORRECTION:

-          result.addAll(createCorrectionRules(each));

-          break;

-        case ANNOTATION:

-          result.addAll(createAnnotationRules(each));

-          break;

-        case DELETION:

-          result.addAll(createDeletionRules(each));

-          break;

-      }

-    }

-    return getBestBasicRule(result);

-  }

-

-  /**

-   * Chooses the rules which are expected to be the best.

-   * 

-   * @param rules

-   * @return list of best basic rules

-   */

-  private List<TrabalRule> getBestBasicRule(List<TrabalRule> rules) {

-    if (rules.size() < maxNumberOfBasicRules)

-      return rules;

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    sendStatusUpdateToDelegate("Choosing basic rules... ", TextRulerLearnerState.ML_RUNNING, false);

-    Map<Integer, Integer> distribution = new HashMap<Integer, Integer>();

-    for (TrabalRule rule : rules) {

-      Integer key = new Integer(rule.hashCode());

-      if (distribution.containsKey(key)) {

-        distribution.put(key, new Integer(distribution.get(key).intValue() + 1));

-      } else {

-        distribution.put(key, new Integer(1));

-      }

-    }

-    List<TrabalRule> newRules;

-    while (result.size() < maxNumberOfBasicRules && distribution.size() > 0) {

-      if (shouldAbort())

-        break;

-      int max = 0;

-      Integer maxKey = new Integer(0);

-      for (Integer key : distribution.keySet()) {

-        if (distribution.get(key).intValue() > max) {

-          max = distribution.get(key).intValue();

-          maxKey = key;

-        }

-      }

-      distribution.remove(maxKey);

-      newRules = new ArrayList<TrabalRule>();

-      TrabalRule example = null;

-      for (TrabalRule rule : rules) {

-        Integer key = new Integer(rule.hashCode());

-        if (distribution.containsKey(key)) {

-          if (distribution.get(key).intValue() == max) {

-            result.add(rule);

-            if (example == null)

-              example = rule;

-          }

-        }

-      }

-      for (TrabalRule rule : rules) {

-        newRules.add(rule);

-      }

-      rules = newRules;

-    }

-    if (result.size() > maxNumberOfBasicRules)

-      return result.subList(0, maxNumberOfBasicRules);

-    return result;

-  }

-

-  /**

-   * Creates basic rules for shifting type errors.

-   * 

-   * @param error

-   * @return list of shifting rules

-   */

-  private List<TrabalRule> createShiftingRules(AnnotationError each) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    TextRulerExample error = each.getError();

-    TextRulerExample truth = each.getTruth();

-    int errorBegin = error.getAnnotation().getBegin();

-    int errorEnd = error.getAnnotation().getEnd();

-    int truthBegin = truth.getAnnotation().getBegin();

-    int truthEnd = truth.getAnnotation().getEnd();

-

-    if ((errorBegin > truthBegin && errorEnd > truthEnd) // shift both borders to left

-            || (errorBegin < truthBegin && errorEnd < truthEnd)) { // shift both borders to right

-      result.addAll(createShiftAllRules(error, truth));

-    } else if (errorBegin > truthBegin // expand to left

-            || errorEnd < truthEnd) { // expand to right

-      result.addAll(createExpansionRules(error, truth));

-    } else {

-      result.addAll(createShiftAllRules(error, truth)); // reduce the annotation

-    }

-    return result;

-  }

-

-  /**

-   * Creates basic rules for shifting errors, where both borders are shiftet to the same side or the

-   * size of the annotation is reduced.

-   * 

-   * @param error

-   *          The error example

-   * @param truth

-   *          The truth example

-   */

-  private List<TrabalRule> createShiftAllRules(TextRulerExample error, TextRulerExample truth) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    TextRulerExampleDocument document = error.getDocument();

-    CAS cas = error.getDocumentCAS();

-    List<TrabalRuleItem> truthLeftBorder = getBorderOfExample(truth, document, cas, true);

-    List<TrabalRuleItem> truthRightBorder = getBorderOfExample(truth, document, cas, false);

-    List<TrabalRuleItem> errorLeftBorder = getBorderOfExample(error, document, cas, true);

-    TextRulerTarget target = error.getTarget();

-    TrabalAnnotation errorAnnotation = (TrabalAnnotation) error.getAnnotation();

-    TrabalAnnotation truthAnnotation = (TrabalAnnotation) truth.getAnnotation();

-    // boolean shiftToLeft = error.getAnnotation().getBegin() > truth.getAnnotation().getBegin();

-    // if (shiftToLeft) {

-    for (TrabalRuleItem a : truthLeftBorder) {

-      for (TrabalRuleItem b : errorLeftBorder) {

-        for (TrabalRuleItem c : truthRightBorder) {

-          ShiftAllRule newRule;

-          if (truth.getAnnotation().getEnd() < error.getAnnotation().getEnd())

-            newRule = new ShiftAllRule(this, target, errorAnnotation, truthAnnotation,

-                    AnnotationErrorType.SHIFTING_LEFT);

-          else

-            newRule = new ShiftAllRule(this, target, errorAnnotation, truthAnnotation,

-                    AnnotationErrorType.SHIFTING_RIGHT);

-          newRule.setFrontBoundaryItem(a);

-          if (b.getAnnotation().getBegin() != a.getAnnotation().getBegin()) {

-            newRule.setErrorBoundaryItem(b);

-          }

-          newRule.setRearBoundaryItem(c);

-          result.add(newRule);

-        }

-      }

-    }

-    // } else {

-    // for (TrabalRuleItem a : errorLeftBorder) {

-    // for (TrabalRuleItem b : truthLeftBorder) {

-    // for (TrabalRuleItem c : truthRightBorder) {

-    // ShiftingRule newRule = new ShiftingRule(this, target, errorAnnotation, truthAnnotation,

-    // AnnotationErrorType.SHIFTING_RIGHT);

-    // newRule.addFillerItem(a);

-    // if (b.getAnnotation().getBegin() != a.getAnnotation().getBegin()) {

-    // newRule.addFillerItem(b);

-    // }

-    // newRule.addFillerItem(c);

-    // result.add(newRule);

-    // }

-    // }

-    // }

-    // }

-    return result;

-  }

-

-  /**

-   * Creates basic rules for expansion type errors.

-   * 

-   * @param error

-   * @param truth

-   * @return list of expansion rules

-   */

-  private List<TrabalRule> createExpansionRules(TextRulerExample error, TextRulerExample truth) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    TextRulerExampleDocument document = error.getDocument();

-    CAS cas = error.getDocumentCAS();

-    boolean shiftToLeft = error.getAnnotation().getBegin() > truth.getAnnotation().getBegin();

-    List<TrabalRuleItem> border;

-    if (shiftToLeft) {

-      border = getBorderOfExample(truth, document, cas, true);

-    } else {

-      border = getBorderOfExample(truth, document, cas, false);

-    }

-    for (TrabalRuleItem item : border) {

-      ExpansionRule newRule = new ExpansionRule(this, error.getTarget(),

-              (TrabalAnnotation) error.getAnnotation(), (TrabalAnnotation) truth.getAnnotation(),

-              AnnotationErrorType.EXPANSION);

-      if (shiftToLeft)

-        newRule.setFrontBoundaryItem(item);

-      else

-        newRule.setRearBoundaryItem(item);

-      if (!result.contains(newRule))

-        result.add(newRule);

-    }

-    return result;

-  }

-

-  /**

-   * Creates basic rules for annotation type errors.

-   * 

-   * @param error

-   * @return list of annotation rules

-   */

-  private List<TrabalRule> createAnnotationRules(AnnotationError each) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    TextRulerExample truth = each.getTruth();

-    TextRulerExampleDocument document = additionalDocuments.getDocuments().get(

-            exampleDocuments.getDocuments().indexOf(truth.getDocument()));

-    CAS cas = document.getCAS();

-    List<TrabalRuleItem> truthLeftBorder = getBorderOfExample(truth, document, cas, true);

-    List<TrabalRuleItem> truthRightBorder = getBorderOfExample(truth, document, cas, false);

-    TextRulerTarget target = truth.getTarget();

-    TrabalAnnotation truthAnnotation = (TrabalAnnotation) truth.getAnnotation();

-    for (TrabalRuleItem front : truthLeftBorder) {

-      for (TrabalRuleItem rear : truthRightBorder) {

-        AnnotationRule newRule = new AnnotationRule(this, target, truthAnnotation);

-        newRule.setFrontBoundary(front);

-        newRule.setRearBoundary(rear);

-        if (!result.contains(newRule))

-          result.add(newRule);

-      }

-    }

-    return result;

-  }

-

-  /**

-   * Creates basic rules for deletion type errors.

-   * 

-   * @param error

-   * @return list of deletion rules

-   */

-  private List<TrabalRule> createDeletionRules(AnnotationError each) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    TextRulerExample error = each.getError();

-    TrabalRule blankRule = new DeletionRule(this, error.getTarget(),

-            (TrabalAnnotation) error.getAnnotation());

-    result.add(blankRule);

-    return result;

-  }

-

-  /**

-   * Creates basic rules for correction type errors.

-   * 

-   * @param error

-   * @return list of correction rules

-   */

-  private List<TrabalRule> createCorrectionRules(AnnotationError each) {

-    List<TrabalRule> result = new ArrayList<TrabalRule>();

-    TextRulerExample error = each.getError();

-    TextRulerExample truth = each.getTruth();

-    TrabalRule blankRule = new CorrectionRule(this, error.getTarget(),

-            (TrabalAnnotation) error.getAnnotation(), (TrabalAnnotation) truth.getAnnotation());

-    result.add(blankRule);

-    return result;

-  }

-

-  /**

-   * Examines the border of an example annotation and returns all annotations before and on that

-   * border if looking at the left border or returns all annotations on and after the example if

-   * looking at the right border.

-   * 

-   * @param example

-   *          The example that should be examined

-   * @param examineLeftBorder

-   *          set true for the left border or false for the right border to be examined

-   */

-  private List<TrabalRuleItem> getBorderOfExample(TextRulerExample example,

-          TextRulerExampleDocument document, CAS cas, boolean examineLeftBorder) {

-    List<TrabalRuleItem> result = new ArrayList<TrabalRuleItem>();

-    int begin = example.getAnnotation().getBegin();

-    int end = example.getAnnotation().getEnd();

-    TrabalRuleItem ruleItem = new TrabalRuleItem(begin, end, cas, enableFeatures);

-    Type frameType = cas.getTypeSystem().getType(ANNOTATION_TYPE_FRAME);

-    AnnotationFS pointer = cas.createAnnotation(frameType, begin, end);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex().subiterator(pointer);

-    if (examineLeftBorder) {

-      result.addAll(getTermsBefore(ruleItem, document));

-      iterator.moveToFirst();

-      while (iterator.isValid()) {

-        FeatureStructure fs = iterator.get();

-        AnnotationFS a = (AnnotationFS) fs;

-        if (a.getBegin() == begin && a.getEnd() < end) {

-          if (!filterSet.contains(a.getType().getName())

-                  && !a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-            result.add(new TrabalRuleItem(new TrabalAnnotation(a, document, enableFeatures)));

-          }

-        } else {

-          if (a.getBegin() > begin) {

-            break;

-          }

-        }

-        iterator.moveToNext();

-      }

-    } else {

-      iterator.moveToLast();

-      while (iterator.isValid()) {

-        FeatureStructure fs = iterator.get();

-        AnnotationFS a = (AnnotationFS) fs;

-        if (a.getBegin() > begin && a.getEnd() == end) {

-          if (!filterSet.contains(a.getType().getName())

-                  && !a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-            result.add(new TrabalRuleItem(new TrabalAnnotation(a, document, enableFeatures)));

-          }

-        } else {

-          break;

-        }

-        iterator.moveToPrevious();

-      }

-      result.addAll(getTermsAfter(ruleItem, document));

-    }

-    return result;

-  }

-

-  /**

-   * Creates conditions for a given rule.

-   * 

-   * @param rules

-   * @return ranked list of conditions

-   */

-  public RankedList createConditions(List<TrabalRule> rules) {

-    if (rules.size() == 0)

-      return new RankedList(idf);

-    RankedList result;

-    RankedList error = new RankedList(idf);

-    RankedList truth = new RankedList(idf);

-    switch (rules.get(0).getErrorType()) {

-      case SHIFTING_LEFT:

-      case SHIFTING_RIGHT:

-      case EXPANSION:

-        for (TrabalRule rule : rules) {

-          error.addAll(createConditions(rule.getAnnotation()));

-          truth.addAll(createConditions(rule.getTargetAnnotation()));

-        }

-        result = error.subtract(truth.unite(getPositiveExamplesFor(rules.get(0)

-                .getTargetAnnotation().getType())));

-        setNegative(result);

-        result.addAll(truth.cut(

-                getPositiveExamplesFor(rules.get(0).getTargetAnnotation().getType())).subtract(

-                error));

-        return result;

-      case CORRECTION:

-        for (TrabalRule rule : rules) {

-          truth.addAll(createConditions(rule.getAnnotation()));

-        }

-        result = getPositiveExamplesFor(rules.get(0).getAnnotation().getType()).subtract(

-                truth.unite(getPositiveExamplesFor(rules.get(0).getTargetAnnotation().getType())));

-        setNegative(result);

-        if (getPositiveExamplesFor(rules.get(0).getTargetAnnotation().getType()).size() > 0) {

-          result.addAll(truth.cut(

-                  getPositiveExamplesFor(rules.get(0).getTargetAnnotation().getType())).subtract(

-                  getPositiveExamplesFor(rules.get(0).getAnnotation().getType())));

-        } else {

-          result.addAll(truth);

-        }

-        return result;

-      case ANNOTATION:

-        for (TrabalRule rule : rules) {

-          truth.addAll(createConditions(rule.getFrontBoundary(), rule.getRearBoundary(),

-                  rule.getTargetAnnotation()));

-        }

-        if (getPositiveExamplesFor(rules.get(0).getTargetAnnotation().getType()).size() > 0) {

-          return truth.cut(getPositiveExamplesFor(rules.get(0).getTargetAnnotation().getType()));

-        }

-        return truth;

-      case DELETION:

-        for (TrabalRule rule : rules) {

-          error.addAll(createConditions(rule.getAnnotation()));

-        }

-        result = getPositiveExamplesFor(rules.get(0).getAnnotation().getType()).subtract(error);

-        setNegative(result);

-        result.addAll(createConditions(rules.get(0).getAnnotation()).subtract(

-                getPositiveExamplesFor(rules.get(0).getAnnotation().getType())));

-        return result;

-    }

-    return null;

-  }

-

-  public RankedList getPositiveExamplesFor(Type type) {

-    if (positiveExamples.containsKey(type.getShortName())) {

-      return positiveExamples.get(type.getShortName());

-    } else {

-      return new RankedList(idf);

-    }

-  }

-

-  public void setNegative(RankedList list) {

-    for (Condition element : list.getRanking().keySet()) {

-      element.setNegative();

-    }

-    for (Condition element : list) {

-      element.setNegative();

-    }

-  }

-

-  /**

-   * Creates conditions for a rule given by its boundaries and annotation type.

-   * 

-   * @param frontBoundary

-   * @param rearBoundary

-   * @param truth

-   * @return ranked list of conditions

-   */

-  private RankedList createConditions(TrabalRuleItem frontBoundary, TrabalRuleItem rearBoundary,

-          TrabalAnnotation truth) {

-    RankedList result = new RankedList(idf);

-    TextRulerExampleDocument doc = additionalDocuments.getDocuments().get(

-            exampleDocuments.getDocuments().indexOf(truth.getDocument()));

-    CAS cas = doc.getCAS();

-    for (TrabalRuleItem item : getTermsBefore(frontBoundary, doc)) {

-      result.add(new Condition(ConditionType.AFTER, item));

-    }

-    for (TrabalRuleItem item : getTermsAfter(rearBoundary, doc)) {

-      result.add(new Condition(ConditionType.BEFORE, item));

-    }

-    for (TrabalRuleItem item : getConsumingTerms(frontBoundary, doc)) {

-      if (!item.getAnnotation().getType().equals(cas.getDocumentAnnotation().getType())) {

-        result.add(new Condition(ConditionType.PARTOF, item));

-      }

-    }

-    if (frontBoundary.getAnnotation().getBegin() < truth.getBegin()) {

-      for (TrabalRuleItem item : getTermsAfter(frontBoundary, doc)) {

-        result.add(new Condition(ConditionType.STARTSWITH, item));

-      }

-    } else {

-      for (List<TrabalRuleItem> list : getFirstTermsWithinBounds(frontBoundary.getAnnotation()

-              .getBegin(), rearBoundary.getAnnotation().getEnd(), doc, cas, 1)) {

-        result.add(new Condition(ConditionType.STARTSWITH, list.get(0)));

-      }

-    }

-    if (rearBoundary.getAnnotation().getEnd() > truth.getEnd()) {

-      for (TrabalRuleItem item : getTermsBefore(rearBoundary, doc)) {

-        result.add(new Condition(ConditionType.ENDSWITH, item));

-      }

-    } else {

-      for (List<TrabalRuleItem> list : getLastTermsWithinBounds(rearBoundary.getAnnotation()

-              .getBegin(), frontBoundary.getAnnotation().getEnd(), doc, cas, 1)) {

-        result.add(new Condition(ConditionType.ENDSWITH, list.get(0)));

-      }

-    }

-    return result;

-  }

-

-  /**

-   * Creates conditions for a rule, given by its annotation.

-   * 

-   * @param error

-   * @return ranked list of conditions

-   */

-  private RankedList createConditions(TrabalAnnotation annotation) {

-    RankedList result = new RankedList(idf);

-    TrabalRuleItem ruleItem = new TrabalRuleItem(annotation);

-    TextRulerExampleDocument doc = annotation.getDocument();

-    CAS cas = doc.getCAS();

-    for (TrabalRuleItem item : getTermsBefore(ruleItem, doc)) {

-      result.add(new Condition(ConditionType.AFTER, item));

-    }

-    for (TrabalRuleItem item : getTermsAfter(ruleItem, doc)) {

-      result.add(new Condition(ConditionType.BEFORE, item));

-    }

-    for (TrabalRuleItem item : getConsumingTerms(ruleItem, doc)) {

-      if (!item.getAnnotation().getType().equals(cas.getDocumentAnnotation().getType())) {

-        result.add(new Condition(ConditionType.PARTOF, item));

-      }

-    }

-    for (List<TrabalRuleItem> list : getFirstTermsWithinBounds(ruleItem.getAnnotation().getBegin(),

-            ruleItem.getAnnotation().getEnd(), doc, cas, 1)) {

-      result.add(new Condition(ConditionType.STARTSWITH, list.get(0)));

-    }

-    for (List<TrabalRuleItem> list : getLastTermsWithinBounds(ruleItem.getAnnotation().getBegin(),

-            ruleItem.getAnnotation().getEnd(), doc, cas, 1)) {

-      result.add(new Condition(ConditionType.ENDSWITH, list.get(0)));

-    }

-    for (TrabalRuleItem item : getSingleTermsWithinBounds(ruleItem.getAnnotation().getBegin(),

-            ruleItem.getAnnotation().getEnd(), doc, cas)) {

-      result.add(new Condition(ConditionType.CONTAINS, item));

-    }

-    return result;

-  }

-

-  /**

-   * Returns all items directly preceding the given example rule item.

-   * 

-   * @param ruleItem

-   *          Examined rule item

-   * @param document

-   *          Example document

-   * @param cas

-   *          The CAS

-   * @return List of rule items that precede the given example

-   */

-  private List<TrabalRuleItem> getTermsBefore(TrabalRuleItem ruleItem,

-          TextRulerExampleDocument document) {

-    List<TrabalRuleItem> result = new ArrayList<TrabalRuleItem>();

-    int begin = ruleItem.getAnnotation().getBegin();

-    CAS cas = document.getCAS();

-    Type frameType = cas.getTypeSystem().getType(ANNOTATION_TYPE_FRAME);

-    AnnotationFS pointer = cas.createAnnotation(frameType, begin, begin);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex().iterator(pointer);

-    int nextEnd = -1;

-

-    while (iterator.isValid()) {

-      FeatureStructure fs = iterator.get();

-      if (fs instanceof AnnotationFS) {

-        AnnotationFS a = (AnnotationFS) fs;

-        if (!filterSet.contains(a.getType().getName())

-                && !a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-          if (a.getEnd() > begin) {

-            iterator.moveToPrevious();

-            continue;

-          }

-          if (nextEnd == -1) {

-            nextEnd = a.getEnd();

-          }

-          if (a.getEnd() >= nextEnd && a.getEnd() <= begin) {

-            TrabalRuleItem term = new TrabalRuleItem(new TrabalAnnotation(a, document,

-                    enableFeatures));

-            result.add(term);

-          }

-        }

-      }

-      iterator.moveToPrevious();

-    }

-    return result;

-  }

-

-  /**

-   * Returns all items directly following the given example rule item.

-   * 

-   * @param ruleItem

-   *          Examined rule item

-   * @param document

-   *          Example document

-   * @param cas

-   *          The CAS

-   * @return List of rule items that follow the given example

-   */

-  private List<TrabalRuleItem> getTermsAfter(TrabalRuleItem ruleItem,

-          TextRulerExampleDocument document) {

-    List<TrabalRuleItem> result = new ArrayList<TrabalRuleItem>();

-    int end = ruleItem.getAnnotation().getEnd();

-    CAS cas = document.getCAS();

-    Type frameType = cas.getTypeSystem().getType(ANNOTATION_TYPE_FRAME);

-    AnnotationFS pointer = cas.createAnnotation(frameType, end, Integer.MAX_VALUE);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex().iterator(pointer);

-    int nextBegin = -1;

-    while (iterator.isValid()) {

-      FeatureStructure fs = iterator.get();

-      if (fs instanceof AnnotationFS) {

-        AnnotationFS a = (AnnotationFS) fs;

-        if (!filterSet.contains(a.getType().getName())

-                && !a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-          if (nextBegin == -1) {

-            nextBegin = a.getBegin();

-          }

-          if (a.getBegin() <= nextBegin && a.getBegin() >= end) {

-            TrabalRuleItem term = new TrabalRuleItem(new TrabalAnnotation(a, document,

-                    enableFeatures));

-            result.add(term);

-          }

-        }

-      }

-      iterator.moveToNext();

-    }

-    return result;

-  }

-

-  /**

-   * Gets the left border within the bounds, that means a list of elements that start with the

-   * border and those that end right before it.

-   * 

-   * @param startPos

-   * @param endPos

-   * @param document

-   * @param cas

-   * @param numberOfSideItems

-   * @return first term

-   */

-  private List<List<TrabalRuleItem>> getFirstTermsWithinBounds(int startPos, int endPos,

-          TextRulerExampleDocument document, CAS cas, int numberOfSideItems) {

-    List<List<TrabalRuleItem>> preItems = new ArrayList<List<TrabalRuleItem>>();

-    Type frameType = cas.getTypeSystem().getType(ANNOTATION_TYPE_FRAME);

-    AnnotationFS pointer = cas.createAnnotation(frameType, startPos, endPos);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex().iterator(pointer);

-    List<AnnotationFS> startAs = new ArrayList<AnnotationFS>();

-    int firstBegin = -1;

-    while (iterator.isValid()) {

-      FeatureStructure fs = iterator.get();

-      AnnotationFS a = (AnnotationFS) fs;

-

-      if (a.getBegin() >= startPos && a.getEnd() <= endPos) {

-        if (!filterSet.contains(a.getType().getName())

-                && !a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-          if (firstBegin == -1) {

-            firstBegin = a.getBegin();

-          }

-          if (a.getBegin() == firstBegin)

-            startAs.add(a);

-        }

-        iterator.moveToNext();

-      } else {

-        iterator.moveToNext();

-      }

-    }

-

-    for (AnnotationFS each : startAs) {

-      List<TrabalRuleItem> startList = new ArrayList<TrabalRuleItem>();

-      TrabalRuleItem term = new TrabalRuleItem(new TrabalAnnotation(each, document, enableFeatures));

-      startList.add(term);

-      preItems.add(startList);

-    }

-    preItems = addFollowing(preItems, endPos, document, cas, 1, numberOfSideItems);

-    return preItems;

-  }

-

-  /**

-   * Gets the right border within the bounds, that means a list of elements that end with the border

-   * and those that start right behind it.

-   * 

-   * @param startPos

-   * @param endPos

-   * @param document

-   * @param cas

-   * @param numberOfSideItems

-   * @return last term

-   */

-  private List<List<TrabalRuleItem>> getLastTermsWithinBounds(int startPos, int endPos,

-          TextRulerExampleDocument document, CAS cas, int numberOfSideItems) {

-    List<List<TrabalRuleItem>> postItems = new ArrayList<List<TrabalRuleItem>>();

-    Type frameType = cas.getTypeSystem().getType(ANNOTATION_TYPE_FRAME);

-    AnnotationFS pointer = cas.createAnnotation(frameType, startPos, endPos);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex().iterator(pointer);

-    iterator.moveToLast();

-    List<AnnotationFS> endAs = new ArrayList<AnnotationFS>();

-    int lastEnd = -1;

-    while (iterator.isValid()) {

-      FeatureStructure fs = iterator.get();

-      AnnotationFS a = (AnnotationFS) fs;

-

-      if (a.getEnd() <= endPos && a.getBegin() >= startPos) {

-        if (!filterSet.contains(a.getType().getName())

-                && !a.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-          if (lastEnd == -1) {

-            lastEnd = a.getEnd();

-          }

-          if (a.getEnd() == lastEnd)

-            endAs.add(a);

-        }

-        iterator.moveToPrevious();

-      } else {

-        iterator.moveToPrevious();

-      }

-    }

-

-    for (AnnotationFS each : endAs) {

-      List<TrabalRuleItem> endList = new ArrayList<TrabalRuleItem>();

-      TrabalRuleItem term = new TrabalRuleItem(new TrabalAnnotation(each, document, enableFeatures));

-      endList.add(term);

-      postItems.add(endList);

-    }

-    postItems = addPreceding(postItems, startPos, document, cas, 1, numberOfSideItems);

-    return postItems;

-  }

-

-  /**

-   * Returns a list of rule elements that precede the given elements.

-   * 

-   * @param lists

-   * @param till

-   * @param document

-   * @param cas

-   * @param index

-   * @param maxNumberOfItems

-   * @return updated list of items

-   */

-  private List<List<TrabalRuleItem>> addPreceding(List<List<TrabalRuleItem>> lists, int till,

-          TextRulerExampleDocument document, CAS cas, int index, int maxNumberOfItems) {

-    if (index >= maxNumberOfItems) {

-      return lists;

-    }

-    List<List<TrabalRuleItem>> result = new ArrayList<List<TrabalRuleItem>>();

-    for (List<TrabalRuleItem> list : lists) {

-      if (shouldAbort()) {

-        break;

-      }

-      List<List<TrabalRuleItem>> newLists = new ArrayList<List<TrabalRuleItem>>();

-      TrabalRuleItem first = list.get(0);

-      List<TrabalRuleItem> termsBefore = getTermsBefore(first, document);

-      if (termsBefore.isEmpty()) {

-        continue;

-      }

-      for (TrabalRuleItem eachBefore : termsBefore) {

-        if (eachBefore.getAnnotation().getBegin() >= till) {

-          List<TrabalRuleItem> newList = new ArrayList<TrabalRuleItem>();

-          newList.addAll(list);

-          newList.add(0, eachBefore);

-          newLists.add(newList);

-          newLists = addPreceding(newLists, till, document, cas, index + 1, maxNumberOfItems);

-        }

-      }

-      result.addAll(newLists);

-    }

-    if (result.isEmpty()) {

-      return lists;

-    }

-    return result;

-  }

-

-  /**

-   * Returns a list of rule elements that follow on the given elements.

-   * 

-   * @param lists

-   * @param till

-   * @param document

-   * @param cas

-   * @param index

-   * @param maxNumberOfItems

-   * @return updated list of items

-   */

-  private List<List<TrabalRuleItem>> addFollowing(List<List<TrabalRuleItem>> lists, int till,

-          TextRulerExampleDocument document, CAS cas, int index, int maxNumberOfItems) {

-    if (index >= maxNumberOfItems) {

-      return lists;

-    }

-    List<List<TrabalRuleItem>> result = new ArrayList<List<TrabalRuleItem>>();

-    for (List<TrabalRuleItem> list : lists) {

-      if (shouldAbort()) {

-        break;

-      }

-      List<List<TrabalRuleItem>> newLists = new ArrayList<List<TrabalRuleItem>>();

-      TrabalRuleItem last = list.get(list.size() - 1);

-      List<TrabalRuleItem> termsAfter = getTermsAfter(last, document);

-      if (termsAfter.isEmpty()) {

-        continue;

-      }

-      for (TrabalRuleItem eachAfter : termsAfter) {

-        if (eachAfter.getAnnotation().getEnd() <= till) {

-          List<TrabalRuleItem> newList = new ArrayList<TrabalRuleItem>();

-          newList.addAll(list);

-          newList.add(eachAfter);

-          newLists.add(newList);

-          newLists = addFollowing(newLists, till, document, cas, index + 1, maxNumberOfItems);

-        }

-      }

-      result.addAll(newLists);

-    }

-    if (result.isEmpty()) {

-      return lists;

-    }

-    return result;

-  }

-

-  /**

-   * Returns a list of all items, consuming the given RuleItem.

-   */

-  private List<TrabalRuleItem> getConsumingTerms(TrabalRuleItem ruleItem,

-          TextRulerExampleDocument document) {

-    CAS cas = document.getCAS();

-    List<TrabalRuleItem> result = new ArrayList<TrabalRuleItem>();

-    int begin = ruleItem.getAnnotation().getBegin();

-    Type frameType = cas.getTypeSystem().getType(ANNOTATION_TYPE_FRAME);

-    AnnotationFS pointer = cas.createAnnotation(frameType, 0, begin);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex().iterator(pointer);

-    while (iterator.hasNext()) {

-      TrabalAnnotation annotation = new TrabalAnnotation(iterator.next(), enableFeatures);

-      if (annotation.getBegin() >= begin) {

-        break;

-      }

-      if (annotation.getEnd() >= ruleItem.getAnnotation().getEnd()) {

-        result.add(new TrabalRuleItem(annotation));

-      }

-    }

-    return result;

-  }

-

-  /**

-   * Returns a list of rule items within the given bounds.

-   * 

-   * @param begin

-   * @param end

-   * @param doc

-   * @param cas

-   * @return list of terms

-   */

-  private List<TrabalRuleItem> getSingleTermsWithinBounds(int begin, int end,

-          TextRulerExampleDocument doc, CAS cas) {

-    Set<TrabalRuleItem> result = new HashSet<TrabalRuleItem>();

-    Type frameType = cas.getTypeSystem().getType(ANNOTATION_TYPE_FRAME);

-    AnnotationFS pointer = cas.createAnnotation(frameType, begin, end);

-    FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex().iterator(pointer);

-    while (iterator.hasNext()) {

-      TrabalAnnotation annotation = new TrabalAnnotation(iterator.next(), enableFeatures);

-      if (annotation.getBegin() > end) {

-        break;

-      }

-      if (!filterSet.contains(annotation.getType().getName())

-              && !annotation.getType().getName().equals(ANNOTATION_TYPE_BASIC)) {

-        result.add(new TrabalRuleItem(annotation));

-      }

-    }

-    return new ArrayList<TrabalRuleItem>(result);

-  }

-

-  /**

-   * Applies a set of rules to the additional data and compares it to the training data to rate

-   * them.

-   * 

-   * @param rules

-   * @param documents

-   * @param additionalDocuments

-   * @param ruleSet

-   * @return list of rules

-   */

-  public List<TrabalRule> testTrabalRulesOnDocumentSet(List<TrabalRule> rules,

-          final TextRulerExampleDocumentSet documents,

-          final TextRulerExampleDocumentSet additionalDocuments, String ruleSet) {

-

-    if (rules.isEmpty())

-      return rules;

-

-    List<TextRulerStatisticsCollector> sums = new ArrayList<TextRulerStatisticsCollector>();

-    for (TrabalRule each : rules) {

-      sums.add(new TextRulerStatisticsCollector());

-    }

-    List<TextRulerExampleDocument> goldDocs;

-    List<TextRulerExampleDocument> additionalDocs;

-    goldDocs = documents.getDocuments();

-    additionalDocs = additionalDocuments.getDocuments();

-    CAS theTestCAS = getTestCAS();

-    int counter = 0;

-    for (TrabalRule rule : rules) {

-      counter++;

-      String ruleString = rule.getRuleString();

-      String ruleInfo = getRuleInfo(rule);

-      System.out.println("testing: " + ruleString);

-      if (inducedRules.containsKey(ruleString)) {

-        rule.setCoveringStatistics(inducedRules.get(ruleString));

-        System.out.println("skipped with " + inducedRules.get(ruleString));

-      } else {

-        for (int i = 0; i < goldDocs.size(); i++) {

-          TextRulerExampleDocument goldDoc = goldDocs.get(i);

-          TextRulerExampleDocument additionalDoc = additionalDocs.get(i);

-          sendStatusUpdateToDelegate("Testing " + ruleSet + ruleInfo + " on document " + (i + 1)

-                  + " of " + goldDocs.size() + " : rule " + counter + " of " + rules.size(),

-                  TextRulerLearnerState.ML_RUNNING, false);

-          TextRulerStatisticsCollector sumC = new TextRulerStatisticsCollector();

-          prepareTestCas(theTestCAS, goldDoc, additionalDoc);

-          testRuleOnDocument(rule, goldDoc, additionalDoc, sumC, theTestCAS);

-          sums.get(counter - 1).add(sumC);

-          int n = sumC.getCoveredNegativesCount();

-          int p = sumC.getCoveredPositivesCount();

-          int pnorm = p;

-          if (pnorm == 0) {

-            pnorm = 1;

-          }

-          if (n / pnorm > maxErrorRate) {

-            System.out.println("stopped:" + sumC);

-            break;

-          }

-

-          if (shouldAbort())

-            return rules;

-        }

-        TextRulerStatisticsCollector c = sums.get(counter - 1);

-        rule.setCoveringStatistics(sums.get(counter - 1));

-        inducedRules.put(ruleString, c);

-      }

-    }

-    for (int ruleIndex = 0; ruleIndex < rules.size(); ruleIndex++) {

-      rules.get(ruleIndex).setCoveringStatistics(sums.get(ruleIndex));

-    }

-//    GlobalCASSource.releaseCAS(theTestCAS);

-    sums.clear();

-    return rules;

-  }

-

-  private String getRuleInfo(TrabalRule rule) {

-    String ruleInfo;

-    if (rule.getAnnotation() != null && rule.getTargetAnnotation() != null) {

-      ruleInfo = " " + rule.getAnnotation().getType().getShortName() + "("

-              + rule.getAnnotation().getBegin() + "," + rule.getAnnotation().getEnd() + ") -> "

-              + rule.getTargetAnnotation().getType().getShortName() + "("

-              + rule.getTargetAnnotation().getBegin() + "," + rule.getTargetAnnotation().getEnd()

-              + ")";

-    } else if (rule.getTargetAnnotation() != null) {

-      ruleInfo = " Annotate " + rule.getTargetAnnotation().getType().getShortName() + "("

-              + rule.getTargetAnnotation().getBegin() + "," + rule.getTargetAnnotation().getEnd()

-              + ")";

-    } else {

-      ruleInfo = " Delete " + rule.getAnnotation().getType().getShortName() + "("

-              + rule.getAnnotation().getBegin() + "," + rule.getAnnotation().getEnd() + ")";

-    }

-    return ruleInfo;

-  }

-

-  /**

-   * Resets the test CAS and adds the annotations of the additional data.

-   * 

-   * @param testCas

-   * @param goldDoc

-   * @param additionalDoc

-   */

-  private void prepareTestCas(CAS testCas, TextRulerExampleDocument goldDoc,

-          TextRulerExampleDocument additionalDoc) {

-    testCas.reset();

-    CAS goldCas = goldDoc.getCAS();

-    CAS additionalCas = additionalDoc.getCAS();

-    testCas.setDocumentText(goldCas.getDocumentText());

-

-    CasCopier.copyCas(additionalCas, testCas, testCas.getDocumentText() == null);

-    

-//    for (AnnotationFS fs : additionalCas.getAnnotationIndex()) {

-//      Type t = testCas.getTypeSystem().getType(fs.getType().getName());

-//      if (t != null) {

-//        // TODO what about the features!!

-//        AnnotationFS createAnnotation = testCas.createAnnotation(t, fs.getBegin(), fs.getEnd());

-//        testCas.addFsToIndexes(createAnnotation);

-//      } else {

-//        TextRulerToolkit.log("Type " + fs.getType().getName() + "is unknown in test CAS");

-//      }

-//    }

-  }

-

-  /**

-   * Applies a rule to an element of the additional data and compares the result to the

-   * corresponding element of the training data.

-   * 

-   * @param rule

-   * @param goldDoc

-   * @param additionalDoc

-   * @param c

-   * @param testCas

-   */

-  private void testRuleOnDocument(final TrabalRule rule, final TextRulerExampleDocument goldDoc,

-          final TextRulerExampleDocument additionalDoc, final TextRulerStatisticsCollector c,

-          CAS testCas) {

-    if (TextRulerToolkit.DEBUG) {

-      MemoryWatch.watch();

-    }

-    try {

-      rule.saveToRulesFile(getTempRulesFileName());

-      if (TextRulerToolkit.DEBUG) {

-        TextRulerToolkit.writeCAStoXMIFile(testCas, tempDirectory() + "testCas.xmi");

-      }

-      ae.process(testCas);

-      removeBasics(testCas);

-      if (TextRulerToolkit.DEBUG) {

-        TextRulerToolkit.writeCAStoXMIFile(testCas, tempDirectory() + "testCasProcessed.xmi");

-      }

-      if (rule.getAnnotation() != null && rule.getTargetAnnotation() != null) {

-        compareOriginalDocumentWithTestCAS(goldDoc, additionalDoc, testCas, new TextRulerTarget(

-                rule.getAnnotation().getType().getName(), this), c, false);

-        if (rule.getAnnotation().getType() != rule.getTargetAnnotation().getType()) {

-          compareOriginalDocumentWithTestCAS(goldDoc, additionalDoc, testCas, new TextRulerTarget(

-                  rule.getTargetAnnotation().getType().getName(), this), c, false);

-        }

-      } else if (rule.getTargetAnnotation() != null) {

-        compareOriginalDocumentWithTestCAS(goldDoc, additionalDoc, testCas, new TextRulerTarget(

-                rule.getTargetAnnotation().getType().getName(), this), c, false);

-      } else {

-        compareOriginalDocumentWithTestCAS(goldDoc, additionalDoc, testCas, new TextRulerTarget(

-                rule.getAnnotation().getType().getName(), this), c, false);

-      }

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

-  }

-

-  /**

-   * Compares two documents to rate the results of an applied rule.

-   * 

-   * @param goldDoc

-   * @param additionalDoc

-   * @param testCas

-   * @param target

-   * @param c

-   * @param collectNegativeExamples

-   */

-  private void compareOriginalDocumentWithTestCAS(TextRulerExampleDocument goldDoc,

-          TextRulerExampleDocument additionalDoc, CAS testCas, TextRulerTarget target,

-          TextRulerStatisticsCollector c, boolean collectNegativeExamples) {

-

-    List<TextRulerExample> goldPositives = goldDoc.createSlotInstancesForCAS(goldDoc.getCAS(),

-            target, true);

-    List<TextRulerExample> additionalPositives = additionalDoc.createSlotInstancesForCAS(

-            additionalDoc.getCAS(), target, true);

-    List<TextRulerExample> testPositives = goldDoc

-            .createSlotInstancesForCAS(testCas, target, false);

-

-    List<TextRulerExample> baseFP = new ArrayList<TextRulerExample>();

-    for (TextRulerExample e : additionalPositives) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(goldPositives,

-              e.getAnnotation());

-      if (example == null) {

-        baseFP.add(e);

-      }

-    }

-    List<TextRulerExample> baseFN = new ArrayList<TextRulerExample>();

-    for (TextRulerExample e : goldPositives) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(

-              additionalPositives, e.getAnnotation());

-      if (example == null) {

-        baseFN.add(e);

-      }

-    }

-

-    List<TextRulerExample> testFP = new ArrayList<TextRulerExample>();

-    for (TextRulerExample e : testPositives) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(goldPositives,

-              e.getAnnotation());

-      if (example == null) {

-        testFP.add(e);

-      }

-    }

-    List<TextRulerExample> testFN = new ArrayList<TextRulerExample>();

-    for (TextRulerExample e : goldPositives) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(testPositives,

-              e.getAnnotation());

-      if (example == null) {

-        testFN.add(e);

-      }

-    }

-

-    for (TextRulerExample e : baseFP) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(testFP,

-              e.getAnnotation());

-      if (example == null) {

-        c.addCoveredPositive(e);

-      }

-    }

-

-    for (TextRulerExample e : baseFN) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(testFN,

-              e.getAnnotation());

-      TextRulerExample coveredExample = TextRulerToolkit.exampleListContainsAnnotation(

-              goldPositives, e.getAnnotation());

-      if (example == null) {

-        c.addCoveredPositive(coveredExample);

-      }

-    }

-

-    for (TextRulerExample e : testFN) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(baseFN,

-              e.getAnnotation());

-      if (example == null) {

-        if (collectNegativeExamples) {

-          e.setPositive(false);

-          c.addCoveredNegative(e);

-        } else {

-          c.incCoveredNegatives(1);

-        }

-      }

-    }

-

-    for (TextRulerExample e : testFP) {

-      TextRulerExample example = TextRulerToolkit.exampleListContainsAnnotation(baseFP,

-              e.getAnnotation());

-      if (example == null) {

-        c.incCoveredNegatives(1);

-      }

-    }

-  }

-

-  /**

-   * Removes duplicate rules by their hash value.

-   * 

-   * @param rules

-   * @return updated list

-   */

-  public static List<TrabalRule> removeDuplicateRules(List<TrabalRule> rules) {

-    return new ArrayList<TrabalRule>(new HashSet<TrabalRule>(rules));

-  }

-

-  /**

-   * Returns a string, containing the rules of the given list.

-   * 

-   * @param rules

-   * @return string representation of given rules

-   */

-  public static String getRuleStrings(List<TrabalRule> rules) {

-    String result = "";

-    for (TrabalRule r : rules) {

-      result += r.toString();

-    }

-    return result;

-  }

-

-  /**

-   * Tests, if the given type is a slot type.

-   * 

-   * @param type

-   * @return true, if given type is a slot type

-   */

-  public boolean isSlotType(Type type) {

-    for (String slot : slotNames) {

-      if (slot.equals(type.getName())) {

-        return true;

-      }

-    }

-    return false;

-  }

-

-  public boolean collectNegativeCoveredInstancesWhenTesting() {

-    return false;

-  }

-

-  public String getResultString() {

-    return getFileHeaderString(true) + result;

-  }

-

-  // // @Override

-  // public AnalysisEngine getAnalysisEngine() {

-  // if (ae == null) {

-  // String descriptorFile = TextRulerToolkit.getEngineDescriptorFromTMSourceFile(new Path(

-  // preprocessorTMFile));

-  // sendStatusUpdateToDelegate("loading AE...", TextRulerLearnerState.ML_INITIALIZING, false);

-  // ae = TextRulerToolkit.loadAnalysisEngine(descriptorFile);

-  //

-  // // set filters to NO filtering so that we can add it manually with

-  // // the FILTERTYPE expression!

-  // String tempRulesFileName = getTempRulesFileName();

-  // IPath path = new Path(tempRulesFileName);

-  // ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension()

-  // .lastSegment());

-  // String portableString = path.removeLastSegments(1).toPortableString();

-  // ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { portableString });

-  // ae.setConfigParameterValue(RutaEngine.ADDITIONAL_SCRIPTS, new String[0]);

-  // ae.setConfigParameterValue(RutaEngine.RELOAD_SCRIPT, true);

-  // ae.setConfigParameterValue(RutaEngine.REMOVE_BASICS, true);

-  //

-  // try {

-  // ae.reconfigure();

-  // } catch (ResourceConfigurationException e) {

-  // TextRulerPlugin.error(e);

-  // return null;

-  // }

-  // }

-  // return ae;

-  // }

-

-  /**

-   * Return the set of additional documents and initializes it, if needed.

-   */

-  public TextRulerExampleDocumentSet getAdditionalDocuments() {

-    if (additionalDocuments == null) {

-      if (!StringUtils.isBlank(additionalFolderPath)) {

-        additionalDocuments = new TextRulerExampleDocumentSet(additionalFolderPath, casCache);

-      }

-    }

-    return additionalDocuments;

-  }

-

-  public boolean getEnableFeatures() {

-    return enableFeatures;

-  }

-

-  // @Override

-  public void setParameters(Map<String, Object> params) {

-    if (TextRulerToolkit.DEBUG)

-      saveParametersToTempFolder(params);

-    if (params.containsKey(MAX_NUMBER_OF_BASIC_RULES_KEY))

-      maxNumberOfBasicRules = (Integer) params.get(MAX_NUMBER_OF_BASIC_RULES_KEY);

-    if (params.containsKey(MAX_NUMBER_OF_RULES_KEY))

-      maxNumberOfRules = (Integer) params.get(MAX_NUMBER_OF_RULES_KEY);

-    if (params.containsKey(MAX_NUMBER_OF_ITERATIONS_KEY))

-      maxNumberOfIterations = (Integer) params.get(MAX_NUMBER_OF_ITERATIONS_KEY);

-    if (params.containsKey(ALGORITHM_ITERATIONS_KEY))

-      algorithmIterations = (Integer) params.get(ALGORITHM_ITERATIONS_KEY);

-    if (params.containsKey(MAX_ERROR_RATE_KEY))

-      maxErrorRate = (Double) params.get(MAX_ERROR_RATE_KEY);

-    if (params.containsKey(ENABLE_FEATURES_KEY))

-      enableFeatures = (Boolean) params.get(ENABLE_FEATURES_KEY);

-  }

-

-  /**

-   * Creates a file in the *.csv format, containing TraBaL errors (error type, file name, false

-   * annotation and true annotation).

-   * 

-   * @throws Exception

-   */

-  public void getErrorsAsCSV(String filePath) throws Exception {

-    String result = "";

-    if (exampleDocuments == null) {

-      exampleDocuments = new TextRulerExampleDocumentSet(inputDirectory, casCache);

-    }

-    getAdditionalDocuments();

-    errors = createErrorList();

-    result += "'ErrorType';'FileName';'AnnotationType';'Annotation';'TargetAnnotationType';'TargetAnnotation';\n";

-    for (AnnotationError each : errors) {

-      if (each.getAnnotation() != null && each.getTargetAnnotation() != null) {

-        result += "'" + each.getType() + "';'"

-                + new File(each.getAnnotation().getDocument().getCasFileName()).getName() + "';'"

-                + each.getAnnotation().getType().getShortName() + "';'"

-                + each.getAnnotation().getCoveredText() + "';'"

-                + each.getTargetAnnotation().getType().getShortName() + "';'"

-                + each.getTargetAnnotation().getCoveredText() + "';\n";

-      } else if (each.getAnnotation() != null) {

-        result += "'" + each.getType() + "';'"

-                + new File(each.getAnnotation().getDocument().getCasFileName()).getName() + "';'"

-                + each.getAnnotation().getType().getShortName() + "';'"

-                + each.getAnnotation().getCoveredText() + "';'';'';\n";

-      } else {

-        result += "'" + each.getType() + "';'"

-                + new File(each.getTargetAnnotation().getDocument().getCasFileName()).getName()

-                + "';'';'';'" + each.getTargetAnnotation().getType().getShortName() + "';'"

-                + each.getTargetAnnotation().getCoveredText() + "';\n";

-      }

-    }

-    if (errors.size() > 0) {

-      File csv = new File(filePath);

-      FileWriter fstream = new FileWriter(csv);

-      BufferedWriter out = new BufferedWriter(fstream);

-      out.write(result);

-      out.close();

-    }

-  }

-

-  /**

-   * Compares trabal rules, disregarding the error rate, so basic rules with maximum number of

-   * covered positives are chosen.

-   */

-  protected Comparator<TrabalRule> basicComparator = new Comparator<TrabalRule>() {

-    public int compare(TrabalRule o1, TrabalRule o2) {

-      // coveredPositives

-      if (o1.getCoveringStatistics().getCoveredPositivesCount() > o2.getCoveringStatistics()

-              .getCoveredPositivesCount())

-        return -1;

-      if (o1.getCoveringStatistics().getCoveredPositivesCount() < o2.getCoveringStatistics()

-              .getCoveredPositivesCount())

-        return 1;

-      // coveredNegatives

-      if (o1.getCoveringStatistics().getCoveredNegativesCount() < o2.getCoveringStatistics()

-              .getCoveredNegativesCount())

-        return -1;

-      if (o1.getCoveringStatistics().getCoveredNegativesCount() > o2.getCoveringStatistics()

-              .getCoveredNegativesCount())

-        return 1;

-      // complexity of rules

-      if (o1.getConditions().size() < o2.getConditions().size())

-        return -1;

-      if (o1.getConditions().size() > o2.getConditions().size())

-        return 1;

-      // ruleString

-      return o1.getRuleString().compareTo(o2.getRuleString());

-    }

-  };

-

-  /**

-   * Compares trabal rules, starting with the error rate.

-   */

-  protected Comparator<TrabalRule> enhancedComparator = new Comparator<TrabalRule>() {

-    public int compare(TrabalRule o1, TrabalRule o2) {

-      // positives - negatives

-      if (o1.getCoveringStatistics().getCoveredPositivesCount()

-              - o1.getCoveringStatistics().getCoveredNegativesCount() > o2.getCoveringStatistics()

-              .getCoveredPositivesCount() - o2.getCoveringStatistics().getCoveredNegativesCount())

-        return -1;

-      if (o1.getCoveringStatistics().getCoveredPositivesCount()

-              - o1.getCoveringStatistics().getCoveredNegativesCount() < o2.getCoveringStatistics()

-              .getCoveredPositivesCount() - o2.getCoveringStatistics().getCoveredNegativesCount())

-        return 1;

-      // coveredPositives

-      if (o1.getCoveringStatistics().getCoveredPositivesCount() > o2.getCoveringStatistics()

-              .getCoveredPositivesCount())

-        return -1;

-      if (o1.getCoveringStatistics().getCoveredPositivesCount() < o2.getCoveringStatistics()

-              .getCoveredPositivesCount())

-        return 1;

-      // coveredNegatives

-      if (o1.getCoveringStatistics().getCoveredNegativesCount() < o2.getCoveringStatistics()

-              .getCoveredNegativesCount())

-        return -1;

-      if (o1.getCoveringStatistics().getCoveredNegativesCount() > o2.getCoveringStatistics()

-              .getCoveredNegativesCount())

-        return 1;

-      // complexity of rules

-      if (o1.getConditions().size() < o2.getConditions().size())

-        return -1;

-      if (o1.getConditions().size() > o2.getConditions().size())

-        return 1;

-      // ruleString

-      return o1.getRuleString().compareTo(o2.getRuleString());

-    }

-  };

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalPreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalPreferencePage.java
deleted file mode 100644
index 3e2a055..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalPreferencePage.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.FieldEditorPreferencePage;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class TrabalPreferencePage extends FieldEditorPreferencePage implements

-        IWorkbenchPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.algorithmPages";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public TrabalPreferencePage() {

-    super(FieldEditorPreferencePage.GRID);

-    TextRulerLearnerController ctrl = TextRulerController

-            .getControllerForID("org.apache.uima.ruta.textruler.trabal");

-    this.algorithmController = ctrl;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-  protected void createFieldEditors() {

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, getFieldEditorParent());

-            fields.add(l);

-            addField(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_INT_PARAM:

-          case ML_DOUBLE_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, getFieldEditorParent());

-            fields.add(l);

-            addField(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            break;

-          }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalRule.java
deleted file mode 100644
index c145ea5..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalRule.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.uima.ruta.textruler.core.TextRulerRule;

-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;

-import org.apache.uima.ruta.textruler.core.TextRulerTarget;

-

-public abstract class TrabalRule extends TextRulerRule implements Comparable<TrabalRule> {

-

-  protected TrabalAnnotation annotation;

-

-  protected TrabalAnnotation targetAnnotation;

-

-  protected float errorRate;

-

-  protected AnnotationErrorType errorType;

-  

-  protected List<ConditionType> conditionTypes;

-

-  protected List<Condition> conditions = new ArrayList<Condition>();

-

-  protected int rating = 0;

-

-  public TrabalRule(TrabalLearner parentAlgorithm, TextRulerTarget target) {

-    super(parentAlgorithm, target);

-  }

-

-  @Override

-  public void setCoveringStatistics(TextRulerStatisticsCollector c) {

-    super.setCoveringStatistics(c);

-    int p = c.getCoveredPositivesCount();

-    int n = c.getCoveredNegativesCount();

-    if (p < 1) {

-      errorRate = Float.MAX_VALUE;

-    } else {

-      errorRate = ((float) n) / ((float) p);

-    }

-  }

-

-  public List<Condition> getConditions() {

-    return conditions;

-  }

-

-  public void addCondition(Condition condition) {

-    if (!conditions.contains(condition))

-      conditions.add(condition);

-  }

-

-  public void addCondition(Condition condition, int rating) {

-    if (!conditions.contains(condition)) {

-      conditions.add(condition);

-      this.rating += rating;

-    }

-  }

-

-  protected String parseConditions(List<ConditionType> types) {

-    String result = "";

-    for (Condition each : conditions)

-      if (types.contains(each.getType()))

-        result += each + ", ";

-    if (result.length() > 0)

-      return result.substring(0, result.length() - 2);

-    return "";

-  }

-

-  protected String parseConditions(ConditionType type) {

-    String result = "";

-    for (Condition each : conditions)

-      if (each.getType() == type)

-        result += each + ", ";

-    if (result.length() > 0)

-      return result.substring(0, result.length() - 2);

-    return "";

-  }

-  

-  public float getErrorRate() {

-    return errorRate;

-  }

-

-  public AnnotationErrorType getErrorType() {

-    return errorType;

-  }

-

-  public TrabalAnnotation getAnnotation() {

-    return annotation;

-  }

-

-  public TrabalAnnotation getTargetAnnotation() {

-    return targetAnnotation;

-  }

-

-  public TrabalAnnotation getMatchingAnnotation() {

-    switch (errorType) {

-      case CORRECTION:

-      case DELETION:

-        return annotation;

-      default:

-        return targetAnnotation;

-    }

-  }

-

-  public int getRating() {

-    return this.rating;

-  }

-

-  public void setRating(int rating) {

-    this.rating = rating;

-  }

-

-  @Override

-  public String toString() {

-    String result = "// " + getAnnotation() + " -> " + getTargetAnnotation();

-    result = result.replaceAll("\n", " ");

-    result = result.replaceAll("\f", " ");

-    result = result.replaceAll("\r", " ");

-    result = result.replaceAll("\t", " ");

-    result += "\n";

-    return result + ruleString + "\t// " + getCoveringStatistics() + "\n\n";

-  }

-

-  public int compareTo(TrabalRule obj) {

-    if (rating < obj.getRating())

-      return -1;

-    if (rating == obj.getRating())

-      return 0;

-    return 1;

-  }

-

-  public String parseFeatures() {

-    String result = "";

-    for (String key : targetAnnotation.getFeatures().keySet()) {

-      result += ", \"" + key + "\" = \"" + targetAnnotation.getFeatures().get(key) + "\"";

-    }

-    return result;

-  }

-  

-  @Override

-  public abstract void compileRuleString();

-

-  public abstract boolean contains(TrabalAnnotation target);

-

-  public abstract boolean hasSameBasicRule(TrabalRule rule);

-

-  public abstract TrabalRuleItem getFrontBoundary();

-

-  public abstract TrabalRuleItem getRearBoundary();

-

-  public abstract TrabalRule copy();

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalRuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalRuleItem.java
deleted file mode 100644
index 04feca2..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalRuleItem.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * 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.ruta.textruler.learner.trabal;

-

-import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.Type;

-

-public class TrabalRuleItem {

-  private TrabalAnnotation annotation;

-

-  public TrabalRuleItem(TrabalAnnotation annotation) {

-    this.annotation = annotation;

-  }

-

-  public TrabalRuleItem(int begin, int end, CAS cas, boolean enableFeature) {

-    Type type = cas.getTypeSystem().getType(TrabalLearner.ANNOTATION_TYPE_ANY);

-    this.annotation = new TrabalAnnotation(cas.createAnnotation(type, begin, end), enableFeature);

-  }

-

-  @Override

-  public boolean equals(Object o) {

-    if (o.getClass().isInstance(this)) {

-      TrabalRuleItem obj = (TrabalRuleItem) o;

-      return annotation.equals(obj.getAnnotation());

-    }

-    return false;

-  }

-

-  public TrabalAnnotation getAnnotation() {

-    return annotation;

-  }

-

-  public String getName() {

-    return annotation.getType().getShortName();

-  }

-

-  public String toString() {

-    return annotation.getType().getShortName();

-  }

-

-  public int hashCode() {

-    return getAnnotation().getType().toString().hashCode()

-            + getAnnotation().getCoveredText().hashCode();

-  }

-}
\ No newline at end of file
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/Whisk.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/Whisk.java
deleted file mode 100755
index d65f6ac..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/Whisk.java
+++ /dev/null
@@ -1,1095 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.generic;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocument;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleList;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerSlotPattern;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.learner.whisk.generic.WhiskRuleItem.MLWhiskOtherConstraint;
-
-public class Whisk extends TextRulerBasicLearner {
-
-  public final static String WINDOWSIZE_KEY = "windowSize";
-
-  public final static String ERROR_THRESHOLD_KEY = "errorThreshold";
-
-  public final static String POSTAG_ROOTTYPE_KEY = "posTagRootType";
-
-  public final static int STANDARD_WINDOWSIZE = 5;
-
-  public final static float STANDARD_ERROR_THRESHOLD = 0.1f;
-
-  public final static String STANDARD_POSTAG_ROOTTYPE = "org.apache.uima.ml.ML.postag";
-
-  public static final String CONSIDERED_FEATURES = "consideredFeatures";
-
-  public static final String STANDARD_CONSIDERED_FEATURES = "";
-
-  TextRulerRuleList ruleList;
-
-  protected Set<TextRulerExample> coveredExamples;
-
-  protected int windowSize = STANDARD_WINDOWSIZE;
-
-  protected double errorThreshold = STANDARD_ERROR_THRESHOLD;
-
-  protected String posTagRootTypeName = STANDARD_POSTAG_ROOTTYPE;
-
-  int roundNumber = 0;
-
-  int allExamplesCount = 0;
-
-  private List<String> consideredFeatures = new ArrayList<String>();
-
-  private Map<String, TextRulerStatisticsCollector> cachedTestedRuleStatistics = new HashMap<String, TextRulerStatisticsCollector>();
-
-  public Whisk(String inputDir, String prePropTmFile, String tmpDir, String[] slotNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super(inputDir, prePropTmFile, tmpDir, slotNames, filterSet, skip, delegate);
-    // useDynamicAnchoring = true;
-  }
-
-  @Override
-  public boolean collectNegativeCoveredInstancesWhenTesting() {
-    return false;
-  }
-
-  @Override
-  protected void doRun() {
-
-    // we don't use the same overall structure like the original WHISK since
-    // we do not
-    // repeat the whole process for some new training documents at the
-    // user's request, we
-    // learn like the other algorithms from the whole training set, so we
-    // for example do not
-    // need to test the intermediate rule base on a newly "incoming"
-    // training document since we
-    // tested all rules already on all training documents !
-
-    // this version of whisk is not tested for mutli slot learning since the
-    // seminar announcements
-    // are not quite suitable for this task: they do not all contain all 4
-    // slots and some of them
-    // occur more than once in one document ! And the order of them is not
-    // always the same as well!
-    // so this is now made only tested for the single slot case even if it
-    // is built capable of multislot
-    // examples!
-
-    // this is the inner loop of the WHISK pseudo-code:
-    // For each inst in Training
-    // for each tag
-
-    cachedTestedRuleStatistics.clear();
-    ruleList = new TextRulerRuleList();
-    coveredExamples = new HashSet<TextRulerExample>();
-
-    sendStatusUpdateToDelegate("Creating examples...", TextRulerLearnerState.ML_RUNNING, false);
-    for (int i = 0; i < slotNames.length; i++) {
-      TextRulerTarget target = new TextRulerTarget(slotNames[i], this);
-      exampleDocuments.createExamplesForTarget(target);
-
-      TextRulerExampleDocument[] docs = exampleDocuments.getSortedDocumentsInCacheOptimizedOrder();
-
-      allExamplesCount = exampleDocuments.getAllPositiveExamples().size();
-
-      for (TextRulerExampleDocument inst : docs) {
-        List<TextRulerExample> tags = inst.getPositiveExamples();
-
-        // for each uncovered example -> induce a new rule:
-        for (TextRulerExample tag : tags) {
-          if (!coveredExamples.contains(tag)) {
-            roundNumber++;
-            WhiskRule newRule = growRule(inst, tag);
-            if (shouldAbort())
-              break;
-            // if (newRule == null)
-            // break;
-            // else
-            if (newRule != null
-                    && (newRule.getCoveringStatistics().getCoveredNegativesCount() == 00 || newRule
-                            .getLaplacian() <= errorThreshold)) {
-              ruleList.addRule(newRule);
-              coveredExamples.addAll(newRule.getCoveringStatistics().getCoveredPositiveExamples());
-              sendStatusUpdateToDelegate("New Rule added...", TextRulerLearnerState.ML_RUNNING,
-                      true);
-            }
-          }
-        }
-        if (shouldAbort())
-          return;
-      }
-    }
-    sendStatusUpdateToDelegate("Done", TextRulerLearnerState.ML_DONE, true);
-    cachedTestedRuleStatistics.clear();
-  }
-
-  protected WhiskRule growRule(TextRulerExampleDocument doc, TextRulerExample example) {
-    sendStatusUpdateToDelegate("Creating new rule from seed...", TextRulerLearnerState.ML_RUNNING,
-            false);
-    WhiskRule theRule = new WhiskRule(this, example.getTarget(), example);
-    int numberOfSlotsInTag = example.getAnnotations().length;
-    for (int i = 0; i < numberOfSlotsInTag; i++)
-      theRule.getPatterns().add(new TextRulerSlotPattern());
-
-    sendStatusUpdateToDelegate("Creating new rule: anchoring...", TextRulerLearnerState.ML_RUNNING,
-            false);
-    for (int i = 0; i < numberOfSlotsInTag; i++) {
-      theRule = anchor(theRule, doc, example, i);
-      if (shouldAbort())
-        return null;
-    }
-
-    sendStatusUpdateToDelegate("Creating new rule: extending...", TextRulerLearnerState.ML_RUNNING,
-            false);
-    if (theRule != null) {
-      double oldLaplacian = theRule.getLaplacian();
-      int subRoundNumber = 0;
-
-      // repeat while we still make errors...
-      while (theRule.getCoveringStatistics().getCoveredNegativesCount() > 0) {
-        WhiskRule extendedRule = extendRule(theRule, doc, example, subRoundNumber);
-        if (extendedRule == null) {
-          // this way we get the previous rule
-          // as the best rule...
-          break;
-        }
-        theRule = extendedRule;
-        TextRulerToolkit.log("----------------------------");
-        TextRulerToolkit.log("BEST EXTENSION IS: " + theRule.getRuleString());
-        TextRulerToolkit.log("Laplacian: " + theRule.getLaplacian() + "    ; "
-                + theRule.getCoveringStatistics());
-        subRoundNumber++;
-
-        double newLaplacian = theRule.getLaplacian();
-        if (newLaplacian >= oldLaplacian) {
-          break;
-        }
-        oldLaplacian = newLaplacian;
-      }
-      TextRulerToolkit.log("----------------------------");
-      TextRulerToolkit.log("FINAL RULE IS : " + theRule.getRuleString());
-    }
-    return theRule;
-  }
-
-  protected WhiskRule extendRule(WhiskRule rule, TextRulerExampleDocument doc,
-          TextRulerExample example, int subRoundNumber) {
-    WhiskRule bestRule = null;
-    double bestL = 1.0;
-    int bestRuleConstraintPoints = -1;
-    if (rule.getLaplacian() <= errorThreshold) {
-      bestRule = rule;
-      bestL = rule.getLaplacian();
-    }
-    List<TextRulerRule> rulesToTest = new ArrayList<TextRulerRule>();
-
-    // first only add conditions, e.g., for features
-
-    List<TextRulerSlotPattern> patterns = rule.getPatterns();
-    for (TextRulerSlotPattern eachPattern : patterns) {
-      for (TextRulerRuleItem item : eachPattern.fillerPattern) {
-        if (item instanceof WhiskRuleItem) {
-          WhiskRuleItem wri = (WhiskRuleItem) item;
-          WhiskRule proposedRule = rule;
-          TextRulerWordConstraint wordConstraint = wri.getWordConstraint();
-          for (String eachFeature : consideredFeatures) {
-            if (wordConstraint != null) {
-              Map<String, String> featureMap = wordConstraint.getTokenAnnotation().getFeatureMap();
-              String stringValue = featureMap.get(eachFeature);
-              if (stringValue != null && !wri.getActivatedFeatures().contains(eachFeature)) {
-                wri.activateFeature(eachFeature);
-                WhiskRule proposedRuleF = proposedRule.copy();
-                wri.deactivateFeature(eachFeature);
-                proposedRuleF.setNeedsCompile(true);
-                if (!rulesToTest.contains(proposedRuleF)) {
-                  rulesToTest.add(proposedRuleF);
-                }
-              }
-            }
-          }
-          if (wordConstraint != null && wordConstraint.isRegExpConstraint() && wri.isHideRegExp()) {
-            wri.setHideRegExp(false);
-            WhiskRule proposedRuleF = proposedRule.copy();
-            wri.setHideRegExp(true);
-            proposedRuleF.setNeedsCompile(true);
-            if (!rulesToTest.contains(proposedRuleF)) {
-              rulesToTest.add(proposedRuleF);
-            }
-          }
-        }
-      }
-    }
-
-    List<List<WhiskRuleItem>> slotTerms = getTermsWithinBounds(
-            example.getAnnotations()[0].getBegin(), example.getAnnotations()[0].getEnd(), example);
-    List<List<WhiskRuleItem>> windowTerms = getTermsWithinWindow(slotTerms, example, 0);
-
-    for (List<WhiskRuleItem> eachList : windowTerms) {
-      for (WhiskRuleItem term : eachList) {
-
-        if (rule.containsTerm(term)) {
-          continue;
-        }
-
-        WhiskRule proposedRule = createNewRuleByAddingTerm(rule, term);
-        if (proposedRule == null)
-          continue;
-        WhiskRuleItem t = term;
-
-        if (!rulesToTest.contains(proposedRule))
-          rulesToTest.add(proposedRule);
-
-        // add a second version where we add the exact token content if
-        // it is a regexp item:
-        WhiskRule proposedRule2 = proposedRule;
-        if (t.getWordConstraint().isRegExpConstraint()) {
-          t.setHideRegExp(false);
-          WhiskRule proposedRuleF = proposedRule.copy();
-          t.setHideRegExp(true);
-          proposedRuleF.setNeedsCompile(true);
-          if (!rulesToTest.contains(proposedRuleF)) {
-            rulesToTest.add(proposedRuleF);
-          }
-        }
-
-        // extend with feature conditions
-        WhiskRule proposedRuleF = null;
-        for (String eachFeature : consideredFeatures) {
-          Map<String, String> featureMap = t.getWordConstraint().getTokenAnnotation()
-                  .getFeatureMap();
-          String stringValue = featureMap.get(eachFeature);
-          if (stringValue != null) {
-            t.activateFeature(eachFeature);
-            proposedRuleF = proposedRule.copy();
-            t.deactivateFeature(eachFeature);
-            proposedRuleF.setNeedsCompile(true);
-            if (!rulesToTest.contains(proposedRuleF)) {
-              rulesToTest.add(proposedRuleF);
-            }
-          }
-        }
-
-        // and now, for WHISK performance testing purposes, we also add POS
-        // tags:
-        // this is not very nice code and not dynamic feature capable, but
-        // for testpurposes
-        // in order to test WHISK with PosTag Terms...
-        if (posTagRootTypeName != null && posTagRootTypeName.length() > 0) {
-          TextRulerAnnotation tokenAnnotation = term.getWordConstraint().getTokenAnnotation();
-          CAS cas = example.getDocumentCAS();
-          TypeSystem ts = cas.getTypeSystem();
-          Type posTagsRootType = ts.getType(posTagRootTypeName);
-          if (ts != null) {
-            // POS-Tags created by our test hmm tagger.
-            List<AnnotationFS> posTagAnnotations = TextRulerToolkit.getAnnotationsWithinBounds(cas,
-                    tokenAnnotation.getBegin(), tokenAnnotation.getEnd(), null, posTagsRootType);
-            if (posTagAnnotations.size() > 0) {
-              AnnotationFS posTag = posTagAnnotations.get(0);
-              if (posTag.getBegin() == tokenAnnotation.getBegin()
-                      && posTag.getEnd() == tokenAnnotation.getEnd()) {
-                TextRulerAnnotation posTagAnnotation = new TextRulerAnnotation(posTag, doc,
-                        consideredFeatures);
-
-                // 1. most specific term with all constraints we
-                // have:
-                WhiskRule proposedRule3 = proposedRule.copy();
-                WhiskRuleItem t3 = term;
-                t3.addOtherConstraint(new MLWhiskOtherConstraint(tokenAnnotation, posTagAnnotation));
-                proposedRule3.setNeedsCompile(true);
-                if (!rulesToTest.contains(proposedRule3))
-                  rulesToTest.add(proposedRule3);
-
-                // 2. the same without the regexp thingy:
-                if (proposedRule2 != null) {
-                  WhiskRule proposedRule4 = proposedRule2.copy();
-                  WhiskRuleItem t4 = term;
-                  t4.addOtherConstraint(new MLWhiskOtherConstraint(tokenAnnotation,
-                          posTagAnnotation));
-                  proposedRule4.setNeedsCompile(true);
-                  if (!rulesToTest.contains(proposedRule4))
-                    rulesToTest.add(proposedRule4);
-                }
-
-                // 3. last but not least: a rule with only the pos
-                // tag constraint:
-                WhiskRule proposedRule5 = proposedRule.copy();
-                WhiskRuleItem t5 = term;
-                t5.addOtherConstraint(new MLWhiskOtherConstraint(tokenAnnotation, posTagAnnotation));
-                t5.setWordConstraint(null);
-                proposedRule5.setNeedsCompile(true);
-                if (!rulesToTest.contains(proposedRule5)) {
-                  rulesToTest.add(proposedRule5);
-                }
-
-              }
-            }
-          }
-        }
-      }
-    }
-    if (rulesToTest.size() == 0)
-      return bestRule;
-
-    sendStatusUpdateToDelegate(
-            "Round "
-                    + roundNumber
-                    + "."
-                    + subRoundNumber
-                    + " - Testing "
-                    + rulesToTest.size()
-                    + " rules... "
-                    + " - uncovered examples: "
-                    + (allExamplesCount - coveredExamples.size() + " / " + allExamplesCount
-                            + " ; cs=" + cachedTestedRuleStatistics.size()),
-            TextRulerLearnerState.ML_RUNNING, false);
-
-    TextRulerToolkit.log("Testing " + rulesToTest.size() + " rules on training set...");
-    for (TextRulerRule r : rulesToTest)
-      TextRulerToolkit.log(r.getRuleString());
-    testRulesIfNotCached(rulesToTest);
-
-    if (shouldAbort())
-      return null;
-    for (TextRulerRule r : rulesToTest) {
-      WhiskRule wr = (WhiskRule) r;
-      if (wr.getLaplacian() < bestL) {
-        bestL = wr.getLaplacian();
-        bestRule = wr;
-        bestRuleConstraintPoints = bestRule.totalConstraintPoints();
-      } else if (wr.getLaplacian() == bestL && bestRuleConstraintPoints >= 0) {
-        TextRulerToolkit.log("Same Laplacian! So prefer more general rule!");
-        if (wr.totalConstraintPoints() < bestRuleConstraintPoints) {
-          TextRulerToolkit.log("\tYes, prefered!");
-          bestL = wr.getLaplacian();
-          bestRule = wr;
-          bestRuleConstraintPoints = bestRule.totalConstraintPoints();
-        }
-      }
-    }
-    return bestRule;
-  }
-
-  private List<List<WhiskRuleItem>> getTermsWithinWindow(List<List<WhiskRuleItem>> slotTerms,
-          TextRulerExample example, int steps) {
-    if (steps == windowSize)
-      return slotTerms;
-    List<List<WhiskRuleItem>> result = new ArrayList<List<WhiskRuleItem>>();
-
-    for (List<WhiskRuleItem> list : slotTerms) {
-      List<WhiskRuleItem> termsBefore = getTermsBefore(list.get(0), example);
-      List<WhiskRuleItem> termsAfter = getTermsAfter(list.get(list.size() - 1), example);
-      if (!termsBefore.isEmpty()) {
-        for (WhiskRuleItem before : termsBefore) {
-          for (WhiskRuleItem after : termsAfter) {
-            List<WhiskRuleItem> newList = new ArrayList<WhiskRuleItem>();
-            newList.add(before);
-            newList.addAll(list);
-            newList.add(after);
-            result.add(newList);
-          }
-        }
-      } else {
-        for (WhiskRuleItem after : termsAfter) {
-          List<WhiskRuleItem> newList = new ArrayList<WhiskRuleItem>();
-          newList.addAll(list);
-          newList.add(after);
-          result.add(newList);
-        }
-      }
-    }
-    result = getTermsWithinWindow(result, example, ++steps);
-    return result;
-  }
-
-  protected WhiskRule createNewRuleByAddingTerm(WhiskRule baseRule, WhiskRuleItem term) {
-    if (term == null)
-      return null;
-    if (term.isStarWildCard() || term.getWordConstraint() == null)
-      return null;
-    WhiskRule newRule = baseRule.copy();
-    // int foundSlotNumber = -1; // debug info
-    // String foundSlotPattern = "";
-    int termBeginNumber = term.getWordConstraint().getTokenAnnotation().getBegin();
-    int termEndNumber = term.getWordConstraint().getTokenAnnotation().getEnd();
-    TextRulerRulePattern targetPattern = null;
-    TextRulerRulePattern previousSlotPostFillerPattern = null;
-    for (int i = 0; i < newRule.getPatterns().size(); i++) {
-      TextRulerSlotPattern slotPattern = newRule.getPatterns().get(i);
-      WhiskRuleItem it = (WhiskRuleItem) slotPattern.preFillerPattern.lastItem(); // look at the
-      // prefiller
-      // pattern
-      if (it != null && it.getWordConstraint() != null
-              && termEndNumber <= it.getWordConstraint().getTokenAnnotation().getBegin())
-        targetPattern = slotPattern.preFillerPattern;
-      if (targetPattern == null && slotPattern.fillerPattern.size() > 0) // now
-      // look
-      // at
-      // the
-      // filler
-      // pattern
-      {
-        it = (WhiskRuleItem) slotPattern.fillerPattern.firstItem();
-        if (it.getWordConstraint() != null
-                && termEndNumber <= it.getWordConstraint().getTokenAnnotation().getBegin()) // it's
-          // still
-          // for
-          // the prefiller
-          // pattern but it
-          // seems to be
-          // emtpy so we
-          // could not find
-          // that out above!
-          targetPattern = slotPattern.preFillerPattern;
-        else {
-          it = (WhiskRuleItem) slotPattern.fillerPattern.lastItem();
-          if (it.getWordConstraint() != null
-                  && termEndNumber <= it.getWordConstraint().getTokenAnnotation().getBegin()) {
-            targetPattern = slotPattern.fillerPattern;
-          }
-        }
-      }
-      if (targetPattern == null && slotPattern.postFillerPattern.size() > 0) // now
-                                                                             // look
-                                                                             // at
-      // the
-      // postfiller
-      // pattern
-      {
-        it = (WhiskRuleItem) slotPattern.postFillerPattern.firstItem();
-        if (it.getWordConstraint() != null
-                && termEndNumber <= it.getWordConstraint().getTokenAnnotation().getBegin()) // it's
-          // still
-          // for
-          // the filler
-          // pattern but it
-          // seems to be
-          // emtpy so we
-          // could not find
-          // that out above!
-          targetPattern = slotPattern.fillerPattern;
-        else {
-          it = (WhiskRuleItem) slotPattern.postFillerPattern.lastItem();
-          if (it.getWordConstraint() != null
-                  && termEndNumber <= it.getWordConstraint().getTokenAnnotation().getBegin())
-            targetPattern = slotPattern.postFillerPattern;
-        }
-      }
-      if (targetPattern == null) {
-        targetPattern = previousSlotPostFillerPattern;
-        // debug info
-        // if (i > 0) {
-        // TextRulerSlotPattern prevSlotPattern = newRule.getPatterns().get(i -
-        // 1);
-        // foundSlotPattern = targetPattern == prevSlotPattern.preFillerPattern
-        // ? "PRE FILLER"
-        // : (targetPattern == prevSlotPattern.fillerPattern ? "FILLER" :
-        // "POST FILLER");
-        // foundSlotNumber = i - 1;
-        // }
-        // } else {
-        // foundSlotPattern = targetPattern == slotPattern.preFillerPattern ?
-        // "PRE FILLER"
-        // : (targetPattern == slotPattern.fillerPattern ? "FILLER" :
-        // "POST FILLER");
-        // foundSlotNumber = i;
-      }
-      previousSlotPostFillerPattern = slotPattern.postFillerPattern;
-    }
-
-    if (targetPattern == null) {
-      targetPattern = previousSlotPostFillerPattern;
-      // debug info
-      // foundSlotNumber = newRule.getPatterns().size() - 1;
-      // foundSlotPattern = "POST FILLER";
-    }
-
-    if (targetPattern == null) {
-      TextRulerToolkit.log("ERROR, NO TARGET PATTERN FOR NEW RULE TERM FOUND !");
-    } else {
-      // TextRulerToolkit.log("Ok, found for Rule: "+newRule.getRuleString());
-      // TextRulerToolkit.log("Term: "+term.getTermNumberInExample()+" ; "+term);
-      // TextRulerToolkit.log("Slot "+foundSlotNumber+" - Pattern: "+foundSlotPattern);
-      // now put that term into the rule:
-      int indexInPattern = -1;
-      if (targetPattern.size() == 0) {
-        targetPattern.add(term.copy());
-        indexInPattern = 0;
-      } else {
-        // 1. search if the term would replace a wildcard:
-        WhiskRuleItem wildCard = null;
-        for (TextRulerRuleItem i : newRule.getPatterns().get(0).preFillerPattern) {
-          if (((WhiskRuleItem) i).isStarWildCard()) {
-            WhiskRuleItem left = newRule.searchNeighborOfItem(((WhiskRuleItem) i), true);
-            WhiskRuleItem right = newRule.searchNeighborOfItem(((WhiskRuleItem) i), false);
-            if (left.getWordConstraint().getTokenAnnotation().getEnd() <= termBeginNumber
-                    && right.getWordConstraint().getTokenAnnotation().getBegin() >= termEndNumber)
-              wildCard = (WhiskRuleItem) i;
-          }
-        }
-        if (wildCard == null) {
-          for (TextRulerRuleItem i : newRule.getPatterns().get(0).fillerPattern) {
-            if (((WhiskRuleItem) i).isStarWildCard()) {
-              WhiskRuleItem left = newRule.searchNeighborOfItem(((WhiskRuleItem) i), true);
-              WhiskRuleItem right = newRule.searchNeighborOfItem(((WhiskRuleItem) i), false);
-              if (left != null
-                      && left.getWordConstraint().getTokenAnnotation().getEnd() <= termBeginNumber
-                      && right.getWordConstraint().getTokenAnnotation().getBegin() >= termEndNumber)
-                wildCard = (WhiskRuleItem) i;
-            }
-          }
-        }
-        if (wildCard == null) {
-          for (TextRulerRuleItem i : newRule.getPatterns().get(0).postFillerPattern) {
-            if (((WhiskRuleItem) i).isStarWildCard()) {
-              WhiskRuleItem left = newRule.searchNeighborOfItem(((WhiskRuleItem) i), true);
-              WhiskRuleItem right = newRule.searchNeighborOfItem(((WhiskRuleItem) i), false);
-              if (left.getWordConstraint().getTokenAnnotation().getEnd() <= termBeginNumber
-                      && right.getWordConstraint().getTokenAnnotation().getBegin() >= termEndNumber)
-                wildCard = (WhiskRuleItem) i;
-            }
-          }
-        }
-        if (wildCard != null) {
-          if (!wildCard.isStarWildCard()) {
-            TextRulerToolkit
-                    .log("ERROR, FOUND A TERM WITH THE SAME NUMBER THAT IS NOT A WILDCARD! HOW IS THAT???");
-            return null;
-          }
-          if (!targetPattern.contains(wildCard)) {
-            TextRulerToolkit.log("EVEN WORSE, THAT MUST NOT BE AT ALL!");
-            return null;
-          }
-          indexInPattern = targetPattern.indexOf(wildCard);
-          targetPattern.set(indexInPattern, term.copy());
-        } else {
-          // not a wildcard, so search for the insertion point:
-          for (int i = 0; i < targetPattern.size(); i++) {
-            WhiskRuleItem it = (WhiskRuleItem) targetPattern.get(i);
-            if (it.getWordConstraint() != null
-                    && termEndNumber <= it.getWordConstraint().getTokenAnnotation().getBegin()) {
-              indexInPattern = i;
-              break;
-            }
-          }
-          if (indexInPattern < 0) {
-            indexInPattern = targetPattern.size();
-            targetPattern.add(term.copy());
-          } else
-            targetPattern.add(indexInPattern, term.copy());
-        }
-      }
-      // ok, now we have replaced a wildcard with the term or added the
-      // term between two other items.
-      // we now have to check the neighbors of the new term: if it is a
-      // direct neighbor (according to the termNumber),
-      // we have nothing special to do. but if it is not a direct
-      // neighbor, we have to add a wildcard between the two items (if the
-      // neighbor item
-      // is not a wildcard itself!
-      WhiskRuleItem newTerm = (WhiskRuleItem) targetPattern.get(indexInPattern);
-
-      // look at left neighbor:
-      WhiskRuleItem left = newRule.searchNeighborOfItem(newTerm, true);
-      if (left != null && left.getWordConstraint() != null) {
-        // TextRulerToolkit.log("LEFT NEIGHBOR FOUND!");
-
-        // so we have a left neighbor. let's see if it also is the
-        // neighbor in our seed token stream:
-        if (!left.isStarWildCard()) { // no direct neighbor and
-          // no wildcard yet,
-          // so insert a wildcard between us!
-          boolean isValid = isNextValidNeighbor(left, newTerm, newRule.getSeedExample());
-          if (!isValid) {
-            targetPattern.add(indexInPattern, WhiskRuleItem.newWildCardItem());
-            indexInPattern++;
-          }
-        }
-      }
-
-      // look at right neighbor:
-      WhiskRuleItem right = newRule.searchNeighborOfItem(newTerm, false);
-      if (right != null && right.getWordConstraint() != null) {
-        // TextRulerToolkit.log("RIGHT NEIGHBOR FOUND!");
-        // so we have a right neighbor. let's see if it also is the
-        // neighbor in our seed token stream:
-        if (!right.isStarWildCard()) {
-          // no direct neighbor and
-          // no wildcard yet,
-          // so insert a wildcard between us!
-          boolean isValid = isNextValidNeighbor(newTerm, right, newRule.getSeedExample());
-          if (!isValid) {
-            WhiskRuleItem wc = WhiskRuleItem.newWildCardItem();
-            if (indexInPattern + 1 < targetPattern.size())
-              targetPattern.add(indexInPattern + 1, wc);
-            else
-              targetPattern.add(wc);
-          }
-        }
-      }
-
-      newRule.setNeedsCompile(true);
-      // TextRulerToolkit.log("BEFORE: "+baseRule.getRuleString());
-      // TextRulerToolkit.log("AFTER : "+newRule.getRuleString());
-      // TextRulerToolkit.log("");
-    }
-    if (newRule.getRuleString().equals(baseRule.getRuleString())) // this
-      // must
-      // not be!
-      return null;
-    else
-      return newRule;
-  }
-
-  protected WhiskRule anchor(WhiskRule rule, TextRulerExampleDocument doc,
-          TextRulerExample example, int slotIndex) {
-    List<WhiskRule> result = new ArrayList<WhiskRule>();
-    TextRulerAnnotation slotAnnotation = example.getAnnotations()[slotIndex];
-    List<List<WhiskRuleItem>> window = getTermsWithinBounds(slotAnnotation.getBegin(),
-            slotAnnotation.getEnd(), example);
-
-    for (List<WhiskRuleItem> inside : window) {
-
-      if (rule == null || inside.isEmpty()) {
-        return null;
-      }
-      // create base 1 and base 2:
-      WhiskRule base1 = rule.copy(); // slot filler rule
-      TextRulerSlotPattern slotPattern = base1.getPatterns().get(slotIndex);
-      // questionable restriction:
-      if (inside.size() <= windowSize) { // TODO add parameter for this!
-        slotPattern.fillerPattern.addAll(inside);
-      } else {
-        for (int i = 0; i < inside.size(); i++)
-          if (i == 0 || (i == inside.size() - 1))
-            slotPattern.fillerPattern.add(inside.get(i).copy());
-          else if (inside.size() > 2 && i < 2)
-            slotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem());
-      }
-      List<WhiskRuleItem> beforeList = getTermsBefore(inside.get(0), example);
-      List<WhiskRuleItem> afterList = getTermsAfter(inside.get(inside.size() - 1), example);
-      beforeList.add(null);
-      afterList.add(null);
-      Collection<WhiskRule> tempRules = new HashSet<WhiskRule>();
-
-      // workaround for better rules:
-      // only inner begin
-      for (WhiskRuleItem eachBefore : beforeList) {
-        for (WhiskRuleItem eachAfter : afterList) {
-          WhiskRule copy = rule.copy();
-          TextRulerSlotPattern textRulerSlotPattern = copy.getPatterns().get(slotIndex);
-          if (eachBefore != null) {
-            textRulerSlotPattern.preFillerPattern.add(eachBefore);
-          }
-          textRulerSlotPattern.fillerPattern.add(inside.get(0).copy());
-          textRulerSlotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem());
-          if (eachAfter != null) {
-            textRulerSlotPattern.postFillerPattern.add(eachAfter);
-          }
-          tempRules.add(copy);
-        }
-      }
-      // only inner end
-      for (WhiskRuleItem eachBefore : beforeList) {
-        for (WhiskRuleItem eachAfter : afterList) {
-          WhiskRule copy = rule.copy();
-          TextRulerSlotPattern textRulerSlotPattern = copy.getPatterns().get(slotIndex);
-          if (eachBefore != null) {
-            textRulerSlotPattern.preFillerPattern.add(eachBefore);
-          }
-          textRulerSlotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem());
-          textRulerSlotPattern.fillerPattern.add(inside.get(inside.size() - 1).copy());
-          if (eachAfter != null) {
-            textRulerSlotPattern.postFillerPattern.add(eachAfter);
-          }
-          tempRules.add(copy);
-        }
-      }
-
-      if (!beforeList.isEmpty()) {
-        if (!afterList.isEmpty()) {
-          for (WhiskRuleItem eachBefore : beforeList) {
-            for (WhiskRuleItem eachAfter : afterList) {
-              WhiskRule copy = rule.copy();
-              TextRulerSlotPattern textRulerSlotPattern = copy.getPatterns().get(slotIndex);
-              if (eachBefore != null) {
-                textRulerSlotPattern.preFillerPattern.add(eachBefore);
-              }
-              textRulerSlotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem());
-              if (eachAfter != null) {
-                textRulerSlotPattern.postFillerPattern.add(eachAfter);
-              }
-              tempRules.add(copy);
-            }
-          }
-        } else {
-          for (WhiskRuleItem eachBefore : beforeList) {
-            WhiskRule copy = rule.copy();
-            TextRulerSlotPattern textRulerSlotPattern = copy.getPatterns().get(slotIndex);
-            textRulerSlotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem());
-            if (eachBefore != null) {
-              textRulerSlotPattern.preFillerPattern.add(eachBefore);
-            }
-            tempRules.add(copy);
-          }
-        }
-      } else {
-        for (WhiskRuleItem eachAfter : afterList) {
-          WhiskRule copy = rule.copy();
-          TextRulerSlotPattern textRulerSlotPattern = copy.getPatterns().get(slotIndex);
-          textRulerSlotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem());
-          if (eachAfter != null) {
-            textRulerSlotPattern.postFillerPattern.add(eachAfter);
-          }
-          tempRules.add(copy);
-        }
-      }
-      ArrayList<TextRulerRule> rules = new ArrayList<TextRulerRule>(tempRules);
-      testRulesIfNotCached(rules);
-      TextRulerRule best = null;
-      for (TextRulerRule each : rules) {
-        if (best == null) {
-          best = each;
-        } else {
-          if (each.getCoveringStatistics().getCoveredPositivesCount() > best
-                  .getCoveringStatistics().getCoveredPositivesCount()) {
-            best = each;
-          }
-        }
-      }
-      WhiskRule base2 = (WhiskRule) best;
-      List<TextRulerRule> testRules = new ArrayList<TextRulerRule>();
-      if (base1 != null) {
-        TextRulerToolkit.log("base1: " + base1.getRuleString());
-        testRules.add(base1);
-      }
-      if (base2 != null) {
-        TextRulerToolkit.log("base2: " + base2.getRuleString());
-        testRules.add(base2);
-      }
-      testRulesIfNotCached(testRules);
-      if (shouldAbort()) {
-        return null;
-      }
-      if (base1 != null && base2 == null) {
-        TextRulerToolkit.log("\tbase1: " + base1.getCoveringStatistics() + " --> laplacian = "
-                + base1.getLaplacian());
-        result.add(base1);
-      } else {
-        TextRulerToolkit.log("\tbase1: " + base1.getCoveringStatistics() + " --> laplacian = "
-                + base1.getLaplacian());
-        TextRulerToolkit.log("\tbase2: " + base2.getCoveringStatistics() + " --> laplacian = "
-                + base2.getLaplacian());
-        if (base2.getCoveringStatistics().getCoveredPositivesCount() > base1
-                .getCoveringStatistics().getCoveredPositivesCount()) {
-          result.add(base2);
-        } else {
-          result.add(base1);
-        }
-      }
-    }
-    TextRulerRule best = null;
-    for (TextRulerRule each : result) {
-      if (best == null) {
-        best = each;
-      } else {
-        if (each.getCoveringStatistics().getCoveredPositivesCount() > best.getCoveringStatistics()
-                .getCoveredPositivesCount()) {
-          best = each;
-        }
-      }
-    }
-
-    return (WhiskRule) best;
-  }
-
-  private List<WhiskRuleItem> getTermsAfter(WhiskRuleItem whiskRuleItem, TextRulerExample example) {
-    List<WhiskRuleItem> result = new ArrayList<WhiskRuleItem>();
-    int end = whiskRuleItem.getWordConstraint().getTokenAnnotation().getEnd();
-    CAS cas = example.getDocumentCAS();
-    // TODO: access type with string constant
-    Type frameType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.RutaFrame");
-    AnnotationFS pointer = cas.createAnnotation(frameType, end, Integer.MAX_VALUE);
-    FSIterator iterator = cas.getAnnotationIndex().iterator(pointer);
-    int nextBegin = -1;
-    while (iterator.isValid()) {
-      FeatureStructure fs = iterator.get();
-      if (fs instanceof AnnotationFS) {
-        AnnotationFS a = (AnnotationFS) fs;
-        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
-          if (nextBegin == -1) {
-            nextBegin = a.getBegin();
-          } else if (nextBegin != a.getBegin()) {
-            break;
-          }
-          if (a.getBegin() <= nextBegin && a.getBegin() >= end) {
-            WhiskRuleItem term = new WhiskRuleItem(new TextRulerAnnotation(a,
-                    example.getDocument(), consideredFeatures));
-            result.add(term);
-          }
-        }
-      }
-      iterator.moveToNext();
-    }
-    return result;
-  }
-
-  private List<WhiskRuleItem> getTermsBefore(WhiskRuleItem whiskRuleItem, TextRulerExample example) {
-    List<WhiskRuleItem> result = new ArrayList<WhiskRuleItem>();
-    int begin = whiskRuleItem.getWordConstraint().getTokenAnnotation().getBegin();
-    CAS cas = example.getDocumentCAS();
-
-    // TODO: access type with string constant
-    Type frameType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.RutaFrame");
-    AnnotationFS pointer = cas.createAnnotation(frameType, begin, begin);
-    FSIterator iterator = cas.getAnnotationIndex().iterator(pointer);
-    int nextEnd = -1;
-
-    // ???
-    iterator.moveToPrevious();
-    iterator.moveToPrevious();
-    while (iterator.isValid()) {
-      FeatureStructure fs = iterator.get();
-      if (fs instanceof AnnotationFS) {
-        AnnotationFS a = (AnnotationFS) fs;
-        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
-          if (a.getEnd() > example.getAnnotation().getEnd()) {
-            iterator.moveToPrevious();
-            continue;
-          }
-          if (nextEnd == -1) {
-            nextEnd = a.getEnd();
-          } else if (nextEnd != a.getEnd()) {
-            break;
-          }
-          if (a.getEnd() >= nextEnd && a.getEnd() <= begin) {
-            WhiskRuleItem term = new WhiskRuleItem(new TextRulerAnnotation(a,
-                    example.getDocument(), consideredFeatures));
-            result.add(term);
-          }
-        }
-      }
-      iterator.moveToPrevious();
-    }
-    return result;
-  }
-
-  public String getResultString() {
-    if (ruleList != null)
-      return getFileHeaderString(true) + ruleList.getRulesString("");
-    else
-      return "No results available yet!";
-  }
-
-  public void setParameters(Map<String, Object> params) {
-    if (TextRulerToolkit.DEBUG)
-      saveParametersToTempFolder(params);
-
-    // TODO try catch
-    if (params.containsKey(WINDOWSIZE_KEY))
-      windowSize = (Integer) params.get(WINDOWSIZE_KEY);
-
-    if (params.containsKey(ERROR_THRESHOLD_KEY))
-      errorThreshold = (Float) params.get(ERROR_THRESHOLD_KEY);
-
-    if (params.containsKey(POSTAG_ROOTTYPE_KEY))
-      posTagRootTypeName = (String) params.get(POSTAG_ROOTTYPE_KEY);
-
-    if (params.containsKey(CONSIDERED_FEATURES)) {
-      String list = (String) params.get(CONSIDERED_FEATURES);
-      if (!StringUtils.isBlank(list)) {
-        String[] split = list.split(",");
-        for (String string : split) {
-          String trim = string.trim();
-          if (!StringUtils.isBlank(trim)) {
-            consideredFeatures.add(trim);
-          }
-        }
-      }
-    }
-
-  }
-
-  public List<List<WhiskRuleItem>> getTermsWithinBounds(int startPos, int endPos,
-          TextRulerExample example) {
-    List<List<WhiskRuleItem>> result = new ArrayList<List<WhiskRuleItem>>();
-    CAS cas = example.getDocumentCAS();
-    // TODO: access type with string constant
-    Type frameType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.RutaFrame");
-    AnnotationFS pointer = cas.createAnnotation(frameType, startPos, endPos);
-    FSIterator iterator = cas.getAnnotationIndex().iterator(pointer);
-    List<AnnotationFS> startAs = new ArrayList<AnnotationFS>();
-    int firstBegin = -1;
-    while (iterator.isValid()) {
-      FeatureStructure fs = iterator.get();
-      AnnotationFS a = (AnnotationFS) fs;
-
-      // TODO change for multislot rules!
-      if (a.getBegin() >= startPos && a.getEnd() <= endPos) {
-        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
-          if (firstBegin == -1) {
-            firstBegin = a.getBegin();
-          } else if (firstBegin != a.getBegin()) {
-            break;
-          }
-          if (a.getBegin() == firstBegin)
-            startAs.add(a);
-        }
-        iterator.moveToNext();
-      } else {
-        iterator.moveToNext();
-      }
-    }
-
-    for (AnnotationFS annotation : startAs) {
-      List<WhiskRuleItem> startList = new ArrayList<WhiskRuleItem>();
-      WhiskRuleItem term = new WhiskRuleItem(new TextRulerAnnotation(annotation,
-              example.getDocument(), consideredFeatures));
-      startList.add(term);
-      result.add(startList);
-    }
-
-    result = addFollowing(result, endPos, example);
-    return result;
-  }
-
-  private List<List<WhiskRuleItem>> addFollowing(List<List<WhiskRuleItem>> lists, int till,
-          TextRulerExample example) {
-    List<List<WhiskRuleItem>> result = new ArrayList<List<WhiskRuleItem>>();
-    for (List<WhiskRuleItem> list : lists) {
-      WhiskRuleItem last = list.get(list.size() - 1);
-      List<WhiskRuleItem> termsAfter = getTermsAfter(last, example);
-      if (termsAfter.isEmpty()) {
-        return lists;
-      }
-      for (WhiskRuleItem eachAfter : termsAfter) {
-        if (eachAfter.getWordConstraint().getTokenAnnotation().getEnd() <= till) {
-          List<WhiskRuleItem> newList = new ArrayList<WhiskRuleItem>();
-          newList.addAll(list);
-          newList.add(eachAfter);
-          result.add(newList);
-          result = addFollowing(result, till, example);
-        } else {
-          return lists;
-        }
-      }
-    }
-    return result;
-  }
-
-  // TODO share this between algorithms (e.g. LP2 and RAPIER, WHISK ?) and
-  // make a maximum size of the cache, etc. like CasCache?
-  protected void testRulesIfNotCached(List<TextRulerRule> rules) {
-    List<TextRulerRule> rulesToTest = new ArrayList<TextRulerRule>();
-
-    for (TextRulerRule r : rules) {
-      String key = r.getRuleString();
-      if (cachedTestedRuleStatistics.containsKey(key)) {
-        r.setCoveringStatistics(cachedTestedRuleStatistics.get(key).copy());
-      } else
-        rulesToTest.add(r);
-    }
-
-    if (rulesToTest.size() > 0) {
-      testRulesOnDocumentSet(rulesToTest, exampleDocuments);
-      if (shouldAbort())
-        return;
-      for (TextRulerRule r : rulesToTest) {
-        String key = r.getRuleString();
-        cachedTestedRuleStatistics.put(key, r.getCoveringStatistics().copy());
-      }
-    }
-  }
-
-  private int getElementIndex(WhiskRule proposedRule, WhiskRuleItem term) {
-    if (term == null)
-      return -1;
-    int index = 0;
-    int result = -1;
-    for (TextRulerRuleItem i : proposedRule.getPatterns().get(0).preFillerPattern) {
-      if (((WhiskRuleItem) i).equals(term)) {
-        result = index;
-      }
-      index++;
-    }
-    for (TextRulerRuleItem i : proposedRule.getPatterns().get(0).fillerPattern) {
-      if (((WhiskRuleItem) i).equals(term)) {
-        result = index;
-      }
-      index++;
-    }
-    for (TextRulerRuleItem i : proposedRule.getPatterns().get(0).postFillerPattern) {
-      if (((WhiskRuleItem) i).equals(term)) {
-        result = index;
-      }
-      index++;
-    }
-    return result;
-  }
-
-  private boolean isNextValidNeighbor(WhiskRuleItem left, WhiskRuleItem right,
-          TextRulerExample example) {
-    CAS cas = example.getDocumentCAS();
-    // TODO: access type with string constant
-    Type frameType = cas.getTypeSystem().getType("org.apache.uima.ruta.type.RutaFrame");
-    int begin = left.getWordConstraint().getTokenAnnotation().getEnd();
-    int end = right.getWordConstraint().getTokenAnnotation().getBegin();
-    AnnotationFS pointer = cas.createAnnotation(frameType, begin, end);
-    FSIterator iterator = cas.getAnnotationIndex().iterator(pointer);
-    while (iterator.isValid()) {
-      FeatureStructure fs = iterator.get();
-      AnnotationFS a = (AnnotationFS) fs;
-      if (a.getBegin() >= begin && a.getEnd() <= end) {
-        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
-          return false;
-        }
-      }
-      iterator.moveToNext();
-    }
-    return true;
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskFactory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskFactory.java
deleted file mode 100755
index c5bdcf1..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.generic;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter.MLAlgorithmParamType;
-
-public class WhiskFactory implements TextRulerLearnerFactory {
-
-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,
-          String preprocessorTMfile, String tempFolderPath, String[] fullSlotTypeNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    return new Whisk(inputFolderPath, preprocessorTMfile, tempFolderPath, fullSlotTypeNames,
-            filterSet, skip, delegate);
-  }
-
-  public Map<String, Object> getAlgorithmParameterStandardValues() {
-    Map<String, Object> result = new HashMap<String, Object>();
-    result.put(Whisk.WINDOWSIZE_KEY, Whisk.STANDARD_WINDOWSIZE);
-    result.put(Whisk.ERROR_THRESHOLD_KEY, Whisk.STANDARD_ERROR_THRESHOLD);
-    result.put(Whisk.POSTAG_ROOTTYPE_KEY, Whisk.STANDARD_POSTAG_ROOTTYPE);
-    result.put(Whisk.CONSIDERED_FEATURES, Whisk.STANDARD_CONSIDERED_FEATURES);
-    return result;
-  }
-
-  public TextRulerLearnerParameter[] getAlgorithmParameters() {
-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[4];
-
-    result[0] = new TextRulerLearnerParameter(Whisk.WINDOWSIZE_KEY, "Window Size",
-            MLAlgorithmParamType.ML_INT_PARAM);
-    result[1] = new TextRulerLearnerParameter(Whisk.ERROR_THRESHOLD_KEY, "Maximum Error Threshold",
-            MLAlgorithmParamType.ML_FLOAT_PARAM);
-    result[2] = new TextRulerLearnerParameter(Whisk.POSTAG_ROOTTYPE_KEY, "PosTag Root Type",
-            MLAlgorithmParamType.ML_STRING_PARAM);
-    result[3] = new TextRulerLearnerParameter(Whisk.CONSIDERED_FEATURES, "Considered Features (comma-separated)",
-            MLAlgorithmParamType.ML_STRING_PARAM);
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskGenericPreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskGenericPreferencePage.java
deleted file mode 100755
index 2038285..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskGenericPreferencePage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.textruler.learner.whisk.generic;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class WhiskGenericPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.preference.whisk.generic";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public WhiskGenericPreferencePage() {

-    TextRulerLearnerController ctrl = TextRulerController

-            .getControllerForID("org.apache.uima.ruta.textruler.whisk.generic");

-    this.algorithmController = ctrl;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  @Override

-  protected Control createContents(Composite parent) {

-    Composite top = new Composite(parent, SWT.LEFT);

-    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    top.setLayout(new GridLayout());

-

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_INT_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-    return top;

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskRule.java
deleted file mode 100755
index 88a6f88..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskRule.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.generic;
-
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerMultiSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerSlotPattern;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-
-public class WhiskRule extends TextRulerMultiSlotRule {
-
-  TextRulerExample seedExample;
-
-  public WhiskRule(WhiskRule copyFrom) {
-    super(copyFrom);
-    seedExample = copyFrom.seedExample;
-  }
-
-  public WhiskRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target,
-          TextRulerExample seedExample) {
-    super(parentAlgorithm, target);
-    this.seedExample = seedExample;
-  }
-
-  @Override
-  public WhiskRule copy() {
-    return new WhiskRule(this);
-  }
-
-  public double getLaplacian() {
-    int e = 0;
-    int n = 0;
-
-    if (coveringStatistics != null) {
-      e = coveringStatistics.getCoveredNegativesCount();
-      n = coveringStatistics.getCoveredNegativesCount()
-              + coveringStatistics.getCoveredPositivesCount();
-    }
-    return ((double) e + 1) / ((double) n + 1);
-  }
-
-  public TextRulerExample getSeedExample() {
-    return seedExample;
-  }
-
-  @Override
-  public void setCoveringStatistics(TextRulerStatisticsCollector c) {
-    super.setCoveringStatistics(c);
-    if (TextRulerToolkit.DEBUG && c != null) {
-      if (!c.getCoveredPositiveExamples().contains(seedExample)) {
-        TextRulerToolkit.log("ERROR, A WHISK RULE MUST COVER AT LEAST ITS SEED EXAMPLE!");
-        TextRulerToolkit.log("\tRULE: " + getRuleString());
-      }
-    }
-  }
-
-  public boolean containsTerm(WhiskRuleItem term) {
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      for (TextRulerRuleItem i : sp.preFillerPattern)
-        if (i.equals(term))
-          return true;
-      for (TextRulerRuleItem i : sp.fillerPattern)
-        if (i.equals(term))
-          return true;
-      for (TextRulerRuleItem i : sp.postFillerPattern)
-        if (i.equals(term))
-          return true;
-    }
-    return false;
-  }
-
-  // public WhiskRuleItem searchItemWithTermNumber(int no) {
-  // for (TextRulerSlotPattern sp : slotPatterns) {
-  // for (TextRulerRuleItem i : sp.preFillerPattern) {
-  // if (((WhiskRuleItem) i).getTermNumberInExample() == no) {
-  // return (WhiskRuleItem) i;
-  // }
-  // }
-  // for (TextRulerRuleItem i : sp.fillerPattern) {
-  // if (((WhiskRuleItem) i).getTermNumberInExample() == no) {
-  // return (WhiskRuleItem) i;
-  // }
-  // }
-  // for (TextRulerRuleItem i : sp.postFillerPattern) {
-  // if (((WhiskRuleItem) i).getTermNumberInExample() == no) {
-  // return (WhiskRuleItem) i;
-  // }
-  // }
-  // }
-  // return null;
-  // }
-
-  // TODO this could be moved to the core framework (TextRulerMultiSlotRule)
-  public WhiskRuleItem searchNeighborOfItem(WhiskRuleItem item, boolean goToLeft) {
-    int slotIndex = -1;
-    int patternIndex = -1;
-    int slotI = 0;
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      for (TextRulerRuleItem it : sp.preFillerPattern) {
-        if (it == item) {
-          slotIndex = slotI;
-          patternIndex = 0; // 0=preFiller
-          break;
-        }
-      }
-      if (slotIndex < 0) {
-        for (TextRulerRuleItem it : sp.fillerPattern) {
-          if (it == item) {
-            slotIndex = slotI;
-            patternIndex = 1; // 1=filler
-            break;
-          }
-        }
-      }
-      if (slotIndex < 0) {
-        for (TextRulerRuleItem it : sp.postFillerPattern) {
-          if (it == item) {
-            slotIndex = slotI;
-            patternIndex = 2; // 2=postFiller
-            break;
-          }
-        }
-      }
-      if (slotIndex >= 0) {
-        break;
-      }
-    }
-    if (slotIndex < 0) // we didn't even find the item in our rule ?! how
-      // can this happen ?
-      return null;
-
-    TextRulerRulePattern currentPattern = getPattern(slotIndex, patternIndex);
-    while (currentPattern != null) {
-      int startIndex = currentPattern.indexOf(item); // this is only >= 0
-      // for the first
-      // pattern...
-      if (!goToLeft) // walk forward...
-      {
-        int startSearchFromIndex = startIndex + 1;
-        if (startSearchFromIndex < currentPattern.size())
-          return (WhiskRuleItem) currentPattern.get(startSearchFromIndex);
-        else // skip to next pattern
-        {
-          patternIndex++;
-          if (patternIndex > 2) {
-            patternIndex = 0;
-            slotIndex++;
-            if (slotIndex >= slotPatterns.size())
-              return null; // not found!
-          }
-          currentPattern = getPattern(slotIndex, patternIndex);
-        }
-      } else {
-        int startSearchFromIndex = startIndex >= 0 ? startIndex - 1 : currentPattern.size() - 1;
-        if (startSearchFromIndex >= 0 && currentPattern.size() > 0)
-          return (WhiskRuleItem) currentPattern.get(startSearchFromIndex);
-        else // skip to previous pattern
-        {
-          patternIndex--;
-          if (patternIndex < 0) {
-            patternIndex = 2;
-            slotIndex--;
-            if (slotIndex < 0)
-              return null; // not found!
-          }
-          currentPattern = getPattern(slotIndex, patternIndex);
-        }
-      }
-    }
-    return null;
-  }
-
-  private TextRulerRulePattern getPattern(int slotIndex, int patternIndex) {
-    TextRulerSlotPattern sp = slotPatterns.get(slotIndex);
-    if (patternIndex == 0)
-      return sp.preFillerPattern;
-    else if (patternIndex == 1)
-      return sp.fillerPattern;
-    else if (patternIndex == 2)
-      return sp.postFillerPattern;
-    else
-      return null;
-  }
-
-  public int totalConstraintPoints() {
-    int result = 0;
-    for (TextRulerSlotPattern sl : slotPatterns) {
-      for (TextRulerRuleItem i : sl.preFillerPattern) {
-        result += ((WhiskRuleItem) i).constraintPoints();
-      }
-      for (TextRulerRuleItem i : sl.fillerPattern) {
-        result += ((WhiskRuleItem) i).constraintPoints();
-      }
-      for (TextRulerRuleItem i : sl.postFillerPattern) {
-        result += ((WhiskRuleItem) i).constraintPoints();
-      }
-    }
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskRuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskRuleItem.java
deleted file mode 100755
index f788dee..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/generic/WhiskRuleItem.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.generic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-
-public class WhiskRuleItem implements TextRulerRuleItem {
-
-  private TextRulerWordConstraint wordConstraint;
-
-  private boolean isStarWildCard = false;
-
-  private boolean hideRegExp = true;
-  
-  private boolean hideFeature = true;
-
-  protected List<MLWhiskOtherConstraint> otherConstraints = new ArrayList<MLWhiskOtherConstraint>();
-
-  private List<String> activeFeatures = new ArrayList<String>();
-  
-  public static class MLWhiskOtherConstraint {
-
-    TextRulerAnnotation tokenAnnotation;
-
-    TextRulerAnnotation constraintAnnotation;
-
-    boolean canBeAnchor;
-
-    Type type;
-
-    public MLWhiskOtherConstraint(TextRulerAnnotation tokenAnnotation,
-            TextRulerAnnotation constraintAnnotation) {
-      this.tokenAnnotation = tokenAnnotation;
-      this.constraintAnnotation = constraintAnnotation;
-      this.type = constraintAnnotation.getType();
-      canBeAnchor = (tokenAnnotation.getBegin() == constraintAnnotation.getBegin())
-              && (tokenAnnotation.getEnd() == constraintAnnotation.getEnd());
-      // TODO is the matching END also a requirement ?
-    }
-
-    public boolean isTMBasicTypeTokenConstraint() {
-      return tokenAnnotation == constraintAnnotation;
-    }
-
-    public boolean canBeAnchorConstraint() {
-      return canBeAnchor;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      MLWhiskOtherConstraint co = (MLWhiskOtherConstraint) o;
-
-      return toString().equals(co.toString()) && (canBeAnchor == co.canBeAnchor);
-    }
-
-    @Override
-    public int hashCode() {
-      return toString().hashCode() * (canBeAnchor ? 2 : 1);
-    }
-
-    @Override
-    public String toString() {
-      return type.getShortName();
-    }
-
-    public MLWhiskOtherConstraint copy() {
-      return new MLWhiskOtherConstraint(tokenAnnotation, constraintAnnotation);
-    }
-
-  }
-
-  public WhiskRuleItem() {
-    super();
-    wordConstraint = null;
-  }
-
-  public static WhiskRuleItem newWildCardItem() {
-    WhiskRuleItem i = new WhiskRuleItem();
-    i.setIsStarWildCard(true);
-    return i;
-  }
-
-  public WhiskRuleItem(WhiskRuleItem copyFrom) {
-    super();
-    if (copyFrom.wordConstraint != null)
-      wordConstraint = copyFrom.wordConstraint.copy();
-    isStarWildCard = copyFrom.isStarWildCard;
-    // termNumberInExample = copyFrom.termNumberInExample;
-    hideRegExp = copyFrom.hideRegExp;
-    for (MLWhiskOtherConstraint c : copyFrom.otherConstraints) {
-      otherConstraints.add(c.copy());
-    }
-    this.activeFeatures = new ArrayList<String>(copyFrom.getActivatedFeatures());
-  }
-
-  public WhiskRuleItem(TextRulerAnnotation tokenAnnotation) {
-    super();
-    setWordConstraint(new TextRulerWordConstraint(tokenAnnotation));
-  }
-
-  public void setWordConstraint(TextRulerWordConstraint c) {
-    wordConstraint = c;
-  }
-
-  public TextRulerWordConstraint getWordConstraint() {
-    return wordConstraint;
-  }
-
-  public TextRulerRuleItem copy() {
-    return new WhiskRuleItem(this);
-  }
-
-  public String getStringForRuleString(TextRulerRule rule, MLRuleItemType type,
-          int numberInPattern, int patternSize, int numberInRule, int ruleSize, int slotIndex) {
-
-    String result = "";
-    WhiskRule whiskRule = (WhiskRule) rule;
-    boolean isMarkingItem = type == MLRuleItemType.FILLER && numberInPattern == 0;
-    ArrayList<String> constraints = new ArrayList<String>();
-
-    String anchor = null;
-
-    if (wordConstraint != null) {
-      if (wordConstraint.isRegExpConstraint()) {
-        anchor = wordConstraint.typeShortName();
-        if (!hideRegExp)
-          constraints.add("REGEXP(\"" + wordConstraint + "\")");
-      } else
-        anchor = wordConstraint.toString();
-    }
-
-    MLWhiskOtherConstraint anchorConstraint = null;
-    if (anchor == null) {
-      for (MLWhiskOtherConstraint c : otherConstraints)
-        if (c.canBeAnchorConstraint()) {
-          anchorConstraint = c;
-          break;
-        }
-    }
-
-    for (MLWhiskOtherConstraint oc : otherConstraints) {
-      if (oc != anchorConstraint) {
-        if (oc.canBeAnchorConstraint())
-          constraints.add("IS(" + oc + ")");
-        else
-          constraints.add("PARTOF(" + oc + ")");
-      }
-    }
-    if (anchor == null) {
-      if (anchorConstraint != null)
-        anchor = anchorConstraint.toString();
-      else
-        anchor = "ALL";
-    }
-
-    for (String featureString : activeFeatures) {
-      String stringValue = wordConstraint.getTokenAnnotation().getFeatureMap().get(featureString);
-      if(stringValue != null) {
-        constraints.add("FEATURE(\"" + featureString + "\", "+stringValue+")");
-      }
-    }
-    
-    
-    if (constraints.size() > 0) {
-      String cStr = "";
-      for (String constraintStr : constraints) {
-        if (cStr.length() > 0)
-          cStr += ", ";
-        cStr += constraintStr;
-      }
-      result += "{" + cStr;
-      if (!isMarkingItem)
-        result += "}";
-    }
-
-    if (isMarkingItem) {
-      if (constraints.size() == 0)
-        result += "{";
-      result += "->MARKONCE(" + whiskRule.getMarkName(slotIndex);
-      if (patternSize > 1)
-        result += ", " + (numberInRule + 1) + ", " + (numberInRule + patternSize);
-      result += ")}";
-    }
-    if (isStarWildCard) {
-      anchor += "*?";
-      if(anchor.equals("ALL*?")) {
-        anchor = "#";
-      }
-    }
-    return anchor + result;
-  }
-
-  public void setIsStarWildCard(boolean flag) {
-    isStarWildCard = flag;
-  }
-
-  public boolean isStarWildCard() {
-    return isStarWildCard;
-  }
-
-  // public void setTermNumberInExample(int i) {
-  // termNumberInExample = i;
-  // }
-
-  // public int getTermNumberInExample() {
-  // return termNumberInExample;
-  // }
-
-  public boolean equals(TextRulerRuleItem o) {
-    WhiskRuleItem it = (WhiskRuleItem) o;
-    if (wordConstraint != null)
-      if (!wordConstraint.equals(it.wordConstraint))
-        return false;
-
-    return isStarWildCard == it.isStarWildCard; // && termNumberInExample == it.termNumberInExample;
-  }
-
-  @Override
-  public String toString() {
-    return getStringForRuleString(null, null, 0, 0, 0, 0, 0);
-  }
-
-  public void setHideRegExp(boolean flag) {
-    hideRegExp = flag;
-  }
-
-  public boolean isHideRegExp() {
-    return hideRegExp;
-  }
-
-  
-  public void addOtherConstraint(MLWhiskOtherConstraint c) {
-    if (!otherConstraints.contains(c))
-      otherConstraints.add(c);
-  }
-
-  public List<MLWhiskOtherConstraint> getOtherConstraints() {
-    return otherConstraints;
-  }
-
-  public int constraintPoints() {
-    int result = 0;
-    if (wordConstraint != null)
-      result += hideRegExp ? 1 : 3; // a regexp constraint is less general
-    // so point it bad here!
-    if (wordConstraint != null)
-      result += hideFeature ? 1 : 3;
-    result += otherConstraints.size();
-    return result;
-  }
-
-  public boolean isHideFeature() {
-    return hideFeature;
-  }
-
-  public void setHideFeature(boolean hideFeature) {
-    this.hideFeature = hideFeature;
-  }
-
-  public void activateFeature(String stringValue) {
-    activeFeatures.add(stringValue);    
-  }
-  public void deactivateFeature(String stringValue) {
-    activeFeatures.remove(stringValue);    
-  }
-  public List<String> getActivatedFeatures() {
-    return activeFeatures;    
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/Whisk.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/Whisk.java
deleted file mode 100755
index 6ce4153..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/Whisk.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.token;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocument;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleList;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerSlotPattern;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.learner.whisk.token.WhiskRuleItem.MLWhiskOtherConstraint;
-
-public class Whisk extends TextRulerBasicLearner {
-
-  public final static String WINDOSIZE_KEY = "windowSize";
-
-  public final static String ERROR_THRESHOLD_KEY = "errorThreshold";
-
-  public final static String POSTAG_ROOTTYPE_KEY = "posTagRootType";
-
-  public final static int STANDARD_WINDOWSIZE = 5;
-
-  public final static float STANDARD_ERROR_THRESHOLD = 0.1f;
-
-  public final static String STANDARD_POSTAG_ROOTTYPE = "org.apache.uima.ml.ML.postag";
-
-  TextRulerRuleList ruleList;
-
-  protected Set<TextRulerExample> coveredExamples;
-
-  protected int windowSize = STANDARD_WINDOWSIZE;
-
-  protected double errorThreshold = STANDARD_ERROR_THRESHOLD;
-
-  protected String posTagRootTypeName = STANDARD_POSTAG_ROOTTYPE;
-
-  int roundNumber = 0;
-
-  int allExamplesCount = 0;
-
-  private Map<String, TextRulerStatisticsCollector> cachedTestedRuleStatistics = new HashMap<String, TextRulerStatisticsCollector>();
-
-  public Whisk(String inputDir, String prePropTmFile, String tmpDir, String[] slotNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super(inputDir, prePropTmFile, tmpDir, slotNames, filterSet, skip, delegate);
-  }
-
-  @Override
-  public boolean collectNegativeCoveredInstancesWhenTesting() {
-    return false;
-  }
-
-  @Override
-  protected void doRun() {
-
-    // we don't use the same overall structure like the original WHISK since
-    // we do not
-    // repeat the whole process for some new training documents at the
-    // user's request, we
-    // learn like the other algorithms from the whole training set, so we
-    // for example do not
-    // need to test the intermediate rule base on a newly "incoming"
-    // training document since we
-    // tested all rules already on all training documents !
-
-    // this version of whisk is not tested for mutli slot learning since the
-    // seminar announcements
-    // are not quite suitable for this task: they do not all contain all 4
-    // slots and some of them
-    // occur more than once in one document ! And the order of them is not
-    // always the same as well!
-    // so this is now made only tested for the single slot case even if it
-    // is built capable of multislot
-    // examples!
-
-    // this is the inner loop of the WHISK pseudo-code:
-    // For each inst in Training
-    // for each tag
-
-    cachedTestedRuleStatistics.clear();
-    ruleList = new TextRulerRuleList();
-    coveredExamples = new HashSet<TextRulerExample>();
-
-    sendStatusUpdateToDelegate("Creating examples...", TextRulerLearnerState.ML_RUNNING, false);
-    TextRulerTarget target = new TextRulerTarget(slotNames[0], this); // only
-    // single-slot-target
-    // for now
-    exampleDocuments.createExamplesForTarget(target);
-
-    TextRulerExampleDocument[] docs = exampleDocuments.getSortedDocumentsInCacheOptimizedOrder();
-
-    allExamplesCount = exampleDocuments.getAllPositiveExamples().size();
-
-    for (TextRulerExampleDocument inst : docs) {
-      List<TextRulerExample> tags = inst.getPositiveExamples();
-
-      // for each uncovered example -> induce a new rule:
-      for (TextRulerExample tag : tags) {
-        if (!coveredExamples.contains(tag)) {
-          roundNumber++;
-          WhiskRule newRule = growRule(inst, tag);
-          if (shouldAbort())
-            break;
-          // if (newRule == null)
-          // break;
-          // else
-          if (newRule != null
-                  && (newRule.getCoveringStatistics().getCoveredNegativesCount() == 00 || newRule
-                          .getLaplacian() <= errorThreshold)) {
-            ruleList.addRule(newRule);
-            coveredExamples.addAll(newRule.getCoveringStatistics().getCoveredPositiveExamples());
-            sendStatusUpdateToDelegate("New Rule added...", TextRulerLearnerState.ML_RUNNING, true);
-          }
-        }
-      }
-      if (shouldAbort())
-        return;
-    }
-    sendStatusUpdateToDelegate("Done", TextRulerLearnerState.ML_DONE, true);
-    cachedTestedRuleStatistics.clear();
-  }
-
-  protected WhiskRule growRule(TextRulerExampleDocument doc, TextRulerExample example) {
-    sendStatusUpdateToDelegate("Creating new rule from seed...", TextRulerLearnerState.ML_RUNNING,
-            false);
-    WhiskRule theRule = new WhiskRule(this, example.getTarget(), example);
-    int numberOfSlotsInTag = example.getAnnotations().length;
-    for (int i = 0; i < numberOfSlotsInTag; i++)
-      theRule.getPatterns().add(new TextRulerSlotPattern());
-
-    List<WhiskRuleItem> allTerms = getAllTermsOfExample(example);
-
-    sendStatusUpdateToDelegate("Creating new rule: anchoring...", TextRulerLearnerState.ML_RUNNING,
-            false);
-    for (int i = 0; i < numberOfSlotsInTag; i++) {
-      theRule = anchor(theRule, doc, example, allTerms, i);
-      if (shouldAbort())
-        return null;
-    }
-
-    sendStatusUpdateToDelegate("Creating new rule: extending...", TextRulerLearnerState.ML_RUNNING,
-            false);
-    if (theRule != null) {
-      double oldLaplacian = theRule.getLaplacian();
-      int subRoundNumber = 0;
-      // repeat while we still make errors...
-      while (theRule.getCoveringStatistics().getCoveredNegativesCount() > 0) {
-        WhiskRule extendedRule = extendRule(theRule, doc, example, allTerms, subRoundNumber);
-        if (extendedRule == null) {
-          // this way we get the previous rule
-          // as the best rule...
-          break;
-        }
-        theRule = extendedRule;
-        TextRulerToolkit.log("----------------------------");
-        TextRulerToolkit.log("BEST EXTENSION IS: " + theRule.getRuleString());
-        TextRulerToolkit.log("Laplacian: " + theRule.getLaplacian() + "    ; "
-                + theRule.getCoveringStatistics());
-        subRoundNumber++;
-
-        double newLaplacian = theRule.getLaplacian();
-        if (newLaplacian >= oldLaplacian) {
-          break;
-        }
-        oldLaplacian = newLaplacian;
-      }
-      TextRulerToolkit.log("----------------------------");
-      TextRulerToolkit.log("FINAL RULE IS : " + theRule.getRuleString());
-    }
-    return theRule;
-  }
-
-  protected WhiskRule extendRule(WhiskRule rule, TextRulerExampleDocument doc,
-          TextRulerExample example, List<WhiskRuleItem> allTerms, int subRoundNumber) {
-    WhiskRule bestRule = null;
-    double bestL = 1.0;
-    int bestRuleConstraintPoints = -1;
-    if (rule.getLaplacian() <= errorThreshold) {
-      bestRule = rule;
-      bestL = rule.getLaplacian();
-    }
-
-    List<WhiskRuleItem> slotTerms = getTermsWithinBounds(allTerms,
-            example.getAnnotations()[0].getBegin(), example.getAnnotations()[0].getEnd());
-    WhiskRuleItem firstSlotTerm = slotTerms.get(0);
-    WhiskRuleItem lastSlotTerm = slotTerms.get(slotTerms.size() - 1);
-
-    List<TextRulerRule> rulesToTest = new ArrayList<TextRulerRule>();
-    for (WhiskRuleItem term : allTerms) {
-      if (rule.containsTerm(term)) {
-        continue;
-      }
-
-      boolean rejectTerm = false;
-      // for now this works only for slot 0 (no multislot stuff here yet!)
-      if (term.getTermNumberInExample() < firstSlotTerm.getTermNumberInExample())
-        rejectTerm = firstSlotTerm.getTermNumberInExample() - term.getTermNumberInExample() > windowSize;
-      else if (term.getTermNumberInExample() > lastSlotTerm.getTermNumberInExample())
-        rejectTerm = term.getTermNumberInExample() - firstSlotTerm.getTermNumberInExample() > windowSize;
-
-      if (rejectTerm) {
-        // out of window scope -> skip to next...
-        continue;
-      }
-
-      WhiskRule proposedRule = createNewRuleByAddingTerm(rule, term);
-      WhiskRuleItem t = proposedRule.searchItemWithTermNumber(term.getTermNumberInExample());
-
-      if (!rulesToTest.contains(proposedRule))
-        rulesToTest.add(proposedRule);
-
-      // add a second version where we remove the exact token content if
-      // it is a regexp item:
-      WhiskRule proposedRule2 = null;
-      WhiskRuleItem t2 = null;
-      if (t.getWordConstraint().isRegExpConstraint()) {
-        proposedRule2 = proposedRule.copy();
-        t2 = proposedRule2.searchItemWithTermNumber(term.getTermNumberInExample());
-        t2.setHideRegExp(true);
-        proposedRule2.setNeedsCompile(true);
-        if (!rulesToTest.contains(proposedRule2)) {
-          rulesToTest.add(proposedRule2);
-        }
-      }
-
-      // and now, for WHISK performance testing purposes, we also add POS
-      // tags:
-      // this is not very nice code and not dynamic feature capable, but
-      // for testpurposes
-      // in order to test WHISK with PosTag Terms...
-      if (posTagRootTypeName != null && posTagRootTypeName.length() > 0) {
-        TextRulerAnnotation tokenAnnotation = term.getWordConstraint().getTokenAnnotation();
-        CAS cas = example.getDocumentCAS();
-        TypeSystem ts = cas.getTypeSystem();
-        Type posTagsRootType = ts.getType(posTagRootTypeName);
-        if (ts != null) {
-          // POS-Tags created by our test hmm tagger.
-          List<AnnotationFS> posTagAnnotations = TextRulerToolkit.getAnnotationsWithinBounds(cas,
-                  tokenAnnotation.getBegin(), tokenAnnotation.getEnd(), null, posTagsRootType);
-          if (posTagAnnotations.size() > 0) {
-            AnnotationFS posTag = posTagAnnotations.get(0);
-            if (posTag.getBegin() == tokenAnnotation.getBegin()
-                    && posTag.getEnd() == tokenAnnotation.getEnd()) {
-              TextRulerAnnotation posTagAnnotation = new TextRulerAnnotation(posTag, doc);
-
-              // 1. most specific term with all constraints we
-              // have:
-              WhiskRule proposedRule3 = proposedRule.copy();
-              WhiskRuleItem t3 = proposedRule3.searchItemWithTermNumber(term
-                      .getTermNumberInExample());
-              t3.addOtherConstraint(new MLWhiskOtherConstraint(tokenAnnotation, posTagAnnotation));
-              proposedRule3.setNeedsCompile(true);
-              if (!rulesToTest.contains(proposedRule3))
-                rulesToTest.add(proposedRule3);
-
-              // 2. the same without the regexp thingy:
-              if (proposedRule2 != null) {
-                WhiskRule proposedRule4 = proposedRule2.copy();
-                WhiskRuleItem t4 = proposedRule4.searchItemWithTermNumber(term
-                        .getTermNumberInExample());
-                t4.addOtherConstraint(new MLWhiskOtherConstraint(tokenAnnotation, posTagAnnotation));
-                proposedRule4.setNeedsCompile(true);
-                if (!rulesToTest.contains(proposedRule4))
-                  rulesToTest.add(proposedRule4);
-              }
-
-              // 3. last but not least: a rule with only the pos
-              // tag constraint:
-              WhiskRule proposedRule5 = proposedRule.copy();
-              WhiskRuleItem t5 = proposedRule5.searchItemWithTermNumber(term
-                      .getTermNumberInExample());
-              t5.addOtherConstraint(new MLWhiskOtherConstraint(tokenAnnotation, posTagAnnotation));
-              t5.setWordConstraint(null);
-              proposedRule5.setNeedsCompile(true);
-              if (!rulesToTest.contains(proposedRule5))
-                rulesToTest.add(proposedRule5);
-            }
-          }
-        }
-      }
-
-    }
-    if (rulesToTest.size() == 0)
-      return bestRule;
-
-    sendStatusUpdateToDelegate(
-            "Round "
-                    + roundNumber
-                    + "."
-                    + subRoundNumber
-                    + " - Testing "
-                    + rulesToTest.size()
-                    + " rules... "
-                    + " - uncovered examples: "
-                    + (allExamplesCount - coveredExamples.size() + " / " + allExamplesCount
-                            + " ; cs=" + cachedTestedRuleStatistics.size()),
-            TextRulerLearnerState.ML_RUNNING, false);
-
-    TextRulerToolkit.log("Testing " + rulesToTest.size() + " rules on training set...");
-    for (TextRulerRule r : rulesToTest)
-      TextRulerToolkit.log(r.getRuleString());
-    testRulesIfNotCached(rulesToTest); // testRulesOnDocumentSet(rulesToTest,
-    // exampleDocuments);
-    if (shouldAbort())
-      return null;
-    for (TextRulerRule r : rulesToTest) {
-      WhiskRule wr = (WhiskRule) r;
-      if (wr.getLaplacian() < bestL) {
-        bestL = wr.getLaplacian();
-        bestRule = wr;
-        bestRuleConstraintPoints = bestRule.totalConstraintPoints();
-      } else if (wr.getLaplacian() == bestL && bestRuleConstraintPoints >= 0) {
-        TextRulerToolkit.log("Same Laplacian! So prefer more general rule!");
-        if (wr.totalConstraintPoints() < bestRuleConstraintPoints) {
-          TextRulerToolkit.log("\tYes, prefered!");
-          bestL = wr.getLaplacian();
-          bestRule = wr;
-          bestRuleConstraintPoints = bestRule.totalConstraintPoints();
-        }
-      }
-    }
-    return bestRule;
-  }
-
-  protected WhiskRule createNewRuleByAddingTerm(WhiskRule baseRule, WhiskRuleItem term) {
-    WhiskRule newRule = baseRule.copy();
-    int foundSlotNumber = -1; // debug info
-    String foundSlotPattern = "";
-    int termNumber = term.getTermNumberInExample();
-    // determine, where this term is located relatively to the slots we
-    // have...
-    TextRulerRulePattern targetPattern = null;
-    TextRulerRulePattern previousSlotPostFillerPattern = null;
-    for (int i = 0; i < newRule.getPatterns().size(); i++) {
-      TextRulerSlotPattern slotPattern = newRule.getPatterns().get(i);
-      WhiskRuleItem it = (WhiskRuleItem) slotPattern.preFillerPattern.lastItem(); // look at the
-      // prefiller
-      // pattern
-      if (it != null && termNumber <= it.getTermNumberInExample())
-        targetPattern = slotPattern.preFillerPattern;
-      if (targetPattern == null && slotPattern.fillerPattern.size() > 0) // now
-      // look
-      // at
-      // the
-      // filler
-      // pattern
-      {
-        it = (WhiskRuleItem) slotPattern.fillerPattern.firstItem();
-        if (termNumber < it.getTermNumberInExample()) // it's still for
-          // the prefiller
-          // pattern but it
-          // seems to be
-          // emtpy so we
-          // could not find
-          // that out above!
-          targetPattern = slotPattern.preFillerPattern;
-        else {
-          it = (WhiskRuleItem) slotPattern.fillerPattern.lastItem();
-          if (termNumber <= it.getTermNumberInExample()) {
-            targetPattern = slotPattern.fillerPattern;
-          }
-        }
-      }
-      if (targetPattern == null && slotPattern.postFillerPattern.size() > 0) // now look at
-      // the
-      // postfiller
-      // pattern
-      {
-        it = (WhiskRuleItem) slotPattern.postFillerPattern.firstItem();
-        if (termNumber < it.getTermNumberInExample()) // it's still for
-          // the filler
-          // pattern but it
-          // seems to be
-          // emtpy so we
-          // could not find
-          // that out above!
-          targetPattern = slotPattern.fillerPattern;
-        else {
-          it = (WhiskRuleItem) slotPattern.postFillerPattern.lastItem();
-          if (termNumber <= it.getTermNumberInExample())
-            targetPattern = slotPattern.postFillerPattern;
-        }
-      }
-      if (targetPattern == null) {
-        targetPattern = previousSlotPostFillerPattern;
-        if (i > 0) {
-          TextRulerSlotPattern prevSlotPattern = newRule.getPatterns().get(i - 1);
-          foundSlotPattern = targetPattern == prevSlotPattern.preFillerPattern ? "PRE FILLER"
-                  : (targetPattern == prevSlotPattern.fillerPattern ? "FILLER" : "POST FILLER");
-          foundSlotNumber = i - 1;
-        }
-      } else {
-        foundSlotPattern = targetPattern == slotPattern.preFillerPattern ? "PRE FILLER"
-                : (targetPattern == slotPattern.fillerPattern ? "FILLER" : "POST FILLER");
-        foundSlotNumber = i;
-      }
-      previousSlotPostFillerPattern = slotPattern.postFillerPattern;
-    }
-
-    if (targetPattern == null) {
-      targetPattern = previousSlotPostFillerPattern;
-      foundSlotNumber = newRule.getPatterns().size() - 1;
-      foundSlotPattern = "POST FILLER";
-    }
-
-    if (targetPattern == null) {
-      TextRulerToolkit.log("ERROR, NO TARGET PATTERN FOR NEW RULE TERM FOUND !");
-    } else {
-      // TextRulerToolkit.log("Ok, found for Rule: "+newRule.getRuleString());
-      // TextRulerToolkit.log("Term: "+term.getTermNumberInExample()+" ; "+term);
-      // TextRulerToolkit.log("Slot "+foundSlotNumber+" - Pattern: "+foundSlotPattern);
-      // now put that term into the rule:
-      int indexInPattern = -1;
-      if (targetPattern.size() == 0) {
-        targetPattern.add(term.copy());
-        indexInPattern = 0;
-      } else {
-        // 1. search if the term would replace a wildcard:
-        WhiskRuleItem wildCard = newRule.searchItemWithTermNumber(termNumber);
-        if (wildCard != null) {
-          if (!wildCard.isStarWildCard()) {
-            TextRulerToolkit
-                    .log("ERROR, FOUND A TERM WITH THE SAME NUMBER THAT IS NOT A WILDCARD! HOW IS THAT???");
-            return null;
-          }
-          if (!targetPattern.contains(wildCard)) {
-            TextRulerToolkit.log("EVEN WORSE, THAT MUST NOT BE AT ALL!");
-            return null;
-          }
-          indexInPattern = targetPattern.indexOf(wildCard);
-          targetPattern.set(indexInPattern, term.copy());
-        } else {
-          // not a wildcard, so search for the insertion point:
-          for (int i = 0; i < targetPattern.size(); i++) {
-            WhiskRuleItem it = (WhiskRuleItem) targetPattern.get(i);
-            if (termNumber < it.getTermNumberInExample()) {
-              indexInPattern = i;
-              break;
-            }
-          }
-          if (indexInPattern < 0) {
-            indexInPattern = targetPattern.size();
-            targetPattern.add(term.copy());
-          } else
-            targetPattern.add(indexInPattern, term.copy());
-        }
-      }
-      // ok, now we have replaced a wildcard with the term or added the
-      // term between two other items.
-      // we now have to check the neighbors of the new term: if it is a
-      // direct neighbor (according to the termNumber),
-      // we have nothing special to do. but if it is not a direct
-      // neighbor, we have to add a wildcard between the two items (if the
-      // neighbor item
-      // is not a wildcard itself!
-      WhiskRuleItem newTerm = (WhiskRuleItem) targetPattern.get(indexInPattern);
-
-      // look at left neighbor:
-      WhiskRuleItem left = newRule.searchNeighborOfItem(newTerm, true);
-      if (left != null) {
-        // TextRulerToolkit.log("LEFT NEIGHBOR FOUND!");
-
-        // so we have a left neighbor. let's see if it also is the
-        // neighbor in our seed token stream:
-        if (left.getTermNumberInExample() < newTerm.getTermNumberInExample() - 1
-                && !left.isStarWildCard()) { // no direct neighbor and
-          // no wildcard yet,
-          // so insert a wildcard between us!
-          targetPattern.add(indexInPattern,
-                  WhiskRuleItem.newWildCardItem(left.getTermNumberInExample() + 1));
-          indexInPattern++;
-        }
-      }
-
-      // look at right neighbor:
-      WhiskRuleItem right = newRule.searchNeighborOfItem(newTerm, false);
-      if (right != null) {
-        // TextRulerToolkit.log("RIGHT NEIGHBOR FOUND!");
-        // so we have a right neighbor. let's see if it also is the
-        // neighbor in our seed token stream:
-        if (right.getTermNumberInExample() > newTerm.getTermNumberInExample() + 1
-                && !right.isStarWildCard()) { // no direct neighbor and
-          // no wildcard yet,
-          // so insert a wildcard between us!
-          WhiskRuleItem wc = WhiskRuleItem.newWildCardItem(newTerm.getTermNumberInExample() + 1);
-          if (indexInPattern + 1 < targetPattern.size())
-            targetPattern.add(indexInPattern + 1, wc);
-          else
-            targetPattern.add(wc);
-        }
-      }
-
-      newRule.setNeedsCompile(true);
-      // TextRulerToolkit.log("BEFORE: "+baseRule.getRuleString());
-      // TextRulerToolkit.log("AFTER : "+newRule.getRuleString());
-      // TextRulerToolkit.log("");
-    }
-    if (newRule.getRuleString().equals(baseRule.getRuleString())) // this
-      // must
-      // not be!
-      return null;
-    else
-      return newRule;
-  }
-
-  protected WhiskRule anchor(WhiskRule rule, TextRulerExampleDocument doc,
-          TextRulerExample example, List<WhiskRuleItem> allTerms, int slotIndex) {
-    TextRulerAnnotation slotAnnotation = example.getAnnotations()[slotIndex];
-    List<WhiskRuleItem> inside = getTermsWithinBounds(allTerms, slotAnnotation.getBegin(),
-            slotAnnotation.getEnd());
-
-    if (rule == null || inside.isEmpty()) {
-      return null;
-    }
-    // create base 1 and base 2:
-    WhiskRule base1 = rule.copy(); // slot filler rule
-    TextRulerSlotPattern slotPattern = base1.getPatterns().get(slotIndex);
-    for (int i = 0; i < inside.size(); i++)
-      if (i == 0 || (i == inside.size() - 1))
-        slotPattern.fillerPattern.add(inside.get(i).copy());
-      else if (inside.size() > 2 && i < 2)
-        slotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem(inside.get(i)
-                .getTermNumberInExample()));
-
-    WhiskRule base2 = rule.copy(); // slot context rule
-    slotPattern = base2.getPatterns().get(slotIndex);
-
-    int firstOfSlot = allTerms.indexOf(inside.get(0));
-    int lastOfSlot = allTerms.indexOf(inside.get(inside.size() - 1));
-    if (firstOfSlot > 0)
-      slotPattern.preFillerPattern.add(allTerms.get(firstOfSlot - 1));
-    slotPattern.fillerPattern.add(WhiskRuleItem.newWildCardItem(inside.get(0)
-            .getTermNumberInExample()));
-    if (lastOfSlot + 1 < allTerms.size())
-      slotPattern.postFillerPattern.add(allTerms.get(lastOfSlot + 1));
-
-    TextRulerToolkit.log("base1: " + base1.getRuleString());
-    TextRulerToolkit.log("base2: " + base2.getRuleString());
-    List<TextRulerRule> testRules = new ArrayList<TextRulerRule>();
-    testRules.add(base1);
-    testRules.add(base2);
-    // testRulesOnDocumentSet(testRules, exampleDocuments);
-    testRulesIfNotCached(testRules);
-    if (shouldAbort())
-      return null;
-    TextRulerToolkit.log("\tbase1: " + base1.getCoveringStatistics() + " --> laplacian = "
-            + base1.getLaplacian());
-    TextRulerToolkit.log("\tbase2: " + base2.getCoveringStatistics() + " --> laplacian = "
-            + base2.getLaplacian());
-    if (base2.getCoveringStatistics().getCoveredPositivesCount() > base1.getCoveringStatistics()
-            .getCoveredPositivesCount())
-      return base2;
-    else
-      return base1;
-  }
-
-  public String getResultString() {
-    if (ruleList != null)
-      return getFileHeaderString(true) + ruleList.getRulesString("");
-    else
-      return "No results available yet!";
-  }
-
-  public void setParameters(Map<String, Object> params) {
-    if (TextRulerToolkit.DEBUG)
-      saveParametersToTempFolder(params);
-
-    // TODO try catch
-    if (params.containsKey(WINDOSIZE_KEY))
-      windowSize = (Integer) params.get(WINDOSIZE_KEY);
-
-    if (params.containsKey(ERROR_THRESHOLD_KEY))
-      errorThreshold = (Float) params.get(ERROR_THRESHOLD_KEY);
-
-    if (params.containsKey(POSTAG_ROOTTYPE_KEY))
-      posTagRootTypeName = (String) params.get(POSTAG_ROOTTYPE_KEY);
-
-  }
-
-  public List<WhiskRuleItem> getAllTermsOfExample(TextRulerExample example) {
-    CAS cas = example.getDocumentCAS();
-    Type tokensRootType = cas.getTypeSystem().getType(TextRulerToolkit.RUTA_ANY_TYPE_NAME);
-    List<AnnotationFS> all = TextRulerToolkit.getAnnotationsWithinBounds(cas, 0, cas
-            .getDocumentText().length() + 1, TextRulerToolkit.getFilterSetWithSlotNames(slotNames,
-            filterSet), tokensRootType);
-
-    List<WhiskRuleItem> result = new ArrayList<WhiskRuleItem>();
-    int i = 0;
-    for (AnnotationFS afs : all) {
-      WhiskRuleItem term = new WhiskRuleItem(new TextRulerAnnotation(afs, example.getDocument()));
-      term.setTermNumberInExample(i);
-      i++;
-      result.add(term);
-    }
-    return result;
-  }
-
-  public List<WhiskRuleItem> getTermsWithinBounds(List<WhiskRuleItem> allTerms, int startPos,
-          int endPos) {
-    List<WhiskRuleItem> result = new ArrayList<WhiskRuleItem>();
-    for (WhiskRuleItem term : allTerms) {
-      TextRulerAnnotation a = term.getWordConstraint().getTokenAnnotation();
-      if (a.getBegin() >= startPos && a.getEnd() <= endPos)
-        result.add(term);
-      if (a.getEnd() > endPos)
-        break;
-    }
-    return result;
-  }
-
-  // TODO share this between algorithms (e.g. LP2 and RAPIER, WHISK ?) and
-  // make a maximum size of the cache, etc. like CasCache?
-  protected void testRulesIfNotCached(List<TextRulerRule> rules) {
-    List<TextRulerRule> rulesToTest = new ArrayList<TextRulerRule>();
-
-    for (TextRulerRule r : rules) {
-      String key = r.getRuleString();
-      if (cachedTestedRuleStatistics.containsKey(key)) {
-        r.setCoveringStatistics(cachedTestedRuleStatistics.get(key).copy());
-        TextRulerToolkit.log("CACHE HIT !");
-      } else
-        rulesToTest.add(r);
-    }
-
-    if (rulesToTest.size() > 0) {
-      testRulesOnDocumentSet(rulesToTest, exampleDocuments);
-      if (shouldAbort())
-        return;
-      for (TextRulerRule r : rulesToTest) {
-        String key = r.getRuleString();
-        cachedTestedRuleStatistics.put(key, r.getCoveringStatistics().copy());
-      }
-    }
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskFactory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskFactory.java
deleted file mode 100755
index 2edc1e2..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.token;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter.MLAlgorithmParamType;
-
-public class WhiskFactory implements TextRulerLearnerFactory {
-
-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,
-          String preprocessorTMfile, String tempFolderPath, String[] fullSlotTypeNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    return new Whisk(inputFolderPath, preprocessorTMfile, tempFolderPath, fullSlotTypeNames,
-            filterSet,skip, delegate);
-  }
-
-  public Map<String, Object> getAlgorithmParameterStandardValues() {
-    Map<String, Object> result = new HashMap<String, Object>();
-    result.put(Whisk.WINDOSIZE_KEY, Whisk.STANDARD_WINDOWSIZE);
-    result.put(Whisk.ERROR_THRESHOLD_KEY, Whisk.STANDARD_ERROR_THRESHOLD);
-    result.put(Whisk.POSTAG_ROOTTYPE_KEY, Whisk.STANDARD_POSTAG_ROOTTYPE);
-    return result;
-  }
-
-  public TextRulerLearnerParameter[] getAlgorithmParameters() {
-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[3];
-
-    result[0] = new TextRulerLearnerParameter(Whisk.WINDOSIZE_KEY, "Window Size",
-            MLAlgorithmParamType.ML_INT_PARAM);
-    result[1] = new TextRulerLearnerParameter(Whisk.ERROR_THRESHOLD_KEY, "Maximum Error Threshold",
-            MLAlgorithmParamType.ML_FLOAT_PARAM);
-    result[2] = new TextRulerLearnerParameter(Whisk.POSTAG_ROOTTYPE_KEY, "PosTag Root Type",
-            MLAlgorithmParamType.ML_STRING_PARAM);
-
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskRule.java
deleted file mode 100755
index c98eb70..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskRule.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.token;
-
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerMultiSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerSlotPattern;
-import org.apache.uima.ruta.textruler.core.TextRulerStatisticsCollector;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-
-public class WhiskRule extends TextRulerMultiSlotRule {
-
-  TextRulerExample seedExample;
-
-  public WhiskRule(WhiskRule copyFrom) {
-    super(copyFrom);
-    seedExample = copyFrom.seedExample;
-  }
-
-  public WhiskRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target,
-          TextRulerExample seedExample) {
-    super(parentAlgorithm, target);
-    this.seedExample = seedExample;
-  }
-
-  @Override
-  public WhiskRule copy() {
-    return new WhiskRule(this);
-  }
-
-  public double getLaplacian() {
-    int e = 0;
-    int n = 0;
-
-    if (coveringStatistics != null) {
-      e = coveringStatistics.getCoveredNegativesCount();
-      n = coveringStatistics.getCoveredNegativesCount()
-              + coveringStatistics.getCoveredPositivesCount();
-    }
-    return ((double) e + 1) / ((double) n + 1);
-  }
-
-  public TextRulerExample getSeedExample() {
-    return seedExample;
-  }
-
-  @Override
-  public void setCoveringStatistics(TextRulerStatisticsCollector c) {
-    super.setCoveringStatistics(c);
-    if (TextRulerToolkit.DEBUG && c != null) {
-      if (!c.getCoveredPositiveExamples().contains(seedExample)) {
-        TextRulerToolkit.log("ERROR, A WHISK RULE MUST COVER AT LEAST ITS SEED EXAMPLE!");
-        TextRulerToolkit.log("\tRULE: " + getRuleString());
-      }
-    }
-  }
-
-  public boolean containsTerm(WhiskRuleItem term) {
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      for (TextRulerRuleItem i : sp.preFillerPattern)
-        if (i.equals(term))
-          return true;
-      for (TextRulerRuleItem i : sp.fillerPattern)
-        if (i.equals(term))
-          return true;
-      for (TextRulerRuleItem i : sp.postFillerPattern)
-        if (i.equals(term))
-          return true;
-    }
-    return false;
-  }
-
-  public WhiskRuleItem searchItemWithTermNumber(int no) {
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      for (TextRulerRuleItem i : sp.preFillerPattern) {
-        if (((WhiskRuleItem) i).getTermNumberInExample() == no) {
-          return (WhiskRuleItem) i;
-        }
-      }
-      for (TextRulerRuleItem i : sp.fillerPattern) {
-        if (((WhiskRuleItem) i).getTermNumberInExample() == no) {
-          return (WhiskRuleItem) i;
-        }
-      }
-      for (TextRulerRuleItem i : sp.postFillerPattern) {
-        if (((WhiskRuleItem) i).getTermNumberInExample() == no) {
-          return (WhiskRuleItem) i;
-        }
-      }
-    }
-    return null;
-  }
-
-  // TODO this could be moved to the core framework (TextRulerMultiSlotRule)
-  public WhiskRuleItem searchNeighborOfItem(WhiskRuleItem item, boolean goToLeft) {
-    int slotIndex = -1;
-    int patternIndex = -1;
-    int slotI = 0;
-    for (TextRulerSlotPattern sp : slotPatterns) {
-      for (TextRulerRuleItem it : sp.preFillerPattern) {
-        if (it == item) {
-          slotIndex = slotI;
-          patternIndex = 0; // 0=preFiller
-          break;
-        }
-      }
-      if (slotIndex < 0) {
-        for (TextRulerRuleItem it : sp.fillerPattern) {
-          if (it == item) {
-            slotIndex = slotI;
-            patternIndex = 1; // 1=filler
-            break;
-          }
-        }
-      }
-      if (slotIndex < 0) {
-        for (TextRulerRuleItem it : sp.postFillerPattern) {
-          if (it == item) {
-            slotIndex = slotI;
-            patternIndex = 2; // 2=postFiller
-            break;
-          }
-        }
-      }
-      if (slotIndex >= 0) {
-        break;
-      }
-    }
-    if (slotIndex < 0) // we didn't even find the item in our rule ?! how
-      // can this happen ?
-      return null;
-
-    TextRulerRulePattern currentPattern = getPattern(slotIndex, patternIndex);
-    while (currentPattern != null) {
-      int startIndex = currentPattern.indexOf(item); // this is only >= 0
-      // for the first
-      // pattern...
-      if (!goToLeft) // walk forward...
-      {
-        int startSearchFromIndex = startIndex + 1;
-        if (startSearchFromIndex < currentPattern.size())
-          return (WhiskRuleItem) currentPattern.get(startSearchFromIndex);
-        else // skip to next pattern
-        {
-          patternIndex++;
-          if (patternIndex > 2) {
-            patternIndex = 0;
-            slotIndex++;
-            if (slotIndex >= slotPatterns.size())
-              return null; // not found!
-          }
-          currentPattern = getPattern(slotIndex, patternIndex);
-        }
-      } else {
-        int startSearchFromIndex = startIndex >= 0 ? startIndex - 1 : currentPattern.size() - 1;
-        if (startSearchFromIndex >= 0 && currentPattern.size() > 0)
-          return (WhiskRuleItem) currentPattern.get(startSearchFromIndex);
-        else // skip to previous pattern
-        {
-          patternIndex--;
-          if (patternIndex < 0) {
-            patternIndex = 2;
-            slotIndex--;
-            if (slotIndex < 0)
-              return null; // not found!
-          }
-          currentPattern = getPattern(slotIndex, patternIndex);
-        }
-      }
-    }
-    return null;
-  }
-
-  private TextRulerRulePattern getPattern(int slotIndex, int patternIndex) {
-    TextRulerSlotPattern sp = slotPatterns.get(slotIndex);
-    if (patternIndex == 0)
-      return sp.preFillerPattern;
-    else if (patternIndex == 1)
-      return sp.fillerPattern;
-    else if (patternIndex == 2)
-      return sp.postFillerPattern;
-    else
-      return null;
-  }
-
-  public int totalConstraintPoints() {
-    int result = 0;
-    for (TextRulerSlotPattern sl : slotPatterns) {
-      for (TextRulerRuleItem i : sl.preFillerPattern) {
-        result += ((WhiskRuleItem) i).constraintPoints();
-      }
-      for (TextRulerRuleItem i : sl.fillerPattern) {
-        result += ((WhiskRuleItem) i).constraintPoints();
-      }
-      for (TextRulerRuleItem i : sl.postFillerPattern) {
-        result += ((WhiskRuleItem) i).constraintPoints();
-      }
-    }
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskRuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskRuleItem.java
deleted file mode 100755
index aad2f9d..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskRuleItem.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * 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.ruta.textruler.learner.whisk.token;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.cas.Type;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-
-public class WhiskRuleItem implements TextRulerRuleItem {
-
-  private TextRulerWordConstraint wordConstraint;
-
-  private boolean isStarWildCard = false;
-
-  private int termNumberInExample = -1;
-
-  private boolean hideRegExp = false;
-
-  protected List<MLWhiskOtherConstraint> otherConstraints = new ArrayList<MLWhiskOtherConstraint>();
-
-  public static class MLWhiskOtherConstraint {
-
-    TextRulerAnnotation tokenAnnotation;
-
-    TextRulerAnnotation constraintAnnotation;
-
-    boolean canBeAnchor;
-
-    Type type;
-
-    public MLWhiskOtherConstraint(TextRulerAnnotation tokenAnnotation,
-            TextRulerAnnotation constraintAnnotation) {
-      this.tokenAnnotation = tokenAnnotation;
-      this.constraintAnnotation = constraintAnnotation;
-      this.type = constraintAnnotation.getType();
-      canBeAnchor = (tokenAnnotation.getBegin() == constraintAnnotation.getBegin())
-              && (tokenAnnotation.getEnd() == constraintAnnotation.getEnd());
-      // TODO is the matching END also a requirement ?
-    }
-
-    public boolean isTMBasicTypeTokenConstraint() {
-      return tokenAnnotation == constraintAnnotation;
-    }
-
-    public boolean canBeAnchorConstraint() {
-      return canBeAnchor;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      MLWhiskOtherConstraint co = (MLWhiskOtherConstraint) o;
-
-      return toString().equals(co.toString()) && (canBeAnchor == co.canBeAnchor);
-    }
-
-    @Override
-    public int hashCode() {
-      return toString().hashCode() * (canBeAnchor ? 2 : 1);
-    }
-
-    @Override
-    public String toString() {
-      return type.getShortName();
-    }
-
-    public MLWhiskOtherConstraint copy() {
-      return new MLWhiskOtherConstraint(tokenAnnotation, constraintAnnotation);
-    }
-
-  }
-
-  public WhiskRuleItem() {
-    super();
-    wordConstraint = null;
-    termNumberInExample = -1;
-  }
-
-  public static WhiskRuleItem newWildCardItem(int startTermNumber) {
-    WhiskRuleItem i = new WhiskRuleItem();
-    i.setIsStarWildCard(true);
-    i.setTermNumberInExample(startTermNumber);
-    return i;
-  }
-
-  public WhiskRuleItem(WhiskRuleItem copyFrom) {
-    super();
-    if (copyFrom.wordConstraint != null)
-      wordConstraint = copyFrom.wordConstraint.copy();
-    isStarWildCard = copyFrom.isStarWildCard;
-    termNumberInExample = copyFrom.termNumberInExample;
-    hideRegExp = copyFrom.hideRegExp;
-    for (MLWhiskOtherConstraint c : copyFrom.otherConstraints)
-      otherConstraints.add(c.copy());
-  }
-
-  public WhiskRuleItem(TextRulerAnnotation tokenAnnotation) {
-    super();
-    setWordConstraint(new TextRulerWordConstraint(tokenAnnotation));
-  }
-
-  public void setWordConstraint(TextRulerWordConstraint c) {
-    wordConstraint = c;
-  }
-
-  public TextRulerWordConstraint getWordConstraint() {
-    return wordConstraint;
-  }
-
-  public TextRulerRuleItem copy() {
-    return new WhiskRuleItem(this);
-  }
-
-  public String getStringForRuleString(TextRulerRule rule, MLRuleItemType type,
-          int numberInPattern, int patternSize, int numberInRule, int ruleSize, int slotIndex) {
-
-    String result = "";
-    WhiskRule whiskRule = (WhiskRule) rule;
-    boolean isMarkingItem = type == MLRuleItemType.FILLER && numberInPattern == 0;
-    ArrayList<String> constraints = new ArrayList<String>();
-
-    String anchor = null;
-
-    if (wordConstraint != null) {
-      if (wordConstraint.isRegExpConstraint()) {
-        anchor = wordConstraint.typeShortName();
-        if (!hideRegExp)
-          constraints.add("REGEXP(\"" + wordConstraint + "\")");
-      } else
-        anchor = wordConstraint.toString();
-    }
-
-    MLWhiskOtherConstraint anchorConstraint = null;
-    if (anchor == null) {
-      for (MLWhiskOtherConstraint c : otherConstraints)
-        if (c.canBeAnchorConstraint()) {
-          anchorConstraint = c;
-          break;
-        }
-    }
-
-    for (MLWhiskOtherConstraint oc : otherConstraints) {
-      if (oc != anchorConstraint) {
-        if (oc.canBeAnchorConstraint())
-          constraints.add("IS(" + oc + ")");
-        else
-          constraints.add("PARTOF(" + oc + ")");
-      }
-    }
-    if (anchor == null) {
-      if (anchorConstraint != null)
-        anchor = anchorConstraint.toString();
-      else
-        anchor = "ALL";
-    }
-
-    if (constraints.size() > 0) {
-      String cStr = "";
-      for (String constraintStr : constraints) {
-        if (cStr.length() > 0)
-          cStr += ", ";
-        cStr += constraintStr;
-      }
-      result += "{" + cStr;
-      if (!isMarkingItem)
-        result += "}";
-    }
-
-    if (isMarkingItem) {
-      if (constraints.size() == 0)
-        result += "{";
-      result += "->MARKONCE(" + whiskRule.getMarkName(slotIndex);
-      if (patternSize > 1)
-        result += ", " + (numberInRule + 1) + ", " + (numberInRule + patternSize);
-      result += ")}";
-    }
-    if (isStarWildCard) {
-      anchor += "*?";
-      if(anchor.equals("ALL*?")) {
-        anchor = "#";
-      }
-    }
-    return anchor + result;
-  }
-
-  public void setIsStarWildCard(boolean flag) {
-    isStarWildCard = flag;
-  }
-
-  public boolean isStarWildCard() {
-    return isStarWildCard;
-  }
-
-  public void setTermNumberInExample(int i) {
-    termNumberInExample = i;
-  }
-
-  public int getTermNumberInExample() {
-    return termNumberInExample;
-  }
-
-  public boolean equals(TextRulerRuleItem o) {
-    WhiskRuleItem it = (WhiskRuleItem) o;
-    if (wordConstraint != null)
-      if (!wordConstraint.equals(it.wordConstraint))
-        return false;
-
-    return isStarWildCard == it.isStarWildCard && termNumberInExample == it.termNumberInExample;
-  }
-
-  @Override
-  public String toString() {
-    return getStringForRuleString(null, null, 0, 0, 0, 0, 0);
-  }
-
-  public void setHideRegExp(boolean flag) {
-    hideRegExp = flag;
-  }
-
-  public void addOtherConstraint(MLWhiskOtherConstraint c) {
-    if (!otherConstraints.contains(c))
-      otherConstraints.add(c);
-  }
-
-  public List<MLWhiskOtherConstraint> getOtherConstraints() {
-    return otherConstraints;
-  }
-
-  public int constraintPoints() {
-    int result = 0;
-    if (wordConstraint != null)
-      result += hideRegExp ? 1 : 3; // a regexp constraint is less general
-    // so point it bad here!
-    result += otherConstraints.size();
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskTokenPreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskTokenPreferencePage.java
deleted file mode 100755
index cfccd4b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/whisk/token/WhiskTokenPreferencePage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * 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.ruta.textruler.learner.whisk.token;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.jface.preference.StringFieldEditor;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPreferencePage;

-

-public class WhiskTokenPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.preference.whisk.token";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public WhiskTokenPreferencePage() {

-    TextRulerLearnerController ctrl = TextRulerController

-            .getControllerForID("org.apache.uima.ruta.textruler.whisk.token");

-    this.algorithmController = ctrl;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  @Override

-  protected Control createContents(Composite parent) {

-    Composite top = new Composite(parent, SWT.LEFT);

-    top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    top.setLayout(new GridLayout());

-

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_INT_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, top);

-            fields.add(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            l.load();

-            break;

-          }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-    return top;

-  }

-

-  public void init(IWorkbench workbench) {

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/Wien.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/Wien.java
deleted file mode 100755
index 3671bc7..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/Wien.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/*
- * 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.ruta.textruler.learner.wien;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.TypeSystem;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerExample;
-import org.apache.uima.ruta.textruler.core.TextRulerExampleDocument;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-import org.apache.uima.ruta.textruler.core.TextRulerRulePattern;
-import org.apache.uima.ruta.textruler.core.TextRulerSlotPattern;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-
-public class Wien extends TextRulerBasicLearner {
-
-  TextRulerRulePattern hPattern;
-
-  TextRulerRulePattern tPattern;
-
-  Map<String, PatternPair> headTailCache = new HashMap<String, PatternPair>();
-
-  Map<String, List<TextRulerRulePattern>> interTupelSeparatorsCache = new HashMap<String, List<TextRulerRulePattern>>();
-
-  public static class PatternPair {
-    public TextRulerRulePattern l = new TextRulerRulePattern();
-
-    public TextRulerRulePattern r = new TextRulerRulePattern();
-  }
-
-  ArrayList<PatternPair> patternPairs = new ArrayList<PatternPair>();
-
-  WienRule theRule;
-
-  public enum constraint3ReturnType {
-    C3_SUCCESS, C3_L1CandidateSuffixError, C3_TailCandidateH_L1Error, C3_TailCandidateRK_PrefixError, C3_TailCandidateNotFoundError, C3_TailCandidateSucceedsL1InTailError, C3_L1CandidateInterTupleSeparatorSuffixError, C3_TailCandidatePrecedesL1InterTupleSeparatorError
-  };
-
-  public Wien(String inputDir, String prePropTmFile, String tmpDir, String[] slotNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    super(inputDir, prePropTmFile, tmpDir, slotNames, filterSet, skip, delegate);
-  }
-
-  @Override
-  public boolean collectNegativeCoveredInstancesWhenTesting() {
-    return false;
-  }
-
-  @Override
-  protected void doRun() {
-    TextRulerToolkit.log("-- WIEN START");
-
-    headTailCache.clear();
-    interTupelSeparatorsCache.clear();
-
-    for (int i = 0; i < slotNames.length; i++)
-      patternPairs.add(new PatternPair());
-
-    TextRulerTarget target = new TextRulerTarget(slotNames, this);
-
-    exampleDocuments.createExamplesForTarget(target); // new multislot
-    // target examples
-
-    for (TextRulerExample e : exampleDocuments.getAllPositiveExamples()) {
-      TextRulerToolkit.log("Example found: " + e);
-    }
-
-    try {
-      boolean allOk = true;
-      sendStatusUpdateToDelegate("Searching for right patterns...",
-              TextRulerLearnerState.ML_RUNNING, false);
-      if (!findRightPatterns())
-        allOk = false;
-      sendStatusUpdateToDelegate("Searching for left patterns...",
-              TextRulerLearnerState.ML_RUNNING, false);
-      if (!findLeftPatterns())
-        allOk = false;
-      sendStatusUpdateToDelegate("Searching for head, tail and left1 patterns...",
-              TextRulerLearnerState.ML_RUNNING, false);
-      if (!findHeadTailAndL1Patterns())
-        allOk = false;
-      // {
-      // String s = "";
-      // for (TextRulerRuleItem i : hPattern)
-      // s += " "+i;
-      // s += " ||||";
-      // for (TextRulerRuleItem i : patternPairs.get(0).l)
-      // s += " "+i;
-      // s += " ||||";
-      // for (TextRulerRuleItem i : tPattern)
-      // s += " "+i;
-      // TextRulerToolkit.log(s);
-      // }
-
-      if (allOk) {
-        sendStatusUpdateToDelegate("Building multi-slot rule.", TextRulerLearnerState.ML_RUNNING,
-                false);
-        theRule = new WienRule(this, target);
-        List<TextRulerSlotPattern> rPatterns = theRule.getPatterns();
-        int totalItemCount = 0;
-        for (int k = 0; k < slotNames.length; k++) {
-          WienRuleItem slotItem = new WienRuleItem((TextRulerAnnotation) null);
-          TextRulerSlotPattern rP = new TextRulerSlotPattern();
-          rPatterns.add(rP);
-          PatternPair p = patternPairs.get(k);
-          for (int i = 0; i < p.l.size(); i++) {
-            WienRuleItem item = (WienRuleItem) p.l.get(i);
-            if (k == 0 && i == 0) // the very first rule item:
-            {
-              item = item.copy();
-              // old version:
-              // item.addCondition("-NEAR,wien_tail,10000000,false");
-              item.addCondition("-AFTER(wien_tail)");
-              item.addCondition("-PARTOF(wien_rulemark)");
-            }
-            rP.preFillerPattern.add(item);
-            totalItemCount++;
-          }
-          rP.fillerPattern.add(slotItem.copy());
-          totalItemCount++;
-          for (int i = 0; i < p.r.size(); i++) {
-            WienRuleItem item = (WienRuleItem) p.r.get(i);
-            totalItemCount++;
-            if (k == slotNames.length - 1 && i == p.r.size() - 1) // the
-            // very
-            // last
-            // item
-            {
-              item = item.copy();
-              item.addAction("MARK(wien_rulemark, 1, " + totalItemCount + ")");
-            }
-            rP.postFillerPattern.add(item);
-          }
-          totalItemCount++; // the inter-slot ALL*? item has to be
-          // counted as well!
-        }
-        sendStatusUpdateToDelegate("Done", TextRulerLearnerState.ML_DONE, true);
-      } else
-        sendStatusUpdateToDelegate("Done - Not all patterns could be learned!",
-                TextRulerLearnerState.ML_DONE, true);
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-      sendStatusUpdateToDelegate("Aborted due to Exception!", TextRulerLearnerState.ML_ERROR, true);
-    }
-    headTailCache.clear();
-    interTupelSeparatorsCache.clear();
-    TextRulerToolkit.log("-- WIEN END");
-  }
-
-  protected boolean findRightPatterns() {
-    TextRulerExampleDocument doc = exampleDocuments.getDocuments().get(0);
-    boolean allFound = true;
-    for (int k = 0; k < slotNames.length; k++) {
-      List<TextRulerRulePattern> rightContexts = getRightContextForSlot(doc, k);
-      System.out.println(rightContexts.get(0));
-      int shortest = Integer.MAX_VALUE;
-      for (TextRulerRulePattern p : rightContexts)
-        shortest = p.size() < shortest ? p.size() : shortest;
-      boolean found = false;
-      for (int len = 1; len <= shortest; len++) {
-        TextRulerRulePattern subPattern = rightContexts.get(0).subPattern(0, len);
-        if (testConstraint1(subPattern, k)) {
-          // for (TextRulerRuleItem i : subPattern)
-          // ((WienRuleItem)i).getWordConstraint().setGeneralizeLinkMarkUp(true);
-          patternPairs.get(k).r = subPattern;
-          TextRulerToolkit.log("right " + k + ": " + subPattern);
-          found = true;
-          break;
-        }
-      }
-      if (!found)
-        allFound = false;
-    }
-    return allFound;
-  }
-
-  protected boolean findLeftPatterns() {
-    TextRulerExampleDocument doc = exampleDocuments.getDocuments().get(0);
-    // skip l 0 !
-    if (slotNames.length < 2)
-      return true;
-    boolean allFound = true;
-    for (int k = 1; k < slotNames.length; k++) {
-      List<TextRulerRulePattern> leftContexts = getLeftContextForSlot(doc, k);
-      int shortest = Integer.MAX_VALUE;
-      for (TextRulerRulePattern p : leftContexts)
-        shortest = p.size() < shortest ? p.size() : shortest;
-      TextRulerRulePattern sourcePattern = leftContexts.get(0);
-      boolean found = false;
-      for (int len = 1; len <= shortest; len++) {
-        // get suffix:
-        TextRulerRulePattern subPattern = sourcePattern.subPattern(sourcePattern.size() - len, len);
-        if (testConstraint2(subPattern, k)) {
-          patternPairs.get(k).l = subPattern;
-          for (TextRulerRuleItem i : subPattern)
-            ((WienRuleItem) i).getWordConstraint().setGeneralizeLinkMarkUp(true);
-          TextRulerToolkit.log("left " + k + ": " + subPattern);
-          found = true;
-          break;
-        }
-      }
-      if (!found)
-        allFound = false;
-    }
-    return allFound;
-  }
-
-  protected boolean findHeadTailAndL1Patterns() {
-    List<TextRulerExampleDocument> docs = exampleDocuments.getDocuments();
-    TextRulerExampleDocument doc0 = docs.get(0);
-    TextRulerRulePattern head = new TextRulerRulePattern();
-    TextRulerRulePattern tail = new TextRulerRulePattern();
-    getPageHeadAndTailPortion(doc0, head, tail);
-
-    final class HLCandidate {
-      public TextRulerRulePattern head = new TextRulerRulePattern();
-
-      public TextRulerRulePattern l1 = new TextRulerRulePattern();
-    }
-
-    // a small optimization:
-    // find out the maximum possible length for l1 in doc0 since l1 is much
-    // smaller than the possible head length!
-    List<TextRulerRulePattern> interTupleSeparators = getInterTupleSepatators(doc0);
-    int shortestL1 = head.size() - 1;
-    for (TextRulerRulePattern its : interTupleSeparators)
-      shortestL1 = its.size() < shortestL1 ? its.size() : shortestL1;
-
-    List<HLCandidate> hlCandidates = new ArrayList<HLCandidate>();
-    // create candidates for each separation of the head and tail patterns:
-    for (int separator = head.size() - 1; separator > 0; separator--) {
-      HLCandidate c = new HLCandidate();
-      for (int i = 0; i < head.size(); i++) {
-        if (i < separator)
-          c.head.add(head.get(i));
-        else {
-          WienRuleItem it = (WienRuleItem) head.get(i).copy();
-          it.getWordConstraint().setGeneralizeLinkMarkUp(true);
-          c.l1.add(it);
-        }
-      }
-      hlCandidates.add(c);
-      TextRulerToolkit.log(c.head.size() + " vs. " + c.l1.size());
-      if (c.l1.size() >= shortestL1)
-        break;
-    }
-
-    long total = 0;
-
-    // get total h l1 t combination count:
-    long tCand = (tail.size() * (tail.size() + 1)) / 2;
-    for (HLCandidate c : hlCandidates) {
-      total += ((c.head.size() - 1) * (c.head.size())) / 2;
-    }
-    total *= tCand;
-
-    long current = 0;
-    int oldPercent = -1;
-
-    for (HLCandidate c : hlCandidates) {
-      // for each "candidate" which represents a l1 suffix pattern of the
-      // head tokens and a rest pattern for the h pattern,
-      // we have to create every sub pattern of the remaining h pattern as
-      // a h candidate:
-      TextRulerRulePattern l1 = c.l1;
-      TextRulerRulePattern h = null;
-
-      boolean l1Sucks = false;
-
-      for (int endI = c.head.size() - 1; endI > 0; endI--) {
-        for (int startI = endI; startI > 0; startI--) {
-          h = new TextRulerRulePattern();
-          for (int i = startI; i <= endI; i++)
-            h.add(c.head.get(i));
-
-          // now for each h candidate we have to create each t
-          // candidate:
-          TextRulerRulePattern t = null;
-          for (int tstartI = 0; tstartI < tail.size(); tstartI++) {
-            for (int tendI = tstartI; tendI < tail.size(); tendI++) {
-              int percent = Math.round(((float) current * 100 / total));
-              if (percent != oldPercent) {
-                oldPercent = percent;
-                if (percent > 100)
-                  percent = 100;
-                // TextRulerToolkit.log(current+" / "+total);
-                sendStatusUpdateToDelegate("Testing C3, " + percent + "%",
-                        TextRulerLearnerState.ML_RUNNING, false);
-              }
-              if (shouldAbort())
-                return false;
-              current++;
-
-              t = new TextRulerRulePattern();
-              for (int i = tstartI; i <= tendI; i++)
-                t.add(tail.get(i));
-
-              // no we have a possible candidate triple: h, t and
-              // l1:
-
-              constraint3ReturnType c3Result = testConstraint3(h, t, l1);
-
-              if (c3Result == constraint3ReturnType.C3_SUCCESS) {
-                hPattern = h;
-                tPattern = t;
-                patternPairs.get(0).l = l1;
-                return true;
-              } else if (c3Result == constraint3ReturnType.C3_L1CandidateSuffixError
-                      || c3Result == constraint3ReturnType.C3_L1CandidateInterTupleSeparatorSuffixError) {
-                l1Sucks = true;
-                current += tail.size() - tendI - 1;
-                break;
-              } else if (c3Result == constraint3ReturnType.C3_TailCandidateH_L1Error
-                      || c3Result == constraint3ReturnType.C3_TailCandidateSucceedsL1InTailError) {
-                // no special pruning options here... we simply
-                // have to test the next t-candidate
-              } else if (c3Result == constraint3ReturnType.C3_TailCandidateRK_PrefixError
-                      || c3Result == constraint3ReturnType.C3_TailCandidateNotFoundError) {
-                // all candidates with the same start item are
-                // bad, so leave this inner loop:
-                current += tail.size() - tendI - 1;
-                break;
-              } else if (c3Result == constraint3ReturnType.C3_TailCandidatePrecedesL1InterTupleSeparatorError) {
-                // this is a problematic case... the cause could
-                // be L1 or the current Tail pattern,
-                // so we can't do nothing about it! just try the
-                // next t-candidate
-              }
-            }
-            if (l1Sucks) {
-              current += (tail.size() - tstartI - 1) * (tail.size() - tstartI) / 2;
-              break;
-            }
-          }
-          if (l1Sucks) {
-            if (startI > 0)
-              current += (startI - 1) * tCand;
-            break;
-          }
-        }
-        if (l1Sucks) {
-          current += (endI * (endI + 1) / 2) * tCand;
-          break;
-        }
-      }
-    }
-    return false;
-  }
-
-  protected void getPageHeadAndTailPortion(TextRulerExampleDocument doc, TextRulerRulePattern head,
-          TextRulerRulePattern tail) {
-    String key = doc.getCasFileName();
-    if (headTailCache.containsKey(key)) {
-      PatternPair p = headTailCache.get(key);
-      head.addAll(p.l);
-      tail.addAll(p.r);
-    } else {
-      CAS cas = doc.getCAS();
-      TextRulerExample firstExample = doc.getPositiveExamples().get(0);
-      TextRulerExample lastExample = doc.getPositiveExamples().get(
-              doc.getPositiveExamples().size() - 1);
-      TypeSystem ts = cas.getTypeSystem();
-      Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
-      List<AnnotationFS> headTokens = TextRulerToolkit.getAnnotationsBeforePosition(cas,
-              firstExample.getAnnotations()[0].getBegin(), 0, TextRulerToolkit
-                      .getFilterSetWithSlotNames(slotNames, filterSet), tokenType);
-      TextRulerAnnotation[] lastExampleAnnotations = lastExample.getAnnotations();
-      List<AnnotationFS> tailTokens = TextRulerToolkit.getAnnotationsAfterPosition(cas,
-              lastExampleAnnotations[lastExampleAnnotations.length - 1].getEnd(), 0,
-              TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokenType);
-      for (AnnotationFS afs : headTokens)
-        head.add(new WienRuleItem(new TextRulerAnnotation(afs, doc)));
-      for (AnnotationFS afs : tailTokens)
-        tail.add(new WienRuleItem(new TextRulerAnnotation(afs, doc)));
-      PatternPair p = new PatternPair();
-      p.l.addAll(head);
-      p.r.addAll(tail);
-      headTailCache.put(key, p);
-    }
-  }
-
-  protected List<TextRulerRulePattern> getInterTupleSepatators(TextRulerExampleDocument doc) {
-    String key = doc.getCasFileName();
-    if (interTupelSeparatorsCache.containsKey(key)) {
-      return interTupelSeparatorsCache.get(key);
-    } else {
-      List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
-      CAS cas = doc.getCAS();
-      TypeSystem ts = cas.getTypeSystem();
-      Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
-      List<TextRulerExample> examples = doc.getPositiveExamples();
-      for (int i = 0; i < examples.size() - 1; i++) {
-        // get separator between i'th and (i+1)'th example:
-        TextRulerAnnotation[] exampleAnnotations1 = examples.get(i).getAnnotations();
-        TextRulerAnnotation[] exampleAnnotations2 = examples.get(i + 1).getAnnotations();
-        TextRulerAnnotation lastOf1 = exampleAnnotations1[exampleAnnotations1.length - 1];
-        TextRulerAnnotation firstOf2 = exampleAnnotations2[0];
-        List<AnnotationFS> theTokens = TextRulerToolkit.getAnnotationsWithinBounds(cas, lastOf1
-                .getEnd(), firstOf2.getBegin(), TextRulerToolkit.getFilterSetWithSlotNames(
-                slotNames, filterSet), tokenType);
-        TextRulerRulePattern thePattern = new TextRulerRulePattern();
-        for (AnnotationFS afs : theTokens)
-          thePattern.add(new WienRuleItem(new TextRulerAnnotation(afs, doc)));
-        if (thePattern.size() > 0)
-          result.add(thePattern);
-
-      }
-      interTupelSeparatorsCache.put(key, result);
-      return result;
-    }
-  }
-
-  protected List<TextRulerRulePattern> getRightContextForSlot(TextRulerExampleDocument doc,
-          int slotIndex) {
-    List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
-    CAS cas = doc.getCAS();
-    TypeSystem ts = cas.getTypeSystem();
-    Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
-    List<TextRulerExample> examples = doc.getPositiveExamples();
-    boolean isLastSlot = slotIndex >= slotNames.length - 1;
-    for (int ei = 0; ei < examples.size(); ei++) {
-      boolean isLastExample = ei == examples.size() - 1;
-      TextRulerExample e = examples.get(ei);
-      // get stuff between slot slotIndex and slotIndex+1
-      TextRulerAnnotation slotAnnotation = e.getAnnotations()[slotIndex];
-      TextRulerAnnotation nextSlotAnnotation;
-
-      if (!isLastSlot)
-        nextSlotAnnotation = e.getAnnotations()[slotIndex + 1];
-      else {
-        if (!isLastExample) // the next slot annotation is the first
-          // example annotation of the next template:
-          nextSlotAnnotation = examples.get(ei + 1).getAnnotations()[0];
-        else
-          nextSlotAnnotation = null;
-      }
-
-      List<AnnotationFS> theTokens;
-      if (nextSlotAnnotation == null)
-        theTokens = TextRulerToolkit.getAnnotationsAfterPosition(cas, slotAnnotation.getEnd(), 0,
-                TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokenType);
-      else
-        theTokens = TextRulerToolkit.getAnnotationsWithinBounds(cas, slotAnnotation.getEnd(),
-                nextSlotAnnotation.getBegin(), TextRulerToolkit.getFilterSetWithSlotNames(
-                        slotNames, filterSet), tokenType);
-      TextRulerRulePattern thePattern = new TextRulerRulePattern();
-      for (AnnotationFS afs : theTokens)
-        thePattern.add(new WienRuleItem(new TextRulerAnnotation(afs, doc)));
-      if (thePattern.size() > 0)
-        result.add(thePattern);
-    }
-    return result;
-  }
-
-  protected List<TextRulerRulePattern> getLeftContextForSlot(TextRulerExampleDocument doc,
-          int slotIndex) {
-    if (slotIndex == 0)
-      return null;
-    List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
-    CAS cas = doc.getCAS();
-    TypeSystem ts = cas.getTypeSystem();
-    Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
-    List<TextRulerExample> examples = doc.getPositiveExamples();
-
-    boolean isFirstSlot = slotIndex == 0;
-    for (int ei = 0; ei < examples.size(); ei++) {
-      boolean isFirstExample = ei == 0;
-      TextRulerExample e = examples.get(ei);
-      // get stuff between slot slotIndex and slotIndex+1
-      TextRulerAnnotation slotAnnotation = e.getAnnotations()[slotIndex];
-      TextRulerAnnotation prevSlotAnnotation;
-
-      if (!isFirstSlot)
-        prevSlotAnnotation = e.getAnnotations()[slotIndex - 1];
-      else {
-        if (!isFirstExample)
-          prevSlotAnnotation = examples.get(ei - 1).getAnnotations()[slotNames.length - 1];
-        else
-          prevSlotAnnotation = null;
-      }
-
-      List<AnnotationFS> theTokens;
-      if (prevSlotAnnotation == null)
-        theTokens = TextRulerToolkit.getAnnotationsBeforePosition(cas, slotAnnotation.getBegin(),
-                0, TextRulerToolkit.getFilterSetWithSlotNames(slotNames, filterSet), tokenType);
-      else
-        theTokens = TextRulerToolkit.getAnnotationsWithinBounds(cas, prevSlotAnnotation.getEnd(),
-                slotAnnotation.getBegin(), TextRulerToolkit.getFilterSetWithSlotNames(slotNames,
-                        filterSet), tokenType);
-      TextRulerRulePattern thePattern = new TextRulerRulePattern();
-      for (AnnotationFS afs : theTokens)
-        thePattern.add(new WienRuleItem(new TextRulerAnnotation(afs, doc), true));
-      if (thePattern.size() > 0)
-        result.add(thePattern);
-    }
-    return result;
-  }
-
-  protected List<TextRulerRulePattern> getSlotFillerPatterns(TextRulerExampleDocument doc,
-          int slotIndex) {
-    List<TextRulerRulePattern> result = new ArrayList<TextRulerRulePattern>();
-    CAS cas = doc.getCAS();
-    TypeSystem ts = cas.getTypeSystem();
-    Type tokenType = ts.getType(TextRulerToolkit.RUTA_ALL_TYPE_NAME);
-    List<TextRulerExample> examples = doc.getPositiveExamples();
-    for (TextRulerExample e : examples) {
-      TextRulerAnnotation slotAnnotation = e.getAnnotations()[slotIndex];
-      List<AnnotationFS> theTokens = TextRulerToolkit.getAnnotationsWithinBounds(cas,
-              slotAnnotation.getBegin(), slotAnnotation.getEnd(), TextRulerToolkit
-                      .getFilterSetWithSlotNames(slotNames, filterSet), tokenType);
-      TextRulerRulePattern thePattern = new TextRulerRulePattern();
-      for (AnnotationFS afs : theTokens)
-        thePattern.add(new WienRuleItem(new TextRulerAnnotation(afs, doc)));
-      if (thePattern.size() > 0)
-        result.add(thePattern);
-    }
-    return result;
-  }
-
-  protected constraint3ReturnType testConstraint3(TextRulerRulePattern h, TextRulerRulePattern t,
-          TextRulerRulePattern l1) {
-    for (TextRulerExampleDocument doc : exampleDocuments.getDocuments()) {
-      constraint3ReturnType r = testConstraint3(doc, h, t, l1);
-      if (r != constraint3ReturnType.C3_SUCCESS)
-        return r;
-    }
-    return constraint3ReturnType.C3_SUCCESS;
-  }
-
-  protected boolean testConstraint1(TextRulerExampleDocument doc, TextRulerRulePattern rk, int k) {
-    List<TextRulerRulePattern> rightContexts = getRightContextForSlot(doc, k);
-    for (TextRulerRulePattern rx : rightContexts) {
-      if (rx.find(rk) != 0)
-        return false;
-    }
-    List<TextRulerRulePattern> contents = getSlotFillerPatterns(doc, k);
-    for (TextRulerRulePattern c : contents) {
-      if (c.find(rk) >= 0)
-        return false;
-    }
-
-    return true;
-  }
-
-  protected boolean testConstraint1(TextRulerRulePattern rk, int k) {
-    for (TextRulerExampleDocument doc : exampleDocuments.getDocuments()) {
-      if (!testConstraint1(doc, rk, k))
-        return false;
-    }
-    return true;
-  }
-
-  protected boolean testConstraint2(TextRulerExampleDocument doc, TextRulerRulePattern lk, int k) {
-    List<TextRulerRulePattern> leftContexts = getLeftContextForSlot(doc, k);
-    for (TextRulerRulePattern lx : leftContexts) {
-      if (lx.size() < lk.size())
-        return false;
-      int pos = lx.find(lk);
-      if (pos < 0 || pos != lx.size() - lk.size())
-        return false;
-    }
-    return true;
-  }
-
-  protected boolean testConstraint2(TextRulerRulePattern lk, int k) {
-    for (TextRulerExampleDocument doc : exampleDocuments.getDocuments()) {
-      if (!testConstraint2(doc, lk, k))
-        return false;
-    }
-    return true;
-  }
-
-  protected constraint3ReturnType testConstraint3(TextRulerExampleDocument doc,
-          TextRulerRulePattern h, TextRulerRulePattern t, TextRulerRulePattern l1) {
-    final boolean logReasons = false;
-
-    TextRulerRulePattern head = new TextRulerRulePattern();
-    TextRulerRulePattern tail = new TextRulerRulePattern();
-
-    getPageHeadAndTailPortion(doc, head, tail);
-
-    // 1: l1 must be a proper suffix of the portion between the end of h and
-    // the first slot filler:
-    // (head / h) / l1 = l1
-
-    int hPos = head.find(h);
-
-    // TOOD precalculate this outside this method ?
-    TextRulerRulePattern restForL1 = head.subPattern(hPos + h.size(), -1).copy();
-    for (TextRulerRuleItem it : restForL1)
-      ((WienRuleItem) it).getWordConstraint().setGeneralizeLinkMarkUp(true);
-    int l1Pos = restForL1.find(l1);
-    if (l1Pos < 0 || l1Pos != restForL1.size() - l1.size()) {
-      TextRulerToolkit.logIf(logReasons, "REASON 1\n\tl1         \t" + l1 + "\n\trestforl1\t"
-              + restForL1);
-      return constraint3ReturnType.C3_L1CandidateSuffixError;
-    }
-
-    // 2: t must not occur in the subpattern after h and before l1
-    if (l1Pos > 0) {
-      TextRulerRulePattern patternBetweenHandL1 = restForL1.subPattern(0, l1Pos);
-      if (patternBetweenHandL1.size() >= t.size()) {
-        if (patternBetweenHandL1.find(t) >= 0) {
-          TextRulerToolkit.logIf(logReasons, "REASON 2");
-          return constraint3ReturnType.C3_TailCandidateH_L1Error;
-        }
-      }
-    }
-
-    // 2a: addons, not specified in WIEN paper !!
-    TextRulerRulePattern lastSlotRightPattern = patternPairs.get(slotNames.length - 1).r;
-    if (t.find(lastSlotRightPattern) == 0) // the right boundary of the last
-    // slot may not be part of the
-    // tail pattern!
-    {
-      TextRulerToolkit.logIf(logReasons, "REASON 3: " + lastSlotRightPattern + "\tTail: " + t);
-      return constraint3ReturnType.C3_TailCandidateRK_PrefixError;
-    }
-
-    int tPos = tail.find(t);
-    if (tPos < 0) {
-      TextRulerToolkit.logIf(logReasons, "REASON 4");
-      return constraint3ReturnType.C3_TailCandidateNotFoundError;
-    } // this is an own constraint definition: if a document does not have
-    // the tail in it,
-    // what should we do then ? is this a n error or is this okay since the
-    // document may not have any tail after the data ?
-
-    // 3: l1 must not precede t in the page's tail:
-    int l1tPos = tail.find(l1);
-    if (l1tPos >= 0) // l1 occurs in the page's tail:
-    {
-      if (l1tPos < tPos) {
-        TextRulerToolkit.logIf(logReasons, "REASON 5");
-        return constraint3ReturnType.C3_TailCandidateSucceedsL1InTailError;
-      }
-    }
-
-    List<TextRulerRulePattern> interTupleSeparators = getInterTupleSepatators(doc);
-
-    for (TextRulerRulePattern itSep : interTupleSeparators) {
-      // 4: l1 must be a proper suffix of each of the inter-tuple
-      // separators:
-      TextRulerRulePattern itSepCopy = itSep.copy();
-      for (TextRulerRuleItem it : itSepCopy)
-        ((WienRuleItem) it).getWordConstraint().setGeneralizeLinkMarkUp(true);
-      int l1itsPos = itSepCopy.find(l1);
-      if (l1itsPos < 0 || l1itsPos != itSepCopy.size() - l1.size()) {
-        TextRulerToolkit.logIf(logReasons, "REASON 6: \n\tl1\t" + l1 + "\n\titSep\t" + itSep);
-        return constraint3ReturnType.C3_L1CandidateInterTupleSeparatorSuffixError;
-      }
-
-      // 5: t must never precede l1 in any inter-tuple separator:
-      int itstPos = itSep.find(t);
-      if (itstPos >= 0 && itstPos < l1itsPos) {
-        TextRulerToolkit.logIf(logReasons, "REASON 7");
-        return constraint3ReturnType.C3_TailCandidatePrecedesL1InterTupleSeparatorError;
-      }
-
-    }
-    return constraint3ReturnType.C3_SUCCESS;
-  }
-
-  public String getResultString() {
-    if (theRule == null)
-      return "<no results yet>";
-    String result = getFileHeaderString(true) + "DECLARE wien_tail;\n" + "DECLARE wien_rulemark;\n"
-            + "DECLARE wien_content;\n" + "BOOLEAN wien_redo;\n\n"
-            + "// tail/head/content area stuff:\n";
-
-    TextRulerRulePattern hCopy = hPattern.copy();
-
-    ((WienRuleItem) hCopy.get(0)).addCondition("-PARTOF(wien_content)");
-    result += hCopy + " ALL*?{->MARK(wien_content)};\n";
-
-    TextRulerRulePattern tCopy = tPattern.copy();
-    ((WienRuleItem) tCopy.get(0)).addCondition("PARTOF(wien_content)");
-
-    result += tCopy + "{->MARK(wien_tail";
-    if (tPattern.size() > 1)
-      result += ", 1, " + tPattern.size();
-    result += ")};\n\n";
-
-    result += "BLOCK(findData) wien_content {\n"
-            + "\t// find out if tail is before the next occurence of l1\n"
-            + "\t"
-            + theRule.getRuleString()
-            + "\n"
-            + "\tDocument{->ASSIGN(wien_redo, false)};\n"
-            + "\twien_tail{PARTOF(wien_rulemark)->UNMARK(wien_tail), ASSIGN(wien_redo, true)}; // remove tail marks that are no longer relevant for us after the last rule !\n"
-            + "\tDocument{IF(wien_redo)->CALL(filename.findData)};\n" + "}\n";
-
-    result += "\n// cleaning up:\n" + "wien_tail{->UNMARK(wien_tail)};\n"
-            + "wien_rulemark{->UNMARK(wien_rulemark)};\n"
-            + "wien_content{->UNMARK(wien_content)};\n";
-    return result;
-  }
-
-  public void setParameters(Map<String, Object> params) {
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienFactory.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienFactory.java
deleted file mode 100755
index 6bd4833..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.ruta.textruler.learner.wien;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerDelegate;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;
-
-public class WienFactory implements TextRulerLearnerFactory {
-
-  public TextRulerLearner createAlgorithm(String inputFolderPath, String additionalFolderPath,
-          String preprocessorTMfile, String tempFolderPath, String[] fullSlotTypeNames,
-          Set<String> filterSet, boolean skip, TextRulerLearnerDelegate delegate) {
-    return new Wien(inputFolderPath, preprocessorTMfile, tempFolderPath, fullSlotTypeNames,
-            filterSet, skip,delegate);
-  }
-
-  public Map<String, Object> getAlgorithmParameterStandardValues() {
-    return new HashMap<String, Object>();
-  }
-
-  public TextRulerLearnerParameter[] getAlgorithmParameters() {
-    TextRulerLearnerParameter[] result = new TextRulerLearnerParameter[0];
-    return result;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienRule.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienRule.java
deleted file mode 100755
index 0f66144..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienRule.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.ruta.textruler.learner.wien;
-
-import org.apache.uima.ruta.textruler.core.TextRulerBasicLearner;
-import org.apache.uima.ruta.textruler.core.TextRulerMultiSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerTarget;
-
-public class WienRule extends TextRulerMultiSlotRule {
-
-  public WienRule(TextRulerBasicLearner parentAlgorithm, TextRulerTarget target) {
-    super(parentAlgorithm, target);
-  }
-
-  public WienRule(WienRule copyFrom) {
-    super(copyFrom);
-  }
-
-  @Override
-  public WienRule copy() {
-    return new WienRule(this);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienRuleItem.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienRuleItem.java
deleted file mode 100755
index 04f6d67..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienRuleItem.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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.ruta.textruler.learner.wien;
-
-import java.util.ArrayList;
-
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerMultiSlotRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRule;
-import org.apache.uima.ruta.textruler.core.TextRulerRuleItem;
-
-public class WienRuleItem implements TextRulerRuleItem {
-
-  WienWordConstraint wordConstraint;
-
-  ArrayList<String> conditions = new ArrayList<String>();
-
-  ArrayList<String> actions = new ArrayList<String>();
-
-  public WienRuleItem(WienRuleItem copyFrom) {
-    super();
-    if (copyFrom.wordConstraint != null)
-      wordConstraint = copyFrom.wordConstraint.copy();
-  }
-
-  public WienRuleItem(TextRulerAnnotation tokenAnnotation, boolean generalizeLinkMarkUp) {
-    super();
-    if (tokenAnnotation != null)
-      setWordConstraint(tokenAnnotation, generalizeLinkMarkUp);
-  }
-
-  public WienRuleItem(TextRulerAnnotation tokenAnnotation) {
-    super();
-    if (tokenAnnotation != null)
-      setWordConstraint(tokenAnnotation);
-  }
-
-  public WienRuleItem copy() {
-    return new WienRuleItem(this);
-  }
-
-  @Override
-  public int hashCode() {
-    return toString().hashCode();
-  }
-
-  public boolean equals(TextRulerRuleItem o) {
-    return toString().equals(((WienRuleItem) o).toString());
-  }
-
-  @Override
-  public String toString() {
-    return getStringForRuleString(null, null, 0, 0, 0, 0, 0);
-  }
-
-  public void addAction(String s) {
-    actions.add(s);
-  }
-
-  public void addCondition(String s) {
-    conditions.add(s);
-  }
-
-  public String getStringForRuleString(TextRulerRule rule, MLRuleItemType type,
-          int numberInPattern, int patternSize, int numberInRule, int ruleSize, int slotIndex) {
-
-    ArrayList<String> theConditions = new ArrayList<String>();
-    String anchor = null;
-    if (wordConstraint != null) {
-      if (wordConstraint.isRegExpConstraint()) {
-        anchor = wordConstraint.typeShortName();
-        theConditions.add("REGEXP(\"" + wordConstraint + "\")");
-      } else
-        anchor = wordConstraint.toString();
-    } else
-      anchor = "ALL*?";
-
-    theConditions.addAll(conditions);
-    String cStr = "";
-    if (theConditions.size() > 0) {
-      for (String c : theConditions) {
-        if (cStr.length() > 0)
-          cStr += ", ";
-        cStr += c;
-      }
-      cStr = "{" + cStr;
-    }
-
-    ArrayList<String> theActions = new ArrayList<String>();
-    if (type == MLRuleItemType.FILLER)
-      theActions.add("MARKONCE(" + ((TextRulerMultiSlotRule) rule).getMarkName(slotIndex) + ")");
-    // theActions.add("MARK, "+((TextRulerMultiSlotRule)rule).getMarkName(slotIndex)+", "+(numberInRule+1));
-    theActions.addAll(actions);
-    String aStr = "";
-    if (theActions.size() > 0) {
-      for (String a : theActions) {
-        if (aStr.length() > 0)
-          aStr += ", ";
-        aStr += a;
-      }
-      if (theConditions.size() == 0)
-        aStr = "{->" + aStr + "}";
-      else
-        aStr = "->" + aStr + "}";
-    } else if (theConditions.size() != 0)
-      aStr = "}";
-
-    return anchor + cStr + aStr;
-  }
-
-  public void setWordConstraint(TextRulerAnnotation tokenAnnotation, boolean generalizeLinkMarkUp) {
-    WienWordConstraint c = new WienWordConstraint(tokenAnnotation);
-    c.setGeneralizeLinkMarkUp(generalizeLinkMarkUp);
-    setWordConstraint(c);
-  }
-
-  public void setWordConstraint(TextRulerAnnotation tokenAnnotation) {
-    setWordConstraint(new WienWordConstraint(tokenAnnotation));
-  }
-
-  public void setWordConstraint(WienWordConstraint c) {
-    wordConstraint = c;
-  }
-
-  public WienWordConstraint getWordConstraint() {
-    return wordConstraint;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienWordConstraint.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienWordConstraint.java
deleted file mode 100755
index 775db7e..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/wien/WienWordConstraint.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.ruta.textruler.learner.wien;
-
-import org.apache.uima.ruta.textruler.core.TextRulerAnnotation;
-import org.apache.uima.ruta.textruler.core.TextRulerWordConstraint;
-
-public class WienWordConstraint extends TextRulerWordConstraint {
-
-  protected boolean generalizeLinkMarkUp;
-
-  public WienWordConstraint(TextRulerAnnotation tokenAnnotation) {
-    super(tokenAnnotation);
-    generalizeLinkMarkUp = false;
-  }
-
-  public WienWordConstraint(WienWordConstraint copyFrom) {
-    super(copyFrom);
-    generalizeLinkMarkUp = copyFrom.generalizeLinkMarkUp;
-  }
-
-  @Override
-  public WienWordConstraint copy() {
-    return new WienWordConstraint(this);
-  }
-
-  public void setGeneralizeLinkMarkUp(boolean b) {
-    generalizeLinkMarkUp = b;
-  }
-
-  @Override
-  public String toString() {
-    if (isRegExpConstraint()) {
-      String theText = tokenAnnotation.getCoveredText();
-      if (generalizeLinkMarkUp && typeShortName().equals("MARKUP")
-              && (theText.startsWith("<a") || theText.startsWith("<A"))) {
-        // special case for A HREF stuff, since hrefs are often
-        // different but the struct is the same!
-        // this is quick hack that should be configurable, but for now
-        // it works!
-        return theText.substring(0, 2) + ".*>";
-      } else
-        return super.toString();
-    } else
-      return super.toString();
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/AlgorithmPreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/AlgorithmPreferencePage.java
deleted file mode 100755
index c108117..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/AlgorithmPreferencePage.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*

- * 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.ruta.textruler.preferences;

-

-import java.util.ArrayList;

-import java.util.Map;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.eclipse.jface.preference.BooleanFieldEditor;

-import org.eclipse.jface.preference.FieldEditor;

-import org.eclipse.jface.preference.FieldEditorPreferencePage;

-import org.eclipse.jface.preference.IPreferencePage;

-import org.eclipse.jface.preference.IPreferenceStore;

-import org.eclipse.jface.preference.StringFieldEditor;

-

-public class AlgorithmPreferencePage extends FieldEditorPreferencePage implements IPreferencePage {

-

-  public static String ID = "org.apache.uima.ruta.textruler.algorithmPages";

-

-  private TextRulerLearnerController algorithmController;

-

-  private IPreferenceStore store;

-

-  private ArrayList<FieldEditor> fields = new ArrayList<FieldEditor>();

-

-  public AlgorithmPreferencePage(TextRulerLearnerController algorithmController) {

-    super(FieldEditorPreferencePage.GRID);

-    this.algorithmController = algorithmController;

-    store = TextRulerPlugin.getDefault().getPreferenceStore();

-    setPreferenceStore(store);

-  }

-

-  protected void createFieldEditors() {

-    TextRulerLearnerFactory f = algorithmController.getFactory();

-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();

-    Map<String, Object> values = f.getAlgorithmParameterStandardValues();

-    if (params != null) {

-      for (int i = 0; i < params.length; i++) {

-        TextRulerLearnerParameter p = params[i];

-        String id = algorithmController.getID() + "." + p.id;

-        FieldEditor l = null;

-        switch (p.type) {

-          case ML_BOOL_PARAM: {

-            l = new BooleanFieldEditor(id, p.name, getFieldEditorParent());

-            fields.add(l);

-            addField(l);

-            store.setDefault(id, (Boolean) values.get(p.id));

-            l.setPreferenceStore(store);

-            break;

-          }

-

-          case ML_FLOAT_PARAM:

-          case ML_DOUBLE_PARAM:

-          case ML_INT_PARAM:

-          case ML_STRING_PARAM: {

-            l = new StringFieldEditor(id, p.name, getFieldEditorParent());

-            fields.add(l);

-            addField(l);

-            store.setDefault(id, values.get(p.id).toString());

-            l.setPreferenceStore(store);

-            break;

-          }

-          // case ML_SELECT_PARAM: {

-          // Combo combo = new Combo(top, SWT.READ_ONLY);

-          // if (p.selectValues != null)

-          // for (MLParameterSelectValue v : p.selectValues) {

-          // combo.add(v.name);

-          // }

-          // c = combo;

-          // break;

-          // }

-          case ML_SELECT_PARAM:

-            break;

-        }

-      }

-    }

-  }

-

-  @Override

-  protected void performDefaults() {

-    for (FieldEditor f : fields)

-      f.loadDefault();

-    // super.performDefaults();

-  }

-

-  @Override

-  public boolean performOk() {

-    for (FieldEditor f : fields)

-      f.store();

-    // return super.performOk();

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/ConfigPreferencePage.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/ConfigPreferencePage.java
deleted file mode 100755
index 17101ae..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/ConfigPreferencePage.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.ruta.textruler.preferences;
-
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-public class ConfigPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
-  public static String ID = "org.apache.uima.ruta.textruler.config";
-  private BooleanFieldEditor removeBasics;
-  private BooleanFieldEditor lowMemoryProfile;
-  private IntegerFieldEditor maxErrorRate;
-  private IntegerFieldEditor casCache;
-
-
-  public ConfigPreferencePage() {
-    setPreferenceStore(TextRulerPlugin.getDefault().getPreferenceStore());
-    setDescription("General settings for the different TextRuler methods.");
-  }
-
-  public void init(IWorkbench workbench) {
-
-  }
-
-  @Override
-  protected void createFieldEditors() {
-    removeBasics = new BooleanFieldEditor(TextRulerPreferences.REMOVE_BASICS,
-            "Remove basic annotations after testing rules.", getFieldEditorParent());
-    addField(removeBasics);
-
-    lowMemoryProfile = new BooleanFieldEditor(TextRulerPreferences.LOW_MEMORY_PROFILE,
-            "Use low memory profile.", getFieldEditorParent());
-    addField(lowMemoryProfile);
-    
-    maxErrorRate = new IntegerFieldEditor(TextRulerPreferences.MAX_ERROR_RATE,
-            "Maximum error rate during testing.", getFieldEditorParent());
-    addField(maxErrorRate);
-    
-    casCache = new IntegerFieldEditor(TextRulerPreferences.CAS_CACHE,
-            "CAS cache size.", getFieldEditorParent());
-    addField(casCache);
-    
-  }
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/TextRulerPreferenceInitializer.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/TextRulerPreferenceInitializer.java
deleted file mode 100644
index 1ba5409..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/TextRulerPreferenceInitializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * 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.ruta.textruler.preferences;

-

-import java.util.List;

-import java.util.Map;

-import java.util.Map.Entry;

-import java.util.Set;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;

-import org.eclipse.jface.preference.IPreferenceStore;

-

-public class TextRulerPreferenceInitializer extends AbstractPreferenceInitializer {

-

-  public TextRulerPreferenceInitializer() {

-  }

-

-  public void initializeDefaultPreferences() {

-    IPreferenceStore store = TextRulerPlugin.getDefault().getPreferenceStore();

-    store.setDefault(TextRulerPreferences.REMOVE_BASICS, true);

-    store.setDefault(TextRulerPreferences.LOW_MEMORY_PROFILE, false);

-    store.setDefault(TextRulerPreferences.MAX_ERROR_RATE, 10);

-    store.setDefault(TextRulerPreferences.CAS_CACHE, 50);

-    

-    List<TextRulerLearnerController> availableControllers = TextRulerController.getAvailableControllers();

-    for (TextRulerLearnerController each : availableControllers) {

-      String id = each.getID();

-      Map<String, Object> defaultValues = each.getFactory().getAlgorithmParameterStandardValues();

-      Set<Entry<String,Object>> entrySet = defaultValues.entrySet();

-      for (Entry<String, Object> entry : entrySet) {

-        String key = id + "." + entry.getKey();

-        Object value = entry.getValue();

-        if(value instanceof Integer) {

-          store.setDefault(key, (Integer) value);

-        } else if(value instanceof Double) {

-          store.setDefault(key, (Double) value);

-        } else if(value instanceof Float) {

-          store.setDefault(key, (Float) value);

-        } else if(value instanceof Boolean) {

-          store.setDefault(key, (Boolean) value);

-        } else if(value instanceof String) {

-          store.setDefault(key, (String) value);

-        }

-      }

-    }

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/TextRulerPreferences.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/TextRulerPreferences.java
deleted file mode 100644
index e334468..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/preferences/TextRulerPreferences.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * 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.ruta.textruler.preferences;

-

-public class TextRulerPreferences {

-

-  public static final String LOW_MEMORY_PROFILE =  ConfigPreferencePage.ID + ".lowMemoryProfile";

-  public static final String REMOVE_BASICS = ConfigPreferencePage.ID + ".removeBasics";

-  public static final String MAX_ERROR_RATE = ConfigPreferencePage.ID + ".maxErrorRate";

-  public static final String CAS_CACHE = ConfigPreferencePage.ID + ".casCache";

-  

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/MemoryWatch.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/MemoryWatch.java
deleted file mode 100755
index 536eddf..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/tools/MemoryWatch.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.ruta.textruler.tools;
-
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-
-public class MemoryWatch {
-
-  private static long lastFreeMemory = 0;
-
-  private static long lastTotalMemory = 0;
-
-  private static long count = 0;
-
-  private static long lastFreeMemAfterGuessedGC = 0;
-
-  public static synchronized void watch() {
-    long free = Runtime.getRuntime().freeMemory();
-    long total = Runtime.getRuntime().totalMemory();
-    long max = Runtime.getRuntime().maxMemory();
-    long used = total - free;
-
-    boolean show = total != lastTotalMemory || (count % 5000 == 0);
-
-    if (total == max) {
-      if (free > lastFreeMemory && free != lastFreeMemAfterGuessedGC) // gc
-      // seemd
-      // to
-      // clean
-      // up
-      // the
-      // memory
-      {
-
-        lastFreeMemAfterGuessedGC = free;
-        show = true;
-      }
-    }
-
-    if (show) {
-      TextRulerToolkit.log(count + "\tfree: " + free + "\ttotal: " + total + "\tused: " + used
-              + "\tmax: " + max + "\tfreeAfterGC: " + lastFreeMemAfterGuessedGC);
-    }
-    lastFreeMemory = free;
-    lastTotalMemory = total;
-    count++;
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/AddRemoveList.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/AddRemoveList.java
deleted file mode 100755
index 260dbe2..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/AddRemoveList.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*

- * 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.ruta.textruler.ui;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.List;

-

-import org.apache.commons.lang3.StringUtils;

-import org.apache.uima.UIMAFramework;

-import org.apache.uima.resource.metadata.TypeDescription;

-import org.apache.uima.resource.metadata.TypeSystemDescription;

-import org.apache.uima.ruta.ide.core.builder.RutaProjectUtils;

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;

-import org.apache.uima.util.InvalidXMLException;

-import org.apache.uima.util.XMLInputSource;

-import org.apache.uima.util.XMLizable;

-import org.eclipse.core.runtime.CoreException;

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.core.runtime.Path;

-import org.eclipse.core.runtime.Status;

-import org.eclipse.jface.dialogs.ErrorDialog;

-import org.eclipse.jface.viewers.CheckboxTableViewer;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.StructuredSelection;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.KeyAdapter;

-import org.eclipse.swt.events.KeyEvent;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.layout.FormAttachment;

-import org.eclipse.swt.layout.FormData;

-import org.eclipse.swt.layout.FormLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.FileDialog;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.TableItem;

-

-

-public class AddRemoveList extends Composite {

-

-  private boolean error = false;

-

-  private String name;

-

-  private CheckboxTableViewer listViewer;

-

-  private Button add;

-

-  private Button remove;

-

-  private Button up;

-

-  private Button down;

-

-  private Button ts;

-

-  private TextRulerViewComposite parent;

-

-  protected final HashMap<String, Image> images;

-

-  private ArrayList<String> types;

-

-  private boolean ordered;

-

-  public AddRemoveList(String name, HashMap<String, Image> images, TextRulerViewComposite parent,

-          boolean ordered) {

-    super(parent, SWT.NULL);

-    this.name = name;

-    this.images = images;

-    this.parent = parent;

-    this.ordered = ordered;

-    init();

-  }

-

-  private void setTypes() {

-    error = false;

-    types.clear();

-    String preFilePath = TextRulerViewComposite.getScriptPath();

-    File preFile = new File(preFilePath);

-    if (preFile.exists() == false || StringUtils.isEmpty(preFilePath)) {

-      printErrorDialog("The preprocessing file was not found!");

-      error = true;

-      return;

-    }

-    Path scriptPath = new Path(preFilePath);

-    

-    String defaultTypeSystemDescriptorLocation = null;

-    try {

-      defaultTypeSystemDescriptorLocation = RutaProjectUtils.getTypeSystemDescriptorPath(scriptPath.toPortableString()).toPortableString();

-    } catch (CoreException e) {

-      TextRulerPlugin.error(e);

-    }

-    TypeSystemDescription defaultTypeSystemDescription = null;

-    try {

-      defaultTypeSystemDescription = UIMAFramework.getXMLParser().parseTypeSystemDescription(

-              new XMLInputSource(new File(defaultTypeSystemDescriptorLocation)));

-      defaultTypeSystemDescription.resolveImports();

-      TypeDescription[] systemTypes = defaultTypeSystemDescription.getTypes();

-      for (TypeDescription typeDescription : systemTypes) {

-        types.add(typeDescription.getName());

-      }

-      Collections.sort(types);

-    } catch (InvalidXMLException e) {

-      TextRulerPlugin.error(e);

-    } catch (IOException e) {

-      TextRulerPlugin.error(e);

-    }

-  }

-

-  public static void printErrorDialog(String error) {

-    ErrorDialog.openError(Display.getCurrent().getActiveShell(), "File not Found!", error,

-            new Status(IStatus.ERROR, "-1", "File not found!"));

-  }

-

-  private void init() {

-

-    this.setLayout(new FormLayout());

-    this.setSize(200, 300);

-

-    types = new ArrayList<String>();

-    listViewer = CheckboxTableViewer.newCheckList(this, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL

-            | SWT.MULTI);

-    FormData listViewerLData = new FormData();

-    listViewerLData.width = 160;

-    listViewerLData.height = 150;

-    listViewerLData.left = new FormAttachment(0, 1000, 0);

-    listViewerLData.right = new FormAttachment(1000, 1000, -40);

-    listViewerLData.top = new FormAttachment(0, 1000, 0);

-    listViewerLData.bottom = new FormAttachment(1000, 1000, -10);

-    listViewer.getControl().setLayoutData(listViewerLData);

-    listViewer.setContentProvider(parent.new ListContentProvider());

-    listViewer.setLabelProvider(parent.new DefaultLabelProvider(name));

-    // listViewer.setLabelProvider(parent.new ViewLabelProvider());

-    // listViewer.setSorter(parent.new NameSorter());

-    listViewer.getTable().setVisible(true);

-

-    if (name.equals("FilterTypes")) {

-      String input = TextRulerToolkit.getStandardFilterSetString();

-      addAll(input);

-    } else {

-      listViewer.setAllChecked(true);

-    }

-

-    listViewer.getControl().addKeyListener(new KeyAdapter() {

-      @Override

-      public void keyPressed(KeyEvent e) {

-        int keyCode = e.keyCode;

-        // backspace or delete

-        if (keyCode == SWT.BS || keyCode == SWT.DEL) {

-          String selected = listViewer.getSelection().toString();

-          selected = selected.substring(1, selected.length() - 1);

-          String[] types = selected.split(", ");

-          for (String string : types) {

-            listViewer.remove(string);

-          }

-        }

-      }

-

-    });

-

-    ts = new Button(this, SWT.PUSH | SWT.CENTER);

-    FormData tsLData = new FormData();

-    tsLData.width = 25;

-    tsLData.height = 25;

-    tsLData.top = new FormAttachment(0, 1000, 0);

-    tsLData.right = new FormAttachment(1000, 1000, -10);

-    ts.setLayoutData(tsLData);

-    Image tsIcon = images.get("prepFolder");

-    ts.setImage(tsIcon);

-    ts.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent event) {

-        FileDialog fd = new FileDialog(getShell(), SWT.OPEN);

-        fd.setText("Choose Type System Descriptor");

-        String[] filterExt = { "*.xml", "*.*" };

-        fd.setFilterExtensions(filterExt);

-        fd.setFileName(parent.getPreprocessorTMFile());

-        String file = fd.open();

-        if (file != null) {

-          XMLizable descriptor = null;

-          try {

-            descriptor = UIMAFramework.getXMLParser().parse(new XMLInputSource(file));

-          } catch (InvalidXMLException e) {

-          } catch (IOException e) {

-          }

-          if (descriptor instanceof TypeSystemDescription) {

-            TypeSystemDescription tsd = (TypeSystemDescription) descriptor;

-            try {

-              tsd.resolveImports();

-            } catch (InvalidXMLException e) {

-            }

-            List<String> tsTypes = new ArrayList<String>();

-            TypeDescription[] typeDescs = tsd.getTypes();

-            for (TypeDescription typeDescription : typeDescs) {

-              String n = typeDescription.getName();

-              tsTypes.add(n);

-            }

-            addAll(tsTypes);

-          }

-        }

-      }

-    });

-

-    add = new Button(this, SWT.PUSH | SWT.CENTER);

-    FormData addLData = new FormData();

-    addLData.width = 25;

-    addLData.height = 25;

-    addLData.top = new FormAttachment(0, 1000, 27);

-    addLData.right = new FormAttachment(1000, 1000, -10);

-    add.setLayoutData(addLData);

-    Image addIcon = images.get("add");

-    add.setImage(addIcon);

-    add.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent event) {

-        setTypes();

-        if (error)

-          return;

-        Display display = Display.getDefault();

-        Shell shell = new Shell(display, SWT.RESIZE | SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);

-        if (name.equals("FilterTypes"))

-          shell.setText("Filter Types");

-        else

-          shell.setText("Slot Types");

-        new SelectTypesDialog(shell, types, AddRemoveList.this);

-      }

-    });

-

-    remove = new Button(this, SWT.PUSH | SWT.CENTER);

-    FormData removeLData = new FormData();

-    removeLData.width = 25;

-    removeLData.height = 25;

-    removeLData.top = new FormAttachment(0, 1000, 54);

-    removeLData.right = new FormAttachment(1000, 1000, -10);

-    remove.setLayoutData(removeLData);

-    Image deleteIcon = images.get("delete");

-    remove.setImage(deleteIcon);

-    remove.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent event) {

-        String selected = listViewer.getSelection().toString();

-        selected = selected.substring(1, selected.length() - 1);

-        String[] types = selected.split(", ");

-        for (String string : types) {

-          listViewer.remove(string);

-        }

-      }

-    });

-

-    if (ordered) {

-      up = new Button(this, SWT.PUSH | SWT.CENTER);

-      FormData upLData = new FormData();

-      upLData.width = 25;

-      upLData.height = 25;

-      upLData.top = new FormAttachment(0, 1000, 81);

-      upLData.right = new FormAttachment(1000, 1000, -10);

-      up.setLayoutData(upLData);

-      Image upIcon = images.get("up");

-      up.setImage(upIcon);

-      up.addSelectionListener(new SelectionAdapter() {

-        @Override

-        public void widgetSelected(SelectionEvent event) {

-          ISelection selection = listViewer.getSelection();

-          List<String> dataList = new ArrayList<String>();

-          if (selection instanceof StructuredSelection) {

-            StructuredSelection ss = (StructuredSelection) selection;

-            Iterator<?> iterator = ss.iterator();

-            while (iterator.hasNext()) {

-              Object object = (Object) iterator.next();

-              if (object instanceof String) {

-                String obj = (String) object;

-                dataList = new ArrayList<String>();

-                TableItem[] items = listViewer.getTable().getItems();

-                for (TableItem tableItem : items) {

-                  dataList.add((String) tableItem.getData());

-                }

-                int indexOf = dataList.indexOf(obj);

-                Collections.swap(dataList, indexOf, indexOf - 1);

-              }

-            }

-          }

-          listViewer.remove(dataList.toArray());

-          addAll(dataList);

-        }

-      });

-

-      down = new Button(this, SWT.PUSH | SWT.CENTER);

-      FormData downLData = new FormData();

-      downLData.width = 25;

-      downLData.height = 25;

-      downLData.top = new FormAttachment(0, 1000, 108);

-      downLData.right = new FormAttachment(1000, 1000, -10);

-      down.setLayoutData(downLData);

-      Image downIcon = images.get("down");

-      down.setImage(downIcon);

-      down.addSelectionListener(new SelectionAdapter() {

-        @Override

-        public void widgetSelected(SelectionEvent event) {

-          ISelection selection = listViewer.getSelection();

-          List<String> dataList = new ArrayList<String>();

-          if (selection instanceof StructuredSelection) {

-            StructuredSelection ss = (StructuredSelection) selection;

-            Iterator<?> iterator = ss.iterator();

-            while (iterator.hasNext()) {

-              Object object = (Object) iterator.next();

-              if (object instanceof String) {

-                String obj = (String) object;

-                dataList = new ArrayList<String>();

-                TableItem[] items = listViewer.getTable().getItems();

-                for (TableItem tableItem : items) {

-                  dataList.add((String) tableItem.getData());

-                }

-                int indexOf = dataList.indexOf(obj);

-                Collections.swap(dataList, indexOf, indexOf + 1);

-              }

-            }

-          }

-          listViewer.remove(dataList.toArray());

-          addAll(dataList);

-        }

-      });

-    }

-  }

-

-  public String[] getAll() {

-    ArrayList<String> elements = new ArrayList<String>();

-

-    Object[] objectElements = listViewer.getCheckedElements();

-    for (Object object : objectElements) {

-      elements.add(object.toString());

-    }

-    return elements.toArray(new String[objectElements.length]);

-  }

-

-  public String getAllElementsAsString() {

-    String result = "";

-    listViewer.setAllChecked(true);

-    for (int i = 0; i < listViewer.getCheckedElements().length; i++) {

-      if (i == listViewer.getCheckedElements().length - 1) {

-        result += listViewer.getCheckedElements()[i];

-      } else {

-        result += listViewer.getCheckedElements()[i] + ", ";

-      }

-    }

-    return result;

-  }

-

-  public void addAll(String input) {

-    if (input == null)

-      return;

-    int index = 0;

-    while (index != -1) {

-      index = input.indexOf(",");

-      String filter;

-      if (index == -1)

-        filter = input;

-      else {

-        filter = input.substring(0, index);

-        input = input.substring(index + 2);

-      }

-      boolean isAlreadyAdded = false;

-      int i = 0;

-      while (listViewer.getElementAt(i) != null) {

-        if (filter.equals(listViewer.getElementAt(i))) {

-          isAlreadyAdded = true;

-          break;

-        }

-        i++;

-      }

-      if (!isAlreadyAdded && !StringUtils.isBlank(filter))

-        listViewer.add(filter);

-    }

-    listViewer.setAllChecked(true);

-  }

-

-  public void addAll(List<String> input) {

-    addAll(input, true);

-  }

-

-  public void addAll(List<String> input, boolean checkAll) {

-    for (String string : input) {

-      boolean isAlreadyAdded = false;

-      int i = 0;

-      while (listViewer.getElementAt(i) != null) {

-        if (string.equals(listViewer.getElementAt(i))) {

-          isAlreadyAdded = true;

-          break;

-        }

-        i++;

-      }

-      if (!isAlreadyAdded)

-        listViewer.add(string);

-    }

-    if (checkAll)

-      listViewer.setAllChecked(true);

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/ConfigureLearnersHandler.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/ConfigureLearnersHandler.java
deleted file mode 100755
index 16f3769..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/ConfigureLearnersHandler.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*

- * 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.ruta.textruler.ui;

-

-import java.util.List;

-

-import org.apache.uima.ruta.textruler.TextRulerPlugin;

-import org.apache.uima.ruta.textruler.extension.TextRulerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;

-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;

-import org.apache.uima.ruta.textruler.preferences.AlgorithmPreferencePage;

-import org.apache.uima.ruta.textruler.preferences.ConfigPreferencePage;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-import org.eclipse.jface.preference.PreferenceDialog;

-import org.eclipse.jface.preference.PreferenceManager;

-import org.eclipse.jface.preference.PreferenceNode;

-import org.eclipse.jface.preference.PreferencePage;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.PlatformUI;

-

-public class ConfigureLearnersHandler implements IHandler {

-  public void addHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent event) throws ExecutionException {

-    PreferenceManager pm = new PreferenceManager();

-

-    PreferencePage page = new ConfigPreferencePage();

-    page.setTitle("TextRuler");

-    PreferenceNode node = new PreferenceNode("org.apache.uima.ruta.textruler.config", page);

-    pm.addToRoot(node);

-

-    List<PreferenceNode> nodes = pm.getElements(0);

-    PreferenceNode top = null;

-    for (PreferenceNode n : nodes)

-      if (n.getId().equals("org.apache.uima.ruta.textruler.config"))

-        top = n;

-    if (top != null) {

-      for (TextRulerLearnerController ctrl : TextRulerController.getAvailableControllers()) {

-        TextRulerLearnerParameter[] params = ctrl.getFactory().getAlgorithmParameters();

-        if (params == null || params.length == 0)

-          continue;

-        page = new AlgorithmPreferencePage(ctrl);

-        page.setTitle(ctrl.getName());

-        node = new PreferenceNode(ctrl.getID(), page);

-        top.add(node);

-      }

-    }

-

-    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();

-    PreferenceDialog pd = new PreferenceDialog(shell, pm);

-    pd.setPreferenceStore(TextRulerPlugin.getDefault().getPreferenceStore());

-    pd.create();

-    pd.open();

-

-    // Dialog dialog = PreferencesUtil.createPreferenceDialogOn(HandlerUtil.getActiveShell(event),

-    // TestingPreferencePage.ID, new String[] { TestingPreferencePage.ID }, null);

-    // dialog.open();

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return true;

-  }

-

-  public boolean isHandled() {

-    return true;

-  }

-

-  public void removeHandlerListener(IHandlerListener handlerListener) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/LearnerConfigurator.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/LearnerConfigurator.java
deleted file mode 100755
index f58e625..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/LearnerConfigurator.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * 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.ruta.textruler.ui;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerFactory;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerParameter;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Control;
-
-public class LearnerConfigurator {
-
-  Map<String, Control> paramControls = new HashMap<String, Control>();
-
-  private TextRulerLearnerController algorithmController;
-
-  public LearnerConfigurator(TextRulerLearnerController algController) {
-    algorithmController = algController;
-    // createWidgetsForAlgorithm();
-  }
-
-  public TextRulerLearnerController getController() {
-    return algorithmController;
-  }
-
-  // protected void createWidgetsForAlgorithm() {
-  // TextRulerLearnerFactory f = algorithmController.getFactory();
-  // TextRulerLearnerParameter[] params = f.getAlgorithmParameters();
-  // if (params == null)
-  // return;
-  //
-  // for (TextRulerLearnerParameter p : params) {
-  // Label l = new Label(this, SWT.NONE);
-  // l.setText(p.name);
-  // Control theControl = null;
-  // switch (p.type) {
-  // case ML_BOOL_PARAM: {
-  // theControl = new Button(this, SWT.CHECK | SWT.LEFT);
-  // break;
-  // }
-  //
-  // case ML_FLOAT_PARAM:
-  // case ML_INT_PARAM:
-  // case ML_STRING_PARAM: {
-  // theControl = new Text(this, SWT.SINGLE | SWT.BORDER);
-  // ((Text) theControl).addModifyListener(new ModifyListener() {
-  // public void modifyText(ModifyEvent e) {
-  // // without that listener, the text fields forget the
-  // // last change when leaving with tab! don't know why!
-  // // we also MUST call getText() otherwise the changes in
-  // // the field are lost (what is this???!!)
-  // Text t = (Text) e.widget;
-  // t.getText();
-  // }
-  // });
-  // GridData d = new GridData();
-  // d.widthHint = 150;
-  // d.minimumWidth = 40;
-  // theControl.setLayoutData(d);
-  // break;
-  // }
-  //
-  // case ML_SELECT_PARAM: {
-  // Combo combo = new Combo(this, SWT.READ_ONLY);
-  // if (p.selectValues != null)
-  // for (MLParameterSelectValue v : p.selectValues) {
-  // combo.add(v.name);
-  // }
-  // theControl = combo;
-  // break;
-  // }
-  // }
-  // if (theControl != null) {
-  // theControl.setData(p);
-  // }
-  // paramControls.put(p.id, theControl);
-  // }
-  // }
-
-  public String getID() {
-    return algorithmController.getID();
-  }
-
-  // public Map<String, Object> getCurrentParameterSettings() {
-  // Map<String, Object> result = new HashMap<String, Object>();
-  // for (String key : paramControls.keySet()) {
-  // Control c = paramControls.get(key);
-  // TextRulerLearnerParameter p = (TextRulerLearnerParameter) c.getData();
-  // try {
-  // switch (p.type) {
-  // case ML_BOOL_PARAM: {
-  // result.put(key, new Boolean(((Button) c).getSelection()));
-  // break;
-  // }
-  // case ML_INT_PARAM: {
-  // result.put(key, new Integer(((Text) c).getText()));
-  // break;
-  // }
-  // case ML_FLOAT_PARAM: {
-  // result.put(key, new Float(((Text) c).getText()));
-  // break;
-  // }
-  // case ML_STRING_PARAM: {
-  // result.put(key, new String(((Text) c).getText()));
-  // break;
-  // }
-  // case ML_SELECT_PARAM: {
-  // int index = ((Combo) c).getSelectionIndex();
-  // if (index >= 0 && p.selectValues != null && index < p.selectValues.length) {
-  // result.put(key, new String(p.selectValues[index].id));
-  // }
-  // break;
-  // }
-  // }
-  // } catch (NumberFormatException e) {
-  // // todo !
-  // }
-  // }
-  // return result;
-  // }
-
-  public Map<String, Object> getCurrentParameterSettings() {
-    Map<String, Object> result = new HashMap<String, Object>();
-    IPreferenceStore store = TextRulerPlugin.getDefault().getPreferenceStore();
-    TextRulerLearnerFactory f = algorithmController.getFactory();
-    TextRulerLearnerParameter[] params = f.getAlgorithmParameters();
-    if (params != null) {
-      for (int i = 0; i < params.length; i++) {
-        TextRulerLearnerParameter p = params[i];
-        String id = algorithmController.getID() + "." + p.id;
-        switch (p.type) {
-          case ML_BOOL_PARAM: {
-            result.put(p.id, store.getBoolean(id));
-            break;
-          }
-          case ML_FLOAT_PARAM: {
-            result.put(p.id, store.getFloat(id));
-            break;
-          }
-          case ML_DOUBLE_PARAM: {
-            result.put(p.id, store.getDouble(id));
-            break;
-          }
-          case ML_INT_PARAM: {
-            result.put(p.id, store.getInt(id));
-            break;
-          }
-          case ML_STRING_PARAM: {
-            result.put(p.id, store.getString(id));
-            break;
-          }
-            // case ML_SELECT_PARAM: {
-            // break;
-            // }
-          case ML_SELECT_PARAM:
-            break;
-        }
-      }
-    }
-    return result;
-  }
-
-  // public void setCurrentParameterSettings(Map<String, Object> params) {
-  // if (params == null)
-  // return;
-  // for (String key : paramControls.keySet())
-  // if (params.containsKey(key)) {
-  // Control c = paramControls.get(key);
-  // TextRulerLearnerParameter p = (TextRulerLearnerParameter) c.getData();
-  // switch (p.type) {
-  // case ML_BOOL_PARAM: {
-  // ((Button) c).setSelection(((Boolean) params.get(key)).booleanValue());
-  // break;
-  // }
-  //
-  // case ML_INT_PARAM:
-  // case ML_FLOAT_PARAM:
-  // case ML_STRING_PARAM: {
-  // ((Text) c).setText(params.get(key).toString());
-  // break;
-  // }
-  //
-  // case ML_SELECT_PARAM: {
-  // if (p.selectValues != null) {
-  // String value = (String) params.get(key);
-  // for (int i = 0; i < p.selectValues.length; i++) {
-  // if (p.selectValues[i].id.equals(value)) {
-  // ((Combo) c).select(i);
-  // break;
-  // }
-  // }
-  // }
-  // }
-  // }
-  // }
-  // }
-  //
-  // @Override
-  // public void setEnabled(boolean flag) {
-  // super.setEnabled(flag);
-  // for (Control c : paramControls.values())
-  // c.setEnabled(flag);
-  // }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/SelectTypesDialog.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/SelectTypesDialog.java
deleted file mode 100755
index c8a6182..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/SelectTypesDialog.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*

- * 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.ruta.textruler.ui;

-

-import java.awt.Toolkit;

-import java.util.ArrayList;

-

-import org.apache.commons.lang3.StringUtils;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.layout.FillLayout;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Event;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.swt.widgets.Listener;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Table;

-import org.eclipse.swt.widgets.TableItem;

-import org.eclipse.swt.widgets.Text;

-

-public class SelectTypesDialog extends Dialog implements Listener {

-

-  private Shell shell;

-

-  private Text typeNameUI;

-

-  private Table matchingTypesUI;

-

-  // private Table nameSpacesUI;

-

-  public String typeName = "error-TypeName-never-set";

-

-  private ArrayList<String> types;

-

-  private Button okButton;

-

-  private Button cancelButton;

-

-  private AddRemoveList list;

-

-  public SelectTypesDialog(Shell shell, ArrayList<String> types, AddRemoveList list) {

-    super(shell);

-    this.shell = shell;

-    this.types = types;

-    this.list = list;

-    createDialogArea();

-    init();

-  }

-

-  protected Control createDialogArea() {

-    Composite mainArea = (Composite) createDialogArea(shell);

-    createWideLabel(mainArea, "  Type Name:");

-

-    typeNameUI = newText(mainArea, SWT.SINGLE, "Specify the type name");

-    typeNameUI.addListener(SWT.Modify, this);

-

-    createWideLabel(mainArea, "  Matching Types:");

-

-    matchingTypesUI = newTable(mainArea, SWT.MULTI);

-    ((GridData) matchingTypesUI.getLayoutData()).heightHint = 250;

-    ((GridData) matchingTypesUI.getLayoutData()).minimumHeight = 100;

-    typeNameUI.addListener(SWT.Selection, this);

-

-    displayFilteredTypes("");

-    createButtonBar(mainArea);

-    return mainArea;

-  }

-

-  @Override

-  protected Control createDialogArea(Composite parent) {

-    Composite composite = new Composite(parent, SWT.NONE);

-    GridLayout layout = new GridLayout();

-    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);

-    layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);

-    layout.verticalSpacing = 3;

-    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);

-    composite.setLayout(layout);

-    composite.setLayoutData(new GridData(GridData.FILL_BOTH));

-    applyDialogFont(composite);

-    return composite;

-  }

-

-  @Override

-  protected Control createButtonBar(Composite parent) {

-    Composite composite = new Composite(parent, SWT.NONE);

-    GridLayout layout = new GridLayout();

-    layout.numColumns = 0;

-    layout.makeColumnsEqualWidth = true;

-    layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);

-    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);

-    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);

-    layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);

-    composite.setLayout(layout);

-    GridData data = new GridData(SWT.CENTER, SWT.CENTER, false, false);

-    composite.setLayoutData(data);

-

-    createButtonsForButtonBar(composite);

-    return composite;

-  }

-

-  @Override

-  protected void createButtonsForButtonBar(Composite parent) {

-    okButton = createButton(parent, IDialogConstants.OK_ID, "OK", true);

-    cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, "    Cancel    ", false);

-    okButton.setEnabled(false);

-  }

-

-  private void init() {

-

-    okButton.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent event) {

-        TableItem[] types = matchingTypesUI.getSelection();

-        ArrayList<String> selection = new ArrayList<String>();

-        for (TableItem item : types) {

-          selection.add(item.getText());

-        }

-        list.addAll(selection);

-        shell.dispose();

-      }

-    });

-

-    cancelButton.addSelectionListener(new SelectionAdapter() {

-      @Override

-      public void widgetSelected(SelectionEvent event) {

-        shell.dispose();

-      }

-    });

-

-    Display display = Display.getDefault();

-    int width = 300;

-    int height = 400;

-    shell.setSize(width, height);

-    shell.setMinimumSize(200, 250);

-    shell.setLocation((Toolkit.getDefaultToolkit().getScreenSize().width - width) / 2, (Toolkit

-            .getDefaultToolkit().getScreenSize().height - height) / 2);

-    shell.setLayout(new FillLayout());

-    shell.layout();

-    shell.open();

-    while (!shell.isDisposed()) {

-      if (!display.readAndDispatch())

-        display.sleep();

-    }

-  }

-

-  protected Label createWideLabel(Composite parent, String message) {

-    Label label = null;

-    label = new Label(parent, SWT.WRAP);

-    label.setText(null != message ? message : "");

-    GridData data = new GridData(GridData.FILL_HORIZONTAL);

-    data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);

-    data.verticalAlignment = SWT.CENTER;

-    label.setLayoutData(data);

-    return label;

-  }

-

-  protected Text newText(Composite parent, int style, String tip) {

-    Text t = new Text(parent, style | SWT.BORDER);

-    t.setToolTipText(tip);

-    t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

-    t.addListener(SWT.KeyUp, this);

-    t.addListener(SWT.MouseUp, this);

-    return t;

-  }

-

-  protected Table newTable(Composite parent, int style) {

-    Table table = new Table(parent, style | SWT.BORDER);

-    GridData gd = new GridData(GridData.FILL_BOTH);

-    table.setLayoutData(gd);

-    table.addListener(SWT.Selection, this);

-    table.addListener(SWT.KeyUp, this);

-    return table;

-  }

-

-  private void displayFilteredTypes(String aTypeName) {

-    matchingTypesUI.setRedraw(false);

-    matchingTypesUI.removeAll();

-    String topEntry = "";

-    aTypeName = aTypeName.toLowerCase();

-    for (String type : types) {

-      String candidateTypeName = type.toLowerCase();

-      if (StringUtils.isBlank(aTypeName) || candidateTypeName.indexOf(aTypeName) != -1) {

-

-        if (StringUtils.isEmpty(topEntry)) {

-          topEntry = type;

-        }

-        TableItem item = new TableItem(matchingTypesUI, SWT.NULL);

-        item.setText(type);

-      }

-    }

-    // if (matchingTypesUI.getItemCount() > 0) {

-    // matchingTypesUI.select(0);

-    // displayNameSpacesForSelectedItem(topEntry);

-    // }

-    matchingTypesUI.setRedraw(true);

-  }

-

-  // private void displayNameSpacesForSelectedItem(String topEntry) {

-  // nameSpacesUI.removeAll();

-  // TableItem item = new TableItem(nameSpacesUI, SWT.NULL);

-  // item.setText(topEntry);

-  // if (nameSpacesUI.getItemCount() > 0) {

-  // nameSpacesUI.select(0);

-  // }

-  // nameSpacesUI.setRedraw(true);

-  // }

-

-  public void handleEvent(Event event) {

-    if (event.widget == typeNameUI && event.type == SWT.Modify) {

-      displayFilteredTypes(typeNameUI.getText());

-    }

-

-    else if (event.widget == matchingTypesUI && event.type == SWT.Selection) {

-      okButton.setEnabled(0 < matchingTypesUI.getSelectionCount());

-    }

-  }

-

-  public boolean isValid() {

-    return true;

-  }

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StartHandler.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StartHandler.java
deleted file mode 100755
index 22eb3dd..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StartHandler.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.ruta.textruler.ui;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class StartHandler implements IHandler {
-
-  public void addHandlerListener(IHandlerListener handlerListener) {
-  }
-
-  public void dispose() {
-  }
-
-  public Object execute(ExecutionEvent event) throws ExecutionException {
-    TextRulerView theView = (TextRulerView) HandlerUtil.getActivePart(event);
-    theView.startPressed();
-    return null;
-  }
-
-  public boolean isEnabled() {
-    return true;
-  }
-
-  public boolean isHandled() {
-    return true;
-  }
-
-  public void removeHandlerListener(IHandlerListener handlerListener) {
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StartStopHandler.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StartStopHandler.java
deleted file mode 100755
index 5daa175..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StartStopHandler.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.ruta.textruler.ui;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class StartStopHandler implements IHandler {
-
-  public void addHandlerListener(IHandlerListener handlerListener) {
-  }
-
-  public void dispose() {
-  }
-
-  public Object execute(ExecutionEvent event) throws ExecutionException {
-    TextRulerView theView = (TextRulerView) HandlerUtil.getActivePart(event);
-    theView.onStartStopPressed();
-    return null;
-  }
-
-  public boolean isEnabled() {
-    return true;
-  }
-
-  public boolean isHandled() {
-    return true;
-  }
-
-  public void removeHandlerListener(IHandlerListener handlerListener) {
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StopHandler.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StopHandler.java
deleted file mode 100755
index a4b121b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/StopHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.ruta.textruler.ui;
-
-import org.apache.uima.ruta.textruler.extension.TextRulerController;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-
-public class StopHandler implements IHandler {
-
-  public void addHandlerListener(IHandlerListener handlerListener) {
-  }
-
-  public void dispose() {
-  }
-
-  public Object execute(ExecutionEvent event) throws ExecutionException {
-    TextRulerController.abort();
-    return null;
-  }
-
-  public boolean isEnabled() {
-    return true;
-  }
-
-  public boolean isHandled() {
-    return true;
-  }
-
-  public void removeHandlerListener(IHandlerListener handlerListener) {
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TestHandler.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TestHandler.java
deleted file mode 100644
index ade217a..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TestHandler.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * 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.ruta.textruler.ui;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.IHandler;

-import org.eclipse.core.commands.IHandlerListener;

-

-public class TestHandler implements IHandler {

-

-  public void addHandlerListener(IHandlerListener arg0) {

-

-  }

-

-  public void dispose() {

-

-  }

-

-  public Object execute(ExecutionEvent arg0) throws ExecutionException {

-    return null;

-  }

-

-  public boolean isEnabled() {

-    return false;

-  }

-

-  public boolean isHandled() {

-    return false;

-  }

-

-  public void removeHandlerListener(IHandlerListener arg0) {

-

-  }

-

-}

diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerResultsView.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerResultsView.java
deleted file mode 100755
index c6d5205..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerResultsView.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.ruta.textruler.ui;
-
-import org.apache.uima.ruta.ide.core.RutaLanguageToolkit;
-import org.eclipse.dltk.internal.ui.editor.ScriptSourceViewer;
-import org.eclipse.dltk.ui.DLTKUILanguageManager;
-import org.eclipse.dltk.ui.IDLTKUILanguageToolkit;
-import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration;
-import org.eclipse.dltk.ui.text.ScriptTextTools;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-public class TextRulerResultsView extends ViewPart {
-
-  public static final String ID = "org.apache.uima.ruta.textruler.TextRulerResultsView";
-
-  protected SourceViewer viewer;
-
-  public TextRulerResultsView() {
-    super();
-  }
-
-  @Override
-  public void createPartControl(Composite parent) {
-    IDLTKUILanguageToolkit toolkit = DLTKUILanguageManager
-            .getLanguageToolkit(RutaLanguageToolkit.getDefault().getNatureId());
-    final ScriptTextTools textTools = toolkit.getTextTools();
-    IPreferenceStore store = toolkit.getCombinedPreferenceStore();
-    viewer = new ScriptSourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL
-            | SWT.H_SCROLL, store);
-    ScriptSourceViewerConfiguration configuration = textTools.createSourceViewerConfiguraton(store,
-            (ITextEditor) null);
-    viewer.configure(configuration);
-    viewer.setDocument(new Document("No results available yet!"));
-  }
-
-  public void setViewTitle(String title) {
-    setPartName(title);
-  }
-
-  public void setInformation(String content) {
-    if (content == null) {
-      viewer.setInput(null);
-      return;
-    }
-    IDocument doc = new Document(content);
-    IDLTKUILanguageToolkit uiToolkit = DLTKUILanguageManager
-            .getLanguageToolkit(RutaLanguageToolkit.getDefault().getNatureId());
-    ScriptTextTools textTools = uiToolkit.getTextTools();
-    if (textTools != null) {
-      textTools.setupDocumentPartitioner(doc, uiToolkit.getPartitioningId());
-    }
-    viewer.setInput(doc);
-  }
-
-  public void setResultContents(String str) {
-    setInformation(str);
-  }
-
-  @Override
-  public void setFocus() {
-    viewer.getControl().setFocus();
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerView.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerView.java
deleted file mode 100755
index bdce51b..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerView.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * 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.ruta.textruler.ui;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.GlobalCASSource;
-import org.apache.uima.ruta.textruler.extension.TextRulerController;
-import org.apache.uima.ruta.textruler.extension.TextRulerControllerDelegate;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearner.TextRulerLearnerState;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;
-import org.apache.uima.ruta.textruler.extension.TextRulerPreprocessor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class TextRulerView extends ViewPart implements TextRulerControllerDelegate {
-
-  public static final String ID = "org.apache.uima.ruta.ml.MainView";
-
-  private TextRulerViewComposite viewContent;
-
-  private IMemento memento;
-
-  public TextRulerView() {
-    super();
-  }
-
-  public void errorAlert(String message) {
-    MessageBox alert = new MessageBox(getSite().getShell(), SWT.OK | SWT.ICON_ERROR);
-    alert.setMessage(message);
-    alert.open();
-  }
-
-  public boolean yesNoAlert(String message) {
-    MessageBox alert = new MessageBox(getSite().getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
-    alert.setMessage(message);
-    int result = alert.open();
-    return result == SWT.OK; // THIS DOES NOT WORK IN OS X !!??
-  }
-
-  public void onStartStopPressed() {
-    if (TextRulerController.isRunning()) {
-      // if
-      // (yesNoAlert("Do you really want to abort the current learning processes?"))
-      // TODO does not work in OS X since alert.open always returns 256
-      // (=cancel) no matter which button was pressed...
-      TextRulerController.abort();
-    } else {
-      startPressed();
-    }
-    updateEnabledStatus();
-  }
-
-  public void startPressed() {
-    if (!TextRulerController.isRunning()) {
-      String inputDir = viewContent.getInputDirectoryPath().trim();
-      String additionalDir = viewContent.getAdditionalDirectoryPath().trim();
-      String preProcTMFile = viewContent.getPreprocessorTMFile().trim();
-
-      File inputFile = new File(inputDir);
-      if (!inputFile.exists()) {
-        AddRemoveList.printErrorDialog("The training data directory was not found!");
-        return;
-      }
-
-      File additionalFile = new File(additionalDir);
-      // if (!additionalFile .exists()) {
-      // AddRemoveList.printErrorDialog("The additional data directory was not found!");
-      // return;
-      // }
-
-      File preFile = new File(preProcTMFile);
-      if (!preFile.exists()) {
-        AddRemoveList.printErrorDialog("The preprocessing script was not found!");
-        return;
-      }
-
-      String[] slotNames = viewContent.getSlotNames();
-      for (String string : slotNames) {
-        System.out.println(string);
-      }
-      String[] filterArray = viewContent.getFilters();
-      Set<String> filters = new HashSet<String>();
-      for (String s : filterArray)
-        filters.add(s);
-
-      if (slotNames.length == 0 || inputDir.length() == 0 || preProcTMFile.length() == 0) {
-        errorAlert("Please specify at least one slot type, the input directory and the preprocessing file (this is needed even if preprocessing is skipped)!");
-        return;
-      }
-      File dir = new File(inputDir);
-      if (!dir.exists() || !dir.isDirectory()) {
-        errorAlert("The specified input directory could not be found!");
-        return;
-      }
-
-      Object[] algs = viewContent.getAlgListViewer().getCheckedElements();
-
-      // reset all:
-      for (TextRulerLearnerController controller : TextRulerController.getAvailableControllers())
-        controller.setEnabled(false);
-
-      // enable the checked ones...
-      for (Object i : algs) {
-        TextRulerLearnerController c = ((TextRulerLearnerController) i);
-
-        c.setEnabled(true);
-
-        IViewPart resultView;
-
-        if ((resultView = getView(TextRulerResultsView.ID, c.getID())) == null) {
-          try {
-            IViewPart view = PlatformUI
-                    .getWorkbench()
-                    .getActiveWorkbenchWindow()
-                    .getActivePage()
-                    .showView(TextRulerResultsView.ID, ((TextRulerLearnerController) i).getID(),
-                            IWorkbenchPage.VIEW_CREATE);
-            ((TextRulerResultsView) view).setViewTitle(c.getName() + " - Results");
-          } catch (PartInitException e) {
-            TextRulerPlugin.error(e);
-          }
-        } else {
-          ((TextRulerResultsView) resultView).setViewTitle(c.getName() + " - Results");
-        }
-      }
-      
-      if (TextRulerController.enabledAlgorithmsCount() > 0) {
-//        GlobalCASSource.releaseAll();
-        TextRulerController.start(inputDir, additionalDir, preProcTMFile, slotNames, filters, this,
-                viewContent.getCurrentAlgorithmParameters(), viewContent.getSkipPreprocessing());
-      } else
-        errorAlert("No algorithm has been activated for learning!");
-    }
-  }
-
-  public void updateEnabledStatus() {
-    boolean isRunning = TextRulerController.isRunning();
-    viewContent.setEnabled(!isRunning);
-  }
-
-  public void asyncUpdateGlobalStatus(final String str) {
-    viewContent.getDisplay().asyncExec(new Runnable() {
-      public void run() {
-        viewContent.setGlobalStatusString(str);
-        updateEnabledStatus();
-      }
-    });
-  }
-
-  public void asyncUpdateList(final TextRulerLearnerController algController,
-          final boolean ruleBaseChanged) {
-    viewContent.getDisplay().asyncExec(new Runnable() {
-      public void run() {
-        updateList(algController, ruleBaseChanged);
-      }
-    });
-  }
-
-  public void updateList(TextRulerLearnerController algController, boolean ruleBaseChanged) {
-    viewContent.getAlgListViewer().refresh(true, true);
-    if (algController != null && ruleBaseChanged) {
-      TextRulerResultsView textRulerResultsView = (TextRulerResultsView) getView(
-              TextRulerResultsView.ID, algController.getID());
-      if (textRulerResultsView != null) {
-        textRulerResultsView.setResultContents(algController.getCurrentResultString());
-      }
-    }
-  }
-
-  public synchronized void algorithmDidEnd(TextRulerLearnerController algController) {
-    asyncUpdateList(algController, true);
-
-    // // BATCH_STUFF
-    // if (!TextRulerController.isRunning() &&
-    // !TextRulerController.shouldAbort())
-    // {
-    // viewContent.getDisplay().asyncExec(new Runnable(){
-    // public void run() {
-    // batchNext();
-    // }
-    // });
-    // }
-  }
-
-  public static IViewPart getView(String id, String id2) {
-    IViewReference viewReferences[] = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
-            .getActivePage().getViewReferences();
-    for (int i = 0; i < viewReferences.length; i++) {
-      if (id.equals(viewReferences[i].getId()) && id2.equals(viewReferences[i].getSecondaryId())) {
-        return viewReferences[i].getView(false);
-      }
-    }
-    return null;
-  }
-
-  public synchronized void algorithmStatusUpdate(TextRulerLearnerController algController,
-          String statusString, TextRulerLearnerState state, boolean ruleBaseChanged) {
-    asyncUpdateList(algController, ruleBaseChanged);
-  }
-
-  public void preprocessorStatusUpdate(TextRulerPreprocessor p, String statusString) {
-    asyncUpdateGlobalStatus("Preprocessing... " + statusString);
-  }
-
-  public void globalStatusUpdate(String str) {
-    asyncUpdateGlobalStatus(str);
-  }
-
-  @Override
-  public void createPartControl(Composite parent) {
-    viewContent = new TextRulerViewComposite(parent, SWT.NULL, this);
-    if (memento != null) {
-      viewContent.restoreState(memento);
-      memento = null;
-    }
-  }
-
-  @Override
-  public void setFocus() {
-    viewContent.setFocus();
-  }
-
-  @Override
-  public void init(IViewSite site, IMemento memento) throws PartInitException {
-    this.memento = memento;
-    super.init(site, memento);
-  }
-
-  @Override
-  public void saveState(IMemento memento) {
-    viewContent.saveState(memento);
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java b/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java
deleted file mode 100755
index 49f48b2..0000000
--- a/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java
+++ /dev/null
@@ -1,878 +0,0 @@
-/*
- * 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.ruta.textruler.ui;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.resource.metadata.TypeDescription;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.engine.RutaEngine;
-import org.apache.uima.ruta.textruler.TextRulerPlugin;
-import org.apache.uima.ruta.textruler.core.TextRulerToolkit;
-import org.apache.uima.ruta.textruler.extension.TextRulerController;
-import org.apache.uima.ruta.textruler.extension.TextRulerLearnerController;
-import org.apache.uima.util.FileUtils;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLInputSource;
-import org.apache.uima.util.XMLizable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class TextRulerViewComposite extends org.eclipse.swt.widgets.Composite {
-
-  public class DefaultLabelProvider extends LabelProvider implements ITableLabelProvider {
-
-    private final String type;
-
-    public DefaultLabelProvider(String type) {
-      super();
-      this.type = type;
-    }
-
-    public String getColumnText(Object obj, int index) {
-      return getText(obj);
-    }
-
-    public Image getColumnImage(Object obj, int index) {
-      return getImage(obj);
-    }
-
-    @Override
-    public Image getImage(Object obj) {
-      if (type.equals("SlotTypes")) {
-        return images.get("information");
-      } else if (type.equals("FilterTypes")) {
-        return images.get("feature");
-      } else if (type.equals("learner")) {
-        return images.get("learner");
-      }
-      return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
-    }
-  }
-
-  private CheckboxTableViewer algListViewer;
-
-  private AddRemoveList slotTypes;
-
-  private AddRemoveList filterTypes;
-
-  private Button skipPreButton;
-
-  private Button dirButton;
-
-  // private Composite configArea;
-
-  private ArrayList<LearnerConfigurator> configurators;
-
-  private Label globalStatusLabel;
-
-  private Label label2;
-
-  private Label label1;
-
-  private Text inputDirectoryText;
-
-  private Label methodsLabel;
-
-  private Label filtersLabel;
-
-  private TextRulerView textRulerView;
-
-  private Button fileChooseButton;
-
-  private static Text preFileText;
-
-  private Label label3;
-
-  private HashMap<String, Image> images;
-
-  private Text additionalDirectoryText;
-
-  private Button additionalButton;
-
-  private Label label4;
-
-  private Label label5;
-
-  private Text testDirectoryText;
-
-  private Button testButton;
-
-  private Button showTestsButton;
-
-  public class ListContentProvider implements IStructuredContentProvider {
-    public void inputChanged(Viewer v, Object oldInput, Object newInput) {
-    }
-
-    public void dispose() {
-    }
-
-    public Object[] getElements(Object parent) {
-      return TextRulerController.getAvailableControllers().toArray();
-    }
-  }
-
-  public class ViewLabelProvider extends LabelProvider implements ITableLabelProvider {
-    public String getColumnText(Object obj, int index) {
-      return getText(obj);
-    }
-
-    public Image getColumnImage(Object obj, int index) {
-      return getImage(obj);
-    }
-
-    @Override
-    public Image getImage(Object obj) {
-      return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
-    }
-  }
-
-  public class NameSorter extends ViewerSorter {
-  }
-
-  public TextRulerViewComposite(org.eclipse.swt.widgets.Composite parent, int style,
-          TextRulerView textRulerView) {
-    super(parent, style);
-    this.textRulerView = textRulerView;
-
-    initImages();
-    initGUI();
-
-    ScrolledComposite sComp = new ScrolledComposite(parent, SWT.BORDER | SWT.V_SCROLL
-            | SWT.H_SCROLL);
-    this.setParent(sComp);
-    sComp.setMinSize(this.getSize());
-    sComp.setContent(this);
-    sComp.setExpandHorizontal(true);
-    sComp.setExpandVertical(true);
-  }
-
-  private void initGUI() {
-    try {
-      this.setLayout(new FormLayout());
-      this.setSize(600, 380);
-
-      configurators = new ArrayList<LearnerConfigurator>();
-
-      label1 = new Label(this, SWT.NONE);
-      FormData label1LData = new FormData();
-      label1LData.left = new FormAttachment(0, 1000, 12);
-      label1LData.top = new FormAttachment(0, 1000, 20);
-      label1LData.width = 109;
-      label1.setLayoutData(label1LData);
-      label1.setText("Training Data:");
-
-      inputDirectoryText = new Text(this, SWT.SINGLE | SWT.BORDER);
-      FormData inputDirectoryTexLData = new FormData();
-      inputDirectoryTexLData.width = 300;
-      inputDirectoryTexLData.left = new FormAttachment(0, 1000, 126);
-      inputDirectoryTexLData.top = new FormAttachment(0, 1000, 20);
-      inputDirectoryTexLData.right = new FormAttachment(1000, 1000, -110);
-      inputDirectoryText.setLayoutData(inputDirectoryTexLData);
-      inputDirectoryText.setText("");
-      inputDirectoryText.addModifyListener(new ModifyListener() {
-        public void modifyText(ModifyEvent e) {
-          // without that listener, the text fields forget the
-          // last change when leaving with tab! don't know why!
-          // we also MUST call getText() otherwise the changes in
-          // the field are lost (what is this???!!)
-          Text t = (Text) e.widget;
-          t.getText();
-        }
-      });
-
-      dirButton = new Button(this, SWT.PUSH | SWT.CENTER);
-      FormData dirButtoLData = new FormData();
-      dirButtoLData.width = 25;
-      dirButtoLData.height = 25;
-      dirButtoLData.top = new FormAttachment(0, 1000, 18);
-      dirButtoLData.right = new FormAttachment(1000, 1000, -80);
-      dirButton.setLayoutData(dirButtoLData);
-      Image folderIcon = getImage("folder");
-      dirButton.setImage(folderIcon);
-      dirButton.addSelectionListener(new SelectionAdapter() {
-        @Override
-        public void widgetSelected(SelectionEvent event) {
-          DirectoryDialog dlg = new DirectoryDialog(getShell());
-          dlg.setFilterPath(inputDirectoryText.getText());
-          dlg.setText("Input Directory");
-          dlg.setMessage("Select a directory with input XMI files for the learning algorithms.");
-          String dir = dlg.open();
-          if (dir != null) {
-            inputDirectoryText.setText(dir);
-          }
-        }
-      });
-
-      label4 = new Label(this, SWT.NONE);
-      FormData label4LData = new FormData();
-      label4LData.left = new FormAttachment(0, 1000, 12);
-      label4LData.top = new FormAttachment(0, 1000, 44);
-      label4LData.width = 109;
-      label4.setLayoutData(label4LData);
-      label4.setText("Additional Data:");
-
-      additionalDirectoryText = new Text(this, SWT.SINGLE | SWT.BORDER);
-      FormData additionalDirectoryTexLData = new FormData();
-      additionalDirectoryTexLData.width = 300;
-      additionalDirectoryTexLData.left = new FormAttachment(0, 1000, 126);
-      additionalDirectoryTexLData.top = new FormAttachment(0, 1000, 44);
-      additionalDirectoryTexLData.right = new FormAttachment(1000, 1000, -110);
-      additionalDirectoryText.setLayoutData(additionalDirectoryTexLData);
-      additionalDirectoryText.setText("");
-      additionalDirectoryText.addModifyListener(new ModifyListener() {
-        public void modifyText(ModifyEvent e) {
-          // without that listener, the text fields forget the
-          // last change when leaving with tab! don't know why!
-          // we also MUST call getText() otherwise the changes in
-          // the field are lost (what is this???!!)
-          Text t = (Text) e.widget;
-          t.getText();
-        }
-      });
-
-      additionalButton = new Button(this, SWT.PUSH | SWT.CENTER);
-      FormData additionalButtoLData = new FormData();
-      additionalButtoLData.width = 25;
-      additionalButtoLData.height = 25;
-      additionalButtoLData.top = new FormAttachment(0, 1000, 42);
-      additionalButtoLData.right = new FormAttachment(1000, 1000, -80);
-      additionalButton.setLayoutData(additionalButtoLData);
-      folderIcon = getImage("folder");
-      additionalButton.setImage(folderIcon);
-      additionalButton.addSelectionListener(new SelectionAdapter() {
-        @Override
-        public void widgetSelected(SelectionEvent event) {
-          DirectoryDialog dlg = new DirectoryDialog(getShell());
-          dlg.setFilterPath(inputDirectoryText.getText());
-          dlg.setText("Additional Directory");
-          dlg.setMessage("Select a directory with input additional XMI files for the learning algorithms.");
-          String dir = dlg.open();
-          if (dir != null) {
-            additionalDirectoryText.setText(dir);
-          }
-        }
-      });
-
-      label5 = new Label(this, SWT.NONE);
-      FormData label5LData = new FormData();
-      label5LData.left = new FormAttachment(0, 1000, 12);
-      label5LData.top = new FormAttachment(0, 1000, 44 + 24);
-      label5LData.width = 109;
-      label5.setLayoutData(label5LData);
-      label5.setText("Test Data:");
-
-      testDirectoryText = new Text(this, SWT.SINGLE | SWT.BORDER);
-      FormData testDirectoryTexLData = new FormData();
-      testDirectoryTexLData.width = 300;
-      testDirectoryTexLData.left = new FormAttachment(0, 1000, 126);
-      testDirectoryTexLData.top = new FormAttachment(0, 1000, 44 + 24);
-      testDirectoryTexLData.right = new FormAttachment(1000, 1000, -110);
-      testDirectoryText.setLayoutData(testDirectoryTexLData);
-      testDirectoryText.setText("");
-      testDirectoryText.addModifyListener(new ModifyListener() {
-        public void modifyText(ModifyEvent e) {
-          // without that listener, the text fields forget the
-          // last change when leaving with tab! don't know why!
-          // we also MUST call getText() otherwise the changes in
-          // the field are lost (what is this???!!)
-          Text t = (Text) e.widget;
-          t.getText();
-        }
-      });
-      testDirectoryText.setEnabled(false);
-      
-      
-      testButton = new Button(this, SWT.PUSH | SWT.CENTER);
-      FormData testButtoLData = new FormData();
-      testButtoLData.width = 25;
-      testButtoLData.height = 25;
-      testButtoLData.top = new FormAttachment(0, 1000, 42 + 24);
-      testButtoLData.right = new FormAttachment(1000, 1000, -80);
-      testButton.setLayoutData(testButtoLData);
-      folderIcon = getImage("folder");
-      testButton.setImage(folderIcon);
-      testButton.addSelectionListener(new SelectionAdapter() {
-        @Override
-        public void widgetSelected(SelectionEvent event) {
-          DirectoryDialog dlg = new DirectoryDialog(getShell());
-          dlg.setFilterPath(inputDirectoryText.getText());
-          dlg.setText("Test Directory");
-          dlg.setMessage("Select a directory with input test XMI files.");
-          String dir = dlg.open();
-          if (dir != null) {
-            testDirectoryText.setText(dir);
-          }
-        }
-      });
-      testButton.setEnabled(false);
-
-      showTestsButton = new Button(this, SWT.CHECK | SWT.LEFT);
-      FormData showTestsButtoLData = new FormData();
-      showTestsButtoLData.width = 50;
-      showTestsButtoLData.height = 18;
-      showTestsButtoLData.top = new FormAttachment(0, 1000, 42 + 24);
-      showTestsButtoLData.right = new FormAttachment(1000, 1000, -25);
-      showTestsButton.setLayoutData(showTestsButtoLData);
-      showTestsButton.setText("eval");
-      showTestsButton.setEnabled(false);
-            
-      label3 = new Label(this, SWT.NONE);
-      FormData label3LData = new FormData();
-      label3LData.width = 103;
-      label3LData.left = new FormAttachment(0, 1000, 12);
-      label3LData.top = new FormAttachment(0, 1000, 68 + 24);
-      label3.setLayoutData(label3LData);
-      label3.setText("Preprocess Script:");
-
-      preFileText = new Text(this, SWT.SINGLE | SWT.BORDER);
-      FormData preFileTexLData = new FormData();
-      preFileTexLData.width = 495;
-      preFileTexLData.left = new FormAttachment(0, 1000, 126);
-      preFileTexLData.top = new FormAttachment(0, 1000, 68 + 24);
-      preFileTexLData.right = new FormAttachment(1000, 1000, -110);
-      preFileText.setLayoutData(preFileTexLData);
-      preFileText.setText("");
-      preFileText.addModifyListener(new ModifyListener() {
-        public void modifyText(ModifyEvent e) {
-          // without that listener, the text fields forget the
-          // last change when leaving with tab! don't know why!
-          // we also MUST call getText() otherwise the changes in
-          // the field are lost (what is this???!!)
-          Text t = (Text) e.widget;
-          t.getText();
-        }
-      });
-
-      fileChooseButton = new Button(this, SWT.PUSH | SWT.CENTER);
-      FormData fileChooseButtoLData = new FormData();
-      fileChooseButtoLData.width = 25;
-      fileChooseButtoLData.height = 25;
-      fileChooseButtoLData.top = new FormAttachment(0, 1000, 66 + 24);
-      fileChooseButtoLData.right = new FormAttachment(1000, 1000, -80);
-      fileChooseButton.setLayoutData(fileChooseButtoLData);
-      Image icon = getImage("prepFolder");
-      fileChooseButton.setImage(icon);
-      fileChooseButton.addSelectionListener(new SelectionAdapter() {
-        @Override
-        public void widgetSelected(SelectionEvent event) {
-          FileDialog fd = new FileDialog(getShell(), SWT.OPEN);
-          fd.setText("Choose Ruta Source File");
-          String[] filterExt = { "*" + RutaEngine.SCRIPT_FILE_EXTENSION, "*.*" };
-          fd.setFilterExtensions(filterExt);
-          String file = fd.open();
-          if (file != null) {
-            preFileText.setText(file);
-          }
-        }
-      });
-
-      skipPreButton = new Button(this, SWT.CHECK | SWT.LEFT);
-      FormData skipPreButtonLData = new FormData();
-      skipPreButtonLData.width = 50;
-      skipPreButtonLData.height = 18;
-      skipPreButtonLData.top = new FormAttachment(0, 1000, 68 + 24);
-      skipPreButtonLData.right = new FormAttachment(1000, 1000, -25);
-      skipPreButton.setLayoutData(skipPreButtonLData);
-      skipPreButton.setText("skip");
-
-      label2 = new Label(this, SWT.NONE);
-      FormData label2LData = new FormData();
-      label2LData.left = new FormAttachment(0, 1000, 12);
-      label2LData.top = new FormAttachment(0, 1000, 44 + 24 + 24 + 24);
-      label2LData.width = 109;
-      label2.setLayoutData(label2LData);
-      label2.setText("Information Types:");
-
-      slotTypes = new AddRemoveList("SlotTypes", images, this, true);
-      FormData slotTypesLData = new FormData();
-      slotTypesLData.width = 300;
-      slotTypesLData.height = 144;
-      slotTypesLData.top = new FormAttachment(0, 1000, 85 + 24 + 24);
-      slotTypesLData.left = new FormAttachment(0, 1000, 12);
-      slotTypes.setLayoutData(slotTypesLData);
-
-      addDropTarget(slotTypes);
-
-      filtersLabel = new Label(this, SWT.NONE);
-      FormData filtersLabeLData = new FormData();
-      filtersLabeLData.width = 120;
-      filtersLabeLData.left = new FormAttachment(0, 1000, 320);
-      filtersLabeLData.top = new FormAttachment(0, 1000, 44 + 24 + 24 + 24);
-      filtersLabel.setLayoutData(filtersLabeLData);
-      filtersLabel.setText("Filtered Feature Types:");
-
-      filterTypes = new AddRemoveList("FilterTypes", images, this, false);
-      FormData filterTypesLData = new FormData();
-      filterTypesLData.width = 300;
-      filterTypesLData.height = 144;
-      filterTypesLData.top = new FormAttachment(0, 1000, 85 + 24 + 24);
-      filterTypesLData.left = new FormAttachment(0, 1000, 320);
-      filterTypes.setLayoutData(filterTypesLData);
-
-      addDropTarget(filterTypes);
-
-      FormData globalStatusLabeLData = new FormData();
-      globalStatusLabeLData.width = 400;
-      globalStatusLabeLData.left = new FormAttachment(0, 1000, 70);
-      globalStatusLabeLData.top = new FormAttachment(0, 1000, 228 + 24 + 24);
-      globalStatusLabeLData.right = new FormAttachment(1000, 1000, -19);
-      globalStatusLabel = new Label(this, SWT.NONE);
-      globalStatusLabel.setLayoutData(globalStatusLabeLData);
-
-      methodsLabel = new Label(this, SWT.NONE);
-      FormData algsLabeLData = new FormData();
-      algsLabeLData.width = 120;
-      algsLabeLData.left = new FormAttachment(0, 1000, 12);
-      algsLabeLData.top = new FormAttachment(0, 1000, 228 + 24 + 24);
-      methodsLabel.setLayoutData(algsLabeLData);
-      methodsLabel.setText("Methods:");
-
-      FormData algListViewerLData = new FormData();
-      // algListViewerLData.width = 400;
-      // algListViewerLData.height = 115;
-
-      algListViewerLData.left = new FormAttachment(0, 1000, 10);
-      algListViewerLData.top = new FormAttachment(0, 1000, 248 + 24 + 24);
-      algListViewerLData.right = new FormAttachment(1000, 1000, -10);
-      algListViewerLData.bottom = new FormAttachment(1000, 1000, -10);
-
-      algListViewer = CheckboxTableViewer.newCheckList(this, SWT.BORDER | SWT.H_SCROLL
-              | SWT.V_SCROLL);
-      algListViewer.getControl().setLayoutData(algListViewerLData);
-      algListViewer.setContentProvider(new ListContentProvider());
-      algListViewer.setLabelProvider(new DefaultLabelProvider("learner"));
-      algListViewer.setSorter(new NameSorter());
-      if (textRulerView != null)
-        algListViewer.setInput(textRulerView.getViewSite());
-
-      this.layout();
-    } catch (Exception e) {
-      TextRulerPlugin.error(e);
-    }
-
-    DropTarget dt = new DropTarget(inputDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList.length > 0)
-          inputDirectoryText.setText(fileList[0]);
-      }
-    });
-
-    DropTarget dt3 = new DropTarget(additionalDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt3.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt3.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList.length > 0)
-          additionalDirectoryText.setText(fileList[0]);
-      }
-    });
-
-    DropTarget dt4 = new DropTarget(testDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt4.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt4.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList.length > 0)
-          testDirectoryText.setText(fileList[0]);
-      }
-    });
-
-    DropTarget dt2 = new DropTarget(preFileText, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    dt2.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    dt2.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList.length > 0)
-          preFileText.setText(fileList[0]);
-      }
-    });
-
-    createAlgorithmConfigurators();
-    // algListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-    // public void selectionChanged(SelectionChangedEvent event) {
-    // StructuredSelection s = (StructuredSelection) event.getSelection();
-    // String id = null;
-    // if (!s.isEmpty())
-    // id = ((TextRulerLearnerController) s.getFirstElement()).getID();
-    // showConfiguratorForAlgorithm(id);
-    // }
-    // });
-  }
-
-  private void addDropTarget(final AddRemoveList list) {
-    DropTarget fdt = new DropTarget(list, DND.DROP_DEFAULT | DND.DROP_MOVE);
-    fdt.setTransfer(new Transfer[] { FileTransfer.getInstance() });
-    fdt.addDropListener(new DropTargetAdapter() {
-      @Override
-      public void drop(DropTargetEvent event) {
-        String fileList[] = null;
-        FileTransfer ft = FileTransfer.getInstance();
-        if (ft.isSupportedType(event.currentDataType)) {
-          fileList = (String[]) event.data;
-        }
-        if (fileList.length > 0) {
-          for (String string : fileList) {
-            if (string.endsWith(".xml")) {
-              XMLizable descriptor = null;
-              try {
-                descriptor = UIMAFramework.getXMLParser().parse(new XMLInputSource(string));
-              } catch (InvalidXMLException e) {
-              } catch (IOException e) {
-              }
-              if (descriptor instanceof TypeSystemDescription) {
-                TypeSystemDescription tsd = (TypeSystemDescription) descriptor;
-                try {
-                  tsd.resolveImports();
-                } catch (InvalidXMLException e) {
-                }
-                List<String> tsTypes = new ArrayList<String>();
-                TypeDescription[] typeDescs = tsd.getTypes();
-                for (TypeDescription typeDescription : typeDescs) {
-                  String n = typeDescription.getName();
-                  tsTypes.add(n);
-                }
-                list.addAll(tsTypes);
-              }
-            } else if (string.endsWith(".txt")) {
-              String file2String = null;
-              try {
-                file2String = FileUtils.file2String(new File(string), "UTF-8");
-              } catch (IOException e) {
-              }
-              if (file2String != null) {
-                String replaceAll = file2String.replaceAll("[\\n\\r]+", ", ");
-                list.addAll(replaceAll);
-              }
-            }
-          }
-        }
-      }
-    });
-  }
-
-  private void initImages() {
-    images = new HashMap<String, Image>();
-    ImageDescriptor desc;
-    Image image;
-    String name;
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/add.png");
-    image = desc.createImage();
-    name = "add";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/delete.png");
-    image = desc.createImage();
-    name = "delete";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/folder_edit.png");
-    image = desc.createImage();
-    name = "prepFolder";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/folder.png");
-    image = desc.createImage();
-    name = "folder";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/up.gif");
-    image = desc.createImage();
-    name = "up";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/down.gif");
-    image = desc.createImage();
-    name = "down";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/information.gif");
-    image = desc.createImage();
-    name = "information";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/feature.gif");
-    image = desc.createImage();
-    name = "feature";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/learner.png");
-    image = desc.createImage();
-    name = "learner";
-    images.put(name, image);
-
-    desc = TextRulerPlugin.getImageDescriptor("/icons/testing.gif");
-    image = desc.createImage();
-    name = "testing";
-    images.put(name, image);
-
-  }
-
-  public Image getImage(String name) {
-    if (images == null) {
-      initImages();
-    }
-    return images.get(name);
-  }
-
-  @Override
-  public void dispose() {
-    super.dispose();
-    if (images != null) {
-      for (Image each : images.values()) {
-        each.dispose();
-      }
-    }
-  }
-
-  public String[] getFilters() {
-    return filterTypes.getAll();
-  }
-
-  public String[] getSlotNames() {
-    return slotTypes.getAll();
-  }
-
-  public String getPreprocessorTMFile() {
-    return preFileText.getText().trim();
-  }
-
-  public String getInputDirectoryPath() {
-    return inputDirectoryText.getText().trim();
-  }
-
-  public String getAdditionalDirectoryPath() {
-    return additionalDirectoryText.getText().trim();
-  }
-
-  public String getTestDirectoryPath() {
-    return testDirectoryText.getText().trim();
-  }
-
-  public CheckboxTableViewer getAlgListViewer() {
-    return algListViewer;
-  }
-
-  public boolean getSkipPreprocessing() {
-    return skipPreButton.getSelection();
-  }
-
-  public void setGlobalStatusString(String s) {
-    globalStatusLabel.setText(s);
-  }
-
-  public void createAlgorithmConfigurators() {
-    if (null == TextRulerController.getAvailableControllers())
-      return;
-    for (TextRulerLearnerController ctrl : TextRulerController.getAvailableControllers()) {
-      LearnerConfigurator ac = new LearnerConfigurator(ctrl);
-      configurators.add(ac);
-      // GridData d = new GridData();
-      // d.horizontalAlignment = GridData.FILL;
-      // d.grabExcessHorizontalSpace = true;
-      // d.verticalAlignment = GridData.FILL;
-      // d.grabExcessVerticalSpace = true;
-      // d.exclude = true;
-      // ac.setLayoutData(d);
-      // ac.setVisible(false);
-      // ac.setCurrentParameterSettings(ctrl.getFactory().getAlgorithmParameterStandardValues());
-    }
-  }
-
-  // public void showConfiguratorForAlgorithm(String id) {
-  // for (Control aControl : configArea.getChildren()) {
-  // boolean show = id != null && ((LearnerConfigurator) aControl).getID().equals(id);
-  // GridData d = (GridData) aControl.getLayoutData();
-  // d.exclude = !show;
-  // aControl.setVisible(show);
-  // }
-  // configArea.layout();
-  // }
-
-  public Map<String, Map<String, Object>> getCurrentAlgorithmParameters() {
-    Map<String, Map<String, Object>> result = new HashMap<String, Map<String, Object>>();
-    for (LearnerConfigurator c : configurators) {
-      result.put(c.getID(), c.getCurrentParameterSettings());
-    }
-    return result;
-  }
-
-  public void saveState(IMemento memento) {
-    IMemento activeAlgChild = memento.createChild("activeAlgorithms");
-    for (Object c : algListViewer.getCheckedElements()) {
-      activeAlgChild.createChild("algorithm", ((TextRulerLearnerController) c).getID());
-    }
-
-    memento.createChild("inputDirectory", inputDirectoryText.getText());
-    memento.createChild("additionalDirectory", additionalDirectoryText.getText());
-    memento.createChild("testDirectory", testDirectoryText.getText());
-    memento.createChild("slotName", slotTypes.getAllElementsAsString());
-    memento.createChild("filters", filterTypes.getAllElementsAsString());
-    memento.createChild("preprocessFile", preFileText.getText());
-    memento.createChild("skipPreprocessing", skipPreButton.getSelection() ? "yes" : "no");
-    memento.createChild("showTest", showTestsButton.getSelection() ? "yes" : "no");
-  }
-
-  public LearnerConfigurator getAlgConfiguratorForID(String id) {
-    for (LearnerConfigurator c : configurators) {
-      if (c.getID().equals(id))
-        return c;
-    }
-    return null;
-  }
-
-  public void restoreState(IMemento memento) {
-    if (memento == null)
-      return;
-
-    IMemento filters = memento.getChild("filters");
-    if (filters != null)
-      filterTypes.addAll(filters.getID());
-    else
-      filterTypes.addAll(TextRulerToolkit.getStandardFilterSetString());
-
-    IMemento slotName = memento.getChild("slotName");
-    if (slotName != null)
-      slotTypes.addAll(slotName.getID());
-
-    IMemento preName = memento.getChild("preprocessFile");
-    if (preName != null)
-      preFileText.setText(preName.getID());
-
-    IMemento dir = memento.getChild("inputDirectory");
-    if (dir != null)
-      inputDirectoryText.setText(dir.getID());
-
-    IMemento additional = memento.getChild("additionalDirectory");
-    if (additional != null)
-      additionalDirectoryText.setText(additional.getID());
-
-    IMemento test = memento.getChild("testDirectory");
-    if (test != null)
-      testDirectoryText.setText(test.getID());
-
-    IMemento activeAlgs = memento.getChild("activeAlgorithms");
-    if (activeAlgs != null) {
-      ArrayList<TextRulerLearnerController> activeControllers = new ArrayList<TextRulerLearnerController>();
-      for (IMemento c : activeAlgs.getChildren("algorithm")) {
-        TextRulerLearnerController ctrl = TextRulerController.getControllerForID(c.getID());
-        if (ctrl != null)
-          activeControllers.add(ctrl);
-      }
-      algListViewer.setCheckedElements(activeControllers.toArray());
-    }
-
-    IMemento skip = memento.getChild("skipPreprocessing");
-    if (skip != null) {
-      boolean skipPreprocessing = skip.getID().equals("yes");
-      skipPreButton.setSelection(skipPreprocessing);
-    }
-
-    IMemento showTest = memento.getChild("showTest");
-    if (skip != null) {
-      boolean showTestValue = showTest.getID().equals("yes");
-      showTestsButton.setSelection(showTestValue);
-    }
-  }
-
-  @Override
-  public void setEnabled(boolean flag) {
-    super.setEnabled(flag);
-    // algListViewer.getTable().setEnabled(flag); // it is not possible to just
-    // prevent from pressing on
-    // the checkboxes unfortunately. so we have to disable the whole control
-    // which also disables scrolling
-    // (that is really lame!)
-    dirButton.setEnabled(flag);
-    fileChooseButton.setEnabled(flag);
-    slotTypes.setEnabled(flag);
-    filterTypes.setEnabled(flag);
-    preFileText.setEnabled(flag);
-    inputDirectoryText.setEnabled(flag);
-    additionalDirectoryText.setEnabled(flag);
-    additionalButton.setEnabled(flag);
-    //testDirectoryText.setEnabled(flag);
-    //testButton.setEnabled(flag);
-  }
-
-  public static String getScriptPath() {
-    return preFileText.getText();
-  }
-
-}
diff --git a/trunk/ruta-ep-textruler/src/main/readme_bin/LICENSE b/trunk/ruta-ep-textruler/src/main/readme_bin/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-textruler/src/main/readme_bin/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-ep-textruler/src/main/readme_src/META-INF/LICENSE b/trunk/ruta-ep-textruler/src/main/readme_src/META-INF/LICENSE
deleted file mode 100644
index 959ee18..0000000
--- a/trunk/ruta-ep-textruler/src/main/readme_src/META-INF/LICENSE
+++ /dev/null
@@ -1,534 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-	

-====================================================================================================   

-

-

-  

-  
\ No newline at end of file
diff --git a/trunk/ruta-maven-plugin/pom.xml b/trunk/ruta-maven-plugin/pom.xml
deleted file mode 100644
index 6f28463..0000000
--- a/trunk/ruta-maven-plugin/pom.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<!--
-	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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<!-- This artifact name follows the conventions described http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-custom-plugin.html
-	     where patterns like xxx-maven-plugin and maven-xxx-plugin can be invoked just using xxx if the right settings are in place -->
-	<artifactId>ruta-maven-plugin</artifactId>
-	<packaging>maven-plugin</packaging>
-	<name>Apache UIMA Maven: ${project.artifactId}</name>
-	<description>A Maven Plugin for generating descriptors from UIMA Ruta script files.</description>
-	<prerequisites>
-		<maven>3.0</maven>
-	</prerequisites>
-	<parent>
-		<groupId>org.apache.uima</groupId>
-		<artifactId>ruta-parent</artifactId>
-		<version>2.3.0</version>
-		<relativePath>../ruta-parent/pom.xml</relativePath>
-	</parent>
-	<properties>
-    <postNoticeText />
-  </properties>
-  <url>${uimaWebsiteUrl}</url>
-  <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-maven-plugin</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-maven-plugin</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-maven-plugin</developerConnection>
-  </scm>
-	<dependencies>
-		<!-- Dependencies on the Maven Plugin API and friends -->
-		<dependency>
-      <groupId>org.apache.uima</groupId>
-      <artifactId>ruta-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-		<dependency>
-			<groupId>org.apache.maven</groupId>
-			<artifactId>maven-plugin-api</artifactId>
-			<version>3.0.3</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.maven</groupId>
-			<artifactId>maven-core</artifactId>
-			<version>3.0.3</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.maven.plugin-tools</groupId>
-			<artifactId>maven-plugin-annotations</artifactId>
-			<version>3.2</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.sonatype.plexus</groupId>
-			<artifactId>plexus-build-api</artifactId>
-			<version>0.0.7</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.maven.plugin-testing</groupId>
-			<artifactId>maven-plugin-testing-harness</artifactId>
-			<version>2.0</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-	<build>
-	  <pluginManagement>
-      <plugins>
-        <plugin>
-          <artifactId>maven-javadoc-plugin</artifactId>
-<!--          <version>2.8.1</version> -->
-          <configuration>
-            <!-- avoiding javadoc warnings caused by Mojo annotations -->
-            <tagletArtifacts>
-              <tagletArtifact>
-                <groupId>org.apache.maven.plugin-tools</groupId>
-                <artifactId>maven-plugin-tools-javadoc</artifactId>
-                <version>2.9</version>
-              </tagletArtifact>
-            </tagletArtifacts>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-	
-	</build>
-</project>
diff --git a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateDescriptorMojo.java b/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateDescriptorMojo.java
deleted file mode 100644
index 14fc61e..0000000
--- a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateDescriptorMojo.java
+++ /dev/null
@@ -1,597 +0,0 @@
-/*
- * 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.ruta.maven;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-import java.util.Set;
-
-import org.antlr.runtime.RecognitionException;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.exception.ExceptionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.plugins.annotations.Component;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.project.MavenProject;
-import org.apache.uima.analysis_engine.AnalysisEngineDescription;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.ruta.descriptor.RutaBuildOptions;
-import org.apache.uima.ruta.descriptor.RutaDescriptorFactory;
-import org.apache.uima.ruta.descriptor.RutaDescriptorInformation;
-import org.apache.uima.ruta.extensions.IRutaExtension;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLizable;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import org.codehaus.plexus.util.xml.Xpp3DomWriter;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import org.sonatype.plexus.build.incremental.BuildContext;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
-import org.springframework.core.io.DefaultResourceLoader;
-import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.type.filter.AssignableTypeFilter;
-import org.xml.sax.SAXException;
-
-/**
- * Generate descriptors from UIMA Ruta script files.
- * 
- */
-@Mojo(name = "generate", defaultPhase = LifecyclePhase.PROCESS_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE)
-public class RutaGenerateDescriptorMojo extends AbstractMojo {
-  private static final String RUTA_BUILD_VARS = "RUTA_BUILD_VARS";
-
-  private static final String DEFAULT_TARGET_DIR = "${project.build.directory}/generated-sources/ruta/descriptor";
-
-  private static final String RUTA_NATURE = "org.apache.uima.ruta.ide.nature";
-
-  @Component
-  private MavenProject project;
-
-  @Component
-  private BuildContext buildContext;
-
-  /**
-   * The directory where the generated type system descriptors will be written.
-   */
-  @Parameter(defaultValue = DEFAULT_TARGET_DIR, required = true)
-  private File typeSystemOutputDirectory;
-
-  /**
-   * The directory where the generated analysis engine descriptors will be written.
-   */
-  @Parameter(defaultValue = DEFAULT_TARGET_DIR, required = true)
-  private File analysisEngineOutputDirectory;
-
-  /**
-   * The template descriptor for the generated type system.
-   */
-  @Parameter(required = false)
-  private File typeSystemTemplate;
-
-  /**
-   * The template descriptor for the generated analysis engine.
-   */
-  @Parameter(required = false)
-  private File analysisEngineTemplate;
-
-  /**
-   * Script paths of the generated analysis engine descriptor.
-   */
-  @Parameter(required = false)
-  private String[] scriptPaths;
-
-  /**
-   * Descriptor paths of the generated analysis engine descriptor.
-   */
-  @Parameter(required = false)
-  private String[] descriptorPaths;
-
-  /**
-   * Resource paths of the generated analysis engine descriptor.
-   */
-  @Parameter(required = false)
-  private String[] resourcePaths;
-
-  /**
-   * Suffix used for the generated type system descriptors.
-   */
-  @Parameter(defaultValue = "TypeSystem", required = true)
-  private String typeSystemSuffix;
-
-  /**
-   * Suffix used for the generated analysis engine descriptors.
-   */
-  @Parameter(defaultValue = "Engine", required = true)
-  private String analysisEngineSuffix;
-
-  /**
-   * Source file encoding.
-   */
-  @Parameter(defaultValue = "${project.build.sourceEncoding}", required = true)
-  private String encoding;
-
-  /**
-   * Type of type system imports. default false = import by location.
-   */
-  @Parameter(defaultValue = "false", required = false)
-  private boolean importByName;
-
-  /**
-   * Option to resolve imports while building.
-   */
-  @Parameter(defaultValue = "false", required = false)
-  private boolean resolveImports;
-
-  /**
-   * Amount of retries for building dependent descriptors.
-   */
-  @Parameter(defaultValue = "-1", required = false)
-  private int maxBuildRetries;
-
-  /**
-   * List of packages with language extensions
-   */
-  @Parameter(defaultValue = "org.apache.uima.ruta", required = false)
-  private String[] extensionPackages;
-
-  /**
-   * Add UIMA Ruta nature to .project
-   */
-  @Parameter(defaultValue = "true", required = false)
-  private boolean addRutaNature;
-
-  /**
-   * Script source paths for the UIMA Ruta build path.
-   */
-  @Parameter(required = false)
-  private String[] buildPaths;
-
-  public void execute() throws MojoExecutionException, MojoFailureException {
-
-    if (!typeSystemOutputDirectory.exists()) {
-      typeSystemOutputDirectory.mkdirs();
-      buildContext.refresh(typeSystemOutputDirectory);
-    }
-
-    if (!analysisEngineOutputDirectory.exists()) {
-      analysisEngineOutputDirectory.mkdirs();
-      buildContext.refresh(analysisEngineOutputDirectory);
-    }
-
-    RutaDescriptorFactory factory = new RutaDescriptorFactory();
-    if (typeSystemTemplate != null) {
-      try {
-        factory.setDefaultTypeSystem(typeSystemTemplate.toURI().toURL());
-      } catch (MalformedURLException e) {
-        getLog().warn("Failed to get URL of " + typeSystemTemplate, e);
-      }
-    }
-    if (analysisEngineTemplate != null) {
-      try {
-        factory.setDefaultEngine(analysisEngineTemplate.toURI().toURL());
-      } catch (MalformedURLException e) {
-        getLog().warn("Failed to get URL of " + analysisEngineTemplate, e);
-      }
-    }
-
-    URLClassLoader classloader = getClassloader(project, getLog());
-
-    RutaBuildOptions options = new RutaBuildOptions();
-    options.setTypeSystemSuffix(typeSystemSuffix);
-    options.setAnalysisEngineSuffix(analysisEngineSuffix);
-    options.setEncoding(encoding);
-    options.setResolveImports(resolveImports);
-    options.setImportByName(importByName);
-    options.setClassLoader(classloader);
-
-    List<String> extensions = getExtensionsFromClasspath(classloader);
-    options.setLanguageExtensions(extensions);
-
-    String[] files = FileUtils.getFilesFromExtension(project.getBasedir().getAbsolutePath(),
-            new String[] { "ruta" });
-
-    List<File> filesToBuild = new ArrayList<File>();
-    for (String each : files) {
-      File file = new File(each);
-      boolean descriptorMissing = isDescriptorMissing(file);
-      if (descriptorMissing || buildContext.hasDelta(file)) {
-        filesToBuild.add(file);
-      }
-    }
-
-    if (addRutaNature) {
-      addRutaNature();
-      addRutaBuildPath();
-    }
-    
-    if (filesToBuild.isEmpty()) {
-      getLog().debug("UIMA Ruta Building: Skipped, since no changes were detected.");
-      return;
-    }
-
-    if (maxBuildRetries == -1) {
-      maxBuildRetries = filesToBuild.size() * 3;
-    }
-
-    Queue<RutaDescriptorInformation> toBuild = new LinkedList<RutaDescriptorInformation>();
-
-    for (File file : filesToBuild) {
-      try {
-        RutaDescriptorInformation descriptorInformation = factory.parseDescriptorInformation(file,
-                options);
-        toBuild.add(descriptorInformation);
-      } catch (RecognitionException re) {
-        getLog().warn("Failed to parse UIMA Ruta script file: " + file.getAbsolutePath(), re);
-      } catch (IOException ioe) {
-        getLog().warn("Failed to load UIMA Ruta script file: " + file.getAbsolutePath(), ioe);
-      }
-    }
-
-    int count = 0;
-    while (!toBuild.isEmpty() && count <= maxBuildRetries) {
-      RutaDescriptorInformation descriptorInformation = toBuild.poll();
-      String scriptName = descriptorInformation.getScriptName();
-      try {
-        createDescriptors(factory, options, descriptorInformation);
-      } catch (RecognitionException re) {
-        getLog().warn("Failed to parse UIMA Ruta script: " + scriptName, re);
-      } catch (IOException ioe) {
-        toBuild.add(descriptorInformation);
-        getLog().warn("Trying to build " + scriptName + ": " + ioe.toString());
-        count++;
-      } catch (SAXException saxe) {
-        getLog().warn("Failed to write descriptor: " + scriptName, saxe);
-      } catch (URISyntaxException urise) {
-        getLog().warn("Failed to get uri: " + scriptName, urise);
-      } catch (ResourceInitializationException rie) {
-        getLog().warn("Failed initialize resource: " + scriptName, rie);
-      } catch (InvalidXMLException ixmle) {
-        getLog().warn("Invalid XML while building descriptor: " + scriptName, ixmle);
-      }
-    }
-
-    for (RutaDescriptorInformation eachFailed : toBuild) {
-      String scriptName = eachFailed.getScriptName();
-      getLog().warn("Failed to build UIMA Ruta script: " + scriptName);
-    }
-
-  }
-
-  private boolean isDescriptorMissing(File file) {
-    String scriptName = file.getName().substring(0, file.getName().length() - 5);
-
-    String aeName = scriptName + analysisEngineSuffix + ".xml";
-    String[] aeFiles = FileUtils.getFilesFromExtension(
-            analysisEngineOutputDirectory.getAbsolutePath(), new String[] { aeName });
-    if (aeFiles == null || aeFiles.length == 0) {
-      return true;
-    }
-
-    String tsName = scriptName + typeSystemOutputDirectory + ".xml";
-    String[] tsFiles = FileUtils.getFilesFromExtension(typeSystemOutputDirectory.getAbsolutePath(),
-            new String[] { tsName });
-    if (tsFiles == null || tsFiles.length == 0) {
-      return true;
-    }
-
-    return false;
-  }
-
-  private List<String> getExtensionsFromClasspath(ClassLoader classloader) {
-    List<String> result = new ArrayList<String>();
-    ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(
-            true);
-    ResourceLoader resourceLoader = new DefaultResourceLoader(classloader);
-    provider.setResourceLoader(resourceLoader);
-    provider.addIncludeFilter(new AssignableTypeFilter(IRutaExtension.class));
-
-    for (String basePackage : extensionPackages) {
-      Set<BeanDefinition> components = provider.findCandidateComponents(basePackage);
-      for (BeanDefinition component : components) {
-        String beanClassName = component.getBeanClassName();
-        result.add(beanClassName);
-      }
-    }
-    return result;
-
-  }
-
-  private void createDescriptors(RutaDescriptorFactory factory, RutaBuildOptions options,
-          RutaDescriptorInformation descriptorInformation) throws IOException,
-          RecognitionException, InvalidXMLException, ResourceInitializationException,
-          URISyntaxException, SAXException {
-    String packageString = "";
-    if (!StringUtils.isBlank(descriptorInformation.getPackageString())) {
-      packageString = descriptorInformation.getPackageString().replaceAll("[.]", "/").concat("/");
-    }
-    String engineOutput = new File(analysisEngineOutputDirectory, packageString
-            + descriptorInformation.getScriptName() + analysisEngineSuffix + ".xml")
-            .getAbsolutePath();
-    String typeSystemOutput = new File(typeSystemOutputDirectory, packageString
-            + descriptorInformation.getScriptName() + typeSystemSuffix + ".xml").getAbsolutePath();
-    Pair<AnalysisEngineDescription, TypeSystemDescription> descriptions = factory
-            .createDescriptions(engineOutput, typeSystemOutput, descriptorInformation, options,
-                    scriptPaths, descriptorPaths, resourcePaths);
-    write(descriptions.getKey(), engineOutput);
-    write(descriptions.getValue(), typeSystemOutput);
-    buildContext.refresh(analysisEngineOutputDirectory);
-    buildContext.refresh(typeSystemOutputDirectory);
-  }
-
-  private void write(XMLizable desc, String aFilename) throws SAXException, IOException {
-    OutputStream os = null;
-    try {
-      File out = new File(aFilename);
-      out.getParentFile().mkdirs();
-      os = buildContext.newFileOutputStream(out);
-      out.getParentFile().mkdirs();
-      getLog().debug("Writing descriptor to: " + out);
-      desc.toXML(os);
-      buildContext.refresh(out);
-    } finally {
-      IOUtils.closeQuietly(os);
-    }
-  }
-
-  /**
-   * Create a class loader which covers the classes compiled in the current project and all
-   * dependencies.
-   */
-  public static URLClassLoader getClassloader(MavenProject aProject, Log aLog)
-          throws MojoExecutionException {
-    List<URL> urls = new ArrayList<URL>();
-    try {
-      for (Object object : aProject.getCompileClasspathElements()) {
-        String path = (String) object;
-        aLog.debug("Classpath entry: " + object);
-        urls.add(new File(path).toURI().toURL());
-      }
-    } catch (IOException e) {
-      throw new MojoExecutionException("Unable to assemble classpath: "
-              + ExceptionUtils.getRootCauseMessage(e), e);
-    } catch (DependencyResolutionRequiredException e) {
-      throw new MojoExecutionException("Unable to resolve dependencies: "
-              + ExceptionUtils.getRootCauseMessage(e), e);
-    }
-
-    for (Artifact dep : (Set<Artifact>) aProject.getDependencyArtifacts()) {
-      try {
-        if (dep.getFile() == null) {
-          // Unresolved file because it is in the wrong scope (e.g. test?)
-          continue;
-        }
-        aLog.debug("Classpath entry: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":"
-                + dep.getVersion() + " -> " + dep.getFile());
-        urls.add(dep.getFile().toURI().toURL());
-      } catch (Exception e) {
-        throw new MojoExecutionException("Unable get dependency artifact location for "
-                + dep.getGroupId() + ":" + dep.getArtifactId() + ":" + dep.getVersion()
-                + ExceptionUtils.getRootCauseMessage(e), e);
-      }
-    }
-    return new URLClassLoader(urls.toArray(new URL[] {}),
-            RutaGenerateDescriptorMojo.class.getClassLoader());
-  }
-
-  private void addRutaNature() {
-
-    File projectDir = project.getFile().getParentFile();
-    File projectFile = new File(projectDir, ".project");
-    if (projectFile.exists()) {
-      Xpp3Dom project = null;
-      try {
-        project = Xpp3DomBuilder.build(new FileReader(projectFile));
-      } catch (XmlPullParserException | IOException e) {
-        getLog().warn("Failed to access .project file", e);
-      }
-      if (project == null) {
-        return;
-      }
-
-      Xpp3Dom naturesNode = project.getChild("natures");
-      if (naturesNode != null) {
-        for (int i = 0; i < naturesNode.getChildCount(); ++i) {
-          Xpp3Dom natureEntry = naturesNode.getChild(i);
-          if (natureEntry != null && StringUtils.equals(natureEntry.getValue(), RUTA_NATURE)) {
-            return;
-          }
-        }
-      }
-      Xpp3Dom rutaNatureNode = new Xpp3Dom("nature");
-      rutaNatureNode.setValue(RUTA_NATURE);
-      naturesNode.addChild(rutaNatureNode);
-
-      StringWriter sw = new StringWriter();
-      Xpp3DomWriter.write(sw, project);
-      String string = sw.toString();
-      // Xpp3DomWriter creates empty string with file writer, check before writing to file
-      if (!StringUtils.isBlank(string)) {
-        try {
-          FileUtils.fileWrite(projectFile, encoding, string);
-        } catch (IOException e) {
-          getLog().warn("Failed to write .project file", e);
-        }
-      }
-      buildContext.refresh(projectFile);
-    }
-  }
-
-  private void addRutaBuildPath() {
-    File projectDir = project.getFile().getParentFile();
-
-    if (buildPaths == null || buildPaths.length == 0) {
-      return;
-    }
-
-    File buildpathFile = new File(projectDir, ".buildpath");
-    if (buildpathFile.exists()) {
-      Xpp3Dom buildpathNode = null;
-      try {
-        buildpathNode = Xpp3DomBuilder.build(new FileReader(buildpathFile));
-      } catch (XmlPullParserException | IOException e) {
-        getLog().warn("Failed to access .buildpath file", e);
-      }
-
-      if (buildpathNode == null) {
-        return;
-      }
-
-      Collection<String> existingEntries = new HashSet<String>();
-      boolean foundInterpreter = false;
-      for (int i = 0; i < buildpathNode.getChildCount(); ++i) {
-        Xpp3Dom buildpathentry = buildpathNode.getChild(i);
-        if (buildpathentry != null
-                && StringUtils.equals(buildpathentry.getAttribute("kind"), "src")) {
-          existingEntries.add(buildpathentry.getAttribute("path"));
-        }
-        if (StringUtils.equals(buildpathentry.getAttribute("kind"), "con")
-                && StringUtils.equals(buildpathentry.getAttribute("path"),
-                        "org.eclipse.dltk.launching.INTERPRETER_CONTAINER")) {
-          foundInterpreter = true;
-        }
-        if (StringUtils.equals(buildpathentry.getAttribute("kind"), "var")
-                && StringUtils.equals(buildpathentry.getAttribute("path"), RUTA_BUILD_VARS)) {
-          buildpathNode.removeChild(i);
-        }
-      }
-      for (String eachBP : buildPaths) {
-        String[] split = eachBP.split(":");
-        String type = "script";
-        String path = eachBP;
-        if (split.length == 2) {
-          type = split[0];
-          path = split[1];
-        }
-        if (!existingEntries.contains(path)) {
-          addBuildPathEntry(buildpathNode, type, path);
-        }
-      }
-
-      addRutabuildVars(buildpathNode);
-
-      // if (!foundInterpreter) {
-      // Xpp3Dom buildpathentry = new Xpp3Dom("buildpathentry");
-      // buildpathentry.setAttribute("kind", "con");
-      // buildpathentry.setAttribute("path", "org.eclipse.dltk.launching.INTERPRETER_CONTAINER");
-      // buildpathNode.addChild(buildpathentry);
-      // }
-
-      StringWriter sw = new StringWriter();
-      Xpp3DomWriter.write(sw, buildpathNode);
-      String string = sw.toString();
-      // Xpp3DomWriter creates empty string with file writer, check before writing to file
-      if (!StringUtils.isBlank(string)) {
-        try {
-          FileUtils.fileWrite(buildpathFile, encoding, string);
-        } catch (IOException e) {
-          getLog().warn("Failed to write .buildpath file", e);
-        }
-      }
-
-    } else {
-      Xpp3Dom buildpathNode = new Xpp3Dom("buildpath");
-      for (String eachBP : buildPaths) {
-        String[] split = eachBP.split(":");
-        String type = "script";
-        String path = eachBP;
-        if (split.length == 2) {
-          type = split[0];
-          path = split[1];
-        }
-        addBuildPathEntry(buildpathNode, type, path);
-      }
-      Xpp3Dom buildpathentry = new Xpp3Dom("buildpathentry");
-      buildpathentry.setAttribute("kind", "con");
-      buildpathentry.setAttribute("path", "org.eclipse.dltk.launching.INTERPRETER_CONTAINER");
-      buildpathNode.addChild(buildpathentry);
-
-      addRutabuildVars(buildpathNode);
-
-      StringWriter sw = new StringWriter();
-      Xpp3DomWriter.write(sw, buildpathNode);
-      String string = sw.toString();
-      // Xpp3DomWriter creates empty string with file writer, check before writing to file
-      if (!StringUtils.isBlank(string)) {
-        try {
-          FileUtils.fileWrite(buildpathFile, encoding, string);
-        } catch (IOException e) {
-          getLog().warn("Failed to write .buildpath file", e);
-        }
-      }
-    }
-    buildContext.refresh(buildpathFile);
-  }
-
-  private void addRutabuildVars(Xpp3Dom buildpathNode) {
-    Xpp3Dom varEntry = new Xpp3Dom("buildpathentry");
-    varEntry.setAttribute("kind", "var");
-    varEntry.setAttribute("path", RUTA_BUILD_VARS);
-    Xpp3Dom attributes = new Xpp3Dom("attributes");
-    varEntry.addChild(attributes);
-    Xpp3Dom tsAttribute = new Xpp3Dom("attribute");
-    tsAttribute.setAttribute("name", "typeSystemSuffix");
-    tsAttribute.setAttribute("value", typeSystemSuffix);
-    attributes.addChild(tsAttribute);
-    Xpp3Dom aeAttribute = new Xpp3Dom("attribute");
-    aeAttribute.setAttribute("name", "analysisEngineSuffix");
-    aeAttribute.setAttribute("value", analysisEngineSuffix);
-    attributes.addChild(aeAttribute);
-    buildpathNode.addChild(varEntry);
-
-  }
-
-  private void addBuildPathEntry(Xpp3Dom buildpathNode, String type, String path) {
-    Xpp3Dom buildpathentry = new Xpp3Dom("buildpathentry");
-    buildpathentry.setAttribute("kind", "src");
-    buildpathentry.setAttribute("path", path);
-    Xpp3Dom attributes = new Xpp3Dom("attributes");
-    buildpathentry.addChild(attributes);
-    Xpp3Dom attribute = new Xpp3Dom("attribute");
-    attribute.setAttribute("name", "ruta");
-    attribute.setAttribute("value", type);
-    attributes.addChild(attribute);
-    buildpathNode.addChild(buildpathentry);
-  }
-}
diff --git a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateMTWLMojo.java b/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateMTWLMojo.java
deleted file mode 100644
index b2ff400..0000000
--- a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateMTWLMojo.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*

- * 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.ruta.maven;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.List;

-

-import org.apache.maven.model.FileSet;

-import org.apache.maven.plugin.AbstractMojo;

-import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.maven.plugin.MojoFailureException;

-import org.apache.maven.plugins.annotations.Component;

-import org.apache.maven.plugins.annotations.LifecyclePhase;

-import org.apache.maven.plugins.annotations.Mojo;

-import org.apache.maven.plugins.annotations.Parameter;

-import org.apache.maven.plugins.annotations.ResolutionScope;

-import org.apache.maven.project.MavenProject;

-import org.apache.uima.ruta.resource.MultiTreeWordList;

-import org.sonatype.plexus.build.incremental.BuildContext;

-

-/**

- * Generate descriptors from UIMA Ruta script files.

- * 

- */

-@Mojo(name = "mtwl", defaultPhase = LifecyclePhase.PROCESS_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE)

-public class RutaGenerateMTWLMojo extends AbstractMojo {

-  @Component

-  private MavenProject project;

-

-  @Component

-  private BuildContext buildContext;

-

-  /**

-   * The file where the generated multi tree word list will be written to.

-   */

-  @Parameter(defaultValue = "${project.build.directory}/generated-sources/ruta/resources/generated.mtwl", required = true)

-  private File outputFile;

-

-  /**

-   * The source files for the multi tree word list.

-   */

-  @Parameter(required = true)

-  private FileSet inputFiles;

-

-  /**

-   * Source file encoding.

-   */

-  @Parameter(defaultValue = "${project.build.sourceEncoding}", required = true)

-  private String encoding;

-

-  /**

-   * Compress resulting multi tree word list.

-   */

-  @Parameter(defaultValue = "true", required = true)

-  private boolean compress;

-

-  public void execute() throws MojoExecutionException, MojoFailureException {

-    File parentFile = outputFile.getParentFile();

-    if (!parentFile.exists()) {

-      parentFile.mkdirs();

-      buildContext.refresh(parentFile);

-    }

-    List<File> files = null;

-    try {

-      files = Utils.getFilesIfModified(inputFiles, buildContext);

-    } catch (IOException e) {

-      getLog().warn("Error accessing input files.", e);

-    }

-

-    MultiTreeWordList trie = null;

-    try {

-      trie = new MultiTreeWordList(files);

-    } catch (IOException e) {

-      getLog().warn("Error creating MTWL file.", e);

-    }

-

-    if (trie != null) {

-      try {

-        trie.createMTWLFile(outputFile.getAbsolutePath(), compress, encoding);

-        buildContext.refresh(outputFile);

-      } catch (IOException e) {

-        getLog().warn("Error writing MTWL file.", e);

-      }

-    }

-

-  }

-}

diff --git a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateTWLMojo.java b/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateTWLMojo.java
deleted file mode 100644
index bb37737..0000000
--- a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/RutaGenerateTWLMojo.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*

- * 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.ruta.maven;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.List;

-

-import org.apache.maven.model.FileSet;

-import org.apache.maven.plugin.AbstractMojo;

-import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.maven.plugin.MojoFailureException;

-import org.apache.maven.plugins.annotations.Component;

-import org.apache.maven.plugins.annotations.LifecyclePhase;

-import org.apache.maven.plugins.annotations.Mojo;

-import org.apache.maven.plugins.annotations.Parameter;

-import org.apache.maven.plugins.annotations.ResolutionScope;

-import org.apache.maven.project.MavenProject;

-import org.apache.uima.ruta.resource.TreeWordList;

-import org.sonatype.plexus.build.incremental.BuildContext;

-

-/**

- * Generate descriptors from UIMA Ruta script files.

- * 

- */

-@Mojo(name = "twl", defaultPhase = LifecyclePhase.PROCESS_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE)

-public class RutaGenerateTWLMojo extends AbstractMojo {

-  @Component

-  private MavenProject project;

-

-  @Component

-  private BuildContext buildContext;

-

-  /**

-   * The directory where the generated tree word lists will be written to.

-   */

-  @Parameter(defaultValue = "${project.build.directory}/generated-sources/ruta/resources/", required = true)

-  private File outputDirectory;

-

-  /**

-   * The source files for the tree word list.

-   */

-  @Parameter(required = true)

-  private FileSet inputFiles;

-

-  /**

-   * Source file encoding.

-   */

-  @Parameter(defaultValue = "${project.build.sourceEncoding}", required = true)

-  private String encoding;

-

-  /**

-   * Compress resulting tree word list.

-   */

-  @Parameter(defaultValue = "true", required = true)

-  private boolean compress;

-

-  public void execute() throws MojoExecutionException, MojoFailureException {

-    if (!outputDirectory.exists()) {

-      outputDirectory.mkdirs();

-      buildContext.refresh(outputDirectory);

-    }

-

-    List<File> files = null;

-    try {

-      files = Utils.getModifiedFiles(inputFiles, buildContext);

-    } catch (IOException e) {

-      getLog().warn("Error accessing input files.", e);

-    }

-

-    for (File file : files) {

-      TreeWordList list = null;

-      try {

-        list = new TreeWordList(file.getAbsolutePath(), false);

-      } catch (IOException e) {

-        getLog().warn("Error generating twl.", e);

-      }

-      if (list != null) {

-        String outputName = file.getName().substring(0, file.getName().length() - 3) + "twl";

-        File outputFile = new File(outputDirectory, outputName);

-        try {

-          list.createTWLFile(outputFile.getAbsolutePath(), compress, "UTF-8");

-          buildContext.refresh(outputFile);

-        } catch (IOException e) {

-          getLog().warn("Error writing twl file.", e);

-        }

-      }

-    }

-

-  }

-}

diff --git a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/Utils.java b/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/Utils.java
deleted file mode 100644
index a596609..0000000
--- a/trunk/ruta-maven-plugin/src/main/java/org/apache/uima/ruta/maven/Utils.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * 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.ruta.maven;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.List;

-

-import org.apache.maven.model.FileSet;

-import org.codehaus.plexus.util.FileUtils;

-import org.sonatype.plexus.build.incremental.BuildContext;

-

-public class Utils {

-

-  public static List<File> getModifiedFiles(FileSet fileSet, BuildContext buildContext) throws IOException {

-    List<File> result = new ArrayList<File>();

-

-    File directory = new File(fileSet.getDirectory());

-    String includes = toString(fileSet.getIncludes());

-    String excludes = toString(fileSet.getExcludes());

-

-    for (Object each : FileUtils.getFiles(directory, includes, excludes)) {

-      if (each instanceof File) {

-        File file = (File) each;

-        if (buildContext.hasDelta(file)) {

-          result.add(file);

-        }

-      }

-    }

-    return result;

-  }

-  

-  public static List<File> getFilesIfModified(FileSet fileSet, BuildContext buildContext) throws IOException {

-    List<File> result = new ArrayList<File>();

-

-    File directory = new File(fileSet.getDirectory());

-    String includes = toString(fileSet.getIncludes());

-    String excludes = toString(fileSet.getExcludes());

-

-    boolean modified = false;

-    for (Object each : FileUtils.getFiles(directory, includes, excludes)) {

-      if (each instanceof File) {

-        File file = (File) each;

-        result.add(file);

-        if (buildContext.hasDelta(file)) {

-          modified = true;

-        }

-      }

-    }

-    if(modified) {

-      return result;

-    } else {

-      return Collections.emptyList();

-    }

-  }

-

-  private static String toString(List<String> strings) {

-    StringBuilder sb = new StringBuilder();

-    for (String string : strings) {

-      if (sb.length() > 0) {

-        sb.append(", ");

-      }

-      sb.append(string);

-    }

-    return sb.toString();

-  }

-

-}

diff --git a/trunk/ruta-maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/trunk/ruta-maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
deleted file mode 100644
index 9b52b85..0000000
--- a/trunk/ruta-maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
-   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.
--->
-<lifecycleMappingMetadata>
-  <pluginExecutions>
-    <pluginExecution>
-      <pluginExecutionFilter>
-        <goals>
-          <goal>generate</goal>
-          <goal>twl</goal>
-          <goal>mtwl</goal>
-        </goals>
-      </pluginExecutionFilter>
-      <action>
-        <execute>
-          <runOnIncremental>true</runOnIncremental>
-          <runOnConfiguration>true</runOnConfiguration>
-        </execute>
-      </action>
-    </pluginExecution>
-  </pluginExecutions>
-</lifecycleMappingMetadata>
diff --git a/trunk/ruta-parent/pom.xml b/trunk/ruta-parent/pom.xml
deleted file mode 100644
index 8286557..0000000
--- a/trunk/ruta-parent/pom.xml
+++ /dev/null
@@ -1,222 +0,0 @@
-<?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.

--->

-

-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-  <modelVersion>4.0.0</modelVersion>

-

-  <parent>

-    <groupId>org.apache.uima</groupId>

-    <artifactId>parent-pom</artifactId>

-    <version>10</version>

-    <relativePath />

-  </parent>

-

-  <groupId>org.apache.uima</groupId>

-  <artifactId>ruta-parent</artifactId>

-  <packaging>pom</packaging>

-  <version>2.3.0</version>

-  <name>Apache UIMA Ruta: ${project.artifactId}</name>

-  <url>${uimaWebsiteUrl}</url>

-  <inceptionYear>2011</inceptionYear>

-  <description>The common parent pom for the UIMA Ruta</description>

-  

-  <!-- Special inheritance note

-       even though the <scm> element that follows is exactly the

-       same as those in super poms, it cannot be inherited because

-       there is some special code that computes the connection elements

-       from the chain of parent poms, if this is omitted.

-

-       Keeping this a bit factored allows cutting/pasting the <scm>

-       element, and just changing the following two properties -->

-  <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/tags/ruta-2.3.0/ruta-parent</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-parent</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-2.3.0/ruta-parent</developerConnection>

-  </scm>

-

-  <!-- The repositories and pluginRepositories section is duplicated from the parent pom one, and adds 

-    the Apache Snapshot Nexus repository where UIMA snapshots are deployed. This is needed if for instance, 

-    a project depends on some new SNAPSHOT level of a build tool, where the users hasn't checked out the 

-    build tooling. This allows maven to find the snapshots when looking for the parent of this pom -->

-  <repositories>

-    <repository>

-      <id>eclipsePlugins</id>

-      <name>Eclipse components</name>

-      <layout>default</layout>

-      <url>http://repo1.maven.org/eclipse</url>

-

-      <releases>

-        <updatePolicy>never</updatePolicy>

-        <checksumPolicy>fail</checksumPolicy>

-      </releases>

-

-      <snapshots>

-        <enabled>false</enabled>

-      </snapshots>

-    </repository>

-

-    <!-- modify central repository access: Turn on checksum checking -->

-    <repository>

-      <id>central</id>

-      <name>Maven Repository Switchboard</name>

-      <layout>default</layout>

-      <url>http://repo1.maven.org/maven2</url>

-

-      <releases>

-        <enabled>true</enabled>

-        <checksumPolicy>fail</checksumPolicy>

-        <updatePolicy>never</updatePolicy>

-      </releases>

-

-      <snapshots>

-        <enabled>false</enabled>

-      </snapshots>

-

-    </repository>

-

-    <repository>

-      <id>apache.snapshots</id>

-      <name>Apache Snapshot Repository</name>

-      <url>http://repository.apache.org/snapshots</url>

-      <releases>

-        <enabled>false</enabled>

-      </releases>

-    </repository>

-

-    <!-- Temporary repository that contains osgi bundles like DLTK 3.0. Added to ease building the UIMA Ruta 

-      Eclipse plugins that depend on bundles, which are not provided by public maven repositories. -->

-    <repository>

-      <id>ukp-osgi-releases</id>

-      <url>http://zoidberg.ukp.informatik.tu-darmstadt.de/artifactory/public-ext-osgi-releases-local</url>

-    </repository>

-

-  </repositories>

-

-  <pluginRepositories>

-    <pluginRepository>

-      <id>apache.snapshots.plugins</id>

-      <name>Apache Snapshot Repository - Maven plugins</name>

-      <url>http://repository.apache.org/snapshots</url>

-      <layout>default</layout>

-      <releases>

-        <enabled>false</enabled>

-      </releases>

-      <snapshots>

-        <enabled>true</enabled>

-        <checksumPolicy>fail</checksumPolicy>

-        <updatePolicy>never</updatePolicy>

-      </snapshots>

-    </pluginRepository>

-  </pluginRepositories>

-  

-    <properties>

-    <uniWueNoticeText>Portions of UIMA Ruta were originally developed by 

-the Universität Würzburg.

-Copyright (c) 2006, 2011 Universität Würzburg.</uniWueNoticeText>

-    <postNoticeText>${uniWueNoticeText}

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License.

-    </postNoticeText>

-    <uimaVersion>2.7.0</uimaVersion>

-  </properties>

-  

-  <build>

-    <pluginManagement>

-      <plugins>

-        <plugin>

-          <groupId>org.apache.uima</groupId>

-          <artifactId>uima-build-helper-maven-plugin</artifactId>

-          <version>7</version>

-        </plugin>

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-compiler-plugin</artifactId>

-          <configuration>

-            <source>1.7</source>

-            <target>1.7</target>

-          </configuration>

-        </plugin>

-        <plugin>

-          <groupId>org.apache.maven.plugins</groupId>

-          <artifactId>maven-javadoc-plugin</artifactId> 

-          <executions>

-            <execution>

-              <id>attach-javadocs</id>

-              <configuration>

-                <source>7</source>

-              </configuration> 

-            </execution>

-          </executions>

-          <configuration>

-            <source>7</source>

-          </configuration>  

-        </plugin>

-      </plugins>

-    </pluginManagement>

-  <plugins>

-    <plugin>

-      <artifactId>maven-enforcer-plugin</artifactId>

-        <executions>

-          <execution>

-            <id>enforce-versions</id>

-            <configuration>

-              <rules>

-                <requireMavenVersion>

-                  <version>3.0</version>

-                </requireMavenVersion>

-                <requireJavaVersion>

-                  <version>1.7</version>

-                </requireJavaVersion>

-              </rules>

-            </configuration>

-          </execution>

-        </executions>

-    </plugin>

-    <plugin>

-      <artifactId>maven-resources-plugin</artifactId>

-      <executions>

-        <execution>

-          <id>copy customized bin LICENSE file</id>

-          <phase>prepare-package</phase>

-          <goals>

-            <goal>copy-resources</goal>

-          </goals>

-          <configuration>

-            <outputDirectory>${project.build.directory}/classes/META-INF</outputDirectory>

-            <resources>

-              <resource>

-                <directory>src/main/readme_bin</directory>

-                <includes>

-                  <include>LICENSE</include>

-                  <include>NOTICE</include>

-                </includes>

-                <filtering>true</filtering>

-              </resource>

-            </resources>

-          </configuration>

-        </execution>

-      </executions>

-    </plugin>

-  </plugins>

-  </build>

-  

-</project>

diff --git a/trunk/src/main/assembly/bin.xml b/trunk/src/main/assembly/bin.xml
deleted file mode 100644
index b10d0e3..0000000
--- a/trunk/src/main/assembly/bin.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<!--

-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.    

--->

-

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>zip</format>

-  </formats>

-  

-  <includeBaseDirectory>true</includeBaseDirectory>

-  

-  <baseDirectory>apache-uima-ruta-${project.version}</baseDirectory>

-  

-  <!-- Copy each core binary into the /lib dir of the distribution -->

-  <dependencySets>

-    <dependencySet>

-      <includes>

-        <include>org.apache.uima:ruta-core</include>

-      </includes>

-      <unpack>false</unpack>

-      <scope>runtime</scope>

-      <outputDirectory>lib</outputDirectory>

-      <outputFileNameMapping>${artifact.build.finalName}.jar</outputFileNameMapping>

-      <useProjectArtifact>false</useProjectArtifact>

-      <fileMode>644</fileMode> 

-      <directoryMode>755</directoryMode>        

-    </dependencySet>

-    

-    <!-- Copy each eclipse plugin into the /eclipsePlugins dir of the distribution -->

-    <dependencySet>

-      <includes>

-        <include>org.apache.uima:ruta-ep-addons</include>

-        <include>org.apache.uima:ruta-ep-caseditor</include>

-        <include>org.apache.uima:ruta-ep-engine</include>

-        <include>org.apache.uima:ruta-ep-ide</include>

-        <include>org.apache.uima:ruta-ep-textruler</include>

-      </includes>

-      <unpack>false</unpack>

-      <scope>runtime</scope>

-      <outputDirectory>eclipsePlugins</outputDirectory>

-      <outputFileNameMapping>${artifact.build.finalName}.jar</outputFileNameMapping>

-      <useProjectArtifact>false</useProjectArtifact>

-      <fileMode>644</fileMode> 

-      <directoryMode>755</directoryMode>        

-    </dependencySet>

-  </dependencySets>

-  

-  <!-- Add other files - scripts, documentation, examples -->

-  <fileSets>

-  

-    <!-- copy bin distr license and notice -->

-    <fileSet>

-      <directory>src/main/readme</directory>

-      <outputDirectory></outputDirectory>

-      <fileMode>644</fileMode>

-      <directoryMode>755</directoryMode>      

-    </fileSet>

-    

-    <!-- copy standard top level files -->        

-    <fileSet>

-      <directory>.</directory>

-      <outputDirectory></outputDirectory>

-      <fileMode>644</fileMode>

-      <directoryMode>755</directoryMode> 

-      <includes>

-        <include>README*</include>

-        <include>readme*</include>

-        <include>RELEASE_NOTES*</include>

-        <include>Release-Notes*</include>

-        <include>issuesFixed/**</include>      

-      </includes>       

-    </fileSet>

-

-    <!-- docbooks -->

-    <fileSet>

-      <directory>ruta-docbook/target/site/</directory>

-      <outputDirectory>docs</outputDirectory>

-      <fileMode>644</fileMode>

-      <directoryMode>755</directoryMode>        

-    </fileSet>

-        

-    <!-- examples -->

-    <fileSet>

-      <directory>example-projects</directory>

-      <outputDirectory>examples</outputDirectory>

-      <fileMode>644</fileMode>

-      <directoryMode>755</directoryMode>

-    </fileSet>

-  </fileSets>

-</assembly>
\ No newline at end of file
diff --git a/trunk/src/main/readme/LICENSE b/trunk/src/main/readme/LICENSE
deleted file mode 100644
index 0b2cf85..0000000
--- a/trunk/src/main/readme/LICENSE
+++ /dev/null
@@ -1,786 +0,0 @@
-

-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed 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.

-   

-====================================================================================================   

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/).

-

-Creative Commons Legal Code

-

-Attribution 3.0 Unported

-

-    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE

-    LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN

-    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS

-    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES

-    REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR

-    DAMAGES RESULTING FROM ITS USE.

-

-License

-

-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE

-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY

-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS

-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

-

-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE

-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY

-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS

-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

-CONDITIONS.

-

-1. Definitions

-

- a. "Adaptation" means a work based upon the Work, or upon the Work and

-    other pre-existing works, such as a translation, adaptation,

-    derivative work, arrangement of music or other alterations of a

-    literary or artistic work, or phonogram or performance and includes

-    cinematographic adaptations or any other form in which the Work may be

-    recast, transformed, or adapted including in any form recognizably

-    derived from the original, except that a work that constitutes a

-    Collection will not be considered an Adaptation for the purpose of

-    this License. For the avoidance of doubt, where the Work is a musical

-    work, performance or phonogram, the synchronization of the Work in

-    timed-relation with a moving image ("synching") will be considered an

-    Adaptation for the purpose of this License.

- b. "Collection" means a collection of literary or artistic works, such as

-    encyclopedias and anthologies, or performances, phonograms or

-    broadcasts, or other works or subject matter other than works listed

-    in Section 1(f) below, which, by reason of the selection and

-    arrangement of their contents, constitute intellectual creations, in

-    which the Work is included in its entirety in unmodified form along

-    with one or more other contributions, each constituting separate and

-    independent works in themselves, which together are assembled into a

-    collective whole. A work that constitutes a Collection will not be

-    considered an Adaptation (as defined above) for the purposes of this

-    License.

- c. "Distribute" means to make available to the public the original and

-    copies of the Work or Adaptation, as appropriate, through sale or

-    other transfer of ownership.

- d. "Licensor" means the individual, individuals, entity or entities that

-    offer(s) the Work under the terms of this License.

- e. "Original Author" means, in the case of a literary or artistic work,

-    the individual, individuals, entity or entities who created the Work

-    or if no individual or entity can be identified, the publisher; and in

-    addition (i) in the case of a performance the actors, singers,

-    musicians, dancers, and other persons who act, sing, deliver, declaim,

-    play in, interpret or otherwise perform literary or artistic works or

-    expressions of folklore; (ii) in the case of a phonogram the producer

-    being the person or legal entity who first fixes the sounds of a

-    performance or other sounds; and, (iii) in the case of broadcasts, the

-    organization that transmits the broadcast.

- f. "Work" means the literary and/or artistic work offered under the terms

-    of this License including without limitation any production in the

-    literary, scientific and artistic domain, whatever may be the mode or

-    form of its expression including digital form, such as a book,

-    pamphlet and other writing; a lecture, address, sermon or other work

-    of the same nature; a dramatic or dramatico-musical work; a

-    choreographic work or entertainment in dumb show; a musical

-    composition with or without words; a cinematographic work to which are

-    assimilated works expressed by a process analogous to cinematography;

-    a work of drawing, painting, architecture, sculpture, engraving or

-    lithography; a photographic work to which are assimilated works

-    expressed by a process analogous to photography; a work of applied

-    art; an illustration, map, plan, sketch or three-dimensional work

-    relative to geography, topography, architecture or science; a

-    performance; a broadcast; a phonogram; a compilation of data to the

-    extent it is protected as a copyrightable work; or a work performed by

-    a variety or circus performer to the extent it is not otherwise

-    considered a literary or artistic work.

- g. "You" means an individual or entity exercising rights under this

-    License who has not previously violated the terms of this License with

-    respect to the Work, or who has received express permission from the

-    Licensor to exercise rights under this License despite a previous

-    violation.

- h. "Publicly Perform" means to perform public recitations of the Work and

-    to communicate to the public those public recitations, by any means or

-    process, including by wire or wireless means or public digital

-    performances; to make available to the public Works in such a way that

-    members of the public may access these Works from a place and at a

-    place individually chosen by them; to perform the Work to the public

-    by any means or process and the communication to the public of the

-    performances of the Work, including by public digital performance; to

-    broadcast and rebroadcast the Work by any means including signs,

-    sounds or images.

- i. "Reproduce" means to make copies of the Work by any means including

-    without limitation by sound or visual recordings and the right of

-    fixation and reproducing fixations of the Work, including storage of a

-    protected performance or phonogram in digital form or other electronic

-    medium.

-

-2. Fair Dealing Rights. Nothing in this License is intended to reduce,

-limit, or restrict any uses free from copyright or rights arising from

-limitations or exceptions that are provided for in connection with the

-copyright protection under copyright law or other applicable laws.

-

-3. License Grant. Subject to the terms and conditions of this License,

-Licensor hereby grants You a worldwide, royalty-free, non-exclusive,

-perpetual (for the duration of the applicable copyright) license to

-exercise the rights in the Work as stated below:

-

- a. to Reproduce the Work, to incorporate the Work into one or more

-    Collections, and to Reproduce the Work as incorporated in the

-    Collections;

- b. to create and Reproduce Adaptations provided that any such Adaptation,

-    including any translation in any medium, takes reasonable steps to

-    clearly label, demarcate or otherwise identify that changes were made

-    to the original Work. For example, a translation could be marked "The

-    original work was translated from English to Spanish," or a

-    modification could indicate "The original work has been modified.";

- c. to Distribute and Publicly Perform the Work including as incorporated

-    in Collections; and,

- d. to Distribute and Publicly Perform Adaptations.

- e. For the avoidance of doubt:

-

-     i. Non-waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme cannot be waived, the Licensor

-        reserves the exclusive right to collect such royalties for any

-        exercise by You of the rights granted under this License;

-    ii. Waivable Compulsory License Schemes. In those jurisdictions in

-        which the right to collect royalties through any statutory or

-        compulsory licensing scheme can be waived, the Licensor waives the

-        exclusive right to collect such royalties for any exercise by You

-        of the rights granted under this License; and,

-   iii. Voluntary License Schemes. The Licensor waives the right to

-        collect royalties, whether individually or, in the event that the

-        Licensor is a member of a collecting society that administers

-        voluntary licensing schemes, via that society, from any exercise

-        by You of the rights granted under this License.

-

-The above rights may be exercised in all media and formats whether now

-known or hereafter devised. The above rights include the right to make

-such modifications as are technically necessary to exercise the rights in

-other media and formats. Subject to Section 8(f), all rights not expressly

-granted by Licensor are hereby reserved.

-

-4. Restrictions. The license granted in Section 3 above is expressly made

-subject to and limited by the following restrictions:

-

- a. You may Distribute or Publicly Perform the Work only under the terms

-    of this License. You must include a copy of, or the Uniform Resource

-    Identifier (URI) for, this License with every copy of the Work You

-    Distribute or Publicly Perform. You may not offer or impose any terms

-    on the Work that restrict the terms of this License or the ability of

-    the recipient of the Work to exercise the rights granted to that

-    recipient under the terms of the License. You may not sublicense the

-    Work. You must keep intact all notices that refer to this License and

-    to the disclaimer of warranties with every copy of the Work You

-    Distribute or Publicly Perform. When You Distribute or Publicly

-    Perform the Work, You may not impose any effective technological

-    measures on the Work that restrict the ability of a recipient of the

-    Work from You to exercise the rights granted to that recipient under

-    the terms of the License. This Section 4(a) applies to the Work as

-    incorporated in a Collection, but this does not require the Collection

-    apart from the Work itself to be made subject to the terms of this

-    License. If You create a Collection, upon notice from any Licensor You

-    must, to the extent practicable, remove from the Collection any credit

-    as required by Section 4(b), as requested. If You create an

-    Adaptation, upon notice from any Licensor You must, to the extent

-    practicable, remove from the Adaptation any credit as required by

-    Section 4(b), as requested.

- b. If You Distribute, or Publicly Perform the Work or any Adaptations or

-    Collections, You must, unless a request has been made pursuant to

-    Section 4(a), keep intact all copyright notices for the Work and

-    provide, reasonable to the medium or means You are utilizing: (i) the

-    name of the Original Author (or pseudonym, if applicable) if supplied,

-    and/or if the Original Author and/or Licensor designate another party

-    or parties (e.g., a sponsor institute, publishing entity, journal) for

-    attribution ("Attribution Parties") in Licensor's copyright notice,

-    terms of service or by other reasonable means, the name of such party

-    or parties; (ii) the title of the Work if supplied; (iii) to the

-    extent reasonably practicable, the URI, if any, that Licensor

-    specifies to be associated with the Work, unless such URI does not

-    refer to the copyright notice or licensing information for the Work;

-    and (iv) , consistent with Section 3(b), in the case of an Adaptation,

-    a credit identifying the use of the Work in the Adaptation (e.g.,

-    "French translation of the Work by Original Author," or "Screenplay

-    based on original Work by Original Author"). The credit required by

-    this Section 4 (b) may be implemented in any reasonable manner;

-    provided, however, that in the case of a Adaptation or Collection, at

-    a minimum such credit will appear, if a credit for all contributing

-    authors of the Adaptation or Collection appears, then as part of these

-    credits and in a manner at least as prominent as the credits for the

-    other contributing authors. For the avoidance of doubt, You may only

-    use the credit required by this Section for the purpose of attribution

-    in the manner set out above and, by exercising Your rights under this

-    License, You may not implicitly or explicitly assert or imply any

-    connection with, sponsorship or endorsement by the Original Author,

-    Licensor and/or Attribution Parties, as appropriate, of You or Your

-    use of the Work, without the separate, express prior written

-    permission of the Original Author, Licensor and/or Attribution

-    Parties.

- c. Except as otherwise agreed in writing by the Licensor or as may be

-    otherwise permitted by applicable law, if You Reproduce, Distribute or

-    Publicly Perform the Work either by itself or as part of any

-    Adaptations or Collections, You must not distort, mutilate, modify or

-    take other derogatory action in relation to the Work which would be

-    prejudicial to the Original Author's honor or reputation. Licensor

-    agrees that in those jurisdictions (e.g. Japan), in which any exercise

-    of the right granted in Section 3(b) of this License (the right to

-    make Adaptations) would be deemed to be a distortion, mutilation,

-    modification or other derogatory action prejudicial to the Original

-    Author's honor and reputation, the Licensor will waive or not assert,

-    as appropriate, this Section, to the fullest extent permitted by the

-    applicable national law, to enable You to reasonably exercise Your

-    right under Section 3(b) of this License (right to make Adaptations)

-    but not otherwise.

-

-5. Representations, Warranties and Disclaimer

-

-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR

-OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY

-KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,

-INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,

-FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF

-LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,

-WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

-OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

-

-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE

-LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR

-ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES

-ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS

-BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

-7. Termination

-

- a. This License and the rights granted hereunder will terminate

-    automatically upon any breach by You of the terms of this License.

-    Individuals or entities who have received Adaptations or Collections

-    from You under this License, however, will not have their licenses

-    terminated provided such individuals or entities remain in full

-    compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will

-    survive any termination of this License.

- b. Subject to the above terms and conditions, the license granted here is

-    perpetual (for the duration of the applicable copyright in the Work).

-    Notwithstanding the above, Licensor reserves the right to release the

-    Work under different license terms or to stop distributing the Work at

-    any time; provided, however that any such election will not serve to

-    withdraw this License (or any other license that has been, or is

-    required to be, granted under the terms of this License), and this

-    License will continue in full force and effect unless terminated as

-    stated above.

-

-8. Miscellaneous

-

- a. Each time You Distribute or Publicly Perform the Work or a Collection,

-    the Licensor offers to the recipient a license to the Work on the same

-    terms and conditions as the license granted to You under this License.

- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor

-    offers to the recipient a license to the original Work on the same

-    terms and conditions as the license granted to You under this License.

- c. If any provision of this License is invalid or unenforceable under

-    applicable law, it shall not affect the validity or enforceability of

-    the remainder of the terms of this License, and without further action

-    by the parties to this agreement, such provision shall be reformed to

-    the minimum extent necessary to make such provision valid and

-    enforceable.

- d. No term or provision of this License shall be deemed waived and no

-    breach consented to unless such waiver or consent shall be in writing

-    and signed by the party to be charged with such waiver or consent.

- e. This License constitutes the entire agreement between the parties with

-    respect to the Work licensed here. There are no understandings,

-    agreements or representations with respect to the Work not specified

-    here. Licensor shall not be bound by any additional provisions that

-    may appear in any communication from You. This License may not be

-    modified without the mutual written agreement of the Licensor and You.

- f. The rights granted under, and the subject matter referenced, in this

-    License were drafted utilizing the terminology of the Berne Convention

-    for the Protection of Literary and Artistic Works (as amended on

-    September 28, 1979), the Rome Convention of 1961, the WIPO Copyright

-    Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996

-    and the Universal Copyright Convention (as revised on July 24, 1971).

-    These rights and subject matter take effect in the relevant

-    jurisdiction in which the License terms are sought to be enforced

-    according to the corresponding provisions of the implementation of

-    those treaty provisions in the applicable national law. If the

-    standard suite of rights granted under applicable copyright law

-    includes additional rights not granted under this License, such

-    additional rights are deemed to be included in the License; this

-    License is not intended to restrict the license of any rights under

-    applicable law.

-

-

-Creative Commons Notice

-

-    Creative Commons is not a party to this License, and makes no warranty

-    whatsoever in connection with the Work. Creative Commons will not be

-    liable to You or any party on any legal theory for any damages

-    whatsoever, including without limitation any general, special,

-    incidental or consequential damages arising in connection to this

-    license. Notwithstanding the foregoing two (2) sentences, if Creative

-    Commons has expressly identified itself as the Licensor hereunder, it

-    shall have all rights and obligations of Licensor.

-

-    Except for the limited purpose of indicating to the public that the

-    Work is licensed under the CCPL, Creative Commons does not authorize

-    the use by either party of the trademark "Creative Commons" or any

-    related trademark or logo of Creative Commons without the prior

-    written consent of Creative Commons. Any permitted use will be in

-    compliance with Creative Commons' then-current trademark usage

-    guidelines, as may be published on its website or otherwise made

-    available upon request from time to time. For the avoidance of doubt,

-    this trademark restriction does not form part of this License.

-

-    Creative Commons may be contacted at http://creativecommons.org/.

-==================================================================================================== 

-

-This product contains ANTLR libraries (http://www.antlr.org/), 

-licensed under the BSD License.

-

-  The BSD License

-  Copyright (c) 2010 Terence Parr

-  All rights reserved.

-  Redistribution and use in source and binary forms, with or 

-  without modification, are permitted provided that the following 

-  conditions are met:

-

-  Redistributions of source code must retain the above copyright 

-  notice, this list of conditions and the following disclaimer.

-  Redistributions in binary form must reproduce the above 

-  copyright notice, this list of conditions and the following 

-  disclaimer in the documentation and/or other materials provided 

-  with the distribution.

-  Neither the name of the author nor the names of its contributors 

-  may be used to endorse or promote products derived from this 

-  software without specific prior written permission.

-  

-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 

-  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 

-  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 

-  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 

-  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 

-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 

-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 

-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 

-  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 

-  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 

-  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 

-  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 

-  THE POSSIBILITY OF SUCH DAMAGE.

-

-====================================================================================================   

-

-This product contains htmlparser libraries (http://htmlparser.sourceforge.net/), 

-licensed under the Common Public License.

-

-  Common Public License Version 1.0

-  

-  THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC

-  LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM

-  CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

-  

-  1. DEFINITIONS

-  

-  "Contribution" means:

-  

-      a) in the case of the initial Contributor, the initial code and

-  documentation distributed under this Agreement, and

-  

-      b) in the case of each subsequent Contributor:

-  

-      i) changes to the Program, and

-  

-      ii) additions to the Program;

-  

-      where such changes and/or additions to the Program originate from and are

-  distributed by that particular Contributor. A Contribution 'originates' from a

-  Contributor if it was added to the Program by such Contributor itself or anyone

-  acting on such Contributor's behalf. Contributions do not include additions to

-  the Program which: (i) are separate modules of software distributed in

-  conjunction with the Program under their own license agreement, and (ii) are not

-  derivative works of the Program.

-  

-  "Contributor" means any person or entity that distributes the Program.

-  

-  "Licensed Patents " mean patent claims licensable by a Contributor which are

-  necessarily infringed by the use or sale of its Contribution alone or when

-  combined with the Program.

-  

-  "Program" means the Contributions distributed in accordance with this Agreement.

-  

-  "Recipient" means anyone who receives the Program under this Agreement,

-  including all Contributors.

-  

-  2. GRANT OF RIGHTS

-  

-      a) Subject to the terms of this Agreement, each Contributor hereby grants

-  Recipient a non-exclusive, worldwide, royalty-free copyright license to

-  reproduce, prepare derivative works of, publicly display, publicly perform,

-  distribute and sublicense the Contribution of such Contributor, if any, and such

-  derivative works, in source code and object code form.

-  

-      b) Subject to the terms of this Agreement, each Contributor hereby grants

-  Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed

-  Patents to make, use, sell, offer to sell, import and otherwise transfer the

-  Contribution of such Contributor, if any, in source code and object code form.

-  This patent license shall apply to the combination of the Contribution and the

-  Program if, at the time the Contribution is added by the Contributor, such

-  addition of the Contribution causes such combination to be covered by the

-  Licensed Patents. The patent license shall not apply to any other combinations

-  which include the Contribution. No hardware per se is licensed hereunder.

-  

-      c) Recipient understands that although each Contributor grants the licenses

-  to its Contributions set forth herein, no assurances are provided by any

-  Contributor that the Program does not infringe the patent or other intellectual

-  property rights of any other entity. Each Contributor disclaims any liability to

-  Recipient for claims brought by any other entity based on infringement of

-  intellectual property rights or otherwise. As a condition to exercising the

-  rights and licenses granted hereunder, each Recipient hereby assumes sole

-  responsibility to secure any other intellectual property rights needed, if any.

-  For example, if a third party patent license is required to allow Recipient to

-  distribute the Program, it is Recipient's responsibility to acquire that license

-  before distributing the Program.

-  

-      d) Each Contributor represents that to its knowledge it has sufficient

-  copyright rights in its Contribution, if any, to grant the copyright license set

-  forth in this Agreement.

-  

-  3. REQUIREMENTS

-  

-  A Contributor may choose to distribute the Program in object code form under its

-  own license agreement, provided that:

-  

-      a) it complies with the terms and conditions of this Agreement; and

-  

-      b) its license agreement:

-  

-      i) effectively disclaims on behalf of all Contributors all warranties and

-  conditions, express and implied, including warranties or conditions of title and

-  non-infringement, and implied warranties or conditions of merchantability and

-  fitness for a particular purpose;

-  

-      ii) effectively excludes on behalf of all Contributors all liability for

-  damages, including direct, indirect, special, incidental and consequential

-  damages, such as lost profits;

-  

-      iii) states that any provisions which differ from this Agreement are offered

-  by that Contributor alone and not by any other party; and

-  

-      iv) states that source code for the Program is available from such

-  Contributor, and informs licensees how to obtain it in a reasonable manner on or

-  through a medium customarily used for software exchange. 

-  

-  When the Program is made available in source code form:

-  

-      a) it must be made available under this Agreement; and

-  

-      b) a copy of this Agreement must be included with each copy of the Program. 

-  

-  Contributors may not remove or alter any copyright notices contained within the

-  Program.

-  

-  Each Contributor must identify itself as the originator of its Contribution, if

-  any, in a manner that reasonably allows subsequent Recipients to identify the

-  originator of the Contribution.

-  

-  4. COMMERCIAL DISTRIBUTION

-  

-  Commercial distributors of software may accept certain responsibilities with

-  respect to end users, business partners and the like. While this license is

-  intended to facilitate the commercial use of the Program, the Contributor who

-  includes the Program in a commercial product offering should do so in a manner

-  which does not create potential liability for other Contributors. Therefore, if

-  a Contributor includes the Program in a commercial product offering, such

-  Contributor ("Commercial Contributor") hereby agrees to defend and indemnify

-  every other Contributor ("Indemnified Contributor") against any losses, damages

-  and costs (collectively "Losses") arising from claims, lawsuits and other legal

-  actions brought by a third party against the Indemnified Contributor to the

-  extent caused by the acts or omissions of such Commercial Contributor in

-  connection with its distribution of the Program in a commercial product

-  offering. The obligations in this section do not apply to any claims or Losses

-  relating to any actual or alleged intellectual property infringement. In order

-  to qualify, an Indemnified Contributor must: a) promptly notify the Commercial

-  Contributor in writing of such claim, and b) allow the Commercial Contributor to

-  control, and cooperate with the Commercial Contributor in, the defense and any

-  related settlement negotiations. The Indemnified Contributor may participate in

-  any such claim at its own expense.

-  

-  For example, a Contributor might include the Program in a commercial product

-  offering, Product X. That Contributor is then a Commercial Contributor. If that

-  Commercial Contributor then makes performance claims, or offers warranties

-  related to Product X, those performance claims and warranties are such

-  Commercial Contributor's responsibility alone. Under this section, the

-  Commercial Contributor would have to defend claims against the other

-  Contributors related to those performance claims and warranties, and if a court

-  requires any other Contributor to pay any damages as a result, the Commercial

-  Contributor must pay those damages.

-  

-  5. NO WARRANTY

-  

-  EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN

-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR

-  IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,

-  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each

-  Recipient is solely responsible for determining the appropriateness of using and

-  distributing the Program and assumes all risks associated with its exercise of

-  rights under this Agreement, including but not limited to the risks and costs of

-  program errors, compliance with applicable laws, damage to or loss of data,

-  programs or equipment, and unavailability or interruption of operations.

-  

-  6. DISCLAIMER OF LIABILITY

-  

-  EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY

-  CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,

-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST

-  PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,

-  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY

-  OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS

-  GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-  

-  7. GENERAL

-  

-  If any provision of this Agreement is invalid or unenforceable under applicable

-  law, it shall not affect the validity or enforceability of the remainder of the

-  terms of this Agreement, and without further action by the parties hereto, such

-  provision shall be reformed to the minimum extent necessary to make such

-  provision valid and enforceable.

-  

-  If Recipient institutes patent litigation against a Contributor with respect to

-  a patent applicable to software (including a cross-claim or counterclaim in a

-  lawsuit), then any patent licenses granted by that Contributor to such Recipient

-  under this Agreement shall terminate as of the date such litigation is filed. In

-  addition, if Recipient institutes patent litigation against any entity

-  (including a cross-claim or counterclaim in a lawsuit) alleging that the Program

-  itself (excluding combinations of the Program with other software or hardware)

-  infringes such Recipient's patent(s), then such Recipient's rights granted under

-  Section 2(b) shall terminate as of the date such litigation is filed.

-  

-  All Recipient's rights under this Agreement shall terminate if it fails to

-  comply with any of the material terms or conditions of this Agreement and does

-  not cure such failure in a reasonable period of time after becoming aware of

-  such noncompliance. If all Recipient's rights under this Agreement terminate,

-  Recipient agrees to cease use and distribution of the Program as soon as

-  reasonably practicable. However, Recipient's obligations under this Agreement

-  and any licenses granted by Recipient relating to the Program shall continue and

-  survive.

-  

-  Everyone is permitted to copy and distribute copies of this Agreement, but in

-  order to avoid inconsistency the Agreement is copyrighted and may only be

-  modified in the following manner. The Agreement Steward reserves the right to

-  publish new versions (including revisions) of this Agreement from time to time.

-  No one other than the Agreement Steward has the right to modify this Agreement.

-  IBM is the initial Agreement Steward. IBM may assign the responsibility to serve

-  as the Agreement Steward to a suitable separate entity. Each new version of the

-  Agreement will be given a distinguishing version number. The Program (including

-  Contributions) may always be distributed subject to the version of the Agreement

-  under which it was received. In addition, after a new version of the Agreement

-  is published, Contributor may elect to distribute the Program (including its

-  Contributions) under the new version. Except as expressly stated in Sections

-  2(a) and 2(b) above, Recipient receives no rights or licenses to the

-  intellectual property of any Contributor under this Agreement, whether

-  expressly, by implication, estoppel or otherwise. All rights in the Program not

-  expressly granted under this Agreement are reserved.

-  

-  This Agreement is governed by the laws of the State of New York and the

-  intellectual property laws of the United States of America. No party to this

-  Agreement will bring a legal action under this Agreement more than one year

-  after the cause of action arose. Each party waives its rights to a jury trial in

-  any resulting litigation.

-

-====================================================================================================   

-  

-  
\ No newline at end of file
diff --git a/trunk/src/main/readme/NOTICE b/trunk/src/main/readme/NOTICE
deleted file mode 100644
index 60e179e..0000000
--- a/trunk/src/main/readme/NOTICE
+++ /dev/null
@@ -1,13 +0,0 @@
-Apache UIMA Ruta

-Copyright 2011 The Apache Software Foundation

-

-This product includes software developed at

-The Apache Software Foundation (http://www.apache.org/).

-

-Portions of UIMA Ruta were originally developed by

-the Universität Würzburg.

-Copyright (c) 2006, 2011 Universität Würzburg.

-

-This product contains icons developed by Mark James 

-(http://www.famfamfam.com/lab/icons/silk/), licensed under the 

-Creative Commons Attribution 3.0 License.